l3.libnazgul/src/nzg_iface.h

73 lines
1.4 KiB
C
Raw Normal View History

2019-09-16 15:15:37 +00:00
#ifndef _NZG_IFACE
#define _NZG_IFACE 1
2020-03-03 22:42:59 +00:00
#include "nzg_global.h"
2004-02-19 23:16:28 +00:00
typedef enum { true=1, false=0} bool;
typedef char msgSpaceId[MSGSPACE_ID_LEN];
2019-09-17 06:58:16 +00:00
typedef char msgSpaceListId[4*MSGSPACE_ID_LEN];
typedef char msgSpaceListElemId[4*MSGSPACE_ID_LEN];
2019-09-17 06:58:16 +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];
2019-09-16 14:43:39 +00:00
2019-09-17 06:58:16 +00:00
/* pid[] */
/* liste des processus demandeurs */
2019-09-16 14:43:39 +00:00
typedef struct MsgPool {
2019-09-17 12:17:58 +00:00
int bufferSize;
int bufferNb;
} msgPool;
2004-02-22 11:19:08 +00:00
typedef struct MsgBufferInfo {
pid_t ownerPid;
void * addr;
} msgBufferInfo;
2019-09-17 12:17:58 +00:00
typedef struct MsgPoolData {
2004-02-21 13:17:47 +00:00
msgPoolId id;
2004-02-22 11:19:08 +00:00
msgBufferInfoTabId bufferInfoTabId;
2019-09-17 06:58:16 +00:00
int bufferNb;
int bufferSize;
int allocDispBuffer;
2019-09-17 12:17:58 +00:00
} msgPoolData;
2019-09-16 14:43:39 +00:00
2019-09-17 06:58:16 +00:00
/* TODO: queueId */
2004-02-19 23:16:28 +00:00
2019-09-16 14:43:39 +00:00
typedef struct MsgSpace {
2019-09-17 06:58:16 +00:00
msgSpaceId id;
int poolNb;
int queueNb;
2019-09-17 12:16:29 +00:00
int pid;
msgPoolDataTabId poolDataTabId;
msgPoolDataTabSemId poolDataTabSemId;
2019-09-16 14:43:39 +00:00
} msgSpace;
2004-02-16 21:25:11 +00:00
2004-02-22 22:15:33 +00:00
/* struct msgSpaceListElem * next; */
2019-09-16 15:15:37 +00:00
typedef struct MsgSpaceListElem {
// void * id;
2019-09-16 15:15:37 +00:00
int ownerPid;
2004-02-22 22:11:59 +00:00
msgSpaceListElemId next;
} msgSpaceListElem;
typedef struct MsgSpaceList {
int elemCounter;
msgSpaceListElemId first;
msgSpaceListElemId last;
} msgSpaceList,
2019-09-16 15:15:37 +00:00
#endif
2004-02-16 21:25:11 +00:00
/* */