feat: initial locking etc.
This commit is contained in:
@@ -5,4 +5,36 @@
|
||||
#ifndef NEW_KERNEL_LOCKING_H
|
||||
#define NEW_KERNEL_LOCKING_H
|
||||
|
||||
#include <types.h>
|
||||
|
||||
typedef struct semaphore semaphore_t;
|
||||
|
||||
typedef struct mutex mutex_t;
|
||||
|
||||
typedef struct spinlock spinlock_t;
|
||||
|
||||
semaphore_t *semaphore_create();
|
||||
|
||||
void semaphore_wait(semaphore_t *semaphore);
|
||||
|
||||
void semaphore_signal(semaphore_t *semaphore);
|
||||
|
||||
void semaphore_free(semaphore_t *semaphore);
|
||||
|
||||
mutex_t *mutex_create();
|
||||
|
||||
void mutex_acquire(mutex_t *mutex);
|
||||
|
||||
void mutex_release(mutex_t *mutex);
|
||||
|
||||
void mutex_free(mutex_t *mutex);
|
||||
|
||||
spinlock_t *spinlock_create();
|
||||
|
||||
void spinlock_acquire(spinlock_t *spinlock);
|
||||
|
||||
void spinlock_release(spinlock_t *spinlock);
|
||||
|
||||
void spinlock_free(spinlock_t *spinlock);
|
||||
|
||||
#endif //NEW_KERNEL_LOCKING_H
|
||||
|
||||
Reference in New Issue
Block a user