The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
parallel_priv.h
Go to the documentation of this file.
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: a980f5b2efed4fc9f0dc987f853568dd3874abfb $
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
33extern "C" {
34#endif
35
36typedef struct {
39
40 unsigned int num_children; //!< How many children are executing.
41 unsigned int num_runnable; //!< How many children are complete.
42
43 bool detach; //!< are we creating the child detached
44 bool clone; //!< are the children cloned
45
46 unlang_t *instruction; //!< The instruction the children should
47 ///< start executing.
48
49 unlang_child_request_t children[]; //!< Array of children.
51
52typedef struct {
54 bool detach; //!< are we creating the child detached
55 bool clone;
57
58/** Cast a group structure to the parallel keyword extension
59 *
60 */
62{
63 return talloc_get_type_abort(g, unlang_parallel_t);
64}
65
66/** Cast a parallel keyword extension to a group structure
67 *
68 */
70{
71 return (unlang_group_t *)parallel;
72}
73
74#ifdef __cplusplus
75}
76#endif
Each child has a state, a number, a request, and a count of their siblings.
static unlang_group_t * unlang_parallel_to_group(unlang_parallel_t *parallel)
Cast a parallel keyword extension to a group structure.
bool detach
are we creating the child detached
static unlang_parallel_t * unlang_group_to_parallel(unlang_group_t *g)
Cast a group structure to the parallel keyword extension.
unsigned int num_runnable
How many children are complete.
unlang_t * instruction
The instruction the children should start executing.
bool clone
are the children cloned
bool detach
are we creating the child detached
unlang_group_t group
unsigned int num_children
How many children are executing.
rlm_rcode_t
Return codes indicating the result of the module call.
Definition rcode.h:40
Private interpreter structures and functions.
Generic representation of a grouping.
A node in a graph of unlang_op_t (s) that we execute.