*** empty log message ***

This commit is contained in:
glenux 2004-02-17 19:32:44 +00:00
parent e3c550be4c
commit 6889c36e2c
2 changed files with 21 additions and 16 deletions

View file

@ -21,15 +21,10 @@ msgSpace * msgSpaceCreate(
int poolNb, // nombre de pool de buffers
msgPool * queueNbCar // tableau de caracteristiques des different pool
){
int shmId;
printf("PAGESIZE : %d\n",(int)PAGESIZE);
// on créee
char * nzgId;
int slen;
int shmId;
slen=strlen(spaceId);
nzgId = (char *)malloc(sizeof(char)*(slen+4));
sprintf(nzgId,"/NZG%s",spaceId);
msgSpaceId nzgId=msgSp2nzgId(spaceId);
if ((shmId=shm_open(nzgId,O_RDWR,MSGSPACE_DEFAULT_MODE)) < 0){
perror("shm_open");
return NULL;
@ -52,12 +47,8 @@ msgSpace * msgSpaceCreate(
msgSpace * msgSpaceOpen(msgSpaceId spaceId){
char * nzgId;
int slen;
int shmId;
slen=strlen(spaceId);
nzgId = (char *)malloc(sizeof(char)*(slen+4));
sprintf(nzgId,"/NZG%s",spaceId);
char * nzgId=msgSp2nzgId(spaceId);
if ((shmId=shm_open(nzgId,O_RDWR,MSGSPACE_DEFAULT_MODE)) < 0){
perror("shm_open");
return NULL;
@ -66,7 +57,15 @@ msgSpace * msgSpaceOpen(msgSpaceId spaceId){
}
void msgSpaceDelete(msgSpaceId spaceId){
//
int shmId;
char * nzgId=msgSp2nzgId(spaceId);
}
msgSpaceId msgSp2nzgId(msgSpaceId spaceId){
char * resNzgId;
int slen;
slen=strlen(spaceId);
resNzgId = (char *)malloc(sizeof(char)*(slen+4));
sprintf(resNzgId,"/NZG%s",(char *)spaceId);
return ((msgSpaceId)resNzgId);
}

View file

@ -8,11 +8,17 @@ msgSpace * msgSpaceCreate(
msgPool * queueNbCar // tableau de caracteristiques des different pool
);
msgSpace * msgSpaceOpen(msgSpaceId spaceId);
void * msgAllocate(
msgSpace * space, //espace de message concerné
int pool, //numéro de pool ou réaliser l'allocation
int taille, //si l'argument précédent est ANYPOOL, taille requise
int option // 0 ou NONBLOCK
);
/* nzg_create.c */
msgSpace *msgSpaceCreate(msgSpaceId spaceId, int queueNb, int poolNb, msgPool *queueNbCar);
msgSpace *msgSpaceOpen(msgSpaceId spaceId);
void msgSpaceDelete(msgSpaceId spaceId);
msgSpaceId msgSp2nzgId(msgSpaceId spaceId);