diff options
Diffstat (limited to 'libc/include/semaphore.h')
-rw-r--r-- | libc/include/semaphore.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/libc/include/semaphore.h b/libc/include/semaphore.h index 7ae3c3a75..4ef13af39 100644 --- a/libc/include/semaphore.h +++ b/libc/include/semaphore.h @@ -25,6 +25,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #ifndef _SEMAPHORE_H #define _SEMAPHORE_H @@ -32,8 +33,10 @@ __BEGIN_DECLS +struct timespec; + typedef struct { - volatile unsigned int count; + unsigned int count; #ifdef __LP64__ int __reserved[3]; #endif @@ -41,20 +44,18 @@ typedef struct { #define SEM_FAILED NULL -extern int sem_init(sem_t *sem, int pshared, unsigned int value); - -extern int sem_close(sem_t *); -extern int sem_destroy(sem_t *); -extern int sem_getvalue(sem_t *, int *); -extern int sem_init(sem_t *, int, unsigned int); -extern sem_t *sem_open(const char *, int, ...); -extern int sem_post(sem_t *); -extern int sem_trywait(sem_t *); -extern int sem_unlink(const char *); -extern int sem_wait(sem_t *); - -struct timespec; -extern int sem_timedwait(sem_t *sem, const struct timespec *abs_timeout); +int sem_destroy(sem_t*); +int sem_getvalue(sem_t*, int*); +int sem_init(sem_t*, int, unsigned int); +int sem_post(sem_t*); +int sem_timedwait(sem_t*, const struct timespec*); +int sem_trywait(sem_t*); +int sem_wait(sem_t*); + +/* These aren't actually implemented. */ +sem_t* sem_open(const char*, int, ...); +int sem_close(sem_t*); +int sem_unlink(const char*); __END_DECLS |