sleep.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
/*
* Copyright (c) 1986 by Sun Microsystems, Inc.
*/
#include <signal.h>
/*
* sleep(n)
*
* return 0 if n seconds passed
* return n - t if t seconds passed
*
* this code is gross and works just barely.
* it would be nice if someone rewrote it.
*/
unsigned
sleep(n)
unsigned n;
{
void sleepx();
int omask;
int alrm_flg;
if (n == 0)
return(0);
return(n);
alrm_flg = 0;
++alrm_flg;
} else {
}
--alrm_flg;
}
}
if (alrm_flg >= 0) {
}
if (alrm_flg >= 0)
(void) sigsetmask(omask);
/*
* I use reset instead of what new points to because the
* code that calculates the return value depends on the
* old value of *newp.
*/
}
}
}
}
static void
sleepx()
{
}