ReactOS 0.4.16-dev-1946-g52006dd
context.h File Reference
Include dependency graph for context.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uacpi_runtime_context
 

Macros

#define UACPI_SLEEP_TYP_INVALID   0xFF
 
#define UACPI_ENSURE_INIT_LEVEL_AT_LEAST(lvl)
 
#define UACPI_ENSURE_INIT_LEVEL_IS(lvl)
 

Functions

static uacpi_bool uacpi_check_flag (uacpi_u64 flag)
 
static uacpi_bool uacpi_should_log (enum uacpi_log_level lvl)
 
static uacpi_bool uacpi_is_hardware_reduced (void)
 
static const uacpi_charuacpi_init_level_to_string (uacpi_u8 lvl)
 

Variables

struct uacpi_runtime_context g_uacpi_rt_ctx
 

Macro Definition Documentation

◆ UACPI_ENSURE_INIT_LEVEL_AT_LEAST

#define UACPI_ENSURE_INIT_LEVEL_AT_LEAST (   lvl)
Value:
do { \
if (uacpi_unlikely(g_uacpi_rt_ctx.init_level < lvl)) { \
uacpi_error( \
"while evaluating %s: init level %d (%s) is too low, " \
"expected at least %d (%s)\n", __FUNCTION__, \
g_uacpi_rt_ctx.init_level, \
); \
} \
} while (0)
static const uacpi_char * uacpi_init_level_to_string(uacpi_u8 lvl)
Definition: context.h:111
struct uacpi_runtime_context g_uacpi_rt_ctx
Definition: uacpi.c:17
#define uacpi_unlikely(expr)
Definition: compiler.h:58
@ UACPI_STATUS_INIT_LEVEL_MISMATCH
Definition: status.h:23
#define __FUNCTION__
Definition: types.h:116

Definition at line 127 of file context.h.

◆ UACPI_ENSURE_INIT_LEVEL_IS

#define UACPI_ENSURE_INIT_LEVEL_IS (   lvl)
Value:
do { \
if (uacpi_unlikely(g_uacpi_rt_ctx.init_level != lvl)) { \
uacpi_error( \
"while evaluating %s: invalid init level %d (%s), " \
"expected %d (%s)\n", __FUNCTION__, \
g_uacpi_rt_ctx.init_level, \
); \
} \
} while (0)

Definition at line 141 of file context.h.

◆ UACPI_SLEEP_TYP_INVALID

#define UACPI_SLEEP_TYP_INVALID   0xFF

Definition at line 34 of file context.h.

Function Documentation

◆ uacpi_check_flag()

static uacpi_bool uacpi_check_flag ( uacpi_u64  flag)
inlinestatic

Definition at line 90 of file context.h.

91{
92 return (g_uacpi_rt_ctx.flags & flag) == flag;
93}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52

Referenced by initialize_from_rsdp(), uacpi_check_table_signature(), uacpi_initialize(), uacpi_initialize_namespace(), uacpi_verify_table_checksum(), and verify_and_install_table().

◆ uacpi_init_level_to_string()

static const uacpi_char * uacpi_init_level_to_string ( uacpi_u8  lvl)
inlinestatic

Definition at line 111 of file context.h.

112{
113 switch (lvl) {
115 return "early";
117 return "subsystem initialized";
119 return "namespace loaded";
121 return "namespace initialized";
122 default:
123 return "<invalid>";
124 }
125}
@ UACPI_INIT_LEVEL_EARLY
Definition: types.h:60
@ UACPI_INIT_LEVEL_SUBSYSTEM_INITIALIZED
Definition: types.h:66
@ UACPI_INIT_LEVEL_NAMESPACE_INITIALIZED
Definition: types.h:78
@ UACPI_INIT_LEVEL_NAMESPACE_LOADED
Definition: types.h:72

◆ uacpi_is_hardware_reduced()

static uacpi_bool uacpi_is_hardware_reduced ( void  )
inlinestatic

◆ uacpi_should_log()

static uacpi_bool uacpi_should_log ( enum uacpi_log_level  lvl)
inlinestatic

Definition at line 95 of file context.h.

96{
97 return lvl <= g_uacpi_rt_ctx.log_level;
98}

Referenced by debug_store(), and trace_region_io().

Variable Documentation

◆ g_uacpi_rt_ctx

struct uacpi_runtime_context g_uacpi_rt_ctx
extern

Definition at line 17 of file uacpi.c.

Referenced by access_field_unit(), begin_block_execution(), buffer_field_get_read_type(), debug_store_no_recurse(), do_binary_math(), do_notify(), enter_acpi_mode_initial(), enter_sleep_state_hw_full(), enter_sleep_state_hw_reduced(), extract_handlers(), fadt_relative(), find_or_create_gpe_interrupt_ctx(), get_op(), handle_global_lock(), initialize_fadt(), initialize_from_rsdp(), initialize_gpes(), make_object_for_predefined(), ones(), prepare_for_wake_from_sleep_state_hw_full(), prepare_for_wake_from_sleep_state_hw_reduced(), prepare_method_call(), read_mode(), set_mode(), sizeof_int(), split_event_blocks(), truncate_number_if_needed(), uacpi_acquire_aml_mutex(), uacpi_acquire_global_lock(), uacpi_acquire_global_lock_from_firmware(), uacpi_check_flag(), uacpi_context_get_loop_timeout(), uacpi_context_set_log_level(), uacpi_context_set_loop_timeout(), uacpi_context_set_max_call_stack_depth(), uacpi_context_set_proactive_table_checksum(), uacpi_deinitialize_events(), uacpi_deinitialize_namespace(), uacpi_enter_sleep_state(), uacpi_field_unit_get_read_type(), uacpi_get_aml_bitness(), uacpi_get_current_init_level(), uacpi_initialize(), uacpi_initialize_events(), uacpi_initialize_tables(), uacpi_install_address_space_handler_with_flags(), uacpi_install_notify_handler(), uacpi_is_hardware_reduced(), uacpi_logger_initialize(), uacpi_namespace_initialize(), uacpi_namespace_load(), uacpi_node_get_address_space_handlers(), uacpi_notify_all(), uacpi_prepare_for_sleep_state(), uacpi_reboot(), uacpi_release_aml_mutex(), uacpi_release_global_lock(), uacpi_release_global_lock_to_firmware(), uacpi_set_waking_vector(), uacpi_should_log(), uacpi_state_reset(), uacpi_table_fadt(), uacpi_uninstall_notify_handler(), uninstall_gpe_block(), verify_and_install_table(), wake_from_sleep_state_hw_full(), and wake_from_sleep_state_hw_reduced().