diff options
author | Ulrich Drepper <drepper@redhat.com> | 2007-08-14 03:21:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2007-08-14 03:21:23 +0000 |
commit | 22502ea2a70d56057159b72d75f152ce2ccc1aec (patch) | |
tree | 91790983b742aef49e7650bf66b4da1f5701ba8c /nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S | |
parent | 4baf59ada82537c87bae0a761ce43d334135f2e7 (diff) |
* sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_PSELECT,cvs/fedora-glibc-20070814T0725cvs/fedora-glibc-20070814T0643
__ASSUME_PPOLL, __ASSUME_ATFCTS, __ASSUME_SET_ROBUST_LIST,
__ASSUME_UTIMENSAT, __ASSUME_FALLOCATE): Update per-arch conditions
when each feature was introduced.
* sysdeps/unix/sysv/linux/dl-vdso.c: Don't include dl-hash.h.
* sysdeps/unix/sysv/linux/dl-vdso.h: Don't include dl-hash.h if NDEBUG.
(CHECK_HASH): New macro.
(PREPARE_VERSION): Use it.
* sysdeps/unix/sysv/linux/pselect.c (__generic_pselect): Only provide
prototype if not __ASSUME_PSELECT.
* sysdeps/unix/sysv/linux/ppoll.c (__generic_ppoll): Only provide
prototype if not __ASSUME_PPOLL.
* sysdeps/unix/sysv/linux/dl-osinfo.h (ROUND): #undef after use.
* sysdeps/unix/clock_settime.c (freq, __pthread_clock_settime,
hp_timing_settime): Don't define or declare if HANDLED_CPUTIME
is defined.
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S index e3510c8ab1..36a18036c5 100644 --- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S +++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S @@ -70,7 +70,18 @@ __pthread_cond_signal: /* Wake up one thread. */ pushl %esi pushl %ebp - movl $FUTEX_WAKE_OP, %ecx +#if FUTEX_PRIVATE_FLAG > 255 + xorl %ecx, %ecx +#endif + cmpl $-1, dep_mutex-cond_futex(%ebx) + sete %cl + subl $1, %ecx +#ifdef __ASSUME_PRIVATE_FUTEX + andl $FUTEX_PRIVATE_FLAG, %ecx +#else + andl %gs:PRIVATE_FUTEX, %ecx +#endif + addl $FUTEX_WAKE_OP, %ecx movl $SYS_futex, %eax movl $1, %edx movl $1, %esi @@ -92,7 +103,9 @@ __pthread_cond_signal: popl %ebx ret -7: movl $FUTEX_WAKE, %ecx +7: /* %ecx should be either FUTEX_WAKE_OP or + FUTEX_WAKE_OP|FUTEX_PRIVATE_FLAG from the previous syscall. */ + xorl $(FUTEX_WAKE ^ FUTEX_WAKE_OP), %ecx movl $SYS_futex, %eax /* %edx should be 1 already from $FUTEX_WAKE_OP syscall. movl $1, %edx */ @@ -106,8 +119,16 @@ __pthread_cond_signal: /* Unlock in loop requires wakeup. */ 5: movl %edi, %eax - /* XYZ */ - movl $LLL_SHARED, %ecx +#if (LLL_SHARED-LLL_PRIVATE) > 255 + xorl %ecx, %ecx +#endif + cmpl $-1, dep_mutex-cond_futex(%ebx) + setne %cl + subl $1, %ecx + andl $(LLL_SHARED-LLL_PRIVATE), %ecx +#if LLL_PRIVATE != 0 + addl $LLL_PRIVATE, %ecx +#endif call __lll_unlock_wake jmp 6b @@ -118,8 +139,16 @@ __pthread_cond_signal: #else leal cond_lock(%edi), %edx #endif - /* XYZ */ - movl $LLL_SHARED, %ecx +#if (LLL_SHARED-LLL_PRIVATE) > 255 + xorl %ecx, %ecx +#endif + cmpl $-1, dep_mutex(%edi) + setne %cl + subl $1, %ecx + andl $(LLL_SHARED-LLL_PRIVATE), %ecx +#if LLL_PRIVATE != 0 + addl $LLL_PRIVATE, %ecx +#endif call __lll_lock_wait jmp 2b |