ca devrait etre bon pour les decla de variables...
This commit is contained in:
parent
7a95881363
commit
e8799963df
3 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,8 @@ int msgBufferInfoTabInit(msgPoolData * poolDataTabAddr,int poolIndex){
|
||||||
msgBufferInfoTabId bufferInfoTabId;
|
msgBufferInfoTabId bufferInfoTabId;
|
||||||
int bufferInfoTabFd;
|
int bufferInfoTabFd;
|
||||||
msgBufferInfo * bufferInfoTabAddr;
|
msgBufferInfo * bufferInfoTabAddr;
|
||||||
int bufferInfoNb;
|
int bufferInfoNb;
|
||||||
|
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,6 @@ int bufferInfoNb;
|
||||||
bufferInfoTabAddr=mmap(NULL,bufferInfoNb*sizeof(msgBufferInfo),
|
bufferInfoTabAddr=mmap(NULL,bufferInfoNb*sizeof(msgBufferInfo),
|
||||||
PROT_WRITE|PROT_READ,MAP_SHARED,bufferInfoTabFd,(off_t)0);
|
PROT_WRITE|PROT_READ,MAP_SHARED,bufferInfoTabFd,(off_t)0);
|
||||||
|
|
||||||
int i;
|
|
||||||
for (i=0;i<bufferInfoNb;i++){
|
for (i=0;i<bufferInfoNb;i++){
|
||||||
bufferInfoTabAddr[i].ownerPid = (pid_t)-1;
|
bufferInfoTabAddr[i].ownerPid = (pid_t)-1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ msgSpace * msgSpaceCreate(
|
||||||
msgPoolData * mSPoolDataAddr;
|
msgPoolData * mSPoolDataAddr;
|
||||||
msgBufferInfoTabId bufferInfoTabId;
|
msgBufferInfoTabId bufferInfoTabId;
|
||||||
msgPoolId poolId;
|
msgPoolId poolId;
|
||||||
sem_t * mSDataTabSemFd;
|
sem_t * mSDataTabSemFd;
|
||||||
|
|
||||||
mSIdNum++;
|
mSIdNum++;
|
||||||
mSAddr=NULL;
|
mSAddr=NULL;
|
||||||
|
|
|
@ -10,6 +10,7 @@ int msgSpaceDelete(msgSpaceId externId){
|
||||||
//int shmId;
|
//int shmId;
|
||||||
msgSpaceId nzgId;
|
msgSpaceId nzgId;
|
||||||
msgSpace * space;
|
msgSpace * space;
|
||||||
|
int i;
|
||||||
if (msgSpaceIdIntern(nzgId,externId) == -1){
|
if (msgSpaceIdIntern(nzgId,externId) == -1){
|
||||||
//TODO: message d'erreur
|
//TODO: message d'erreur
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -17,7 +18,6 @@ int msgSpaceDelete(msgSpaceId externId){
|
||||||
|
|
||||||
space = msgSpaceOpen(externId);
|
space = msgSpaceOpen(externId);
|
||||||
/* TODO: supprimer chaque pool */
|
/* TODO: supprimer chaque pool */
|
||||||
int i;
|
|
||||||
for (i=0;i<space->poolNb;i++){
|
for (i=0;i<space->poolNb;i++){
|
||||||
msgPoolDelete(externId,i);
|
msgPoolDelete(externId,i);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue