📄 os.h
字号:
/****************************************************************************** OS.h : Functions implemented by the OS* REALmagic Quasar Hardware Library* Created by Michael Ignaszewski* Copyright Sigma Designs Inc* Sigma Designs Proprietary and confidential* Created on 8/23/98* Description:*****************************************************************************/#ifdef __cplusplusextern "C"{#endif// Some of the prototypes can be implemented in osinc.h like macros,// otherwise implement them in os.c// memory access functions#ifndef OSGetDword DWORD OSGetDword(void* pTarget);#endif#ifndef OSGetWord WORD OSGetWord(void *pTarget);#endif#ifndef OSPutDword void OSPutDword(DWORD data, void *pTarget);#endif#ifndef OSCacheFlush void OSCacheFlush(void *pData, size_t size);#endif// PCI access functions#ifndef OSReadPciDword DWORD OSReadPciDword(void *pTarget);#endif#ifndef OSWritePciDword void OSWritePciDword(void *pTarget, DWORD data);#endif#ifndef OSWritePCIReg void OSWritePCIReg(DWORD DevNode, DWORD AddrData);#endif// memory functions#ifndef OSmalloc void* OSmalloc (unsigned long dwBytes);#endif#ifndef OSfree void OSfree (void* pBlock);#endif#ifndef OSmemcpy void OSmemcpy(void* dest, const void* src, size_t count);#endif#ifndef OSmemcmp int OSmemcmp(void* dest, const void* src, size_t count);#endif#ifndef OSmemset void OSmemset (void *dest, BYTE c, size_t count);#endif#ifndef OSMapLinearToPhysical void OSMapLinearToPhysical(DWORD dwLinearAddr, DWORD* pdwPhysicalAddr);#endif// time functions#ifndef OSTimeInit void OSTimeInit (void);#endif#ifndef OSTimeDelay void OSTimeDelay (unsigned long dwusTime); // unit is microseconds.#endif#ifndef OSTimeGetTime DWORD OSTimeGetTime(void); // unit is milliseconds.#endif// string functions#ifndef OSstrncpy void OSstrncpy(TCHAR *Dest,TCHAR *Src,unsigned long CopySize);#endif#ifndef OSstrcpy void OSstrcpy( TCHAR* strDestination, const TCHAR* strSource );#endif#ifndef OSstrcat void OSstrcat(TCHAR *Dest,TCHAR *Src);#endif#ifndef OSstrcmpi int OSstrcmpi( const CHAR *string1, const CHAR *string2 );#endif#ifndef OSstrlen DWORD OSstrlen(TCHAR *s);#endif#ifndef OSsprintf void OSsprintf(TCHAR *Dest,const TCHAR *pFormat,...);#endif// debug functions#ifndef OSDbgLogInfo void OSDbgLogInfo(DWORD Type, const TCHAR *pFileName, INT iLine, DWORD Level, const TCHAR *pFormat,...);#endif// event related functions#ifndef OSCompleteIo void OSCompleteIo(LONG Status, void* pEventToComplete);#endif#ifndef OSFreePacketListEntry void OSFreePacketListEntry(void* pPackList, DWORD uiPacketIndex, DWORD uiPacketCount);#endif#ifndef OSCompleteIoStatusSuccess #define OSCompleteIoStatusSuccess 0x01060000 //==old MpegStatusSuccess#endif// calcul functions used in HwLib// For efficiency they are implemented in assembly code for Windows9xDWORD OSDDiv (DWORD a, DWORD b, DWORD dv);void ChromaCalc(SHORT Cr, SHORT Cb, WORD* pRout, WORD* pGout, WORD* pBout);BYTE RGBCalc(SHORT Y, SHORT R_G_B);void unpack(DWORD ThreeBytes, BYTE* Y);// pseudo-random numbers generation for test Dram #ifndef OSrand int OSrand(void);#endif#ifdef __cplusplus}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -