• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ ACPI_FUNCTION_TRACE_U32函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AcpiUtAllocate

void *
AcpiUtAllocate (
    ACPI_SIZE               Size,
    UINT32                  Component,
    const char              *Module,
    UINT32                  Line)
{
    void                    *Allocation;


    ACPI_FUNCTION_TRACE_U32 (UtAllocate, Size);


    /* Check for an inadvertent size of zero bytes */

    if (!Size)
    {
        ACPI_WARNING ((Module, Line,
            "Attempt to allocate zero bytes, allocating 1 byte"));
        Size = 1;
    }

    Allocation = AcpiOsAllocate (Size);
    if (!Allocation)
    {
        /* Report allocation error */

        ACPI_WARNING ((Module, Line,
            "Could not allocate size %u", (UINT32) Size));

        return_PTR (NULL);
    }

    return_PTR (Allocation);
}
开发者ID:NoSuchProcess,项目名称:phantomuserland,代码行数:35,代码来源:utalloc.c


示例2: ACPI_FUNCTION_TRACE_U32

void *acpi_ut_allocate(acpi_size size,
		       u32 component, const char *module, u32 line)
{
	void *allocation;

	ACPI_FUNCTION_TRACE_U32(ut_allocate, size);

	/* Check for an inadvertent size of zero bytes */

	if (!size) {
		ACPI_WARNING((module, line,
			      "Attempt to allocate zero bytes, allocating 1 byte"));
		size = 1;
	}

	allocation = acpi_os_allocate(size);
	if (!allocation) {

		/* Report allocation error */

		ACPI_WARNING((module, line,
			      "Could not allocate size %u", (u32) size));

		return_PTR(NULL);
	}

	return_PTR(allocation);
}
开发者ID:08opt,项目名称:linux,代码行数:28,代码来源:utalloc.c


示例3: ACPI_FUNCTION_TRACE_U32

union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
{
	union acpi_operand_object *string_desc;
	char *string;

	ACPI_FUNCTION_TRACE_U32(ut_create_string_object, string_size);

	/* Create a new String object */

	string_desc = acpi_ut_create_internal_object(ACPI_TYPE_STRING);
	if (!string_desc) {
		return_PTR(NULL);
	}

	/*
	 * Allocate the actual string buffer -- (Size + 1) for NULL terminator.
	 * NOTE: Zero-length strings are NULL terminated
	 */
	string = ACPI_ALLOCATE_ZEROED(string_size + 1);
	if (!string) {
		ACPI_ERROR((AE_INFO, "Could not allocate size %X",
			    (u32) string_size));
		acpi_ut_remove_reference(string_desc);
		return_PTR(NULL);
	}

	/* Complete string object initialization */

	string_desc->string.pointer = string;
	string_desc->string.length = (u32) string_size;

	/* Return the new string descriptor */

	return_PTR(string_desc);
}
开发者ID:420GrayFox,项目名称:dsl-n55u-bender,代码行数:35,代码来源:utobject.c


示例4: AcpiUtReleaseOwnerId

void
AcpiUtReleaseOwnerId (
    ACPI_OWNER_ID           *OwnerIdPtr)
{
    ACPI_OWNER_ID           OwnerId = *OwnerIdPtr;
    ACPI_STATUS             Status;
    UINT32                  Index;
    UINT32                  Bit;


    ACPI_FUNCTION_TRACE_U32 (UtReleaseOwnerId, OwnerId);


    /* Always clear the input OwnerId (zero is an invalid ID) */

    *OwnerIdPtr = 0;

    /* Zero is not a valid OwnerID */

    if (OwnerId == 0)
    {
        ACPI_ERROR ((AE_INFO, "Invalid OwnerId: 0x%2.2X", OwnerId));
        return_VOID;
    }

    /* Mutex for the global ID mask */

    Status = AcpiUtAcquireMutex (ACPI_MTX_CACHES);
    if (ACPI_FAILURE (Status))
    {
        return_VOID;
    }

    /* Normalize the ID to zero */

    OwnerId--;

    /* Decode ID to index/offset pair */

    Index = ACPI_DIV_32 (OwnerId);
    Bit = 1 << ACPI_MOD_32 (OwnerId);

    /* Free the owner ID only if it is valid */

    if (AcpiGbl_OwnerIdMask[Index] & Bit)
    {
        AcpiGbl_OwnerIdMask[Index] ^= Bit;
    }
    else
    {
        ACPI_ERROR ((AE_INFO,
            "Release of non-allocated OwnerId: 0x%2.2X", OwnerId + 1));
    }

    (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);
    return_VOID;
}
开发者ID:eyberg,项目名称:rumpkernel-netbsd-src,代码行数:57,代码来源:utownerid.c


