*** empty log message ***
This commit is contained in:
parent
bd4de043da
commit
a776db4025
1 changed files with 3 additions and 9 deletions
|
@ -97,7 +97,7 @@ msgSpace * msgSpaceCreate(
|
||||||
strerror( errno ) );
|
strerror( errno ) );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allocation de la bonne zone mémoire pour le poolData */
|
/* allocation de la bonne zone mémoire pour le poolData */
|
||||||
if (ftruncate(mSPoolDataFd, poolNb*sizeof(msgPoolData)) == -1){
|
if (ftruncate(mSPoolDataFd, poolNb*sizeof(msgPoolData)) == -1){
|
||||||
fprintf( stderr, "msgSpace resizing failed: %s\n",
|
fprintf( stderr, "msgSpace resizing failed: %s\n",
|
||||||
|
@ -109,7 +109,7 @@ msgSpace * msgSpaceCreate(
|
||||||
* - y écrire les informations passées en param
|
* - y écrire les informations passées en param
|
||||||
* - creer les zones mémoires de chacune des pool
|
* - creer les zones mémoires de chacune des pool
|
||||||
*/
|
*/
|
||||||
mSPoolDataAddr = mmap( 0, sizeof( *mSAddr ),
|
mSPoolDataAddr = mmap( 0, sizeof( *mSAddr ),
|
||||||
PROT_READ | PROT_WRITE,
|
PROT_READ | PROT_WRITE,
|
||||||
MAP_SHARED, mSFd, 0 );
|
MAP_SHARED, mSFd, 0 );
|
||||||
if( mSPoolDataAddr == MAP_FAILED ) {
|
if( mSPoolDataAddr == MAP_FAILED ) {
|
||||||
|
@ -120,7 +120,7 @@ msgSpace * msgSpaceCreate(
|
||||||
close(mSPoolDataFd);
|
close(mSPoolDataFd);
|
||||||
printf( "msgPoolData map addr is 0x%08x\n", (int)mSPoolDataAddr );
|
printf( "msgPoolData map addr is 0x%08x\n", (int)mSPoolDataAddr );
|
||||||
|
|
||||||
for (i=0;i<poolNb;i++){
|
for (i=0;i<poolNb;i++){
|
||||||
// creation d'une pool
|
// creation d'une pool
|
||||||
mSPoolDataAddr[i].bufferNb=poolInfos[i].bufferNb;
|
mSPoolDataAddr[i].bufferNb=poolInfos[i].bufferNb;
|
||||||
mSPoolDataAddr[i].bufferSize=poolInfos[i].bufferSize;
|
mSPoolDataAddr[i].bufferSize=poolInfos[i].bufferSize;
|
||||||
|
@ -130,14 +130,8 @@ msgSpace * msgSpaceCreate(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TODO: on ajoute spaceId a la liste des msgSpace connus */
|
/* TODO: on ajoute spaceId a la liste des msgSpace connus */
|
||||||
|
|
||||||
/* TODO: on crée queueNb files de messages */
|
/* TODO: on crée queueNb files de messages */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* on renvoie un pointeur sur le bon spaceId */
|
/* on renvoie un pointeur sur le bon spaceId */
|
||||||
return mSAddr;
|
return mSAddr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue