Mutex

It is a kernal object used for interprocess synchronization. Its state is set to signaled when it is not owned by any thread, and nonsignaled when it is owned. Only one thread at a time can own a mutex. This allows large sequences of code to be atomic or treated as one operation. If this is not done where threads share the same resource we get unexpected results due to incomplete operations, such as data writes to many files.

An excellent book for multithreading is Win32 Multithreaded Programming, published by O'Reilly.