DosCreateEventSem:
The flags argument can specify the new behaviors of the event semaphore: DCE_AUTORESET means the event automatically resets itself after a thread obtains it through DosWaitEventSem, and DCE_POSTONE means that DosPostEventSem only wakes up one waiting thread if there is any. When DCE_POSTONE is specified, the event always automatically resets even if DCE_AUTORESET is not specified. We can define three types of events with these two flags:
Neither DCE_AUTORESET nor DCE_POSTONE set: The event has default behavior, which needs manual resets and wakes up all waiters when posted.
DCE_AUTORESET set but not DCE_POSTONE: The event resets it after a wait is successfully executed. It wakes up all waiters when posted.
DCE_POSTONE set: The event resets it automatically after a wait is successfully executed. But it only wakes up one waiter when posted.
DosWaitEventSem:
For an AUTORESET event, it automatically resets itself after this is successfully executed. Otherwise, it leaves the event in signalled (posted) state.
DosPostEventSem:
For a POSTONE event, it wakes up only one waiter if there is any thread waiting for the event. Otherwise, it wakes up all events.