summaryrefslogtreecommitdiff
path: root/include/sys/sem.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-01-05 06:47:30 +0000
committerMike Frysinger <vapier@gentoo.org>2008-01-05 06:47:30 +0000
commitee438a1eb65d4092116df23ce029fa98bc5ea162 (patch)
tree4939a48b641510e6dea85c2b475c41349cd6e101 /include/sys/sem.h
parent29c5e0adf13a96a0247e79d352168548c8c83fdf (diff)
implement semtimedop for #927
Diffstat (limited to 'include/sys/sem.h')
-rw-r--r--include/sys/sem.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/sys/sem.h b/include/sys/sem.h
index 5b1d38f52..24a57fc32 100644
--- a/include/sys/sem.h
+++ b/include/sys/sem.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -30,6 +30,11 @@
/* Get system dependent definition of `struct semid_ds' and more. */
#include <bits/sem.h>
+#ifdef __USE_GNU
+# define __need_timespec
+# include <time.h>
+#endif
+
/* The following System V style IPC functions implement a semaphore
handling. The definition is found in XPG2. */
@@ -53,6 +58,12 @@ extern int semget (key_t __key, int __nsems, int __semflg) __THROW;
/* Operate on semaphore. */
extern int semop (int __semid, struct sembuf *__sops, size_t __nsops) __THROW;
+#ifdef __USE_GNU
+/* Operate on semaphore with timeout. */
+extern int semtimedop (int __semid, struct sembuf *__sops, size_t __nsops,
+ __const struct timespec *__timeout) __THROW;
+#endif
+
__END_DECLS
#endif /* sys/sem.h */