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

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

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

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

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

示例1: AcpiDbInitialize

ACPI_STATUSAcpiDbInitialize (    void){    ACPI_STATUS             Status;    /* Init globals */    AcpiGbl_DbBuffer            = NULL;    AcpiGbl_DbFilename          = NULL;    AcpiGbl_DbOutputToFile      = FALSE;    AcpiGbl_DbDebugLevel        = ACPI_LV_VERBOSITY2;    AcpiGbl_DbConsoleDebugLevel = ACPI_NORMAL_DEFAULT | ACPI_LV_TABLES;    AcpiGbl_DbOutputFlags       = ACPI_DB_CONSOLE_OUTPUT;    AcpiGbl_DbOpt_tables        = FALSE;    AcpiGbl_DbOpt_disasm        = FALSE;    AcpiGbl_DbOpt_stats         = FALSE;    AcpiGbl_DbOpt_verbose       = TRUE;    AcpiGbl_DbOpt_ini_methods   = TRUE;    AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);    if (!AcpiGbl_DbBuffer)    {        return (AE_NO_MEMORY);    }    ACPI_MEMSET (AcpiGbl_DbBuffer, 0, ACPI_DEBUG_BUFFER_SIZE);    /* Initial scope is the root */    AcpiGbl_DbScopeBuf [0] = '//';    AcpiGbl_DbScopeBuf [1] =  0;    AcpiGbl_DbScopeNode = AcpiGbl_RootNode;    /*     * If configured for multi-thread support, the debug executor runs in     * a separate thread so that the front end can be in another address     * space, environment, or even another machine.     */    if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)    {        /* These were created with one unit, grab it */        Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_COMPLETE);        if (ACPI_FAILURE (Status))        {            AcpiOsPrintf ("Could not get debugger mutex/n");            return (Status);        }        Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY);        if (ACPI_FAILURE (Status))        {            AcpiOsPrintf ("Could not get debugger mutex/n");            return (Status);        }        /* Create the debug execution thread to execute commands */        Status = AcpiOsExecute (OSL_DEBUGGER_THREAD, AcpiDbExecuteThread, NULL);        if (ACPI_FAILURE (Status))        {            AcpiOsPrintf ("Could not start debugger thread/n");            return (Status);        }    }    if (!AcpiGbl_DbOpt_verbose)    {        AcpiGbl_DbOpt_disasm = TRUE;        AcpiGbl_DbOpt_stats = FALSE;    }    return (AE_OK);}
开发者ID:ksashtekar,项目名称:Ganoid,代码行数:77,


示例2: AcpiEvDeleteGpeBlock

ACPI_STATUSAcpiEvDeleteGpeBlock (    ACPI_GPE_BLOCK_INFO     *GpeBlock){    ACPI_STATUS             Status;    ACPI_CPU_FLAGS          Flags;    ACPI_FUNCTION_TRACE (EvInstallGpeBlock);    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Disable all GPEs in this block */    Status = AcpiHwDisableGpeBlock (GpeBlock->XruptBlock, GpeBlock, NULL);    if (!GpeBlock->Previous && !GpeBlock->Next)    {        /* This is the last GpeBlock on this interrupt */        Status = AcpiEvDeleteGpeXrupt (GpeBlock->XruptBlock);        if (ACPI_FAILURE (Status))        {            goto UnlockAndExit;        }    }    else    {        /* Remove the block on this interrupt with lock */        Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);        if (GpeBlock->Previous)        {            GpeBlock->Previous->Next = GpeBlock->Next;        }        else        {            GpeBlock->XruptBlock->GpeBlockListHead = GpeBlock->Next;        }        if (GpeBlock->Next)        {            GpeBlock->Next->Previous = GpeBlock->Previous;        }        AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);    }    AcpiCurrentGpeCount -= GpeBlock->GpeCount;    /* Free the GpeBlock */    ACPI_FREE (GpeBlock->RegisterInfo);    ACPI_FREE (GpeBlock->EventInfo);    ACPI_FREE (GpeBlock);UnlockAndExit:    Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);    return_ACPI_STATUS (Status);}
开发者ID:Strongc,项目名称:reactos,代码行数:65,


示例3: AcpiNsGetNode

ACPI_STATUSAcpiNsGetNode (    ACPI_NAMESPACE_NODE     *PrefixNode,    const char              *Pathname,    UINT32                  Flags,    ACPI_NAMESPACE_NODE     **ReturnNode){    ACPI_GENERIC_STATE      ScopeInfo;    ACPI_STATUS             Status;    char                    *InternalPath;    ACPI_FUNCTION_TRACE_PTR (NsGetNode, ACPI_CAST_PTR (char, Pathname));    if (!Pathname)    {        *ReturnNode = PrefixNode;        if (!PrefixNode)        {            *ReturnNode = AcpiGbl_RootNode;        }        return_ACPI_STATUS (AE_OK);    }    /* Convert path to internal representation */    Status = AcpiNsInternalizeName (Pathname, &InternalPath);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Must lock namespace during lookup */    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        goto Cleanup;    }    /* Setup lookup scope (search starting point) */    ScopeInfo.Scope.Node = PrefixNode;    /* Lookup the name in the namespace */    Status = AcpiNsLookup (&ScopeInfo, InternalPath, ACPI_TYPE_ANY,                ACPI_IMODE_EXECUTE, (Flags | ACPI_NS_DONT_OPEN_SCOPE),                NULL, ReturnNode);    if (ACPI_FAILURE (Status))    {        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s, %s/n",                Pathname, AcpiFormatException (Status)));    }    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);Cleanup:    ACPI_FREE (InternalPath);    return_ACPI_STATUS (Status);}
开发者ID:AgamAgarwal,项目名称:minix,代码行数:62,


示例4: AcpiEvInstallRegionHandlers

ACPI_STATUSAcpiEvInstallRegionHandlers (    void){    ACPI_STATUS             Status;    UINT32                  i;    ACPI_FUNCTION_TRACE (EvInstallRegionHandlers);    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /*     * All address spaces (PCI Config, EC, SMBus) are scope dependent and     * registration must occur for a specific device.     *     * In the case of the system memory and IO address spaces there is     * currently no device associated with the address space. For these we     * use the root.     *     * We install the default PCI config space handler at the root so that     * this space is immediately available even though the we have not     * enumerated all the PCI Root Buses yet. This is to conform to the ACPI     * specification which states that the PCI config space must be always     * available -- even though we are nowhere near ready to find the PCI root     * buses at this point.     *     * NOTE: We ignore AE_ALREADY_EXISTS because this means that a handler     * has already been installed (via AcpiInstallAddressSpaceHandler).     * Similar for AE_SAME_HANDLER.     */    for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++)    {        Status = AcpiEvInstallSpaceHandler (AcpiGbl_RootNode,            AcpiGbl_DefaultAddressSpaces[i],            ACPI_DEFAULT_HANDLER, NULL, NULL);        switch (Status)        {        case AE_OK:        case AE_SAME_HANDLER:        case AE_ALREADY_EXISTS:            /* These exceptions are all OK */            Status = AE_OK;            break;        default:            goto UnlockAndExit;        }    }UnlockAndExit:    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);    return_ACPI_STATUS (Status);}
开发者ID:FreeBSDFoundation,项目名称:freebsd,代码行数:62,


示例5: AcpiUtTrackAllocation

