Date: Sun, 31 Jan 1999 23:35:53 +1100 From: Bruce Evans <bde@zeta.org.au> To: bde@zeta.org.au, dufault@hda.com Cc: current@FreeBSD.ORG Subject: Re: more about yield() versus sched_yield() Message-ID: <199901311235.XAA15248@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>> Another difference is that it correctly counts context switches as voluntary. > >Good point. The patched version calls maybe_resched(), and I'm >adding the line at "<<<". This counts context switches twice (once as voluntary here, once as involuntary when switch is done on return from the syscall). You could frob the count of involuntary switches here, but the uglyness of that shows that things aren't being done right. A direct switch as in yield() seems best. >(This also will let people who haven't looked at that code >complain about the function interface - it doesn't bother me, >macros could come later.) I might complain about style bugs, and typedefs named priority_type, and magic conversions between priority_type and int. Bruce 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?199901311235.XAA15248>