本网站可以出售:只需60000元直接拥有。QQ:939804642
您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ACPI_GET_OBJECT_TYPE函数代码示例

51自学网 2021-06-01 19:32:42
  C++
这篇教程C++ ACPI_GET_OBJECT_TYPE函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ACPI_GET_OBJECT_TYPE函数的典型用法代码示例。如果您正苦于以下问题:C++ ACPI_GET_OBJECT_TYPE函数的具体用法?C++ ACPI_GET_OBJECT_TYPE怎么用?C++ ACPI_GET_OBJECT_TYPE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ACPI_GET_OBJECT_TYPE函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: acpi_ut_copy_iobject_to_iobject

acpi_statusacpi_ut_copy_iobject_to_iobject (	union acpi_operand_object       *source_desc,	union acpi_operand_object       **dest_desc,	struct acpi_walk_state          *walk_state){	acpi_status                     status = AE_OK;	ACPI_FUNCTION_TRACE ("ut_copy_iobject_to_iobject");	/* Create the top level object */	*dest_desc = acpi_ut_create_internal_object (ACPI_GET_OBJECT_TYPE (source_desc));	if (!*dest_desc) {		return_ACPI_STATUS (AE_NO_MEMORY);	}	/* Copy the object and possible subobjects */	if (ACPI_GET_OBJECT_TYPE (source_desc) == ACPI_TYPE_PACKAGE) {		status = acpi_ut_copy_ipackage_to_ipackage (source_desc, *dest_desc,				  walk_state);	}	else {		status = acpi_ut_copy_simple_object (source_desc, *dest_desc);	}	return_ACPI_STATUS (status);}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:31,


示例2: acpi_ut_translate_one_cid

static acpi_statusacpi_ut_translate_one_cid (	union acpi_operand_object       *obj_desc,	struct acpi_compatible_id       *one_cid){	switch (ACPI_GET_OBJECT_TYPE (obj_desc)) {	case ACPI_TYPE_INTEGER:		/* Convert the Numeric CID to string */		acpi_ex_eisa_id_to_string ((u32) obj_desc->integer.value, one_cid->value);		return (AE_OK);	case ACPI_TYPE_STRING:		if (obj_desc->string.length > ACPI_MAX_CID_LENGTH) {			return (AE_AML_STRING_LIMIT);		}		/* Copy the String CID from the returned object */		acpi_ut_copy_id_string (one_cid->value, obj_desc->string.pointer,				ACPI_MAX_CID_LENGTH);		return (AE_OK);	default:		return (AE_TYPE);	}}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:32,


示例3: ACPI_FUNCTION_TRACE_PTR

union acpi_operand_object *acpi_ns_get_secondary_object(union							acpi_operand_object							*obj_desc){	ACPI_FUNCTION_TRACE_PTR(ns_get_secondary_object, obj_desc);	if ((!obj_desc) ||	    (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) ||	    (!obj_desc->common.next_object) ||	    (ACPI_GET_OBJECT_TYPE(obj_desc->common.next_object) ==	     ACPI_TYPE_LOCAL_DATA)) {		return_PTR(NULL);	}	return_PTR(obj_desc->common.next_object);}
开发者ID:E-LLP,项目名称:n900,代码行数:16,


示例4: acpi_ns_detach_data

acpi_statusacpi_ns_detach_data(struct acpi_namespace_node * node,		    acpi_object_handler handler){	union acpi_operand_object *obj_desc;	union acpi_operand_object *prev_obj_desc;	prev_obj_desc = NULL;	obj_desc = node->object;	while (obj_desc) {		if ((ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) &&		    (obj_desc->data.handler == handler)) {			if (prev_obj_desc) {				prev_obj_desc->common.next_object =				    obj_desc->common.next_object;			} else {				node->object = obj_desc->common.next_object;			}			acpi_ut_remove_reference(obj_desc);			return (AE_OK);		}		prev_obj_desc = obj_desc;		obj_desc = obj_desc->common.next_object;	}	return (AE_NOT_FOUND);}
开发者ID:E-LLP,项目名称:n900,代码行数:29,


示例5: acpi_ut_execute_UID

