From e27b96d956dca9e5931056c4317aa67573b52902 Mon Sep 17 00:00:00 2001 From: glenux Date: Sun, 22 Feb 2004 17:49:02 +0000 Subject: [PATCH] *** empty log message *** --- src/nzg_allocate.c | 2 -- src/nzg_global.h | 3 +++ test/create_delete.c | 9 ++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/nzg_allocate.c b/src/nzg_allocate.c index f509af0..8e1efd9 100644 --- a/src/nzg_allocate.c +++ b/src/nzg_allocate.c @@ -7,8 +7,6 @@ */ -#define ANYPOOL -1 -#define SPECIFICPOOL 0 void * msgAllocate(msgSpace *space, int pool, diff --git a/src/nzg_global.h b/src/nzg_global.h index 74c4700..0d3ffe6 100644 --- a/src/nzg_global.h +++ b/src/nzg_global.h @@ -18,6 +18,9 @@ #define MSGSPACE_ID_LEN 32 #define ERR_UNHANDLED "Gérer mieu les erreurs" +#define ANYPOOL -1 +#define SPECIFICPOOL 0 + #ifndef SEM_FAILED #define SEM_FAILED ((sem_t *)0) #endif diff --git a/test/create_delete.c b/test/create_delete.c index 4f49951..57a56eb 100644 --- a/test/create_delete.c +++ b/test/create_delete.c @@ -5,7 +5,7 @@ int main(void) { msgSpaceId testId; msgSpace * mSPAC; - msgPool poolInfos[2]; + msgPool poolInfos[3]; char * montext; poolInfos[0].bufferNb=4; @@ -13,13 +13,16 @@ int main(void) { poolInfos[1].bufferNb=5; poolInfos[1].bufferSize=250; + + poolInfos[2].bufferNb=3; + poolInfos[2].bufferSize=250; strcpy(testId,"test"); printf("RequestedId: %s\n",testId); - mSPAC=msgSpaceCreate(testId,0,2,poolInfos); + mSPAC=msgSpaceCreate(testId,0,3,poolInfos); - montext=msgAllocate(mSPAC,1,200,0); + montext=msgAllocate(mSPAC,2,180,0); // msgFree(mSPAC,(void *)montext); msgSpaceDelete(testId);