Use cline concurrency ctx instead of cache
Cacheline concurrency functions have their interface changed so that the cacheline concurrency private context is explicitly on the parameter list, rather than being taken from cache->device->concurrency.cache_line. Cache pointer is no longer provided as a parameter to these functions. Cacheline concurrency context now has a pointer to cache structure (for logging purposes only). The purpose of this change is to facilitate unit testing. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
@@ -9,7 +9,9 @@ int ocf_concurrency_init(struct ocf_cache *cache)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
result = ocf_cache_line_concurrency_init(cache);
|
||||
result = ocf_cache_line_concurrency_init(
|
||||
&cache->device->concurrency.cache_line,
|
||||
cache);
|
||||
|
||||
if (result)
|
||||
ocf_concurrency_deinit(cache);
|
||||
@@ -19,6 +21,8 @@ int ocf_concurrency_init(struct ocf_cache *cache)
|
||||
|
||||
void ocf_concurrency_deinit(struct ocf_cache *cache)
|
||||
{
|
||||
ocf_cache_line_concurrency_deinit(cache);
|
||||
ocf_cache_line_concurrency_deinit(
|
||||
&cache->device->concurrency.cache_line);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user