Synopsis
int libmem_flush(void);
Description

libmem_flush flushes any outstanding memory operations and returns memory to read mode if applicable.

libmem_flush returns — The LIBMEM status result.

LIBMEM drivers do not necessarily carry out operations immediately or they may leave the memory in an unreadable state for performance reasons. You should call libmem_flush once you have finished carrying out memory operations in order to complete all outstanding transactions and return the memory to a readable state.

Example:

int res;

res = libmem_flush();

if (res == LIBMEM_STATUS_SUCCESS)
  printf("libmem_flush : success\n");
else
  printf("libmem_flush : failed (%d)\n", res);