OpenBSD, thanks to Tim Wiess

This commit is contained in:
rsc 2005-07-21 18:29:04 +00:00
parent 6a73f8b6c1
commit fe8c925e8a
9 changed files with 353 additions and 57 deletions

View file

@ -832,6 +832,16 @@ extern int post9pservice(int, char*);
# endif
#endif
#if defined(__OpenBSD__) && !defined(NOPLAN9DEFINES)
#define sched_yield() \
do { \
struct timespec ts; \
ts.tv_sec = 0; \
ts.tv_nsec = 10; \
nanosleep(&ts, NULL); \
} while(0)
#endif
/* command line */
extern char *argv0;
extern void __fixargv0(void);