revert between 56095 -> 55830 in arch
[AROS.git] / rom / exec / addresetcallback.c
blob9f9ec40d32dac1c2053192440622181f4ab1dc8b
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Add a reset callback to internal list
6 Lang: english
7 */
9 #include <exec/interrupts.h>
10 #include <proto/exec.h>
12 #include "exec_intern.h"
14 /*****************************************************************************
16 NAME */
18 AROS_LH1(BOOL, AddResetCallback,
20 /* SYNOPSIS */
21 AROS_LHA(struct Interrupt *, interrupt, A0),
23 /* LOCATION */
24 struct ExecBase *, SysBase, 167, Exec)
26 /* FUNCTION
27 Install a system reset notification callback. The callback
28 will be called whenever system reboot is performed.
30 The given Interrupt structure is inserted into the callback list
31 according to its priority. The callback code is called with the same
32 arguments as an interrupt server.
34 INPUTS
35 interrupt - A pointer to an Interrupt structure
37 RESULT
38 TRUE for success, FALSE for failure
40 NOTES
41 This function is compatible with AmigaOS v4.
43 EXAMPLE
45 BUGS
47 SEE ALSO
49 INTERNALS
50 On AROS this function cannot fail. Return value is present for
51 AmigaOS v4 compatibility.
53 ******************************************************************************/
55 AROS_LIBFUNC_INIT
57 struct IntExecBase *IntSysBase = (struct IntExecBase *)SysBase;
59 Enqueue(&IntSysBase->ResetHandlers, &interrupt->is_Node);
60 return TRUE;
62 AROS_LIBFUNC_EXIT