示例5: acpi_ut_delete_mutex

static void acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
{

	ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id);

	acpi_os_delete_mutex(acpi_gbl_mutex_info[mutex_id].mutex);

	acpi_gbl_mutex_info[mutex_id].mutex = NULL;
	acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED;
}
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:10,代码来源:utmutex.c


示例6: acpi_ut_release_owner_id

void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr)
{
	acpi_owner_id owner_id = *owner_id_ptr;
	acpi_status status;
	u32 index;
	u32 bit;

	ACPI_FUNCTION_TRACE_U32(ut_release_owner_id, owner_id);

	/* Always clear the input owner_id (zero is an invalid ID) */

	*owner_id_ptr = 0;

	/* Zero is not a valid owner_ID */

	if (owner_id == 0) {
		ACPI_ERROR((AE_INFO, "Invalid OwnerId: 0x%2.2X", owner_id));
		return_VOID;
	}

	/* Mutex for the global ID mask */

	status = acpi_ut_acquire_mutex(ACPI_MTX_CACHES);
	if (ACPI_FAILURE(status)) {
		return_VOID;
	}

	/* Normalize the ID to zero */

	owner_id--;

	/* Decode ID to index/offset pair */

	index = ACPI_DIV_32(owner_id);
	bit = 1 << ACPI_MOD_32(owner_id);

	/* Free the owner ID only if it is valid */

	if (acpi_gbl_owner_id_mask[index] & bit) {
		acpi_gbl_owner_id_mask[index] ^= bit;
	} else {
		ACPI_ERROR((AE_INFO,
			    "Release of non-allocated OwnerId: 0x%2.2X",
			    owner_id + 1));
	}

	(void)acpi_ut_release_mutex(ACPI_MTX_CACHES);
	return_VOID;
}
开发者ID:020gzh,项目名称:linux,代码行数:49,代码来源:utownerid.c


示例7: AcpiUtDeleteMutex

static void
AcpiUtDeleteMutex (
    ACPI_MUTEX_HANDLE       MutexId)
{

    ACPI_FUNCTION_TRACE_U32 (UtDeleteMutex, MutexId);


    AcpiOsDeleteMutex (AcpiGbl_MutexInfo[MutexId].Mutex);

    AcpiGbl_MutexInfo[MutexId].Mutex = NULL;
    AcpiGbl_MutexInfo[MutexId].ThreadId = ACPI_MUTEX_NOT_ACQUIRED;
}
开发者ID:apprisi,项目名称:illumos-gate,代码行数:13,代码来源:utmutex.c


示例8: acpi_ex_set_buffer_datum

void
acpi_ex_set_buffer_datum (
	acpi_integer                    merged_datum,
	void                            *buffer,
	u32                             buffer_length,
	u32                             byte_granularity,
	u32                             buffer_offset)
{
	u32                             index;


	ACPI_FUNCTION_TRACE_U32 ("ex_set_buffer_datum", byte_granularity);


	/* Get proper index into buffer (handles big/little endian) */

	index = ACPI_BUFFER_INDEX (buffer_length, buffer_offset, byte_granularity);

	/* Move the requested number of bytes */

	switch (byte_granularity) {
	case ACPI_FIELD_BYTE_GRANULARITY:

		((u8 *) buffer) [index] = (u8) merged_datum;
		break;

	case ACPI_FIELD_WORD_GRANULARITY:

		ACPI_MOVE_64_TO_16 (&(((u16 *) buffer)[index]), &merged_datum);
		break;

	case ACPI_FIELD_DWORD_GRANULARITY:

		ACPI_MOVE_64_TO_32 (&(((u32 *) buffer)[index]), &merged_datum);
		break;

	case ACPI_FIELD_QWORD_GRANULARITY:

		ACPI_MOVE_64_TO_64 (&(((u64 *) buffer)[index]), &merged_datum);
		break;

	default:
		/* Should not get here */
		break;
	}

	return_VOID;
}
开发者ID:iPodLinux,项目名称:linux-2.4.24-ipod,代码行数:48,代码来源:exfldio.c