acpi_statusacpi_ut_execute_UID (	struct acpi_namespace_node      *device_node,	struct acpi_device_id           *uid){	union acpi_operand_object       *obj_desc;	acpi_status                     status;	ACPI_FUNCTION_TRACE ("ut_execute_UID");	status = acpi_ut_evaluate_object (device_node, METHOD_NAME__UID,			 ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, &obj_desc);	if (ACPI_FAILURE (status)) {		return_ACPI_STATUS (status);	}	if (ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_INTEGER) {		/* Convert the Numeric UID to string */		acpi_ex_unsigned_integer_to_string (obj_desc->integer.value, uid->value);	}	else {		/* Copy the String UID from the returned object */		acpi_ut_copy_id_string (uid->value, obj_desc->string.pointer,				sizeof (uid->value));	}	/* On exit, we must delete the return object */	acpi_ut_remove_reference (obj_desc);	return_ACPI_STATUS (status);}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:35,


示例6: acpi_ds_method_data_get_type

acpi_object_typeacpi_ds_method_data_get_type(u16 opcode,			     u32 index, struct acpi_walk_state *walk_state){	acpi_status status;	struct acpi_namespace_node *node;	union acpi_operand_object *object;	ACPI_FUNCTION_TRACE(ds_method_data_get_type);	/* Get the namespace node for the arg/local */	status = acpi_ds_method_data_get_node(opcode, index, walk_state, &node);	if (ACPI_FAILURE(status)) {		return_VALUE((ACPI_TYPE_NOT_FOUND));	}	/* Get the object */	object = acpi_ns_get_attached_object(node);	if (!object) {		/* Uninitialized local/arg, return TYPE_ANY */		return_VALUE(ACPI_TYPE_ANY);	}	/* Get the object type */	return_VALUE(ACPI_GET_OBJECT_TYPE(object));}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:31,


示例7: return

char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc){    if (!obj_desc) {        return ("[NULL Object Descriptor]");    }    return (acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE(obj_desc)));}
开发者ID:b3rnik,项目名称:dsl-n55u-bender,代码行数:9,


示例8: acpi_ns_detach_object

voidacpi_ns_detach_object (	struct acpi_namespace_node      *node){	union acpi_operand_object       *obj_desc;	ACPI_FUNCTION_TRACE ("ns_detach_object");	obj_desc = node->object;	if (!obj_desc ||		(ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_DATA)) {		return_VOID;	}	/* Clear the entry in all cases */	node->object = NULL;	if (ACPI_GET_DESCRIPTOR_TYPE (obj_desc) == ACPI_DESC_TYPE_OPERAND) {		node->object = obj_desc->common.next_object;		if (node->object &&		   (ACPI_GET_OBJECT_TYPE (node->object) != ACPI_TYPE_LOCAL_DATA)) {			node->object = node->object->common.next_object;		}	}	/* Reset the node type to untyped */	node->type = ACPI_TYPE_ANY;	ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "Node %p [%4.4s] Object %p/n",		node, acpi_ut_get_node_name (node), obj_desc));	/* Remove one reference on the object (and all subobjects) */	acpi_ut_remove_reference (obj_desc);	return_VOID;}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:40,


示例9: AcpiDsCreateNode

ACPI_STATUSAcpiDsCreateNode (    ACPI_WALK_STATE         *WalkState,    ACPI_NAMESPACE_NODE     *Node,    ACPI_PARSE_OBJECT       *Op){    ACPI_STATUS             Status;    ACPI_OPERAND_OBJECT     *ObjDesc;    ACPI_FUNCTION_TRACE_PTR (DsCreateNode, Op);    /*     * Because of the execution pass through the non-control-method     * parts of the table, we can arrive here twice.  Only init     * the named object node the first time through     */    if (AcpiNsGetAttachedObject (Node))    {        return_ACPI_STATUS (AE_OK);    }    if (!Op->Common.Value.Arg)    {        /* No arguments, there is nothing to do */        return_ACPI_STATUS (AE_OK);    }    /* Build an internal object for the argument(s) */    Status = AcpiDsBuildInternalObject (WalkState, Op->Common.Value.Arg,                &ObjDesc);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Re-type the object according to its argument */    Node->Type = ACPI_GET_OBJECT_TYPE (ObjDesc);    /* Attach obj to node */    Status = AcpiNsAttachObject (Node, ObjDesc, Node->Type);    /* Remove local reference to the object */    AcpiUtRemoveReference (ObjDesc);    return_ACPI_STATUS (Status);}
开发者ID:andreiw,项目名称:polaris,代码行数:52,


