*** empty log message ***

This commit is contained in:
glenux 2004-02-23 20:00:06 +00:00
parent eb9c82b088
commit 08500fbb3a
2 changed files with 24 additions and 2 deletions

View file

@ -1,10 +1,11 @@
#include "libnazgul.h"
#include "ids.h"
int queueLock(msgSpaceId externId,int queueIdx){
sem_t * queueSemFd;
msgQueueSemId queueSemId;
msgQueueSemIdIntern(queueSemId,externId);
msgQueueSemIdIntern(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,5 +1,26 @@
#include "libnazgul.h"
#include "ids.h"
int queueUnlock(msgSpaceId spaceid,int queueIdx){
int queueUnlock(msgSpaceId externId,int queueIdx){
sem_t * queueSemFd;
msgQueueSemId queueSemId;
msgQueueSemIdIntern(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;
}