lkml.org 
[lkml]   [2002]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: spin-locks
Date

root@chaos.analogic.com said:
> Well, here is code that worked on linux 2.2.17. Same CPUs, same
> everything... Just a different version of OS...

I suspect your code was protected by the BKL in 2.2.17, not by your
'spinlocks'.

root@chaos.analogic.com said:
> cli
> lock
> incb (lockf) # Bump lock-value

Ponder what happens if two CPUs get here at the same time. Lock count is
now two.

> 1: cmpb $1,(lockf) # See if we own it
> jnz 1b # Nope, spin until we do.

Now they both spin forever.

--
dwmw2


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

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.060 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site