show more relevant debug
[AROS.git] / rom / exec / doresetcallbacks.c
blob15acba0573076b7911b789f366d648e6f2c2ddf6
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Execute installed reset handlers.
6 Lang: english
7 */
9 #include <aros/asmcall.h>
10 #include <exec/interrupts.h>
12 #include "exec_intern.h"
13 #include "exec_util.h"
16 This function executes installed reset handlers.
17 It stores the supplied shutdown action type (SD_ACTION_#?) in the
18 ln_Type field of each reset interrupt structure. Typically this
19 information is needed by system reset handlers (EFI, ACPI etc.), but
20 not by peripheral-device reset handlers (USB HCs, NICs etc.).
21 For improved safety callbacks are called in a Disable()d state.
22 This function does not need to Enable().
25 void Exec_DoResetCallbacks(struct IntExecBase *IntSysBase, UBYTE action)
27 struct Interrupt *i;
29 Disable();
31 for (i = (struct Interrupt *)IntSysBase->ResetHandlers.lh_Head; i->is_Node.ln_Succ;
32 i = (struct Interrupt *)i->is_Node.ln_Succ)
34 D(bug("[DoResetCallbacks] Calling handler: '%s'\n",
35 i->is_Node.ln_Name));
36 i->is_Node.ln_Type = action;
37 AROS_INTC1(i->is_Code, i->is_Data);