Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jan 1999 21:34:45 +1100 (EST)
From:      John Birrell  <jb@cimlogic.com.au>
To:        dufault@hda.com (Peter Dufault)
Cc:        current@FreeBSD.ORG, bde@zeta.org.au
Subject:   Re: more about yield() versus sched_yield()
Message-ID:  <199901311034.VAA01602@cimlogic.com.au>
In-Reply-To: <199901311022.FAA21322@hda.hda.com> from Peter Dufault at "Jan 31, 1999  5:22: 3 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Dufault wrote:
> > I've got a synch_yield() in kern_synch and a call into it from yield()
> > in kern_thread that duplicates the yield() behavior for the non-RTPRIO,
> > non-sched_yield() condition.  synch_yield() also KASSERTS
> > that p == curproc since nothing else makes sense.
> 
> While we're discussing yield here's a question.
> 
> The difference between yield() and sched_yield() is that yield unconditionally
> yields while sched_yield() won't if you are the highest priority process
> and the only process in your run queue.  Does anyone know the
> reuirements on yield() and would it continue to function for us if
> it worked the same as sched_yield()?

FWIW, the yield syscall is _not_ built into libc, so I doubt there will
be anything that actually uses it. I think you should just keep
sched_yield().

-- 
John Birrell - jb@cimlogic.com.au; jb@freebsd.org http://www.cimlogic.com.au/
CIMlogic Pty Ltd, GPO Box 117A, Melbourne Vic 3001, Australia +61 418 353 137

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901311034.VAA01602>