changed from semBCreate to semMCreate
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)\
|
||||
|
||||
@@ -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)\
|
||||
|
||||
@@ -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)\
|
||||
|
||||
Reference in New Issue
Block a user