diff options
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 6 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c | 9 |
2 files changed, 11 insertions, 4 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 23040e463c..57a9b10d3c 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,9 @@ +2012-03-06 David S. Miller <davem@davemloft.net> + + * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use + atomic_increment and remove unused local variable. + (__old_sem_post): Likewise. + 2012-02-27 David S. Miller <davem@davemloft.net> * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to non-existing diff --git a/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c b/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c index 0b829927d6..28e06f6327 100644 --- a/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c +++ b/nptl/sysdeps/unix/sysv/linux/sparc/sem_post.c @@ -30,7 +30,7 @@ __new_sem_post (sem_t *sem) { struct sparc_new_sem *isem = (struct sparc_new_sem *) sem; - int nr = atomic_increment_val (&isem->value); + atomic_increment (&isem->value); atomic_full_barrier (); if (isem->nwaiters > 0) { @@ -53,10 +53,11 @@ attribute_compat_text_section __old_sem_post (sem_t *sem) { struct sparc_old_sem *isem = (struct sparc_old_sem *) sem; + int err; - int nr = atomic_increment_val (&isem->value); - int err = lll_futex_wake (&isem->value, 1, - isem->private ^ FUTEX_PRIVATE_FLAG); + atomic_increment (&isem->value); + err = lll_futex_wake (&isem->value, 1, + isem->private ^ FUTEX_PRIVATE_FLAG); if (__builtin_expect (err, 0) < 0) { __set_errno (-err); |