diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-06-17 08:58:31 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-06-17 08:58:31 +0000 |
commit | bbde852717f9db0b39190ab5774204522569239b (patch) | |
tree | fed5fa0d3f6d466fab513f87ee3338d5149519d4 /nptl/sysdeps/unix/sysv/linux/x86_64 | |
parent | 2667645020a4322a2730e340302748f1b0c1a1ce (diff) | |
download | glibc-bbde852717f9db0b39190ab5774204522569239b.tar glibc-bbde852717f9db0b39190ab5774204522569239b.tar.gz glibc-bbde852717f9db0b39190ab5774204522569239b.tar.bz2 glibc-bbde852717f9db0b39190ab5774204522569239b.zip |
Update.
2003-06-17 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/sleep.c: Use CANCELLATION_P if defined before
returning because seconds==0.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/x86_64')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h b/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h index 5e85376049..8081d72468 100644 --- a/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h +++ b/nptl/sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h @@ -94,18 +94,36 @@ # define CENABLE call __pthread_enable_asynccancel; # define CDISABLE call __pthread_disable_asynccancel; # define __local_multiple_threads __pthread_multiple_threads -# else +# elif !defined NOT_IN_libc # define CENABLE call __libc_enable_asynccancel; # define CDISABLE call __libc_disable_asynccancel; # define __local_multiple_threads __libc_multiple_threads +# elif defined IS_IN_librt +# define CENABLE call __librt_enable_asynccancel; +# define CDISABLE call __librt_disable_asynccancel; +# else +# error Unsupported library # endif -# ifndef __ASSEMBLER__ +# if defined IS_IN_libpthread || !defined NOT_IN_libc +# ifndef __ASSEMBLER__ extern int __local_multiple_threads attribute_hidden; # define SINGLE_THREAD_P \ __builtin_expect (__local_multiple_threads == 0, 1) +# else +# define SINGLE_THREAD_P cmpl $0, __local_multiple_threads(%rip) +# endif + # else -# define SINGLE_THREAD_P cmpl $0, __local_multiple_threads(%rip) + +# ifndef __ASSEMBLER__ +# define SINGLE_THREAD_P \ + __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ + header.multiple_threads) == 0, 1) +# else +# define SINGLE_THREAD_P cmpl $0, %fs:MULTIPLE_THREADS_OFFSET +# endif + # endif #elif !defined __ASSEMBLER__ |