4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-03 13:00:39 +08:00
Corinna Vinschen d4e7869ee4 Cygwin: semaphore.h: clean namespace
use underscored identifiers

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2021-07-29 16:53:15 +02:00

44 lines
1.0 KiB
C

/* semaphore.h: POSIX semaphore interface
Written by Robert Collins <rbtcollins@hotmail.com>
This file is part of Cygwin.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include <sys/types.h>
#ifndef _SEMAPHORE_H
#define _SEMAPHORE_H
#ifdef __cplusplus
extern "C"
{
#endif
#ifndef __INSIDE_CYGWIN__
typedef struct __sem_t {char __dummy;} *sem_t;
#endif
#define SEM_FAILED ((sem_t *) 0)
/* Semaphores */
int sem_init (sem_t *__sem, int __pshared, unsigned int __value);
int sem_destroy (sem_t *__sem);
sem_t *sem_open (const char *__name, int __oflag, ...);
int sem_close (sem_t *__sem);
int sem_unlink (const char *__name);
int sem_wait (sem_t *__sem);
int sem_trywait (sem_t *__sem);
int sem_timedwait (sem_t *__sem, const struct timespec *__abstime);
int sem_post (sem_t *__sem);
int sem_getvalue (sem_t *__sem, int *__sval);
#ifdef __cplusplus
}
#endif
#endif /* _SEMAPHORE_H */