Re: pfMergeBuffer, uswsetlock, and usunsetlock

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Wed, 31 Jan 96 10:03:19 PST


>
> --
> --PART-BOUNDARY=.19601301642.ZM6778.electrogig.com
> Content-Type: text/plain; charset=us-ascii
>
> Has anyone tried to use IRIX IPC lock and unlock along with the DBASE process?
> My DBASE process hangs at pfMergeBuffer() if the APP and DBASE, both are
> using locks asynchronously. Runs fine if I don't let either one of the
> processes
> use lock/unlock. I have attached a small program which illustrates this.
>
> Is this a bug with pfMergeBuffer() or am I not using IPC calls correctly?
>
>
> while (i++ <= 50)
> {
> pfSync();
>
> // remove the commented lock and unlock below to see the results
> //lock();
> //unlock();
>
> pfFrame();
> }
> pfExit();
>
> }
>
> void pageDBase(void *data)
> {
> static int i = 0;
> static pfBuffer *buf = NULL;
> pfGroup *grp;
>
> if ( i==15 )
> {
> printf("Inserting nodes\n");
>
> if (buf == NULL)
> {
> buf = pfNewBuffer();
> pfSelectBuffer(buf);
> }
>
> lock();
>
> //grp = (pfGroup *)pfdLoadFile("/disk4/people/kishore/performer/data/globeAnim.iv");
> grp = (pfGroup *)pfdLoadFile("globe.iv");
> pfBufferAddChild(*scene, grp);
> pfMergeBuffer();
>
> unlock();
> }

        This is a classic deadly embrace - in pfMergeBuffer() the DBASE
blocks until the APP releases it. If the DBASE has theLock then
the APP can't get it to call pfFrame and the DBASE can't release theLock
since it is waiting for the APP to unblock it.


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:52:19 PDT

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