📄 hostfunc_um.h
字号:
/*!****************************************************************************
@File hostfunc_um.h
@Title environment API Header
@Author Imagination Technologies
@date 17 / 9 / 03
@Copyright Copyright 2003-2004 by Imagination Technologies Limited.
All rights reserved. No part of this software, either
material or conceptual may be copied or distributed,
transmitted, transcribed, stored in a retrieval system
or translated into any human or computer language in any
form by any means, electronic, mechanical, manual or
other-wise, or disclosed to third parties without the
express written permission of Imagination Technologies
Limited, Unit 8, HomePark Industrial Estate,
King's Langley, Hertfordshire, WD4 8LZ, U.K.
@Platform generic
@Description Functions which are OS specific
@DoxygenVer
******************************************************************************/
/******************************************************************************
Modifications :-
$Log: hostfunc_um.h $
*****************************************************************************/
#if !defined(__HOSTFUNC_UM_H__)
#define __HOSTFUNC_UM_H__
#include "img_defs.h"
#include "services.h"
#if defined (__cplusplus)
extern "C" {
#endif
/*****************************************************************************
* Static defines
*****************************************************************************/
IMG_UINT32 HostClockus (IMG_VOID);
IMG_VOID HostWaitus (IMG_UINT32 ui32Timeus);
IMG_VOID HostReleaseThreadQuanta (IMG_VOID);
PVRSRV_ERROR HostOpenEvent(PVRSRV_MUTEX_HANDLE *phWaitEventHandle);
PVRSRV_ERROR HostCreateEvent (PVRSRV_MUTEX_HANDLE *phEvent);
PVRSRV_ERROR HostSetEvent (PVRSRV_MUTEX_HANDLE hEvent);
PVRSRV_ERROR HostReleaseEvent (PVRSRV_MUTEX_HANDLE hEvent);
PVRSRV_ERROR HostAcquireMutex (PVRSRV_MUTEX_HANDLE *hMutex, IMG_BOOL bBlock);
PVRSRV_ERROR HostReleaseMutex (PVRSRV_MUTEX_HANDLE * hMutex);
PVRSRV_ERROR HostLockResource (PVRSRV_RES_HANDLE *phResource, IMG_BOOL bBlock);
PVRSRV_ERROR HostUnlockResource (PVRSRV_RES_HANDLE *phResource);
#ifdef DEBUG
IMG_BOOL HostIsResourceLocked (PVRSRV_RES_HANDLE *phResource);
#endif
#ifdef __linux__
#if DEBUG
IMG_VOID *HostAllocUserModeMemTracking(IMG_UINT32 ui32Size, IMG_CHAR *FileName, IMG_INT32 LineNumber);
IMG_VOID *HostCallocUserModeMemTracking(IMG_UINT32 ui32Size, IMG_CHAR *FileName, IMG_INT32 LineNumber);
IMG_VOID *HostReallocUserModeMemTracking(IMG_VOID *pvAddress, IMG_UINT32 ui32Size, IMG_CHAR *FileName, IMG_INT32 LineNumber);
IMG_VOID HostFreeUserModeMemTracking(IMG_VOID *pvAddress);
#define HostAllocUserModeMem(X) HostAllocUserModeMemTracking(X, __FILE__, __LINE__);
#define HostCallocUserModeMem(X) HostCallocUserModeMemTracking(X, __FILE__, __LINE__);
#define HostReallocUserModeMem(X, Y) HostReallocUserModeMemTracking(X, Y, __FILE__, __LINE__);
#define HostFreeUserModeMem(X) HostFreeUserModeMemTracking(X);
IMG_VOID OutputMemoryStats(IMG_VOID);
#else /* DEBUG */
IMG_PVOID HostAllocUserModeMem (IMG_UINT32 ui32Size);
IMG_PVOID HostCallocUserModeMem (IMG_UINT32 ui32Size);
IMG_PVOID HostReallocUserModeMem (IMG_PVOID pvBase, IMG_SIZE_T uNewSize);
IMG_VOID HostFreeUserModeMem (IMG_PVOID pvMem);
#endif /* DEBUG */
#else /* __linux__ */
IMG_PVOID HostAllocUserModeMem (IMG_UINT32 ui32Size);
IMG_PVOID HostCallocUserModeMem (IMG_UINT32 ui32Size);
IMG_PVOID HostReallocUserModeMem (IMG_PVOID pvBase, IMG_SIZE_T uNewSize);
IMG_VOID HostFreeUserModeMem (IMG_PVOID pvMem);
#endif /* __linux__ */
IMG_VOID HostMemCopy(IMG_VOID *pvDst, IMG_VOID *pvSrc, IMG_UINT32 ui32Size);
IMG_VOID HostMemSet(IMG_VOID *pvDest, IMG_UINT8 ui8Value, IMG_UINT32 ui32Size);
IMG_UINT32 HostGetCurrentProcessID (IMG_VOID);
IMG_UINT32 HostReadHWReg(IMG_PVOID pvLinRegBaseAddr, IMG_UINT32 ui32Offset);
IMG_VOID HostWriteHWReg(IMG_PVOID pvLinRegBaseAddr, IMG_UINT32 ui32Offset,
IMG_UINT32 ui32Value);
/*--------------------------------- end of file ------------------------------*/
#if defined (__cplusplus)
}
#endif
#endif /* __HOSTFUNC_UM_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -