30.12.2013 Views

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

T-Kernel Specification (1.B0.02)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.7. SYSTEM CONFIGURATION INFORMATION MANAGEMENT FUNCTIONS 253<br />

5.7 System Configuration Information Management Functions<br />

System configuration information management functions are provided for storing, managing and making<br />

available information about the system configuration (maximum number of tasks, etc.) and any other<br />

information. These are not functions for adding or modifying information when the system is running.<br />

How the system configuration information is to be stored is not specified here, but it is generally put<br />

in memory (ROM/RAM). This functionality is therefore not intended for storing large amounts of<br />

information.<br />

Standard definitions are specified for some system configuration information, but additional information<br />

may be defined and used for applications, subsystems, or device drivers.<br />

The format of system configuration information consists of a name and defined data as a set.<br />

• Name<br />

The name is a string of up to 16 characters.<br />

Characters that can be used (UB) are a to z, A to Z, 0 to 9 and<br />

(underbar).<br />

• Defined data<br />

Data consists of numbers (integers) or character strings.<br />

Characters that can be used (UB) are any characters other than 0x00 to 0x1F, 0x7F, or 0 xFF<br />

(character codes).<br />

Sample:<br />

Name Defined Data<br />

SysVer 1 0<br />

SysName T-<strong>Kernel</strong> Version 1.00<br />

5.7.1 System Configuration Information Acquisition<br />

System configuration information is acquired by using extended SVC. This function is used inside T-<br />

<strong>Kernel</strong>, and can also be used by applications, subsystems, device drivers and so on. Use inside T-<strong>Kernel</strong><br />

does not have to go through extended SVC; this choice is implementation-dependent.<br />

• INT tk_get_cfn( UB *name, INT *val, INT max )<br />

name<br />

val<br />

max<br />

return code<br />

Name<br />

Array storing numeric strings<br />

Number of elements in val array<br />

Defined numeric information count or error<br />

Gets numeric string information from system configuration information. This function gets up to<br />

max items of numerical string information defined by the name designated in the name parameter<br />

and stores the acquired information in val. The number of items of defined numeric string<br />

information is passed in the return code. If return code > max, this indicates that not all the<br />

information could be stored. By designating max = 0, the number of numeric strings can be found<br />

out without actually storing them in val.<br />

E NOEXS is returned if no information is defined with the name designated in the name parameter.<br />

The behavior if the information defined as name is a character string is indeterminate.<br />

This function can be invoked from any protection level, without being limited by the protection<br />

level from which T-<strong>Kernel</strong>/OS system call can be invoked.<br />

Copyright c○ 2002, 2003 by T-Engine Forum<br />

T-<strong>Kernel</strong> <strong>1.B0.02</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!