*** 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); 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; int bufferFreeSize;
bufferFreeSize=mSPoolDataTabAddr[selectedPoolIndex].bufferSize; bufferFreeSize=mSPoolDataTabAddr[selectedPoolIndex].bufferSize;
printf("BufferSize : %d", bufferFreeSize); printf("BufferSize : %d", bufferFreeSize);
<<<<<<< allocate.c
bufferNb=mSPoolDataTabAddr[selectedPoolIndex].bufferNb; resultAddr=msgBufferMap(mSPoolDataTabAddr,selectedPoolIndex,bufferFreeIndex);
// on mappe la totalité du pool if (resultAddr==NULL){
resultAddr = mmap( NULL, NZG_ERROR("msgBufferMap",mSPoolDataTabAddr[selectedPoolIndex].poolId);
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","");
goto ERROR; goto ERROR;
} }
//TODO: //TODO:
/* - on s'enregistre aupres de ce buffer */ /* - on s'enregistre aupres de ce buffer */
msgBufferAttachProc(mSPoolDataTabAddr, msgBufferAttachProc(mSPoolDataTabAddr,
selectedPoolIndex, selectedPoolIndex,
bufferFreeIndex, bufferFreeIndex,
resultAddr); resultAddr);
close(mSPoolFd); /* close(mSPoolFd); */
msgPoolDataTabUnlock(space); msgPoolDataTabUnlock(space);