Messages in this thread | | | Date | Sun, 21 Nov 1999 14:08:45 +0100 | From | Jamie Lokier <> | Subject | Re: spin_unlock optimization(i386) |
| |
Richard B. Johnson wrote: > The purpose of the lock prefix is not to make the current CPU operation > atomic. It's to make all other CPUs halt until the operation is complete. > This gurantees that only one CPU modifies the variable at the same > time. You are not going to do that with a move.
AFAIK the reason the lock prefix is not permitted with move instructions is that there's no need. Lock makes read-modify-write instructions atomic. Aligned writes are atomic already.
-- Jamie
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |