Avoid using the following OS/2 API's in multithreaded programs:
In both cases you should notify the thread you want to kill or suspend, and have that thread do the killing or suspending itself after it has done any necessary cleanup.
When you are using semaphores, always check the return code for DosGetSemaphore to make sure the owner hasn't died, or you may lock a thread waiting for a semaphore that will never be freed.