This function gives up control of the processor and allows other entry
control blocks (ECBs) to be processed. The ECB is placed on the
specified processor list.
Format
#include <sysapi.h>
void tpf_yieldc(enum t_yieldc_opt list);
- list
- Specifies the type of list on which you want the ECB placed. Use
one of the following values:
- YIELDC_READY_LIST
- Assigns the ECB to the ready list. This is the highest priority
list available to which the ECB can be assigned. Assigning the ECB to
this list prevents any new work from being processed by this I-stream before
the ECB is dispatched again. Any ECBs that are already on the ready
list will be allowed to process.
- YIELDC_VCT_LIST
- Assigns the ECB to the virtual file access count (VCT) list. This
list is used to delay the processing of an ECB until all work on the ready
list has been processed. Any ECB on the VCT list is interleaved with
new work. ECBs on the VCT list will still be processed, even when the
system stops processing new work because a shutdown condition caused by low
resources occurred.
Normal Return
Void.
Error Return
Not Applicable.
Programming Considerations
- Limit the use of this function; excessive use will cause a low-core
condition in the real-time system.
- This function can be run on any I-stream.
- After this function is completed, the ECB is added to the specified CPU
list. Accordingly, control can be transferred to process another
ECB.
- Records must not be held by the ECB when the tpf_yieldc
function is issued. If the ECB that is issuing tpf_yieldc is
holding a record, a number of ECBs (also holding storage blocks) can be queued
for that record. This can lead to a lockout condition.
- When this function is issued, the 500-millisecond program timeout is
reset.
- The macro trace collection for the tpf_yieldc function
compresses multiple occurrences of tpf_yieldc to two entries in the
macro trace table. This prevents programs that are issuing successive
tpf_yieldc calls from filling up the macro trace table by keeping
only the first and last tpf_yieldc trace information. The
first tpf_yieldc entry contains a count of suppressed entries in
addition to the normal macro trace information.
- When this function is processed during system cycle down,
tpf_yieldc is handled like the defrc function by the TPF
system and the ECB is placed on the defer list.
- If an incorrect list type is specified, the result is a system error with
exit.
Examples
The following example adds the ECB to the ready list.
#include <sysapi.h>
·
·
·
tpf_yieldc(YIELDC_READY_LIST);
Related Information
defrc-Defer Processing of Current Entry.