encore moi ;)
This commit is contained in:
parent
63651b23c8
commit
ee405dbe4e
1 changed files with 2 additions and 1 deletions
|
@ -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; }
|
||||||
|
|
Loading…
Reference in a new issue