windows内核提供了一系列的同步函数:在msdn上的链接如下:
http://msdn.microsoft.com/zh-cn/library/aa909196.aspx
The following table shows the kernel synchronization functions.
Functions | Description |
---|---|
Creates a named or an unnamed event object. | |
Creates a named or unnamed mutex object. | |
Creates a named or unnamed semaphore object. | |
Releases all resources used by a critical section object that is not owned. | |
Duplicates an object handle. The duplicate handle refers to the same object as the original handle. Therefore, any changes to the object are reflected through both handles. | |
Waits for ownership of the specified critical section object. | |
Initializes a critical section object. | |
Performs an atomic comparison of the specified values and exchanges the values based on the outcome of the comparison. | |
Performs an atomic comparison of the specified parameter values and exchanges the values based on the outcome of the comparison. | |
Decrements the value of the specified 32-bit variable, and checks the resulting value. | |
Exchanges a pair of 32-bit values. | |
Increments an Addend variable. | |
Exchanges a pair of values. | |
Increments the value of the specified 32-bit variable, and checks the resulting value. | |
Performs a conditional setting of a variable. | |
Releases ownership of the specified critical section object. | |
Opens an existing named event object. | |
Provides a single operation that sets to signaled the state of the specified event object and then resets it to nonsignaled after releasing the appropriate number of waiting threads. | |
Releases ownership of the specified mutex object. | |
Increases the count of the specified semaphore object by a specified amount. | |
Sets the state of the specified event object to nonsignaled. | |
Sets the state of the specified event object to signaled. | |
Attempts to enter a critical section without blocking. | |
Returns when either any one of the specified objects is in the signaled state, or the time-out interval elapses. | |
Returns when the specified object is in the signaled state or when the time-out interval elapses. |