| Previous | Contents | Index |
Specify the address of a procedure to call when a PMDF RESTART or PMDF SHUTDOWN command has been issued.
status = PMDF_set_call_back
(proc, facility, facility_len)
Argument Data type Access Mechanism proc procedure read reference facility descriptor read reference facility_len signed longword read value
status = PMDFsetCallBack
(proc, facility, facility_len)
int PMDFsetCallBack(void (*proc)(), char *facility, int facility_len)
proc
An asynchronous procedure which will be called at AST level whenever a PMDF RESTART or SHUTDOWN command is issued. This procedure will be passed by reference a single integer parameter explaining the reason for the call back.facility
Facility or component name to associate with the routine using this call back. When a RESTART or SHUTDOWN command specifying this facility name is issued, then the call back procedure will be invoked. The length of this string should not exceed 17 bytes.facility_len
Length in bytes of facility.
PMDFsetCallBackis only functional on OpenVMS systems. On other systems, it merely returnsPMDF__OKand does nothing.) Through a call back procedure, programs can be notified whenever a PMDF RESTART or PMDF SHUTDOWN command has been issued. UnlessPMDFcancelCallBackis called, the call back procedure will be called each and every time any of the five commands are issued
where
$ PMDF CACHE/CLOSE $ PMDF RESTART $ PMDF RESTART facility $ PMDF SHUTDOWN $ PMDF SHUTDOWN facilityfacilityis the facility name. The call back procedure will be invoked at AST level and passed, by reference, a single argument. This argument is of type integer and has one of three values:In response to a PMDF_CACHE_CALLBACK call back, the program using the call back should close the queue cache as soon as is convenient by calling
Symbolic name Value Command issued PMDF_CACHE_CALLBACK 8 PMDF CACHE/CLOSE PMDF_RESTART_CALLBACK 16 PMDF RESTART [facility] PMDF_SHUTDOWN_CALLBACK 24 PMDF SHUTDOWN [facility] PMDFcloseQueueCache. In response to either of the other two call backs, the program should exit in an orderly fashion as soon as is convenient. In the case of PMDF_RESTART_CALLBACK, the program should be restarted (i.e., re-run). On OpenVMS systems, this routine will enqueue five resource locks each with blocking ASTs. In order to accomplish this, SYSLCK privilege as well as a sufficient enqueue and AST quotas are required. The call back procedure will be invoked at AST level. Note that the delivery of the blocking AST's used byPMDFsetCallBackscan be hindered in a program which itself spends most of its time at AST level.
PMDF__OK Normal, successful completion. PMDF__INVSTRDES Invalid string descriptor for facility: descriptor has an invalid value in its DSC$B_CLASS field. No call back established. PMDF__STRTRUERR Length of facility exceeds 17 bytes. No call back established. On OpenVMS systems Any error returned by the $ENQ System Service.
| Previous | Next | Contents | Index |