mirror of
https://github.com/PDP-10/klh10.git
synced 2026-01-11 23:52:54 +00:00
Eliminate CENV_SYSF_NANOSLEEP and use HAVE_NANOSLEEP instead
This commit is contained in:
parent
2b48b63e74
commit
14ba9636cd
@ -229,10 +229,6 @@
|
||||
# define CENV_SYSF_SIGSET (CENV_SYS_DECOSF|CENV_SYS_SUN|CENV_SYS_SOLARIS \
|
||||
|CENV_SYS_XBSD|CENV_SYS_LINUX)
|
||||
#endif
|
||||
#ifndef CENV_SYSF_NANOSLEEP /* Has nanosleep(2) */
|
||||
# define CENV_SYSF_NANOSLEEP (CENV_SYS_DECOSF|CENV_SYS_SOLARIS|CENV_SYS_XBSD \
|
||||
|CENV_SYS_LINUX)
|
||||
#endif
|
||||
|
||||
/* Large File Support (LFS)
|
||||
* See <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
|
||||
|
||||
@ -1228,7 +1228,7 @@ os_v2rt_idle(ossighandler_t *hdlarg)
|
||||
void
|
||||
os_sleep(int secs)
|
||||
{
|
||||
#if CENV_SYSF_NANOSLEEP
|
||||
#if HAVE_NANOSLEEP
|
||||
osstm_t stm;
|
||||
|
||||
OS_STM_SET(stm, secs);
|
||||
@ -1284,7 +1284,7 @@ os_sleep(int secs)
|
||||
int
|
||||
os_msleep(osstm_t *stm)
|
||||
{
|
||||
#if CENV_SYSF_NANOSLEEP
|
||||
#if HAVE_NANOSLEEP
|
||||
|
||||
if (nanosleep(stm, stm) == 0) {
|
||||
stm->tv_sec = 0; /* Make sure returns zero */
|
||||
|
||||
@ -236,7 +236,7 @@ typedef struct {
|
||||
|
||||
/* Sleep time - osstm_t
|
||||
*/
|
||||
#if CENV_SYSF_NANOSLEEP
|
||||
#if HAVE_NANOSLEEP
|
||||
typedef struct timespec osstm_t;
|
||||
# define OS_STM_SEC(stm) ((stm).tv_sec)
|
||||
# define OS_STM_USEC(stm) ((stm).tv_nsec/1000)
|
||||
@ -249,7 +249,7 @@ typedef long osstm_t;
|
||||
# define OS_STM_USEC(stm) (((stm)%1000)*1000)
|
||||
# define OS_STM_SET(stm, sec) ((stm) = (sec)*1000)
|
||||
# define OS_STM_MSET(stm, ms) ((stm) = (ms))
|
||||
#endif /* !CENV_SYSF_NANOSLEEP */
|
||||
#endif /* !HAVE_NANOSLEEP */
|
||||
|
||||
|
||||
extern int os_vrtmget(osrtm_t *);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user