int cdecl thread()
{
ulResult = DosCreateEventSem("\SEM32\THREAD", /* Name of semaphore */
hSem, /* Semaphore handle */
NULL, /* Not used */
FALSE); /* Set immediately */
<Perform lengthy processing task>
usResult = DosPostEventSem(hSem); /* Release semaphore */
DosExit(0); /* Terminate thread */
}
This example shows the routine executing in the secondary thread.