3

example:

int foo(void)
{
    static volatile int data;
    data = 0xaaa;
    /* something to assure cache flushing */
    if (data == 0xaaa)
        return 1;
    return 0;
}

the question is what can assure that flushing. thanks.

lkanab
  • 836
  • 1
  • 7
  • 19

1 Answers1

5

VxWorks provides cacheLib which enables you to perform certain cache operations, flushing as well. You'll have to check the reference manual for your Version of VxWorks. Anyway, from version 5.4:

STATUS cacheFlush
(
    CACHE_TYPE cache,   /* cache to flush */
    void *     address, /* virtual address */
    size_t     bytes    /* number of bytes to flush */
)

Source: VxWorks V 5.4 cacheLib

Sebastian Dressler
  • 7,744
  • 2
  • 31
  • 55