Updated msys-1.0.dll to MSYS-g2a9892a
[msysgit.git] / include / semaphore.h
blob7f91d672cf6ad6c4668af2f4d47057ca58e1d3e4
1 /* semaphore.h: POSIX semaphore interface
3 Copyright 2001 Red Hat, Inc.
5 Written by Robert Collins <rbtcollins@hotmail.com>
7 This file is part of Cygwin.
9 This software is a copyrighted work licensed under the terms of the
10 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
11 details. */
13 #include <sys/types.h>
15 #ifndef _SEMAPHORE_H
16 #define _SEMAPHORE_H
18 #ifdef __cplusplus
19 extern "C"
21 #endif
23 #if !(defined (__INSIDE_CYGWIN__) || defined (__INSIDE_MSYS__))
24 typedef void *sem_t;
25 #endif
27 #define SEM_FAILED 0
28 #define SEM_VALUE_MAX 1147483648
30 /* Semaphores */
31 int sem_init (sem_t * sem, int pshared, unsigned int value);
32 int sem_destroy (sem_t * sem);
33 int sem_wait (sem_t * sem);
34 int sem_trywait (sem_t * sem);
35 int sem_post (sem_t * sem);
37 #ifdef __cplusplus
39 #endif
41 #endif /* _SEMAPHORE_H */