diff options
author | rsc <devnull@localhost> | 2005-07-21 18:29:04 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-07-21 18:29:04 +0000 |
commit | fe8c925e8ad3fe1fb95b89d26dcb828c6b31f548 (patch) | |
tree | 02a152fbf48aa957f3bfb69148a90e7811320afa /include | |
parent | 6a73f8b6c12c1618fdf02c70236155b68086f8b2 (diff) | |
download | plan9port-fe8c925e8ad3fe1fb95b89d26dcb828c6b31f548.tar.gz plan9port-fe8c925e8ad3fe1fb95b89d26dcb828c6b31f548.tar.bz2 plan9port-fe8c925e8ad3fe1fb95b89d26dcb828c6b31f548.zip |
OpenBSD, thanks to Tim Wiess
Diffstat (limited to 'include')
-rw-r--r-- | include/libc.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/libc.h b/include/libc.h index ff7e7be5..3880f3d4 100644 --- a/include/libc.h +++ b/include/libc.h @@ -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); |