Karg  v0.2.0
The kernel of CargOS
sem.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <list.h>
4 
5 typedef struct {
8 } sem_t;
9 
10 void sem_init(sem_t *sem);
11 void sem_deinit(sem_t *sem);
12 void sem_wait(sem_t *sem);
13 void sem_signal(sem_t *sem);
14 void sem_signaln(sem_t *sem, u32 n);
void sem_wait(sem_t *sem)
Definition: sem.c:18
void sem_init(sem_t *sem)
Definition: sem.c:5
void sem_deinit(sem_t *sem)
Definition: sem.c:10
void sem_signal(sem_t *sem)
Definition: sem.c:25
void sem_signaln(sem_t *sem, u32 n)
Definition: sem.c:33
Definition: list.h:6
Definition: sem.h:5
list_node_t wait_queue
Definition: sem.h:6
i32 val
Definition: sem.h:7
__INT32_TYPE__ i32
Definition: types.h:15
__UINT32_TYPE__ u32
Definition: types.h:5