static ACPI_STATUSAcpiUtTrackAllocation (    ACPI_DEBUG_MEM_BLOCK    *Allocation,    ACPI_SIZE               Size,    UINT8                   AllocType,    UINT32                  Component,    const char              *Module,    UINT32                  Line){    ACPI_MEMORY_LIST        *MemList;    ACPI_DEBUG_MEM_BLOCK    *Element;    ACPI_STATUS             Status = AE_OK;    ACPI_FUNCTION_TRACE_PTR (UtTrackAllocation, Allocation);    MemList = AcpiGbl_GlobalList;    Status = AcpiUtAcquireMutex (ACPI_MTX_MEMORY);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /*     * Search list for this address to make sure it is not already on the list.     * This will catch several kinds of problems.     */    Element = AcpiUtFindAllocation (Allocation);    if (Element)    {        ACPI_ERROR ((AE_INFO,            "UtTrackAllocation: Allocation already present in list! (%p)",            Allocation));        ACPI_ERROR ((AE_INFO, "Element %p Address %p",            Element, Allocation));        goto UnlockAndExit;    }    /* Fill in the instance data. */    Allocation->Size      = (UINT32) Size;    Allocation->AllocType = AllocType;    Allocation->Component = Component;    Allocation->Line      = Line;    ACPI_STRNCPY (Allocation->Module, Module, ACPI_MAX_MODULE_NAME);    Allocation->Module[ACPI_MAX_MODULE_NAME-1] = 0;    /* Insert at list head */    if (MemList->ListHead)    {        ((ACPI_DEBUG_MEM_BLOCK *)(MemList->ListHead))->Previous = Allocation;    }    Allocation->Next = MemList->ListHead;    Allocation->Previous = NULL;    MemList->ListHead = Allocation;UnlockAndExit:    Status = AcpiUtReleaseMutex (ACPI_MTX_MEMORY);    return_ACPI_STATUS (Status);}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:68,


示例6: AcpiRemoveSciHandler

ACPI_STATUSAcpiRemoveSciHandler (    ACPI_SCI_HANDLER        Address){    ACPI_SCI_HANDLER_INFO   *PrevSciHandler;    ACPI_SCI_HANDLER_INFO   *NextSciHandler;    ACPI_CPU_FLAGS          Flags;    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (AcpiRemoveSciHandler);    if (!Address)    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Remove the SCI handler with lock */    Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);    PrevSciHandler = NULL;    NextSciHandler = AcpiGbl_SciHandlerList;    while (NextSciHandler)    {        if (NextSciHandler->Address == Address)        {            /* Unlink and free the SCI handler info block */            if (PrevSciHandler)            {                PrevSciHandler->Next = NextSciHandler->Next;            }            else            {                AcpiGbl_SciHandlerList = NextSciHandler->Next;            }            AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);            ACPI_FREE (NextSciHandler);            goto UnlockAndExit;        }        PrevSciHandler = NextSciHandler;        NextSciHandler = NextSciHandler->Next;    }    AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);    Status = AE_NOT_EXIST;UnlockAndExit:    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);    return_ACPI_STATUS (Status);}
开发者ID:Strongc,项目名称:reactos,代码行数:62,


示例7: AcpiEvInstallGpeHandler

static ACPI_STATUSAcpiEvInstallGpeHandler (    ACPI_HANDLE             GpeDevice,    UINT32                  GpeNumber,    UINT32                  Type,    BOOLEAN                 IsRawHandler,    ACPI_GPE_HANDLER        Address,    void                    *Context){    ACPI_GPE_EVENT_INFO     *GpeEventInfo;    ACPI_GPE_HANDLER_INFO   *Handler;    ACPI_STATUS             Status;    ACPI_CPU_FLAGS          Flags;    ACPI_FUNCTION_TRACE (EvInstallGpeHandler);    /* Parameter validation */    if ((!Address) || (Type & ~ACPI_GPE_XRUPT_TYPE_MASK))    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Allocate and init handler object (before lock) */    Handler = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_HANDLER_INFO));    if (!Handler)    {        Status = AE_NO_MEMORY;        goto UnlockAndExit;    }    Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);    /* Ensure that we have a valid GPE number */    GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);    if (!GpeEventInfo)    {        Status = AE_BAD_PARAMETER;        goto FreeAndExit;    }    /* Make sure that there isn't a handler there already */    if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==            ACPI_GPE_DISPATCH_HANDLER) ||        (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==            ACPI_GPE_DISPATCH_RAW_HANDLER))    {        Status = AE_ALREADY_EXISTS;        goto FreeAndExit;    }    Handler->Address = Address;    Handler->Context = Context;    Handler->MethodNode = GpeEventInfo->Dispatch.MethodNode;    Handler->OriginalFlags = (UINT8) (GpeEventInfo->Flags &        (ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK));    /*     * If the GPE is associated with a method, it may have been enabled     * automatically during initialization, in which case it has to be     * disabled now to avoid spurious execution of the handler.     */    if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==            ACPI_GPE_DISPATCH_METHOD) ||         (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==            ACPI_GPE_DISPATCH_NOTIFY)) &&        GpeEventInfo->RuntimeCount)    {        Handler->OriginallyEnabled = TRUE;        (void) AcpiEvRemoveGpeReference (GpeEventInfo);        /* Sanity check of original type against new type */        if (Type != (UINT32) (GpeEventInfo->Flags & ACPI_GPE_XRUPT_TYPE_MASK))        {            ACPI_WARNING ((AE_INFO, "GPE type mismatch (level/edge)"));        }    }    /* Install the handler */    GpeEventInfo->Dispatch.Handler = Handler;    /* Setup up dispatch flags to indicate handler (vs. method/notify) */    GpeEventInfo->Flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);    GpeEventInfo->Flags |= (UINT8) (Type | (IsRawHandler ?        ACPI_GPE_DISPATCH_RAW_HANDLER : ACPI_GPE_DISPATCH_HANDLER));//.........这里部分代码省略.........
开发者ID:Strongc,项目名称:reactos,代码行数:101,


示例8: AcpiEvInitializeRegion

//.........这里部分代码省略.........    Node = RegionObj->Region.Node->Parent;    SpaceId = RegionObj->Region.SpaceId;    /*     * The following loop depends upon the root Node having no parent     * ie: AcpiGbl_RootNode->Parent being set to NULL     */    while (Node)    {        /* Check to see if a handler exists */        HandlerObj = NULL;        ObjDesc = AcpiNsGetAttachedObject (Node);        if (ObjDesc)        {            /* Can only be a handler if the object exists */            switch (Node->Type)            {            case ACPI_TYPE_DEVICE:            case ACPI_TYPE_PROCESSOR:            case ACPI_TYPE_THERMAL:                HandlerObj = ObjDesc->CommonNotify.Handler;                break;            case ACPI_TYPE_METHOD:                /*                 * If we are executing module level code, the original                 * Node's object was replaced by this Method object and we                 * saved the handler in the method object.                 *                 * See AcpiNsExecModuleCode                 */                if (ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL)                {                    HandlerObj = ObjDesc->Method.Dispatch.Handler;                }                break;            default:                /* Ignore other objects */                break;            }            HandlerObj = AcpiEvFindRegionHandler (SpaceId, HandlerObj);            if (HandlerObj)            {                /* Found correct handler */                ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,                    "Found handler %p for region %p in obj %p/n",                    HandlerObj, RegionObj, ObjDesc));                Status = AcpiEvAttachRegion (HandlerObj, RegionObj,                    AcpiNsLocked);                /*                 * Tell all users that this region is usable by                 * running the _REG method                 */                if (AcpiNsLocked)                {                    Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);                    if (ACPI_FAILURE (Status))                    {                        return_ACPI_STATUS (Status);                    }                }                Status = AcpiEvExecuteRegMethod (RegionObj, ACPI_REG_CONNECT);                if (AcpiNsLocked)                {                    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);                    if (ACPI_FAILURE (Status))                    {                        return_ACPI_STATUS (Status);                    }                }                return_ACPI_STATUS (AE_OK);            }        }        /* This node does not have the handler we need; Pop up one level */        Node = Node->Parent;    }    /* If we get here, there is no handler for this region */    ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,        "No handler for RegionType %s(%X) (RegionObj %p)/n",        AcpiUtGetRegionName (SpaceId), SpaceId, RegionObj));    return_ACPI_STATUS (AE_NOT_EXIST);}
开发者ID:Raphine,项目名称:Raph_Kernel,代码行数:101,


