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

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

?? schedlib.c

?? vxwork源代碼
?? C
字號:
/* schedLib.c - internal VxWorks kernel scheduler library *//* Copyright 1984-2001 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------02p,25mar02,kab  SPR 74651: PPC & SH can idle w/ work queued02o,09nov01,dee  add CPU_FAMILY is/not COLDFIRE02n,11oct01,cjj  removed Am29k support and removed #include asm.h02m,07sep01,h_k  added _func_vxIdleLoopHook for power control support for the                 SH processors (SPR #69838).02l,19apr01,jmp  fixed scheduling bug on SIMNT, workQDoWork() must be performed		 after the simulator enter in idle mode, not before (SPR#64900).02l,03mar00,zl   merged SH support into T202k,31mar98,cjtc exclude portable scheduler for I96002j,22jan98,pr   replaced EVT_CTX_SCHED with EVT_CTX_IDLE. Cleanup.02i,02jan98,jmb  name change for Win32 externals.02h,27oct97,pr   replaced WV code with macros		 added trgLibP.h02g,21oct97,cym  added intUnlock() to the idle loop for SIMNT.02f,18jul97,pr   replaced evtLogTIsOn with evtInstMode02e,28nov96,cdp  added ARM support.02d,30aug96,ism  added floating point save code for SIMSPARCSOLARIS02c,23oct96,tam  added call to vxPowerDown() in the iddle loop for PowerPC. 		 added #include of vxLib.h for PowerPC only.02b,24jun96,sbs  made windview instrumentation conditionally compiled02a,04nov94,yao  added PPC support.01x,25jan96,ism  cleanup from vxsim01w,03nov95,ism  vxsim solaris01v,09mar94,caf  use PORTABLE version for R3000 (SPR #2523).01u,09jun93,hdn  added a support for I80X8601s,12may94,ms   fixed vxsim hppa version of reschedule to save errno.01r,11aug93,gae  vxsim hppa.01q,22jun93,gae  vxsim.01v,09nov94,rdc  locked interrupts while calling _func_evtLogTSched.01u,03jun94,smb  merged with VxWorks for SPARC (marc shepard's version of 		 reschedule)01t,19may94,pad  merged with VxWorks for Am29K.                 added evtLogTIsOn test.	    pme  added Am29K family support and #include "asm.h"		 added evetsched() prototype01s,05may94,smb  WindView porting01r,24jan94,smb  added instrumentation for priority inheritance01q,10dec93,smb  added instrumentation for windview01p,16mar93,jcf  removed NULL assignment of taskIdCurrent from while loop.01o,06jul92,jwt  fixed reschedule() (wouldn't compile) for SPARC kernel.01n,04jul92,jcf  private header files.01m,04jun92,ajm  now uses global taskSrDefault instead of macro01l,26may92,rrr  the tree shuffle01k,22jan92,shl  fixed typo introduced in 01j.01j,14jan92,jwt  merged 5.0.2b SPARC release; copyright message to 1992.01i,15oct91,ajm  mips version is now optimized01h,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style                  -fixed #else and #endif                  -changed VOID to void                  -changed copyright notice01g,06Sep91,wmd  move line clearing kernelIsIdle.01f,19aug91,ajm  imported kernelIsIdle for idle state consistency.                 made kernel idle loop always use default SR just as                 optimized version does.01e,15feb91,jwt  passed taskIdCurrent as a parameter to reschedule().           +hvh  set/cleared kernelIsIdle flag in reschedule().01d,29aug90,jcf  documentation.01c,26jun90,jcf  fixed up, fixed up PORTABLE version.01b,11may90,jcf  fixed up PORTABLE definition.01a,17jun89,jcf	 written.*//*DESCRIPTIONThe VxWorks kernel provides tasking control services to an application.  Thelibraries kernelLib, taskLib, semLib, tickLib, and wdLib comprise the kernelfunctionality.  This library is internal to the VxWorks kernel and containsno user callable routines.INTERNALThis module contains the portable version of the rescheduler of the VxWorkskernel.  An optimized version is desirable and usually found in windALib.At the time reschedule() is called, taskIdCurrent must contain the currentexecuting task.  That task's context has been saved as part of the execution ofwindExit().  Execution continues to be in kernel space so mutual exclusion toall queues is guaranteed.We must simply make taskIdCurrent equal to whatever task is first in the readyqueue and load its context.  But nothing is simple.  The first complicatingfactor is we must call the switch and swap hooks, if any.  Also, we mustremember to empty the kernel work queue before loading the context of the newtaskIdCurrent.  The testing of more work to do and the loading of the contextmust be executed with interrupts locked out.  Otherwise interrupt serviceroutines may add work that gets forgotten.  An optimized version of thisroutine should load as much of the context as possible before lockinginterrupts, thus reducing interrupt latency.Finally we consider the case of going idle, which will occur when theready queue is empty.  In such a case we loop waiting for work to be addedto the work queue, because an ISR waking some task up is the only way themachine can stop idling..CSwindview INSTRUMENTATION------------------------- level 3 events	EVENT_WIND_EXIT_DISPATCH	EVENT_WIND_EXIT_NODISPATCH	EVENT_WIND_EXIT_DISPATCH_PI	EVENT_WIND_EXIT_NODISPATCH_PI	EVENT_WIND_EXIT_IDLE.CESEE ALSO: "Basic OS", windALibNOMANUAL*/#include "vxWorks.h"#include "taskLib.h"#include "private/workQLibP.h"#include "private/windLibP.h"#include "private/taskLibP.h"#include "private/funcBindP.h"#include "private/trgLibP.h"#include "intLib.h"#include "errno.h"#if     (CPU_FAMILY == PPC) || (CPU_FAMILY == SH)#include "vxLib.h"#endif  /* (CPU_FAMILY == PPC) */IMPORT	ULONG	taskSrDefault;IMPORT	Q_HEAD	readyQHead;IMPORT	void	windLoadContext (void);#if (CPU_FAMILY == SIMNT)#include "win_Lib.h"IMPORT  WIN_HANDLE simIntIdleSem;#endif#if     (CPU_FAMILY == PPC)IMPORT  _RType  taskMsrDefault;#endif  /* (CPU_FAMILY == PPC) *//* optimized version available for 680X0, MIPS, I80X86, and SH */#if (defined(PORTABLE) || ((CPU_FAMILY != MC680X0) && (CPU_FAMILY != MIPS) && \	(CPU_FAMILY != I80X86) && (CPU_FAMILY != ARM) && \	(CPU_FAMILY != COLDFIRE) && \	(CPU_FAMILY != I960) && (CPU_FAMILY != SH)))#define schedLib_PORTABLE#endif#ifdef schedLib_PORTABLE/********************************************************************************* reschedule - portable version of the scheduler** This routine determines the appropriate task to execute, then calls any* switch and swap hooks, then loads its context.  The complicating factor* is that the kernel work queue must be checked before leaving.  In the* portable version the checking of the work queue and the loading of the* task's context is done at interrupt lock out level to avoid races with* ISRs.  An optimized version ought to load as much of the context as is* possible before locking interrupts and checking the work queue.  This will* reduce interrupt latency considerably.** If no task is ready, the machine will idle looking for more work in the* work queue.  The idle state is not in a task context and therefore* no switch or swap hooks are called when the machine goes idle.  Upon leaving* the idle state, switch and swap hooks will be called if the new task is* different than the task that was executing when the machine went idle.** NOMANUAL*/void reschedule (void)    {    FAST WIND_TCB *taskIdPrevious;    FAST int       ix;    FAST UINT16    mask;    int		   oldLevel;unlucky:    taskIdPrevious = taskIdCurrent;		/* remember old task */    workQDoWork ();				/* execute all queued work */    /* idle here until someone is ready to execute */    kernelIsIdle = TRUE;                        /* idle flag for spy */    /* windview conditions */#ifdef WV_INSTRUMENTATION    EVT_CTX_IDLE(EVENT_WIND_EXIT_IDLE, &readyQHead);#endif    while (((WIND_TCB *) Q_FIRST (&readyQHead)) == NULL)        {#if	CPU_FAMILY==SIMSPARCSUNOS || CPU_FAMILY==SIMHPPA	{	int mask=0;        taskIdCurrent->errorStatus = errno;	u_sigsuspend (&mask);        errno = taskIdCurrent->errorStatus;	}#endif	/* CPU_FAMILY==SIMSPARCSUNOS || CPU_FAMILY==SIMHPPA */#if CPU_FAMILY==SIMSPARCSOLARIS	{	int mask[4]={0, 0, 0, 0};	extern void u_sigsuspend ();	extern WIND_TCB *pTaskLastFpTcb;	extern void fppSave();	/*	 * u_sigsuspend() hoses the fpp registers, so save them now if they	 * are active.  Then set the Last FP TCB to NULL, so we won't try to	 * save them again.	 */	if (pTaskLastFpTcb!=(WIND_TCB *)NULL)		{		fppSave (pTaskLastFpTcb->pFpContext);		pTaskLastFpTcb = (WIND_TCB *)NULL;		}        taskIdCurrent->errorStatus = errno;	u_sigsuspend (&mask[0]);        errno = taskIdCurrent->errorStatus;	}#endif /* CPU_FAMILY==SIMSPARCSOLARIS */#if 	CPU_FAMILY == SIMNT	intUnlock(0);    /* Don't busy wait, let Windoze run.  This semaphore is given when      * a message is received by the process, aka an interrupt shows up.     */	win_SemTake(simIntIdleSem);#endif /* CPU_FAMILY == SIMNT */	workQDoWork ();#if     CPU_FAMILY==MIPS    /* Let the idle loop look like a real task by turning all ints on.     * Without this if a task locks interrupts and suspends itself, and     * there are no ready tasks, we will lockup.     */	intSRSet (taskSrDefault);#endif  /* CPU_FAMILY == MIPS */#if     (CPU_FAMILY == PPC)        intUnlock (taskMsrDefault);	/* 	 * SPR 74651: if the previous workQDoWork() had added jobs,	 * vxPowerDown still ran until the *next* interrupt.	 */	if (((WIND_TCB *) Q_FIRST (&readyQHead)) != NULL)	    break;	vxPowerDown ();#endif  /* (CPU_FAMILY == PPC) */#if	(CPU_FAMILY == SH)			/* Unlock interrupts */	intLevelSet (0);	/* 	 * SPR 74651: if the previous workQDoWork() had added jobs,	 * the idleLoopHook was still run until the *next* interrupt.	 */	if (((WIND_TCB *) Q_FIRST (&readyQHead)) != NULL)	    break;	if (_func_vxIdleLoopHook != NULL)	    (* _func_vxIdleLoopHook) ();#endif#if	(CPU_FAMILY == SPARC)	intLevelSet (0);                        /* Unlock interrupts */#endif#if     (CPU_FAMILY == ARM)        intUnlock(0);                           /* Unlock interrupts */#endif	}    taskIdCurrent = (WIND_TCB *) Q_FIRST (&readyQHead);    kernelIsIdle = FALSE;                       /* idle flag for spy */    /* taskIdCurrent now has some task to run.  If it is different from     * taskIdPrevious we execute the switch and swap hooks.     */    if (taskIdCurrent != taskIdPrevious)	/* switching in a new task? */	{	/* do swap hooks */	mask = taskIdCurrent->swapInMask | taskIdPrevious->swapOutMask;	for (ix = 0; mask != 0; ix++, mask = mask << 1)	    if (mask & 0x8000)		(* taskSwapTable[ix]) (taskIdPrevious, taskIdCurrent);	/* do switch hooks */	for (ix = 0;	     (ix < VX_MAX_TASK_SWITCH_RTNS) && (taskSwitchTable[ix] != NULL);	     ++ix)	    {	    (* taskSwitchTable[ix]) (taskIdPrevious, taskIdCurrent);	    }	}    oldLevel = intLock ();			/* LOCK INTERRUPTS */    if (!workQIsEmpty)	{	intUnlock (oldLevel);			/* UNLOCK INTERRUPTS */	goto unlucky;				/* take it from the top... */	}    else	{#ifdef WV_INSTRUMENTATION        /* log the dispatch event */        EVT_CTX_DISP (EVENT_WIND_EXIT_DISPATCH_PI, (int) taskIdCurrent, 	              taskIdCurrent->priority, taskIdCurrent->priNormal);#endif	kernelState = FALSE;			/* KERNEL EXIT */	/* Now we load context and schedule the selected task in.  Note that	 * interrupts are locked out until the task is switched in.  An	 * optimized version of this routine should load the context just	 * before locking interrupts above, then after locking interrupts,	 * check the work queue to see if we missed any deferred.	 */	windLoadContext ();			/* dispatch the selected task */	}    }#endif	/* schedLib_PORTABLE */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美中文字幕久久| 欧美性感一区二区三区| 一区二区三区蜜桃网| xfplay精品久久| 欧美在线啊v一区| 成人激情动漫在线观看| 日韩精品国产精品| 亚洲人精品一区| 久久夜色精品一区| 欧美日韩卡一卡二| 波多野结衣一区二区三区| 麻豆精品一区二区| 一级精品视频在线观看宜春院| 欧美精品一区二区三区一线天视频| 一本久久a久久免费精品不卡| 国产美女av一区二区三区| 亚洲黄色免费电影| 国产精品私人自拍| 26uuu成人网一区二区三区| 欧美日韩另类国产亚洲欧美一级| 91亚洲午夜精品久久久久久| 国产剧情在线观看一区二区| 免费人成精品欧美精品 | 久久免费看少妇高潮| 欧美日韩一区二区三区视频| www.亚洲在线| 国产激情一区二区三区四区| 久久国产精品99久久久久久老狼| 亚洲va国产va欧美va观看| 一区二区三区欧美日韩| 亚洲婷婷综合色高清在线| 国产欧美日韩另类视频免费观看| 久久久久久久久久久久久夜| 日韩欧美精品在线视频| 日韩欧美在线网站| 日韩欧美另类在线| 精品国产污网站| 久久综合资源网| 欧美精品一区视频| 国产日韩欧美精品一区| 久久久国产午夜精品| 国产亚洲欧洲一区高清在线观看| 久久色在线观看| 国产日韩欧美精品综合| 国产免费观看久久| 国产精品拍天天在线| 国产精品国产自产拍在线| 亚洲视频免费在线| 一区二区视频在线看| 亚洲伊人色欲综合网| 亚洲一线二线三线视频| 日韩精品电影一区亚洲| 蜜臀av性久久久久av蜜臀妖精 | av电影在线观看一区| 国产麻豆日韩欧美久久| 国产成人福利片| 成人动漫中文字幕| 91福利国产精品| 欧美日韩国产美女| 精品久久免费看| 中文字幕一区三区| 亚洲成人av中文| 激情五月激情综合网| 福利视频网站一区二区三区| 色综合久久综合网欧美综合网| 欧美中文字幕一区| 日韩精品在线网站| 国产精品视频yy9299一区| 亚洲国产精品自拍| 韩国女主播一区| 99国产精品一区| 欧美一级二级在线观看| 日本一区二区不卡视频| 一区二区高清在线| 精品一区二区三区不卡 | 亚洲狠狠丁香婷婷综合久久久| 视频一区免费在线观看| 国产69精品久久久久777| 色婷婷久久综合| 欧美精品一区二区三区在线播放| 中文字幕一区不卡| 日韩精品一区第一页| 国产成人精品免费| 欧美二区三区91| 国产人妖乱国产精品人妖| 亚洲第一综合色| 波多野结衣亚洲一区| 日韩美女天天操| 亚洲综合成人网| 国产不卡在线视频| 欧美一区二区三区啪啪| 日韩一区中文字幕| 久久99国产精品免费网站| 日本久久精品电影| 久久亚洲精精品中文字幕早川悠里| 亚洲精品免费视频| 粉嫩av一区二区三区| 日韩视频免费观看高清完整版在线观看| 欧美激情在线观看视频免费| 日韩电影在线免费| 91美女蜜桃在线| 久久久久久免费网| 日韩福利视频网| 91丨九色丨黑人外教| 久久久不卡影院| 日韩黄色在线观看| 91一区一区三区| 久久精品人人爽人人爽| 蜜桃视频在线观看一区| 欧美中文字幕一二三区视频| 国产精品国产精品国产专区不片| 久久综合综合久久综合| 精品视频1区2区| 亚洲欧美电影院| 91在线一区二区三区| 亚洲你懂的在线视频| 国产美女一区二区| 精品粉嫩超白一线天av| 日本成人中文字幕在线视频| 欧美日韩一区在线观看| 亚洲女同一区二区| 91麻豆国产福利精品| 国产欧美一区二区精品性色| 国产一区二区在线免费观看| 欧美一区二区啪啪| 日日噜噜夜夜狠狠视频欧美人| 欧美亚洲国产一区二区三区| 亚洲伦在线观看| 一本久久精品一区二区| 亚洲欧美另类图片小说| 91玉足脚交白嫩脚丫在线播放| 亚洲欧美在线观看| 一本一本久久a久久精品综合麻豆| 国产精品丝袜久久久久久app| 丁香婷婷综合激情五月色| 国产欧美在线观看一区| 成人国产亚洲欧美成人综合网| 国产精品久久久爽爽爽麻豆色哟哟| 国产成人亚洲精品狼色在线| 国产情人综合久久777777| 成人免费高清视频| 成人欧美一区二区三区小说| 91麻豆免费看| 一区二区三区加勒比av| 欧美体内she精高潮| 亚洲va韩国va欧美va精品| 欧美一区二区三区免费大片| 日韩不卡一二三区| 精品日韩一区二区三区免费视频| 国产不卡高清在线观看视频| 欧美亚一区二区| 中文字幕一区二区三区色视频| 99re成人在线| 亚洲精品成人悠悠色影视| 91黄色免费网站| 亚洲国产va精品久久久不卡综合 | 在线亚洲人成电影网站色www| 亚洲精品欧美激情| 91精品国产综合久久久久久| 精品亚洲国产成人av制服丝袜| 亚洲国产精品精华液ab| av在线播放成人| 亚洲sss视频在线视频| 日韩精品一区二区三区中文精品| 国产精品资源网| 亚洲美女视频一区| 7777精品伊人久久久大香线蕉最新版| 久久国产综合精品| 亚洲国产电影在线观看| 色欧美片视频在线观看在线视频| 亚洲va韩国va欧美va| 国产日韩欧美在线一区| 色哟哟国产精品| 久久电影网站中文字幕 | 老司机精品视频在线| 久久久久国产精品厨房| 色婷婷狠狠综合| 免费成人在线影院| 国产精品乱人伦| 欧美日韩美女一区二区| 国产成人精品免费网站| 舔着乳尖日韩一区| 亚洲国产电影在线观看| 在线电影国产精品| 成人国产一区二区三区精品| 日韩在线一区二区三区| 国产精品不卡一区二区三区| 91精品国产乱| 99久久99久久精品国产片果冻| 欧美aaa在线| 亚洲欧美一区二区三区国产精品 | 欧美电影免费观看高清完整版| 高清日韩电视剧大全免费| 亚洲超碰精品一区二区| 国产精品婷婷午夜在线观看| 日韩一区二区视频| 色狠狠色狠狠综合| 国产999精品久久久久久绿帽| 日韩精品一级中文字幕精品视频免费观看 | 亚洲成人综合视频|