Removed autodocs of arch specific variants of ROM modules.
[AROS.git] / arch / m68k-all / exec / cachecleare.c
blob4d7f3eb46553eddcadff297bdb06a411efcc26d1
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CacheClearE() - Clear the caches with extended control.
6 Lang: english
7 */
9 #include <exec/types.h>
10 #include <exec/execbase.h>
11 #include <aros/libcall.h>
13 extern void AROS_SLIB_ENTRY(CacheClearE_00,Exec,107)(void);
14 extern void AROS_SLIB_ENTRY(CacheClearE_20,Exec,107)(void);
15 extern void AROS_SLIB_ENTRY(CacheClearE_4060,Exec,107)(void);
17 #include <proto/exec.h>
19 /* See rom/exec/cachecleare.c for documentation */
21 AROS_LH3(void, CacheClearE,
22 AROS_LHA(APTR, address, A0),
23 AROS_LHA(ULONG, length, D0),
24 AROS_LHA(ULONG, caches, D1),
25 struct ExecBase *, SysBase, 107, Exec)
27 AROS_LIBFUNC_INIT
29 void (*func)();
31 if (SysBase->LibNode.lib_OpenCnt == 0)
32 return;
34 Disable();
35 if (SysBase->AttnFlags & AFF_68060) {
36 /* 68060 support */
37 func = AROS_SLIB_ENTRY(CacheClearE_4060, Exec, 107);
38 } else if (SysBase->AttnFlags & AFF_68040) {
39 /* 68040 support */
40 func = AROS_SLIB_ENTRY(CacheClearE_4060, Exec, 107);
41 } else if (SysBase->AttnFlags & AFF_68020) {
42 /* 68020 support */
43 func = AROS_SLIB_ENTRY(CacheClearE_20, Exec, 107);
44 } else {
45 /* Everybody else (68000, 68010) */
46 func = AROS_SLIB_ENTRY(CacheClearE_00, Exec, 107);
48 AROS_UFC3NR(void, func,
49 AROS_UFCA(APTR, address, A0),
50 AROS_UFCA(ULONG, length, D0),
51 AROS_UFCA(ULONG, caches, D1));
52 SetFunction((struct Library *)SysBase, -LIB_VECTSIZE * 107, func);
53 Enable();
55 AROS_LIBFUNC_EXIT
56 } /* CacheClearE */