#define UNLANG_DETACHABLE (true)
#define UNLANG_NORMAL_CHILD (false)
+DIAG_OFF(attributes)
+typedef enum CC_HINT(flag_enum) {
+ UNWIND_FRAME_FLAG_NONE = 0x00, //!< No flags.
+ UNWIND_FRAME_FLAG_REPEAT = 0x01, //!< Repeat the frame on the way up the stack.
+ UNWIND_FRAME_FLAG_TOP_FRAME = 0x02, //!< are we the top frame of the stack?
+ ///< If true, causes the interpreter to stop
+ ///< interpreting and return, control then passes
+ ///< to whatever called the interpreter.
+ UNWIND_FRAME_FLAG_YIELDED = 0x04, //!< frame has yielded
+ UNWIND_FRAME_FLAG_CANCEL = 0x08, //!< This frame has been marked up for cancellation.
+} unlang_frame_flag_t;
+DIAG_ON(attributes)
+
typedef struct unlang_s unlang_t;
typedef struct unlang_stack_frame_s unlang_stack_frame_t;
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.
- uint8_t uflags; //!< Unwind markers
-
+ unlang_frame_flag_t uflags; //!< Unwind flags
#ifdef WITH_PERF
fr_time_tracking_t tracking; //!< track this instance of this instruction
extern fr_table_num_sorted_t const mod_rcode_table[];
extern size_t mod_rcode_table_len;
-#define UNWIND_FRAME_FLAG_NONE 0x00 //!< No flags.
-#define UNWIND_FRAME_FLAG_REPEAT 0x01 //!< Repeat the frame on the way up the stack.
-#define UNWIND_FRAME_FLAG_TOP_FRAME 0x02 //!< are we the top frame of the stack?
- ///< If true, causes the interpreter to stop
- ///< interpreting and return, control then passes
- ///< to whatever called the interpreter.
-#define UNWIND_FRAME_FLAG_BREAK_POINT 0x04 //!< 'break' stops here.
-#define UNWIND_FRAME_FLAG_RETURN_POINT 0x08 //!< 'return' stops here.
-#define UNWIND_FRAME_FLAG_NO_CLEAR 0x10 //!< Keep unwinding, don't clear the unwind flag.
-#define UNWIND_FRAME_FLAG_YIELDED 0x20 //!< frame has yielded
static inline void repeatable_set(unlang_stack_frame_t *frame) { frame->uflags |= UNWIND_FRAME_FLAG_REPEAT; }
static inline void top_frame_set(unlang_stack_frame_t *frame) { frame->uflags |= UNWIND_FRAME_FLAG_TOP_FRAME; }