Re: [patch] race-fix for bottom-half-functions

Alan Cox (alan@lxorguk.ukuu.org.uk)
Fri, 15 Jan 1999 17:01:47 +0000 (GMT)


I dont see why you need locks at all

enable_bh
load pointer
mb_w()
set flag

disable_bh
load pointer to a null func ie foofunc(){}
clear flag
mb_w()
clear pointer (optional)

running a bh

load pointer
mb_r()
test flag
if true call pointer

No locks needed.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/