License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <sysdep.h>
#include <lowlevellock.h>
- .globl pthread_spin_lock
- .type pthread_spin_lock,@function
- .align 16
-pthread_spin_lock:
+ENTRY (pthread_spin_lock)
mov 4(%esp), %eax
1: LOCK
decl 0(%eax)
cmpl $0, 0(%eax)
jg 1b
jmp 2b
- .size pthread_spin_lock,.-pthread_spin_lock
+END (pthread_spin_lock)
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
- .globl pthread_spin_unlock
- .type pthread_spin_unlock,@function
- .align 16
-pthread_spin_unlock:
+#include <sysdep.h>
+
+ENTRY (pthread_spin_unlock)
movl 4(%esp), %eax
movl $1, (%eax)
xorl %eax, %eax
ret
- .size pthread_spin_unlock,.-pthread_spin_unlock
+END (pthread_spin_unlock)
/* The implementation of pthread_spin_init is identical. */
.globl pthread_spin_init
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
+#include <sysdep.h>
#include <pthread-errnos.h>
# define LOCK lock
#endif
- .globl pthread_spin_trylock
- .type pthread_spin_trylock,@function
- .align 16
-pthread_spin_trylock:
+ENTRY (pthread_spin_trylock)
movl 4(%esp), %edx
movl $1, %eax
xorl %ecx, %ecx
0:
#endif
ret
- .size pthread_spin_trylock,.-pthread_spin_trylock
+END (pthread_spin_trylock)