cache man page on Darwin

Man page or keyword search:  
man Server   23457 pages
apropos Keyword Search (all sections)
Output format
Darwin logo
[printable version]

CACHE(3)		 BSD Library Functions Manual		      CACHE(3)

NAME
     sys_cache_control, sys_icache_invalidate, sys_dcache_flush — cache con‐
     trol

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <libkern/OSCacheControl.h>

     int
     sys_cache_control(int function, void *start, size_t len);

     void
     sys_icache_invalidate(void *start, size_t len);

     void
     sys_dcache_flush(void *start, size_t len);

DESCRIPTION
     These functions operate on every cache line containing one of the len
     bytes of memory pointed to by start.  Normally the operations apply to
     every processor in the system, but the exact semantics of these opera‐
     tions is platform dependent.  They should be used with caution.

     sys_cache_control() performs the operation specified by function.	Refer
     to the header file for a list of currently supported functions.

     sys_icache_invalidate() prepares memory for execution, typically by
     invalidating the instruction cache for the indicated range.  This should
     be called after writing machine instructions to memory, and before exe‐
     cuting them.  On IA32 processors this function is a NOP, because their
     instruction caches are coherent.

     sys_dcache_flush() writes modified data cache lines to main memory, and
     then invalidates all lines in the range being operated on.	 It can be
     useful when dealing with cache incoherent devices or DMA.

RETURN VALUES
     sys_cache_control() returns zero on success, ENOTSUP if function is not
     valid.

SEE ALSO
     atomic(3), barrier(3)

HISTORY
     These functions first appeared in Mac OS 10.5 (Leopard).

Darwin			      September 21, 2006			Darwin
[top]

List of man pages available for Darwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net