From bd5969fc876a10b18613302db7087ef3c40f18e1 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 7 Mar 2024 17:28:00 -0500 Subject: lib: Add mlibc Signed-off-by: Ian Moffett --- lib/mlibc/options/posix/include/sys/sem.h | 44 +++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 lib/mlibc/options/posix/include/sys/sem.h (limited to 'lib/mlibc/options/posix/include/sys/sem.h') diff --git a/lib/mlibc/options/posix/include/sys/sem.h b/lib/mlibc/options/posix/include/sys/sem.h new file mode 100644 index 0000000..cb3516a --- /dev/null +++ b/lib/mlibc/options/posix/include/sys/sem.h @@ -0,0 +1,44 @@ +#ifndef _SYS_SEM_H +#define _SYS_SEM_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#define GETALL 13 +#define SETVAL 16 +#define SETALL 17 + +#define SEM_UNDO 0x1000 + +struct sembuf { + unsigned short int sem_num; + short int sem_op; + short int sem_flg; +}; + +struct semid_ds { + struct ipc_perm sem_perm; + time_t sem_otime; + time_t sem_ctime; + + unsigned long sem_nsems; +}; + +#ifndef __MLIBC_ABI_ONLY + +int semget(key_t, int, int); +int semop(int, struct sembuf *, size_t); +int semctl(int, int, int, ...); + +#endif /* !__MLIBC_ABI_ONLY */ + +#ifdef __cplusplus +} +#endif + +#endif // _SYS_SEM_H -- cgit v1.2.3