CreateSemaphore

E724281

CreateSemaphore is a Windows API function that creates or opens a semaphore object used for controlling access to shared resources in concurrent applications.

Try in SPARQL Jump to: Statements Referenced by

Statements (48)

Predicate Object
instanceOf Windows API function
synchronization function
applicability multiprocess applications
multithreaded applications
belongsTo Kernel32 library NERFINISHED
canFailIf lInitialCount is greater than lMaximumCount
lMaximumCount is less than or equal to zero
semaphore name already exists with incompatible type
category Win32 synchronization APIs
characterSetVariant CreateSemaphoreA
CreateSemaphoreW
definedIn Win32 API NERFINISHED
documentation Microsoft Windows SDK documentation
errorRetrieval GetLastError
handleClosureFunction CloseHandle
handleReleaseFunction ReleaseSemaphore
handleUsage used with WaitForMultipleObjects
used with WaitForSingleObject
headerFile windows.h
introducedFor Win32 applications
library Kernel32.dll NERFINISHED
lifecycle semaphore is destroyed when last handle is closed
maximumCountConstraint must be positive LONG value
minimumInitialCount 0
namespace system-wide object namespace for named semaphores
objectTypeCreated semaphore object
parameter LONG lInitialCount
LONG lMaximumCount
LPCTSTR lpName
LPSECURITY_ATTRIBUTES lpSemaphoreAttributes
platform Windows
surface form: Microsoft Windows
purpose control access to shared resources
create or open a semaphore object
relatedFunction CreateEvent NERFINISHED
CreateMutex
replacedBy CreateSemaphoreEx in extended scenarios
requires Windows operating system NERFINISHED
returns HANDLE
returnValueOnFailure NULL
returnValueOnSuccess handle to semaphore object
supports named semaphores
unnamed semaphores
supportsAccessRights SEMAPHORE_MODIFY_STATE
SYNCHRONIZE
synchronizationPrimitiveType counting semaphore
threadSafety thread-safe
usedFor process synchronization
thread synchronization

Referenced by (1)

Full triples — surface form annotated when it differs from this entity's canonical label.

Kernel32 exportsFunction CreateSemaphore