allé, on remet les déclarations de variables au début ;)
This commit is contained in:
parent
8ee07b027e
commit
b31b15f4df
1 changed files with 4 additions and 2 deletions
|
@ -26,9 +26,12 @@ void * msgAllocate(msgSpace *space,
|
||||||
msgPoolDataTabSemId ressourceSemId;
|
msgPoolDataTabSemId ressourceSemId;
|
||||||
sem_t * ressourceSemFd;
|
sem_t * ressourceSemFd;
|
||||||
int ressourceSemVal;
|
int ressourceSemVal;
|
||||||
|
int nbLockedSem;
|
||||||
float minPoolCoef;
|
float minPoolCoef;
|
||||||
int selectedPoolIndex;
|
int selectedPoolIndex;
|
||||||
int bufferFreeIndex;
|
int bufferFreeIndex;
|
||||||
|
msgPoolData * mSPoolDataTabAddr;
|
||||||
|
|
||||||
|
|
||||||
selectedPoolIndex=-1;
|
selectedPoolIndex=-1;
|
||||||
|
|
||||||
|
@ -52,7 +55,6 @@ void * msgAllocate(msgSpace *space,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
msgPoolData * mSPoolDataTabAddr;
|
|
||||||
|
|
||||||
mSPoolDataTabAddr = mmap( 0, (space->poolNb) * sizeof( msgPoolData ),
|
mSPoolDataTabAddr = mmap( 0, (space->poolNb) * sizeof( msgPoolData ),
|
||||||
PROT_READ | PROT_WRITE,
|
PROT_READ | PROT_WRITE,
|
||||||
|
@ -71,7 +73,7 @@ void * msgAllocate(msgSpace *space,
|
||||||
semPoolCoef[i]=-1;
|
semPoolCoef[i]=-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nbLockedSem=0;
|
nbLockedSem=0;
|
||||||
if ( pool == ANYPOOL){
|
if ( pool == ANYPOOL){
|
||||||
fprintf(stderr,"[ ALLOCATION ANYPOOL : %d ]\n",(int)getpid());
|
fprintf(stderr,"[ ALLOCATION ANYPOOL : %d ]\n",(int)getpid());
|
||||||
// choisir le pool au hasard (ou presque)
|
// choisir le pool au hasard (ou presque)
|
||||||
|
|
Loading…
Reference in a new issue