cacheflush(2) — RISC
Name
cacheflush − flush the instruction cache, data cache, or both
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 the instruction and data caches.
Return Values
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 not ICACHE, DCACHE, or BCACHE.