Coverage Report

Created: 2026-06-30 07:16

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/freeradius-server/src/lib/unlang/parallel_priv.h
Line
Count
Source
1
#pragma once
2
/*
3
 *  This program is free software; you can redistribute it and/or modify
4
 *  it under the terms of the GNU General Public License as published by
5
 *  the Free Software Foundation; either version 2, or (at your option)
6
 *  any later version.
7
 *
8
 *  This program is distributed in the hope that it will be useful,
9
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 *  GNU General Public License for more details.
12
 *
13
 *  You should have received a copy of the GNU General Public License
14
 *  along with this program; if not, write to the Free Software Foundation,
15
 *  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16
 */
17
18
/**
19
 * $Id: eb71d1cd6ad81a4adcb5d8c3cf4e8c2bfb0617c9 $
20
 *
21
 * @file unlang/parallel_priv.h
22
 * @brief Declarations for the unlang "parallel" keyword
23
 *
24
 * Should be moved into parallel.c when the parallel stuff is fully extracted
25
 * from interpret.c
26
 *
27
 * @copyright 2006-2019 The FreeRADIUS server project
28
 */
29
#include "child_request_priv.h"
30
#include "unlang_priv.h"
31
32
#ifdef __cplusplus
33
extern "C" {
34
#endif
35
36
typedef struct {
37
  unlang_result_t     result;   //!< our result
38
39
  unsigned int      num_children; //!< How many children are executing.
40
  unsigned int      num_runnable; //!< How many children are complete.
41
42
  bool        detach;   //!< are we creating the child detached
43
  bool        clone;    //!< are the children cloned
44
45
  unlang_t      *instruction; //!< The instruction the children should
46
              ///< start executing.
47
48
  unlang_child_request_t    children[]; //!< Array of children.
49
} unlang_parallel_state_t;
50
51
typedef struct {
52
  unlang_group_t      group;
53
  bool        detach;   //!< are we creating the child detached
54
  bool        clone;
55
} unlang_parallel_t;
56
57
/** Cast a group structure to the parallel keyword extension
58
 *
59
 */
60
static inline unlang_parallel_t *unlang_group_to_parallel(unlang_group_t *g)
61
0
{
62
0
  return talloc_get_type_abort(g, unlang_parallel_t);
63
0
}
Unexecuted instantiation: compile.c:unlang_group_to_parallel
Unexecuted instantiation: parallel.c:unlang_group_to_parallel
64
65
/** Cast a parallel keyword extension to a group structure
66
 *
67
 */
68
static inline unlang_group_t *unlang_parallel_to_group(unlang_parallel_t *parallel)
69
0
{
70
0
  return (unlang_group_t *)parallel;
71
0
}
Unexecuted instantiation: compile.c:unlang_parallel_to_group
Unexecuted instantiation: parallel.c:unlang_parallel_to_group
72
73
#ifdef __cplusplus
74
}
75
#endif