In any preemptively scheduled environment, the use of semaphores is vital to protect data structures that can be accessed by more than one thread of execution. The standard semaphore functions (Set, Clear, Wait, Request) are provided as DMOD entry points.
For example, if the emulator uses the routing procedure method of receiving messages, the routing procedure will be called from a different thread context to the main application thread. This may require the use of semaphore protection around emulator data structures.