示例9: AcpiTbLoadNamespace

static ACPI_STATUSAcpiTbLoadNamespace (    void){    ACPI_STATUS             Status;    UINT32                  i;    ACPI_TABLE_HEADER       *NewDsdt;    ACPI_FUNCTION_TRACE (TbLoadNamespace);    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    /*     * Load the namespace. The DSDT is required, but any SSDT and     * PSDT tables are optional. Verify the DSDT.     */    if (!AcpiGbl_RootTableList.CurrentTableCount ||        !ACPI_COMPARE_NAME (            &(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature),            ACPI_SIG_DSDT) ||         ACPI_FAILURE (AcpiTbValidateTable (            &AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT])))    {        Status = AE_NO_ACPI_TABLES;        goto UnlockAndExit;    }    /*     * Save the DSDT pointer for simple access. This is the mapped memory     * address. We must take care here because the address of the .Tables     * array can change dynamically as tables are loaded at run-time. Note:     * .Pointer field is not validated until after call to AcpiTbValidateTable.     */    AcpiGbl_DSDT = AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer;    /*     * Optionally copy the entire DSDT to local memory (instead of simply     * mapping it.) There are some BIOSs that corrupt or replace the original     * DSDT, creating the need for this option. Default is FALSE, do not copy     * the DSDT.     */    if (AcpiGbl_CopyDsdtLocally)    {        NewDsdt = AcpiTbCopyDsdt (ACPI_TABLE_INDEX_DSDT);        if (NewDsdt)        {            AcpiGbl_DSDT = NewDsdt;        }    }    /*     * Save the original DSDT header for detection of table corruption     * and/or replacement of the DSDT from outside the OS.     */    ACPI_MEMCPY (&AcpiGbl_OriginalDsdtHeader, AcpiGbl_DSDT,        sizeof (ACPI_TABLE_HEADER));    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);    /* Load and parse tables */    Status = AcpiNsLoadTable (ACPI_TABLE_INDEX_DSDT, AcpiGbl_RootNode);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)    {        if ((!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),                    ACPI_SIG_SSDT) &&             !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),                    ACPI_SIG_PSDT)) ||             ACPI_FAILURE (AcpiTbValidateTable (                &AcpiGbl_RootTableList.Tables[i])))        {            continue;        }        /* Ignore errors while loading tables, get as many as possible */        (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);        (void) AcpiNsLoadTable (i, AcpiGbl_RootNode);        (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    }    ACPI_INFO ((AE_INFO, "All ACPI Tables successfully acquired"));UnlockAndExit:    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);    return_ACPI_STATUS (Status);}
开发者ID:Lxg1582,项目名称:freebsd,代码行数:97,


示例10: AcpiNsRootInitialize

ACPI_STATUSAcpiNsRootInitialize (    void){    ACPI_STATUS                 Status;    const ACPI_PREDEFINED_NAMES *InitVal = NULL;    ACPI_NAMESPACE_NODE         *NewNode;    ACPI_OPERAND_OBJECT         *ObjDesc;    ACPI_STRING                 Val = NULL;    ACPI_FUNCTION_TRACE (NsRootInitialize);    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /*     * The global root ptr is initially NULL, so a non-NULL value indicates     * that AcpiNsRootInitialize() has already been called; just return.     */    if (AcpiGbl_RootNode)    {        Status = AE_OK;        goto UnlockAndExit;    }    /*     * Tell the rest of the subsystem that the root is initialized     * (This is OK because the namespace is locked)     */    AcpiGbl_RootNode = &AcpiGbl_RootNodeStruct;    /* Enter the pre-defined names in the name table */    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,        "Entering predefined entries into namespace/n"));    for (InitVal = AcpiGbl_PreDefinedNames; InitVal->Name; InitVal++)    {        /* _OSI is optional for now, will be permanent later */        if (!strcmp (InitVal->Name, "_OSI") && !AcpiGbl_CreateOsiMethod)        {            continue;        }        Status = AcpiNsLookup (NULL, __UNCONST(InitVal->Name), InitVal->Type,                        ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,                        NULL, &NewNode);        if (ACPI_FAILURE (Status))        {            ACPI_EXCEPTION ((AE_INFO, Status,                "Could not create predefined name %s",                InitVal->Name));            continue;        }        /*         * Name entered successfully. If entry in PreDefinedNames[] specifies         * an initial value, create the initial value.         */        if (InitVal->Val)        {            Status = AcpiOsPredefinedOverride (InitVal, &Val);            if (ACPI_FAILURE (Status))            {                ACPI_ERROR ((AE_INFO,                    "Could not override predefined %s",                    InitVal->Name));            }            if (!Val)            {                Val = __UNCONST(InitVal->Val);            }            /*             * Entry requests an initial value, allocate a             * descriptor for it.             */            ObjDesc = AcpiUtCreateInternalObject (InitVal->Type);            if (!ObjDesc)            {                Status = AE_NO_MEMORY;                goto UnlockAndExit;            }            /*             * Convert value string from table entry to             * internal representation. Only types actually             * used for initial values are implemented here.             */            switch (InitVal->Type)            {            case ACPI_TYPE_METHOD://.........这里部分代码省略.........
开发者ID:yazshel,项目名称:netbsd-kernel,代码行数:101,


示例11: AcpiExLoadOp

//.........这里部分代码省略.........        /* Table cannot extend beyond the buffer */        if (Length > ObjDesc->Buffer.Length)        {            return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);        }        if (Length < sizeof (ACPI_TABLE_HEADER))        {            return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);        }        /*         * Copy the table from the buffer because the buffer could be         * modified or even deleted in the future         */        Table = ACPI_ALLOCATE (Length);        if (!Table)        {            return_ACPI_STATUS (AE_NO_MEMORY);        }        memcpy (Table, TableHeader, Length);        break;    default:        return_ACPI_STATUS (AE_AML_OPERAND_TYPE);    }    /* Install the new table into the local data structures */    ACPI_INFO (("Dynamic OEM Table Load:"));    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),        ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, TRUE,        &TableIndex);    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);    if (ACPI_FAILURE (Status))    {        /* Delete allocated table buffer */        ACPI_FREE (Table);        return_ACPI_STATUS (Status);    }    /*     * Note: Now table is "INSTALLED", it must be validated before     * loading.     */    Status = AcpiTbValidateTable (        &AcpiGbl_RootTableList.Tables[TableIndex]);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /*     * Add the table to the namespace.     *     * Note: Load the table objects relative to the root of the namespace.     * This appears to go against the ACPI specification, but we do it for     * compatibility with other ACPI implementations.     */
开发者ID:BarrelfishOS,项目名称:barrelfish,代码行数:67,


示例12: AcpiWalkNamespace

ACPI_STATUSAcpiWalkNamespace (    ACPI_OBJECT_TYPE        Type,    ACPI_HANDLE             StartObject,    UINT32                  MaxDepth,    ACPI_WALK_CALLBACK      UserFunction,    void                    *Context,    void                    **ReturnValue){    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (AcpiWalkNamespace);    /* Parameter validation */    if ((Type > ACPI_TYPE_LOCAL_MAX) ||        (!MaxDepth)                  ||        (!UserFunction))    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    /*     * Need to acquire the namespace reader lock to prevent interference     * with any concurrent table unloads (which causes the deletion of     * namespace objects). We cannot allow the deletion of a namespace node     * while the user function is using it. The exception to this are the     * nodes created and deleted during control method execution -- these     * nodes are marked as temporary nodes and are ignored by the namespace     * walk. Thus, control methods can be executed while holding the     * namespace deletion lock (and the user function can execute control     * methods.)     */    Status = AcpiUtAcquireReadLock (&AcpiGbl_NamespaceRwLock);    if (ACPI_FAILURE (Status))    {        return (Status);    }    /*     * Lock the namespace around the walk. The namespace will be     * unlocked/locked around each call to the user function - since the user     * function must be allowed to make ACPICA calls itself (for example, it     * will typically execute control methods during device enumeration.)     */    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        goto UnlockAndExit;    }    Status = AcpiNsWalkNamespace (Type, StartObject, MaxDepth,                ACPI_NS_WALK_UNLOCK, UserFunction, Context, ReturnValue);    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);UnlockAndExit:    (void) AcpiUtReleaseReadLock (&AcpiGbl_NamespaceRwLock);    return_ACPI_STATUS (Status);}
开发者ID:Quest-V,项目名称:quest,代码行数:62,


示例13: AcpiNsLoadTable

ACPI_STATUSAcpiNsLoadTable (    UINT32                  TableIndex,    ACPI_NAMESPACE_NODE     *Node){    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (NsLoadTable);    /*     * Parse the table and load the namespace with all named     * objects found within. Control methods are NOT parsed     * at this time. In fact, the control methods cannot be     * parsed until the entire namespace is loaded, because     * if a control method makes a forward reference (call)     * to another control method, we can't continue parsing     * because we don't know how many arguments to parse next!     */    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* If table already loaded into namespace, just return */    if (AcpiTbIsTableLoaded (TableIndex))    {        Status = AE_ALREADY_EXISTS;        goto Unlock;    }    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,        "**** Loading table into namespace ****/n"));    Status = AcpiTbAllocateOwnerId (TableIndex);    if (ACPI_FAILURE (Status))    {        goto Unlock;    }    Status = AcpiNsParseTable (TableIndex, Node);    if (ACPI_SUCCESS (Status))    {        AcpiTbSetTableLoadedFlag (TableIndex, TRUE);    }    else    {        (void) AcpiTbReleaseOwnerId (TableIndex);    }Unlock:    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /*     * Now we can parse the control methods. We always parse     * them here for a sanity check, and if configured for     * just-in-time parsing, we delete the control method     * parse trees.     */    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,        "**** Begin Table Object Initialization/n"));    Status = AcpiDsInitializeObjects (TableIndex, Node);    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,        "**** Completed Table Object Initialization/n"));    return_ACPI_STATUS (Status);}
开发者ID:Lianguocheng,项目名称:acpica,代码行数:77,


