Dynamic Load Balance 3.6.1+32-59d1
regions.h
Go to the documentation of this file.
1/*********************************************************************************/
2/* Copyright 2009-2025 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#ifndef REGIONS_H
21#define REGIONS_H
22
23#include <stdbool.h>
24
25typedef struct dlb_monitor_t dlb_monitor_t;
26typedef struct SubProcessDescriptor subprocess_descriptor_t;
27
28/* Global region getters */
30const char* region_get_global_name(void);
31
32/* Helper functions for GTree structures */
33int region_compare_by_name(const void *a, const void *b);
34void region_dealloc(void *data);
35
36/* Region functions */
38 region_register(const subprocess_descriptor_t *spd, const char* name);
39int region_reset(const subprocess_descriptor_t *spd, dlb_monitor_t *monitor);
40int region_start(const subprocess_descriptor_t *spd, dlb_monitor_t *monitor);
41int region_stop(const subprocess_descriptor_t *spd, dlb_monitor_t *monitor);
42bool region_is_started(const dlb_monitor_t *monitor);
43void region_set_internal(struct dlb_monitor_t *monitor, bool internal);
44int region_report(const subprocess_descriptor_t *spd, const dlb_monitor_t *monitor);
45
46
47#endif /* REGIONS_H */
void region_set_internal(struct dlb_monitor_t *monitor, bool internal)
Definition: regions.c:395
int region_compare_by_name(const void *a, const void *b)
Definition: regions.c:174
void region_dealloc(void *data)
Definition: regions.c:179
bool region_is_started(const dlb_monitor_t *monitor)
Definition: regions.c:391
int region_stop(const subprocess_descriptor_t *spd, dlb_monitor_t *monitor)
Definition: regions.c:346
int region_reset(const subprocess_descriptor_t *spd, dlb_monitor_t *monitor)
Definition: regions.c:266
struct dlb_monitor_t * region_get_global(const subprocess_descriptor_t *spd)
Definition: regions.c:164
int region_report(const subprocess_descriptor_t *spd, const dlb_monitor_t *monitor)
Definition: regions.c:399
dlb_monitor_t * region_register(const subprocess_descriptor_t *spd, const char *name)
Definition: regions.c:196
int region_start(const subprocess_descriptor_t *spd, dlb_monitor_t *monitor)
Definition: regions.c:300
const char * region_get_global_name(void)
Definition: regions.c:169
Definition: dlb_talp.h:35
const char * name
Definition: dlb_talp.h:37
Definition: spd.h:33