The free method frees the
lock, possibly causing the underlying operating system to reschedule
tasks.
In environments other than pSOSystem,
this is a macro that implements the same interface.
SignatureRiCOSResult RiCOSMutex_free (RiCOSMutex *const me);
Parametersme
The RiCOSMutex object
to free
ReturnsThe RiCOSResult object,
as defined in the RiCOS*.h files
ExampleRiCOSResult RiCOSMutex_free(RiCOSMutex * const me)
{
if (me == NULL) { return 0; }
if (semGive(me->hMutex)==OK)
return 1;
else
return 0;
}