sethwinterrupt.c 1 KB
/**************************************************************************
 *									  *
 *		 Copyright (C) 1996, Silicon Graphics, Inc.		  *
 *									  *
 *  These coded instructions, statements, and computer programs  contain  *
 *  unpublished  proprietary  information of Silicon Graphics, Inc., and  *
 *  are protected by Federal copyright law.  They  may  not be disclosed  *
 *  to  third  parties  or copied or duplicated in any form, in whole or  *
 *  in part, without the prior written consent of Silicon Graphics, Inc.  *
 *									  *
 **************************************************************************/

#include "osint.h"

/*
 * osSetHWIntr
 *
 */
void
__osSetHWIntrRoutine(OSHWIntr interrupt, s32 (*handler)(void), void *stackEnd)
{
	register u32 saveMask;


	/*
	 * Lock out interrupts to prevent preemption
	 */
	saveMask = __osDisableInt();

	__osHwIntTable[interrupt].handler = handler;
	__osHwIntTable[interrupt].stackEnd = stackEnd;
	
	/* Restore interrupts */
	__osRestoreInt(saveMask);
}