Process synchronization

Sometimes, the multiple display processes must be coordinated, such as when they access shared data. The master display and display barriers can be used for this.

At other times, access to shared memory must be synchronized between the computation and display processes. CAVELOCKs provide two-level access control - read and write.

Functions

boolean CAVEMasterDisplay(void)
Returns TRUE in exactly one display process.

boolean CAVEMasterWall(void)
Returns TRUE if called by the master drawing process when it is drawing the 'master' wall.

void CAVEDisplayBarrier(void)
Blocks the calling process until all the display processes have reached the barrier. This should be called only in the display processes.

void CAVEDisplaySync(void)
Blocks the calling computation process until the end of the current display frame.

CAVELOCK CAVENewLock(void)
Returns a new CAVE lock.

CAVEFreeLock(CAVELOCK lock)
Deletes a lock created by CAVENewLock().

CAVESetReadLock(CAVELOCK lock)
CAVEUnsetReadLock(CAVELOCK lock)
Sets/releases a lock for read access. Any number of processes may set a lock for reading simultaneously. CAVESetReadLock() blocks until the lock is set.

CAVESetWriteLock(CAVELOCK lock)
CAVEUnsetWriteLock(CAVELOCK lock)
Sets/releases a lock for write access. Only one process may set a lock for writing at a time, and no processes may set the lock for reading while it is write-locked. CAVESetWriteLock() blocks until the lock is set.


Previous page    Next page

Last modified 19 July 1997.

Dave Pape, pape@evl.uic.edu