]>
git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/ocf/src/concurrency/ocf_concurrency.h
2 * Copyright(c) 2012-2018 Intel Corporation
3 * SPDX-License-Identifier: BSD-3-Clause-Clear
6 #ifndef OCF_CONCURRENCY_H_
7 #define OCF_CONCURRENCY_H_
9 #include "../ocf_cache_priv.h"
13 * @brief OCF concurrency
17 * @brief Lock result - Lock acquired successfully
19 #define OCF_LOCK_ACQUIRED 0
22 * @brief Lock result - Lock not acquired, lock request added into waiting list
24 #define OCF_LOCK_NOT_ACQUIRED 1
27 * @brief Initialize OCF concurrency module
29 * @param cache - OCF cache instance
30 * @return 0 - Initialization successful, otherwise ERROR
32 int ocf_concurrency_init(struct ocf_cache
*cache
);
35 * @biref De-Initialize OCF concurrency module
37 * @param cache - OCF cache instance
39 void ocf_concurrency_deinit(struct ocf_cache
*cache
);
41 #include "ocf_cache_line_concurrency.h"
43 #endif /* OCF_CONCURRENCY_H_ */