PREVIOUS

Chapter 3. Primary Functions

While some services are obtained via gates, others are obtained directly from the kernel itself. Keys that are not gates are called primary keys.

A primary key appears to the holder as a start key. Invoking a primary key causes the kernel to perform the primary function and return to the key provided as the last key parameter in the invocation. Primary keys are purposely designed so it is difficult to distinguish them from start keys; indeed some implementations may replace some of them with start keys that provide the same function.

If the invocation is a call, a return key to the invoker is implicitly provided as the last parameter. For other kinds of invocations, a resume key must be explicitly passed, or there will be no return. (It is as if the returner key were used to perform the return.)

The return is immediate unless otherwise specified; if the return is delayed the effect is as though the kernel held the return key.

Unless otherwise specified, if a primary key is offered a byte string shorter than that required, the string is padded on the right with zero bytes. If it is longer and the additional bytes are zero, the function is the same as specified in this section. (Additional non-zero bytes are reserved.)

If a primary key is offered keys in positions not specified on the description of the particular order code, they are ignored. It is as if the primary key specified an entry block that did not accept these keys.

Primary keys return kt+2 for invalid order codes.

Certain primary functions are performed by miscellaneous keys. These keys do not designate a page or node but refer to some object internal to the kernel. e.g. The wait key and wait objects, range keys and range objects, and device keys and device objects. These objects are designed so they have no state or so that their state may be reset upon a kernel restart.

NEXT