cacheflush(2) System Calls Manual cacheflush(2)
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 follow-
ing:
ICACHE Flush only the instruction cache.
DCACHE Flush only the data cache.
BCACHE Flush both the instruction and data caches.
Return Values
The system call returns 0 when errors are not detected. If errors are detected, the 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.
4th Berkeley Distribution RISC cacheflush(2)