*** empty log message ***
This commit is contained in:
parent
c1bff73555
commit
240e5f1410
1 changed files with 22 additions and 0 deletions
|
@ -2,4 +2,26 @@
|
|||
#include "ids.h"
|
||||
|
||||
int msgQueueElemCreate(msgQueueId queueId,int counter){
|
||||
msgQueueElemId queueElemId;
|
||||
|
||||
msgQueueElemIdIntern(queueElemId,queueId,counter);
|
||||
|
||||
int queueElemFd;
|
||||
queueElemFd=shm_open(queueElemId,
|
||||
O_RDWR|O_CREAT|O_EXCL|O_TRUNC,
|
||||
SHM_DEFAULT_MODE);
|
||||
if (queueElemFd == -1 ) {
|
||||
NZG_ERROR("shm_open : msgQueueElem creation",queueElemId);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
if (ftruncate(queueElemFd, sizeof(msgQueueElem)) < 0){
|
||||
NZG_ERROR("ftruncate", queueElemId);
|
||||
goto ERROR;
|
||||
}
|
||||
|
||||
close(queueElem_Fd);
|
||||
return 0;
|
||||
ERROR:
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue