亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? intarchlib.c

?? vxworks的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* intArchLib.c - I80x86 interrupt subroutine library *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01p,20nov01,hdn  doc clean up for 5.501o,09nov01,hdn  replaced magic numbers with intConnectCode offset macros01n,29aug01,hdn  got rid of VXM stuff.		 added intVecGet2() correspond to intVecSet2().		 replaced {exc,int}IdtSelector with sysCs{Exc,Int}.		 added document for intHandlerCreateI86() (spr 30292)01m,14dec00,pai  Added stub routines for intEnable() and intDisable() (SPR                 #63046).01l,09feb99,wsl  add comment to document ERRNO value01k,29may98,hdn  added intHandlerCreateX86(), modified intConnectCode[]		 to solve EOI issue and sprious interrupt issue.		 removed intEOI.  added intEoiGet.01j,13apr98,hdn  changed malloc to memalign in intHandlerCreate().01i,14jan98,dbt  added dbgLib.h include01h,23aug95,ms   removed taskSafe/Unsafe calls from intVecSet().01g,15jun95,ms   added intRegsLock, intRegsUnlock01f,14jun95,hdn  added intVecSetEnt and intVecSetExit.		 renamed pSysEndOfInt to intEOI.01e,26jan95,rhp  doc tweaks01d,29jul93,hdn  added intVecTableWriteProtect().		  - intVecSet checks taskIdCurrent before TASK_{SAFE,UNSAFE}.		  - deleted mention of intContext() and intCount().		  - added vxmIfVecxxx callout for monitor support.01c,03jun93,hdn  updated to 5.1		  - changed functions to ansi style		  - changed includes to have absolute path from h/		  - fixed #else and #endif		  - changed VOID to void		  - changed copyright notice01b,15oct92,hdn  supported nested interrupt.01a,28feb92,hdn  written based on TRON, 68k version.*//*DESCRIPTIONThis library provides architecture-dependent routines to manipulateand connect to hardware interrupts.  Any C language routine can beconnected to any interrupt by calling intConnect().  Vectors can beaccessed directly by intVecSet() and intVecGet(), or by intVecSet2()and intVecGet2().  The vector (trap) base register can be accessed by the routines intVecBaseSet() and intVecBaseGet().Tasks can lock and unlock interrupts by calling intLock() and intUnlock().The lock-out level can be set and reported by intLockLevelSet() andintLockLevelGet().WARNINGDo not call VxWorks system routines with interrupts locked.Violating this rule may re-enable interrupts unpredictably.INTERRUPT VECTORS AND NUMBERSMost of the routines in this library take an interrupt vector as aparameter, which is the byte offset into the vector table.  Macros areprovided to convert between interrupt vectors and interrupt numbers:.iP IVEC_TO_INUM(intVector) 10changes a vector to a number..iP INUM_TO_IVEC(intNumber)turns a number into a vector..iP TRAPNUM_TO_IVEC(trapNumber)converts a trap number to a vector.EXAMPLETo switch between one of several routines for a particular interrupt,the following code fragment is one alternative:.CS    vector  = INUM_TO_IVEC(some_int_vec_num);    oldfunc = intVecGet (vector);    newfunc = intHandlerCreate (routine, parameter);    intVecSet (vector, newfunc);        ...    intVecSet (vector, oldfunc);    /@ use original routine  @/        ...    intVecSet (vector, newfunc);    /@ reconnect new routine @/.CEINCLUDE FILE: iv.hSEE ALSO: intLib, intALib*//* LINTLIBRARY */#include "vxWorks.h"#include "cacheLib.h"#include "errnoLib.h"#include "intLib.h"#include "memLib.h"#include "sysLib.h"#include "taskLib.h"#include "string.h"#include "stdlib.h"#include "dbgLib.h"#include "private/vmLibP.h"/* imports */IMPORT void intVBRSet (FUNCPTR *baseAddr);IMPORT void intEnt ();				/* interrupt entrance stub */IMPORT void intExit ();				/* interrupt exit stub */IMPORT int sysCsExc;IMPORT int sysCsInt;/* globals *//* The routine intLock(), found in intALib.s uses intLockMask to construct a * new EFLAGS with the correct interrupt lock-out level.  The difficulty is * intLock() may be called from either interrupt level, or task level, so * simply reserving a EFLAGS such as 0x80000000 does not work because such a  * EFLAGS would assume task-level code. */UINT intLockMask	  = 0x0;	/* interrupt lock mask - level 0 */VOIDFUNCPTR intVecSetEnt  = NULL;	/* entry hook for intVecSet() */VOIDFUNCPTR intVecSetExit = NULL;	/* exit  hook for intVecSet() */VOIDFUNCPTR intEOI	  = NULL;	/* pointer to EOI routine in BSP */VOIDFUNCPTR intEoiGet	  = NULL;	/* pointer to EoiGet routine in BSP */LOCAL int  dummy (void) { return ERROR; }  /* dummy, returns ERROR   */FUNCPTR    sysIntLvlEnableRtn  = dummy;    /* enable a single level  */FUNCPTR    sysIntLvlDisableRtn = dummy;    /* disable a single level *//* locals */LOCAL FUNCPTR * intVecBase = 0;		/* vector base address */LOCAL UCHAR intConnectCode []	=	/* intConnect stub */    {/* * 00  e8 kk kk kk kk		call	_intEnt		* tell kernel * 05  50			pushl	%eax		* save regs * 06  52			pushl	%edx * 07  51			pushl	%ecx * 08  68 pp pp pp pp		pushl	$_parameterBoi	* push BOI param * 13  e8 rr rr rr rr		call	_routineBoi	* call BOI routine * 18  68 pp pp pp pp		pushl	$_parameter	* push param * 23  e8 rr rr rr rr		call	_routine	* call C routine * 28  68 pp pp pp pp		pushl	$_parameterEoi	* push EOI param * 33  e8 rr rr rr rr		call	_routineEoi	* call EOI routine * 38  83 c4 0c			addl	$12, %esp	* pop param * 41  59			popl	%ecx		* restore regs * 42  5a			popl	%edx * 43  58			popl	%eax * 44  e9 kk kk kk kk		jmp	_intExit	* exit via kernel */     0xe8, 0x00, 0x00, 0x00, 0x00,	/* _intEnt filled in at runtime */     0x50,     0x52,     0x51,     0x68, 0x00, 0x00, 0x00, 0x00,	/* BOI parameter filled in at runtime */     0xe8, 0x00, 0x00, 0x00, 0x00,	/* BOI routine filled in at runtime */     0x68, 0x00, 0x00, 0x00, 0x00,	/* parameter filled in at runtime */     0xe8, 0x00, 0x00, 0x00, 0x00,	/* routine filled in at runtime */     0x68, 0x00, 0x00, 0x00, 0x00,	/* EOI parameter filled in at runtime */     0xe8, 0x00, 0x00, 0x00, 0x00,	/* EOI routine filled in at runtime */     0x83, 0xc4, 0x0c,			/* pop parameters */     0x59,     0x5a,     0x58,     0xe9, 0x00, 0x00, 0x00, 0x00,	/* _intExit filled in at runtime */    };/* forward declarations *//********************************************************************************* intConnect - connect a C routine to a hardware interrupt** This routine connects a specified C routine to a specified interrupt* vector.  The address of <routine> is stored at <vector> so that <routine>* is called with <parameter> when the interrupt occurs.  The routine is* invoked in supervisor mode at interrupt level.  A proper C environment* is established, the necessary registers saved, and the stack set up.** The routine can be any normal C code, except that it must not invoke* certain operating system functions that may block or perform I/O* operations.** This routine simply calls intHandlerCreate()/intHandlerCreateI86() and * intVecSet().  The address of the handler returned by intHandlerCreate()/* intHandlerCreateI86() is what actually gets put in the interrupt vector.** RETURNS:* OK, or ERROR if the interrupt handler cannot be built.** SEE ALSO: intHandlerCreate(), intVecSet(), intHandlerCreateI86()*/STATUS intConnect    (    VOIDFUNCPTR *vector,	/* interrupt vector to attach to     */    VOIDFUNCPTR routine,	/* routine to be called              */    int parameter		/* parameter to be passed to routine */    )    {    FUNCPTR intDrvRtn;    VOIDFUNCPTR routineBoi;    VOIDFUNCPTR routineEoi;    int parameterBoi;    int parameterEoi;    if (intEoiGet == NULL)	{        intDrvRtn = intHandlerCreate ((FUNCPTR)routine, parameter); 	}    else	{        (* intEoiGet) (vector, &routineBoi, &parameterBoi, 			       &routineEoi, &parameterEoi);        intDrvRtn = intHandlerCreateI86 ((FUNCPTR)routine, parameter,					 (FUNCPTR)routineBoi, parameterBoi,					 (FUNCPTR)routineEoi, parameterEoi); 	}    if (intDrvRtn == NULL)	return (ERROR);    /* make vector point to synthesized code */    intVecSet ((FUNCPTR *)vector, (FUNCPTR)intDrvRtn);    return (OK);    }/********************************************************************************* intEnable - enable a specific interrupt level** Enable a specific interrupt level.  For each interrupt level to be used,* there must be a call to this routine before it will be* allowed to interrupt.** RETURNS:* OK or ERROR for invalid arguments.*/int intEnable    (    int level   /* level to be enabled */    )    {    return (*sysIntLvlEnableRtn) (level);    }/********************************************************************************* intDisable - disable a particular interrupt level** This call disables a particular interrupt level, regardless of the current* interrupt mask level.** RETURNS:* OK or ERROR for invalid arguments.*/int intDisable    (    int level   /* level to be disabled */    )    {    return (*sysIntLvlDisableRtn) (level);    }/********************************************************************************* intHandlerCreate - construct an interrupt handler for a C routine** This routine builds an interrupt handler around a specified C routine.* This interrupt handler is then suitable for connecting to a specific* vector address with intVecSet().  The interrupt handler is invoked in* supervisor mode at interrupt level.  A proper C environment is* established, the necessary registers saved, and the stack set up.* * The routine can be any normal C code, except that it must not invoke* certain operating system functions that may block or perform I/O* operations.** IMPLEMENTATION:* This routine builds an interrupt handler of the following form in* allocated memory:** .CS* 00  e8 kk kk kk kk		call	_intEnt		* tell kernel* 05  50			pushl	%eax		* save regs* 06  52			pushl	%edx* 07  51			pushl	%ecx* 08  68 pp pp pp pp		pushl	$_parameterBoi	* push BOI param* 13  e8 rr rr rr rr		call	_routineBoi	* call BOI routine* 18  68 pp pp pp pp		pushl	$_parameter	* push param* 23  e8 rr rr rr rr		call	_routine	* call C routine* 28  68 pp pp pp pp		pushl	$_parameterEoi	* push EOI param* 33  e8 rr rr rr rr		call	_routineEoi	* call EOI routine* 38  83 c4 0c			addl	$12, %esp	* pop param* 41  59			popl	%ecx		* restore regs* 42  5a			popl	%edx* 43  58			popl	%eax* 44  e9 kk kk kk kk		jmp	_intExit	* exit via kernel* .CE* * RETURNS: A pointer to the new interrupt handler, or NULL if memory* is insufficient.*/FUNCPTR intHandlerCreate    (    FUNCPTR routine,		/* routine to be called              */    int parameter		/* parameter to be passed to routine */    )    {    FAST UCHAR *pCode;		/* pointer to newly synthesized code */    FAST int ix;    pCode = (UCHAR *)memalign (_CACHE_ALIGN_SIZE, sizeof (intConnectCode));    if (pCode != NULL)	{	/* copy intConnectCode into new code area */	bcopy ((char *)intConnectCode, (char *)pCode, sizeof (intConnectCode));	/* set the addresses & instructions */	*(int *)&pCode[ICC_INT_ENT] = (int)intEnt - 				      (int)&pCode[ICC_INT_ENT + 4];	for (ix = 0; ix < 10; ix++)	    pCode[ICC_BOI_PUSH + ix] = 0x90;	/* no BOI so replace by NOP */	pCode[ICC_ADD_N] = 8;			/* pop two parameters */	*(int *)&pCode[ICC_INT_PARAM] = (int)parameter;	*(int *)&pCode[ICC_INT_ROUTN] = (int)routine - 					(int)&pCode[ICC_INT_ROUTN + 4];	if (intEOI == NULL)	    {	    for (ix = 0; ix < 5; ix++)		pCode[ICC_EOI_CALL + ix] = 0x90;	/* replace by NOP */	    }	else	    {	    *(int *)&pCode[ICC_EOI_ROUTN] = (int)intEOI - 					    (int)&pCode[ICC_EOI_ROUTN + 4];	    }	*(int *)&pCode[ICC_INT_EXIT] = (int)intExit - 				       (int)&pCode[ICC_INT_EXIT + 4];	}    CACHE_TEXT_UPDATE ((void *) pCode, sizeof (intConnectCode));    return ((FUNCPTR)(int)pCode);    }/********************************************************************************* intHandlerCreateI86 - construct an interrupt handler for a C routine** This routine builds an interrupt handler around a specified C routine.* This interrupt handler is then suitable for connecting to a specific* vector address with intVecSet().  The interrupt handler is invoked in* supervisor mode at interrupt level.  A proper C environment is* established, the necessary registers saved, and the stack set up.* * The routine can be any normal C code, except that it must not invoke* certain operating system functions that may block or perform I/O* operations.** IMPLEMENTATION:* This routine builds an interrupt handler of the following form in* allocated memory:** .CS* 00  e8 kk kk kk kk		call	_intEnt		* tell kernel* 05  50			pushl	%eax		* save regs* 06  52			pushl	%edx* 07  51			pushl	%ecx* 08  68 pp pp pp pp		pushl	$_parameterBoi	* push BOI param* 13  e8 rr rr rr rr		call	_routineBoi	* call BOI routine* 18  68 pp pp pp pp		pushl	$_parameter	* push param* 23  e8 rr rr rr rr		call	_routine	* call C routine* 28  68 pp pp pp pp		pushl	$_parameterEoi	* push EOI param* 33  e8 rr rr rr rr		call	_routineEoi	* call EOI routine* 38  83 c4 0c			addl	$12, %esp	* pop param* 41  59			popl	%ecx		* restore regs* 42  5a			popl	%edx* 43  58			popl	%eax* 44  e9 kk kk kk kk		jmp	_intExit	* exit via kernel* .CE* * Third and fourth parameter of intHandlerCreateI86() are the BOI routine * address and its parameter that are inserted into the code as "routineBoi" * and "parameterBoi". * Fifth and sixth parameter of intHandlerCreateI86() are the EOI routine * address and its parameter that are inserted into the code as "routineEoi" * and "parameterEoi". * The BOI routine detects if this interrupt is stray/spurious/phantom by* interrogating the interrupt controller, and returns from the interrupt* if it is.  The EOI routine issues End Of Interrupt signal to the * interrupt controller, if it is required by the controller.  * Each interrupt controller has its own BOI and EOI routine.  They are* located in the BSP, and their address and parameter are taken by the* intEoiGet function (set to sysIntEoiGet() in the BSP).* The Tornado 2, and later, BSPs should use the BOI and EOI mechanism with* intEoiGet function pointer.** To keep the Tornado 101 BSP backward compatible, the function pointer * intEOI is not removed.  If intEoiGet is NULL, it should be set to the* sysIntEoiGet() routine in the BSP, intHandlerCreate() and the intEOI * function pointer (set to sysIntEOI() in the Tornado 101 BSP) is used.* * RETURNS: A pointer to the new interrupt handler, or NULL if memory* is insufficient.*/FUNCPTR intHandlerCreateI86    (    FUNCPTR routine,		/* routine to be called              */    int parameter,		/* parameter to be passed to routine */    FUNCPTR routineBoi,		/* BOI routine to be called          */    int parameterBoi,		/* parameter to be passed to routineBoi */    FUNCPTR routineEoi,		/* EOI routine to be called          */    int parameterEoi		/* parameter to be passed to routineEoi */    )

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
美女网站色91| 国产清纯白嫩初高生在线观看91 | 欧美一区二区三区在线| 精品国产乱子伦一区| 一区二区三区欧美久久| 国产乱码精品一区二区三区五月婷| 99re这里只有精品首页| 精品国产污网站| 亚洲成a人片综合在线| 高清成人免费视频| 日韩欧美一级在线播放| 亚洲一区二区av电影| 成人av在线影院| 久久精品视频网| 男女男精品网站| 欧美日韩国产乱码电影| 亚洲女爱视频在线| 99re成人在线| 国产精品第一页第二页第三页| 国产一区二区三区在线观看免费视频 | 亚洲精品五月天| 国产老妇另类xxxxx| 日韩三级精品电影久久久| 亚洲高清久久久| 欧美中文字幕一区| 亚洲精品国产品国语在线app| 成人午夜在线播放| 国产亚洲美州欧州综合国| 免费看欧美美女黄的网站| 欧美日韩国产乱码电影| 亚洲国产成人porn| 欧美日本国产一区| 亚洲国产精品欧美一二99| 欧美中文字幕一区二区三区 | 一区二区三区在线不卡| 91视频com| 亚洲人妖av一区二区| 91免费在线看| 亚洲一区欧美一区| 欧美日韩三级在线| 蜜桃视频一区二区三区| 久久综合久久鬼色| 国产精品一区免费在线观看| 久久久精品国产免大香伊 | 91网站视频在线观看| 日韩美女啊v在线免费观看| 91麻豆精东视频| 亚洲国产色一区| 欧美一区二区三区人| 韩日精品视频一区| 国产精品素人一区二区| 在线影院国内精品| 日本sm残虐另类| 久久久久久久久99精品| 波多野结衣在线一区| 亚洲影院理伦片| 日韩欧美国产三级电影视频| 国产aⅴ综合色| 亚洲精品乱码久久久久久日本蜜臀| 色综合视频一区二区三区高清| 亚洲一区二三区| 精品粉嫩aⅴ一区二区三区四区| 国产乱子轮精品视频| 日韩一区在线免费观看| 欧美日本在线看| 国产一级精品在线| 一区二区三区精品视频| 精品久久人人做人人爰| 色综合天天综合色综合av| 日本三级亚洲精品| 国产精品国模大尺度视频| 8x8x8国产精品| 99久久精品国产毛片| 男人的j进女人的j一区| 欧美国产成人在线| 91精品免费在线| 97精品国产露脸对白| 日本女人一区二区三区| 亚洲欧美日韩国产中文在线| 欧美一卡2卡三卡4卡5免费| av福利精品导航| 激情图片小说一区| 亚洲欧美激情插| 国产日产亚洲精品系列| 91精品免费观看| 91国内精品野花午夜精品| 国产麻豆精品一区二区| 日韩—二三区免费观看av| 亚洲免费观看在线视频| 国产三级欧美三级| 日韩欧美自拍偷拍| 91激情五月电影| 福利一区二区在线观看| 老司机午夜精品| 日日夜夜精品视频天天综合网| 亚洲欧洲在线观看av| 久久久久97国产精华液好用吗| 欧美一区二区福利在线| 91黄色免费看| 91蜜桃在线观看| gogo大胆日本视频一区| 风间由美一区二区av101| 麻豆国产精品官网| 美女在线视频一区| 蜜臀91精品一区二区三区| 偷拍日韩校园综合在线| 亚洲日本在线a| 国产精品国产a| 国产精品色婷婷久久58| 国产丝袜美腿一区二区三区| 久久亚洲二区三区| 久久夜色精品国产欧美乱极品| 91精品国产综合久久久久久久 | 一本大道久久a久久精品综合| 国产.欧美.日韩| 国产成人激情av| 国产不卡视频在线播放| 国内精品久久久久影院一蜜桃| 久久爱www久久做| 狠狠色综合播放一区二区| 国产一区日韩二区欧美三区| 加勒比av一区二区| 国内精品第一页| 国产精品1024久久| av午夜一区麻豆| 99久久99精品久久久久久| 色综合网色综合| 欧美日韩一卡二卡三卡 | 久久色在线视频| 久久免费的精品国产v∧| 欧美激情一区二区三区在线| 国产精品免费视频观看| 一区二区在线观看免费视频播放| 亚洲精品欧美综合四区| 日本中文字幕一区二区视频| 久久精品国产免费看久久精品| 国产在线乱码一区二区三区| 国产激情一区二区三区四区| 99久久综合国产精品| 欧美在线免费播放| 欧美成人一区二区三区片免费 | 国内精品国产三级国产a久久| 国产iv一区二区三区| 色婷婷久久综合| 日韩免费观看高清完整版| 国产免费成人在线视频| 亚洲精品福利视频网站| 日本vs亚洲vs韩国一区三区| 国产jizzjizz一区二区| 精品视频一区二区三区免费| 日韩精品中文字幕一区二区三区| 国产精品伦理一区二区| 亚洲国产欧美日韩另类综合| 国产一区 二区| 欧美日韩国产在线观看| 久久―日本道色综合久久| 亚洲综合免费观看高清在线观看| 九九国产精品视频| 一本色道a无线码一区v| 欧美va亚洲va| 亚洲一区二区中文在线| 国产成人av一区二区三区在线| 色哟哟欧美精品| 久久亚洲精精品中文字幕早川悠里| 亚洲免费观看在线观看| 国产精品538一区二区在线| 欧美日韩在线三级| 中文字幕精品—区二区四季| 男女男精品视频网| 91视频www| 国产清纯白嫩初高生在线观看91 | 色婷婷精品大在线视频| 精品国产91久久久久久久妲己| 亚洲欧美日韩国产一区二区三区| 久久国产麻豆精品| 欧洲另类一二三四区| 国产精品不卡在线观看| 久久99精品一区二区三区| 欧美特级限制片免费在线观看| 国产欧美视频一区二区| 久热成人在线视频| 欧美日韩一区精品| 一区二区三区四区视频精品免费| 国产成人精品综合在线观看 | 国产亚洲欧美色| 久久av中文字幕片| 制服丝袜在线91| 亚洲一线二线三线视频| 91蝌蚪国产九色| 国产精品传媒入口麻豆| 成人涩涩免费视频| 国产日韩精品一区| 国产一区二区三区在线看麻豆| 日韩欧美精品在线视频| 蜜桃av一区二区三区电影| 在线不卡免费av| 日韩精品亚洲一区| 欧美另类videos死尸| 日韩成人一区二区| 欧美一区二区三区四区五区|