slowLockMutex / putHeavyLock
Edouard G. Parmelan
kaffe@rufus.w3.org
Sun, 17 Dec 2000 21:49:26 +0100
Maxim Kizub wrote:
> >> I have sometimes assertion erros
> >> from putHeavyLock method in
> >> assert(*lkp == LOCKINPROGRESS);
> >>
> >> So, the question is - how lkp is
> >> supposed to be protected in current thread
> >> from being modified from others threads?
> >>
>
> GB> Which COMPARE_AND_EXCHANGE macro does it use?
>
As it run under Windows, it should be _compareAndExchange from
config/i386/win32/win32-md.asm. But _this_ is not SMP safe as GCC
inlined version.
You should use `lock' prefix with `cmpxchg' instruction near line 88 but
as I don't remember the correct syntax, I can't send you a diff.
Could you try that and send me the correct line ?
--
Edouard G. Parmelan
http://egp.free.fr