Motr  M0
common.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2020 Seagate Technology LLC and/or its Affiliates
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * For any questions about this software or licensing,
18  * please email opensource@seagate.com or cortx-questions@seagate.com.
19  *
20  */
21 
22 
23 #pragma once
24 
25 #ifndef __MOTR_ISCSERVICE_UT_COMMON_H__
26 #define __MOTR_ISCSERVICE_UT_COMMON_H__
27 
28 #include "lib/thread.h"
29 #include "ut/ut.h"
30 #include "ut/misc.h"
31 enum {
32  THR_NR = 5,
33 };
34 
35 struct thr_args {
36  void *ta_data;
38  int ta_rc;
39 };
40 
45 };
46 
47 M0_INTERNAL void cc_block_init(struct cnc_cntrl_block *cc_block, size_t size,
48  void (*t_data_init)(void *, int));
49 
50 M0_INTERNAL void cc_block_launch(struct cnc_cntrl_block *cc_block,
51  void (*t_op)(void *));
52 
53 #endif
54 /*
55  * Local variables:
56  * c-indentation-style: "K&R"
57  * c-basic-offset: 8
58  * tab-width: 8
59  * fill-column: 80
60  * scroll-step: 1
61  * End:
62  */
struct m0_thread ccb_threads[THR_NR]
Definition: common.h:42
struct m0_semaphore * ta_barrier
Definition: common.h:37
M0_INTERNAL void cc_block_launch(struct cnc_cntrl_block *cc_block, void(*t_op)(void *))
Definition: common.c:47
int ta_rc
Definition: common.h:38
Definition: common.h:32
struct thr_args ccb_args[THR_NR]
Definition: common.h:44
M0_INTERNAL void cc_block_init(struct cnc_cntrl_block *cc_block, size_t size, void(*t_data_init)(void *, int))
Definition: common.c:29
m0_bcount_t size
Definition: di.c:39
void * ta_data
Definition: common.h:36
struct m0_semaphore ccb_barrier
Definition: common.h:43