- Give PCI controllers lower unit numbers than legacy controllers.
[cake.git] / rom / exec / addmemhandler.c
blobb348e303758eed352d891a7462f869200f28deb7
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Add a low memory handler.
6 Lang: english
7 */
9 #include <aros/debug.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
12 #include <proto/exec.h>
14 /*****************************************************************************
16 NAME */
18 AROS_LH1(void, AddMemHandler,
20 /* SYNOPSIS */
21 AROS_LHA(struct Interrupt *, memHandler, A1),
23 /* LOCATION */
24 struct ExecBase *, SysBase, 129, Exec)
26 /* FUNCTION
27 Add some function to be called if the system is low on memory.
29 INPUTS
30 memHandler - An Interrupt structure to add to the low memory
31 handler list.
33 RESULT
35 NOTES
37 EXAMPLE
39 BUGS
41 SEE ALSO
43 INTERNALS
45 ******************************************************************************/
47 AROS_LIBFUNC_INIT
48 ASSERT_VALID_PTR(memHandler);
50 /* Protect the low memory handler list */
51 Forbid();
52 /* Nothing spectacular: Just add the new node */
53 Enqueue((struct List *)&SysBase->ex_MemHandlers,&memHandler->is_Node);
54 Permit();
55 AROS_LIBFUNC_EXIT
56 } /* AddMemHandler */