WaitEvent

externFP WaitEvent push taskID ; task identifier call WaitEvent or ax,ax jnz resched ; nonzero if rescheduled

The WaitEvent function checks for a posted event and, if one is found, clears the event and returns control to the application. If no event is found, the function suspends execution of the application by calling the Windows scheduler.

Parameters

taskID

Identifies the task to check events for. If this parameter is zero, the function checks events for the current task.

Return Value

This function returns a nonzero value if the Windows scheduler has scheduled another application. Otherwise, it returns zero.