diff options
author | jb <jb@FreeBSD.org> | 1998-06-09 08:25:41 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-06-09 08:25:41 +0000 |
commit | ffa72784691e6ee8eb7938c8910724280ad309cb (patch) | |
tree | 0f11cfc53d8cbe7c39a6c48ba0306d30185ec506 /lib/libc_r | |
parent | 6433b7908438fd70c18a0384701f3e97a084e5eb (diff) | |
download | FreeBSD-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/libc_r')
-rw-r--r-- | lib/libc_r/arch/amd64/_atomic_lock.S | 20 | ||||
-rw-r--r-- | lib/libc_r/arch/i386/_atomic_lock.S | 20 |
2 files changed, 10 insertions, 30 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 |