示例14: AcpiDbStartCommand

static ACPI_STATUSAcpiDbStartCommand (    ACPI_WALK_STATE         *WalkState,    ACPI_PARSE_OBJECT       *Op){    ACPI_STATUS             Status;    /* TBD: [Investigate] are there namespace locking issues here? */    /* AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); */    /* Go into the command loop and await next user command */    AcpiGbl_MethodExecuting = TRUE;    Status = AE_CTRL_TRUE;    while (Status == AE_CTRL_TRUE)    {        if (AcpiGbl_DebuggerConfiguration == DEBUGGER_MULTI_THREADED)        {            /* Handshake with the front-end that gets user command lines */            Status = AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_COMPLETE);            if (ACPI_FAILURE (Status))            {                return (Status);            }            Status = AcpiUtAcquireMutex (ACPI_MTX_DEBUG_CMD_READY);            if (ACPI_FAILURE (Status))            {                return (Status);            }        }        else        {            /* Single threaded, we must get a command line ourselves */            /* Force output to console until a command is entered */            AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);            /* Different prompt if method is executing */            if (!AcpiGbl_MethodExecuting)            {                AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT);            }            else            {                AcpiOsPrintf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT);            }            /* Get the user input line */            Status = AcpiOsGetLine (AcpiGbl_DbLineBuf,                ACPI_DB_LINE_BUFFER_SIZE, NULL);            if (ACPI_FAILURE (Status))            {                ACPI_EXCEPTION ((AE_INFO, Status, "While parsing command line"));                return (Status);            }        }        Status = AcpiDbCommandDispatch (AcpiGbl_DbLineBuf, WalkState, Op);    }    /* AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); */    return (Status);}
开发者ID:ksashtekar,项目名称:Ganoid,代码行数:71,


示例15: AcpiRemoveNotifyHandler

ACPI_STATUSAcpiRemoveNotifyHandler (    ACPI_HANDLE             Device,    UINT32                  HandlerType,    ACPI_NOTIFY_HANDLER     Handler){    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);    ACPI_OPERAND_OBJECT     *ObjDesc;    ACPI_OPERAND_OBJECT     *HandlerObj;    ACPI_OPERAND_OBJECT     *PreviousHandlerObj;    ACPI_STATUS             Status = AE_OK;    UINT32                  i;    ACPI_FUNCTION_TRACE (AcpiRemoveNotifyHandler);    /* Parameter validation */    if ((!Device) || (!Handler) || (!HandlerType) ||        (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    /* Root Object. Global handlers are removed here */    if (Device == ACPI_ROOT_OBJECT)    {        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)        {            if (HandlerType & (i+1))            {                Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);                if (ACPI_FAILURE (Status))                {                    return_ACPI_STATUS (Status);                }                if (!AcpiGbl_GlobalNotify[i].Handler ||                    (AcpiGbl_GlobalNotify[i].Handler != Handler))                {                    Status = AE_NOT_EXIST;                    goto UnlockAndExit;                }                ACPI_DEBUG_PRINT ((ACPI_DB_INFO,                    "Removing global notify handler/n"));                AcpiGbl_GlobalNotify[i].Handler = NULL;                AcpiGbl_GlobalNotify[i].Context = NULL;                (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);                /* Make sure all deferred notify tasks are completed */                AcpiOsWaitEventsComplete ();            }        }        return_ACPI_STATUS (AE_OK);    }    /* All other objects: Are Notifies allowed on this object? */    if (!AcpiEvIsNotifyObject (Node))    {        return_ACPI_STATUS (AE_TYPE);    }    /* Must have an existing internal object */    ObjDesc = AcpiNsGetAttachedObject (Node);    if (!ObjDesc)    {        return_ACPI_STATUS (AE_NOT_EXIST);    }    /* Internal object exists. Find the handler and remove it */    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)    {        if (HandlerType & (i+1))        {            Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);            if (ACPI_FAILURE (Status))            {                return_ACPI_STATUS (Status);            }            HandlerObj = ObjDesc->CommonNotify.NotifyList[i];            PreviousHandlerObj = NULL;            /* Attempt to find the handler in the handler list */            while (HandlerObj &&                  (HandlerObj->Notify.Handler != Handler))            {                PreviousHandlerObj = HandlerObj;                HandlerObj = HandlerObj->Notify.Next[i];//.........这里部分代码省略.........
开发者ID:Strongc,项目名称:reactos,代码行数:101,


示例16: AcpiLoadTable

ACPI_STATUSAcpiLoadTable (    ACPI_TABLE_HEADER       *Table){    ACPI_STATUS             Status;    UINT32                  TableIndex;    ACPI_FUNCTION_TRACE (AcpiLoadTable);    /* Parameter validation */    if (!Table)    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    /* Must acquire the interpreter lock during this operation */    Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Install the table and load it into the namespace */    ACPI_INFO ((AE_INFO, "Host-directed Dynamic ACPI Table Load:"));    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),                ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, TRUE, FALSE,                &TableIndex);    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);    if (ACPI_FAILURE (Status))    {        goto UnlockAndExit;    }    /*     * Note: Now table is "INSTALLED", it must be validated before     * using.     */    Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[TableIndex]);    if (ACPI_FAILURE (Status))    {        goto UnlockAndExit;    }    Status = AcpiNsLoadTable (TableIndex, AcpiGbl_RootNode);    /* Invoke table handler if present */    if (AcpiGbl_TableHandler)    {        (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table,                    AcpiGbl_TableHandlerContext);    }UnlockAndExit:    (void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER);    return_ACPI_STATUS (Status);}
开发者ID:Lxg1582,项目名称:freebsd,代码行数:65,