示例9: acpi_ut_create_mutex

static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id)
{
	acpi_status status = AE_OK;

	ACPI_FUNCTION_TRACE_U32(ut_create_mutex, mutex_id);

	if (!acpi_gbl_mutex_info[mutex_id].mutex) {
		status =
		    acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex);
		acpi_gbl_mutex_info[mutex_id].thread_id =
		    ACPI_MUTEX_NOT_ACQUIRED;
		acpi_gbl_mutex_info[mutex_id].use_count = 0;
	}

	return_ACPI_STATUS(status);
}
开发者ID:bionicOnion,项目名称:RPi-Linux-4.1.13,代码行数:16,代码来源:utmutex.c


示例10: acpi_ut_delete_mutex

static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
{

	ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id);

	if (mutex_id > ACPI_MAX_MUTEX) {
		return_ACPI_STATUS(AE_BAD_PARAMETER);
	}

	acpi_os_delete_mutex(acpi_gbl_mutex_info[mutex_id].mutex);

	acpi_gbl_mutex_info[mutex_id].mutex = NULL;
	acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED;

	return_ACPI_STATUS(AE_OK);
}
开发者ID:mrtos,项目名称:Logitech-Revue,代码行数:16,代码来源:utmutex.c


示例11: acpi_lid_notify_handler

static void 
acpi_lid_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
{
    struct acpi_lid_softc	*sc = (struct acpi_lid_softc *)context;

    ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify);

    switch (notify) {
    case ACPI_NOTIFY_STATUS_CHANGED:
	AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_lid_notify_status_changed, sc);
	break;
    default:
	break;		/* unknown notification value */
    }
    return_VOID;
}
开发者ID:UnitedMarsupials,项目名称:kame,代码行数:16,代码来源:acpi_lid.c


示例12: EcSpaceHandler

static ACPI_STATUS
EcSpaceHandler(UINT32 Function, ACPI_PHYSICAL_ADDRESS Address, UINT32 width, ACPI_INTEGER *Value, 
	       void *Context, void *RegionContext)
{
    struct acpi_ec_softc	*sc = (struct acpi_ec_softc *)Context;
    ACPI_STATUS			Status = AE_OK;
    EC_REQUEST			EcRequest;
    int				i;

    ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, (UINT32)Address);

    if ((Address > 0xFF) || (width % 8 != 0) || (Value == NULL) || (Context == NULL))
        return_ACPI_STATUS(AE_BAD_PARAMETER);

    switch (Function) {
    case ACPI_READ:
        EcRequest.Command = EC_COMMAND_READ;
        EcRequest.Address = Address;
	(*Value) = 0;
        break;

    case ACPI_WRITE:
        EcRequest.Command = EC_COMMAND_WRITE;
        EcRequest.Address = Address;
        break;

    default:
	device_printf(sc->ec_dev, "invalid Address Space function %d\n", Function);
        return_ACPI_STATUS(AE_BAD_PARAMETER);
    }

    /*
     * Perform the transaction.
     */
    for (i = 0; i < width; i += 8) {
	if (Function == ACPI_READ)
	    EcRequest.Data = 0;
	else
	    EcRequest.Data = (UINT8)((*Value) >> i);
	if (ACPI_FAILURE(Status = EcTransaction(sc, &EcRequest)))
	    break;
        (*Value) |= (ACPI_INTEGER)EcRequest.Data << i;
	if (++EcRequest.Address == 0)
            return_ACPI_STATUS(AE_BAD_PARAMETER);
    }
    return_ACPI_STATUS(Status);
}
开发者ID:UnitedMarsupials,项目名称:kame,代码行数:47,代码来源:acpi_ec.c


