diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-28 10:24:40 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-28 10:24:40 +0000 |
commit | 270d9d472952a8923fa8a6d9d830fea77f4b838f (patch) | |
tree | d5fa14a0a0fd3cdc509580686af55bc93ceb93e7 /linuxthreads/libc-cancellation.c | |
parent | afb2e954009b7ff48379a254926730b303ce7bab (diff) | |
download | glibc-270d9d472952a8923fa8a6d9d830fea77f4b838f.tar.gz glibc-270d9d472952a8923fa8a6d9d830fea77f4b838f.tar.xz glibc-270d9d472952a8923fa8a6d9d830fea77f4b838f.zip |
Update.
* inet/herrno.c (__h_errno_location): Remove. * inet/Makefile (routines): Add herrno-loc. * resolv/res_libc.c (__res_state): Remove. * resolv/Makefile (routines): Add res-state. * sysdeps/generic/herrno-loc.c: New file. * sysdeps/generic/res-state.c: New file. 2002-12-27 Jakub Jelinek <jakub@redhat.com>
Diffstat (limited to 'linuxthreads/libc-cancellation.c')
-rw-r--r-- | linuxthreads/libc-cancellation.c | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/linuxthreads/libc-cancellation.c b/linuxthreads/libc-cancellation.c index 01972a2557..18feddbf3a 100644 --- a/linuxthreads/libc-cancellation.c +++ b/linuxthreads/libc-cancellation.c @@ -34,13 +34,6 @@ weak_extern (__pthread_thread_self) int __libc_multiple_threads attribute_hidden; -# ifndef FLOATING_STACKS -# undef THREAD_GETMEM -# undef THREAD_SETMEM -# define THREAD_GETMEM(descr, member) descr->member -# define THREAD_SETMEM(descr, member, value) descr->member = (value) -# endif - /* The next two functions are similar to pthread_setcanceltype() but more specialized for the use in the cancelable functions like write(). They do not need to check parameters etc. */ @@ -48,18 +41,11 @@ int attribute_hidden __libc_enable_asynccancel (void) { -#ifdef FLOATING_STACKS pthread_descr self = thread_self(); -#else - pthread_descr self = __libc_maybe_call2 (pthread_thread_self, (), NULL); - - if (self == NULL) - return PTHREAD_CANCEL_DEFERRED; -#endif - int oldtype = THREAD_GETMEM(self, p_canceltype); - THREAD_SETMEM(self, p_canceltype, PTHREAD_CANCEL_ASYNCHRONOUS); - if (__builtin_expect (THREAD_GETMEM(self, p_canceled), 0) && - THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) + int oldtype = LIBC_THREAD_GETMEM(self, p_canceltype); + LIBC_THREAD_SETMEM(self, p_canceltype, PTHREAD_CANCEL_ASYNCHRONOUS); + if (__builtin_expect (LIBC_THREAD_GETMEM(self, p_canceled), 0) && + LIBC_THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE) __libc_maybe_call2 (pthread_do_exit, (PTHREAD_CANCELED, CURRENT_STACK_FRAME), 0); return oldtype; @@ -69,14 +55,8 @@ void internal_function attribute_hidden __libc_disable_asynccancel (int oldtype) { -#ifdef FLOATING_STACKS pthread_descr self = thread_self(); -#else - pthread_descr self = __libc_maybe_call2 (pthread_thread_self, (), NULL); - - if (self != NULL) -#endif - THREAD_SETMEM(self, p_canceltype, oldtype); + LIBC_THREAD_SETMEM(self, p_canceltype, oldtype); } #endif |