summaryrefslogtreecommitdiff
path: root/pthread_start.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-10 16:15:57 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:58 +0200
commitff325b9a6bf206b951bc30beb12c96d8de2e6334 (patch)
tree684ed74831a0ec9cb1c26af284c4f3d28c7962f3 /pthread_start.c
parentec6effaa02f0fa4a35d6238bdb408226a3d4ab19 (diff)
2011-05-10 Ivan Maidanski <ivmai@mail.ru>
* pthread_start.c (GC_start_rtn_prepare_thread): Change return type to GC_thread. * pthread_start.c (GC_inner_start_routine): Pass the current thread descriptor to pthread_cleanup_push (same as in win32_threads.c). * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local variable to "self". * win32_threads.c (GC_push_all_stacks): Ditto. * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename "my_thread" local variable to "self". * pthread_support.c (GC_unregister_my_thread_inner): New static function. * pthread_support.c (GC_unregister_my_thread, GC_thread_exit_proc): Use GC_unregister_my_thread_inner. * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread, GC_do_blocking_inner): Rename "t" local variable to "thread_id". * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename "id" local variable to "thread_id".
Diffstat (limited to 'pthread_start.c')
-rw-r--r--pthread_start.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pthread_start.c b/pthread_start.c
index 48c2d95..c3a01c4 100644
--- a/pthread_start.c
+++ b/pthread_start.c
@@ -41,7 +41,7 @@
#include <pthread.h>
#include <sched.h>
-GC_INNER void * GC_start_rtn_prepare_thread(void *(**pstart)(void *),
+GC_INNER GC_thread GC_start_rtn_prepare_thread(void *(**pstart)(void *),
void **pstart_arg,
struct GC_stack_base *sb, void *arg);
GC_INNER void GC_thread_exit_proc(void *arg);
@@ -56,7 +56,7 @@ void * GC_CALLBACK GC_inner_start_routine(struct GC_stack_base *sb, void *arg)
GC_thread me = GC_start_rtn_prepare_thread(&start, &start_arg, sb, arg);
# ifndef NACL
- pthread_cleanup_push(GC_thread_exit_proc, 0);
+ pthread_cleanup_push(GC_thread_exit_proc, me);
# endif
result = (*start)(start_arg);
# ifdef DEBUG_THREADS