*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> standard/cacheflush (2)              
Title
Content
Arch
Section
 

Contents


CACHEFLUSH(2)							 CACHEFLUSH(2)


NAME    [Toc]    [Back]

     cacheflush, _flush_cache -	flush contents of instruction and/or data
     cache

SYNOPSIS    [Toc]    [Back]

     #include <sys/cachectl.h>

     int cacheflush (void *addr, int nbytes, int cache);

     int _flush_cache (char *addr, int nbytes, int cache);

DESCRIPTION    [Toc]    [Back]

     cacheflush	and _flush_cache are different names for the same function.
     They flush	the contents of	the indicated cache(s) for user	addresses in
     the range addr to (addr+nbytes-1).	 The cache parameter may be one	of:

     ICACHE	      Flush only the instruction cache

     DCACHE	      Flush only the data cache

     BCACHE	      Flush both the instruction and the data cache

RETURN VALUE    [Toc]    [Back]

     cacheflush	and _flush_cache return	0 when no errors are detected.	If
     errors are	detected, they return -1 with the error	cause indicated	in
     errno.  For IP19, IP21 and	IP25, the following describes the action of
     this command on any physical lines	corresponding to the input virtual
     address range that	may be present in the caches.  On IP19 and IP25,
     DCACHE flushing writes back any dirty data	and invalidates	the cache line
     in	the data and the secondary cache. ICACHE flushing on the IP19 and IP25
     consists of invalidating the line in the icache and the secondary cache.
     Additionally, prior to this, if the line is dirty in the dcache and/or
     secondary,	it is written back.  On	IP21s, DCACHE flushing is a no op, and
     ICACHE flushing does not affect the gcache	directly, but loads in a set
     of	different instructions into the	icache.	 The BCACHE option in all
     cases writes back the lines if they are dirty, and	then invalidates them
     if	they are present in any	of the caches (except for IP21s, where the
     lines are displaced from the icache).


ERRORS    [Toc]    [Back]

     [EINVAL]	      The cache	parameter is not one of	ICACHE,	DCACHE,	or
		      BCACHE.

     [EFAULT]	      Some or all of the address range addr to (addr+nbytes-1)
		      is not accessible.

SEE ALSO    [Toc]    [Back]

      
      
     cachectl(2)


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
arm_sync_icache NetBSD clean the cpu data cache and flush the cpu instruction cache
m68k_sync_icache NetBSD instruction cache synchronization
sync FreeBSD force completion of pending disk writes (flush cache)
sync OpenBSD force completion of pending disk writes (flush cache)
dump_clerk_cache HP-UX Displays the contents of the clerk cache
tcflush Tru64 Flush nontransmitted output data or nonread input data
nisshowcache HP-UX NIS+ utility to print out the contents of the shared cache file
VFS_SYNC FreeBSD flush unwritten data
bdflush Linux start, flush, or tune buffer-dirty-flush daemon
krs_flush HP-UX flush kernel registry services data to disk
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service