diff options
author | Ulrich Drepper <drepper@redhat.com> | 2005-12-27 01:04:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2005-12-27 01:04:06 +0000 |
commit | 1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93 (patch) | |
tree | efa74fd1d0c2f6fccda616328a7b432ffdc6ba92 /nptl/tst-robust3.c | |
parent | 08f60b258ec9d9a24275831941a6f559eb26580e (diff) | |
download | glibc-1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93.tar.gz glibc-1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93.tar.xz glibc-1bcfb5a5eb1c25b64a329c1edf6bcfb440cdbc93.zip |
* 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.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/nptl/tst-robust3.c b/nptl/tst-robust3.c new file mode 100644 index 0000000000..e56f2762c7 --- /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" |