Motr  M0
st_assert.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_ST_ASSERT_H__
26 #define __MOTR_ST_ASSERT_H__
27 
28 #include "motr/client.h"
29 
30 /* XXX juan: file defining assertimpl should be #included */
31 #define ST_ASSERT_FATAL(a) \
32  do { \
33  if (!st_assertimpl((a),#a,__FILE__,__LINE__,__func__))\
34  return; \
35  } while(0);
36 
37 
38 /* XXX juan: we need doxygen doc for all these functions. */
39 /* Functions for cleaner*/
40 int st_cleaner_init(void);
41 void st_cleaner_fini(void);
42 bool st_is_cleaner_up(void);
43 void st_cleaner_enable(void);
44 void st_cleaner_disable(void);
45 void st_cleaner_empty_bin(void);
46 
47 void st_mark_op(struct m0_op *op);
48 void st_unmark_op(struct m0_op *op);
49 void st_mark_entity(struct m0_entity *entity);
50 void st_unmark_entity(struct m0_entity *entity);
51 void st_mark_ptr(void *ptr);
52 void st_unmark_ptr(void *ptr);
53 
54 #endif /* __MOTR_ST_ASSERT_H__ */
void st_unmark_entity(struct m0_entity *entity)
Definition: st_assert.c:198
static void ptr(struct m0_addb2__context *ctx, const uint64_t *v, char *buf)
Definition: dump.c:440
void st_mark_op(struct m0_op *op)
Definition: st_assert.c:131
int st_cleaner_init(void)
Definition: st_assert.c:259
void st_cleaner_empty_bin(void)
Definition: st_assert.c:418
void st_mark_ptr(void *ptr)
Definition: st_assert.c:218
void st_mark_entity(struct m0_entity *entity)
Definition: st_assert.c:177
op
Definition: libdemo.c:64
Definition: client.h:641
bool st_is_cleaner_up(void)
Definition: st_assert.c:326
void st_cleaner_enable(void)
Definition: st_assert.c:337
void st_cleaner_fini(void)
Definition: st_assert.c:307
void st_unmark_op(struct m0_op *op)
Definition: st_assert.c:156
void st_unmark_ptr(void *ptr)
Definition: st_assert.c:239
void st_cleaner_disable(void)
Definition: st_assert.c:348