示例13: AcpiUtCreateBufferObject

ACPI_OPERAND_OBJECT *
AcpiUtCreateBufferObject (
    ACPI_SIZE               BufferSize)
{
    ACPI_OPERAND_OBJECT     *BufferDesc;
    UINT8                   *Buffer = NULL;


    ACPI_FUNCTION_TRACE_U32 (UtCreateBufferObject, BufferSize);


    /* Create a new Buffer object */

    BufferDesc = AcpiUtCreateInternalObject (ACPI_TYPE_BUFFER);
    if (!BufferDesc)
    {
        return_PTR (NULL);
    }

    /* Create an actual buffer only if size > 0 */

    if (BufferSize > 0)
    {
        /* Allocate the actual buffer */

        Buffer = ACPI_ALLOCATE_ZEROED (BufferSize);
        if (!Buffer)
        {
            ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
                (UINT32) BufferSize));

            AcpiUtRemoveReference (BufferDesc);
            return_PTR (NULL);
        }
    }

    /* Complete buffer object initialization */

    BufferDesc->Buffer.Flags |= AOPOBJ_DATA_VALID;
    BufferDesc->Buffer.Pointer = Buffer;
    BufferDesc->Buffer.Length = (UINT32) BufferSize;

    /* Return the new buffer descriptor */

    return_PTR (BufferDesc);
}
开发者ID:FreeBSDFoundation,项目名称:freebsd,代码行数:46,代码来源:utobject.c


示例14: acpi_ut_delete_mutex

static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
{
	acpi_status status;

	ACPI_FUNCTION_TRACE_U32("ut_delete_mutex", mutex_id);

	if (mutex_id > MAX_MUTEX) {
		return_ACPI_STATUS(AE_BAD_PARAMETER);
	}

	status = acpi_os_delete_semaphore(acpi_gbl_mutex_info[mutex_id].mutex);

	acpi_gbl_mutex_info[mutex_id].mutex = NULL;
	acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED;

	return_ACPI_STATUS(status);
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:17,代码来源:utmutex.c


示例15: AcpiUtCreateMutex

static ACPI_STATUS
AcpiUtCreateMutex (
    ACPI_MUTEX_HANDLE       MutexId)
{
    ACPI_STATUS             Status = AE_OK;


    ACPI_FUNCTION_TRACE_U32 (UtCreateMutex, MutexId);


    if (!AcpiGbl_MutexInfo[MutexId].Mutex)
    {
        Status = AcpiOsCreateMutex (&AcpiGbl_MutexInfo[MutexId].Mutex);
        AcpiGbl_MutexInfo[MutexId].ThreadId = ACPI_MUTEX_NOT_ACQUIRED;
        AcpiGbl_MutexInfo[MutexId].UseCount = 0;
    }

    return_ACPI_STATUS (Status);
}
开发者ID:apprisi,项目名称:illumos-gate,代码行数:19,代码来源:utmutex.c


示例16: acpi_fujitsu_notify_handler

static void
acpi_fujitsu_notify_handler(ACPI_HANDLE h, uint32_t notify, void *context)
{
	struct acpi_fujitsu_softc *sc;

	ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify);

	sc = (struct acpi_fujitsu_softc *)context;

	switch (notify) {
	case ACPI_NOTIFY_STATUS_CHANGED:
		AcpiOsExecute(OSL_NOTIFY_HANDLER,
		    acpi_fujitsu_notify_status_changed, sc);
		break;
	default:
		/* unknown notification value */
		break;
	}
}
开发者ID:2asoft,项目名称:freebsd,代码行数:19,代码来源:acpi_fujitsu.c


示例17: acpi_button_notify_handler

