From owner-freebsd-current Sun Jan 31 02:33:56 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA08172 for freebsd-current-outgoing; Sun, 31 Jan 1999 02:33:56 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from cimlogic.com.au (cimlog.lnk.telstra.net [139.130.51.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA08159 for ; Sun, 31 Jan 1999 02:33:49 -0800 (PST) (envelope-from jb@cimlogic.com.au) Received: (from jb@localhost) by cimlogic.com.au (8.9.1/8.9.1) id VAA01602; Sun, 31 Jan 1999 21:34:47 +1100 (EST) (envelope-from jb) From: John Birrell Message-Id: <199901311034.VAA01602@cimlogic.com.au> Subject: Re: more about yield() versus sched_yield() In-Reply-To: <199901311022.FAA21322@hda.hda.com> from Peter Dufault at "Jan 31, 1999 5:22: 3 am" To: dufault@hda.com (Peter Dufault) Date: Sun, 31 Jan 1999 21:34:45 +1100 (EST) Cc: current@FreeBSD.ORG, bde@zeta.org.au X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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