* ajout la fonction spaceListElenCreate

This commit is contained in:
rivka_zan 2004-02-23 22:19:28 +00:00
parent 913f0645f7
commit 64b6f20a79

View file

@ -1,6 +1,30 @@
#include "libnazgul.h" #include "libnazgul.h"
#include "ids.h"
// cree un nouvel elemen // cree un nouvel elemen
int msgSpaceListElemCreate(msgSpaceListElemId resultName,msgSpaceId spaceId){ int msgSpaceListElemCreate(msgSpaceListElemId elemenListId,msgSpaceId spaceId){
return 0;
int shmElemenList;
/*Creation de lid pour lespace de message*/
spaceListElemIdIntern(elemenListId,spaceId);
if ((shmElemenList=shm_open(elemenListId,
O_RDWR|O_CREAT|O_EXCL|O_TRUNC,
MSGSPACE_DEFAULT_MODE))==-1){
NZG_ERROR("shm_open:Space list creation",elemenListId);
goto ERROR;
}
if(ftruncate(shmElemenList,sizeof(elemenListId) ) <0) {
NZG_ERROR("ftruncate",elemenListId);
goto ERROR;
};
close (shmElemenList);
return 0;
ERROR:
return-1;
}; };