*** empty log message ***

This commit is contained in:
glenux 2004-02-25 08:13:09 +00:00
parent 8bcb94ec42
commit 4d535fd155

View file

@ -181,29 +181,19 @@ 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;
// on mappe la totalité du pool resultAddr=msgBufferMap(mSPoolDataTabAddr,selectedPoolIndex,bufferFreeIndex);
resultAddr = mmap( NULL, if (resultAddr==NULL){
bufferFreeSize*bufferNb, /* bufferFreeSize*/ NZG_ERROR("msgBufferMap",mSPoolDataTabAddr[selectedPoolIndex].poolId);
PROT_NONE, //prot PROT_READ | PROT_WRITE goto ERROR;
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;
}
//TODO: //TODO:
/* - on s'enregistre aupres de ce buffer */ /* - on s'enregistre aupres de ce buffer */
@ -211,7 +201,7 @@ void * msgAllocate(msgSpace *space,
selectedPoolIndex, selectedPoolIndex,
bufferFreeIndex, bufferFreeIndex,
resultAddr); resultAddr);
close(mSPoolFd); /* close(mSPoolFd); */
msgPoolDataTabUnlock(space); msgPoolDataTabUnlock(space);