kv2: initialize memory manager, early pci devices
Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This commit is contained in:
parent
e5b55a6ba5
commit
a252a3f8e9
58 changed files with 1270 additions and 505 deletions
17
include/lib/sem.h
Normal file
17
include/lib/sem.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _SEM_H_
|
||||
#define _SEM_H_
|
||||
|
||||
#include <kernel/spinlock.h>
|
||||
|
||||
typedef struct _sem_t {
|
||||
u64 sem;
|
||||
spinlock_t lock;
|
||||
} sem_t;
|
||||
|
||||
bool sem_trywait(sem_t *sem);
|
||||
void sem_wait(sem_t *sem);
|
||||
void sem_post(sem_t *sem);
|
||||
void sem_init(sem_t *sem, size_t n_res);
|
||||
|
||||
#endif /* _SEM_H_ */
|
||||
Loading…
Reference in a new issue