summaryrefslogtreecommitdiff
path: root/pthread_support.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-12-31 16:19:20 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-12-31 17:46:39 +0300
commit6b94988eefab05a23d406124c9171beddef4783f (patch)
tree53dd380138c303aceb4fa79b899c60baf7be2a96 /pthread_support.c
parentefc2732cdbd73fd4334ad7e012876c2755c94c51 (diff)
downloadbdwgc-6b94988eefab05a23d406124c9171beddef4783f.tar.gz
Use thread_id_self() in GC_pthread_exit
(fix of commit bc1866b14) * pthread_support.c [GC_HAVE_PTHREAD_EXIT] (GC_pthread_exit): Rename self local variable to self_id and change its type from pthread_t to thread_id_t; use thread_id_self() instead of pthread_self().
Diffstat (limited to 'pthread_support.c')
-rw-r--r--pthread_support.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pthread_support.c b/pthread_support.c
index 0adbd9b0..38f79d68 100644
--- a/pthread_support.c
+++ b/pthread_support.c
@@ -2167,13 +2167,13 @@ GC_API int GC_CALL GC_unregister_my_thread(void)
#ifdef GC_HAVE_PTHREAD_EXIT
GC_API GC_PTHREAD_EXIT_ATTRIBUTE void WRAP_FUNC(pthread_exit)(void *retval)
{
- pthread_t self = pthread_self();
+ thread_id_t self_id = thread_id_self();
GC_thread me;
DCL_LOCK_STATE;
INIT_REAL_SYMS();
LOCK();
- me = GC_lookup_thread(self);
+ me = GC_lookup_thread(self_id);
/* We test DISABLED_GC because someone else could call */
/* pthread_cancel at the same time. */
if (me != 0 && (me -> flags & DISABLED_GC) == 0) {