*** empty log message ***

This commit is contained in:
glenux 2004-02-25 08:13:09 +00:00 committed by Glenn Y. Rolland
parent 1aa93c9e9a
commit 6b13edc905

View file

@ -181,37 +181,27 @@ void * msgAllocate(msgSpace *space,
strcpy(resultPoolId,mSPoolDataTabAddr[selectedPoolIndex].poolId);
mSPoolFd=shm_open(resultPoolId,O_RDWR,MSGSPACE_DEFAULT_MODE);
/* mSPoolFd=shm_open(resultPoolId,O_RDWR,MSGSPACE_DEFAULT_MODE); */
int bufferFreeSize;
bufferFreeSize=mSPoolDataTabAddr[selectedPoolIndex].bufferSize;
printf("BufferSize : %d", bufferFreeSize);
<<<<<<< allocate.c
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);
// mprotect(resultAddr,bufferFreeSize*bufferNb,PROT_NONE);
mprotect(resultAddr,bufferFreeSize*(bufferFreeIndex+1),PROT_READ|PROT_WRITE);
//mprotect(resultAddr,bufferFreeSize*bufferFreeIndex,PROT_NONE);
resultAddr=resultAddr +( bufferFreeSize*bufferFreeIndex);
if( resultAddr == MAP_FAILED) {
NZG_ERROR("resultAddr mmap","");
resultAddr=msgBufferMap(mSPoolDataTabAddr,selectedPoolIndex,bufferFreeIndex);
if (resultAddr==NULL){
NZG_ERROR("msgBufferMap",mSPoolDataTabAddr[selectedPoolIndex].poolId);
goto ERROR;
}
//TODO:
/* - on s'enregistre aupres de ce buffer */
msgBufferAttachProc(mSPoolDataTabAddr,
selectedPoolIndex,
bufferFreeIndex,
resultAddr);
close(mSPoolFd);
/* close(mSPoolFd); */
msgPoolDataTabUnlock(space);