diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-11-15 15:24:33 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-11-15 15:24:33 +0400 |
commit | fd9236f1329dfb977de983edd7f4c2200c94927b (patch) | |
tree | e9ff875d4e90f29d9c53ef54635964d3e4d775f9 /specific.c | |
parent | f35de88159cc331f5d663e047f21605006937c27 (diff) | |
download | bdwgc-fd9236f1329dfb977de983edd7f4c2200c94927b.tar.gz |
Remove PREFIXED in specific.c/h; mark "specific" functions as GC_INNER
* include/private/specific.h (PREFIXED): Remove.
* include/private/specific.h (key_t, key_create, setspecific,
remove_specific, slow_getspecific, getspecific): Expand PREFIXED macro
(add "GC_" prefix).
* specific.c (key_create, setspecific, remove_specific,
slow_getspecific, check_tsd_marks): Likewise.
* include/private/specific.h (GC_key_create, GC_setspecific,
GC_remove_specific, GC_slow_getspecific): Use GC_INNER for function.
* specific.c (GC_key_create, GC_setspecific, GC_remove_specific,
GC_slow_getspecific): Likewise.
Diffstat (limited to 'specific.c')
-rw-r--r-- | specific.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -26,7 +26,8 @@ static tse invalid_tse = {INVALID_QTID, 0, 0, INVALID_THREADID}; /* appear valid to a reader. Used to fill in empty */ /* cache entries to avoid a check for 0. */ -int PREFIXED(key_create) (tsd ** key_ptr, void (* destructor)(void *)) { +GC_INNER int GC_key_create(tsd ** key_ptr, void (* destructor)(void *)) +{ int i; tsd * result = (tsd *)MALLOC_CLEAR(sizeof(tsd)); @@ -46,7 +47,8 @@ int PREFIXED(key_create) (tsd ** key_ptr, void (* destructor)(void *)) { return 0; } -int PREFIXED(setspecific) (tsd * key, void * value) { +GC_INNER int GC_setspecific(tsd * key, void * value) +{ pthread_t self = pthread_self(); int hash_val = HASH(self); volatile tse * entry = (volatile tse *)MALLOC_CLEAR(sizeof (tse)); @@ -68,7 +70,8 @@ int PREFIXED(setspecific) (tsd * key, void * value) { /* Remove thread-specific data for this thread. Should be called on */ /* thread exit. */ -void PREFIXED(remove_specific) (tsd * key) { +GC_INNER void GC_remove_specific(tsd * key) +{ pthread_t self = pthread_self(); unsigned hash_val = HASH(self); tse *entry; @@ -106,8 +109,9 @@ void PREFIXED(remove_specific) (tsd * key) { } /* Note that even the slow path doesn't lock. */ -void * PREFIXED(slow_getspecific) (tsd * key, unsigned long qtid, - tse * volatile * cache_ptr) { +GC_INNER void * GC_slow_getspecific(tsd * key, unsigned long qtid, + tse * volatile * cache_ptr) +{ pthread_t self = pthread_self(); unsigned hash_val = HASH(self); tse *entry = key -> hash[hash_val]; @@ -132,7 +136,7 @@ void * PREFIXED(slow_getspecific) (tsd * key, unsigned long qtid, #ifdef GC_ASSERTIONS /* Check that that all elements of the data structure associated */ /* with key are marked. */ - void PREFIXED(check_tsd_marks) (tsd *key) + void GC_check_tsd_marks(tsd *key) { int i; tse *p; |