diff options
Diffstat (limited to 'bdb/os/os_sleep.c')
-rw-r--r-- | bdb/os/os_sleep.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bdb/os/os_sleep.c b/bdb/os/os_sleep.c index 137cd73b708..42d496dbae7 100644 --- a/bdb/os/os_sleep.c +++ b/bdb/os/os_sleep.c @@ -1,14 +1,14 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 1997, 1998, 1999, 2000 + * Copyright (c) 1997-2002 * Sleepycat Software. All rights reserved. */ #include "db_config.h" #ifndef lint -static const char revid[] = "$Id: os_sleep.c,v 11.7 2000/04/07 14:26:36 bostic Exp $"; +static const char revid[] = "$Id: os_sleep.c,v 11.15 2002/07/12 18:56:52 bostic Exp $"; #endif /* not lint */ #ifndef NO_SYSTEM_INCLUDES @@ -21,6 +21,7 @@ static const char revid[] = "$Id: os_sleep.c,v 11.7 2000/04/07 14:26:36 bostic E #ifdef HAVE_VXWORKS #include <sys/times.h> #include <time.h> +#include <selectLib.h> #else #if TIME_WITH_SYS_TIME #include <sys/time.h> @@ -39,7 +40,6 @@ static const char revid[] = "$Id: os_sleep.c,v 11.7 2000/04/07 14:26:36 bostic E #endif #include "db_int.h" -#include "os_jump.h" /* * __os_sleep -- @@ -59,8 +59,8 @@ __os_sleep(dbenv, secs, usecs) for (; usecs >= 1000000; usecs -= 1000000) ++secs; - if (__db_jump.j_sleep != NULL) - return (__db_jump.j_sleep(secs, usecs)); + if (DB_GLOBAL(j_sleep) != NULL) + return (DB_GLOBAL(j_sleep)(secs, usecs)); /* * It's important that we yield the processor here so that other @@ -68,7 +68,10 @@ __os_sleep(dbenv, secs, usecs) */ t.tv_sec = secs; t.tv_usec = usecs; - ret = select(0, NULL, NULL, NULL, &t) == -1 ? __os_get_errno() : 0; + do { + ret = select(0, NULL, NULL, NULL, &t) == -1 ? + __os_get_errno() : 0; + } while (ret == EINTR); if (ret != 0) __db_err(dbenv, "select: %s", strerror(ret)); |