示例17: AcpiInstallSciHandler

ACPI_STATUSAcpiInstallSciHandler (    ACPI_SCI_HANDLER        Address,    void                    *Context){    ACPI_SCI_HANDLER_INFO   *NewSciHandler;    ACPI_SCI_HANDLER_INFO   *SciHandler;    ACPI_CPU_FLAGS          Flags;    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (AcpiInstallSciHandler);    if (!Address)    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    /* Allocate and init a handler object */    NewSciHandler = ACPI_ALLOCATE (sizeof (ACPI_SCI_HANDLER_INFO));    if (!NewSciHandler)    {        return_ACPI_STATUS (AE_NO_MEMORY);    }    NewSciHandler->Address = Address;    NewSciHandler->Context = Context;    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);    if (ACPI_FAILURE (Status))    {        goto Exit;    }    /* Lock list during installation */    Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);    SciHandler = AcpiGbl_SciHandlerList;    /* Ensure handler does not already exist */    while (SciHandler)    {        if (Address == SciHandler->Address)        {            Status = AE_ALREADY_EXISTS;            goto UnlockAndExit;        }        SciHandler = SciHandler->Next;    }    /* Install the new handler into the global list (at head) */    NewSciHandler->Next = AcpiGbl_SciHandlerList;    AcpiGbl_SciHandlerList = NewSciHandler;UnlockAndExit:    AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);Exit:    if (ACPI_FAILURE (Status))    {        ACPI_FREE (NewSciHandler);    }    return_ACPI_STATUS (Status);}
开发者ID:Strongc,项目名称:reactos,代码行数:72,


示例18: AcpiUnloadParentTable

ACPI_STATUSAcpiUnloadParentTable (    ACPI_HANDLE             Object){    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Object);    ACPI_STATUS             Status = AE_NOT_EXIST;    ACPI_OWNER_ID           OwnerId;    UINT32                  i;    ACPI_FUNCTION_TRACE (AcpiUnloadParentTable);    /* Parameter validation */    if (!Object)    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    /*     * The node OwnerId is currently the same as the parent table ID.     * However, this could change in the future.     */    OwnerId = Node->OwnerId;    if (!OwnerId)    {        /* OwnerId==0 means DSDT is the owner. DSDT cannot be unloaded */        return_ACPI_STATUS (AE_TYPE);    }    /* Must acquire the interpreter lock during this operation */    Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Find the table in the global table list */    for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)    {        if (OwnerId != AcpiGbl_RootTableList.Tables[i].OwnerId)        {            continue;        }        /*         * Allow unload of SSDT and OEMx tables only. Do not allow unload         * of the DSDT. No other types of tables should get here, since         * only these types can contain AML and thus are the only types         * that can create namespace objects.         */        if (ACPI_COMPARE_NAME (            AcpiGbl_RootTableList.Tables[i].Signature.Ascii,            ACPI_SIG_DSDT))        {            Status = AE_TYPE;            break;        }        /* Ensure the table is actually loaded */        if (!AcpiTbIsTableLoaded (i))        {            Status = AE_NOT_EXIST;            break;        }        /* Invoke table handler if present */        if (AcpiGbl_TableHandler)        {            (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD,                        AcpiGbl_RootTableList.Tables[i].Pointer,                        AcpiGbl_TableHandlerContext);        }        /*         * Delete all namespace objects owned by this table. Note that         * these objects can appear anywhere in the namespace by virtue         * of the AML "Scope" operator. Thus, we need to track ownership         * by an ID, not simply a position within the hierarchy.         */        Status = AcpiTbDeleteNamespaceByOwner (i);        if (ACPI_FAILURE (Status))        {            break;        }        Status = AcpiTbReleaseOwnerId (i);        AcpiTbSetTableLoadedFlag (i, FALSE);        break;    }    (void) AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER);    return_ACPI_STATUS (Status);}
开发者ID:Lxg1582,项目名称:freebsd,代码行数:100,


示例19: AcpiInstallFixedEventHandler

ACPI_STATUSAcpiInstallFixedEventHandler (    UINT32                  Event,    ACPI_EVENT_HANDLER      Handler,    void                    *Context){    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (AcpiInstallFixedEventHandler);    /* Parameter validation */    if (Event > ACPI_EVENT_MAX)    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Do not allow multiple handlers */    if (AcpiGbl_FixedEventHandlers[Event].Handler)    {        Status = AE_ALREADY_EXISTS;        goto Cleanup;    }    /* Install the handler before enabling the event */    AcpiGbl_FixedEventHandlers[Event].Handler = Handler;    AcpiGbl_FixedEventHandlers[Event].Context = Context;    Status = AcpiEnableEvent (Event, 0);    if (ACPI_FAILURE (Status))    {        ACPI_WARNING ((AE_INFO,            "Could not enable fixed event - %s (%u)",            AcpiUtGetEventName (Event), Event));        /* Remove the handler */        AcpiGbl_FixedEventHandlers[Event].Handler = NULL;        AcpiGbl_FixedEventHandlers[Event].Context = NULL;    }    else    {        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,            "Enabled fixed event %s (%X), Handler=%p/n",            AcpiUtGetEventName (Event), Event, Handler));    }Cleanup:    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);    return_ACPI_STATUS (Status);}
开发者ID:Strongc,项目名称:reactos,代码行数:62,


示例20: AcpiEvDetachRegion

