2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: CacheClearE() - Clear the caches with extended control, Windows-hosted implementation
9 #include <exec/execbase.h>
10 #include <aros/atomic.h>
11 #include <aros/libcall.h>
13 #include "exec_intern.h"
15 AROS_LH3(void, CacheClearE
,
16 AROS_LHA(APTR
, address
, A0
),
17 AROS_LHA(ULONG
, length
, D0
),
18 AROS_LHA(ULONG
, caches
, D1
),
19 struct ExecBase
*, SysBase
, 107, Exec
)
23 /* Windows supports only instruction cache flush */
24 if (caches
& CACRF_ClearI
)
26 /* Forbid(). We inline it because we could use real executable jumptable,
27 in this case this function can be called for validating ExecBase
29 AROS_ATOMIC_INC(SysBase
->TDNestCnt
);
31 PD(SysBase
).FlushInstructionCache(PD(SysBase
).MyProcess
, address
, length
);
33 /* It's okay to use library base now */