2004-02-19 09:57:25 +00:00
|
|
|
#ifndef _NZG_IFACE
|
|
|
|
#define _NZG_IFACE 1
|
|
|
|
|
2004-02-23 18:50:52 +00:00
|
|
|
#include "global.h"
|
2004-02-19 23:16:28 +00:00
|
|
|
|
|
|
|
typedef enum { true=1, false=0} bool;
|
|
|
|
|
2004-02-19 11:49:25 +00:00
|
|
|
typedef char msgSpaceId[MSGSPACE_ID_LEN];
|
2004-02-19 11:09:04 +00:00
|
|
|
|
2004-02-25 21:28:11 +00:00
|
|
|
typedef char msgSpaceListId[4*MSGSPACE_ID_LEN];
|
|
|
|
typedef char msgSpaceListSemId[4*MSGSPACE_ID_LEN];
|
2004-02-19 11:49:25 +00:00
|
|
|
typedef char msgSpaceListElemId[4*MSGSPACE_ID_LEN];
|
2004-02-19 11:11:33 +00:00
|
|
|
|
2004-02-21 18:50:38 +00:00
|
|
|
typedef char msgPoolDataTabId[4*MSGSPACE_ID_LEN];
|
|
|
|
typedef char msgPoolDataTabSemId[4*MSGSPACE_ID_LEN];
|
2004-02-21 14:46:24 +00:00
|
|
|
|
2004-02-22 11:19:08 +00:00
|
|
|
typedef char msgBufferInfoTabId[4*MSGSPACE_ID_LEN];
|
|
|
|
|
2004-02-21 13:17:47 +00:00
|
|
|
typedef char msgPoolId[4*MSGSPACE_ID_LEN];
|
2004-02-21 14:46:24 +00:00
|
|
|
typedef char msgPoolSemId[4*MSGSPACE_ID_LEN];
|
2004-02-21 13:17:47 +00:00
|
|
|
|
|
|
|
typedef char msgQueueDataId[4*MSGSPACE_ID_LEN];
|
|
|
|
typedef char msgQueueId[4*MSGSPACE_ID_LEN];
|
2004-02-23 20:06:56 +00:00
|
|
|
typedef char msgQueueElemId[4*MSGSPACE_ID_LEN];
|
2004-02-23 18:50:52 +00:00
|
|
|
typedef char msgQueueSemId[4*MSGSPACE_ID_LEN];
|
2004-02-17 15:44:20 +00:00
|
|
|
|
2004-02-19 11:06:03 +00:00
|
|
|
/* pid[] */
|
|
|
|
/* liste des processus demandeurs */
|
2004-02-17 15:44:20 +00:00
|
|
|
typedef struct MsgPool {
|
2004-02-19 21:21:52 +00:00
|
|
|
int bufferSize;
|
|
|
|
int bufferNb;
|
|
|
|
} msgPool;
|
|
|
|
|
2004-02-22 11:19:08 +00:00
|
|
|
typedef struct MsgBufferInfo {
|
|
|
|
pid_t ownerPid;
|
|
|
|
void * addr;
|
|
|
|
} msgBufferInfo;
|
|
|
|
|
2004-02-19 21:21:52 +00:00
|
|
|
typedef struct MsgPoolData {
|
2004-02-23 11:02:15 +00:00
|
|
|
msgPoolId poolId;
|
2004-02-22 11:19:08 +00:00
|
|
|
msgBufferInfoTabId bufferInfoTabId;
|
2004-02-19 11:03:55 +00:00
|
|
|
int bufferNb;
|
|
|
|
int bufferSize;
|
|
|
|
int allocDispBuffer;
|
2004-02-19 21:21:52 +00:00
|
|
|
} msgPoolData;
|
2004-02-17 15:44:20 +00:00
|
|
|
|
2004-02-19 11:06:03 +00:00
|
|
|
/* TODO: queueId */
|
|
|
|
|
2004-02-19 23:16:28 +00:00
|
|
|
|
2004-02-17 15:44:20 +00:00
|
|
|
typedef struct MsgSpace {
|
2004-02-19 11:03:55 +00:00
|
|
|
msgSpaceId id;
|
2004-02-23 23:19:04 +00:00
|
|
|
msgSpaceId externId;
|
2004-02-19 11:03:55 +00:00
|
|
|
int poolNb;
|
|
|
|
int queueNb;
|
2004-02-19 21:07:57 +00:00
|
|
|
int pid;
|
2004-02-21 18:50:38 +00:00
|
|
|
msgPoolDataTabId poolDataTabId;
|
|
|
|
msgPoolDataTabSemId poolDataTabSemId;
|
2004-02-17 15:44:20 +00:00
|
|
|
} msgSpace;
|
|
|
|
|
2004-02-16 21:25:11 +00:00
|
|
|
|
2004-02-19 09:57:25 +00:00
|
|
|
typedef struct MsgSpaceListElem {
|
2004-02-25 17:54:51 +00:00
|
|
|
msgSpaceListElemId id;
|
|
|
|
|
2004-02-24 08:57:52 +00:00
|
|
|
msgSpaceId spaceId;
|
2004-02-22 22:11:59 +00:00
|
|
|
msgSpaceListElemId next;
|
|
|
|
} msgSpaceListElem;
|
|
|
|
|
|
|
|
typedef struct MsgSpaceList {
|
2004-02-25 17:54:51 +00:00
|
|
|
msgSpaceListId id;
|
|
|
|
|
2004-02-22 22:11:59 +00:00
|
|
|
int elemCounter;
|
2004-02-25 17:54:51 +00:00
|
|
|
msgSpaceListElemId headId;
|
|
|
|
msgSpaceListElemId tailId;
|
2004-02-22 22:17:38 +00:00
|
|
|
} msgSpaceList;
|
2004-02-19 10:11:29 +00:00
|
|
|
|
2004-02-23 20:05:30 +00:00
|
|
|
typedef struct MsgQueueElem {
|
2004-02-23 20:53:09 +00:00
|
|
|
msgQueueElemId id;
|
2004-02-23 20:05:30 +00:00
|
|
|
int poolIndex;
|
|
|
|
int bufferIndex;
|
|
|
|
msgQueueElemId next;
|
|
|
|
} msgQueueElem;
|
|
|
|
|
2004-02-23 20:06:56 +00:00
|
|
|
typedef struct MsgQueue {
|
2004-02-23 20:22:15 +00:00
|
|
|
msgQueueId id;
|
2004-02-23 20:05:30 +00:00
|
|
|
int elemCounter;
|
2004-02-23 21:35:16 +00:00
|
|
|
msgQueueElemId headId;
|
|
|
|
msgQueueElemId tailId;
|
2004-02-23 20:05:30 +00:00
|
|
|
} msgQueue;
|
|
|
|
|
2004-02-19 09:57:25 +00:00
|
|
|
#endif
|
2004-02-16 21:25:11 +00:00
|
|
|
/* */
|