lkml.org 
[lkml]   [1999]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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]
\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.409 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site