![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Private interpreter structures and functions. More...
#include <freeradius-devel/server/cf_util.h>
#include <freeradius-devel/server/map_proc.h>
#include <freeradius-devel/server/modpriv.h>
#include <freeradius-devel/server/time_tracking.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/unlang/base.h>
#include <freeradius-devel/io/listen.h>
Go to the source code of this file.
Data Structures | |
struct | unlang_compile_ctx_t |
struct | unlang_group_t |
Generic representation of a grouping. More... | |
struct | unlang_op_t |
An unlang operation. More... | |
struct | unlang_retry_t |
struct | unlang_s |
A node in a graph of unlang_op_t (s) that we execute. More... | |
struct | unlang_stack_frame_s |
Our interpreter stack, as distinct from the C stack. More... | |
struct | unlang_stack_t |
An unlang stack associated with a request. More... | |
struct | unlang_thread_t |
struct | unlang_tmpl_t |
A naked xlat. More... | |
struct | unlang_variable_t |
Macros | |
#define | has_debug_braces(_thing) |
#define | MOD_NUM_TYPES (UNLANG_TYPE_XLAT + 1) |
#define | RULES_VERIFY(_rules) do { if (unlang_rules_verify(_rules) < 0) return NULL; } while (0) |
#define | UNLANG_DETACHABLE (true) |
#define | unlang_frame_perf_cleanup(_x) |
#define | unlang_frame_perf_init(_x) |
#define | unlang_frame_perf_resume(_x) |
#define | unlang_frame_perf_yield(_x) |
#define | UNLANG_IGNORE ((unlang_t *) -1) |
#define | UNLANG_NEXT_SIBLING (true) |
#define | UNLANG_NEXT_STOP (false) |
#define | UNLANG_NORMAL_CHILD (false) |
Typedefs | |
typedef unlang_t *(* | unlang_compile_t) (unlang_t *parent, unlang_compile_ctx_t *unlang_ctx, CONF_ITEM const *ci) |
typedef void(* | unlang_dump_t) (request_t *request, unlang_stack_frame_t *frame) |
Custom callback for dumping information about frame state. | |
typedef unlang_action_t(* | unlang_process_t) (unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
Function to call when interpreting a frame. | |
typedef void(* | unlang_signal_t) (request_t *request, unlang_stack_frame_t *frame, fr_signal_t action) |
Function to call if the request was signalled. | |
typedef struct unlang_stack_frame_s | unlang_stack_frame_t |
typedef struct unlang_s | unlang_t |
typedef int(* | unlang_thread_instantiate_t) (unlang_t const *instruction, void *thread_inst) |
Variables | |
fr_table_num_sorted_t const | mod_action_table [] |
size_t | mod_action_table_len |
fr_table_num_sorted_t const | mod_rcode_table [] |
size_t | mod_rcode_table_len |
fr_hash_table_t * | unlang_op_table |
unlang_op_t | unlang_ops [] |
Different operations the interpreter can execute. | |
Debug functions | |
void | stack_dump (request_t *request) |
void | stack_dump_with_actions (request_t *request) |
Conversion functions for converting #unlang_t to its specialisations | |
Simple conversions: unlang_module_t and unlang_group_t are subclasses of unlang_t, so we often want to go back and forth between them. | |
static unlang_group_t * | unlang_generic_to_group (unlang_t const *p) |
static unlang_tmpl_t * | unlang_generic_to_tmpl (unlang_t const *p) |
static unlang_t * | unlang_group_to_generic (unlang_group_t const *p) |
static unlang_t * | unlang_tmpl_to_generic (unlang_tmpl_t const *p) |
Internal interpreter functions needed by ops | |
int | unlang_interpret_push (unlang_result_t *p_result, request_t *request, unlang_t const *instruction, unlang_frame_conf_t const *conf, bool do_next_sibling) |
Push a new frame onto the stack. | |
unlang_action_t | unlang_interpret_push_children (unlang_result_t *p_result, request_t *request, rlm_rcode_t default_rcode, bool do_next_sibling) |
Push the children of the current frame onto a new frame onto the stack. | |
void | unlang_op_free (void) |
int | unlang_op_init (void) |
io shims | |
Functions to simulate a 'proto' module when we're running 'fake' requests. i.e. those created by parallel and subrequest. | |
request_t * | unlang_io_subrequest_alloc (request_t *parent, fr_dict_t const *namespace, bool detachable) |
Allocate a child request based on the parent. | |
op init functions | |
Functions to trigger registration of the various unlang ops. | |
void | unlang_call_init (void) |
void | unlang_caller_init (void) |
void | unlang_catch_init (void) |
void | unlang_condition_init (void) |
void | unlang_detach_init (void) |
Initialise subrequest ops. | |
void | unlang_edit_init (void) |
void | unlang_finally_init (void) |
void | unlang_foreach_init (void) |
void | unlang_function_init (void) |
void | unlang_group_init (void) |
void | unlang_limit_init (void) |
void | unlang_load_balance_init (void) |
void | unlang_map_init (void) |
void | unlang_module_init (void) |
void | unlang_parallel_init (void) |
void | unlang_register (unlang_op_t *op) |
Register an operation with the interpreter. | |
void | unlang_return_init (void) |
int | unlang_subrequest_op_init (void) |
Initialise subrequest ops. | |
void | unlang_switch_init (void) |
void | unlang_timeout_init (void) |
void | unlang_tmpl_init (void) |
void | unlang_transaction_init (void) |
void | unlang_try_init (void) |
Private interpreter structures and functions.
Definition in file unlang_priv.h.
struct unlang_compile_ctx_t |
Definition at line 206 of file unlang_priv.h.
Data Fields | ||
---|---|---|
unlang_mod_actions_t | actions | |
tmpl_rules_t const * | rules | |
char const * | section_name1 | |
char const * | section_name2 | |
virtual_server_t const * | vs |
Virtual server we're compiling in the context of. This shouldn't change during the compilation of a single unlang section. |
struct unlang_group_t |
Generic representation of a grouping.
Can represent IF statements, maps, update sections etc...
Definition at line 152 of file unlang_priv.h.
Data Fields | ||
---|---|---|
unlang_t * | children |
Children beneath this group. The body of an if section for example. |
CONF_SECTION * | cs | |
int | num_children | |
unlang_t | self | |
unlang_t ** | tail | pointer to the tail which gets updated |
unlang_variable_t * | variables | rarely used, so we don't usually need it |
struct unlang_op_t |
An unlang operation.
These are like the opcodes in other interpreters. Each operation, when executed will return an unlang_action_t, which determines what the interpreter does next.
Definition at line 309 of file unlang_priv.h.
Data Fields | ||
---|---|---|
unlang_compile_t | compile | compile the keyword |
unlang_dump_t | dump | Dump additional information about the frame state. |
unlang_op_flag_t | flag | Interpreter flags for this operation. |
size_t | frame_state_pool_objects | How many sub-allocations we expect. |
size_t | frame_state_pool_size | The total size of the pool to alloc. |
size_t | frame_state_size | size of instance data in the stack frame |
char const * | frame_state_type | talloc name of the frame instance data |
unlang_process_t | interpret | Function to interpret the keyword. |
char const * | name | Name of the keyword. |
unsigned | pool_headers | How much additional space to allocate for chunk headers. |
size_t | pool_len | How much additional space to allocate for chunks. |
unlang_signal_t | signal | Function to signal stop / dup / whatever. |
size_t | thread_inst_size | |
char const * | thread_inst_type | |
unlang_thread_instantiate_t | thread_instantiate | per-thread instantiation function |
unlang_type_t | type | enum value for the keyword |
char const * | unlang_name | Talloc type name for the unlang_t. |
size_t | unlang_size | Total length of the unlang_t + specialisation struct. |
struct unlang_retry_t |
Definition at line 370 of file unlang_priv.h.
Data Fields | ||
---|---|---|
uint32_t | count | |
int | depth | of this retry structure |
fr_timer_t * | ev | |
request_t * | request | |
fr_retry_state_t | state |
struct unlang_s |
A node in a graph of unlang_op_t (s) that we execute.
The interpreter acts like a turing machine, with unlang_t nodes forming the tape and the unlang_action_t the instructions.
This is the parent 'class' for multiple unlang_t node specialisations. The unlang_t struct is listed first in the specialisation so that we can cast between parent/child classes without knowledge of the layout of the structures.
The specialisations of the nodes describe additional details of the operation to be performed.
Definition at line 130 of file unlang_priv.h.
Data Fields | ||
---|---|---|
unlang_mod_actions_t | actions | Priorities, etc. for the various return codes. |
CONF_ITEM * | ci | used to generate this item |
bool | closed | whether or not this section is closed to new statements |
char const * | debug_name | Printed in log messages when the node is executed. |
char const * | name | Unknown... |
unlang_t * | next | Next node (executed on UNLANG_ACTION_EXECUTE_NEXT et al). |
unsigned int | number | unique node number |
unlang_t * | parent | Previous node. |
unlang_type_t | type | The specialisation of this node. |
struct unlang_stack_frame_s |
Our interpreter stack, as distinct from the C stack.
We don't call the modules recursively. Instead we iterate over a list of unlang_t and and manage the call stack ourselves.
After looking at various green thread implementations, it was decided that using the existing unlang interpreter stack was the best way to perform async I/O.
Each request as an unlang interpreter stack associated with it, which represents its progress through the server. Because the interpreter stack is distinct from the C stack, we can have a single system thread with many thousands of pending requests.
Definition at line 390 of file unlang_priv.h.
Data Fields | ||
---|---|---|
unlang_frame_flag_t | flag | Flags that mark up the frame for various things such as being the point where break, return or continue stop, or for forced unwinding. |
rindent_t | indent |
Indent level of the request when the frame was created. This is used to restore the indent level when the stack is being forcefully unwound. |
unlang_t const * | instruction | The unlang node we're evaluating. |
unlang_t const * | next | The next unlang node we will evaluate. |
unlang_process_t | process | function to call for interpreting this stack frame |
unlang_result_t * | result_p |
Where to write the result of executing the current instruction. Will either point to |
unlang_retry_t * | retry | if the frame is being retried. |
unlang_result_t | scratch_result |
The result of executing the current instruction. This will be set to RLM_MODULE_NOT_SET, and MOD_ACTION_NOT_SET when a new instruction is set for the frame. If result_p does not point to this field, the rcode and priority returned will be left as NOT_SET and will be ignored. This values here will persist between yields. |
unlang_result_t | section_result |
The aggregate result of executing all siblings in this section. This will be merged with the higher stack frame's rcode when the frame is popped. If the rcode is set to RLM_MODULE_NOT_SET when the frame is popped, then the rcode of the frame does not modify the rcode of the frame above it. |
unlang_signal_t | signal | function to call when signalling this stack frame |
void * | state |
Stack frame specialisations. These store extra (mutable) state data, for the immutable (unlang_t) instruction. Instructions can't be used to store data because they might be shared between multiple threads. Which stack_entry specialisation to use is determined by the instruction->type. |
struct unlang_stack_t |
An unlang stack associated with a request.
Definition at line 449 of file unlang_priv.h.
Data Fields | ||
---|---|---|
int | depth | Current depth we're executing at. |
unlang_stack_frame_t | frame[UNLANG_STACK_MAX] | The stack... |
unlang_interpret_t * | intp | Interpreter that the request is currently associated with. |
uint8_t | unwind |
Unwind to this frame if it exists. This is used for break and return. |
struct unlang_thread_t |
Definition at line 343 of file unlang_priv.h.
Data Fields | ||
---|---|---|
unlang_t const * | instruction | instruction which we're executing |
void * | thread_inst | thread-specific instance data |
struct unlang_tmpl_t |
A naked xlat.
Definition at line 167 of file unlang_priv.h.
Data Fields | ||
---|---|---|
unlang_t | self | |
tmpl_t const * | tmpl |
struct unlang_variable_t |
Definition at line 142 of file unlang_priv.h.
Data Fields | ||
---|---|---|
fr_dict_t * | dict | our dictionary |
int | max_attr | 1..N local attributes have been defined |
fr_dict_attr_t const * | root | the root of our dictionary |
#define has_debug_braces | ( | _thing | ) |
Definition at line 489 of file unlang_priv.h.
#define MOD_NUM_TYPES (UNLANG_TYPE_XLAT + 1) |
Definition at line 464 of file unlang_priv.h.
#define RULES_VERIFY | ( | _rules | ) | do { if (unlang_rules_verify(_rules) < 0) return NULL; } while (0) |
Definition at line 278 of file unlang_priv.h.
#define UNLANG_DETACHABLE (true) |
Definition at line 100 of file unlang_priv.h.
#define unlang_frame_perf_cleanup | ( | _x | ) |
Definition at line 365 of file unlang_priv.h.
#define unlang_frame_perf_init | ( | _x | ) |
Definition at line 362 of file unlang_priv.h.
#define unlang_frame_perf_resume | ( | _x | ) |
Definition at line 364 of file unlang_priv.h.
#define unlang_frame_perf_yield | ( | _x | ) |
Definition at line 363 of file unlang_priv.h.
Definition at line 218 of file unlang_priv.h.
#define UNLANG_NEXT_SIBLING (true) |
Definition at line 98 of file unlang_priv.h.
#define UNLANG_NEXT_STOP (false) |
Definition at line 97 of file unlang_priv.h.
#define UNLANG_NORMAL_CHILD (false) |
Definition at line 101 of file unlang_priv.h.
typedef unlang_t *(* unlang_compile_t) (unlang_t *parent, unlang_compile_ctx_t *unlang_ctx, CONF_ITEM const *ci) |
Definition at line 216 of file unlang_priv.h.
typedef void(* unlang_dump_t) (request_t *request, unlang_stack_frame_t *frame) |
Custom callback for dumping information about frame state.
[in] | request | The current request. |
[in] | frame | to provide additional information for. |
Definition at line 202 of file unlang_priv.h.
typedef unlang_action_t(* unlang_process_t) (unlang_result_t *p_result, request_t *request, unlang_stack_frame_t *frame) |
Function to call when interpreting a frame.
[in,out] | p_result | Pointer to the current rcode, may be modified by the function. |
[in] | request | The current request. |
[in] | frame | being executed. |
Definition at line 180 of file unlang_priv.h.
typedef void(* unlang_signal_t) (request_t *request, unlang_stack_frame_t *frame, fr_signal_t action) |
Function to call if the request was signalled.
This is the instruction specific cancellation function. This function will usually either call a more specialised cancellation function set when something like a module yielded, or just cleanup the state of the original unlang_process_t.
[in] | request | The current request. |
[in] | frame | being signalled. |
[in] | action | We're being signalled with. |
Definition at line 194 of file unlang_priv.h.
typedef struct unlang_stack_frame_s unlang_stack_frame_t |
Definition at line 117 of file unlang_priv.h.
Definition at line 116 of file unlang_priv.h.
typedef int(* unlang_thread_instantiate_t) (unlang_t const *instruction, void *thread_inst) |
Definition at line 204 of file unlang_priv.h.
Allows the frame evaluator to signal the interpreter.
Definition at line 88 of file unlang_priv.h.
enum unlang_frame_flag_t |
Definition at line 104 of file unlang_priv.h.
enum unlang_op_flag_t |
Definition at line 284 of file unlang_priv.h.
enum unlang_type_t |
Types of unlang_t nodes.
Here are our basic types: unlang_t, unlang_group_t, and unlang_module_t. For an explanation of what they are all about, see doc/unlang/configurable_failover.adoc
Enumerator | |
---|---|
UNLANG_TYPE_NULL | unlang type not set. |
UNLANG_TYPE_MODULE | Module method. |
UNLANG_TYPE_FUNCTION | Internal call to a function or submodule. |
UNLANG_TYPE_GROUP | Grouping section. |
UNLANG_TYPE_REDUNDANT | exactly like group, but with different default return codes |
UNLANG_TYPE_LOAD_BALANCE | Load balance section. |
UNLANG_TYPE_REDUNDANT_LOAD_BALANCE | Redundant load balance section. |
UNLANG_TYPE_PARALLEL | execute statements in parallel |
UNLANG_TYPE_IF | Condition. |
UNLANG_TYPE_ELSE | !Condition. |
UNLANG_TYPE_ELSIF | !Condition && Condition. |
UNLANG_TYPE_UPDATE | Update block. |
UNLANG_TYPE_SWITCH | Switch section. |
UNLANG_TYPE_CASE | Case section (within a UNLANG_TYPE_SWITCH). |
UNLANG_TYPE_FOREACH | Foreach section. |
UNLANG_TYPE_BREAK | Break statement (within a UNLANG_TYPE_FOREACH or UNLANG_TYPE_CASE). |
UNLANG_TYPE_CONTINUE | Break statement (within a UNLANG_TYPE_FOREACH). |
UNLANG_TYPE_RETURN | Return statement. |
UNLANG_TYPE_MAP | Mapping section (like UNLANG_TYPE_UPDATE, but uses values from a map_proc_t call). |
UNLANG_TYPE_SUBREQUEST | create a child subrequest |
UNLANG_TYPE_CHILD_REQUEST | a frame at the top of a child's request stack used to signal the parent when the child is complete. |
UNLANG_TYPE_DETACH | detach a child |
UNLANG_TYPE_CALL | call another virtual server |
UNLANG_TYPE_CALLER | conditionally check parent dictionary type |
UNLANG_TYPE_TIMEOUT | time-based timeouts. |
UNLANG_TYPE_LIMIT | limit number of requests in a section |
UNLANG_TYPE_TRANSACTION | transactions for editing lists |
UNLANG_TYPE_TRY | try / catch blocks |
UNLANG_TYPE_CATCH | catch a previous try |
UNLANG_TYPE_FINALLY | run at the end of a virtual server. |
UNLANG_TYPE_POLICY | Policy section. |
UNLANG_TYPE_XLAT | Represents one level of an xlat expansion. |
UNLANG_TYPE_TMPL | asynchronously expand a tmpl_t |
UNLANG_TYPE_EDIT | edit VPs in place. After 20 years! |
UNLANG_TYPE_MAX |
Definition at line 45 of file unlang_priv.h.
|
inlinestatic |
Definition at line 488 of file unlang_priv.h.
Definition at line 487 of file unlang_priv.h.
|
inlinestatic |
Cleanup any lingering frame state.
Definition at line 676 of file unlang_priv.h.
|
inlinestatic |
|
inlinestatic |
Advance to the next sibling instruction.
Definition at line 694 of file unlang_priv.h.
|
inlinestatic |
Pop a stack frame, removing any associated dynamically allocated state.
[in] | request | The current request. |
[in] | stack | frame to pop. |
Definition at line 717 of file unlang_priv.h.
|
inlinestatic |
Mark the current stack frame up for repeat, and set a new process function.
Definition at line 761 of file unlang_priv.h.
|
inlinestatic |
Definition at line 767 of file unlang_priv.h.
|
inlinestatic |
Initialise memory and instruction for a frame when a new instruction is to be evaluated.
[in] | stack | the current request stack. |
[in] | frame | frame to initialise |
Definition at line 623 of file unlang_priv.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
bool pass2_fixup_map | ( | map_t * | map, |
tmpl_rules_t const * | rules, | ||
fr_dict_attr_t const * | parent | ||
) |
bool pass2_fixup_map_rhs | ( | unlang_group_t * | g, |
tmpl_rules_t const * | rules | ||
) |
bool pass2_fixup_update | ( | unlang_group_t * | g, |
tmpl_rules_t const * | rules | ||
) |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
void stack_dump | ( | request_t * | request | ) |
void stack_dump_with_actions | ( | request_t * | request | ) |
|
inlinestatic |
Definition at line 477 of file unlang_priv.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 263 of file unlang_priv.h.
void unlang_call_init | ( | void | ) |
void unlang_caller_init | ( | void | ) |
void unlang_catch_init | ( | void | ) |
unlang_t * unlang_compile_children | ( | unlang_group_t * | g, |
unlang_compile_ctx_t * | unlang_ctx | ||
) |
|
inlinestatic |
unlang_t * unlang_compile_empty | ( | unlang_t * | parent, |
unlang_compile_ctx_t * | unlang_ctx, | ||
CONF_SECTION * | cs, | ||
unlang_type_t | type | ||
) |
bool unlang_compile_limit_subsection | ( | CONF_SECTION * | cs, |
char const * | name | ||
) |
unlang_t * unlang_compile_section | ( | unlang_t * | parent, |
unlang_compile_ctx_t * | unlang_ctx, | ||
CONF_SECTION * | cs, | ||
unlang_type_t | type | ||
) |
void unlang_condition_init | ( | void | ) |
Definition at line 266 of file condition.c.
int unlang_define_local_variable | ( | CONF_ITEM * | ci, |
unlang_variable_t * | var, | ||
tmpl_rules_t * | t_rules, | ||
fr_type_t | type, | ||
char const * | name, | ||
fr_dict_attr_t const * | ref | ||
) |
void unlang_detach_init | ( | void | ) |
void unlang_edit_init | ( | void | ) |
void unlang_finally_init | ( | void | ) |
void unlang_foreach_init | ( | void | ) |
|
inlinestatic |
Find the first frame with a given flag.
Definition at line 516 of file unlang_priv.h.
|
inlinestatic |
Find the first frame with a given flag.
Definition at line 534 of file unlang_priv.h.
void unlang_function_init | ( | void | ) |
Definition at line 580 of file function.c.
|
inlinestatic |
|
inlinestatic |
unlang_group_t * unlang_group_allocate | ( | unlang_t * | parent, |
CONF_SECTION * | cs, | ||
unlang_type_t | type | ||
) |
void unlang_group_init | ( | void | ) |
|
inlinestatic |
int unlang_interpret_push | ( | unlang_result_t * | result_p, |
request_t * | request, | ||
unlang_t const * | instruction, | ||
unlang_frame_conf_t const * | conf, | ||
bool | do_next_sibling | ||
) |
Push a new frame onto the stack.
[in] | result_p | Where to write the result of evaluating the section. If NULL, results will be written to frame->section_result and will be automatically merged with the next highest frame when this one is popped. |
[in] | request | to push the frame onto. |
[in] | instruction | One or more unlang_t nodes describing the operations to execute. |
[in] | conf | Configuration for the frame. If NULL, the following values areused:
|
[in] | do_next_sibling | Whether to only execute the first node in the unlang_t program or to execute subsequent nodes. |
Definition at line 282 of file interpret.c.
unlang_action_t unlang_interpret_push_children | ( | unlang_result_t * | p_result, |
request_t * | request, | ||
rlm_rcode_t | default_rcode, | ||
bool | do_next_sibling | ||
) |
Push the children of the current frame onto a new frame onto the stack.
[out] | p_result | set to RLM_MOULDE_FAIL if pushing the children fails |
[in] | request | to push the frame onto. |
[in] | default_rcode | The default result. |
[in] | do_next_sibling | Whether to only execute the first node in the unlang_t program or to execute subsequent nodes. |
Definition at line 386 of file interpret.c.
request_t * unlang_io_subrequest_alloc | ( | request_t * | parent, |
fr_dict_t const * | namespace, | ||
bool | detachable | ||
) |
Allocate a child request based on the parent.
[in] | parent | spawning the child request. |
[in] | namespace | the child request operates in. If NULL the parent's namespace is used. |
[in] | detachable | Allow/disallow the child to be detached. |
Definition at line 39 of file io.c.
void unlang_limit_init | ( | void | ) |
void unlang_load_balance_init | ( | void | ) |
Definition at line 363 of file load_balance.c.
void unlang_map_init | ( | void | ) |
void unlang_module_init | ( | void | ) |
void unlang_op_free | ( | void | ) |
int unlang_op_init | ( | void | ) |
void unlang_parallel_init | ( | void | ) |
Definition at line 441 of file parallel.c.
void unlang_register | ( | unlang_op_t * | op | ) |
Register an operation with the interpreter.
The main purpose of this registration API is to avoid intermixing the xlat, condition, map APIs with the interpreter, i.e. the callbacks needed for that functionality can be in their own source files, and we don't need to include supporting types and function declarations in the interpreter.
[in] | op | unlang_op_t to register. |
Definition at line 56 of file base.c.
void unlang_return_init | ( | void | ) |
|
inlinestatic |
void unlang_stack_signal | ( | request_t * | request, |
fr_signal_t | action, | ||
int | limit | ||
) |
Delivers a frame to one or more frames in the stack.
This is typically called via an "async" action, i.e. an action outside of the normal processing of the request.
For FR_SIGNAL_CANCEL all frames are marked up for cancellation, but the cancellation is handled by the interpret.
Other signal types are delivered immediately, inrrespecitve of whether the request is currently being processed or not.
Signaling stops at the "limit" frame. This is so that keywords such as "timeout" and "limit" can signal frames lower than theirs to stop, but then continue with their own work.
[in] | request | The current request. |
[in] | action | to signal. |
[in] | limit | the frame at which to stop signaling. |
Definition at line 1335 of file interpret.c.
int unlang_subrequest_op_init | ( | void | ) |
Initialise subrequest ops.
Definition at line 801 of file subrequest.c.
void unlang_switch_init | ( | void | ) |
void * unlang_thread_instance | ( | unlang_t const * | instruction | ) |
void unlang_timeout_init | ( | void | ) |
void unlang_tmpl_init | ( | void | ) |
|
inlinestatic |
void unlang_transaction_init | ( | void | ) |
Definition at line 266 of file transaction.c.
void unlang_try_init | ( | void | ) |
|
inlinestatic |
Definition at line 479 of file unlang_priv.h.
|
inlinestatic |
|
inlinestatic |
Mark up frames as cancelled so they're immediately popped by the interpreter.
[in] | stack | The current stack. |
[in] | to_depth | mark all frames below this depth as cancelled. |
Definition at line 555 of file unlang_priv.h.
|
inlinestatic |
Mark the entire stack as cancelled.
This cancels all frames up to the next "break" frame.
[out] | depth_p | Depth of the break || return || continue point. |
[in] | stack | The current stack. |
[in] | flag | Flag to search for. One of:
|
Definition at line 583 of file unlang_priv.h.
|
inlinestatic |
|
inlinestatic |
|
extern |
|
extern |
|
extern |
|
extern |