static void 
acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
{
    struct acpi_button_softc	*sc = (struct acpi_button_softc *)context;

    ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify);

    switch (notify) {
    case ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP:
	AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_button_notify_pressed_for_sleep, sc);
	break;   
    case ACPI_NOTIFY_BUTTON_PRESSED_FOR_WAKEUP:
	AcpiOsQueueForExecution(OSD_PRIORITY_LO, acpi_button_notify_pressed_for_wakeup, sc);
	break;   
    default:
	break;		/* unknown notification value */
    }
    return_VOID;
}
开发者ID:UnitedMarsupials,项目名称:kame,代码行数:19,代码来源:acpi_button.c


示例18: AcpiUtCreateStringObject

ACPI_OPERAND_OBJECT *
AcpiUtCreateStringObject (
    ACPI_SIZE               StringSize)
{
    ACPI_OPERAND_OBJECT     *StringDesc;
    char                    *String;


    ACPI_FUNCTION_TRACE_U32 (UtCreateStringObject, StringSize);


    /* Create a new String object */

    StringDesc = AcpiUtCreateInternalObject (ACPI_TYPE_STRING);
    if (!StringDesc)
    {
        return_PTR (NULL);
    }

    /*
     * Allocate the actual string buffer -- (Size + 1) for NULL terminator.
     * NOTE: Zero-length strings are NULL terminated
     */
    String = ACPI_ALLOCATE_ZEROED (StringSize + 1);
    if (!String)
    {
        ACPI_ERROR ((AE_INFO, "Could not allocate size %u",
            (UINT32) StringSize));

        AcpiUtRemoveReference (StringDesc);
        return_PTR (NULL);
    }

    /* Complete string object initialization */

    StringDesc->String.Pointer = String;
    StringDesc->String.Length = (UINT32) StringSize;

    /* Return the new string descriptor */

    return_PTR (StringDesc);
}
开发者ID:FreeBSDFoundation,项目名称:freebsd,代码行数:42,代码来源:utobject.c


示例19: acpi_ut_create_buffer_object

union acpi_operand_object *
acpi_ut_create_buffer_object (
	acpi_size                       buffer_size)
{
	union acpi_operand_object       *buffer_desc;
	u8                              *buffer = NULL;


	ACPI_FUNCTION_TRACE_U32 ("ut_create_buffer_object", buffer_size);


	/* Create a new Buffer object */

	buffer_desc = acpi_ut_create_internal_object (ACPI_TYPE_BUFFER);
	if (!buffer_desc) {
		return_PTR (NULL);
	}

	/* Create an actual buffer only if size > 0 */

	if (buffer_size > 0) {
		/* Allocate the actual buffer */

		buffer = ACPI_MEM_CALLOCATE (buffer_size);
		if (!buffer) {
			ACPI_REPORT_ERROR (("create_buffer: could not allocate size %X\n",
				(u32) buffer_size));
			acpi_ut_remove_reference (buffer_desc);
			return_PTR (NULL);
		}
	}

	/* Complete buffer object initialization */

	buffer_desc->buffer.flags |= AOPOBJ_DATA_VALID;
	buffer_desc->buffer.pointer = buffer;
	buffer_desc->buffer.length = (u32) buffer_size;

	/* Return the new buffer descriptor */

	return_PTR (buffer_desc);
}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:42,代码来源:utobject.c


示例20: acpi_button_notify_handler

static void 
acpi_button_notify_handler(ACPI_HANDLE h, UINT32 notify, void *context)
{
    struct acpi_button_softc	*sc;

    ACPI_FUNCTION_TRACE_U32((char *)(uintptr_t)__func__, notify);

    sc = (struct acpi_button_softc *)context;
    switch (notify) {
    case ACPI_NOTIFY_BUTTON_PRESSED_FOR_SLEEP:
	AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_button_notify_sleep, sc);
	break;   
    case ACPI_NOTIFY_BUTTON_PRESSED_FOR_WAKEUP:
	AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_button_notify_wakeup, sc);
	break;   
    default:
	device_printf(sc->button_dev, "unknown notify %#x\n", notify);
	break;
    }
}
开发者ID:Gwenio,项目名称:DragonFlyBSD,代码行数:20,代码来源:acpi_button.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ACPI_GET_1BIT_FLAG函数代码示例发布时间:2022-05-30
下一篇:
C++ ACPI_FUNCTION_TRACE_STR函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap