Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-03-21 19:06:22 +0300
committerChristopher Faylor <me@cgf.cx>2001-03-21 19:06:22 +0300
commit99a40adcd9354a838d1e361935e33e4c064435d8 (patch)
tree7dd5069849daf99e9e3a634321ece41691bec78b /winsup/cygwin/include/semaphore.h
parent6b2a2aa4af1e76e0784faebc39526fbb1081adaa (diff)
add new file.
Diffstat (limited to 'winsup/cygwin/include/semaphore.h')
-rw-r--r--winsup/cygwin/include/semaphore.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/winsup/cygwin/include/semaphore.h b/winsup/cygwin/include/semaphore.h
new file mode 100644
index 000000000..6dbfa09ac
--- /dev/null
+++ b/winsup/cygwin/include/semaphore.h
@@ -0,0 +1,41 @@
+/* semaphore.h: POSIX semaphore interface
+
+ Copyright 2001 Red Hat, Inc.
+
+ 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 void *sem_t;
+#endif
+
+#define SEM_FAILED 0
+#define SEM_VALUE_MAX 1147483648
+
+/* Semaphores */
+ int sem_init (sem_t * sem, int pshared, unsigned int value);
+ int sem_destroy (sem_t * sem);
+ int sem_wait (sem_t * sem);
+ int sem_trywait (sem_t * sem);
+ int sem_post (sem_t * sem);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SEMAPHORE_H */