gtpc2m14 | C/C++ Language Support User's Guide |
This macro creates an independent ECB for immediate or deferred processing.
A core block is placed on data level zero of the newly created ECB and a variable number of bytes is passed to the created ECB's work area starting at EBW000. The core block to be passed is the one specified by the level or decb parameter. The TPF system moves the parameters from the area specified by the parm parameter into an interim block of storage. If the priority parameter is CREEC_IMMEDIATE, the block is placed on the ready list. If CREEC_DEFERRED, it is placed on the deferred list. Operational program zero (OPZERO) initializes an ECB with the parameters in the work area, releases the interim block, places the passed block (if any) on data level zero, and activates the specified program.
Format
#include <tpfapi.h> void creec(int length, const void *parm, void (*segname)(), enum t_lvl level, int priority); void __CREEC(int length, const void *parm, const char *segname, enum t_lvl level, int priority);
or
#include <tpfapi.h> void creec(int length, const void *parm, void (*segname)(), TPF_DECB *decb, int priority); void __CREEC(int length, const void *parm, const char *segname, TPF_DECB *decb, int priority);
Migration to ISO-C consideration |
---|
The TARGET(TPF) creec function can handle segment names that are #pragma mapped. The ISO-C creec function only handles #pragma mapped names if the first 4 characters are the same as the program name. |
TARGET(TPF) restriction |
---|
Only calls to certain TPF API functions permit the use of function pointers. Pointers to functions are not supported in TARGET(TPF); their use normally results in a compiler error. |
Normal Return
Void.
Error Return
Not applicable.
Programming Considerations
Examples
The following example creates an ECB dispatched from the ready list for program OMA0, passing string 755/15AUG and the working storage block on level D0 as input to the program.
#include <tpfapi.h> void OMA0(); char *parmstring = "755/15AUG";
·
·
·
creec(strlen(parmstring),parmstring,OMA0,D0,CREEC_IMMEDIATE);
The following example creates an ECB dispatched from the ready list for program OMA0, passing string 755/15AUG and the working storage block on the DECB pointed to by decb_ptr as input to the program.
#include <tpfapi.h> void OMA0(); char *parmstring = "755/15AUG"; TPF_DECB *decb_ptr; DECBC_RC rc; decb_ptr = tpf_decb_create( NULL, &rc );
·
·
·
creec(strlen(parmstring),parmstring,OMA0,decb_ptr,CREEC_IMMEDIATE);
Related Information
For more information about DECBs, see TPF Application Programming.