*** empty log message ***

This commit is contained in:
glenux 2004-02-24 09:54:05 +00:00 committed by Glenn Y. Rolland
parent 55bdcbca9d
commit e86a28a0c3
5 changed files with 69 additions and 36 deletions

View file

@ -50,8 +50,9 @@ sem_t * poolDataTabSemFd;
msgPoolDataTabClose(space,poolDataTabAddr); msgPoolDataTabClose(space,poolDataTabAddr);
// deverouiller semaphore DataInfo // deverouiller semaphore DataInfo
sem_post(poolDataTabSemFd); msgPoolDataTabUnlock(space);
sem_close(poolDataTabSemFd); // sem_post(poolDataTabSemFd);
// sem_close(poolDataTabSemFd);
// deverouiller semaphore ressource. // deverouiller semaphore ressource.
msgPoolSemIdIntern(ressourceSemId,space->id,poolIndex); msgPoolSemIdIntern(ressourceSemId,space->id,poolIndex);

0
src/get.c Normal file
View file

View file

@ -0,0 +1,29 @@
#include "libnazgul.h"
#include "ids.h"
int msgPoolDataTabUnlock(msgSpace * space){
sem_t * poolDataTabSemFd;
poolDataTabSemFd=sem_open(
space->poolDataTabSemId
,O_CREAT,
SEM_DEFAULT_MODE,
1);
if(poolDataTabSemFd==SEM_FAILED){
NZG_ERROR("sem_open",space->poolDataTabSemId);
goto ERROR;
}
if(sem_post(poolDataTabSemFd)==-1){
NZG_ERROR("sem_post",space->poolDataTabSemId);
goto ERROR;
}
sem_close(poolDataTabSemFd);
return 0;
ERROR:
return -1;
}

View file

@ -41,6 +41,7 @@ int msgPoolDataTabLock(msgSpace *space);
/* poolDataTabOpen.c */ /* poolDataTabOpen.c */
void *msgPoolDataTabOpen(msgSpace *space); void *msgPoolDataTabOpen(msgSpace *space);
/* poolDataTabUnlock.c */ /* poolDataTabUnlock.c */
int msgPoolDataTabUnlock(msgSpace *space);
/* poolDelete.c */ /* poolDelete.c */
int msgPoolDelete(msgSpaceId spaceId, int poolIdx); int msgPoolDelete(msgSpaceId spaceId, int poolIdx);
/* put.c */ /* put.c */

View file

@ -17,7 +17,6 @@ int err;
addr addr
); );
// ouvrir la queue avec le bon index // ouvrir la queue avec le bon index
msgQueueId queueId; msgQueueId queueId;
msgQueue * queue; msgQueue * queue;
@ -32,9 +31,11 @@ int err;
msgQueueElemCreate(newElemId,queueId,queue->elemCounter); msgQueueElemCreate(newElemId,queueId,queue->elemCounter);
// ouvrir l'element // ouvrir l'element
queueElem=msgQueueElemOpen(newElemId); queueElem=msgQueueElemOpen(newElemId);
// modifier les index pour retrouver le buffer // modifier les index pour retrouver le buffer
queueElem->poolIndex=poolIndex; queueElem->poolIndex=poolIndex;
queueElem->bufferIndex=bufferIndex; queueElem->bufferIndex=bufferIndex;
// fermer l'element // fermer l'element
msgQueueElemClose(queueElem); msgQueueElemClose(queueElem);
@ -46,8 +47,9 @@ msgQueueElemAdd(queue,newElemId);
msgQueueProtUnlock(space->externId,queueIndex); msgQueueProtUnlock(space->externId,queueIndex);
msgPoolDataTabClose(space,poolDataTabAddr); msgPoolDataTabClose(space,poolDataTabAddr);
/* msgPoolDataTabUnlock(space->id); msgPoolDataTabUnlock(space);
*/
// on laisse une nouvelle ressource de la liste au get
msgQueueReadUnlock(space->externId,queueIndex); msgQueueReadUnlock(space->externId,queueIndex);
return 0; return 0;
ERROR: ERROR: