Introduce core priv
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
b871d32617
commit
108fe28ad4
@ -239,4 +239,21 @@ int ocf_core_visit(ocf_cache_t cache, ocf_core_visitor_t visitor, void *cntx,
|
|||||||
*/
|
*/
|
||||||
int ocf_core_get_info(ocf_core_t core, struct ocf_core_info *info);
|
int ocf_core_get_info(ocf_core_t core, struct ocf_core_info *info);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set core private data
|
||||||
|
*
|
||||||
|
* @param[in] core Core object
|
||||||
|
* @param[in] priv Private data
|
||||||
|
*/
|
||||||
|
void ocf_core_set_priv(ocf_core_t core, void *priv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get core private data
|
||||||
|
*
|
||||||
|
* @param[in] core Core object
|
||||||
|
*
|
||||||
|
* @retval Private data
|
||||||
|
*/
|
||||||
|
void *ocf_core_get_priv(ocf_core_t core);
|
||||||
|
|
||||||
#endif /* __OCF_CORE_H__ */
|
#endif /* __OCF_CORE_H__ */
|
||||||
|
@ -620,3 +620,15 @@ int ocf_core_get_info(ocf_core_t core, struct ocf_core_info *info)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ocf_core_set_priv(ocf_core_t core, void *priv)
|
||||||
|
{
|
||||||
|
OCF_CHECK_NULL(core);
|
||||||
|
core->priv = priv;
|
||||||
|
}
|
||||||
|
|
||||||
|
void *ocf_core_get_priv(ocf_core_t core)
|
||||||
|
{
|
||||||
|
OCF_CHECK_NULL(core);
|
||||||
|
return core->priv;
|
||||||
|
}
|
||||||
|
@ -91,6 +91,8 @@ struct ocf_core {
|
|||||||
uint32_t added : 1;
|
uint32_t added : 1;
|
||||||
|
|
||||||
struct ocf_counters_core *counters;
|
struct ocf_counters_core *counters;
|
||||||
|
|
||||||
|
void *priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool ocf_core_is_valid(ocf_cache_t cache, ocf_core_id_t id);
|
bool ocf_core_is_valid(ocf_cache_t cache, ocf_core_id_t id);
|
||||||
|
Loading…
Reference in New Issue
Block a user