Messages in this thread | | | Date | Sat, 27 Nov 1999 01:15:31 +0100 (CET) | From | Ingo Molnar <> | Subject | Re: spin_unlock optimization(i386) |
| |
uhm, brown paperbag to me. The overflow constant has to be longer than random interruptions happening to program execution, otherwise the counter might wrap around in the middle of:
b = data2; a = data1;
if the thread is interrupted after the first load, then 'data1' might just continue going upwards, and in fact it might also wrap.
this means that the simplest way to handle this is to exit when the wrap happens, it runs long enough.
-- mingo [unhandled content-type:application/octet-stream]
| |