API Notation

In the parts of this specification that describe APIs, the specification of each API (Application Programming 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 detection of the error conditions that may result in the following error codes is implementation-dependent; such conditions may not always be detected as errors:

E_PAR, E_MACV, E_CTX.

Error code E_CTX is included in the error code section of individual API only when API can encounter an error due to a semantically wrong caller context: e.g., the case of task-independent portion's calling an API that can block. If an API's constraints in the caller's context are implementation-dependent, and such semantic errors are not universal across all implementations, the explanation of E_CTX is not included in the error section of the API under discussion.

Implementations may generate errors that are not explained in the explanation section of error codes.

Valid Context

Indicates the context (task portion, quasi-task portion, and task-independent portion) that can issue the API under consideration. Note that items marked with "x" are sometimes clearly impossible to use in the context discussed, but the usability of some items in the context discussed may be implementation-dependent, and some may be usable in some implementations.

Related Service Profile Items

The relation of the service profile item(s) associated with API is shown.

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.