Date: Tue, 21 Aug 2001 11:42:46 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_condvar.c kern_synch.c src/sys/sys proc.h Message-ID: <200108211842.f7LIgkp03186@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2001/08/21 11:42:46 PDT Modified files: sys/kern kern_condvar.c kern_synch.c sys/sys proc.h Log: - Fix a bug in the previous workaround for the tsleep/endtsleep race. callout_stop() would fail in two cases: 1) The timeout was currently executing, and 2) The timeout had already executed. We only needed to work around the race for 1). We caught some instances of 2) via the PS_TIMEOUT flag, however, if endtsleep() fired after the process had been woken up but before it had resumed execution, PS_TIMEOUT would not be set, but callout_stop() would fail, so we would block the process until endtsleep() resumed it. Except that endtsleep() had already run and couldn't resume it. This adds a new flag PS_TIMOFAIL to indicate the case of 2) when PS_TIMEOUT isn't set. - Implement this race fix for condition variables as well. Tested by: sos Revision Changes Path 1.12 +29 -7 src/sys/kern/kern_condvar.c 1.156 +6 -3 src/sys/kern/kern_synch.c 1.175 +2 -1 src/sys/sys/proc.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108211842.f7LIgkp03186>