diff options
author | Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> | 2001-06-07 17:22:20 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2001-06-07 17:22:20 +0000 |
commit | fee013ef9c3eda9f8822c257847a8b6c2dc071b7 (patch) | |
tree | ae32b2ce1be1ef99086137517d123a6a5b8f52fb /gcc/gthr-posix.h | |
parent | 5076b0ead93634134a9037d90ef107367adbe69d (diff) | |
download | gcc-fee013ef9c3eda9f8822c257847a8b6c2dc071b7.tar.gz |
gthr-posix.h (__gthread_objc_thread_detach): Simply cast pthread_t to objc_thread_t.
* gthr-posix.h (__gthread_objc_thread_detach): Simply cast
pthread_t to objc_thread_t.
(__gthread_objc_thread_id): Likewise.
From-SVN: r42974
Diffstat (limited to 'gcc/gthr-posix.h')
-rw-r--r-- | gcc/gthr-posix.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/gthr-posix.h b/gcc/gthr-posix.h index b5a4637f592..2042ebe0563 100644 --- a/gcc/gthr-posix.h +++ b/gcc/gthr-posix.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997, 1999, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc. This file is part of GNU CC. @@ -158,7 +158,7 @@ __gthread_objc_thread_detach(void (*func)(void *), void *arg) return NULL; if ( !(pthread_create(&new_thread_handle, NULL, (void *)func, arg)) ) - thread_id = *(objc_thread_t *)&new_thread_handle; + thread_id = (objc_thread_t) new_thread_handle; else thread_id = NULL; @@ -246,13 +246,9 @@ static inline objc_thread_t __gthread_objc_thread_id(void) { if (__gthread_active_p ()) - { - pthread_t self = pthread_self(); - - return *(objc_thread_t *)&self; - } + return (objc_thread_t) pthread_self(); else - return (objc_thread_t)1; + return (objc_thread_t) 1; } /* Sets the thread's local storage pointer. */ |