Back to index

glibc  2.9
Functions
pthread_spin_lock.c File Reference
#include "pthreadP.h"

Go to the source code of this file.

Functions

int pthread_spin_lock (pthread_spinlock_t *lock)

Function Documentation

int pthread_spin_lock ( pthread_spinlock_t *  lock)

Definition at line 22 of file pthread_spin_lock.c.

{
  unsigned int val;

  do
    asm volatile ("tas.b @%1; movt %0"
                : "=&r" (val)
                : "r" (lock)
                : "memory");
  while (val == 0);

  return 0;
}