data pools problems ...

New Message Reply Date view Thread view Subject view Author view

Cedric Gautier (gce++at++scl.syseca.fr)
Mon, 14 Nov 94 14:02:04 +0100


 Hello everybody ...

 I have some problems using pfDataPool with unrelated processes ... hereafter is
 the main structure of the two programs ... in fact the second program stop at
 the moment it try to perform a pfAttachDPool of the one created by the first
 process ... and it never get it ... is there something really wrong in that
 small piece of code or something else ? ... i am using an Indy 5.2 for this
 test with performer 1.2.

 COMMON INCLUDE

 ...
 #define STV_POOL_ID 1
 #define STV_POOL_SIZE 4096
 #define STV_POOL_NAME "stvSharedMemory"
 ...

 COMMON DEFINITION

 ...
 static pfDataPool *stvDataPool;
 static float *stvPoolMem;
 ...

 FIRST PROGRAM ...

 start part
 ...
 stvDataPool= pfNewDPool(STV_POOL_SIZE, STV_POOL_NAME);
 stvPoolMem= (float *)pfDPoolAlloc(stvDataPool, STV_POOL_SIZE, STV_POOL_ID);
 ...

 loop part
 ...
 pfDPoolLock(stvPoolMem);
 ...
 pfDPoolUnlock(stvPoolMem);
 ...

 end part ...
 ...
 pfDPoolFree(stvDataPool, stvPoolMem);
 pfReleaseDPool(stvDataPool);
 ...

 SECOND PROGRAM ...

 start part
 ...
 while ((stvDataPool= pfAttachDPool(STV_POOL_NAME))==NULL)
        fprintf(stderr, "\t- Data Pool Attach ...\r");
 stvPoolMem= (float *)pfDPoolFind(stvDataPool, STV_POOL_ID);
 ...

 loop part
 ...
 pfDPoolLock(stvPoolMem);
 ...
 pfDPoolUnlock(stvPoolMem);
 ...

 end part
 ...
 pfReleaseDPool(stvDataPool);
 ...

 Any help is welcome ...

 Cedric (email: gce++at++syseca.fr)
 SYSECA Simulation Dept ...


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:39 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.