changed from semBCreate to semMCreate

This commit is contained in:
Marty Kraimer
1998-05-20 20:59:46 +00:00
parent 07362375e4
commit 601de8c5e5
5 changed files with 9 additions and 8 deletions

View File

@@ -77,7 +77,7 @@ static void addAction(caLink *pca, short link_action)
void dbCaLinkInit(void)
{
ellInit(&caList);
caListSem = semBCreate(SEM_Q_PRIORITY,SEM_FULL);
caListSem = semMCreate(SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY);
caWakeupSem = semBCreate(SEM_Q_PRIORITY,SEM_EMPTY);
if(!caListSem || !caWakeupSem) {
printf("dbCaLinkInit: semBCreate failed\n");

View File

@@ -107,13 +107,14 @@ typedef struct lockRecord {
lockSet *plockSet;
dbCommon *precord;
} lockRecord;
#define semMCoptions SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY
/*private routines */
STATIC void initLockList(void)
{
ellInit(&lockList);
if((globalLockSemId = semBCreate(SEM_Q_FIFO,SEM_FULL))==0) {
errMessage(0,"allocLockNode called semBCreate\n");
if((globalLockSemId = semMCreate(semMCoptions))==0) {
errMessage(0,"allocLockNode called semMCreate\n");
exit(-1);
}
if((globalWaitSemid = semBCreate(SEM_Q_FIFO,SEM_EMPTY))==0) {
@@ -135,8 +136,8 @@ STATIC lockSet * allocLock(lockRecord *plockRecord)
plockSet->id = id;
ellAdd(&plockSet->recordList,&plockRecord->node);
ellAdd(&lockList,&plockSet->node);
if((plockSet->semId = semBCreate(SEM_Q_FIFO,SEM_FULL))==0) {
errMessage(0,"allocLockNode called semBCreate\n");
if((plockSet->semId = semMCreate(semMCoptions))==0) {
errMessage(0,"allocLockNode called semMCreate\n");
exit(-1);
}
return(plockSet);

View File

@@ -93,7 +93,7 @@ typedef struct{
#define FASTLOCKINIT(PFAST_LOCK)\
(((FAST_LOCK *)(PFAST_LOCK))->ppend = \
semBCreate(SEM_Q_PRIORITY, SEM_FULL))
semMCreate(SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY))
#define FASTLOCKFREE(PFAST_LOCK)\
semDelete( ((FAST_LOCK *)(PFAST_LOCK))->ppend )
#define FASTLOCK(PFAST_LOCK)\

View File

@@ -93,7 +93,7 @@ typedef struct{
#define FASTLOCKINIT(PFAST_LOCK)\
(((FAST_LOCK *)(PFAST_LOCK))->ppend = \
semBCreate(SEM_Q_PRIORITY, SEM_FULL))
semMCreate(SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY))
#define FASTLOCKFREE(PFAST_LOCK)\
semDelete( ((FAST_LOCK *)(PFAST_LOCK))->ppend )
#define FASTLOCK(PFAST_LOCK)\

View File

@@ -93,7 +93,7 @@ typedef struct{
#define FASTLOCKINIT(PFAST_LOCK)\
(((FAST_LOCK *)(PFAST_LOCK))->ppend = \
semBCreate(SEM_Q_PRIORITY, SEM_FULL))
semMCreate(SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY))
#define FASTLOCKFREE(PFAST_LOCK)\
semDelete( ((FAST_LOCK *)(PFAST_LOCK))->ppend )
#define FASTLOCK(PFAST_LOCK)\