示例10: acpi_ex_unload_table

acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle){	acpi_status status = AE_OK;	union acpi_operand_object *table_desc = ddb_handle;	u32 table_index;	struct acpi_table_header *table;	ACPI_FUNCTION_TRACE(ex_unload_table);	/*	 * Validate the handle	 * Although the handle is partially validated in acpi_ex_reconfiguration(),	 * when it calls acpi_ex_resolve_operands(), the handle is more completely	 * validated here.	 */	if ((!ddb_handle) ||	    (ACPI_GET_DESCRIPTOR_TYPE(ddb_handle) != ACPI_DESC_TYPE_OPERAND) ||	    (ACPI_GET_OBJECT_TYPE(ddb_handle) != ACPI_TYPE_LOCAL_REFERENCE)) {		return_ACPI_STATUS(AE_BAD_PARAMETER);	}	/* Get the table index from the ddb_handle (acpi_size for 64-bit case) */	table_index = (u32) (acpi_size) table_desc->reference.object;	/* Invoke table handler if present */	if (acpi_gbl_table_handler) {		status = acpi_get_table_by_index(table_index, &table);		if (ACPI_SUCCESS(status)) {			(void)acpi_gbl_table_handler(ACPI_TABLE_EVENT_UNLOAD,						     table,						     acpi_gbl_table_handler_context);		}	}	/*	 * Delete the entire namespace under this table Node	 * (Offset contains the table_id)	 */	acpi_tb_delete_namespace_by_owner(table_index);	(void)acpi_tb_release_owner_id(table_index);	acpi_tb_set_table_loaded_flag(table_index, FALSE);	/* Table unloaded, remove a reference to the ddb_handle object */	acpi_ut_remove_reference(ddb_handle);	return_ACPI_STATUS(AE_OK);}
开发者ID:LouZiffer,项目名称:m900_kernel_cupcake-SDX,代码行数:50,


示例11: acpi_ut_copy_ipackage_to_epackage

