Author: Gerd Isenberg
Date: 13:35:29 11/04/02
Go up one level in this thread
<snip>
Gian-Carlo,
Isn't it necessary to use the lock prefix before xchg?
>__inline void Lock (volatile int *hPtr)
>{
> __asm
> {
> mov ecx, hPtr
> la: mov eax, 1
> lock xchg eax, [ecx]
> test eax, eax
> jz end
> lb: pause
> mov eax, [ecx]
> test eax, eax
> jz la
> jmp lb
> end:
>}
>
>--
>GCP
Gerd
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.