gtpc2m0sC/C++ Language Support User's Guide

cinfc-Control Program Interface

This function allows ECB-controlled programs to access protected main storage by returning a pointer to an interface point or location at execution time. Additionally, the function provides a convenient way for a real-time program to request an update of the file copy of 1 or more control program keypoint records.

Format

#include   <c$cinfc.h>
void         *cinfc(enum t_cinfc type, int number, ...);

type
This parameter must belong to the enumeration type t_cinfc specifying 1 of 3 possible values:

CINFC_ADDRESS
Specifies that the function is to return an interface location address and allow the calling function to write in protected storage.

CINFC_WRITE
Specifies that the function is to return an interface address and allow the calling function to write in protected storage.

CINFC_READ
Specifies that the function is to return an interface address and the current protection key is set to that of application core.

CINFC_KEYPOINT
Specifies that the function is to initiate CP keypoint update.

number
If the type specified is CINFC_ADDRESS, CINFC_WRITE, or CINFC_READ, this parameter is the symbolic label of the interface point. If the type specified is CINFC_KEYPOINT, this parameter is the number of keypoints to update.

...
One to 5 parameters of keypoints to be updated. Valid entries are CINFC_KEYB, CINFC_KEYD, CINFC_KEYE, CINFC_KEY1, or CINFC_KEY2.

Normal Return

Pointer to interface address, or location if requested. For CINFC_KEYPOINT, the return is unknown.

Error Return

Not applicable.

Programming Considerations

Examples

The following example returns the address of a field in protected storage and does not allow the function to modify the field.

#include <c$cinfc.h>

  ·
  ·
  ·
char *field_ptr;
  ·
  ·
  ·
field_ptr = cinfc(CINFC_READ, CINFC_CMMINC);
  ·
  ·
  ·

The following example updates the file copy of 2 control program keypoints.

#include <c$cinfc.h>

  ·
  ·
  ·
cinfc(CINFC_KEYPOINT, 2, CINFC_KEY1, CINFC_KEYE);
  ·
  ·
  ·

Related Information