BuildSystem: Move all userpace libraries under the userspace directory
As the number of libraries is increasing, root directory starts to expand. This adds better organization for libraries
This commit is contained in:
30
userspace/libraries/LibC/include/semaphore.h
Normal file
30
userspace/libraries/LibC/include/semaphore.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _SEMAPHORE_H
|
||||
#define _SEMAPHORE_H 1
|
||||
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/semaphore.h.html
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef void* sem_t;
|
||||
|
||||
#define SEM_FAILED ((sem_t*)0)
|
||||
|
||||
int sem_close(sem_t* sem);
|
||||
int sem_destroy(sem_t* sem);
|
||||
int sem_getvalue(sem_t* __restrict sem, int* __restrict sval);
|
||||
int sem_init(sem_t* sem, int pshared, unsigned value);
|
||||
sem_t* sem_open(const char* name, int oflag, ...);
|
||||
int sem_post(sem_t* sem);
|
||||
int sem_timedwait(sem_t* __restrict sem, const struct timespec* __restrict abstime);
|
||||
int sem_trywait(sem_t* sem);
|
||||
int sem_unlink(const char* name);
|
||||
int sem_wait(sem_t* sem);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user