compiler/clib: Do not call __arosc_get_ctype() for each call to a ctype.h macro.
[AROS.git] / arch / all-mingw32 / exec / cachecleare.c
blob8ecb9ca6ef133d618a8527f8ee813bca9642a42f
1 /*
2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: CacheClearE() - Clear the caches with extended control, Windows-hosted implementation
6 Lang: english
7 */
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)
21 AROS_LIBFUNC_INIT
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
28 itself. */
29 AROS_ATOMIC_INC(SysBase->TDNestCnt);
31 PD(SysBase).FlushInstructionCache(PD(SysBase).MyProcess, address, length);
33 /* It's okay to use library base now */
34 Permit();
37 AROS_LIBFUNC_EXIT
38 } /* CacheClearE */