DosReleaseRamSem releases a RAM semaphore. This is used at the exit from a range of code which must not be executed simultaneously in multiple threads.
#define INCL_DOSSEMAPHORES #include <os2.h> PRAMSEM pramsem; /* Pointer to the RAM semaphore structure. */ ULONG flag; /* Release flag. */ APIRET rc; /* Return code. */ rc = DosReleaseRamSem(pramsem, flag);