From: Yedidya Feldblum Date: Mon, 28 Mar 2016 23:44:02 +0000 (-0700) Subject: s/MAX_STATIC_CONSTRUCTOR_PRIORITY/FOLLY_STATIC_CTOR_PRIORITY_MAX/g X-Git-Tag: 2016.07.26~405 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=03343ccb443b2ca14b2c1d4ebc99e2ede30aee74;p=folly.git s/MAX_STATIC_CONSTRUCTOR_PRIORITY/FOLLY_STATIC_CTOR_PRIORITY_MAX/g Summary:[Folly] `s/MAX_STATIC_CONSTRUCTOR_PRIORITY/FOLLY_STATIC_CTOR_PRIORITY_MAX/g`. Namespace it with a `FOLLY_` prefix - when Folly introduces its own symbols, it is best when they are namespaced. And stick `_MAX` at the end. Reads a bit more hierarchically to me that way. Reviewed By: andriigrynenko Differential Revision: D3095964 fb-gh-sync-id: 4ac8c00c03c8bd146fad9be96ce3849830504d96 fbshipit-source-id: 4ac8c00c03c8bd146fad9be96ce3849830504d96 --- diff --git a/folly/Portability.h b/folly/Portability.h index 1b6ce9db..fb4a6996 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -370,12 +370,12 @@ inline size_t malloc_usable_size(void* ptr) { #endif #if defined(__APPLE__) || defined(_MSC_VER) -#define MAX_STATIC_CONSTRUCTOR_PRIORITY +#define FOLLY_STATIC_CTOR_PRIORITY_MAX #else // 101 is the highest priority allowed by the init_priority attribute. // This priority is already used by JEMalloc and other memory allocators so // we will take the next one. -#define MAX_STATIC_CONSTRUCTOR_PRIORITY __attribute__ ((__init_priority__(102))) +#define FOLLY_STATIC_CTOR_PRIORITY_MAX __attribute__((__init_priority__(102))) #endif #endif // FOLLY_PORTABILITY_H_ diff --git a/folly/detail/ThreadLocalDetail.cpp b/folly/detail/ThreadLocalDetail.cpp index afe7c584..fcee5c7e 100644 --- a/folly/detail/ThreadLocalDetail.cpp +++ b/folly/detail/ThreadLocalDetail.cpp @@ -223,6 +223,6 @@ ElementWrapper& StaticMetaBase::get(EntryID* ent) { return threadEntry->elements[id]; } -MAX_STATIC_CONSTRUCTOR_PRIORITY +FOLLY_STATIC_CTOR_PRIORITY_MAX PthreadKeyUnregister PthreadKeyUnregister::instance_; }}