5.7.1 System Con.guration Information Acquisition
System con.guration information is acquired by using extended SVC. This function is used inside T-Kernel, and can also be used by applications, subsystems, device drivers and so on. Use inside T-Kernel does not have to go through extended SVC; this choice is implementation-dependent.
- INT tk_get_cfn( UB *name, INT *val, INT max )
name Name
val Array storing numeric strings
max Number of elements in val array
return code De.ned numeric information count or error
Gets numeric string information from system con.guration information. This function gets up to max items of numerical string information defined by the name specified in the nameparameter and stores the acquired information in val. The number of items of defined numeric string information is passed in the return code. If return code > max, this indicates that not all the information could be stored. By specifying max = 0, the number of numeric strings can be found out without actually storing them in val.
E_NOEXS is returned if no information is defined with the name specified in the name parameter. The behavior if the information defined as name is a character string is indeterminate.
This function can be invoked from any protection level, without being limited by the protection level from which T-Kernel/OS system call can be invoked.
- INT tk_get_cfs( UB *name, UB *buf, INT max )
name Name
buf Array storing character string
max Maximum size of buf (in bytes)
return code Size of defined character string information (in bytes) or error
Gets character string information from system con.guration information. This function gets up to max characters of character string information defined by the name specified in the name parameter and stores the acquired information in buf. If the acquired character string is shorter than max characters, it is terminated by ‘\0’ when stored. The length of the defined character string information (not including ‘\0’) is passed in the return code. If return code > max, this indicates that not all the information could be stored. By specifying max = 0, the character string length can be found out without actually storing anything in buf.
E_NOEXS is returned if no information is defined with the name specified in the name parameter.
The behavior if the information defined as name is a numeric string is indeterminate.
This function can be invoked from any protection level, without being limited by the protection level from which T-Kernel/OS system call can be invoked.

Comments