These APIs are included in your application by including the following definition in your application source file.
#define INCL_DOSSEMAPHORES
The following describes the implementation differences between the OS2Linux library and the real OS/2 event semaphore APIs.
When multiple threads wait for an OS/2 event semaphore to post a single post operation to the semaphore will release all the waiting threads.. Under the OS/2Linux library there is a one-to-one correspondence between a post operation and the release of a single waiting thread. If three threads are waiting on an OS/2Linux event semaphore it will take three post operations to the semaphore to release all three threads.
APIRET APIENTRY DosCreateEventSem (PSZ pszName, PHEV phev, ULONG flAttr, BOOL32 fState);
APIRET APIENTRY DosOpenEventSem (PSZ pszName, PHEV phev);
APIRET APIENTRY DosCloseEventSem (HEV hev);
APIRET APIENTRY DosResetEventSem (HEV hev, PULONG pulPostCt);
APIRET APIENTRY DosPostEventSem (HEV hev);
APIRET APIENTRY DosWaitEventSem (HEV hev, ULONG ulTimeout);
APIRET APIENTRY DosQueryEventSem (HEV hev, PULONG pulPostCt);
The following describes the implementation differences between the OS2Linux library and the real OS/2 mutex semaphore APIs.
APIRET APIENTRY DosCreateMutexSem (PSZ pszName, PHMTX phmtx, ULONG flAttr, BOOL32 fState);
APIRET APIENTRY DosOpenMutexSem (PSZ pszName, PHMTX phmtx);
APIRET APIENTRY DosCloseMutexSem (HMTX hmtx);
APIRET APIENTRY DosRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
APIRET APIENTRY DosReleaseMutexSem (HMTX hmtx);
APIRET APIENTRY DosQueryMutexSem (HMTX hmtx, PID *ppid, TID *ptid, PULONG pulCount);
The following describes the implementation differences between the OS2Linux library and the real OS/2 muxwait semaphore APIs.
APIRET APIENTRY DosCreateMuxWaitSem (PSZ pszName, PHMUX phmux, ULONG cSemRec, PSEMRECORD pSemRec, ULONG flAttr);
APIRET APIENTRY DosOpenMuxWaitSem (PSZ pszName, PHMUX phmux);
APIRET APIENTRY DosCloseMuxWaitSem (HMUX hmux)
APIRET APIENTRY DosAddMuxWaitSem (HMUX hmux, PSEMRECORD pSemRec);
APIRET APIENTRY DosDeleteMuxWaitSem (HMUX hmux, HSEM hSem);
APIRET APIENTRY DosWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
APIRET APIENTRY DosQueryMuxWaitSem (HMUX hmux, PULONG pcSemRec, PSEMRECORD pSemRec, PULONG pflAttr);