*** empty log message ***
This commit is contained in:
parent
c5cdd5b081
commit
f4b6e7d65a
9 changed files with 6 additions and 4 deletions
|
@ -196,14 +196,14 @@ void * msgAllocate(msgSpace *space,
|
|||
// on mappe la totalité du pool
|
||||
resultAddr = mmap( NULL,
|
||||
bufferFreeSize,
|
||||
PROT_READ | PROT_WRITE,
|
||||
PROT_NONE, //prot PROT_READ | PROT_WRITE
|
||||
MAP_SHARED, mSPoolFd,
|
||||
(off_t)0);
|
||||
int bufferNb=mSPoolDataTabAddr[selectedPoolIndex].bufferNb;
|
||||
|
||||
mprotect(resultAddr,bufferFreeSize*bufferNb,PROT_NONE);
|
||||
// mprotect(resultAddr,bufferFreeSize*bufferNb,PROT_NONE);
|
||||
mprotect(resultAddr,bufferFreeSize*(bufferFreeIndex+1),PROT_READ|PROT_WRITE);
|
||||
mprotect(resultAddr,bufferFreeSize*bufferFreeIndex,PROT_NONE);
|
||||
//mprotect(resultAddr,bufferFreeSize*bufferFreeIndex,PROT_NONE);
|
||||
resultAddr=resultAddr +( bufferFreeSize*bufferFreeIndex);
|
||||
|
||||
if( resultAddr == MAP_FAILED) {
|
||||
|
|
0
src/nzg_queueAdd.c
Normal file
0
src/nzg_queueAdd.c
Normal file
0
src/nzg_queueAddElem.c
Normal file
0
src/nzg_queueAddElem.c
Normal file
0
src/nzg_queueDelete.c
Normal file
0
src/nzg_queueDelete.c
Normal file
0
src/nzg_queueInit.c
Normal file
0
src/nzg_queueInit.c
Normal file
0
src/nzg_queueLock.c
Normal file
0
src/nzg_queueLock.c
Normal file
0
src/nzg_queueRemElem.c
Normal file
0
src/nzg_queueRemElem.c
Normal file
0
src/nzg_queueUnlock.c
Normal file
0
src/nzg_queueUnlock.c
Normal file
|
@ -40,9 +40,11 @@ int main(void) {
|
|||
mSPAC=msgSpaceOpen(testId);
|
||||
montext=msgAllocate(mSPAC,2,280,0);
|
||||
*montext=42;
|
||||
printf("### test Valeur %d ###\n",(int)*montext);
|
||||
printf("### test Valeur0 %d ###\n",(int)*montext);
|
||||
sleep(2);
|
||||
montext=msgAllocate(mSPAC,2,270,0);
|
||||
*montext=17;
|
||||
printf("### test Valeur1 %d ###\n",(int)*montext);
|
||||
sleep(2);
|
||||
montext=msgAllocate(mSPAC,2,270,0);
|
||||
msgFree(mSPAC,(void *)montext);
|
||||
|
|
Loading…
Reference in a new issue