voidAcpiEvDetachRegion (    ACPI_OPERAND_OBJECT     *RegionObj,    BOOLEAN                 AcpiNsIsLocked){    ACPI_OPERAND_OBJECT     *HandlerObj;    ACPI_OPERAND_OBJECT     *ObjDesc;    ACPI_OPERAND_OBJECT     *StartDesc;    ACPI_OPERAND_OBJECT     **LastObjPtr;    ACPI_ADR_SPACE_SETUP    RegionSetup;    void                    **RegionContext;    ACPI_OPERAND_OBJECT     *RegionObj2;    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (EvDetachRegion);    RegionObj2 = AcpiNsGetSecondaryObject (RegionObj);    if (!RegionObj2)    {        return_VOID;    }    RegionContext = &RegionObj2->Extra.RegionContext;    /* Get the address handler from the region object */    HandlerObj = RegionObj->Region.Handler;    if (!HandlerObj)    {        /* This region has no handler, all done */        return_VOID;    }    /* Find this region in the handler's list */    ObjDesc = HandlerObj->AddressSpace.RegionList;    StartDesc = ObjDesc;    LastObjPtr = &HandlerObj->AddressSpace.RegionList;    while (ObjDesc)    {        /* Is this the correct Region? */        if (ObjDesc == RegionObj)        {            ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,                "Removing Region %p from address handler %p/n",                RegionObj, HandlerObj));            /* This is it, remove it from the handler's list */            *LastObjPtr = ObjDesc->Region.Next;            ObjDesc->Region.Next = NULL;        /* Must clear field */            if (AcpiNsIsLocked)            {                Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);                if (ACPI_FAILURE (Status))                {                    return_VOID;                }            }            /* Now stop region accesses by executing the _REG method */            Status = AcpiEvExecuteRegMethod (RegionObj, ACPI_REG_DISCONNECT);            if (ACPI_FAILURE (Status))            {                ACPI_EXCEPTION ((AE_INFO, Status, "from region _REG, [%s]",                    AcpiUtGetRegionName (RegionObj->Region.SpaceId)));            }            if (AcpiNsIsLocked)            {                Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);                if (ACPI_FAILURE (Status))                {                    return_VOID;                }            }            /*             * If the region has been activated, call the setup handler with             * the deactivate notification             */            if (RegionObj->Region.Flags & AOPOBJ_SETUP_COMPLETE)            {                RegionSetup = HandlerObj->AddressSpace.Setup;                Status = RegionSetup (RegionObj, ACPI_REGION_DEACTIVATE,                    HandlerObj->AddressSpace.Context, RegionContext);                /*                 * RegionContext should have been released by the deactivate                 * operation. We don't need access to it anymore here.                 */                if (RegionContext)                {                    *RegionContext = NULL;//.........这里部分代码省略.........
开发者ID:malattia,项目名称:acpica-tools,代码行数:101,


示例21: AcpiTbAddTable

ACPI_STATUSAcpiTbAddTable (    ACPI_TABLE_DESC         *TableDesc,    UINT32                  *TableIndex){    UINT32                  i;    ACPI_STATUS             Status = AE_OK;    ACPI_FUNCTION_TRACE (TbAddTable);    if (!TableDesc->Pointer)    {        Status = AcpiTbVerifyTable (TableDesc);        if (ACPI_FAILURE (Status) || !TableDesc->Pointer)        {            return_ACPI_STATUS (Status);        }    }    /*     * Validate the incoming table signature.     *     * 1) Originally, we checked the table signature for "SSDT" or "PSDT".     * 2) We added support for OEMx tables, signature "OEM".     * 3) Valid tables were encountered with a null signature, so we just     *    gave up on validating the signature, (05/2008).     * 4) We encountered non-AML tables such as the MADT, which caused     *    interpreter errors and kernel faults. So now, we once again allow     *    only "SSDT", "OEMx", and now, also a null signature. (05/2011).     */    if ((TableDesc->Pointer->Signature[0] != 0x00) &&       (!ACPI_COMPARE_NAME (TableDesc->Pointer->Signature, ACPI_SIG_SSDT)) &&       (ACPI_STRNCMP (TableDesc->Pointer->Signature, "OEM", 3)))    {        ACPI_BIOS_ERROR ((AE_INFO,            "Table has invalid signature [%4.4s] (0x%8.8X), "            "must be SSDT or OEMx",            AcpiUtValidAcpiName (*(UINT32 *) TableDesc->Pointer->Signature) ?                TableDesc->Pointer->Signature : "????",            *(UINT32 *) TableDesc->Pointer->Signature));        return_ACPI_STATUS (AE_BAD_SIGNATURE);    }    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    /* Check if table is already registered */    for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)    {        if (!AcpiGbl_RootTableList.Tables[i].Pointer)        {            Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i]);            if (ACPI_FAILURE (Status) ||                !AcpiGbl_RootTableList.Tables[i].Pointer)            {                continue;            }        }        /*         * Check for a table match on the entire table length,         * not just the header.         */        if (TableDesc->Length != AcpiGbl_RootTableList.Tables[i].Length)        {            continue;        }        if (ACPI_MEMCMP (TableDesc->Pointer,                AcpiGbl_RootTableList.Tables[i].Pointer,                AcpiGbl_RootTableList.Tables[i].Length))        {            continue;        }        /*         * Note: the current mechanism does not unregister a table if it is         * dynamically unloaded. The related namespace entries are deleted,         * but the table remains in the root table list.         *         * The assumption here is that the number of different tables that         * will be loaded is actually small, and there is minimal overhead         * in just keeping the table in case it is needed again.         *         * If this assumption changes in the future (perhaps on large         * machines with many table load/unload operations), tables will         * need to be unregistered when they are unloaded, and slots in the         * root table list should be reused when empty.         */        /*         * Table is already registered.         * We can delete the table that was passed as a parameter.         */        AcpiTbDeleteTable (TableDesc);        *TableIndex = i;//.........这里部分代码省略.........
开发者ID:vkhromov,项目名称:freebsd,代码行数:101,


示例22: AcpiEvOrphanEcRegMethod

static voidAcpiEvOrphanEcRegMethod (    ACPI_NAMESPACE_NODE     *EcDeviceNode){    ACPI_HANDLE             RegMethod;    ACPI_NAMESPACE_NODE     *NextNode;    ACPI_STATUS             Status;    ACPI_OBJECT_LIST        Args;    ACPI_OBJECT             Objects[2];    ACPI_FUNCTION_TRACE (EvOrphanEcRegMethod);    if (!EcDeviceNode)    {        return_VOID;    }    /* Namespace is currently locked, must release */    (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);    /* Get a handle to a _REG method immediately under the EC device */    Status = AcpiGetHandle (EcDeviceNode, METHOD_NAME__REG, &RegMethod);    if (ACPI_FAILURE (Status))    {        goto Exit; /* There is no _REG method present */    }    /*     * Execute the _REG method only if there is no Operation Region in     * this scope with the Embedded Controller space ID. Otherwise, it     * will already have been executed. Note, this allows for Regions     * with other space IDs to be present; but the code below will then     * execute the _REG method with the EmbeddedControl SpaceID argument.     */    NextNode = AcpiNsGetNextNode (EcDeviceNode, NULL);    while (NextNode)    {        if ((NextNode->Type == ACPI_TYPE_REGION) &&            (NextNode->Object) &&            (NextNode->Object->Region.SpaceId == ACPI_ADR_SPACE_EC))        {            goto Exit; /* Do not execute the _REG */        }        NextNode = AcpiNsGetNextNode (EcDeviceNode, NextNode);    }    /* Evaluate the _REG(EmbeddedControl,Connect) method */    Args.Count = 2;    Args.Pointer = Objects;    Objects[0].Type = ACPI_TYPE_INTEGER;    Objects[0].Integer.Value = ACPI_ADR_SPACE_EC;    Objects[1].Type = ACPI_TYPE_INTEGER;    Objects[1].Integer.Value = ACPI_REG_CONNECT;    Status = AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);Exit:    /* We ignore all errors from above, don't care */    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    return_VOID;}
开发者ID:malattia,项目名称:acpica-tools,代码行数:68,


示例23: AcpiUtAllocateOwnerId

