Internal OS Functions

Some of the internal OS functions are briefly described below. Broken into three groups, these functions are mentioned here with the purpose to reduce potential duplicate effort from developers. Most of these functions are simple routines to access various R4300 registers, Translation-Lookaside Buffer (TLB) information, and internal active thread queue. Please refer to the reference (man) pages for specifics about the arguments, return values, and behavior of these functions.

Group 1: Provides functions to access various common R4300 registers:

- __osGetCause, __osSetCause
  These functions returns and specifies the content of the R4300 Cause register, respectively.

- __osGetCompare, __osSetCompare These functions returns and specifies the content of the R4300 Compare register, respectively.

- __osGetConfig, __osSetConfig
  These functions returns and specifies the content of the R4300 Configuration register, respectively.

- __osGetSR, __osSetSR
  These functions returns and specifies the content of the R4300 Status register, respectively.

- __osGetFpcCsr, __osSetFpcCsr
  These functions returns and specifies the content of the R4300 floating-point Control/Status register, respectively.

Group 2: Provides functions to access TLB information:

- __osGetTLBASID
  This function returns the TLB Application Space ID in the R4300 EntryHi register.

- __osGetTLBPageMask
  For a specified TLB entry, this function returns the content of the R4300 PageMask register.

- __osGetTLBHi
  For a specified TLB entry, this function returns the content of the R4300 EntryHi register.

- __osGetTLBLo0
  For a specified TLB entry, this function returns the content of the R4300 EntryLo0 register.

- __osGetTLBLo1
  For a specified TLB entry, this function returns the content of the R4300 EntryLo1 register.

Group 3: Provides functions to access internal active thread queue to find faulted thread(s):

- __osGetCurrFaultedThread
  This function returns the most recent faulted thread.

- __osGetNextFaultedThread
  This function returns the next faulted thread from the internal active thread queue.

  Copyright © 1999 Nintendo of America Inc. All Rights Reserved Nintendo and N64 are registered trademarks of Nintendo Last Updated January, 1999