149 if (argObject ==
NULL)
171 if (mutexObject ==
NULL)
#define assert(expression)
#define AML_DEBUG_ERROR(ctx, format,...)
Macro to simplify calling aml_debug_error() with the current function name.
aml_object_t * aml_mutex_object_read(aml_term_list_ctx_t *ctx)
Reads a MutexObject structure from the AML byte stream.
uint32_t aml_pkg_length_t
PkgLength structure.
uint64_t aml_pkg_length_read(aml_term_list_ctx_t *ctx, aml_pkg_length_t *out)
Reads a PkgLength structure from the AML byte stream.
uint64_t aml_def_continue_read(aml_term_list_ctx_t *ctx)
Reads a DefContinue structure from the AML byte stream.
uint64_t aml_predicate_read(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Reads a Predicate structure from the AML byte stream.
uint64_t aml_def_break_read(aml_term_list_ctx_t *ctx)
Reads a DefBreak structure from the AML byte stream.
uint64_t aml_def_noop_read(aml_term_list_ctx_t *ctx)
Reads a DefNoop structure from the AML byte stream.
aml_object_t * aml_arg_object_read(aml_term_list_ctx_t *ctx)
Reads an ArgObject structure from the AML byte stream.
uint64_t aml_statement_opcode_read(aml_term_list_ctx_t *ctx)
Reads an StatementOpcode structure from the AML byte stream.
uint64_t aml_def_if_else_read(aml_term_list_ctx_t *ctx)
Reads an DefIfElse structure from the AML byte stream.
uint64_t aml_def_return_read(aml_term_list_ctx_t *ctx)
Reads a DefReturn structure from the AML byte stream.
uint64_t aml_def_else_read(aml_term_list_ctx_t *ctx, bool shouldExecute)
Reads a DefElse structure from the AML byte stream.
uint64_t aml_def_release_read(aml_term_list_ctx_t *ctx)
Reads a DefRelease structure from the AML byte stream.
uint64_t aml_def_while_read(aml_term_list_ctx_t *ctx)
Reads a DefWhile structure from the AML byte stream.
aml_object_t * aml_term_arg_read(aml_term_list_ctx_t *ctx, aml_type_t allowedTypes)
Reads an TermArg structure from the AML byte stream.
uint64_t aml_term_arg_read_integer(aml_term_list_ctx_t *ctx, aml_integer_t *out)
Wrapper around aml_term_arg_read() that converts the result to an integer.
uint64_t aml_term_list_read(aml_state_t *state, aml_object_t *scope, const uint8_t *start, const uint8_t *end, aml_term_list_ctx_t *parentCtx)
Reads a TermList structure from the AML byte stream.
@ AML_STOP_REASON_BREAK
A Break statement was hit.
@ AML_STOP_REASON_CONTINUE
A Continue statement was hit.
@ AML_STOP_REASON_RETURN
A Return statement was hit.
@ AML_STOP_REASON_NONE
No stop reason, continue execution or has reached the end of the TermList.
uint64_t aml_integer_t
AML Integer type.
#define AML_FALSE
AML Boolean false value.
uint64_t aml_mutex_release(aml_mutex_id_t *mutex)
Release a mutex.
void aml_state_result_set(aml_state_t *state, aml_object_t *result)
Set the result object of the state.
static uint64_t aml_token_expect(aml_term_list_ctx_t *ctx, aml_token_num_t expected)
Reads a token from the AML stream and verifies it matches the expected token.
static void aml_token_peek(aml_term_list_ctx_t *ctx, aml_token_t *out)
Attempt to read a token from the AML stream, without advancing the instruction pointer.
#define DEREF_DEFER(ptr)
RAII-style cleanup for scoped references.
#define ENOSYS
Function not implemented.
#define errno
Error number variable.
#define EILSEQ
Illegal byte sequence.
#define NULL
Pointer error value.
#define ERR
Integer error value.
Context for reading a TermList.
aml_stop_reason_t stopReason
const aml_token_props_t * props