c'est mieux comme ca...

This commit is contained in:
stormrider1982 2004-02-25 08:08:31 +00:00 committed by Glenn Y. Rolland
parent d7030895ab
commit 1aa93c9e9a
2 changed files with 3 additions and 2 deletions

View file

@ -187,13 +187,13 @@ void * msgAllocate(msgSpace *space,
bufferFreeSize=mSPoolDataTabAddr[selectedPoolIndex].bufferSize;
printf("BufferSize : %d", bufferFreeSize);
bufferNb=mSPoolDataTabAddr[selectedPoolIndex].bufferNb;
// on mappe la totalité du pool
resultAddr = mmap( NULL,
bufferFreeSize*bufferNb, /* bufferFreeSize*/
PROT_NONE, //prot PROT_READ | PROT_WRITE
MAP_SHARED, mSPoolFd,
(off_t)0);
bufferNb=mSPoolDataTabAddr[selectedPoolIndex].bufferNb;
// mprotect(resultAddr,bufferFreeSize*bufferNb,PROT_NONE);
mprotect(resultAddr,bufferFreeSize*(bufferFreeIndex+1),PROT_READ|PROT_WRITE);

View file

@ -21,6 +21,7 @@ int msgPut(msgSpace * space,int queueIndex, void * addr){
msgQueueId queueId;
msgQueue * queue;
msgQueueIdIntern(queueId,space->externId,queueIndex);
msgQueueProtLock(space->externId,queueIndex);
queue = msgQueueOpen(queueId);