To create a local semaphore, simply declare it:
// local semaphore
TLocalSemaphore* localSem = new TLocalSemaphore();
To create a recoverable semaphore and share it among tasks, one task must declare the semaphore and stream it to the others:
TRecoverableSemaphoreHandle* recoverableSem = new TRecoverableSemaphoreHandle();
*recoverableSem => stream;
To use the recoverable semaphore, a cooperating task must read the semaphore from the same stream:
TRecoverableSemaphoreHandle* recoverableSem = new TRecoverableSemaphoreHandle();
*recoverableSem <= stream;
CAUTION
When you