aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-robust3.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-12-27 01:04:06 +0000
committerUlrich Drepper <drepper@redhat.com>2005-12-27 01:04:06 +0000
commit1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93 (patch)
treeefa74fd1d0c2f6fccda616328a7b432ffdc6ba92 /nptl/tst-robust3.c
parent08f60b258ec9d9a24275831941a6f559eb26580e (diff)
downloadglibc-1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93.zip
glibc-1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93.tar.gz
glibc-1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93.tar.bz2
* Versions.def: Add GLIBC_2.4 for libpthread.cvs/fedora-glibc-20051227T1426
Diffstat (limited to 'nptl/tst-robust3.c')
-rw-r--r--nptl/tst-robust3.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/nptl/tst-robust3.c b/nptl/tst-robust3.c
new file mode 100644
index 0000000..e56f276
--- /dev/null
+++ b/nptl/tst-robust3.c
@@ -0,0 +1,20 @@
+#include <time.h>
+#include <sys/time.h>
+
+
+static struct timespec tmo;
+
+
+#define PREPARE_TMO \
+ do { \
+ struct timeval tv; \
+ gettimeofday (&tv, NULL); \
+ \
+ /* Define the timeout as one hour in the future. */ \
+ tmo.tv_sec = tv.tv_sec + 3600; \
+ tmo.tv_nsec = 0; \
+ } while (0)
+
+
+#define LOCK(m) pthread_mutex_timedlock (m, &tmo)
+#include "tst-robust1.c"