Port the SB128 code to AROS.
[AROS.git] / rom / exec / doresetcallbacks.c
blob42cd6ee1b2966395ef64c7c38bc9347616170e0d
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Add interrupt client to chain of interrupt server
6 Lang: english
7 */
9 #include <aros/asmcall.h>
10 #include <exec/interrupts.h>
12 #include "exec_intern.h"
13 #include "exec_util.h"
15 /* Call this function from within your ColdReboot() implementation
16 in order to execute installed reset handlers.
17 For improved safety callbacks are called in a Disable()d state.
18 This function does not need to Enable(). */
20 void Exec_DoResetCallbacks(struct IntExecBase *SysBase)
22 struct Interrupt *i;
24 Disable();
26 for (i = (struct Interrupt *)SysBase->ResetHandlers.lh_Head; i->is_Node.ln_Succ;
27 i = (struct Interrupt *)i->is_Node.ln_Succ)
28 AROS_UFC3(void, i->is_Code,
29 AROS_UFCA(APTR, i->is_Data, A1),
30 AROS_UFCA(APTR, i->is_Code, A5),
31 AROS_UFCA(struct ExecBase *, &SysBase->pub, A6));