67 lines
1.3 KiB
C
67 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;
|
|
|
|
|
|
/* struct msgSpaceListElem * next; */
|
|
|
|
typedef struct MsgSpaceListElem {
|
|
void * id;
|
|
int ownerPid;
|
|
msgSpaceListElemId next;
|
|
} * msgSpaceList, msgSpaceListElem;
|
|
|
|
|
|
#endif
|
|
/* */
|