PatchworkOS
Loading...
Searching...
No Matches
exception.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <errno.h>
6#include <stdint.h>
7
63
69
77
89
97
105void aml_exception_raise(aml_state_t* state, aml_exception_t code, const char* function);
106
113#define AML_EXCEPTION_RAISE(state, code) aml_exception_raise(state, code, __func__)
114
void(* aml_exception_handler_t)(aml_state_t *state, aml_exception_t code)
AML exception handler function type.
Definition exception.h:68
void aml_exception_raise(aml_state_t *state, aml_exception_t code, const char *function)
Raises an AML exception.
Definition exception.c:133
const char * aml_exception_to_string(aml_exception_t code)
Converts an AML exception code to a string.
Definition exception.c:54
void aml_exception_unregister(aml_exception_handler_t handler)
Unregisters an AML exception handler.
Definition exception.c:99
uint64_t aml_exception_register(aml_exception_handler_t handler)
Registers an AML exception handler.
Definition exception.c:66
aml_exception_t
AML exception codes.
Definition exception.h:29
@ AML_BAD_NAME
Definition exception.h:44
@ AML_DIVIDE_BY_ZERO
Definition exception.h:43
@ AML_METHOD_LIMIT
Definition exception.h:50
@ AML_STRING_LIMIT
Definition exception.h:48
@ AML_UNINITIALIZED_ARG
Definition exception.h:37
@ AML_UNINITIALIZED_ELEMENT
Definition exception.h:38
@ AML_CIRCULAR_REFERENCE
Definition exception.h:61
@ AML_REGISTER_LIMIT
Definition exception.h:56
@ AML_NUMERIC_OVERFLOW
Definition exception.h:39
@ AML_NAME_NOT_FOUND
Definition exception.h:45
@ AML_INTERNAL
Definition exception.h:46
@ AML_INVALID_INDEX
Definition exception.h:55
@ AML_REGION_LIMIT
Definition exception.h:40
@ AML_PARSE
Definition exception.h:31
@ AML_OPERAND_VALUE
Definition exception.h:35
@ AML_ERROR
Definition exception.h:30
@ AML_PACKAGE_LIMIT
Definition exception.h:42
@ AML_ALIGNMENT
Definition exception.h:58
@ AML_MUTEX_NOT_ACQUIRED
Definition exception.h:53
@ AML_BAD_OPCODE
Definition exception.h:32
@ AML_OPERAND_TYPE
Definition exception.h:34
@ AML_NO_WHILE
Definition exception.h:57
@ AML_NO_OPERAND
Definition exception.h:33
@ AML_NOT_OWNER
Definition exception.h:51
@ AML_UNINITIALIZED_LOCAL
Definition exception.h:36
@ AML_BAD_RESOURCE_VALUE
Definition exception.h:60
@ AML_NO_RETURN_VALUE
Definition exception.h:49
@ AML_MUTEX_ORDER
Definition exception.h:52
@ AML_INVALID_SPACE_ID
Definition exception.h:47
@ AML_BUFFER_LIMIT
Definition exception.h:41
@ AML_INVALID_RESOURCE_TYPE
Definition exception.h:54
@ AML_NO_RESOURCE_END_TAG
Definition exception.h:59
__UINT64_TYPE__ uint64_t
Definition stdint.h:17
AML State.
Definition state.h:25