1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-03 09:00:21 +00:00

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).
This commit is contained in:
John Birrell 1998-06-09 08:25:41 +00:00
parent 3dcb4f7556
commit 7d24d0302f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36802
3 changed files with 15 additions and 45 deletions

View File

@ -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

View File

@ -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

View File

@ -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