summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-06-09 08:25:41 +0000
committerjb <jb@FreeBSD.org>1998-06-09 08:25:41 +0000
commitffa72784691e6ee8eb7938c8910724280ad309cb (patch)
tree0f11cfc53d8cbe7c39a6c48ba0306d30185ec506 /lib
parent6433b7908438fd70c18a0384701f3e97a084e5eb (diff)
downloadFreeBSD-src-ffa72784691e6ee8eb7938c8910724280ad309cb.zip
FreeBSD-src-ffa72784691e6ee8eb7938c8910724280ad309cb.tar.gz
Delete the atomic unlock function since it is no longer required.
Simplify the atomic lock to just write a value of 1 to the lock instead of taking the value passed by the caller (which just confused things).
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/arch/amd64/_atomic_lock.S20
-rw-r--r--lib/libc_r/arch/i386/_atomic_lock.S20
-rw-r--r--lib/libpthread/arch/i386/i386/_atomic_lock.S20
3 files changed, 15 insertions, 45 deletions
diff --git a/lib/libc_r/arch/amd64/_atomic_lock.S b/lib/libc_r/arch/amd64/_atomic_lock.S
index d124fc3..e0ef0eb 100644
--- a/lib/libc_r/arch/amd64/_atomic_lock.S
+++ b/lib/libc_r/arch/amd64/_atomic_lock.S
@@ -19,13 +19,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: _atomic_lock.S,v 1.1 1998/04/29 09:36:03 jb Exp $
*
*/
#if defined(LIBC_RCS) && !defined(lint)
.text
- .asciz "$Id$"
+ .asciz "$Id: _atomic_lock.S,v 1.1 1998/04/29 09:36:03 jb Exp $"
#endif /* LIBC_RCS and not lint */
#include "DEFS.h"
@@ -34,22 +34,12 @@
* Atomicly lock a location with an identifier provided the location
* is not currently locked.
*
- * long _atomic_lock(long *, long);
- * eax will contain the return value.
+ * long _atomic_lock(long *);
+ * eax will contain the return value (zero if lock obtained).
*/
ENTRY(_atomic_lock)
movl 4(%esp), %ecx
- movl 8(%esp), %eax
+ movl $1, %eax
xchg %eax, (%ecx)
ret
-/*
- * Unlock a location.
- *
- * long _atomic_unlock(long *);
- */
-ENTRY(_atomic_unlock)
- movl 4(%esp), %ecx
- movl $0, %eax
- xchg %eax, (%ecx)
- ret
diff --git a/lib/libc_r/arch/i386/_atomic_lock.S b/lib/libc_r/arch/i386/_atomic_lock.S
index d124fc3..e0ef0eb 100644
--- a/lib/libc_r/arch/i386/_atomic_lock.S
+++ b/lib/libc_r/arch/i386/_atomic_lock.S
@@ -19,13 +19,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: _atomic_lock.S,v 1.1 1998/04/29 09:36:03 jb Exp $
*
*/
#if defined(LIBC_RCS) && !defined(lint)
.text
- .asciz "$Id$"
+ .asciz "$Id: _atomic_lock.S,v 1.1 1998/04/29 09:36:03 jb Exp $"
#endif /* LIBC_RCS and not lint */
#include "DEFS.h"
@@ -34,22 +34,12 @@
* Atomicly lock a location with an identifier provided the location
* is not currently locked.
*
- * long _atomic_lock(long *, long);
- * eax will contain the return value.
+ * long _atomic_lock(long *);
+ * eax will contain the return value (zero if lock obtained).
*/
ENTRY(_atomic_lock)
movl 4(%esp), %ecx
- movl 8(%esp), %eax
+ movl $1, %eax
xchg %eax, (%ecx)
ret
-/*
- * Unlock a location.
- *
- * long _atomic_unlock(long *);
- */
-ENTRY(_atomic_unlock)
- movl 4(%esp), %ecx
- movl $0, %eax
- xchg %eax, (%ecx)
- ret
diff --git a/lib/libpthread/arch/i386/i386/_atomic_lock.S b/lib/libpthread/arch/i386/i386/_atomic_lock.S
index d124fc3..e0ef0eb 100644
--- a/lib/libpthread/arch/i386/i386/_atomic_lock.S
+++ b/lib/libpthread/arch/i386/i386/_atomic_lock.S
@@ -19,13 +19,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: _atomic_lock.S,v 1.1 1998/04/29 09:36:03 jb Exp $
*
*/
#if defined(LIBC_RCS) && !defined(lint)
.text
- .asciz "$Id$"
+ .asciz "$Id: _atomic_lock.S,v 1.1 1998/04/29 09:36:03 jb Exp $"
#endif /* LIBC_RCS and not lint */
#include "DEFS.h"
@@ -34,22 +34,12 @@
* Atomicly lock a location with an identifier provided the location
* is not currently locked.
*
- * long _atomic_lock(long *, long);
- * eax will contain the return value.
+ * long _atomic_lock(long *);
+ * eax will contain the return value (zero if lock obtained).
*/
ENTRY(_atomic_lock)
movl 4(%esp), %ecx
- movl 8(%esp), %eax
+ movl $1, %eax
xchg %eax, (%ecx)
ret
-/*
- * Unlock a location.
- *
- * long _atomic_unlock(long *);
- */
-ENTRY(_atomic_unlock)
- movl 4(%esp), %ecx
- movl $0, %eax
- xchg %eax, (%ecx)
- ret
OpenPOWER on IntegriCloud