The following functions are used in synchronization.
Asynchronous function | Description |
---|---|
APCProc | An application-defined callback function used with the QueueUserAPC function. |
GetOverlappedResult | Retrieves the results of an overlapped operation. |
QueueUserAPC | Adds a user-mode asynchronous procedure call (APC) object to the APC queue of the specified thread. |
Condition variable and SRW lock function | Description |
---|---|
AcquireSRWLockExclusive | Acquires a slim reader/writer (SRW) lock in exclusive mode. |
AcquireSRWLockShared | Acquires a slim reader/writer (SRW) lock in shared mode. |
InitializeConditionVariable | Initializes a condition variable. |
InitializeSRWLock | Initialize a slim reader/writer (SRW) lock. |
ReleaseSRWLockExclusive | Releases a slim reader/writer (SRW) lock that was acquired in exclusive mode. |
ReleaseSRWLockShared | Releases a slim reader/writer (SRW) lock that was acquired in shared mode. |
SleepConditionVariableCS | Sleeps on the specified condition variable and releases the specified critical section as an atomic operation. |
SleepConditionVariableSRW | Sleeps on the specified condition variable and releases the specified lock as an atomic operation. |
TryAcquireSRWLockExclusive | Attempts to acquire a slim reader/writer (SRW) lock in exclusive mode. If the call is successful, the calling thread takes ownership of the lock. |
TryAcquireSRWLockShared | Attempts to acquire a slim reader/writer (SRW) lock in shared mode. If the call is successful, the calling thread takes ownership of the lock. |
WakeAllConditionVariable | Wake all threads waiting on the specified condition variable. |
WakeConditionVariable | Wake a single thread waiting on the specified condition variable. |
Critical-section function | Description |
---|---|
DeleteCriticalSection | Releases all resources used by an unowned critical section object. |
EnterCriticalSection | Waits for ownership of the specified critical section object. |
InitializeCriticalSection | Initializes a critical section object. |
InitializeCriticalSectionAndSpinCount | Initializes a critical section object and sets the spin count for the critical section. |
InitializeCriticalSectionEx | Initializes a critical section object with a spin count and optional flags. |
LeaveCriticalSection | Releases ownership of the specified critical section object. |
SetCriticalSectionSpinCount | Sets the spin count for the specified critical section. |
TryEnterCriticalSection | Attempts to enter a critical section without blocking. |
Event function | Description |
---|---|
CreateEvent | Creates or opens a named or unnamed event object. |
CreateEventEx | Creates or opens a named or unnamed event object and returns a handle to the object. |
OpenEvent | Opens an existing named event object. |
PulseEvent | Sets the specified event object to the signaled state and then resets it to the nonsignaled state after releasing the appropriate number of waiting threads. |
ResetEvent | Sets the specified event object to the nonsignaled state. |
SetEvent | Sets the specified event object to the signaled state. |
One-time Initialization function | Description |
---|---|
InitOnceBeginInitialize | Begins one-time initialization. |
InitOnceComplete | Completes one-time initialization. |
InitOnceExecuteOnce | Executes the specified function successfully one time. No other threads that specify the same one-time initialization structure can execute this function while it is being executed by the current thread. |
InitOnceInitialize | Initializes a one-time initialization structure. |
Interlocked function | Description |
---|---|
InterlockedAdd | Performs an atomic addition operation on the specified LONG values. |
InterlockedAdd64 | Performs an atomic addition operation on the specified LONGLONG values. |
InterlockedAddAcquire | Performs an atomic addition operation on the specified LONG values. The operation is performed with acquire memory access semantics. |
InterlockedAddAcquire64 | Performs an atomic addition operation on the specified LONGLONG values. The operation is performed with acquire memory access semantics. |
InterlockedAddRelease | Performs an atomic addition operation on the specified LONG values. The operation is performed with release memory access semantics. |
InterlockedAddRelease64 | Performs an atomic addition operation on the specified LONGLONG values. The operation is performed with release memory access semantics. |
InterlockedAnd | Performs an atomic AND operation on the specified LONG values. |
InterlockedAndAcquire | Performs an atomic AND operation on the specified LONG values. The operation is performed with acquire memory access semantics. |
InterlockedAndRelease | Performs an atomic AND operation on the specified LONG values. The operation is performed with release memory access semantics. |
InterlockedAnd8 | Performs an atomic AND operation on the specified char values. |
InterlockedAnd8Acquire | Performs an atomic AND operation on the specified char values. The operation is performed with acquire memory access semantics. |
InterlockedAnd8Release | Performs an atomic AND operation on the specified char values. The operation is performed with release memory access semantics. |
InterlockedAnd16 | Performs an atomic AND operation on the specified SHORT values. |
InterlockedAnd16Acquire | Performs an atomic AND operation on the specified SHORT values. The operation is performed with acquire memory access semantics. |
InterlockedAnd16Release | Performs an atomic AND operation on the specified SHORT values. The operation is performed with release memory access semantics. |
InterlockedAnd64 | Performs an atomic AND operation on the specified LONGLONG values. |
InterlockedAnd64Acquire | Performs an atomic AND operation on the specified LONGLONG values. The operation is performed with acquire memory access semantics. |
InterlockedAnd64Release | Performs an atomic AND operation on the specified LONGLONG values. The operation is performed with release memory access semantics. |
InterlockedBitTestAndReset | Tests the specified bit of the specified LONG value and sets it to 0. |
InterlockedBitTestAndReset64 | Tests the specified bit of the specified LONG64 value and sets it to 0. |
InterlockedBitTestAndSet | Tests the specified bit of the specified LONG value and sets it to 1. |
InterlockedBitTestAndSet64 | Tests the specified bit of the specified LONG64 value and sets it to 1. |
InterlockedCompare64Exchange128 | Performs an atomic compare-and-exchange operation on the specified values. The function compares the specified 64-bit values and exchanges with the specified 128-bit value based on the outcome of the comparison. |
InterlockedCompare64ExchangeAcquire128 | Performs an atomic compare-and-exchange operation on the specified values. The function compares the specified 64-bit values and exchanges with the specified 128-bit value based on the outcome of the comparison. The operation is performed with acquire memory access semantics. |
InterlockedCompare64ExchangeRelease128 | Performs an atomic compare-and-exchange operation on the specified values. The function compares the specified 64-bit values and exchanges with the specified 128-bit value based on the outcome of the comparison. The operation is performed with release memory access semantics. |
InterlockedCompareExchange | Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 32-bit values and exchanges with another 32-bit value based on the outcome of the comparison. |
InterlockedCompareExchange64 | Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 64-bit values and exchanges with another 64-bit value based on the outcome of the comparison. |
InterlockedCompareExchangeAcquire | Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 32-bit values and exchanges with another 32-bit value based on the outcome of the comparison. The operation is performed with acquire memory access semantics. |
InterlockedCompareExchangeAcquire64 | Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 64-bit values and exchanges with another 64-bit value based on the outcome of the comparison. The exchange is performed with acquire memory access semantics. |
InterlockedCompareExchangePointer | Performs an atomic compare-and-exchange operation on the specified pointer values. The function compares two specified pointer values and exchanges with another pointer value based on the outcome of the comparison. |
InterlockedCompareExchangePointerAcquire | Performs an atomic compare-and-exchange operation on the specified pointer values. The function compares two specified pointer values and exchanges with another pointer value based on the outcome of the comparison. The operation is performed with acquire memory access semantics. |
InterlockedCompareExchangePointerRelease | Performs an atomic compare-and-exchange operation on the specified pointer values. The function compares two specified pointer values and exchanges with another pointer value based on the outcome of the comparison. The operation is performed with release memory access semantics. |
InterlockedCompareExchangeRelease | Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 32-bit values and exchanges with another 32-bit value based on the outcome of the comparison. The exchange is performed with release memory access semantics. |
InterlockedCompareExchangeRelease64 | Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 64-bit values and exchanges with another 64-bit value based on the outcome of the comparison. The exchange is performed with release memory access semantics. |
InterlockedDecrement | Decrements (decreases by one) the value of the specified 32-bit variable as an atomic operation. |
InterlockedDecrement64 | Decrements (decreases by one) the value of the specified 64-bit variable as an atomic operation. |
InterlockedDecrementAcquire | Decrements (decreases by one) the value of the specified 32-bit variable as an atomic operation. The operation is performed with acquire memory access semantics. |
InterlockedDecrementAcquire64 | Decrements (decreases by one) the value of the specified 64-bit variable as an atomic operation. The operation is performed with acquire memory access semantics. |
InterlockedDecrementRelease | Decrements (decreases by one) the value of the specified 32-bit variable as an atomic operation. The operation is performed with release memory access semantics. |
InterlockedDecrementRelease64 | Decrements (decreases by one) the value of the specified 64-bit variable as an atomic operation. The operation is performed with release memory access semantics. |
InterlockedExchange | Sets a 32-bit variable to the specified value as an atomic operation. |
InterlockedExchange64 | Sets a 64-bit variable to the specified value as an atomic operation. |
InterlockedExchangeAcquire | Sets a 32-bit variable to the specified value as an atomic operation. The operation is performed with acquire memory access semantics. |
InterlockedExchangeAcquire64 | Sets a 32-bit variable to the specified value as an atomic operation. The operation is performed with acquire memory access semantics. |
InterlockedExchangeAdd | Performs an atomic addition of two 32-bit values. |
InterlockedExchangeAdd64 | Performs an atomic addition of two 64-bit values. |
InterlockedExchangeAddAcquire | Performs an atomic addition of two 32-bit values. The operation is performed with acquire memory access semantics. |
InterlockedExchangeAddAcquire64 | Performs an atomic addition of two 64-bit values. The operation is performed with acquire memory access semantics. |
InterlockedExchangeAddRelease | Performs an atomic addition of two 32-bit values. The operation is performed with release memory access semantics. |
InterlockedExchangeAddRelease64 | Performs an atomic addition of two 64-bit values. The operation is performed with release memory access semantics. |
InterlockedExchangePointer | Atomically exchanges a pair of pointer values. |
InterlockedExchangePointerAcquire | Atomically exchanges a pair of pointer values. The operation is performed with acquire memory access semantics. |
InterlockedIncrement | Increments (increases by one) the value of the specified 32-bit variable as an atomic operation. |
InterlockedIncrement64 | Increments (increases by one) the value of the specified 64-bit variable as an atomic operation. |
InterlockedIncrementAcquire | Increments (increases by one) the value of the specified 32-bit variable as an atomic operation. The operation is performed using acquire memory access semantics. |
InterlockedIncrementAcquire64 | Increments (increases by one) the value of the specified 64-bit variable as an atomic operation. The operation is performed using acquire memory access semantics. |
InterlockedIncrementRelease | Increments (increases by one) the value of the specified 32-bit variable as an atomic operation. The operation is performed using release memory access semantics. |
InterlockedIncrementRelease64 | Increments (increases by one) the value of the specified 64-bit variable as an atomic operation. The operation is performed using release memory access semantics. |
InterlockedOr | Performs an atomic OR operation on the specified LONG values. |
InterlockedOrAcquire | Performs an atomic OR operation on the specified LONG values. The operation is performed with acquire memory access semantics. |
InterlockedOrRelease | Performs an atomic OR operation on the specified LONG values. The operation is performed with release memory access semantics. |
InterlockedOr8 | Performs an atomic OR operation on the specified char values. |
InterlockedOr8Acquire | Performs an atomic OR operation on the specified char values. The operation is performed with acquire memory access semantics. |
InterlockedOr8Release | Performs an atomic OR operation on the specified char values. The operation is performed with release memory access semantics. |
InterlockedOr16 | Performs an atomic OR operation on the specified SHORT values. |
InterlockedOr16Acquire | Performs an atomic OR operation on the specified SHORT values. The operation is performed with acquire memory access semantics. |
InterlockedOr16Release | Performs an atomic OR operation on the specified SHORT values. The operation is performed with release memory access semantics. |
InterlockedOr64 | Performs an atomic OR operation on the specified LONGLONG values. |
InterlockedOr64Acquire | Performs an atomic OR operation on the specified LONGLONG values. The operation is performed with acquire memory access semantics. |
InterlockedOr64Release | Performs an atomic OR operation on the specified LONGLONG values. The operation is performed with release memory access semantics. |
InterlockedXor | Performs an atomic XOR operation on the specified LONG values. |
InterlockedXorAcquire | Performs an atomic XOR operation on the specified LONG values. The operation is performed with acquire memory access semantics. |
InterlockedXorRelease | Performs an atomic XOR operation on the specified LONG values. The operation is performed with release memory access semantics. |
InterlockedXor8 | Performs an atomic XOR operation on the specified char values. |
InterlockedXor8Acquire | Performs an atomic XOR operation on the specified char values. The operation is performed with acquire memory access semantics. |
InterlockedXor8Release | Performs an atomic XOR operation on the specified char values. The operation is performed with release memory access semantics. |
InterlockedXor16 | Performs an atomic XOR operation on the specified SHORT values. |
InterlockedXor16Acquire | Performs an atomic XOR operation on the specified SHORT values. The operation is performed with acquire memory access semantics. |
InterlockedXor16Release | Performs an atomic XOR operation on the specified SHORT values. The operation is performed with release memory access semantics. |
InterlockedXor64 | Performs an atomic XOR operation on the specified LONGLONG values. |
InterlockedXor64Acquire | Performs an atomic XOR operation on the specified LONGLONG values. The operation is performed with acquire memory access semantics. |
InterlockedXor64Release | Performs an atomic XOR operation on the specified LONGLONG values. The operation is performed with release memory access semantics. |
Mutex function | Description |
---|---|
CreateMutex | Creates or opens a named or unnamed mutex object. |
CreateMutexEx | Creates or opens a named or unnamed mutex object and returns a handle to the object. |
OpenMutex | Opens an existing named mutex object. |
ReleaseMutex | Releases ownership of the specified mutex object. |
Namespace function | Description |
---|---|
AddSIDToBoundaryDescriptor | Adds a new security identifier (SID) to the specified boundary descriptor. |
AddIntegrityLabelToBoundaryDescriptor | Adds a new required security identifier (SID) to the specified boundary descriptor. |
ClosePrivateNamespace | Closes an open namespace handle. |
CreateBoundaryDescriptor | Creates a boundary descriptor. |
CreatePrivateNamespace | Creates a private namespace. |
DeleteBoundaryDescriptor | Deletes the specified boundary descriptor. |
OpenPrivateNamespace | Opens a private namespace. |
Semaphore function | Description |
---|---|
CreateSemaphore | Creates or opens a named or unnamed semaphore object. |
CreateSemaphoreEx | Creates or opens a named or unnamed semaphore object and returns a handle to the object. |
OpenSemaphore | Opens an existing named semaphore object. |
ReleaseSemaphore | Increases the count of the specified semaphore object by a specified amount. |
Singly-linked list function | Description |
---|---|
InitializeSListHead | Initializes the head of a singly linked list. |
InterlockedFlushSList | Flushes the entire list of items in a singly linked list. |
InterlockedPopEntrySList | Removes an item from the front of a singly linked list. |
InterlockedPushEntrySList | Inserts an item at the front of a singly linked list. |
QueryDepthSList | Retrieves the number of entries in the specified singly linked list. |
RtlFirstEntrySList | Retrieves the first entry in a singly linked list. |
RtlInitializeSListHead | Initializes the head of a singly linked list. Applications should call InitializeSListHead instead. |
RtlInterlockedFlushSList | Flushes the entire list of items in a singly linked list. Applications should call InterlockedFlushSList instead. |
RtlInterlockedPopEntrySList | Removes an item from the front of a singly linked list. Applications should call InterlockedPopEntrySList instead. |
RtlInterlockedPushEntrySList | Inserts an item at the front of a singly linked list. Applications should call InterlockedPushEntrySList instead. |
RtlQueryDepthSList | Retrieves the number of entries in the specified singly linked list. Applications should call QueryDepthSList instead. |
Timer-queue timer function | Description |
---|---|
ChangeTimerQueueTimer | Updates a timer-queue timer. |
CreateTimerQueue | Creates a queue for timers. |
CreateTimerQueueTimer | Creates a timer-queue timer. |
DeleteTimerQueue | Deletes a timer queue. |
DeleteTimerQueueEx | Deletes a timer queue. |
DeleteTimerQueueTimer | Cancels a timer-queue timer. |
Wait function | Description |
---|---|
MsgWaitForMultipleObjects | Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses. The objects can include input event objects. |
MsgWaitForMultipleObjectsEx | Waits until one or all of the specified objects are in the signaled state, an I/O completion routine or asynchronous procedure call (APC) is queued to the thread, or the time-out interval elapses. The array of objects can include input event objects. |
RegisterWaitForSingleObject | Directs a wait thread in the thread pool to wait on the object. |
SignalObjectAndWait | Atomically signals one object and waits on another object. |
UnregisterWait | Cancels a registered wait operation. |
UnregisterWaitEx | Cancels a registered wait operation. |
WaitForMultipleObjects | Waits until one or all of the specified objects are in the signaled state or the time-out interval elapses. |
WaitForMultipleObjectsEx | Waits until one or all of the specified objects are in the signaled state, an I/O completion routine or asynchronous procedure call (APC) is queued to the thread, or the time-out interval elapses. |
WaitForSingleObject | Waits until the specified object is in the signaled state or the time-out interval elapses. |
WaitForSingleObjectEx | Waits until the specified object is in the signaled state, an I/O completion routine or asynchronous procedure call (APC) is queued to the thread, or the time-out interval elapses. |
WaitOrTimerCallback | An application-defined function that serves as the starting address for a timer callback or a registered wait callback. |
Waitable-timer function | Description |
---|---|
CancelWaitableTimer | Sets the specified waitable timer to the inactive state. |
CreateWaitableTimer | Creates or opens a waitable timer object. |
CreateWaitableTimerEx | Creates or opens a waitable timer object and returns a handle to the object. |
OpenWaitableTimer | Opens an existing named waitable timer object. |
SetWaitableTimer | Activates the specified waitable timer. |
SetWaitableTimerEx | Activates the specified waitable timer and provides context information for the timer. . |
TimerAPCProc | Application-defined timer completion routine used with the SetWaitableTimer function. |
原文链接
http://msdn.microsoft.com/en-us/library/ms686360(VS.85).aspx