Mercurial > nomad > old-fuse
changeset 79:8949e2f5525b
common: only try to use pthread_cond_reltimedwait_np if present
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Fri, 16 Oct 2015 21:43:31 -0400 |
parents | 7cd5f767b7b2 |
children | 28d23cea9a1c |
files | src/common/mutex.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/common/mutex.c Fri Oct 16 21:42:18 2015 -0400 +++ b/src/common/mutex.c Fri Oct 16 21:43:31 2015 -0400 @@ -23,6 +23,7 @@ #include <stdio.h> #include <stdlib.h> +#include <nomad/config.h> #include <nomad/error.h> #include <nomad/mutex.h> @@ -89,7 +90,11 @@ { int ret; +#ifdef HAVE_PTHREAD_COND_RELTIMEDWAIT_NP ret = pthread_cond_reltimedwait_np(c, m, reltime); +#else +#error need a relative timed condition wait +#endif if ((ret != 0) || (ret != ETIMEDOUT)) VERIFY(0);