You don't need to call Permit. Every Wait call pauses the Forbid state until it returns.
And of course signals work everywhere. Just make sure that the signal you want to wait for is allocated to the task which calls Wait and that the other task which shall set the signal knows which task waits for it.
Signal() is the function which sends a signal to another task.
SetSignal() only acts on the local task and cannot be used for inter-task communication.
Also be aware that AllocSignal returns a signal number while all other signal functions take a signal mask.
|