]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/ocf/src/concurrency/ocf_concurrency.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / ocf / src / concurrency / ocf_concurrency.h
1 /*
2 * Copyright(c) 2012-2018 Intel Corporation
3 * SPDX-License-Identifier: BSD-3-Clause-Clear
4 */
5
6 #ifndef OCF_CONCURRENCY_H_
7 #define OCF_CONCURRENCY_H_
8
9 #include "../ocf_cache_priv.h"
10
11 /**
12 * @file utils_req.h
13 * @brief OCF concurrency
14 */
15
16 /**
17 * @brief Lock result - Lock acquired successfully
18 */
19 #define OCF_LOCK_ACQUIRED 0
20
21 /**
22 * @brief Lock result - Lock not acquired, lock request added into waiting list
23 */
24 #define OCF_LOCK_NOT_ACQUIRED 1
25
26 /**
27 * @brief Initialize OCF concurrency module
28 *
29 * @param cache - OCF cache instance
30 * @return 0 - Initialization successful, otherwise ERROR
31 */
32 int ocf_concurrency_init(struct ocf_cache *cache);
33
34 /**
35 * @biref De-Initialize OCF concurrency module
36 *
37 * @param cache - OCF cache instance
38 */
39 void ocf_concurrency_deinit(struct ocf_cache *cache);
40
41 #include "ocf_cache_line_concurrency.h"
42
43 #endif /* OCF_CONCURRENCY_H_ */