5 .Nm sys_cache_control ,
6 .Nm sys_icache_invalidate ,
12 .In libkern/OSCacheControl.h
14 .Fn sys_cache_control "int function" "void *start" "size_t len"
16 .Fn sys_icache_invalidate "void *start" "size_t len"
18 .Fn sys_dcache_flush "void *start" "size_t len"
21 These functions operate on every cache line containing one of the
23 bytes of memory pointed to by
25 Normally the operations apply to every
26 processor in the system, but the exact semantics of these
27 operations is platform dependent. They should be used with caution.
30 performs the operation specified by
32 Refer to the header file for a list of currently supported functions.
34 .Fn sys_icache_invalidate
35 prepares memory for execution, typically by invalidating the instruction
36 cache for the indicated range. This should be called
37 after writing machine instructions to memory, and before
38 executing them. On IA32 processors this function is a NOP, because
39 their instruction caches are coherent.
42 writes modified data cache lines to main memory,
43 and then invalidates all lines in the range being operated on.
44 It can be useful when dealing with cache incoherent
48 returns zero on success, ENOTSUP if
55 These functions first appeared in Mac OS 10.5 (Leopard).