// Initialized like this
chBSemObjectInit( &sLock, true );
// Signal sent from Ext interrupt or timer
chBSemSignalI( &sLock );
// usage like this
Code: Select all
while( TRUE )
{
chBSemReset( &sLock, true );
status = chBSemWait( &sLock );
if( status == MSG_OK )
{
// do some work
}
}
I ask as it seems to work with or without it