Back to index

glibc  2.9
Functions
cacheflush.c File Reference
#include <mach.h>
#include <mach/vm_attributes.h>

Go to the source code of this file.

Functions

void cacheflush (void *addr, unsigned size, int flag)

Function Documentation

void cacheflush ( void *  addr,
unsigned  size,
int  flag 
)

Definition at line 25 of file cacheflush.c.

{
  vm_machine_attribute_val_t val;

  switch (flag)
    {
    case 0:                 /* ? */
      val = MATTR_VAL_DCACHE_FLUSH;
    case 1:                 /* This is the only value GCC uses.  */
      val = MATTR_VAL_ICACHE_FLUSH;
      break;
    default:
      val = MATTR_VAL_CACHE_FLUSH;
    }

  __vm_machine_attribute (__mach_task_self (),
                       (vm_address_t) addr, size,
                       MATTR_CACHE,
                       &val);
}

Here is the call graph for this function: