| CACHEFLUSH(3) | Library Functions Manual (mips64) | CACHEFLUSH(3) |
cacheflush,
_flush_cache — CPU cache
synchronization functions
#include
<machine/sysarch.h>
int
cacheflush(void
*addr, int nbytes,
int cache);
int
_flush_cache(char
*addr, int nbytes,
int cache);
cacheflush()
allows a process to synchronize the contents of the processor caches with
main memory. Since MIPS processors have separate instruction and data
caches, this function allows for dynamically generated code to run
correctly.
cacheflush operates on a contiguous memory
range in the current process address space, starting at address
addr and nbytes bytes long. The
caches to be synchronized are specified in the cache
argument with one of the following values:
_flush_cache is an alias for the
cacheflush function.
Upon successful completion, cacheflush
returns zero. Otherwise, a value of -1 is returned and
errno is set to indicate the error.
cacheflush will fail if:
| June 6, 2025 | Debian |