From 9718406b735980dc90d989a6196063dc04e161cb Mon Sep 17 00:00:00 2001 From: glenux Date: Mon, 23 Feb 2004 18:50:52 +0000 Subject: [PATCH] * correction de la dependance aux .h --- src/allocate.c | 2 +- src/bufferInfoTabCreate.c | 2 +- src/ids.c | 2 +- src/ids.h | 1 - src/iface.h | 3 ++- src/libnazgul.h | 6 +++--- src/poolCreate.c | 2 +- src/poolDelete.c | 2 +- src/queueLock.c | 14 ++++++++++++++ src/queueUnlock.c | 5 +++++ src/spaceCreate.c | 2 +- src/spaceDelete.c | 2 +- src/spaceOpen.c | 2 +- 13 files changed, 32 insertions(+), 13 deletions(-) diff --git a/src/allocate.c b/src/allocate.c index 36c98d5..d4ee11e 100644 --- a/src/allocate.c +++ b/src/allocate.c @@ -1,5 +1,5 @@ #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" /* TODO: remplacer le bool de msgPoolData par un identifiant de semaphore. Le semaphore contient poolNb valeurs (et indique diff --git a/src/bufferInfoTabCreate.c b/src/bufferInfoTabCreate.c index 6d716da..06b0037 100644 --- a/src/bufferInfoTabCreate.c +++ b/src/bufferInfoTabCreate.c @@ -1,5 +1,5 @@ #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" int msgBufferInfoTabCreate( msgSpaceId externId, diff --git a/src/ids.c b/src/ids.c index 3a17866..88247d6 100644 --- a/src/ids.c +++ b/src/ids.c @@ -2,7 +2,7 @@ #define _NZG_IDS 1 #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" int msgSpaceIdIntern(msgSpaceId dest,const msgSpaceId src ){ if (strlen(src)>MSGSPACE_ID_LEN){ diff --git a/src/ids.h b/src/ids.h index 63a1b15..6dcd08c 100644 --- a/src/ids.h +++ b/src/ids.h @@ -2,7 +2,6 @@ #define _NZG_IDS 1 #include "libnazgul.h" -#include "nzg_ids.h" /* nzg_ids.c */ int msgSpaceIdIntern(msgSpaceId dest, const msgSpaceId src); diff --git a/src/iface.h b/src/iface.h index cdc2864..863b5a4 100644 --- a/src/iface.h +++ b/src/iface.h @@ -1,7 +1,7 @@ #ifndef _NZG_IFACE #define _NZG_IFACE 1 -#include "nzg_global.h" +#include "global.h" typedef enum { true=1, false=0} bool; @@ -21,6 +21,7 @@ typedef char msgPoolSemId[4*MSGSPACE_ID_LEN]; typedef char msgQueueDataId[4*MSGSPACE_ID_LEN]; typedef char msgQueueId[4*MSGSPACE_ID_LEN]; +typedef char msgQueueSemId[4*MSGSPACE_ID_LEN]; /* pid[] */ /* liste des processus demandeurs */ diff --git a/src/libnazgul.h b/src/libnazgul.h index ef5a98a..c7d47b2 100644 --- a/src/libnazgul.h +++ b/src/libnazgul.h @@ -1,8 +1,8 @@ #ifndef _LIBNAZGUL #define _LIBNAZGUL 1 -#include "nzg_global.h" -#include "nzg_iface.h" -#include "nzg_proto.h" +#include "global.h" +#include "iface.h" +#include "proto.h" #endif diff --git a/src/poolCreate.c b/src/poolCreate.c index 41deaa4..f23d218 100644 --- a/src/poolCreate.c +++ b/src/poolCreate.c @@ -1,5 +1,5 @@ #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" int msgPoolCreate( msgSpaceId externId, diff --git a/src/poolDelete.c b/src/poolDelete.c index 70c9316..4fcecb2 100644 --- a/src/poolDelete.c +++ b/src/poolDelete.c @@ -1,5 +1,5 @@ #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" int msgPoolDelete( msgSpaceId spaceId, diff --git a/src/queueLock.c b/src/queueLock.c index e69de29..879af78 100644 --- a/src/queueLock.c +++ b/src/queueLock.c @@ -0,0 +1,14 @@ +#include "libnazgul.h" + +int queueLock(msgSpaceId spaceid,int queueIdx){ + sem_t * queueSemFd; + msgQueueSemId queueSemId; + + queueSemFd=sem_open(queueSemId,O_CREAT|O_EXCL,0666,1); + if(queueSemFd==SEM_FAILED){ + NZG_ERROR("sem_open",queueSemId); + return -1; + } + return -1; +} + diff --git a/src/queueUnlock.c b/src/queueUnlock.c index e69de29..46f702d 100644 --- a/src/queueUnlock.c +++ b/src/queueUnlock.c @@ -0,0 +1,5 @@ +#include "libnazgul.h" + +int queueUnlock(msgSpaceId spaceid,int queueIdx){ + return -1; +} diff --git a/src/spaceCreate.c b/src/spaceCreate.c index ec64ac6..4564e78 100644 --- a/src/spaceCreate.c +++ b/src/spaceCreate.c @@ -1,5 +1,5 @@ #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" /* prototypes des fonctions annexes à ne pas exporter */ int msgSpaceIdIntern(msgSpaceId dest,const msgSpaceId src ); diff --git a/src/spaceDelete.c b/src/spaceDelete.c index f7e9247..43fd717 100644 --- a/src/spaceDelete.c +++ b/src/spaceDelete.c @@ -1,5 +1,5 @@ #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" /* prototypes des fonctions annexes à ne pas exporter */ int msgSpaceIdIntern(msgSpaceId dest,const msgSpaceId src ); diff --git a/src/spaceOpen.c b/src/spaceOpen.c index ec21eeb..d04ccf7 100644 --- a/src/spaceOpen.c +++ b/src/spaceOpen.c @@ -1,5 +1,5 @@ #include "libnazgul.h" -#include "nzg_ids.h" +#include "ids.h" /* prototypes des fonctions annexes à ne pas exporter */ int msgSpaceIdIntern(msgSpaceId dest,const msgSpaceId src );