2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: CacheClearE() - Clear the caches with extended control.
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
)
31 if (SysBase
->LibNode
.lib_OpenCnt
== 0)
35 if (SysBase
->AttnFlags
& AFF_68060
) {
37 func
= AROS_SLIB_ENTRY(CacheClearE_4060
, Exec
, 107);
38 } else if (SysBase
->AttnFlags
& AFF_68040
) {
40 func
= AROS_SLIB_ENTRY(CacheClearE_4060
, Exec
, 107);
41 } else if (SysBase
->AttnFlags
& AFF_68020
) {
43 func
= AROS_SLIB_ENTRY(CacheClearE_20
, Exec
, 107);
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
);