18 while (args[argIndex] !=
NULL)
26 for (
uint8_t k = 0; k < argIndex; k++)
45 for (
uint8_t k = 0; k < argIndex; k++)
52 state->
args[argIndex] = &arg->
arg;
53 state->
args[argIndex]->name =
AML_NAME(
'A',
'R',
'G',
'0' + argIndex);
#define REF(ptr)
Increment reference count.
#define UNREF(ptr)
Decrement reference count.
#define errno
Error number variable.
#define E2BIG
Argument list too long.
#define NULL
Pointer error value.
#define ERR
Integer error value.
uint64_t aml_copy_object(aml_state_t *state, aml_object_t *src, aml_object_t *dest)
Copies the data from the source object to the destination object.
#define AML_MAX_ARGS
Maximum number of arguments that can be passed to a method.
#define AML_MAX_LOCALS
Maximum number of local variables that can be used in a method.
#define AML_NAME(a, b, c, d)
Macro to create an aml_name_t from 4 characters.
void aml_overlay_deinit(aml_overlay_t *overlay)
Deinitialize a namespace overlay.
void aml_overlay_init(aml_overlay_t *overlay)
Initialize a namespace overlay.
aml_object_t * aml_object_new(void)
Allocate a new ACPI object.
uint64_t aml_arg_set(aml_object_t *object, aml_object_t *value)
Set a object as an argument with the given target object.
uint64_t aml_integer_set(aml_object_t *object, aml_uint_t value)
Set a object as an integer with the given value and bit width.
@ AML_OBJECT_EXCEPTION_ON_USE
void aml_state_result_set(aml_state_t *state, aml_object_t *result)
Set the result object of the state.
uint64_t aml_state_init(aml_state_t *state, aml_object_t **args)
Initialize an AML state.
aml_object_t * aml_state_result_get(aml_state_t *state)
Get the result object of the state.
void aml_state_deinit(aml_state_t *state)
Deinitialize an AML state.
aml_object_t * result
The return value, see aml_method_invoke() for details.
aml_arg_t * args[AML_MAX_ARGS]
Argument variables for the method, if any.
uint64_t errorDepth
The length of the error traceback, if 0 then no error has occurred.
aml_local_t * locals[AML_MAX_LOCALS]
Local variables for the method, if any, initialized lazily.
aml_overlay_t overlay
Holds any named objects created during parsing.