gtpc2m7u | C/C++ Language Support User's Guide |
This function disconnects you from a coupling facility (CF) list or cache structure when you no longer require access to it. A CF list or cache structure is a named piece of storage on a CF.
Format
#include <c$fapi.h> int tpf_cfdisc(struct icfdi *parms);
Normal Return
Error Return
One of the following:
Correct your program so the value is not null.
Correct your program to use the original connect token received in the tpf_cfconc answer area after the connection request was issued.
Let all outstanding requests to the CF structure end and issue the request again.
Programming Considerations
Applications should use the deleteCache function to discontinue use of a CF cache structure by a processor rather than using the tpf_cfdisc function.
Examples
The following example shows a normal tpf_cfdisc call. The icfdicontoken parameter that is sent is the connect token of the CF list structure to which you were connected.
#include <c$cfdi.h> #include <c$fapi.h> struct icfdi* parm_ptr = NULL; int rc = 0; crusa( 1, D4 ); parm_ptr = getcc( D4, GETCC_TYPE+GETCC_FILL, L1, 0x00 ) memcpy( &parm_ptr->icfdicontoken, &cf_ptr->icflt_sst1.core_str.icflt_ssctk, ICF_CONTOKLEN ); rc = tpf_cfdisc( parm_ptr ); if( rc != ICFRRCOK ) { /* ERROR, WARNING OR BAD PARM ON DISC CALL */ }
Related Information