encore moi ;)

This commit is contained in:
stormrider1982 2004-02-23 11:18:35 +00:00 committed by Glenn Y. Rolland
parent 63651b23c8
commit ee405dbe4e

View file

@ -6,6 +6,7 @@ int bufferInfoTabFd;
msgBufferInfo * bufferInfoTabAddr; msgBufferInfo * bufferInfoTabAddr;
int bufferInfoNb; int bufferInfoNb;
int bufferFreeIndex; int bufferFreeIndex;
int i;
//récuperer l'ID du BufferInfoTab; //récuperer l'ID du BufferInfoTab;
strcpy(bufferInfoTabId, poolDataTabAddr[poolIndex].bufferInfoTabId); strcpy(bufferInfoTabId, poolDataTabAddr[poolIndex].bufferInfoTabId);
@ -21,7 +22,7 @@ int bufferFreeIndex;
bufferInfoTabAddr=mmap(NULL,bufferInfoNb*sizeof(msgBufferInfo), bufferInfoTabAddr=mmap(NULL,bufferInfoNb*sizeof(msgBufferInfo),
PROT_READ,MAP_SHARED,bufferInfoTabFd,(off_t)0); PROT_READ,MAP_SHARED,bufferInfoTabFd,(off_t)0);
int i=0; i=0;
while ((i<bufferInfoNb) while ((i<bufferInfoNb)
&& (bufferInfoTabAddr[i].ownerPid != (pid_t)-1)){ i++; } && (bufferInfoTabAddr[i].ownerPid != (pid_t)-1)){ i++; }
if (i == bufferInfoNb){ return -1; } if (i == bufferInfoNb){ return -1; }