]> granicus.if.org Git - gc/commit
Improve GC_thread_is_registered implementation and testing
authorIvan Maidanski <ivmai@mail.ru>
Thu, 12 Jan 2012 03:25:56 +0000 (07:25 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 12 Jan 2012 07:26:42 +0000 (11:26 +0400)
commitebad007ca2ee03800ccad740512bcbeec07439c2
tree748baf1c42c4d61cb2bc66d568978ba6127d6332
parent83c1eecd037ff4d3e3d19615ced970f566f5cc72
Improve GC_thread_is_registered implementation and testing

* pthread_support.c (GC_thread_is_registered): Call pthread_self
outside LOCK; add DCL_LOCK_STATE declaration; replace "ptr" local
variable with "GC_thread me" (and remove cast).
* win32_threads.c (GC_thread_is_registered): Fix implementation by
calling GC_lookup_thread_inner (now works the same as in
pthread_support.c).
* tests/test.c (run_one_test): Test GC_thread_is_registered (only if
THREADS).
pthread_support.c
tests/test.c
win32_threads.c