UbixOS  2.0
spinlock.h File Reference
#include <sys/types.h>
Include dependency graph for spinlock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  spinLock
 

Macros

#define LLOCK_FLAG   1
 
#define LOCKED   1
 
#define SPIN_LOCK_INITIALIZER   {NULL, 0}
 
#define UNLOCKED   0
 

Typedefs

typedef struct spinLockspinLock_t
 

Functions

void spinLock (spinLock_t)
 
void spinLock_scheduler (spinLock_t *)
 
void spinLockInit (spinLock_t)
 
int spinLockLocked (spinLock_t *)
 
int spinTryLock (spinLock_t)
 
void spinUnlock (spinLock_t)
 

Variables

struct spinLock Master
 

Macro Definition Documentation

◆ LLOCK_FLAG

#define LLOCK_FLAG   1

Definition at line 37 of file spinlock.h.

◆ LOCKED

#define LOCKED   1

Definition at line 34 of file spinlock.h.

◆ SPIN_LOCK_INITIALIZER

#define SPIN_LOCK_INITIALIZER   {NULL, 0}

Definition at line 36 of file spinlock.h.

◆ UNLOCKED

#define UNLOCKED   0

Definition at line 35 of file spinlock.h.

Typedef Documentation

◆ spinLock_t

typedef struct spinLock* spinLock_t

Definition at line 46 of file spinlock.h.

Function Documentation

◆ spinLock()

void spinLock ( spinLock_t  )

Definition at line 64 of file spinlock.c.

◆ spinLock_scheduler()

void spinLock_scheduler ( spinLock_t )

Definition at line 63 of file spinlock.c.

References spinTryLock().

Here is the call graph for this function:

◆ spinLockInit()

void spinLockInit ( spinLock_t  )

Definition at line 47 of file spinlock.c.

References memset().

Here is the call graph for this function:

◆ spinLockLocked()

int spinLockLocked ( spinLock_t )

Definition at line 69 of file spinlock.c.

Referenced by c_ap_boot().

◆ spinTryLock()

int spinTryLock ( spinLock_t  )

Definition at line 51 of file spinlock.c.

References cmpxchg, LLOCK_FLAG, LOCKED, spinLock::locked, and NULL.

◆ spinUnlock()

void spinUnlock ( spinLock_t  )

Definition at line 59 of file spinlock.c.

References barrier, and spinLock::locked.

Variable Documentation

◆ Master

struct spinLock Master

Definition at line 40 of file syscall_posix.c.