Motr  M0
pump.h
Go to the documentation of this file.
1 /* -*- C -*- */
2 /*
3  * Copyright (c) 2012-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_CM_PUMP_H__
26 #define __MOTR_CM_PUMP_H__
27 
28 #include "fop/fom.h"
29 
34 /* Import */
35 struct m0_cm;
36 struct m0_cm_type;
37 
49 struct m0_cm_cp_pump {
51  struct m0_fom p_fom;
52 
60  struct m0_cm_cp *p_cp;
61  uint64_t p_magix;
64 };
65 
66 M0_INTERNAL void m0_cm_cp_pump_init(struct m0_cm_type *cmtype);
67 
68 M0_INTERNAL void m0_cm_cp_pump_prepare(struct m0_cm *cm);
73 M0_INTERNAL void m0_cm_cp_pump_start(struct m0_cm *cm);
74 M0_INTERNAL void m0_cm_cp_pump_destroy(struct m0_cm *cm);
78 M0_INTERNAL void m0_cm_cp_pump_wakeup(struct m0_cm *cm);
79 
80 M0_INTERNAL bool m0_cm_cp_pump_is_complete(const struct m0_cm_cp_pump *cp_pump);
83 /* __MOTR_CM_PUMP_H__ */
84 
85 #endif
86 
87 /*
88  * Local variables:
89  * c-indentation-style: "K&R"
90  * c-basic-offset: 8
91  * tab-width: 8
92  * fill-column: 80
93  * scroll-step: 1
94  * End:
95  */
Definition: cp.h:160
struct m0_sm_ast p_wakeup
Definition: pump.h:63
struct m0_fom p_fom
Definition: pump.h:51
Definition: sm.h:504
struct m0_fom_timeout p_timeout
Definition: pump.h:53
M0_INTERNAL void m0_cm_cp_pump_init(struct m0_cm_type *cmtype)
Definition: pump.c:426
static struct m0_cm * cm
Definition: cm.c:63
M0_INTERNAL void m0_cm_cp_pump_prepare(struct m0_cm *cm)
Definition: pump.c:433
M0_INTERNAL void m0_cm_cp_pump_start(struct m0_cm *cm)
Definition: pump.c:479
M0_INTERNAL void m0_cm_cp_pump_destroy(struct m0_cm *cm)
Definition: pump.c:446
uint64_t p_magix
Definition: pump.h:61
Definition: fom.h:481
Definition: cm.h:143
M0_INTERNAL bool m0_cm_cp_pump_is_complete(const struct m0_cm_cp_pump *cp_pump)
Definition: pump.c:420
M0_INTERNAL void m0_cm_cp_pump_wakeup(struct m0_cm *cm)
struct m0_cm_cp * p_cp
Definition: pump.h:60
Definition: cm.h:166
struct m0_clink p_complete
Definition: pump.h:62