Page 1 of 1

LOCK instruction (x86 assembly)

Posted: Fri Feb 28, 2003 2:37 am
by sith
Hi,

does the LOCK instruction has any meaning in a single-processor system ? Or is only used in SMP-systems ?

What happens if a taskswitch occurs right after a LOCK instruction ?

Thnx,

Jeroen

Re:LOCK instruction (x86 assembly)

Posted: Wed Mar 05, 2003 6:13 pm
by Tim
sith wrote:does the LOCK instruction has any meaning in a single-processor system ? Or is only used in SMP-systems ?
It's not necessary on a single-processor system.
What happens if a taskswitch occurs right after a LOCK instruction ?
Nothing unusual... why? LOCK is an instruction prefix, not an instruction in its own right, so it won't get separated from the instruction itself.