1/*====================================================================2* os_exception.h3*4* Copyright 1995, Silicon Graphics, Inc.5* All Rights Reserved.6*7* This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics,8* Inc.; the contents of this file may not be disclosed to third9* parties, copied or duplicated in any form, in whole or in part,10* without the prior written permission of Silicon Graphics, Inc.11*12* RESTRICTED RIGHTS LEGEND:13* Use, duplication or disclosure by the Government is subject to14* restrictions as set forth in subdivision (c)(1)(ii) of the Rights15* in Technical Data and Computer Software clause at DFARS16* 252.227-7013, and/or in similar or successor clauses in the FAR,17* DOD or NASA FAR Supplement. Unpublished - rights reserved under the18* Copyright Laws of the United States.19*====================================================================*/2021/*---------------------------------------------------------------------*22Copyright (C) 1998 Nintendo. (Originated by SGI)2324$RCSfile: os_exception.h,v $25$Revision: 1.1 $26$Date: 1998/10/09 08:01:07 $27*---------------------------------------------------------------------*/2829#ifndef _OS_EXCEPTION_H_30#define _OS_EXCEPTION_H_3132#ifdef _LANGUAGE_C_PLUS_PLUS33extern "C" {34#endif3536#include <PR/ultratypes.h>3738#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)3940/**************************************************************************41*42* Type definitions43*44*/4546typedef u32 OSIntMask;47typedef u32 OSHWIntr;4849#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */5051/**************************************************************************52*53* Global definitions54*55*/5657/* Flags for debugging purpose */5859#define OS_FLAG_CPU_BREAK 1 /* Break exception has occurred */60#define OS_FLAG_FAULT 2 /* CPU fault has occurred */6162/* Interrupt masks */6364#define OS_IM_NONE 0x0000000165#define OS_IM_SW1 0x0000050166#define OS_IM_SW2 0x0000060167#define OS_IM_CART 0x00000c0168#define OS_IM_PRENMI 0x0000140169#define OS_IM_RDBWRITE 0x0000240170#define OS_IM_RDBREAD 0x0000440171#define OS_IM_COUNTER 0x0000840172#define OS_IM_CPU 0x0000ff0173#define OS_IM_SP 0x0001040174#define OS_IM_SI 0x0002040175#define OS_IM_AI 0x0004040176#define OS_IM_VI 0x0008040177#define OS_IM_PI 0x0010040178#define OS_IM_DP 0x0020040179#define OS_IM_ALL 0x003fff0180#define RCP_IMASK 0x003f000081#define RCP_IMASKSHIFT 16828384#if defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS)8586/**************************************************************************87*88* Macro definitions89*90*/919293/**************************************************************************94*95* Extern variables96*97*/9899100/**************************************************************************101*102* Function prototypes103*104*/105106/* Interrupt operations */107108extern OSIntMask osGetIntMask(void);109extern OSIntMask osSetIntMask(OSIntMask);110111112#endif /* defined(_LANGUAGE_C) || defined(_LANGUAGE_C_PLUS_PLUS) */113114#ifdef _LANGUAGE_C_PLUS_PLUS115}116#endif117118#endif /* !_OS_EXCEPTION_H_ */119120121