gtpa2m25Application Programming

Flushing Entries from a Logical Record Cache

To flush all the entries from a logical record cache, the application starts the flushCache function, passing a pointer to the returned cacheToken value for the cache to be flushed as input. The flush occurs immediately although other applications may also be using the cache. If the cache is a processor shared cache, no notification is sent to any other processors and no entries in their copy of the cache are affected.

See TPF C/C++ Language Support User's Guide for more information about the flushCache function.

The following example shows the function to flush a logical record cache:

long   flushCache( cacheTokenPtr cache_to_flush);

Examples

The following example shows how to flush all entries from the processor shared cache that was created previously.

flushCache ( &myCacheShared );    /* addr of the token for the cache  */
 
printf(" Shared_Cache flushed");  /* write message                    */
 
exit(0);                          /* and exit                         */
 

The following shows how to flush all entries from the processor unique cache that was created previously.

flushCache ( &myCacheUnique );    /* addr of the token for the cache  */
 
printf(" Unique_Cache flushed");  /* write message                    */
 
exit(0);                          /* and exit                         */