这篇教程C++ ACPI_MEM_TRACKING函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ACPI_MEM_TRACKING函数的典型用法代码示例。如果您正苦于以下问题:C++ ACPI_MEM_TRACKING函数的具体用法?C++ ACPI_MEM_TRACKING怎么用?C++ ACPI_MEM_TRACKING使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ACPI_MEM_TRACKING函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: AcpiUtAcquireFromCachevoid *AcpiUtAcquireFromCache ( UINT32 ListId){ ACPI_MEMORY_LIST *CacheInfo; void *Object; PROC_NAME ("UtAcquireFromCache"); CacheInfo = &AcpiGbl_MemoryLists[ListId]; AcpiUtAcquireMutex (ACPI_MTX_CACHES); ACPI_MEM_TRACKING (CacheInfo->CacheRequests++); /* Check the cache first */ if (CacheInfo->ListHead) { /* There is an object available, use it */ Object = CacheInfo->ListHead; CacheInfo->ListHead = * (char **) (((char *) Object) + CacheInfo->LinkOffset); ACPI_MEM_TRACKING (CacheInfo->CacheHits++); CacheInfo->CacheDepth--;#ifdef ACPI_DBG_TRACK_ALLOCATIONS ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object %p from %s/n", Object, AcpiGbl_MemoryLists[ListId].ListName));#endif AcpiUtReleaseMutex (ACPI_MTX_CACHES); /* Clear (zero) the previously used Object */ MEMSET (Object, 0, CacheInfo->ObjectSize); } else { /* The cache is empty, create a new object */ /* Avoid deadlock with ACPI_MEM_CALLOCATE */ AcpiUtReleaseMutex (ACPI_MTX_CACHES); Object = ACPI_MEM_CALLOCATE (CacheInfo->ObjectSize); ACPI_MEM_TRACKING (CacheInfo->TotalAllocated++); } return (Object);}
开发者ID:MarginC,项目名称:kame,代码行数:53,
示例2: acpi_ut_release_to_cachevoidacpi_ut_release_to_cache ( u32 list_id, void *object){ struct acpi_memory_list *cache_info; ACPI_FUNCTION_ENTRY (); cache_info = &acpi_gbl_memory_lists[list_id];#ifdef ACPI_ENABLE_OBJECT_CACHE /* If walk cache is full, just free this wallkstate object */ if (cache_info->cache_depth >= cache_info->max_cache_depth) { ACPI_MEM_FREE (object); ACPI_MEM_TRACKING (cache_info->total_freed++); } /* Otherwise put this object back into the cache */ else { if (ACPI_FAILURE (acpi_ut_acquire_mutex (ACPI_MTX_CACHES))) { return; } /* Mark the object as cached */ ACPI_MEMSET (object, 0xCA, cache_info->object_size); ACPI_SET_DESCRIPTOR_TYPE (object, ACPI_DESC_TYPE_CACHED); /* Put the object at the head of the cache list */ * (ACPI_CAST_INDIRECT_PTR (char, &(((char *) object)[cache_info->link_offset]))) = cache_info->list_head; cache_info->list_head = object; cache_info->cache_depth++; (void) acpi_ut_release_mutex (ACPI_MTX_CACHES); }#else /* Object cache is disabled; just free the object */ ACPI_MEM_FREE (object); ACPI_MEM_TRACKING (cache_info->total_freed++);#endif}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:51,
示例3: AcpiOsAcquireObjectvoid *AcpiOsAcquireObject ( ACPI_MEMORY_LIST *Cache){ ACPI_STATUS Status; void *Object; ACPI_FUNCTION_NAME (OsAcquireObject); if (!Cache) { return (NULL); } Status = AcpiUtAcquireMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { return (NULL); } ACPI_MEM_TRACKING (Cache->Requests++); /* Check the cache first */ if (Cache->ListHead) { /* There is an object available, use it */ Object = Cache->ListHead; Cache->ListHead = *(ACPI_CAST_INDIRECT_PTR (char, &(((char *) Object)[Cache->LinkOffset]))); Cache->CurrentDepth--; ACPI_MEM_TRACKING (Cache->Hits++); ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object %p from %s cache/n", Object, Cache->ListName)); Status = AcpiUtReleaseMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { return (NULL); } /* Clear (zero) the previously used Object */ ACPI_MEMSET (Object, 0, Cache->ObjectSize); }
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:50,
示例4: acpi_ns_delete_nodevoid acpi_ns_delete_node(struct acpi_namespace_node *node){ union acpi_operand_object *obj_desc; ACPI_FUNCTION_NAME(ns_delete_node); /* Detach an object if there is one */ acpi_ns_detach_object(node); /* * Delete an attached data object if present (an object that was created * and attached via acpi_attach_data). Note: After any normal object is * detached above, the only possible remaining object is a data object. */ obj_desc = node->object; if (obj_desc && (obj_desc->common.type == ACPI_TYPE_LOCAL_DATA)) { /* Invoke the attached data deletion handler if present */ if (obj_desc->data.handler) { obj_desc->data.handler(node, obj_desc->data.pointer); } acpi_ut_remove_reference(obj_desc); } /* Now we can delete the node */ (void)acpi_os_release_object(acpi_gbl_namespace_cache, node); ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_freed++); ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Node %p, Remaining %X/n", node, acpi_gbl_current_node_count));}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:35,
示例5: AcpiNsDeleteNodevoidAcpiNsDeleteNode ( ACPI_NAMESPACE_NODE *Node){ ACPI_NAMESPACE_NODE *ParentNode; ACPI_NAMESPACE_NODE *PrevNode; ACPI_NAMESPACE_NODE *NextNode; ACPI_FUNCTION_TRACE_PTR (NsDeleteNode, Node); ParentNode = AcpiNsGetParentNode (Node); PrevNode = NULL; NextNode = ParentNode->Child; /* Find the node that is the previous peer in the parent's child list */ while (NextNode != Node) { PrevNode = NextNode; NextNode = PrevNode->Peer; } if (PrevNode) { /* Node is not first child, unlink it */ PrevNode->Peer = NextNode->Peer; if (NextNode->Flags & ANOBJ_END_OF_PEER_LIST) { PrevNode->Flags |= ANOBJ_END_OF_PEER_LIST; } } else { /* Node is first child (has no previous peer) */ if (NextNode->Flags & ANOBJ_END_OF_PEER_LIST) { /* No peers at all */ ParentNode->Child = NULL; } else { /* Link peer list to parent */ ParentNode->Child = NextNode->Peer; } } ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalFreed++); /* Detach an object if there is one, then delete the node */ AcpiNsDetachObject (Node); (void) AcpiOsReleaseObject (AcpiGbl_NamespaceCache, Node); return_VOID;}
开发者ID:DangerDexter,项目名称:FreeBSD-8.0-dyntick,代码行数:60,
示例6: AcpiNsCreateNodeACPI_NAMESPACE_NODE *AcpiNsCreateNode ( UINT32 Name){ ACPI_NAMESPACE_NODE *Node;#ifdef ACPI_DBG_TRACK_ALLOCATIONS UINT32 Temp;#endif ACPI_FUNCTION_TRACE (NsCreateNode); Node = AcpiOsAcquireObject (AcpiGbl_NamespaceCache); if (!Node) { return_PTR (NULL); } ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalAllocated++);#ifdef ACPI_DBG_TRACK_ALLOCATIONS Temp = AcpiGbl_NsNodeList->TotalAllocated - AcpiGbl_NsNodeList->TotalFreed; if (Temp > AcpiGbl_NsNodeList->MaxOccupied) { AcpiGbl_NsNodeList->MaxOccupied = Temp; }#endif Node->Name.Integer = Name; ACPI_SET_DESCRIPTOR_TYPE (Node, ACPI_DESC_TYPE_NAMED); return_PTR (Node);}
开发者ID:2asoft,项目名称:freebsd,代码行数:34,
示例7: ACPI_FUNCTION_NAMEvoid *acpi_os_acquire_object(struct acpi_memory_list *cache){ acpi_status status; void *object; ACPI_FUNCTION_NAME(os_acquire_object); if (!cache) { return (NULL); } status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { return (NULL); } ACPI_MEM_TRACKING(cache->requests++); /* Check the cache first */ if (cache->list_head) { /* There is an object available, use it */ object = cache->list_head; cache->list_head = *(ACPI_CAST_INDIRECT_PTR(char, &(((char *) object)[cache-> link_offset]))); cache->current_depth--; ACPI_MEM_TRACKING(cache->hits++); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Object %p from %s cache/n", object, cache->list_name)); status = acpi_ut_release_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { return (NULL); } /* Clear (zero) the previously used Object */ ACPI_MEMSET(object, 0, cache->object_size); } else {
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:46,
示例8: acpi_ut_acquire_from_cachevoid *acpi_ut_acquire_from_cache ( u32 list_id){ struct acpi_memory_list *cache_info; void *object; ACPI_FUNCTION_NAME ("ut_acquire_from_cache"); cache_info = &acpi_gbl_memory_lists[list_id];#ifdef ACPI_ENABLE_OBJECT_CACHE if (ACPI_FAILURE (acpi_ut_acquire_mutex (ACPI_MTX_CACHES))) { return (NULL); } ACPI_MEM_TRACKING (cache_info->cache_requests++); /* Check the cache first */ if (cache_info->list_head) { /* There is an object available, use it */ object = cache_info->list_head; cache_info->list_head = *(ACPI_CAST_INDIRECT_PTR (char, &(((char *) object)[cache_info->link_offset]))); ACPI_MEM_TRACKING (cache_info->cache_hits++); cache_info->cache_depth--;#ifdef ACPI_DBG_TRACK_ALLOCATIONS ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object %p from %s/n", object, acpi_gbl_memory_lists[list_id].list_name));#endif if (ACPI_FAILURE (acpi_ut_release_mutex (ACPI_MTX_CACHES))) { return (NULL); } /* Clear (zero) the previously used Object */ ACPI_MEMSET (object, 0, cache_info->object_size); }
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:45,
示例9: AcpiUtAcquireFromCachevoid *AcpiUtAcquireFromCache ( UINT32 ListId){ ACPI_MEMORY_LIST *CacheInfo; void *Object; ACPI_FUNCTION_NAME ("UtAcquireFromCache"); CacheInfo = &AcpiGbl_MemoryLists[ListId]; if (ACPI_FAILURE (AcpiUtAcquireMutex (ACPI_MTX_CACHES))) { return (NULL); } ACPI_MEM_TRACKING (CacheInfo->CacheRequests++); /* Check the cache first */ if (CacheInfo->ListHead) { /* There is an object available, use it */ Object = CacheInfo->ListHead; CacheInfo->ListHead = *(ACPI_CAST_INDIRECT_PTR (char, &(((char *) Object)[CacheInfo->LinkOffset]))); ACPI_MEM_TRACKING (CacheInfo->CacheHits++); CacheInfo->CacheDepth--;#ifdef ACPI_DBG_TRACK_ALLOCATIONS ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Object %p from %s/n", Object, AcpiGbl_MemoryLists[ListId].ListName));#endif if (ACPI_FAILURE (AcpiUtReleaseMutex (ACPI_MTX_CACHES))) { return (NULL); } /* Clear (zero) the previously used Object */ ACPI_MEMSET (Object, 0, CacheInfo->ObjectSize); }
开发者ID:kame,项目名称:kame,代码行数:45,
示例10: acpi_ns_delete_nodevoidacpi_ns_delete_node ( struct acpi_namespace_node *node){ struct acpi_namespace_node *parent_node; struct acpi_namespace_node *prev_node; struct acpi_namespace_node *next_node; ACPI_FUNCTION_TRACE_PTR ("ns_delete_node", node); parent_node = acpi_ns_get_parent_node (node); prev_node = NULL; next_node = parent_node->child; /* Find the node that is the previous peer in the parent's child list */ while (next_node != node) { prev_node = next_node; next_node = prev_node->peer; } if (prev_node) { /* Node is not first child, unlink it */ prev_node->peer = next_node->peer; if (next_node->flags & ANOBJ_END_OF_PEER_LIST) { prev_node->flags |= ANOBJ_END_OF_PEER_LIST; } } else { /* Node is first child (has no previous peer) */ if (next_node->flags & ANOBJ_END_OF_PEER_LIST) { /* No peers at all */ parent_node->child = NULL; } else { /* Link peer list to parent */ parent_node->child = next_node->peer; } } ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].total_freed++); /* * Detach an object if there is one then delete the node */ acpi_ns_detach_object (node); ACPI_MEM_FREE (node); return_VOID;}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:56,
示例11: AcpiNsDeleteNodevoidAcpiNsDeleteNode ( ACPI_NAMESPACE_NODE *Node){ ACPI_OPERAND_OBJECT *ObjDesc; ACPI_OPERAND_OBJECT *NextDesc; ACPI_FUNCTION_NAME (NsDeleteNode); /* Detach an object if there is one */ AcpiNsDetachObject (Node); /* * Delete an attached data object list if present (objects that were * attached via AcpiAttachData). Note: After any normal object is * detached above, the only possible remaining object(s) are data * objects, in a linked list. */ ObjDesc = Node->Object; while (ObjDesc && (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA)) { /* Invoke the attached data deletion handler if present */ if (ObjDesc->Data.Handler) { ObjDesc->Data.Handler (Node, ObjDesc->Data.Pointer); } NextDesc = ObjDesc->Common.NextObject; AcpiUtRemoveReference (ObjDesc); ObjDesc = NextDesc; } /* Special case for the statically allocated root node */ if (Node == AcpiGbl_RootNode) { return; } /* Now we can delete the node */ (void) AcpiOsReleaseObject (AcpiGbl_NamespaceCache, Node); ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalFreed++); ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Node %p, Remaining %X/n", Node, AcpiGbl_CurrentNodeCount));}
开发者ID:2asoft,项目名称:freebsd,代码行数:52,
示例12: AcpiOsReleaseObjectACPI_STATUSAcpiOsReleaseObject ( ACPI_MEMORY_LIST *Cache, void *Object){ ACPI_STATUS Status; ACPI_FUNCTION_ENTRY (); if (!Cache || !Object) { return (AE_BAD_PARAMETER); } /* If cache is full, just free this object */ if (Cache->CurrentDepth >= Cache->MaxDepth) { ACPI_FREE (Object); ACPI_MEM_TRACKING (Cache->TotalFreed++); } /* Otherwise put this object back into the cache */ else { Status = AcpiUtAcquireMutex (ACPI_MTX_CACHES); if (ACPI_FAILURE (Status)) { return (Status); } /* Mark the object as cached */ ACPI_MEMSET (Object, 0xCA, Cache->ObjectSize); ACPI_SET_DESCRIPTOR_TYPE (Object, ACPI_DESC_TYPE_CACHED); /* Put the object at the head of the cache list */ * (ACPI_CAST_INDIRECT_PTR (char, &(((char *) Object)[Cache->LinkOffset]))) = Cache->ListHead; Cache->ListHead = Object; Cache->CurrentDepth++; (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES); } return (AE_OK);}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:51,
示例13: acpi_ns_delete_nodevoid acpi_ns_delete_node(struct acpi_namespace_node *node){ union acpi_operand_object *obj_desc; union acpi_operand_object *next_desc; ACPI_FUNCTION_NAME(ns_delete_node); if (!node) { return_VOID; } /* Detach an object if there is one */ acpi_ns_detach_object(node); /* * Delete an attached data object list if present (objects that were * attached via acpi_attach_data). Note: After any normal object is * detached above, the only possible remaining object(s) are data * objects, in a linked list. */ obj_desc = node->object; while (obj_desc && (obj_desc->common.type == ACPI_TYPE_LOCAL_DATA)) { /* Invoke the attached data deletion handler if present */ if (obj_desc->data.handler) { obj_desc->data.handler(node, obj_desc->data.pointer); } next_desc = obj_desc->common.next_object; acpi_ut_remove_reference(obj_desc); obj_desc = next_desc; } /* Special case for the statically allocated root node */ if (node == acpi_gbl_root_node) { return; } /* Now we can delete the node */ (void)acpi_os_release_object(acpi_gbl_namespace_cache, node); ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_freed++); ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Node %p, Remaining %X/n", node, acpi_gbl_current_node_count));}
开发者ID:avagin,项目名称:linux,代码行数:49,
示例14: ACPI_FUNCTION_TRACE/**ltl * 功能: 创建命名空间对象 * 参数: * 返回值: * 说明: 为命名空间名字赋值,同时设定标志ACPI_DESC_TYPE_NAMED */struct acpi_namespace_node *acpi_ns_create_node(u32 name){ struct acpi_namespace_node *node; ACPI_FUNCTION_TRACE(ns_create_node); node = acpi_os_acquire_object(acpi_gbl_namespace_cache); if (!node) { return_PTR(NULL); } ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); node->name.integer = name; ACPI_SET_DESCRIPTOR_TYPE(node, ACPI_DESC_TYPE_NAMED); return_PTR(node);}
开发者ID:laitianli,项目名称:kernel-analyze_linux-2.6.18,代码行数:23,
示例15: acpi_os_release_objectacpi_statusacpi_os_release_object(struct acpi_memory_list * cache, void *object){ acpi_status status; ACPI_FUNCTION_ENTRY(); if (!cache || !object) { return (AE_BAD_PARAMETER); } /* If cache is full, just free this object */ if (cache->current_depth >= cache->max_depth) { ACPI_FREE(object); ACPI_MEM_TRACKING(cache->total_freed++); } /* Otherwise put this object back into the cache */ else { status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { return (status); } /* Mark the object as cached */ ACPI_MEMSET(object, 0xCA, cache->object_size); ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_CACHED); /* Put the object at the head of the cache list */ *(ACPI_CAST_INDIRECT_PTR(char, &(((char *)object)[cache-> link_offset]))) = cache->list_head; cache->list_head = object; cache->current_depth++; (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); } return (AE_OK);}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:45,
示例16: AcpiUtReleaseToCachevoidAcpiUtReleaseToCache ( UINT32 ListId, void *Object){ ACPI_MEMORY_LIST *CacheInfo; ACPI_FUNCTION_ENTRY (); /* If walk cache is full, just free this wallkstate object */ CacheInfo = &AcpiGbl_MemoryLists[ListId]; if (CacheInfo->CacheDepth >= CacheInfo->MaxCacheDepth) { ACPI_MEM_FREE (Object); ACPI_MEM_TRACKING (CacheInfo->TotalFreed++); } /* Otherwise put this object back into the cache */ else { if (ACPI_FAILURE (AcpiUtAcquireMutex (ACPI_MTX_CACHES))) { return; } /* Mark the object as cached */ ACPI_MEMSET (Object, 0xCA, CacheInfo->ObjectSize); ACPI_SET_DESCRIPTOR_TYPE (Object, ACPI_DESC_TYPE_CACHED); /* Put the object at the head of the cache list */ * (ACPI_CAST_INDIRECT_PTR (char, &(((char *) Object)[CacheInfo->LinkOffset]))) = CacheInfo->ListHead; CacheInfo->ListHead = Object; CacheInfo->CacheDepth++; (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES); }}
开发者ID:kame,项目名称:kame,代码行数:43,
示例17: AcpiNsDeleteNodevoidAcpiNsDeleteNode ( ACPI_NAMESPACE_NODE *Node){ ACPI_OPERAND_OBJECT *ObjDesc; ACPI_FUNCTION_NAME (NsDeleteNode); /* Detach an object if there is one */ AcpiNsDetachObject (Node); /* * Delete an attached data object if present (an object that was created * and attached via AcpiAttachData). Note: After any normal object is * detached above, the only possible remaining object is a data object. */ ObjDesc = Node->Object; if (ObjDesc && (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA)) { /* Invoke the attached data deletion handler if present */ if (ObjDesc->Data.Handler) { ObjDesc->Data.Handler (Node, ObjDesc->Data.Pointer); } AcpiUtRemoveReference (ObjDesc); } /* Now we can delete the node */ (void) AcpiOsReleaseObject (AcpiGbl_NamespaceCache, Node); ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalFreed++); ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Node %p, Remaining %X/n", Node, AcpiGbl_CurrentNodeCount));}
开发者ID:AhmadTux,项目名称:DragonFlyBSD,代码行数:41,
示例18: AcpiNsCreateNodeACPI_NAMESPACE_NODE *AcpiNsCreateNode ( UINT32 Name){ ACPI_NAMESPACE_NODE *Node; ACPI_FUNCTION_TRACE (NsCreateNode); Node = AcpiOsAcquireObject (AcpiGbl_NamespaceCache); if (!Node) { return_PTR (NULL); } ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalAllocated++); Node->Name.Integer = Name; ACPI_SET_DESCRIPTOR_TYPE (Node, ACPI_DESC_TYPE_NAMED); return_PTR (Node);}
开发者ID:andreiw,项目名称:polaris,代码行数:22,
示例19: AcpiUtReleaseToCachevoidAcpiUtReleaseToCache ( UINT32 ListId, void *Object){ ACPI_MEMORY_LIST *CacheInfo; FUNCTION_ENTRY (); /* If walk cache is full, just free this wallkstate object */ CacheInfo = &AcpiGbl_MemoryLists[ListId]; if (CacheInfo->CacheDepth >= CacheInfo->MaxCacheDepth) { ACPI_MEM_FREE (Object); ACPI_MEM_TRACKING (CacheInfo->TotalFreed++); } /* Otherwise put this object back into the cache */ else { AcpiUtAcquireMutex (ACPI_MTX_CACHES); /* Mark the object as cached */ MEMSET (Object, 0xCA, CacheInfo->ObjectSize); /* Put the object at the head of the cache list */ * (char **) (((char *) Object) + CacheInfo->LinkOffset) = CacheInfo->ListHead; CacheInfo->ListHead = Object; CacheInfo->CacheDepth++; AcpiUtReleaseMutex (ACPI_MTX_CACHES); }}
开发者ID:MarginC,项目名称:kame,代码行数:39,
示例20: acpi_ns_create_nodestruct acpi_namespace_node *acpi_ns_create_node ( u32 name){ struct acpi_namespace_node *node; ACPI_FUNCTION_TRACE ("ns_create_node"); node = ACPI_MEM_CALLOCATE (sizeof (struct acpi_namespace_node)); if (!node) { return_PTR (NULL); } ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].total_allocated++); node->name.integer = name; node->reference_count = 1; ACPI_SET_DESCRIPTOR_TYPE (node, ACPI_DESC_TYPE_NAMED); return_PTR (node);}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:23,
示例21: AcpiNsDeleteChildrenvoidAcpiNsDeleteChildren ( ACPI_NAMESPACE_NODE *ParentNode){ ACPI_NAMESPACE_NODE *ChildNode; ACPI_NAMESPACE_NODE *NextNode; UINT8 Flags; ACPI_FUNCTION_TRACE_PTR (NsDeleteChildren, ParentNode); if (!ParentNode) { return_VOID; } /* If no children, all done! */ ChildNode = ParentNode->Child; if (!ChildNode) { return_VOID; } /* * Deallocate all children at this level */ do { /* Get the things we need */ NextNode = ChildNode->Peer; Flags = ChildNode->Flags; /* Grandchildren should have all been deleted already */ if (ChildNode->Child) { ACPI_ERROR ((AE_INFO, "Found a grandchild! P=%p C=%p", ParentNode, ChildNode)); } /* Now we can free this child object */ ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalFreed++); ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p, Remaining %X/n", ChildNode, AcpiGbl_CurrentNodeCount)); /* * Detach an object if there is one, then free the child node */ AcpiNsDetachObject (ChildNode); /* Now we can delete the node */ (void) AcpiOsReleaseObject (AcpiGbl_NamespaceCache, ChildNode); /* And move on to the next child in the list */ ChildNode = NextNode; } while (!(Flags & ANOBJ_END_OF_PEER_LIST)); /* Clear the parent's child pointer */ ParentNode->Child = NULL; return_VOID;}
开发者ID:andreiw,项目名称:polaris,代码行数:72,
示例22: ACPI_FUNCTION_NAMEvoid *acpi_os_acquire_object(struct acpi_memory_list *cache){ acpi_status status; void *object; ACPI_FUNCTION_NAME(os_acquire_object); if (!cache) { return_PTR(NULL); } status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { return_PTR(NULL); } ACPI_MEM_TRACKING(cache->requests++); /* Check the cache first */ if (cache->list_head) { /* There is an object available, use it */ object = cache->list_head; cache->list_head = ACPI_GET_DESCRIPTOR_PTR(object); cache->current_depth--; ACPI_MEM_TRACKING(cache->hits++); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Object %p from %s cache/n", object, cache->list_name)); status = acpi_ut_release_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { return_PTR(NULL); } /* Clear (zero) the previously used Object */ ACPI_MEMSET(object, 0, cache->object_size); } else { /* The cache is empty, create a new object */ ACPI_MEM_TRACKING(cache->total_allocated++);#ifdef ACPI_DBG_TRACK_ALLOCATIONS if ((cache->total_allocated - cache->total_freed) > cache->max_occupied) { cache->max_occupied = cache->total_allocated - cache->total_freed; }#endif /* Avoid deadlock with ACPI_ALLOCATE_ZEROED */ status = acpi_ut_release_mutex(ACPI_MTX_CACHES); if (ACPI_FAILURE(status)) { return_PTR(NULL); } object = ACPI_ALLOCATE_ZEROED(cache->object_size); if (!object) { return_PTR(NULL); } } return_PTR(object);}
开发者ID:1800alex,项目名称:linux,代码行数:70,
示例23: acpi_ns_delete_childrenvoidacpi_ns_delete_children ( struct acpi_namespace_node *parent_node){ struct acpi_namespace_node *child_node; struct acpi_namespace_node *next_node; struct acpi_namespace_node *node; u8 flags; ACPI_FUNCTION_TRACE_PTR ("ns_delete_children", parent_node); if (!parent_node) { return_VOID; } /* If no children, all done! */ child_node = parent_node->child; if (!child_node) { return_VOID; } /* * Deallocate all children at this level */ do { /* Get the things we need */ next_node = child_node->peer; flags = child_node->flags; /* Grandchildren should have all been deleted already */ if (child_node->child) { ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Found a grandchild! P=%p C=%p/n", parent_node, child_node)); } /* Now we can free this child object */ ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].total_freed++); ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "Object %p, Remaining %X/n", child_node, acpi_gbl_current_node_count)); /* * Detach an object if there is one, then free the child node */ acpi_ns_detach_object (child_node); /* * Decrement the reference count(s) of all parents up to * the root! (counts were incremented when the node was created) */ node = child_node; while ((node = acpi_ns_get_parent_node (node)) != NULL) { node->reference_count--; } /* There should be only one reference remaining on this node */ if (child_node->reference_count != 1) { ACPI_REPORT_WARNING (("Existing references (%d) on node being deleted (%p)/n", child_node->reference_count, child_node)); } /* Now we can delete the node */ ACPI_MEM_FREE (child_node); /* And move on to the next child in the list */ child_node = next_node; } while (!(flags & ANOBJ_END_OF_PEER_LIST)); /* Clear the parent's child pointer */ parent_node->child = NULL; return_VOID;}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:85,
示例24: AcpiUtInitGlobalsvoidAcpiUtInitGlobals ( void){ UINT32 i; ACPI_FUNCTION_TRACE ("UtInitGlobals"); /* Memory allocation and cache lists */ ACPI_MEMSET (AcpiGbl_MemoryLists, 0, sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS); AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_GENERIC_STATE *) NULL)->Common.Next), NULL); AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_PARSE_OBJECT *) NULL)->Common.Next), NULL); AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_PARSE_OBJECT *) NULL)->Common.Next), NULL); AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_OPERAND_OBJECT *) NULL)->Cache.Next), NULL); AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].LinkOffset = (UINT16) ACPI_PTR_DIFF (&(((ACPI_WALK_STATE *) NULL)->Next), NULL); AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ObjectSize = sizeof (ACPI_NAMESPACE_NODE); AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].ObjectSize = sizeof (ACPI_GENERIC_STATE); AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].ObjectSize = sizeof (ACPI_PARSE_OBJ_COMMON); AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].ObjectSize = sizeof (ACPI_PARSE_OBJ_NAMED); AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].ObjectSize = sizeof (ACPI_OPERAND_OBJECT); AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].ObjectSize = sizeof (ACPI_WALK_STATE); AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].MaxCacheDepth = ACPI_MAX_STATE_CACHE_DEPTH; AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].MaxCacheDepth = ACPI_MAX_PARSE_CACHE_DEPTH; AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].MaxCacheDepth = ACPI_MAX_EXTPARSE_CACHE_DEPTH; AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].MaxCacheDepth = ACPI_MAX_OBJECT_CACHE_DEPTH; AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].MaxCacheDepth = ACPI_MAX_WALK_CACHE_DEPTH; ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_GLOBAL].ListName = "Global Memory Allocation"); ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_NSNODE].ListName = "Namespace Nodes"); ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_STATE].ListName = "State Object Cache"); ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE].ListName = "Parse Node Cache"); ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_PSNODE_EXT].ListName = "Extended Parse Node Cache"); ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_OPERAND].ListName = "Operand Object Cache"); ACPI_MEM_TRACKING (AcpiGbl_MemoryLists[ACPI_MEM_LIST_WALK].ListName = "Tree Walk Node Cache"); /* ACPI table structure */ for (i = 0; i < NUM_ACPI_TABLES; i++) { AcpiGbl_AcpiTables[i].Prev = &AcpiGbl_AcpiTables[i]; AcpiGbl_AcpiTables[i].Next = &AcpiGbl_AcpiTables[i]; AcpiGbl_AcpiTables[i].Pointer = NULL; AcpiGbl_AcpiTables[i].Length = 0; AcpiGbl_AcpiTables[i].Allocation = ACPI_MEM_NOT_ALLOCATED; AcpiGbl_AcpiTables[i].Count = 0; } /* Mutex locked flags */ for (i = 0; i < NUM_MTX; i++) { AcpiGbl_AcpiMutexInfo[i].Mutex = NULL; AcpiGbl_AcpiMutexInfo[i].OwnerId = ACPI_MUTEX_NOT_ACQUIRED; AcpiGbl_AcpiMutexInfo[i].UseCount = 0; } /* GPE support */ AcpiGbl_GpeBlockListHead = NULL; /* Global notify handlers */ AcpiGbl_SysNotify.Handler = NULL; AcpiGbl_DrvNotify.Handler = NULL; AcpiGbl_InitHandler = NULL; /* Global "typed" ACPI table pointers */ AcpiGbl_RSDP = NULL; AcpiGbl_XSDT = NULL; AcpiGbl_FACS = NULL; AcpiGbl_FADT = NULL; AcpiGbl_DSDT = NULL; /* Global Lock support */ AcpiGbl_GlobalLockAcquired = FALSE; AcpiGbl_GlobalLockThreadCount = 0; AcpiGbl_GlobalLockHandle = 0; /* Miscellaneous variables */ AcpiGbl_TableFlags = ACPI_PHYSICAL_POINTER; AcpiGbl_RsdpOriginalLocation = 0; AcpiGbl_CmSingleStep = FALSE; AcpiGbl_DbTerminateThreads = FALSE; AcpiGbl_Shutdown = FALSE; AcpiGbl_NsLookupCount = 0; AcpiGbl_PsFindCount = 0; AcpiGbl_AcpiHardwarePresent = TRUE; AcpiGbl_NextTableOwnerId = ACPI_FIRST_TABLE_ID; AcpiGbl_NextMethodOwnerId = ACPI_FIRST_METHOD_ID; AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING; AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT;//.........这里部分代码省略.........
开发者ID:UnitedMarsupials,项目名称:kame,代码行数:101,
示例25: acpi_ut_init_globalsvoidacpi_ut_init_globals ( void){ u32 i; FUNCTION_TRACE ("Ut_init_globals"); /* Memory allocation and cache lists */ MEMSET (acpi_gbl_memory_lists, 0, sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS); acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset = (u16) (NATIVE_UINT) &(((acpi_generic_state *) NULL)->common.next); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset = (u16) (NATIVE_UINT) &(((acpi_parse_object *) NULL)->next); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) (NATIVE_UINT) &(((acpi_parse2_object *) NULL)->next); acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset = (u16) (NATIVE_UINT) &(((acpi_operand_object *) NULL)->cache.next); acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset = (u16) (NATIVE_UINT) &(((acpi_walk_state *) NULL)->next); acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size = sizeof (acpi_namespace_node); acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size = sizeof (acpi_generic_state); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size = sizeof (acpi_parse_object); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (acpi_parse2_object); acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size = sizeof (acpi_operand_object); acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size = sizeof (acpi_walk_state); acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].max_cache_depth = MAX_STATE_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].max_cache_depth = MAX_PARSE_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].max_cache_depth = MAX_EXTPARSE_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].max_cache_depth = MAX_OBJECT_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].max_cache_depth = MAX_WALK_CACHE_DEPTH; ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].list_name = "Global Memory Allocation"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].list_name = "Namespace Nodes"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].list_name = "State Object Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].list_name = "Parse Node Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].list_name = "Extended Parse Node Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].list_name = "Operand Object Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].list_name = "Tree Walk Node Cache"); /* ACPI table structure */ for (i = 0; i < NUM_ACPI_TABLES; i++) { acpi_gbl_acpi_tables[i].prev = &acpi_gbl_acpi_tables[i]; acpi_gbl_acpi_tables[i].next = &acpi_gbl_acpi_tables[i]; acpi_gbl_acpi_tables[i].pointer = NULL; acpi_gbl_acpi_tables[i].length = 0; acpi_gbl_acpi_tables[i].allocation = ACPI_MEM_NOT_ALLOCATED; acpi_gbl_acpi_tables[i].count = 0; } /* Address Space handler array */ for (i = 0; i < ACPI_NUM_ADDRESS_SPACES; i++) { acpi_gbl_address_spaces[i].handler = NULL; acpi_gbl_address_spaces[i].context = NULL; } /* Mutex locked flags */ for (i = 0; i < NUM_MTX; i++) { acpi_gbl_acpi_mutex_info[i].mutex = NULL; acpi_gbl_acpi_mutex_info[i].owner_id = ACPI_MUTEX_NOT_ACQUIRED; acpi_gbl_acpi_mutex_info[i].use_count = 0; } /* Global notify handlers */ acpi_gbl_sys_notify.handler = NULL; acpi_gbl_drv_notify.handler = NULL; /* Global "typed" ACPI table pointers */ acpi_gbl_RSDP = NULL; acpi_gbl_XSDT = NULL; acpi_gbl_FACS = NULL; acpi_gbl_FADT = NULL; acpi_gbl_DSDT = NULL; /* Global Lock support */ acpi_gbl_global_lock_acquired = FALSE; acpi_gbl_global_lock_thread_count = 0; /* Miscellaneous variables */ acpi_gbl_system_flags = 0; acpi_gbl_startup_flags = 0; acpi_gbl_rsdp_original_location = 0; acpi_gbl_cm_single_step = FALSE; acpi_gbl_db_terminate_threads = FALSE; acpi_gbl_shutdown = FALSE; acpi_gbl_ns_lookup_count = 0; acpi_gbl_ps_find_count = 0; acpi_gbl_acpi_hardware_present = TRUE; acpi_gbl_next_table_owner_id = FIRST_TABLE_ID;//.........这里部分代码省略.........
开发者ID:jhbsz,项目名称:MI424WR_GEN2_Rev_E-F,代码行数:101,
示例26: acpi_ut_init_globalsvoidacpi_ut_init_globals ( void){ u32 i; ACPI_FUNCTION_TRACE ("ut_init_globals"); /* Memory allocation and cache lists */ ACPI_MEMSET (acpi_gbl_memory_lists, 0, sizeof (struct acpi_memory_list) * ACPI_NUM_MEM_LISTS); acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_generic_state *) NULL)->common.next), NULL); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_parse_object *) NULL)->common.next), NULL); acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset = (u16) ACPI_PTR_DIFF (&(((union acpi_operand_object *) NULL)->cache.next), NULL); acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset = (u16) ACPI_PTR_DIFF (&(((struct acpi_walk_state *) NULL)->next), NULL); acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size = sizeof (struct acpi_namespace_node); acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size = sizeof (union acpi_generic_state); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size = sizeof (struct acpi_parse_obj_common); acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (struct acpi_parse_obj_named); acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size = sizeof (union acpi_operand_object); acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size = sizeof (struct acpi_walk_state); acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].max_cache_depth = ACPI_MAX_STATE_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].max_cache_depth = ACPI_MAX_PARSE_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].max_cache_depth = ACPI_MAX_EXTPARSE_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].max_cache_depth = ACPI_MAX_OBJECT_CACHE_DEPTH; acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].max_cache_depth = ACPI_MAX_WALK_CACHE_DEPTH; ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].list_name = "Global Memory Allocation"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].list_name = "Namespace Nodes"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].list_name = "State Object Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].list_name = "Parse Node Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].list_name = "Extended Parse Node Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].list_name = "Operand Object Cache"); ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].list_name = "Tree Walk Node Cache"); /* ACPI table structure */ for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { acpi_gbl_table_lists[i].next = NULL; acpi_gbl_table_lists[i].count = 0; } /* Mutex locked flags */ for (i = 0; i < NUM_MUTEX; i++) { acpi_gbl_mutex_info[i].mutex = NULL; acpi_gbl_mutex_info[i].owner_id = ACPI_MUTEX_NOT_ACQUIRED; acpi_gbl_mutex_info[i].use_count = 0; } /* GPE support */ acpi_gbl_gpe_xrupt_list_head = NULL; acpi_gbl_gpe_fadt_blocks[0] = NULL; acpi_gbl_gpe_fadt_blocks[1] = NULL; /* Global notify handlers */ acpi_gbl_system_notify.handler = NULL; acpi_gbl_device_notify.handler = NULL; acpi_gbl_exception_handler = NULL; acpi_gbl_init_handler = NULL; /* Global "typed" ACPI table pointers */ acpi_gbl_RSDP = NULL; acpi_gbl_XSDT = NULL; acpi_gbl_FACS = NULL; acpi_gbl_FADT = NULL; acpi_gbl_DSDT = NULL; /* Global Lock support */ acpi_gbl_global_lock_acquired = FALSE; acpi_gbl_global_lock_thread_count = 0; acpi_gbl_global_lock_handle = 0; /* Miscellaneous variables */ acpi_gbl_table_flags = ACPI_PHYSICAL_POINTER; acpi_gbl_rsdp_original_location = 0; acpi_gbl_cm_single_step = FALSE; acpi_gbl_db_terminate_threads = FALSE; acpi_gbl_shutdown = FALSE; acpi_gbl_ns_lookup_count = 0; acpi_gbl_ps_find_count = 0; acpi_gbl_acpi_hardware_present = TRUE; acpi_gbl_next_table_owner_id = ACPI_FIRST_TABLE_ID; acpi_gbl_next_method_owner_id = ACPI_FIRST_METHOD_ID; acpi_gbl_debugger_configuration = DEBUGGER_THREADING; acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT;//.........这里部分代码省略.........
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:101,
示例27: acpi_ns_delete_childrenvoid acpi_ns_delete_children(struct acpi_namespace_node *parent_node){ struct acpi_namespace_node *child_node; struct acpi_namespace_node *next_node; u8 flags; ACPI_FUNCTION_TRACE_PTR(ns_delete_children, parent_node); if (!parent_node) { return_VOID; } /* If no children, all done! */ child_node = parent_node->child; if (!child_node) { return_VOID; } /* * Deallocate all children at this level */ do { /* Get the things we need */ next_node = child_node->peer; flags = child_node->flags; /* Grandchildren should have all been deleted already */ if (child_node->child) { ACPI_ERROR((AE_INFO, "Found a grandchild! P=%p C=%p", parent_node, child_node)); } /* Now we can free this child object */ ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_freed++); ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Object %p, Remaining %X/n", child_node, acpi_gbl_current_node_count)); /* * Detach an object if there is one, then free the child node */ acpi_ns_detach_object(child_node); /* Now we can delete the node */ (void)acpi_os_release_object(acpi_gbl_namespace_cache, child_node); /* And move on to the next child in the list */ child_node = next_node; } while (!(flags & ANOBJ_END_OF_PEER_LIST)); /* Clear the parent's child pointer */ parent_node->child = NULL; return_VOID;}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:66,
注:本文中的ACPI_MEM_TRACKING函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ACPI_MOVE_64_TO_64函数代码示例 C++ ACPI_MEM_FREE函数代码示例 |