Added kernel module for starting the usb stack at boot time. It's not activated thoug...
[cake.git] / rom / intuition / freeremember.c
blob0c4c72685dabdf93fee93487fcd13c4e60f9fd25
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 Copyright © 2001-2003, The MorphOS Development Team. All Rights Reserved.
4 $Id$
5 */
7 #include "intuition_intern.h"
8 #include <exec/memory.h>
9 #include <proto/exec.h>
11 /*****************************************************************************
13 NAME */
14 #include <intuition/intuition.h>
15 #include <proto/intuition.h>
17 AROS_LH2(void, FreeRemember,
19 /* SYNOPSIS */
20 AROS_LHA(struct Remember **, rememberKey, A0),
21 AROS_LHA(LONG , reallyForget, D0),
23 /* LOCATION */
24 struct IntuitionBase *, IntuitionBase, 68, Intuition)
26 /* FUNCTION
27 Free memory allocated by AllocRemember().
29 INPUTS
30 rememberKey - address of a pointer to struct Remember
31 reallyForget - TRUE release all memory
32 FALSE release only link nodes
34 RESULT
36 NOTES
38 EXAMPLE
40 BUGS
42 SEE ALSO
43 AllocRemember()
45 INTERNALS
47 HISTORY
48 27-11-96 digulla automatically created from
49 intuition_lib.fd and clib/intuition_protos.h
51 *****************************************************************************/
53 AROS_LIBFUNC_INIT
55 struct Remember *next, *key;
57 DEBUG_REMEMBER(dprintf("FreeRemember: Key 0x%lx ReallyForget %d\n",
58 rememberKey, reallyForget));
60 for (next = *rememberKey; (key = next); )
62 next = key->NextRemember;
64 if (reallyForget)
65 FreeMem (key->Memory, key->RememberSize);
67 FreeMem (key, sizeof (struct Remember));
70 *rememberKey = NULL;
72 AROS_LIBFUNC_EXIT
73 } /* FreeRemember */