diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-03-10 07:59:13 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-03-10 12:00:33 +0300 |
commit | cf0689ec6ec2e5e9b975a2c3626fef42006b7d62 (patch) | |
tree | 49694421c5b9419159a89bc617137a6d271f6737 /pthread_stop_world.c | |
parent | 5a8c02852532169ad81a87b553dc5fb3142d9e61 (diff) | |
download | bdwgc-cf0689ec6ec2e5e9b975a2c3626fef42006b7d62.tar.gz |
Move platform-dependent getspecific() call to a dedicated function
(refactoring)
* include/private/thread_local_alloc.h: Reformat comment.
* pthread_stop_world.c [NACL] (GC_nacl_gc_thread_sel): Add TODO item.
* pthread_support.c (GC_thread_is_registered): Likewise.
* thread_local_alloc.c [THREAD_LOCAL_ALLOC] (GC_get_tlfs): New STATIC
function (move part of code from GC_malloc_kind).
* thread_local_alloc.c [THREAD_LOCAL_ALLOC] (GC_malloc_kind): Use
GC_get_tlfs().
Diffstat (limited to 'pthread_stop_world.c')
-rw-r--r-- | pthread_stop_world.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 3db01761..f1ff6ea2 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -57,7 +57,9 @@ GC_INLINE void GC_usleep(unsigned us) STATIC volatile pthread_t GC_nacl_thread_parker = -1; STATIC __thread int GC_nacl_thread_idx = -1; + STATIC __thread GC_thread GC_nacl_gc_thread_self = NULL; + /* TODO: Use GC_get_tlfs() instead. */ volatile int GC_nacl_thread_parked[MAX_NACL_GC_THREADS]; int GC_nacl_thread_used[MAX_NACL_GC_THREADS]; |