static acpi_statusacpi_ut_copy_ipackage_to_epackage (	union acpi_operand_object       *internal_object,	u8                              *buffer,	acpi_size                       *space_used){	union acpi_object               *external_object;	acpi_status                     status;	struct acpi_pkg_info            info;	ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_epackage");	/*	 * First package at head of the buffer	 */	external_object = ACPI_CAST_PTR (union acpi_object, buffer);	/*	 * Free space begins right after the first package	 */	info.length      = ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));	info.free_space  = buffer + ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));	info.object_space = 0;	info.num_packages = 1;	external_object->type            = ACPI_GET_OBJECT_TYPE (internal_object);	external_object->package.count   = internal_object->package.count;	external_object->package.elements = ACPI_CAST_PTR (union acpi_object, info.free_space);	/*	 * Leave room for an array of ACPI_OBJECTS in the buffer	 * and move the free space past it	 */	info.length    += (acpi_size) external_object->package.count *			 ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));	info.free_space += external_object->package.count *			 ACPI_ROUND_UP_TO_NATIVE_WORD (sizeof (union acpi_object));	status = acpi_ut_walk_package_tree (internal_object, external_object,			 acpi_ut_copy_ielement_to_eelement, &info);	*space_used = info.length;	return_ACPI_STATUS (status);}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:46,


示例12: acpi_ns_attach_data

acpi_statusacpi_ns_attach_data (	struct acpi_namespace_node      *node,	acpi_object_handler             handler,	void                            *data){	union acpi_operand_object       *prev_obj_desc;	union acpi_operand_object       *obj_desc;	union acpi_operand_object       *data_desc;	/* We only allow one attachment per handler */	prev_obj_desc = NULL;	obj_desc = node->object;	while (obj_desc) {		if ((ACPI_GET_OBJECT_TYPE (obj_desc) == ACPI_TYPE_LOCAL_DATA) &&			(obj_desc->data.handler == handler)) {			return (AE_ALREADY_EXISTS);		}		prev_obj_desc = obj_desc;		obj_desc = obj_desc->common.next_object;	}	/* Create an internal object for the data */	data_desc = acpi_ut_create_internal_object (ACPI_TYPE_LOCAL_DATA);	if (!data_desc) {		return (AE_NO_MEMORY);	}	data_desc->data.handler = handler;	data_desc->data.pointer = data;	/* Install the data object */	if (prev_obj_desc) {		prev_obj_desc->common.next_object = data_desc;	}	else {		node->object = data_desc;	}	return (AE_OK);}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:46,


示例13: acpi_ut_copy_epackage_to_ipackage

static acpi_statusacpi_ut_copy_epackage_to_ipackage (	union acpi_operand_object       *internal_object,	u8                              *buffer,	u32                             *space_used){	u8                              *free_space;	union acpi_object               *external_object;	u32                             length = 0;	u32                             this_index;	u32                             object_space = 0;	union acpi_operand_object       *this_internal_obj;	union acpi_object               *this_external_obj;	ACPI_FUNCTION_TRACE ("ut_copy_epackage_to_ipackage");	/*	 * First package at head of the buffer	 */	external_object = (union acpi_object *)buffer;	/*	 * Free space begins right after the first package	 */	free_space = buffer + sizeof(union acpi_object);	external_object->type              = ACPI_GET_OBJECT_TYPE (internal_object);	external_object->package.count     = internal_object->package.count;	external_object->package.elements  = (union acpi_object *)free_space;	/*	 * Build an array of ACPI_OBJECTS in the buffer	 * and move the free space past it	 */	free_space += external_object->package.count * sizeof(union acpi_object);	/* Call walk_package */}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:43,


示例14: AcpiUtCopyEpackageToIpackage

static ACPI_STATUSAcpiUtCopyEpackageToIpackage (    ACPI_OPERAND_OBJECT     *InternalObject,    UINT8                   *Buffer,    UINT32                  *SpaceUsed){    UINT8                   *FreeSpace;    ACPI_OBJECT             *ExternalObject;    UINT32                  Length = 0;    UINT32                  ThisIndex;    UINT32                  ObjectSpace = 0;    ACPI_OPERAND_OBJECT     *ThisInternalObj;    ACPI_OBJECT             *ThisExternalObj;    ACPI_FUNCTION_TRACE (UtCopyEpackageToIpackage);    /*     * First package at head of the buffer     */    ExternalObject = (ACPI_OBJECT *)Buffer;    /*     * Free space begins right after the first package     */    FreeSpace = Buffer + sizeof(ACPI_OBJECT);    ExternalObject->Type               = ACPI_GET_OBJECT_TYPE (InternalObject);    ExternalObject->Package.Count      = InternalObject->Package.Count;    ExternalObject->Package.Elements   = (ACPI_OBJECT *)FreeSpace;    /*     * Build an array of ACPI_OBJECTS in the buffer     * and move the free space past it     */    FreeSpace += ExternalObject->Package.Count * sizeof(ACPI_OBJECT);    /* Call WalkPackage */}
开发者ID:andreiw,项目名称:polaris,代码行数:43,


示例15: acpi_ns_get_attached_data

acpi_statusacpi_ns_get_attached_data(struct acpi_namespace_node * node,			  acpi_object_handler handler, void **data){	union acpi_operand_object *obj_desc;	obj_desc = node->object;	while (obj_desc) {		if ((ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) &&		    (obj_desc->data.handler == handler)) {			*data = obj_desc->data.pointer;			return (AE_OK);		}		obj_desc = obj_desc->common.next_object;	}	return (AE_NOT_FOUND);}
开发者ID:E-LLP,项目名称:n900,代码行数:19,


示例16: acpi_ut_copy_iobject_to_eobject

acpi_statusacpi_ut_copy_iobject_to_eobject(union acpi_operand_object *internal_object,                                struct acpi_buffer *ret_buffer){    acpi_status status;    ACPI_FUNCTION_TRACE(ut_copy_iobject_to_eobject);    if (ACPI_GET_OBJECT_TYPE(internal_object) == ACPI_TYPE_PACKAGE) {        /*         * Package object:  Copy all subobjects (including         * nested packages)         */        status = acpi_ut_copy_ipackage_to_epackage(internal_object,                 ret_buffer->pointer,                 &ret_buffer->length);    } else {        /*         * Build a simple object (no nested objects)         */        status = acpi_ut_copy_isimple_to_esimple(internal_object,                 ACPI_CAST_PTR(union                               acpi_object,                               ret_buffer->                               pointer),                 ACPI_ADD_PTR(u8,                              ret_buffer->                              pointer,                              ACPI_ROUND_UP_TO_NATIVE_WORD                              (sizeof                               (union                                acpi_object))),                 &ret_buffer->length);        /*         * build simple does not include the object size in the length         * so we add it in here         */        ret_buffer->length += sizeof(union acpi_object);    }    return_ACPI_STATUS(status);}
开发者ID:laitianli,项目名称:kernel-analyze_linux-2.6.18,代码行数:42,


示例17: acpi_ut_copy_ipackage_to_ipackage

acpi_statusacpi_ut_copy_ipackage_to_ipackage (	union acpi_operand_object       *source_obj,	union acpi_operand_object       *dest_obj,	struct acpi_walk_state          *walk_state){	acpi_status                     status = AE_OK;	ACPI_FUNCTION_TRACE ("ut_copy_ipackage_to_ipackage");	dest_obj->common.type   = ACPI_GET_OBJECT_TYPE (source_obj);	dest_obj->common.flags  = source_obj->common.flags;	dest_obj->package.count = source_obj->package.count;	/*	 * Create the object array and walk the source package tree	 */	dest_obj->package.elements = ACPI_MEM_CALLOCATE (			   ((acpi_size) source_obj->package.count + 1) *			   sizeof (void *));	if (!dest_obj->package.elements) {		ACPI_REPORT_ERROR (			("aml_build_copy_internal_package_object: Package allocation failure/n"));		return_ACPI_STATUS (AE_NO_MEMORY);	}	/*	 * Copy the package element-by-element by walking the package "tree".	 * This handles nested packages of arbitrary depth.	 */	status = acpi_ut_walk_package_tree (source_obj, dest_obj,			 acpi_ut_copy_ielement_to_ielement, walk_state);	if (ACPI_FAILURE (status)) {		/* On failure, delete the destination package object */		acpi_ut_remove_reference (dest_obj);	}	return_ACPI_STATUS (status);}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:42,


示例18: acpi_ut_get_object_size

acpi_statusacpi_ut_get_object_size(union acpi_operand_object *internal_object,			acpi_size * obj_length){	acpi_status status;	ACPI_FUNCTION_ENTRY();	if ((ACPI_GET_DESCRIPTOR_TYPE(internal_object) ==	     ACPI_DESC_TYPE_OPERAND)	    && (ACPI_GET_OBJECT_TYPE(internal_object) == ACPI_TYPE_PACKAGE)) {		status =		    acpi_ut_get_package_object_size(internal_object,						    obj_length);	} else {		status =		    acpi_ut_get_simple_object_size(internal_object, obj_length);	}	return (status);}
开发者ID:PyroOS,项目名称:Pyro,代码行数:21,


示例19: acpi_ex_unload_table

acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle){	acpi_status status = AE_OK;	union acpi_operand_object *table_desc = ddb_handle;	struct acpi_table_desc *table_info;	ACPI_FUNCTION_TRACE("ex_unload_table");	/*	 * Validate the handle	 * Although the handle is partially validated in acpi_ex_reconfiguration(),	 * when it calls acpi_ex_resolve_operands(), the handle is more completely	 * validated here.	 */	if ((!ddb_handle) ||	    (ACPI_GET_DESCRIPTOR_TYPE(ddb_handle) != ACPI_DESC_TYPE_OPERAND) ||	    (ACPI_GET_OBJECT_TYPE(ddb_handle) != ACPI_TYPE_LOCAL_REFERENCE)) {		return_ACPI_STATUS(AE_BAD_PARAMETER);	}	/* Get the actual table descriptor from the ddb_handle */	table_info = (struct acpi_table_desc *)table_desc->reference.object;	/*	 * Delete the entire namespace under this table Node	 * (Offset contains the table_id)	 */	acpi_ns_delete_namespace_by_owner(table_info->owner_id);	acpi_ut_release_owner_id(&table_info->owner_id);	/* Delete the table itself */	(void)acpi_tb_uninstall_table(table_info->installed_desc);	/* Delete the table descriptor (ddb_handle) */	acpi_ut_remove_reference(table_desc);	return_ACPI_STATUS(status);}
开发者ID:devicenull,项目名称:supermicro_ipmi_firmware,代码行数:40,



注:本文中的ACPI_GET_OBJECT_TYPE函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ACPI_HANDLE函数代码示例
C++ ACPI_GET_DESCRIPTOR_TYPE函数代码示例
51自学网自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1