l3.libnazgul/src/nzg_iface.h
2020-03-03 23:46:32 +01:00

70 lines
1.3 KiB
C

#ifndef _NZG_IFACE
#define _NZG_IFACE 1
#include "nzg_global.h"
typedef enum { true=1, false=0} bool;
typedef char msgSpaceId[MSGSPACE_ID_LEN];
typedef char msgSpaceListId[4*MSGSPACE_ID_LEN];
typedef char msgSpaceListElemId[4*MSGSPACE_ID_LEN];
typedef char msgPoolDataTabId[4*MSGSPACE_ID_LEN];
typedef char msgPoolDataTabSemId[4*MSGSPACE_ID_LEN];
typedef char msgBufferInfoTabId[4*MSGSPACE_ID_LEN];
typedef char msgPoolId[4*MSGSPACE_ID_LEN];
typedef char msgPoolSemId[4*MSGSPACE_ID_LEN];
typedef char msgQueueDataId[4*MSGSPACE_ID_LEN];
typedef char msgQueueId[4*MSGSPACE_ID_LEN];
/* pid[] */
/* liste des processus demandeurs */
typedef struct MsgPool {
int bufferSize;
int bufferNb;
} msgPool;
typedef struct MsgBufferInfo {
pid_t ownerPid;
void * addr;
} msgBufferInfo;
typedef struct MsgPoolData {
msgPoolId id;
msgBufferInfoTabId bufferInfoTabId;
int bufferNb;
int bufferSize;
int allocDispBuffer;
} msgPoolData;
/* TODO: queueId */
typedef struct MsgSpace {
msgSpaceId id;
int poolNb;
int queueNb;
int pid;
msgPoolDataTabId poolDataTabId;
msgPoolDataTabSemId poolDataTabSemId;
} msgSpace;
typedef struct MsgSpaceListElem {
int ownerPid;
msgSpaceListElemId next;
} msgSpaceListElem;
typedef struct MsgSpaceList {
int elemCounter;
msgSpaceListElemId first;
msgSpaceListElemId last;
} msgSpaceList;
#endif
/* */