Add function to check for lazy write cache mode (WO or WB)
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -695,6 +695,17 @@ typedef void (*ocf_mngt_cache_save_end_t)(ocf_cache_t cache,
|
||||
void ocf_mngt_cache_save(ocf_cache_t cache,
|
||||
ocf_mngt_cache_save_end_t cmpl, void *priv);
|
||||
|
||||
/**
|
||||
* @brief Determines whether given cache mode has write-back semantics, i.e. it
|
||||
* allows for writes to be serviced in cache and lazily propagated to core.
|
||||
*
|
||||
* @param[in] mode input cache mode
|
||||
*/
|
||||
static inline bool ocf_mngt_cache_mode_has_lazy_write(ocf_cache_mode_t mode)
|
||||
{
|
||||
return mode == ocf_cache_mode_wb || mode == ocf_cache_mode_wo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set cache mode in given cache
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user