[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPSYNC - Synchronize

GPSYNC (ncid, synch)

Purpose

Use GPSYNC to send buffered requests to the specified nucleus.

When the synchronization mode (synch) parameter is set to 1=NOWAIT , the graPHIGS API sends the buffer to the nucleus and returns control to the application before the nucleus processes the buffer.

When the synchronization mode (synch) parameter is set to 2=SYNC_WAIT , the graPHIGS API does not return control to the application until the nucleus processes all requests and the graPHIGS API has reported any errors.

While debugging your application, you may wish to send each buffered request after every graPHIGS API subroutine call so that errors detected by the nucleus can be processed immediately. This synchronization can be accomplished through a second-level error exit defined using the Specify Error Exit and Error Threshold (GPEXIT) subroutine. With the error severity threshold set to a value of zero, your application defined error exit will receive control after every graPHIGS API subroutine call (except the GPEXIT subroutine) Therefore, a call to GPSYNC from a second-level error exit sends all buffered requests before the graPHIGS API returns control to your application.

This technique will degrade the performance of your application and is only recommended for debugging purposes. For information about second-level error handlers and error severities, see The graPHIGS Programming Interface: Understanding Concepts Preventing second-level error exits from causing infinite loops is discussed under the Specify an Error Exit and Error Threshold (GPEXIT) subroutine.

Parameters

ncid -- specified by user, fullword integer

Nucleus identifier.

synch -- specified by user, fullword integer

Synchronization mode (1=NOWAIT, 2=SYNC_WAIT )

Error Codes

202
SPECIFIED NUCLEUS DOES NOT EXIST
206
SYNCHRONIZATION MODE IS INVALID

Related Subroutines

None

RCP code

201337604 (X'0C002B04')


[ Previous | Next | Contents | Glossary | Home | Search ]