cacheflush(2)
NAME
cacheflush − flush contents of instruction and/or data cache
SYNTAX
#include <mips/cachectl.h>
cacheflush(addr, nbytes, cache)
char *addr;
int nbytes, cache;
DESCRIPTION
Flushes contents of indicated caches for user addresses in the range of addr to (addr+nbytes-1). The cache parameter is one of the following:
ICACHE Flush only the instruction cache.
DCACHE Flush only the data cache.
BCACHE Flush both instruction and data caches.
RETURN VALUE
The cacheflush system call returns 0 when errors are not detected. If errors are detected, the cacheflush system call returns -1 with the error cause indicated in errno.
DIAGNOSTICS
[EFAULT] Some or all of the address range in the addr to (addr+nbytes-1) are not accessible.
[EINVAL] The cache parameter is ICACHE, DCACHE, or BCACHE.
System Calls