acmacros.h (9a64e8e0ace51b309fdcff4b4754b3649250382a) | acmacros.h (cf48958e84abb3b2dbb4202d0edbfce6aff65ce7) |
---|---|
1/****************************************************************************** 2 * 3 * Name: acmacros.h - C macros for the entire subsystem. 4 * 5 *****************************************************************************/ 6 7/* 8 * Copyright (C) 2000 - 2012, Intel Corp. --- 269 unchanged lines hidden (view full) --- 278/* Bitfields within ACPI registers */ 279 280#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 281#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) 282 283#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) 284 285/* | 1/****************************************************************************** 2 * 3 * Name: acmacros.h - C macros for the entire subsystem. 4 * 5 *****************************************************************************/ 6 7/* 8 * Copyright (C) 2000 - 2012, Intel Corp. --- 269 unchanged lines hidden (view full) --- 278/* Bitfields within ACPI registers */ 279 280#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 281#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) 282 283#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask)) 284 285/* |
286 * A struct acpi_namespace_node can appear in some contexts 287 * where a pointer to a union acpi_operand_object can also | 286 * An object of type struct acpi_namespace_node can appear in some contexts 287 * where a pointer to an object of type union acpi_operand_object can also |
288 * appear. This macro is used to distinguish them. 289 * 290 * The "Descriptor" field is the first field in both structures. 291 */ 292#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type) 293#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t) 294 295/* --- 289 unchanged lines hidden --- | 288 * appear. This macro is used to distinguish them. 289 * 290 * The "Descriptor" field is the first field in both structures. 291 */ 292#define ACPI_GET_DESCRIPTOR_TYPE(d) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type) 293#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((union acpi_descriptor *)(void *)(d))->common.descriptor_type = t) 294 295/* --- 289 unchanged lines hidden --- |