summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-31 17:46:17 +0000
commit8833066b122427710a9e14a888ce6cfa862332d3 (patch)
tree29591019d695919417b3698618d6a342e97381d6 /nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
parentfedca46896bdb702cb988837a0c2c5447e72ba2b (diff)
Updated to fedora-glibc-20070731T1624cvs/fedora-glibc-2_6_90-1
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/sh/sem_post.S')
-rw-r--r--nptl/sysdeps/unix/sysv/linux/sh/sem_post.S15
1 files changed, 10 insertions, 5 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S b/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
index 9bc12da7e0..a63233feab 100644
--- a/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
+++ b/nptl/sysdeps/unix/sysv/linux/sh/sem_post.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,7 @@
#include <sysdep.h>
#include <shlib-compat.h>
#include <pthread-errnos.h>
+#include <structsem.h>
#include "lowlevel-atomic.h"
@@ -34,11 +35,14 @@
.align 5
__new_sem_post:
mov #1, r3
- XADD (r3, @r4, r2)
-
+ XADD (r3, @(VALUE,r4), r2)
+ mov.l @(NWAITERS,r4), r2
+ tst r2, r2
+ bt 2f
mov #FUTEX_WAKE, r5
- mov r2, r6
- add #1, r6
+ mov.l @(PRIVATE,r4), r1
+ or r1, r5
+ mov #1, r6
mov #0, r7
mov #SYS_futex, r3
extu.b r3, r3
@@ -47,6 +51,7 @@ __new_sem_post:
cmp/pz r0
bf 1f
+2:
rts
mov #0, r0