There are two classes of 32-bit semaphores, private and shared. There are three types of semaphore in each class, Event, MUTual EXclusion, and multiple wait semaphores.
MUTEX semaphores correspond to one of the most common uses of the 16-bit semaphores, namely to allow competing threads to mutually exclude others from accessing a shared resource.
A MUTEX semaphore includes the slot number of its owner, if owned, or zero if unowned.
An EVENT semaphore contains a 'post count' which is incremented each time it is POSTED, and decremented each time a WAIT for it is completed successfully. This type provides a way to insure that some processing occurs exactly once for each POST.
A multiple wait semaphore is nothing more than a list of semaphores, of the same type. A thread may wait on either 'ANY' or 'ALL' of the semaphores in the list.
All Semaphores must first be created with DosCreate???Sem, where '???' is the semaphore type. Other processes must open them with DosOpen???Sem to have access to them. Private semaphores have a null pointer to their name, and thus no name. Public ones have a name in the same format as that used for the 16-bit semaphores. DosClose???Sem is used when a thread is through using it.
DosRequestMutexSem and DosReleaseMutexSem are used to access the mutual exclusion semaphores.
DosPostEventSem and DosWaitEventSem are used to access an event semaphore. DosResetEventSem will allow immediate access, and return the post count, which is cleared by this API.
DosQuery???Sem will allow the retrieval of information about each type of semaphore.
DosAddMuxWaitSem and DosDeleteMuxWaitSem are used to add and delete semaphores from a multiple wait semaphore list, respectively.