diff options
-rw-r--r-- | lib/libc_r/arch/amd64/_atomic_lock.S | 20 | ||||
-rw-r--r-- | lib/libc_r/arch/i386/_atomic_lock.S | 20 | ||||
-rw-r--r-- | lib/libpthread/arch/i386/i386/_atomic_lock.S | 20 |
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 |