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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? intarchlib.c

?? vxwork源代碼
?? 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 */    )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
51午夜精品国产| 一区二区三区在线免费播放| 中文字幕一区二区三区在线观看| 亚洲愉拍自拍另类高清精品| 韩国av一区二区三区| 91成人在线免费观看| 久久久久久免费| 天堂va蜜桃一区二区三区漫画版| jlzzjlzz欧美大全| 精品国产污网站| 日韩精品欧美成人高清一区二区| av电影天堂一区二区在线观看| 欧美一级二级三级乱码| 夜夜爽夜夜爽精品视频| 高清beeg欧美| 2021中文字幕一区亚洲| 日本亚洲视频在线| 欧美亚洲一区二区三区四区| 国产精品欧美久久久久无广告 | 精品伊人久久久久7777人| 色综合久久久久久久久久久| 久久精品亚洲乱码伦伦中文| 精品一区二区三区免费观看| 69堂亚洲精品首页| 天使萌一区二区三区免费观看| 色哟哟在线观看一区二区三区| 国产精品国产三级国产三级人妇| 国产精品一二三在| 国产日韩影视精品| 国产成人精品免费在线| 国产午夜亚洲精品午夜鲁丝片| 成人在线综合网| 日韩欧美成人一区| 精品一区二区三区视频| 精品国产免费视频| 国产高清不卡一区| 国产精品毛片大码女人| caoporen国产精品视频| 综合久久久久综合| 欧洲国内综合视频| 日韩和欧美的一区| 日韩欧美在线网站| 激情五月激情综合网| 国产婷婷色一区二区三区四区| 国产98色在线|日韩| 日韩理论电影院| 欧美日韩在线一区二区| 亚洲成人tv网| 欧美成人艳星乳罩| 丁香六月综合激情| 亚洲视频一区在线| 欧美三级一区二区| 婷婷成人综合网| 精品国产乱子伦一区| 高清国产一区二区三区| 亚洲免费观看高清完整版在线| 色又黄又爽网站www久久| 亚洲成人一区二区| 久久综合色婷婷| 97成人超碰视| 日产精品久久久久久久性色| 精品99999| 色狠狠一区二区| 久久精品免费看| 日韩理论电影院| 日韩欧美一区中文| 成人激情动漫在线观看| 午夜精彩视频在线观看不卡| 欧美一卡二卡三卡四卡| 国产成人a级片| 天天影视网天天综合色在线播放| 欧美精品一区二区在线播放| 99免费精品在线| 伦理电影国产精品| 亚洲人成小说网站色在线| 欧美一级专区免费大片| 不卡视频免费播放| 久久国产人妖系列| 亚洲欧美另类小说| 久久午夜电影网| 欧美一区二区三区成人| 处破女av一区二区| 美洲天堂一区二卡三卡四卡视频 | 精品日韩99亚洲| 91老司机福利 在线| 精品系列免费在线观看| 一区二区免费在线| 中文字幕不卡在线播放| 欧美不卡一区二区三区| 欧美午夜片在线看| 成人免费福利片| 免费成人在线播放| 亚洲一区成人在线| 亚洲日本va午夜在线电影| 久久欧美一区二区| 欧美大胆人体bbbb| 在线播放中文字幕一区| 色婷婷av一区二区| 欧美日韩国产综合草草| 成人av电影免费观看| 国模少妇一区二区三区| 日本不卡的三区四区五区| 亚洲精品欧美二区三区中文字幕| 国产日韩欧美激情| 欧美精品一区二区三区蜜桃| 91.com视频| 欧美一级专区免费大片| 欧美日本韩国一区| 欧美视频在线一区二区三区| 色婷婷综合久久久中文字幕| 91网站视频在线观看| 成人高清免费观看| 成人手机电影网| caoporm超碰国产精品| av午夜一区麻豆| 99精品一区二区三区| 9久草视频在线视频精品| 成人免费观看av| 99久久99久久综合| 91国产视频在线观看| 欧洲一区在线观看| 欧美日韩中文字幕一区二区| 欧美日韩免费在线视频| 欧美日韩一级二级三级| 欧美日韩高清不卡| 日韩一区二区在线看片| 日韩欧美国产三级| 久久影院午夜论| 国产精品成人网| 亚洲无人区一区| 免费观看在线色综合| 国产真实乱偷精品视频免| 大桥未久av一区二区三区中文| 成人黄色电影在线 | 韩国一区二区三区| 国产一区二区三区黄视频 | 色婷婷久久一区二区三区麻豆| 在线观看日韩精品| 91精品国产综合久久蜜臀| 久久久国产精华| 一区二区三区高清在线| 日本免费新一区视频| 国产精品一线二线三线| 日本道色综合久久| 精品久久国产97色综合| 国产精品国产三级国产aⅴ无密码| 曰韩精品一区二区| 极品销魂美女一区二区三区| 99热精品一区二区| 制服丝袜亚洲播放| 国产精品九色蝌蚪自拍| 日韩中文字幕区一区有砖一区| 精品一区二区三区蜜桃| 色哟哟在线观看一区二区三区| 在线播放91灌醉迷j高跟美女| 久久精品夜色噜噜亚洲a∨| 亚洲精品久久嫩草网站秘色| 美国十次综合导航| 色狠狠色噜噜噜综合网| 久久蜜桃一区二区| 亚洲国产成人av网| 成人黄色在线看| 日韩你懂的电影在线观看| 一区二区三区资源| 国产一区日韩二区欧美三区| 一本到不卡免费一区二区| 久久影院视频免费| 亚欧色一区w666天堂| 成人午夜激情在线| 日韩网站在线看片你懂的| 亚洲欧美激情一区二区| 狠狠色综合播放一区二区| 欧美日韩中文字幕精品| 国产精品视频九色porn| 国产真实精品久久二三区| 欧美日韩高清不卡| 一区二区三区高清不卡| www.欧美精品一二区| 精品欧美一区二区在线观看| 午夜影院在线观看欧美| 91丨九色丨蝌蚪丨老版| 亚洲国产高清在线| 国模一区二区三区白浆| 欧美一区欧美二区| 亚洲成人精品影院| 日本韩国欧美一区| 中文字幕在线播放不卡一区| 国产99久久久国产精品免费看 | 欧美国产精品中文字幕| 精品一区二区三区在线播放视频| 欧美精品久久久久久久多人混战| 亚洲乱码国产乱码精品精可以看| 成人av在线一区二区| 久久久久久久久免费| 麻豆91在线播放| 欧美成人官网二区| 久久不见久久见免费视频1| 日韩视频国产视频| 老司机免费视频一区二区 | 一色屋精品亚洲香蕉网站|