Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / .unmaintained / arm-all / exec / cache.c
blob324aa851e59b52b477b9aa177606b9956df3b7ce
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Flush Caches
6 Lang: english
7 */
9 #include <errno.h>
10 #include <asm/cachectl.h>
11 /* GNU libc 2 has this included in <sys/syscall.h>, but libc5 doesn't :-( */
12 #include <asm/unistd.h>
13 static inline _syscall4(int,cacheflush,unsigned long,addr,int,scope,int,cache,unsigned long,len)
15 /******************************************************************************
17 NAME */
18 #include <proto/exec.h>
19 #include <exec/execbase.h>
21 AROS_LH3(void, CacheClearE,
23 /* SYNOPSIS */
24 AROS_LHA(APTR, address, A0),
25 AROS_LHA(ULONG, length, D0),
26 AROS_LHA(ULONG, caches, D1),
28 /* LOCATION */
29 struct ExecBase *, SysBase, 107, Exec)
31 /* FUNCTION
33 INPUTS
35 RESULT
37 NOTES
39 EXAMPLE
41 BUGS
43 SEE ALSO
45 INTERNALS
47 HISTORY
49 ******************************************************************************/
51 ULONG scope, cpucache = 0;
53 if (caches & CACRF_ClearD)
54 cpucache |= FLUSH_CACHE_DATA;
56 if (caches & CACRF_ClearI)
57 cpucache |= FLUSH_CACHE_INSN;
59 if (length == (ULONG)-1)
60 scope = FLUSH_SCOPE_ALL;
61 else
62 scope = FLUSH_SCOPE_LINE;
64 (void) cacheflush((unsigned long)address, scope, cpucache, length);
65 } /* CacheClearE */
67 /******************************************************************************
69 NAME */
70 #include <proto/exec.h>
72 AROS_LH0(void, CacheClearU,
74 /* LOCATION */
75 struct ExecBase *, SysBase, 106, Exec)
77 /* FUNCTION
79 INPUTS
81 RESULT
83 NOTES
85 EXAMPLE
87 BUGS
89 SEE ALSO
91 INTERNALS
93 HISTORY
95 ******************************************************************************/
97 (void) cacheflush(0, FLUSH_SCOPE_ALL, FLUSH_CACHE_BOTH, 0);
98 } /* CacheClearU */