NAME
ssyyssccaacchheeccoonnttrrooll, ssyyssiiccaacchheeiinnvvaalliiddaattee, ssyyssddccaacchheefflluusshh - cache con-
trol LLIIBBRRAARRYYStandard C Library (libc, -lc)
SYNOPSIS
##iinncclluuddee <
int ssyyssccaacchheeccoonnttrrooll(int function, void *start, sizet len); void ssyyssiiccaacchheeiinnvvaalliiddaattee(void *start, sizet len); void ssyyssddccaacchheefflluusshh(void *start, sizet len);> DESCRIPTION
These functions operate on every cache line containing one of the len
bytes of memory pointed to by start. Normally the operations apply toevery processor in the system, but the exact semantics of these opera-
tions is platform dependent. They should be used with caution. ssyyssccaacchheeccoonnttrrooll() performs the operation specified by function. Refer to the header file for a list of currently supported functions. ssyyssiiccaacchheeiinnvvaalliiddaattee() prepares memory for execution, typically byinvalidating the instruction cache for the indicated range. This should
be called after writing machine instructions to memory, and before exe-
cuting them. On IA32 processors this function is a NOP, because theirinstruction caches are coherent.
ssyyssddccaacchheefflluusshh() writes modified data cache lines to main memory, and
then invalidates all lines in the range being operated on. It can beuseful when dealing with cache incoherent devices or DMA.
RETURN VALUES
ssyyssccaacchheeccoonnttrrooll() returns zero on success, ENOTSUP if function is not valid.SEE ALSO
atomic(3), barrier(3) HISTORY These functions first appeared in Mac OS 10.5 (Leopard). Darwin September 21, 2006 Darwin