Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
spinlock.h File Reference
#include <type.h>

Go to the source code of this file.

Data Structures

struct  spinlock_t
 

Macros

#define SPINLOCK_INIT    { .now_serving = 0, .next_ticket = 0 }
 

Functions

void spin_acquire (spinlock_t *lock)
 
void spin_release (spinlock_t *lock)
 
bool spin_is_locked (const spinlock_t *lock)
 

Macro Definition Documentation

◆ SPINLOCK_INIT

#define SPINLOCK_INIT    { .now_serving = 0, .next_ticket = 0 }

Definition at line 15 of file spinlock.h.

Referenced by notify_dev_create().

Function Documentation

◆ spin_acquire()

◆ spin_is_locked()

bool spin_is_locked ( const spinlock_t * lock)

Definition at line 27 of file spinlock.c.

References lock, and next.

◆ spin_release()