Help with 4.3 mod to kill uninteruptable procs.

Paul Chamberlain tif at doorstop.austin.ibm.com
Tue Feb 26 01:19:50 AEST 1991


In article <5558 at awdprime.UUCP> jfh at greenber.austin.ibm.com (John F Haugh II) writes:
>A typical sleep loop looks something like
>
>	while (some_status & some_busy_flag)
>		sleep (&some_status, PRI_O_MINE);
>
>	some_status |= some_busy_flag;

John, perhaps it obvious, but I've seen several places that neglect to do
this right, and I don't want it to become anymore widespread.  Unless you
like drivers that hang sometimes, this is the way it should be:

	DISABLE_INTERRUPTS;
	while (some_status & some_busy_flag)
		sleep (&some_status, PRI_O_MINE);
	ENABLE_INTERRUPTS;

	some_status |= some_busy_flag;

Paul Chamberlain | I do NOT speak for IBM.          IBM VNET: PAULCC AT AUSTIN
512/838-9662     | ...!cs.utexas.edu!ibmchs!auschs!doorstop.austin.ibm.com!tif



More information about the Comp.unix.internals mailing list