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.
All labels observed (1)
| Label | Occurrences |
|---|---|
| CreateSemaphore canonical | 1 |
How this entity was disambiguated
This entity first appeared as the object of triple T8288317 — resolving that mention is where its identity was fixed. The disambiguator weighed these candidate entities and picked the highlighted one (or “None”, minting a new entity). This is how homonymy is resolved: the same surface form can point to different entities.
Target entity: CreateSemaphore Context triple: [Kernel32, exportsFunction, CreateSemaphore]
-
A.
SysV semaphores
SysV semaphores are a classic UNIX System V inter-process communication mechanism that provides counting semaphores for synchronizing access to shared resources among multiple processes.
-
B.
ManualResetEventSlim
ManualResetEventSlim is a lightweight synchronization primitive in .NET used to efficiently signal and wait for events across threads, offering better performance than the classic ManualResetEvent in many scenarios.
-
C.
EventWaitHandle
EventWaitHandle is a .NET synchronization primitive that allows threads or processes to signal and wait for events, coordinating execution flow in concurrent applications.
-
D.
ManualResetEvent
ManualResetEvent is a .NET synchronization primitive that allows threads to wait until a signal is set and remains signaled until it is manually reset.
-
E.
SpinLock
SpinLock is a lightweight synchronization primitive in .NET used to protect shared data by repeatedly checking for lock availability instead of blocking threads.
- F. None of above. chosen
- G. Unsure - the case is ambiguous/there is not enough information to decide.
Target entity: CreateSemaphore Target entity description: CreateSemaphore is a Windows API function that creates or opens a semaphore object used for controlling access to shared resources in concurrent applications.
-
A.
SysV semaphores
SysV semaphores are a classic UNIX System V inter-process communication mechanism that provides counting semaphores for synchronizing access to shared resources among multiple processes.
-
B.
ManualResetEventSlim
ManualResetEventSlim is a lightweight synchronization primitive in .NET used to efficiently signal and wait for events across threads, offering better performance than the classic ManualResetEvent in many scenarios.
-
C.
EventWaitHandle
EventWaitHandle is a .NET synchronization primitive that allows threads or processes to signal and wait for events, coordinating execution flow in concurrent applications.
-
D.
ManualResetEvent
ManualResetEvent is a .NET synchronization primitive that allows threads to wait until a signal is set and remains signaled until it is manually reset.
-
E.
SpinLock
SpinLock is a lightweight synchronization primitive in .NET used to protect shared data by repeatedly checking for lock availability instead of blocking threads.
- F. None of above. chosen
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 ⓘ |
How these facts were elicited
The pipeline generated the facts above by prompting gpt-5.1 with this entity's name + description and the instruction below.
You are a knowledge base construction expert. Given a subject entity and a description of it, return factual statements that you know for the subject as a JSON list of dictionaries(triples), where keys must be "subject", "predicate" and "object". The number of facts may be very high, between 25 to 50 or more, for very popular subjects. For less popular subjects, the number of facts can be very low, like 5 or 10. # Requirements - If you don't know the subject at all, return an empty list. - If the subject is not a named entity, return an empty list. - Include at least one triple where predicate is "instanceOf". - Do not get too wordy. - Separate several objects into multiple triples with one object.
Subject: CreateSemaphore Description of subject: CreateSemaphore is a Windows API function that creates or opens a semaphore object used for controlling access to shared resources in concurrent applications.
Referenced by (1)
Full triples — surface form annotated when it differs from this entity's canonical label.