Date: Sat, 19 Dec 1998 18:14:23 -0500 (EST) From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> To: Archie Cobbs <archie@whistle.com> Cc: dillon@apollo.backplane.com (Matthew Dillon), freebsd-current@FreeBSD.ORG, jkh@zippy.cdrom.com, julian@whistle.com, luoqi@watermarkgroup.com Subject: Re: asleep()/await(), M_AWAIT, etc... Message-ID: <199812192314.SAA11196@khavrinen.lcs.mit.edu> In-Reply-To: <199812192303.PAA03836@bubba.whistle.com> References: <199812192111.NAA20772@apollo.backplane.com> <199812192303.PAA03836@bubba.whistle.com>
next in thread | previous in thread | raw e-mail | index | archive | help
<<On Sat, 19 Dec 1998 15:03:03 -0800 (PST), Archie Cobbs <archie@whistle.com> said: > Also, this kind of thing must be very well documented in the code, > e.g., at the points in the code that are calling await(). > Otherwise, people changing the code later on could inadvertently > add race conditions, etc. based on assumptions that are obsolete. While we're talking about frobbing tsleep and friends, I'd really like to see an implementation of thread-assist. This should be a fairly easy hack: When tsleep is called, if a process flag is set, automatically rfork() the process. Put the running fork on the sleep queue, and return into the new process with an error indication and ETHREADBLOCKED. What the thread kernel would then be expected to do is to invoke the scheduler to find a new thread to run, and set a flag on the old process indicating that it should be destroyed (and its context moved to another process) when the system call does return. This would require one additional system call. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick 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?199812192314.SAA11196>