Subject: Re: sched_yield()
To: Micah Stetson <micah@cnm-vra.com>
From: Nathan J. Williams <nathanw@wasabisystems.com>
List: tech-kern
Date: 03/10/2004 20:22:51
Micah Stetson <micah@cnm-vra.com> writes:

> I'm porting hosted Inferno (http://www.vitanuova.com/)
> to NetBSD, and I need something equivalent to the
> Linux/FreeBSD/Darwin sched_yield() system call.  Is there
> a reason (other than lack of time/interest) why this call
> doesn't exist?  It seems to be standard (the Linux man
> page references POSIX.1b).  Is there another way to
> achieve the same effect (sleep(0) doesn't seem to do the
> trick perfectly), or should I try to implement the call
> myself and submit a patch?

sched_yield() is implemented in -curent, as part of
libpthread. There's no man page, though, which is a bug.

        - Nathan