linux.conf.au, January 2003 PRINCIPLES: Race Conditions Three types of race conditions in the Linux Kernel: Race conditions when a CPU is interrupted: lwz 9,0(3) # Load contents of R3 + 0 into R9 ***** INTERRUPT ***** ... lwz 9,0(3) # Load contents of R3 + 0 into R9 addi 9,9,1 # Add one to R9 stw 9,0(3) # Put contents of R9 back into R3 + 0 ... ***** RETURN FROM INTERRUPT ***** addi 9,9,1 # Add one to R9 stw 9,0(3) # Put contents of R9 back into R3 + 0