made lock/unlock entry points inline again

This commit is contained in:
Jeff Hill
2002-05-08 23:15:31 +00:00
parent ff05ad2dc3
commit 7fcb189dfb
2 changed files with 60 additions and 45 deletions
+7 -40
View File
@@ -140,46 +140,13 @@ epicsMutex ::~epicsMutex ()
epicsMutexDestroy ( this->id );
}
void epicsMutex :: lock ()
{
epicsMutexLockStatus status = epicsMutexLock ( this->id );
if ( status != epicsMutexLockOK ) {
throwWithLocation ( invalidSemaphore () );
}
}
bool epicsMutex :: lock ( double timeOut )
{
epicsMutexLockStatus status = epicsMutexLockWithTimeout ( this->id, timeOut );
if (status==epicsMutexLockOK) {
return true;
} else if (status==epicsMutexLockTimeout) {
return false;
} else {
throwWithLocation ( invalidSemaphore () );
}
return false; // never here, compiler is happy
}
bool epicsMutex :: tryLock ()
{
epicsMutexLockStatus status = epicsMutexTryLock ( this->id );
if ( status == epicsMutexLockOK ) {
return true;
} else if ( status == epicsMutexLockTimeout ) {
return false;
} else {
throwWithLocation ( invalidSemaphore () );
}
return false; // never here, but compiler is happy
}
void epicsMutex :: unlock ()
{
epicsMutexUnlock ( this->id );
}
void epicsMutex :: show ( unsigned level ) const
{
epicsMutexShow ( this->id, level );
}
}
void epicsMutex :: throwInvalidSemaphore ()
{
throw invalidSemaphore ();
}