From 1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 27 Dec 2005 01:04:06 +0000 Subject: * Versions.def: Add GLIBC_2.4 for libpthread. --- nptl/tst-robust3.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 nptl/tst-robust3.c (limited to 'nptl/tst-robust3.c') 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 +#include + + +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" -- cgit v1.1