ACPI_STATUSAcpiUtAllocateOwnerId (    ACPI_OWNER_ID           *OwnerId){    UINT32                  i;    UINT32                  j;    UINT32                  k;    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (UtAllocateOwnerId);    /* Guard against multiple allocations of ID to the same location */    if (*OwnerId)    {        ACPI_ERROR ((AE_INFO,            "Owner ID [0x%2.2X] already exists", *OwnerId));        return_ACPI_STATUS (AE_ALREADY_EXISTS);    }    /* Mutex for the global ID mask */    Status = AcpiUtAcquireMutex (ACPI_MTX_CACHES);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /*     * Find a free owner ID, cycle through all possible IDs on repeated     * allocations. (ACPI_NUM_OWNERID_MASKS + 1) because first index     * may have to be scanned twice.     */    for (i = 0, j = AcpiGbl_LastOwnerIdIndex;         i < (ACPI_NUM_OWNERID_MASKS + 1);         i++, j++)    {        if (j >= ACPI_NUM_OWNERID_MASKS)        {            j = 0;  /* Wraparound to start of mask array */        }        for (k = AcpiGbl_NextOwnerIdOffset; k < 32; k++)        {            if (AcpiGbl_OwnerIdMask[j] == ACPI_UINT32_MAX)            {                /* There are no free IDs in this mask */                break;            }            if (!(AcpiGbl_OwnerIdMask[j] & (1 << k)))            {                /*                 * Found a free ID. The actual ID is the bit index plus one,                 * making zero an invalid Owner ID. Save this as the last ID                 * allocated and update the global ID mask.                 */                AcpiGbl_OwnerIdMask[j] |= (1 << k);                AcpiGbl_LastOwnerIdIndex = (UINT8) j;                AcpiGbl_NextOwnerIdOffset = (UINT8) (k + 1);                /*                 * Construct encoded ID from the index and bit position                 *                 * Note: Last [j].k (bit 255) is never used and is marked                 * permanently allocated (prevents +1 overflow)                 */                *OwnerId = (ACPI_OWNER_ID) ((k + 1) + ACPI_MUL_32 (j));                ACPI_DEBUG_PRINT ((ACPI_DB_VALUES,                    "Allocated OwnerId: %2.2X/n", (unsigned int) *OwnerId));                goto Exit;            }        }        AcpiGbl_NextOwnerIdOffset = 0;    }    /*     * All OwnerIds have been allocated. This typically should     * not happen since the IDs are reused after deallocation. The IDs are     * allocated upon table load (one per table) and method execution, and     * they are released when a table is unloaded or a method completes     * execution.     *     * If this error happens, there may be very deep nesting of invoked     * control methods, or there may be a bug where the IDs are not released.     */    Status = AE_OWNER_ID_LIMIT;    ACPI_ERROR ((AE_INFO,        "Could not allocate new OwnerId (255 max), AE_OWNER_ID_LIMIT"));Exit:    (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);    return_ACPI_STATUS (Status);}
开发者ID:matter123,项目名称:mossy,代码行数:100,


示例24: AcpiRemoveAddressSpaceHandler

ACPI_STATUSAcpiRemoveAddressSpaceHandler (    ACPI_HANDLE             Device,    ACPI_ADR_SPACE_TYPE     SpaceId,    ACPI_ADR_SPACE_HANDLER  Handler){    ACPI_OPERAND_OBJECT     *ObjDesc;    ACPI_OPERAND_OBJECT     *HandlerObj;    ACPI_OPERAND_OBJECT     *RegionObj;    ACPI_OPERAND_OBJECT     **LastObjPtr;    ACPI_NAMESPACE_NODE     *Node;    ACPI_STATUS             Status;    ACPI_FUNCTION_TRACE (AcpiRemoveAddressSpaceHandler);    /* Parameter validation */    if (!Device)    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /* Convert and validate the device handle */    Node = AcpiNsValidateHandle (Device);    if (!Node ||        ((Node->Type != ACPI_TYPE_DEVICE)    &&         (Node->Type != ACPI_TYPE_PROCESSOR) &&         (Node->Type != ACPI_TYPE_THERMAL)   &&         (Node != AcpiGbl_RootNode)))    {        Status = AE_BAD_PARAMETER;        goto UnlockAndExit;    }    /* Make sure the internal object exists */    ObjDesc = AcpiNsGetAttachedObject (Node);    if (!ObjDesc)    {        Status = AE_NOT_EXIST;        goto UnlockAndExit;    }    /* Find the address handler the user requested */    HandlerObj = ObjDesc->CommonNotify.Handler;    LastObjPtr = &ObjDesc->CommonNotify.Handler;    while (HandlerObj)    {        /* We have a handler, see if user requested this one */        if (HandlerObj->AddressSpace.SpaceId == SpaceId)        {            /* Handler must be the same as the installed handler */            if (HandlerObj->AddressSpace.Handler != Handler)            {                Status = AE_BAD_PARAMETER;                goto UnlockAndExit;            }            /* Matched SpaceId, first dereference this in the Regions */            ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,                "Removing address handler %p(%p) for region %s "                "on Device %p(%p)/n",                HandlerObj, Handler, AcpiUtGetRegionName (SpaceId),                Node, ObjDesc));            RegionObj = HandlerObj->AddressSpace.RegionList;            /* Walk the handler's region list */            while (RegionObj)            {                /*                 * First disassociate the handler from the region.                 *                 * NOTE: this doesn't mean that the region goes away                 * The region is just inaccessible as indicated to                 * the _REG method                 */                AcpiEvDetachRegion (RegionObj, TRUE);                /*                 * Walk the list: Just grab the head because the                 * DetachRegion removed the previous head.                 */                RegionObj = HandlerObj->AddressSpace.RegionList;            }//.........这里部分代码省略.........
开发者ID:derekmarcotte,项目名称:freebsd,代码行数:101,


示例25: AcpiUtDumpAllocations

voidAcpiUtDumpAllocations (    UINT32                  Component,    const char              *Module){    ACPI_DEBUG_MEM_BLOCK    *Element;    ACPI_DESCRIPTOR         *Descriptor;    UINT32                  NumOutstanding = 0;    ACPI_FUNCTION_TRACE (UtDumpAllocations);    /*     * Walk the allocation list.     */    if (ACPI_FAILURE (AcpiUtAcquireMutex (ACPI_MTX_MEMORY)))    {        return;    }    Element = AcpiGbl_GlobalList->ListHead;    while (Element)    {        if ((Element->Component & Component) &&            ((Module == NULL) || (0 == ACPI_STRCMP (Module, Element->Module))))        {            /* Ignore allocated objects that are in a cache */            Descriptor = ACPI_CAST_PTR (ACPI_DESCRIPTOR, &Element->UserSpace);            if (ACPI_GET_DESCRIPTOR_TYPE (Descriptor) != ACPI_DESC_TYPE_CACHED)            {                AcpiOsPrintf ("%p Len %04X %9.9s-%d [%s] ",                    Descriptor, Element->Size, Element->Module,                    Element->Line, AcpiUtGetDescriptorName (Descriptor));                /* Most of the elements will be Operand objects. */                switch (ACPI_GET_DESCRIPTOR_TYPE (Descriptor))                {                case ACPI_DESC_TYPE_OPERAND:                    AcpiOsPrintf ("%12.12s R%hd",                        AcpiUtGetTypeName (Descriptor->Object.Common.Type),                        Descriptor->Object.Common.ReferenceCount);                    break;                case ACPI_DESC_TYPE_PARSER:                    AcpiOsPrintf ("AmlOpcode %04hX",                        Descriptor->Op.Asl.AmlOpcode);                    break;                case ACPI_DESC_TYPE_NAMED:                    AcpiOsPrintf ("%4.4s",                        AcpiUtGetNodeName (&Descriptor->Node));                    break;                default:                    break;                }                AcpiOsPrintf ( "/n");                NumOutstanding++;            }        }        Element = Element->Next;    }    (void) AcpiUtReleaseMutex (ACPI_MTX_MEMORY);    /* Print summary */    if (!NumOutstanding)    {        ACPI_INFO ((AE_INFO,            "No outstanding allocations"));    }    else    {        ACPI_ERROR ((AE_INFO,            "%d(%X) Outstanding allocations",            NumOutstanding, NumOutstanding));    }    return_VOID;}
开发者ID:CoryXie,项目名称:BarrelfishOS,代码行数:85,


示例26: AcpiRemoveGpeHandler

ACPI_STATUSAcpiRemoveGpeHandler (    ACPI_HANDLE             GpeDevice,    UINT32                  GpeNumber,    ACPI_GPE_HANDLER        Address){    ACPI_GPE_EVENT_INFO     *GpeEventInfo;    ACPI_GPE_HANDLER_INFO   *Handler;    ACPI_STATUS             Status;    ACPI_CPU_FLAGS          Flags;    ACPI_FUNCTION_TRACE (AcpiRemoveGpeHandler);    /* Parameter validation */    if (!Address)    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);    /* Ensure that we have a valid GPE number */    GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);    if (!GpeEventInfo)    {        Status = AE_BAD_PARAMETER;        goto UnlockAndExit;    }    /* Make sure that a handler is indeed installed */    if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=            ACPI_GPE_DISPATCH_HANDLER) &&        (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=            ACPI_GPE_DISPATCH_RAW_HANDLER))    {        Status = AE_NOT_EXIST;        goto UnlockAndExit;    }    /* Make sure that the installed handler is the same */    if (GpeEventInfo->Dispatch.Handler->Address != Address)    {        Status = AE_BAD_PARAMETER;        goto UnlockAndExit;    }    /* Remove the handler */    Handler = GpeEventInfo->Dispatch.Handler;    GpeEventInfo->Dispatch.Handler = NULL;    /* Restore Method node (if any), set dispatch flags */    GpeEventInfo->Dispatch.MethodNode = Handler->MethodNode;    GpeEventInfo->Flags &=        ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);    GpeEventInfo->Flags |= Handler->OriginalFlags;    /*     * If the GPE was previously associated with a method and it was     * enabled, it should be enabled at this point to restore the     * post-initialization configuration.     */    if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==            ACPI_GPE_DISPATCH_METHOD) ||         (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==            ACPI_GPE_DISPATCH_NOTIFY)) &&        Handler->OriginallyEnabled)    {        (void) AcpiEvAddGpeReference (GpeEventInfo);    }    AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);    /* Make sure all deferred GPE tasks are completed */    AcpiOsWaitEventsComplete ();    /* Now we can free the handler object */    ACPI_FREE (Handler);    return_ACPI_STATUS (Status);UnlockAndExit:    AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);    return_ACPI_STATUS (Status);//.........这里部分代码省略.........
开发者ID:Strongc,项目名称:reactos,代码行数:101,


