I believe once a processor is in a critical section it cannot be interrupted until it leaves the critical section, so that the operations in the lock are atomic
No, at the operating system level, the thread will be suspended and another thread (from another process or not) will be executed instead. The operating system scheduler is in charge of assigning CPU time to the various threads executing in the system, depending on their state and priority.
See MSDN (especially multitasking and scheduling chapters).
Also, lock
doesn't mean atomic
. It just means no other thread can run the same piece of code at the same time.