summaryrefslogtreecommitdiff
path: root/test/nptl/tst-sem12.c
diff options
context:
space:
mode:
authorSalvatore Cro <salvatore.cro@st.com>2010-09-10 10:55:43 +0200
committerCarmelo Amoroso <carmelo.amoroso@st.com>2010-09-15 12:59:45 +0200
commit447c70a5dc04e85f96c2ae477ce851fdfdd8c719 (patch)
tree709d458b5142324d34fface4a89f281f00d0097c /test/nptl/tst-sem12.c
parenta27dd6924e7964d92b49f4d5ebe2e68cfb2742dd (diff)
tests: Added new nptl tests
tests: Added several nptl tests from glibc 2.10.1 Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Diffstat (limited to 'test/nptl/tst-sem12.c')
-rw-r--r--test/nptl/tst-sem12.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/nptl/tst-sem12.c b/test/nptl/tst-sem12.c
new file mode 100644
index 000000000..71d02b70e
--- /dev/null
+++ b/test/nptl/tst-sem12.c
@@ -0,0 +1,14 @@
+#include <time.h>
+#include <sys/time.h>
+
+
+#define PREPARE \
+ struct timespec ts; \
+ struct timeval tv; \
+ gettimeofday (&tv, NULL); \
+ TIMEVAL_TO_TIMESPEC (&tv, &ts); \
+ ts.tv_sec += 60;
+
+#define SEM_WAIT(s) sem_timedwait (s, &ts)
+
+#include "tst-sem11.c"