*** empty log message ***

This commit is contained in:
glenux 2004-02-22 09:59:56 +00:00
parent 32cf2b105f
commit 53d08b99df
2 changed files with 19 additions and 9 deletions

View file

@ -28,9 +28,9 @@ void * msgAllocate(msgSpace *space,
sem_t * ressourceSemFd=NULL;
int * ressourceSemVal=NULL;
float minPoolCoef;
int selectedIdx;
int selectedPoolIndex;
selectedIdx=-1;
selectedPoolIndex=-1;
/* TODO: verifier le premier arg du shm_open */
mSPoolDataTabFd=shm_open(space->poolDataTabId,O_RDWR,MSGSPACE_DEFAULT_MODE);
@ -90,7 +90,7 @@ void * msgAllocate(msgSpace *space,
/* choisir la 1ere pool de taille plus grande
* libre si possible */
gotRessourceSem=true;
selectedIdx=i;
selectedPoolIndex=i;
break;
}
if( sem_close(ressourceSemFd) <0){
@ -117,16 +117,16 @@ void * msgAllocate(msgSpace *space,
/* il n'y a aucune pool dont la taille satisfait la demande */
return NULL;
} else {
selectedIdx=idxPoolOptimum;
selectedPoolIndex=idxPoolOptimum;
}
}
}else {
selectedIdx=pool;
selectedPoolIndex=pool;
}
if (!gotRessourceSem){
strcpy(resultPoolId,mSPoolDataTab[selectedIdx].id);
msgPoolSemIdIntern(ressourceSemId,space->id,selectedIdx);
strcpy(resultPoolId,mSPoolDataTab[selectedPoolIndex].id);
msgPoolSemIdIntern(ressourceSemId,space->id,selectedPoolIndex);
ressourceSemFd=sem_open(ressourceSemId,O_CREAT,SEM_DEFAULT_MODE,0);
if(ressourceSemFd==SEM_FAILED){
perror("sem_open");
@ -146,12 +146,12 @@ void * msgAllocate(msgSpace *space,
/* on modifie maintenant les données */
/* - on récupere l'index du premier buffer libre */
//TODO:int bufferFreeIndex = msgBufferGetFreeIndex(space,selectedIdx);
//TODO:int bufferFreeIndex = msgBufferGetFreeIndex(space,selectedPoolIndex);
/*TODO: mapper le buffer libre dans l'esp addr du proc */
//TODO:
/* - on s'enregistre aupres de ce buffer */
//TODO: msgBufferAttachProc(space,selectedIdx,resultAddr);
//TODO: msgBufferAttachProc(space,selectedPoolIndex,resultAddr);
sem_close(poolDataTabSemFd);

View file

@ -0,0 +1,10 @@
#include "libnazgul.h"
#include "nzg_ids.h"
int msgBufferGetFreeIndex(msgSpaceId spaceId,int poolIndex){
return -1;
}
int msgBufferAttachProc(msgSpaceId spaceId,int poolIndex,void * addr){
return -1;
}