The OS catalogs several items of information about the system, including the Kernel Tick Ratio (KTR), in an abject called RQSYSINFO. To get the information, first invoke the Nucleus rq_get_task_tokens system call to get the token for the root job (where the RQSYSINFO object is cataloged). Then call rq_lookup_object, specifying the token for the root job and the string RQSYSINFO.
The token returned by rq_lookup_object is a SELECTOR for a memory segment where the information is stored. Use a structure such as the following to get the information at that segment, in PL/M:
DECLARE sysinfo_type STRUCTURE(
boot_dev(15)BYTE,
file_driverBYTE,
boot_file(30)BYTE,
reserved1(11)BYTE,
nuc_tick_intervalWORD_16,
kn_tick_ratioWORD_16,
reserved2(29)BYTE,
bustypeBYTE,
reserved3(6)BYTE,
physical_memoryWORD_32,
reserved4(27)BYTE,
user_reserved(32)BYTE);
or in C:
struct sysinfo_type {
UINT_8boot_dev[15];
UINT_8file_driver;
UINT_8boot_file[30];
UINT_8reserved1[11];
UINT_16nuc_tick_interval;
UINT_16kn_tick_ratio;
UINT_8reserved2[29];
UINT_8bustype;
UINT_8reserved3[6];
UINT_32physical_memory;
UINT_8reserved4[27];
UINT_8user_reserved[32];
};
Where:
boot_dev[15]
An RMX_STRING containing the name of the boot device.
file_driver
The file driver type used by the boot device:
| Value | File Driver |
| 3 | DOS |
| 4 | Named |
| 5 | Remote |
| 6 | EDOS |
boot_file[30]
An RMX_STRING containing the name of the boot file.
nuc_tick_interval
The number of milliseconds from one Nucleus clock tick to the next.
kn_tick_ratio
The KTR value. Divide nuc_tick_interval by this value to get the number of milliseconds in the Kernel tick interval.
bustype1 is Multibus I, 2 is Multibus II, 3 is PC.
physical_memory
The top of physical memory as known by the iRMX Free Space Manager.
user_reserved[32]
Available for your application’s use.