Espresso 0.0.2c
This commit is contained in:
14
include/sync.h
Normal file
14
include/sync.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef _SYNC_H
|
||||
#define _SYNC_H
|
||||
|
||||
typedef struct {
|
||||
volatile int locked;
|
||||
} spinlock_t;
|
||||
|
||||
|
||||
void spinlock_init(spinlock_t* lock);
|
||||
|
||||
void spin_lock(spinlock_t* lock);
|
||||
void spin_unlock(spinlock_t* lock);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user