*** empty log message ***

This commit is contained in:
glenux 2004-02-23 21:41:20 +00:00 committed by Glenn Y. Rolland
parent 235c778aef
commit 13fe3a77d1
3 changed files with 41 additions and 6 deletions

View file

@ -27,29 +27,33 @@ int msgPoolDataIdIntern(msgPoolDataTabId dest, const msgSpaceId src);
int msgPoolIdIntern(msgPoolId dest, msgPoolId src, int num);
int msgBufferInfoTabIdIntern(msgBufferInfoTabId dest, msgSpaceId src, int num);
int msgQueueSemIdIntern(msgQueueSemId dest, msgSpaceId externId, int queueIdx);
int msgQueueIdIntern(msgQueueId dest, msgSpaceId externId, int queueIdx);
int msgQueueElemIdIntern(msgQueueElemId dest, msgQueueId src, int counter);
/* list.c */
/* poolCreate.c */
int msgPoolCreate(msgSpaceId externId, int poolIdx, int buffNb, int buffSize);
/* poolDelete.c */
int msgPoolDelete(msgSpaceId spaceId, int poolIdx);
/* queueAdd.c */
/* queueAddElem.c */
int msgQueueElemAdd(msgQueue *queue, msgQueueElemId newElemId);
/* queueClose.c */
int msgQueueClose(msgQueue *queue);
/* queueDelete.c */
int msgQueueElemDelete(msgQueueElemId queueElemId);
/* queueElemClose.c */
int msgQueueElemClose(msgQueueElem *queueElem);
/* queueElemCreate.c */
int msgQueueElemCreate(msgQueueElemId finalQueueElemId, msgQueueId queueId, int counter);
/* queueElemDelete.c */
int msgQueueElemDelete(msgQueueElemId queueElemId);
/* queueElemOpen.c */
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);
/* queueRemElem.c */
/* queueUnlock.c */
int queueUnlock(msgSpaceId externId, int queueIdx);
/* spaceCreate.c */

View file

@ -2,6 +2,37 @@
// on ajoute en fin de queue...
int msgQueueElemAdd(msgQueue * queue, msgQueueElemId){
int msgQueueElemAdd(msgQueue * queue, msgQueueElemId newElemId){
msgQueueElem * queueOldTailElem;
msgQueueElem * queueNewTailElem;
// on informe l'element qu'il est le dernier
queueNewTailElem=msgQueueElemOpen(newElemId);
if (queueNewTailElem == NULL){
NZG_ERROR("msgQueueElemOpen",newElemId);
goto ERROR;
}
strcpy(queueNewTailElem->next,newElemId);
if (msgQueueElemClose(queueNewTailElem)){
NZG_ERROR("msgQueueElemClose",newElemId);
goto ERROR;
}
/* TODO: verifier si la liste n'est pas vide... */
/* on informe son prédecesseur qu'il a un suivant */
queueOldTailElem=msgQueueElemOpen(queue->tailId);
if (queueOldTailElem == NULL){
NZG_ERROR("msgQueueElemOpen",queue->tailId);
goto ERROR;
}
strcpy(queueOldTailElem->next,newElemId);
if (msgQueueElemClose(queueOldTailElem)){
NZG_ERROR("msgQueueElemClose",queue->tailId);
goto ERROR;
}
// on donne a la queue l'id du dernier element
strcpy(queue->tailId,newElemId);
ERROR:
return -1;
}

View file

@ -1,8 +1,8 @@
#include "libnazgul.h"
#include "ids.h"
int msgQueueElemCreate(msgQueueElemId,
finalQueueElemId,
int msgQueueElemCreate(
msgQueueElemId finalQueueElemId ,
msgQueueId queueId,
int counter){
msgQueueElemId queueElemId;
@ -24,7 +24,7 @@ int msgQueueElemCreate(msgQueueElemId,
goto ERROR;
}
close(queueElem_Fd);
close(queueElemFd);
return 0;
ERROR:
return -1;