bsd
This commit is contained in:
parent
bc5d577127
commit
c54b8b69ed
6 changed files with 16 additions and 13 deletions
|
|
@ -1,9 +1,19 @@
|
|||
#include <u.h>
|
||||
#define NOPLAN9DEFINES
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sched.h>
|
||||
#include <libc.h>
|
||||
|
||||
#if defined(__NetBSD__) || (defined(__OpenBSD__) && OpenBSD <= 200511)
|
||||
# define sched_yield() \
|
||||
# do{ struct timespec ts; \
|
||||
# ts.tv_sec = 0; \
|
||||
# ts.tv_nsec = 10; \
|
||||
# nanosleep(&ts, 0); \
|
||||
# }while(0)
|
||||
#endif
|
||||
|
||||
int
|
||||
p9sleep(long milli)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue