GCC Code Coverage Report


Directory: src/
File: src/apis/DLB_interface_mngo.c
Date: 2026-10-14 08:39:21
Exec Total Coverage
Lines: 0 20 0.0%
Functions: 0 4 0.0%
Branches: 0 8 0.0%

Line Branch Exec Source
1 /*********************************************************************************/
2 /* Copyright 2009-2023 Barcelona Supercomputing Center */
3 /* */
4 /* This file is part of the DLB library. */
5 /* */
6 /* DLB is free software: you can redistribute it and/or modify */
7 /* it under the terms of the GNU Lesser General Public License as published by */
8 /* the Free Software Foundation, either version 3 of the License, or */
9 /* (at your option) any later version. */
10 /* */
11 /* DLB is distributed in the hope that it will be useful, */
12 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
14 /* GNU Lesser General Public License for more details. */
15 /* */
16 /* You should have received a copy of the GNU Lesser General Public License */
17 /* along with DLB. If not, see <https://www.gnu.org/licenses/>. */
18 /*********************************************************************************/
19
20 /* MNGO application manager */
21
22 #include "apis/dlb_mngo.h"
23
24 #include "apis/dlb_errors.h"
25 #include "LB_core/spd.h"
26 #include "mngo/mngo.h"
27 #include "support/debug.h"
28 #include "support/dlb_common.h"
29
30 /*********************************************************************************/
31 /* MNGO */
32 /*********************************************************************************/
33
34 DLB_EXPORT_SYMBOL
35 ✗ int DLB_MNGO_Wake_manager(void) {
36 ✗ spd_enter_dlb(NULL);
37 ✗ if (unlikely(!thread_spd->mngo_info)) {
38 ✗ return DLB_ERR_NOMNGO;
39 }
40 ✗ return mngo_manager_wake(thread_spd);
41 }
42
43 /*********************************************************************************/
44 /* MNGO Regions */
45 /*********************************************************************************/
46
47 DLB_EXPORT_SYMBOL
48 ✗ dlb_mngo_region_t* DLB_MNGO_RegionRegister(const char *name) {
49 ✗ spd_enter_dlb(NULL);
50 ✗ if (unlikely(!thread_spd->mngo_info)) {
51 ✗ return NULL;
52 }
53 ✗ return mngo_region_register(thread_spd, name);
54 }
55
56 DLB_EXPORT_SYMBOL
57 ✗ int DLB_MNGO_RegionStart(dlb_mngo_region_t *region) {
58 ✗ spd_enter_dlb(NULL);
59 ✗ if (unlikely(!thread_spd->mngo_info)) {
60 ✗ return DLB_ERR_NOMNGO;
61 }
62 ✗ return mngo_region_start(thread_spd, region);
63 }
64
65 DLB_EXPORT_SYMBOL
66 ✗ int DLB_MNGO_RegionStop(dlb_mngo_region_t *region) {
67 ✗ spd_enter_dlb(NULL);
68 ✗ if (unlikely(!thread_spd->mngo_info)) {
69 ✗ return DLB_ERR_NOMNGO;
70 }
71 ✗ return mngo_region_stop(thread_spd, region);
72 }
73