semBinaryGive, semBinaryTake, semMutexGive, semMutexTake are now macros
This commit is contained in:
@@ -37,18 +37,6 @@ void semBinaryDestroy(semBinaryId id)
|
||||
semDelete((SEM_ID)id);
|
||||
}
|
||||
|
||||
void semBinaryGive(semBinaryId id)
|
||||
{
|
||||
semGive((SEM_ID)id);
|
||||
}
|
||||
|
||||
semTakeStatus semBinaryTake(semBinaryId id)
|
||||
{
|
||||
int status;
|
||||
status = semTake((SEM_ID)id,WAIT_FOREVER);
|
||||
return((status==OK ? semTakeOK : semTakeError));
|
||||
}
|
||||
|
||||
semTakeStatus semBinaryTakeTimeout(
|
||||
semBinaryId id, double timeOut)
|
||||
{
|
||||
@@ -94,18 +82,6 @@ void semMutexDestroy(semMutexId id)
|
||||
semDelete((SEM_ID)id);
|
||||
}
|
||||
|
||||
void semMutexGive(semMutexId id)
|
||||
{
|
||||
semGive((SEM_ID)id);
|
||||
}
|
||||
|
||||
semTakeStatus semMutexTake(semMutexId id)
|
||||
{
|
||||
int status;
|
||||
status = semTake((SEM_ID)id,WAIT_FOREVER);
|
||||
return((status==OK ? semTakeOK : semTakeError));
|
||||
}
|
||||
|
||||
semTakeStatus semMutexTakeTimeout(
|
||||
semMutexId id, double timeOut)
|
||||
{
|
||||
|
||||
@@ -8,4 +8,20 @@ described on the COPYRIGHT_UniversityOfChicago file included as part
|
||||
of this distribution.
|
||||
****************************************************************************/
|
||||
|
||||
/* no osdSem.h definitions are needed */
|
||||
#include <vxWorks.h>
|
||||
#include <semLib.h>
|
||||
|
||||
/* If the macro is replaced by inline it is necessary to say
|
||||
static __inline__
|
||||
but then a warning message appears everywhere osdSem.h is included
|
||||
*/
|
||||
|
||||
#define semBinaryGive(ID) semGive((SEM_ID)(ID))
|
||||
|
||||
#define semBinaryTake(ID) \
|
||||
(semTake((SEM_ID)(ID),WAIT_FOREVER)==OK ? semTakeOK : semTakeError)
|
||||
|
||||
#define semMutexGive(ID) semGive((SEM_ID)(ID))
|
||||
|
||||
#define semMutexTake(ID) \
|
||||
(semTake((SEM_ID)(ID),WAIT_FOREVER)==OK ? semTakeOK : semTakeError)
|
||||
|
||||
Reference in New Issue
Block a user