libc/winsup/cygwin/include/semaphore.h
Corinna Vinschen 6e623e9320 Switching the Cygwin DLL to LGPLv3+, dropping commercial buyout option
Bump GPLv2+ to GPLv3+ for some files, clarify BSD 2-clause.

Everything else stays under GPLv3+.

New Linking Exception exempts resulting executables from LGPLv3 section 4.

Add CONTRIBUTORS file to keep track of licensing.

Remove 'Copyright Red Hat Inc' comments.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2016-06-23 10:09:17 +02:00

44 lines
998 B
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 */