N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

## osGetIntMask
osSetIntMask

Syntax
#include <ultra64.h>
OSIntMask osGetIntMask(void);
OSIntMask osSetIntMask(OSIntMask im);
Explanation
The osGetIntMask and osSetIntMask functions get and set enabled interrupt masks.
The osGetIntMask call returns the mask of currently enabled hardware interrupts, and the osSetIntMask call allows the application to enable and disable interrupts based on the provided mask. Following are the bits of the mask. The interrupt is enabled if the associated definition below is bitwise OR'ed into the final mask.

       OS_IM_SW1      CPU software interrupt 1
       OS_IM_SW2      CPU software interrupt 2
       OS_IM_CART     Pak interrupt
       OS_IM_PRENMI   Pre-NMI interrupt
       OS_IM_COUNTER  CPU timer interrupt
       OS_IM_SP       RCP Signal Processor (SP) interrupt
       OS_IM_SI       RCP Serial Interface (SI) interrupt
       OS_IM_AI       RCP Audio Interface (AI) interrupt
       OS_IM_VI       RCP Video Interface (VI) interrupt
       OS_IM_PI       RCP Parallel Interface (PI) interrupt
       OS_IM_DP       RCP Display Processor (DP) interrupt

       OS_IM_NONE     No interrupts enabled
       OS_IM_ALL      All interrupts enabled

The interrupt mask is part of the thread context and is thus saved and restored as threads yield and regain the CPU. All interrupts are enabled for the thread at creation time by osCreateThread. These routines are used sparingly by system threads and should not be needed by application threads. Instead, applications should exploit thread priorities for real time behavior and protection of critical regions.
See Also
osSetEventMesg

Nintendo® Confidential Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.
Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1998