示例27: AcpiInstallNotifyHandler

ACPI_STATUSAcpiInstallNotifyHandler (    ACPI_HANDLE             Device,    UINT32                  HandlerType,    ACPI_NOTIFY_HANDLER     Handler,    void                    *Context){    ACPI_NAMESPACE_NODE     *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Device);    ACPI_OPERAND_OBJECT     *ObjDesc;    ACPI_OPERAND_OBJECT     *HandlerObj;    ACPI_STATUS             Status;    UINT32                  i;    ACPI_FUNCTION_TRACE (AcpiInstallNotifyHandler);    /* Parameter validation */    if ((!Device) || (!Handler) || (!HandlerType) ||        (HandlerType > ACPI_MAX_NOTIFY_HANDLER_TYPE))    {        return_ACPI_STATUS (AE_BAD_PARAMETER);    }    Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);    if (ACPI_FAILURE (Status))    {        return_ACPI_STATUS (Status);    }    /*     * Root Object:     * Registering a notify handler on the root object indicates that the     * caller wishes to receive notifications for all objects. Note that     * only one global handler can be registered per notify type.     * Ensure that a handler is not already installed.     */    if (Device == ACPI_ROOT_OBJECT)    {        for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)        {            if (HandlerType & (i+1))            {                if (AcpiGbl_GlobalNotify[i].Handler)                {                    Status = AE_ALREADY_EXISTS;                    goto UnlockAndExit;                }                AcpiGbl_GlobalNotify[i].Handler = Handler;                AcpiGbl_GlobalNotify[i].Context = Context;            }        }        goto UnlockAndExit; /* Global notify handler installed, all done */    }    /*     * All Other Objects:     * Caller will only receive notifications specific to the target     * object. Note that only certain object types are allowed to     * receive notifications.     */    /* Are Notifies allowed on this object? */    if (!AcpiEvIsNotifyObject (Node))    {        Status = AE_TYPE;        goto UnlockAndExit;    }    /* Check for an existing internal object, might not exist */    ObjDesc = AcpiNsGetAttachedObject (Node);    if (!ObjDesc)    {        /* Create a new object */        ObjDesc = AcpiUtCreateInternalObject (Node->Type);        if (!ObjDesc)        {            Status = AE_NO_MEMORY;            goto UnlockAndExit;        }        /* Attach new object to the Node, remove local reference */        Status = AcpiNsAttachObject (Device, ObjDesc, Node->Type);        AcpiUtRemoveReference (ObjDesc);        if (ACPI_FAILURE (Status))        {            goto UnlockAndExit;        }    }    /* Ensure that the handler is not already installed in the lists */    for (i = 0; i < ACPI_NUM_NOTIFY_TYPES; i++)//.........这里部分代码省略.........
开发者ID:Strongc,项目名称:reactos,代码行数:101,


示例28: AcpiTbLoadNamespace

ACPI_STATUSAcpiTbLoadNamespace (    void){    ACPI_STATUS             Status;    UINT32                  i;    ACPI_TABLE_HEADER       *NewDsdt;    ACPI_TABLE_DESC         *Table;    UINT32                  TablesLoaded = 0;    UINT32                  TablesFailed = 0;    ACPI_FUNCTION_TRACE (TbLoadNamespace);    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    /*     * Load the namespace. The DSDT is required, but any SSDT and     * PSDT tables are optional. Verify the DSDT.     */    Table = &AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex];    if (!AcpiGbl_RootTableList.CurrentTableCount ||        !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_DSDT) ||         ACPI_FAILURE (AcpiTbValidateTable (Table)))    {        Status = AE_NO_ACPI_TABLES;        goto UnlockAndExit;    }    /*     * Save the DSDT pointer for simple access. This is the mapped memory     * address. We must take care here because the address of the .Tables     * array can change dynamically as tables are loaded at run-time. Note:     * .Pointer field is not validated until after call to AcpiTbValidateTable.     */    AcpiGbl_DSDT = Table->Pointer;    /*     * Optionally copy the entire DSDT to local memory (instead of simply     * mapping it.) There are some BIOSs that corrupt or replace the original     * DSDT, creating the need for this option. Default is FALSE, do not copy     * the DSDT.     */    if (AcpiGbl_CopyDsdtLocally)    {        NewDsdt = AcpiTbCopyDsdt (AcpiGbl_DsdtIndex);        if (NewDsdt)        {            AcpiGbl_DSDT = NewDsdt;        }    }    /*     * Save the original DSDT header for detection of table corruption     * and/or replacement of the DSDT from outside the OS.     */    memcpy (&AcpiGbl_OriginalDsdtHeader, AcpiGbl_DSDT,        sizeof (ACPI_TABLE_HEADER));    (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);    /* Load and parse tables */    Status = AcpiNsLoadTable (AcpiGbl_DsdtIndex, AcpiGbl_RootNode);    if (ACPI_FAILURE (Status))    {        ACPI_EXCEPTION ((AE_INFO, Status, "[DSDT] table load failed"));        TablesFailed++;    }    else    {        TablesLoaded++;    }    /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */    (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);    for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)    {        Table = &AcpiGbl_RootTableList.Tables[i];        if (!AcpiGbl_RootTableList.Tables[i].Address ||            (!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) &&             !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) &&             !ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) ||             ACPI_FAILURE (AcpiTbValidateTable (Table)))        {            continue;        }        /* Ignore errors while loading tables, get as many as possible */        (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);        Status =  AcpiNsLoadTable (i, AcpiGbl_RootNode);        if (ACPI_FAILURE (Status))        {            ACPI_EXCEPTION ((AE_INFO, Status, "(%4.4s:%8.8s) while loading table",                Table->Signature.Ascii, Table->Pointer->OemTableId));//.........这里部分代码省略.........
开发者ID:JasonFord53,项目名称:freebsd,代码行数:101,



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


C++ AcpiUtAddReference函数代码示例
C++ AcpiTbChecksum函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。