API Notation

In the parts of this specification that describe APIs, the specification of each API (Application Program Interface) is explained in the format illustrated below. In addition to system calls that directly call kernel functions, APIs include functions implemented as extended SVCs (extended system calls), macros, and libraries.

API Name - Description

This is an API name and its description.

C Language Interface

This is an API's C language interface and header file(s) to include.

Parameter

Describes an API's parameter(s), i.e. information passed to the T-Kernel when the API is issued.

Return Parameter

Describes an API's return parameter(s), i.e. information returned by the T-Kernel when the execution of the API ends.

A return parameter that is returned as an API's function value may be called "return code." A return parameter can include, besides return code, a value stored at a pointer that points at memory location where some information can be stored.

Error Code

Describes errors that can occur in an API.

The following error codes are common to all APIs and are not included in the error code listings for each API:

E_SYS, E_NOSPT, E_RSFN, E_MACV, E_OACV.

The error code E_CTX is included in the error code listings for individual APIs only when the conditions for its occurrence are clear (e.g., APIs that enter WAITING state). Due to constraints on the implementation, however, the E_CTX error code may be returned by other APIs as well. The E_CTX that occurs due to the implementation-specific reasons is not included in the error code listings for individual APIs.

Valid Context

Indicates the context (task portion, quasi-task portion, and task-independent portion) that can issue the API under consideration.

Description

Describes the API functions.

When the values to be passed in a parameter are selected from various choices, the following notation is used in the parameter descriptions:

( x || y || z )

Set one of x, y, or z.

x | y

Both x and y can be set at the same time (in which case the logical sum of x and y is taken).

[ x ]

x is optional.

Example 1. Example of Using Parameters Notation

wfmode := (TWF_ANDW || TWF_ORW) | [TWF_CLR]

The above description means that wfmode can be specified in any of the following four ways:

TWF_ANDW
TWF_ORW
(TWF_ANDW | TWF_CLR)
(TWF_ORW | TWF_CLR)

Additional Notes

Supplements the description by noting matters that need special attention or caution, etc.

Rationale for the Specification

Explains the reason for adopting a particular approach and specification.

Difference from T-Kernel 1.0

Explains the difference(s) between T-Kernel 1.0.