diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-01-03 23:18:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-01-03 23:18:34 +0000 |
commit | 19834b42f656374145cfeb7ddfcfbfa0705037d7 (patch) | |
tree | e79c8dd43dd13dfbf0f40ed7961bce4e2106afdb /nptl | |
parent | 45f7760695429b98d2edb9f895f035c35a2fbcd7 (diff) | |
download | glibc-19834b42f656374145cfeb7ddfcfbfa0705037d7.tar glibc-19834b42f656374145cfeb7ddfcfbfa0705037d7.tar.gz glibc-19834b42f656374145cfeb7ddfcfbfa0705037d7.tar.bz2 glibc-19834b42f656374145cfeb7ddfcfbfa0705037d7.zip |
* init.c (__pthread_initialize_minimal_internal): Cheat a bit by
only passing five parameters to FUTEX_WAIT_BITSET call.
* sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
(__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_READTIME
instead of computing relative timeout.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 9 | ||||
-rw-r--r-- | nptl/init.c | 10 |
2 files changed, 16 insertions, 3 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index ae652ff738..49edfc82a0 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,12 @@ +2009-01-03 Ulrich Drepper <drepper@redhat.com> + + * init.c (__pthread_initialize_minimal_internal): Cheat a bit by + only passing five parameters to FUTEX_WAIT_BITSET call. + + * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S + (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_READTIME + instead of computing relative timeout. + 2009-01-02 Ulrich Drepper <drepper@redhat.com> * init.c (__pthread_initialize_minimal_internal): Check for diff --git a/nptl/init.c b/nptl/init.c index af5bb24b59..05883af1f4 100644 --- a/nptl/init.c +++ b/nptl/init.c @@ -305,10 +305,14 @@ __pthread_initialize_minimal_internal (void) #ifndef __ASSUME_FUTEX_CLOCK_REALTIME { int word = 0; - word = INTERNAL_SYSCALL (futex, err, 6, &word, + /* NB: the syscall actually takes six parameters. The last is the + bit mask. But since we will not actually wait at all the value + is irrelevant. Given that passing six parameters is difficult + on some architectures we just pass whatever random value the + calling convention calls for to the kernel. It causes no harm. */ + word = INTERNAL_SYSCALL (futex, err, 5, &word, FUTEX_WAIT_BITSET | FUTEX_CLOCK_REALTIME - | FUTEX_PRIVATE_FLAG, 1, NULL, 0, - FUTEX_BITSET_MATCH_ANY); + | FUTEX_PRIVATE_FLAG, 1, NULL, 0); if (!INTERNAL_SYSCALL_ERROR_P (word, err) || (INTERNAL_SYSCALL_ERRNO (word, err) != ENOSYS && INTERNAL_SYSCALL_ERRNO (word, err) != EINVAL)) |