alsa.audio: move handling of XRUN when writting to the slave task
[AROS.git] / rom / dosboot / cleanup.c
blobcb3f19ec6d1e9b2e155d47aabe67e49499b85360
1 /*
2 Copyright © 1995-2013, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/asmcall.h>
7 #include <aros/debug.h>
8 #include <exec/resident.h>
9 #include <libraries/expansionbase.h>
10 #include <proto/exec.h>
12 #include LC_LIBDEFS_FILE
14 #include "dosboot_intern.h"
16 extern const char Dosboot_LibID[];
17 extern const int Dosboot_End;
19 AROS_UFP3(static APTR, dosboot_Cleanup,
20 AROS_UFPA(void *, dummy, D0),
21 AROS_UFPA(BPTR, segList, A0),
22 AROS_UFPA(struct ExecBase *, SysBase, A6));
24 const struct Resident db_Cleanup =
26 RTC_MATCHWORD,
27 (struct Resident *)&db_Cleanup,
28 (void *)&Dosboot_End,
29 RTF_AFTERDOS,
30 VERSION_NUMBER,
31 NT_PROCESS,
32 -121,
33 "DOSBoot cleanup",
34 &Dosboot_LibID[6],
35 &dosboot_Cleanup,
38 AROS_UFH3(static APTR, dosboot_Cleanup,
39 AROS_UFPA(void *, dummy, D0),
40 AROS_UFPA(BPTR, segList, A0),
41 AROS_UFPA(struct ExecBase *, SysBase, A6))
43 AROS_USERFUNC_INIT
45 struct DOSBootBase *base = OpenResource("dosboot.resource");
47 if (!base)
49 /* ??? What ??? */
50 return NULL;
53 D(bug("[dosboot cleanup] Boot screen 0x%p\n", base->bm_Screen));
54 if (base->bm_Screen)
56 /* Close "No boot media" screen. This is actually what we are here for. */
57 CloseBootScreen(base->bm_Screen, base);
59 anim_Stop(base);
61 /* Well, since we are here, let's completely expunge. :) */
62 CloseLibrary(&base->bm_ExpansionBase->LibNode);
64 Remove(&base->db_Node);
65 FreeMem(base, sizeof(struct DOSBootBase));
67 return NULL;
69 AROS_USERFUNC_EXIT;