Date: Tue, 30 Mar 2004 19:12:02 -0500 From: John Baldwin <jhb@FreeBSD.org> To: smp@FreeBSD.org Cc: Colin Percival <colin.percival@wadham.ox.ac.uk> Subject: Re: locking primatives Message-ID: <200403301912.02191.jhb@FreeBSD.org> In-Reply-To: <6.0.1.1.1.20040327201519.044ba550@imap.sfu.ca> References: <6.0.1.1.1.20040327201519.044ba550@imap.sfu.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 27 March 2004 03:33 pm, Colin Percival wrote: > I'm trying to implement a callout_stop_safe() function > (same as callout_stop(), except that it would wait for the > callout to finish if it is currently in progress) in order > to get around a rather nasty panic in the kqueue code. All > I need to do is block until the softclock thread reaches a > specified point -- this is pretty much the simplest locking > problem possible. > Is there any introduction to the various locking methods > which would give me some indication of which one I should > use? Heh, it's actually not a trivial problem. For one way of dealing with this race, see the TDF_TIMOFAIL / TDF_TIMEOUT handling stuff in subr_sleepqueue.c. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403301912.02191.jhb>