*** empty log message ***

This commit is contained in:
glenux 2004-02-24 09:31:11 +00:00 committed by Glenn Y. Rolland
parent 5d1938a5d7
commit fabaee86c6
5 changed files with 64 additions and 8 deletions

View file

@ -61,14 +61,18 @@ int msgQueueElemDelete(msgQueueElemId queueElemId);
void *msgQueueElemOpen(msgQueueElemId queueElemId);
/* queueInit.c */
msgQueue *queueInit(msgSpaceId externId, int queueIdx);
/* queueLock.c */
int queueLock(msgSpaceId externId, int queueIdx);
/* queueOpen.c */
void *msgQueueOpen(msgQueueId queueId);
/* queueProtLock.c */
int queueProtLock(msgSpaceId externId, int queueIdx);
/* queueProtUnlock.c */
int queueProtUnlock(msgSpaceId externId, int queueIdx);
/* queueReadLock.c */
int queueReadLock(msgSpaceId externId, int queueIdx);
/* queueReadUnlock.c */
int queueReadUnlock(msgSpaceId externId, int queueIdx);
/* queueRem.c */
int msgQueueElemRem(msgQueue *queue, msgQueueElemId oldElemId);
/* queueUnlock.c */
int queueUnlock(msgSpaceId externId, int queueIdx);
/* spaceCreate.c */
msgSpace *msgSpaceCreate(msgSpaceId externId, int queueNb, int poolNb, msgPool *poolInfos);
/* spaceDelete.c */

View file

@ -1,11 +1,11 @@
#include "libnazgul.h"
#include "ids.h"
int queueLock(msgSpaceId externId,int queueIdx){
int queueProtLock(msgSpaceId externId,int queueIdx){
sem_t * queueSemFd;
msgQueueSemId queueSemId;
msgQueueSemIdIntern(queueSemId,externId,queueIdx);
msgQueueProtSemIdIntern(queueSemId,externId,queueIdx);
queueSemFd=sem_open(queueSemId,O_CREAT|O_EXCL,SEM_DEFAULT_MODE,1);
if(queueSemFd==SEM_FAILED){
NZG_ERROR("sem_open",queueSemId);

View file

@ -1,11 +1,11 @@
#include "libnazgul.h"
#include "ids.h"
int queueUnlock(msgSpaceId externId,int queueIdx){
int queueProtUnlock(msgSpaceId externId,int queueIdx){
sem_t * queueSemFd;
msgQueueSemId queueSemId;
msgQueueSemIdIntern(queueSemId,externId,queueIdx);
msgQueueProtSemIdIntern(queueSemId,externId,queueIdx);
queueSemFd=sem_open(queueSemId,O_CREAT|O_EXCL,SEM_DEFAULT_MODE,1);
if(queueSemFd==SEM_FAILED){
NZG_ERROR("sem_open",queueSemId);

26
src/queueReadLock.c Normal file
View file

@ -0,0 +1,26 @@
#include "libnazgul.h"
#include "ids.h"
int queueReadLock(msgSpaceId externId,int queueIdx){
sem_t * queueSemFd;
msgQueueSemId queueSemId;
msgQueueReadSemIdIntern(queueSemId,externId,queueIdx);
queueSemFd=sem_open(queueSemId,O_CREAT|O_EXCL,SEM_DEFAULT_MODE,1);
if(queueSemFd==SEM_FAILED){
NZG_ERROR("sem_open",queueSemId);
goto ERROR;
}
if(sem_wait(queueSemFd)==-1){
NZG_ERROR("sem_wait",queueSemId);
goto ERROR;
}
sem_close(queueSemFd);
return 0;
ERROR:
return -1;
}

26
src/queueReadUnlock.c Normal file
View file

@ -0,0 +1,26 @@
#include "libnazgul.h"
#include "ids.h"
int queueReadUnlock(msgSpaceId externId,int queueIdx){
sem_t * queueSemFd;
msgQueueSemId queueSemId;
msgQueueReadSemIdIntern(queueSemId,externId,queueIdx);
queueSemFd=sem_open(queueSemId,O_CREAT|O_EXCL,SEM_DEFAULT_MODE,1);
if(queueSemFd==SEM_FAILED){
NZG_ERROR("sem_open",queueSemId);
goto ERROR;
}
if(sem_post(queueSemFd)==-1){
NZG_ERROR("sem_post",queueSemId);
goto ERROR;
}
sem_close(queueSemFd);
return 0;
ERROR:
return -1;
}