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

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

?? tasklib.c

?? vxworks 5.5 kernel code
?? C
?? 第 1 頁 / 共 5 頁
字號:
/* taskLib.c - task management library *//* Copyright 1984-2003 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------05r,09jun03,dtr  CP1 merge.05q,22apr03,dtr  Changing slot name from reserved2 to compiler1.05p,10jan03,pcm  added VX_DEALLOC_STACK option to taskInit() documentation;		 initialized task name to NULL in taskInit();		 made sure all WIND_TCB elements initialized in taskInit();		 (SPRs 30602, 84273, 77118 respectively)05p,04sep02,dtr  Adding support for SPE.05o,15may02,pcm  added check for valid priority level in taskInit() (SPR 77368)05n,04jan02,hbh  Increased default extra stack size for simulators.05m,09nov01,jhw  Revert WDB_INFO to be inside WIND_TCB.05l,05nov01,gls  added initialization of pPthread in taskInit05k,17oct01,jhw  Move WDB_INFO outside of WIND_TCB in task mem partition.05j,11oct01,cjj  removed Am29k support.  Added documentation to taskSpawn()		 regarding the use of VX_FP_TASK.05i,10oct01,pcm  added note to taskIdVerify () about exceptions (SPR 31496)05h,09oct01,bwa  Added event field initialization.05g,20sep01,aeg  added init of pSelectContext and pWdbInfo in taskInit().05f,13jul01,kab  Cleanup for merge to mainline05e,14mar01,pcs  Added code for ALTIVEC awareness.05d,18dec00,pes  Correct compiler warnings05d,03mar00,zl   merged SH support into T205c,12mar99,dbs  add COM task-local storage to TCB05b,09mar98,cym  increasing stack size for SIMNT.05a,05nov98,fle  doc : allowed link to taskInfo library by putting it in bold04g,04sep98,cdp  force entry-point in TCB to have bit zero clear for all Thumb.04f,25sep98,cym  removed 04f.04e,06may98,cym  changed taskDestroy for SIMNT to use the calling context.04d,22jul96,jmb  merged ease patch,  don't reinitialize excInfo on taskRestart.04c,12jan98,dbt  modified for new debugger scheme.04b,08jul97,dgp  doc: correct typo per SPR 776904b,22aug97,cdp  force entry point in TCB to have bit zero clear for Thumb.04a,29oct96,dgp  doc: correct spelling of checkStack() in taskSpawn()03z,16oct96,dgp  doc: add errnos for user-visible routines per SPR 689303y,09oct06,dgp  doc: correct taskInit() description of *pStackBase - SPR 682803x,08aug96,dbt  Modified taskRestart to handle task name>20 bytes (SPR #3445).03w,24jul96,dbt  Initialized exception info for I960 in taskInit (SPR #3092).03v,22jul96,jmb  merged ease patch,  don't reinitialize excInfo on taskRestart.03u,27jun96,dbt  doc : added taskLock & taskUnlock not callable from		 interrupt service routines (SPR #2568).		 Updated copyright.03t,24jun96,sbs  made windview instrumentation conditionally compiled03u,13jun96,ism  increased stack size again03t,13feb96,ism  bumped stack size for SIMSOLARIS created tasks03s,25jan96,ism  cleanup for vxsim/solaris.03r,23oct95,jdi  doc: added bit values for taskSpawn() options (SPR 4276).03q,14oct95,jdi  doc: removed SEE ALSO to vxTaskEntry(), which is not published.03p,26may95,ms	 initialize WDB fields in the TCB	   + rrr03p,30oct95,ism  added SIMSPARCSOLARIS support03o,16jan95,rhp  added expl of taskID for taskInit(), taskActivate() (SPR#3923)03n,10nov94,ms   bumped stack size for all spawned SIMHPPA tasks.03m,28jul94,dvs  added reset of pTaskLastFpTcb in taskDestroy. (SPR #3033)03l,02dec93,pme  added am29K family stack support.03k,20jul94,ms   undid some of 03j for VxSim/HPPA. Bumped restartTaskStackSize.03j,28jan94,gae  vxsim fixes for bumping stack on sysFlag & clearing excInfo.03n,19oct94,rdc  bug in eventlogging in taskDestroy.		 added lockCnt to EVT_CTX_TASKINFO.03m,14apr94,smb  modified EVT_OBJ_* macros again03l,15mar94,smb  modified EVT_OBJ_* macros03k,24jan94,smb  added instrumentation macros03j,10dec93,smb  added instrumentation03i,16sep93,jmm  added check in taskPrioritySet() to ensure priority is 0-25503h,01mar93,jdi  doc: reinstated VX_UNBREAKABLE as publishable option, per kdl;		 addition to taskDelay() as per rrr.03g,27feb93,jcf  fixed race in taskDestroy() with masking signals.03f,15feb93,jdi  fixed taskSpawn() to mention fixed argument requirement.03e,10feb93,jdi  doc review by jcf; corrected spelling of stdlib.h.03d,04feb93,jdi  documentation cleanup; SPR#1365: added VX_DEALLOC_STACK		 to doc for taskSpawn().03c,01oct92,jcf  removed deadlock with deletion of deletion safe tasks.03b,29sep92,pme  removed failure notification in taskDestroy.03a,31aug92,rrr  fixed taskDelay to set errno to EINTR if a signal occurs.02z,23aug92,jcf  moved info routines to taskInfo.c.  changed bzero to bfill.02y,02aug92,jcf  initialized pExcRegSet (taskInit) utilized in taskRegSet().02x,29jul92,jcf  taskDestroy suspends victim; padding to account for mem tags;		 package initialization with taskInit; documentation.02w,27jul92,jcf  cleanup.02v,24jul92,yao  changed to use STACK_ROUND_UP instead MEM_ROUND_UP in 		 taskStackAllot().  bzeroed dbgInfo in taskInit().02u,23jul92,yao  removed initialization of pDbgState.02t,23jul92,rrr  rounded the sizeof the TCB up to the requirements of rounding                 of the stack.02s,23jul92,ajm  moved _sig_timeout_recalc from sigLib to shrink proms02r,21jul92,pme  changed shared TCB free management.                 added smObjTaskDeleteFailRtn.02q,19jul92,pme  added shared memory objects support.02p,19jul92,smb  Added some ANSI documentation.02o,09jul92,rrr  changed xsignal.h to private/sigLibP.h02n,04jul92,jcf	 changed algorithm of taskDestroy/taskRestart to avoid excJobAdd		 tid is now valid for delete hooks.		 stack is now not filled optionally.		 show/info routines removed.02m,30jun92,yao  changed to init pDbgState for all architectures.02l,26jun92,jwt  restored 02k changes; cleaned up compiler warnings.02k,16jun92,jwt  made register display four across; fixed rrr version numbers.02j,26may92,rrr  the tree shuffle02i,30apr92,rrr  added signal restarting02h,18mar92,yao  removed macro MEM_ROUND_UP.  removed conditional definition		 STACK_GROWS_DOWN/UP.  abstracted taskStackAllot() from		 taskArchLib.c.  removed unneccesary if conditionals for		 calls to taskRegsInit() in taskInit().  changed taskRegsShow()		 to be within 80 columns per line.02g,12mar92,yao  added taskRegsShow().  changed copyright notice.02f,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -fixed #else and #endif		  -changed VOID to void		  -changed copyright notice02e,11sep91,hdn  Init pDbgState for TRON.02d,21aug91,ajm  made MIPS stacksize bounded on 8 bytes for varargs.02c,14aug91,del  padded qInit and excJobAdd call's with 0's.		 Init pDbgState for I960 only.02b,10jun91,gae  fixed typo in taskOptionString to not say VX_FP_STACK.02a,23may91,jwt  modifed roundup from 4 to 8 bytes for SPARC only.01z,26apr91,hdn  added conditional checks for TRON architecture.01y,20apr91,del  fixed bug in taskInfoGet() for checking the stack high mark.		 For STACK_GROWS_UP (i960) version.01x,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.01w,31mar91,del  added I960 specifics.01v,24mar91,jdi  documentation cleanup.01u,25oct90,dnw  made taskTerminate() NOMANUAL.01t,05oct90,dnw  added forward declarations.01s,30sep90,jcf  added taskDeleteForce().01r,31aug90,jcf  documentation.01q,30jul90,jcf  changed task{Lock,Unlock,Safe,Unsafe} to return STATUS01p,17jul90,dnw  changed to call to objAlloc() to objAllocExtra().01o,13jul90,rdc  taskInit zeros environment var and select stuff in tcb.01n,05jul90,jcf  added STACK_GROWS_XX to resolve stack growth direction issues.		 renamed stack variables.		 changed taskSuspend to disregard task deletion safety.01m,26jun90,jcf  added taskStackAllot()		 changed taskNames to use taskStackAllot()		 removed taskFppHook.		 general cleanup.01l,15apr90,jcf  changed nameForNameless from task<%d> to t<%d>01k,28aug89,jcf  modified to version 2.0 of wind.01j,09aug89,gae  undid varargs stuff.01i,28apr89,mcl  added some initializations in WIND_TCB (applies to		   both SPARC & 68k); fixes alignment check in taskIdVerify.01h,07apr89,mcl  SPARC floating point.01g,12dec88,ecs  gave it some sparc.		 added include of varargs.h.01f,19nov88,jcf  taskDelay can not be called from interrupt level.                   task ids of zero are translated to taskCurrentId here now.01e,23sep88,gae  documentation touchup.01d,07sep88,gae  documentation.01c,23aug88,gae  documentation.01b,20jul88,jcf  clean up.01a,10mar88,jcf  written.*//*DESCRIPTIONThis library provides the interface to the VxWorks task management facilities.Task control services are provided by the VxWorks kernel, which is comprisedof kernelLib, taskLib, semLib, tickLib, msgQLib, and `wdLib'.  Programmaticaccess to task information and debugging features is provided by `taskInfo'.Higher-level task information display routines are provided by `taskShow'.TASK CREATIONTasks are created with the general-purpose routine taskSpawn().  Taskcreation consists of the following:  allocation of memory for the stackand task control block (WIND_TCB), initialization of the WIND_TCB, andactivation of the WIND_TCB.  Special needs may require the use of thelower-level routines taskInit() and taskActivate(), which are the underlyingprimitives of taskSpawn().Tasks in VxWorks execute in the most privileged state of the underlyingarchitecture.  In a shared address space, processor privilege offers noprotection advantages and actually hinders performance.There is no limit to the number of tasks created in VxWorks, as long assufficient memory is available to satisfy allocation requirements.The routine sp() is provided in usrLib as a convenient abbreviation forspawning tasks.  It calls taskSpawn() with default parameters.TASK DELETIONIf a task exits its "main" routine, specified during task creation, thekernel implicitly calls exit() to delete the task.  Tasks can beexplicitly deleted with the taskDelete() or exit() routine.Task deletion must be handled with extreme care, due to the inherentdifficulties of resource reclamation.  Deleting a task that owns acritical resource can cripple the system, since the resource may no longerbe available.  Simply returning a resource to an available state is not aviable solution, since the system can make no assumption as to the stateof a particular resource at the time a task is deleted.The solution to the task deletion problem lies in deletion protection,rather than overly complex deletion facilities.  Tasks may be protectedfrom unexpected deletion using taskSafe() and taskUnsafe().  While a taskis safe from deletion, deleters will block until it is safe to proceed.Also, a task can protect itself from deletion by taking a mutual-exclusionsemaphore created with the SEM_DELETE_SAFE option, which enables an implicittaskSafe() with each semTake(), and a taskUnsafe() with each semGive()(see semMLib for more information).Many VxWorks system resources are protected in this manner, andapplication designers may wish to consider this facility where dynamictask deletion is a possibility.The sigLib facility may also be used to allow a task toexecute clean-up code before actually expiring.TASK CONTROLTasks are manipulated by means of an ID that is returned when a task iscreated.  VxWorks uses the convention that specifying a task ID of NULLin a task control function signifies the calling task.The following routines control task state:  taskResume(), taskSuspend(),taskDelay(), taskRestart(), taskPrioritySet(), and taskRegsSet().TASK SCHEDULINGVxWorks schedules tasks on the basis of priority.  Tasks may havepriorities ranging from 0, the highest priority, to 255, the lowestpriority.  The priority of a task in VxWorks is dynamic, and an existingtask's priority can be changed using taskPrioritySet().INTERNAL:	WINDVIEW INSTRUMENTATIONLevel 1:	taskInit() causes EVENT_TASKSPAWN	taskDestroy() causes EVENT_TASKDESTROY	taskSuspend() causes EVENT_TASKSUSPEND	taskResume() causes EVENT_TASKRESUME	taskPrioritySet() causes EVENT_TASKPRIORITYSET	taskUnsafe() causes EVENT_TASKUNSAFELevel 2:	taskDestroy() causes EVENT_OBJ_TASK	taskUnlock() causes EVENT_OBJ_TASK	taskUnsafe() causes EVENT_OBJ_TASKLevel 3:	taskInit() causes EVENT_TASKNAME	taskUnlock() causes EVENT_TASKUNLOCKINCLUDE FILES: taskLib.hSEE ALSO: `taskInfo', taskShow, taskHookLib, taskVarLib, semLib, semMLib, kernelLib,.pG "Basic OS"*/#include "vxWorks.h"#include "errno.h"#include "semLib.h"#include "string.h"#include "regs.h"#include "intLib.h"#include "taskArchLib.h"#include "stdio.h"#include "memLib.h"#include "qFifoGLib.h"#include "sysLib.h"		/* CPU==SIM* */#include "private/eventLibP.h"#include "private/sigLibP.h"#include "private/classLibP.h"#include "private/objLibP.h"#include "private/smObjLibP.h"#include "private/smFixBlkLibP.h"#include "private/taskLibP.h"#include "private/kernelLibP.h"#include "private/workQLibP.h"#include "private/windLibP.h"#include "private/eventP.h"/* locals */LOCAL OBJ_CLASS	taskClass;			/* task object class */LOCAL int	nameForNameless;		/* name for nameless tasks */LOCAL BOOL	taskLibInstalled;		/* protect from double inits *//* globals */FUNCPTR		smObjTcbFreeRtn;		/* shared TCB free routine */FUNCPTR		smObjTcbFreeFailRtn;		/* shared TCB free fail rtn */FUNCPTR		smObjTaskDeleteFailRtn;		/* windDelete free fail rtn */FUNCPTR		taskBpHook;			/* hook for VX_UNBREAKABLE */FUNCPTR		taskCreateTable   [VX_MAX_TASK_CREATE_RTNS + 1];FUNCPTR		taskSwitchTable   [VX_MAX_TASK_SWITCH_RTNS + 1];FUNCPTR 	taskDeleteTable   [VX_MAX_TASK_DELETE_RTNS + 1];FUNCPTR 	taskSwapTable     [VX_MAX_TASK_SWAP_RTNS   + 1];int		taskSwapReference [VX_MAX_TASK_SWAP_RTNS   + 1];WIND_TCB *	taskIdCurrent;				/* current task ID */CLASS_ID	taskClassId   		= &taskClass;	/* task class ID */char *		namelessPrefix		= "t";		/* nameless prefix */char *		restartTaskName		= "tRestart";	/* restart name */int		restartTaskPriority	= 0;		/* restart priority */int		restartTaskStackSize	= 6000;		/* default stack size */int		restartTaskOptions	= VX_NO_STACK_FILL | VX_UNBREAKABLE;BOOL		taskPriRangeCheck	= TRUE; /* limit priorities to 0-255 */WIND_TCB *	pTaskLastFpTcb          = NULL; /* pTcb for fppSwapHook */WIND_TCB *	pTaskLastDspTcb         = NULL; /* pTcb for dspSwapHook */#ifdef _WRS_ALTIVEC_SUPPORTWIND_TCB *      pTaskLastAltivecTcb     = NULL; /* pTcb for altivecSwapHook */#endif  /* _WRS_ALTIVEC_SUPPORT */#ifdef _WRS_SPE_SUPPORTWIND_TCB *      pTaskLastSpeTcb     = NULL; /* pTcb for speSwapHook */#endif  /* _WRS_SPE_SUPPORT */#ifdef WV_INSTRUMENTATION/* instrumentation declarations */LOCAL OBJ_CLASS taskInstClass;			/* task object class */CLASS_ID 	taskInstClassId 	= &taskInstClass; /* instrumented task */#endif/* forward declarations */int		taskCreat ();WIND_TCB *	taskTcb ();			/* get pTcb from tid *//********************************************************************************* taskLibInit - initialize kernel task library** INTERNAL* Tasks are a class of object in VxWorks.  This routine initializes the task* task class object.  Once initialized, tasks can be created/deleted/etc via* objLib.  No other task related routine may be executed prior to the call* to this routine.  The sizeof the WIND_TCB is goosed up by 16 bytes* bytes so we can protect the starting portion of a task's tcb during * deletion, in the case of STACK_GROWS_UP, or a portion of the top of the * task's top of stack in the case of STACK_GROWS_DOWN.  This portion is * clobbered with a FREE_BLOCK during objFree().** NOMANUAL*/STATUS taskLibInit (void)    {    if ((!taskLibInstalled) &&        (classInit (taskClassId, STACK_ROUND_UP(sizeof(WIND_TCB) + 16),                    OFFSET(WIND_TCB, objCore), (FUNCPTR) taskCreat,                    (FUNCPTR) taskInit, (FUNCPTR) taskDestroy) == OK))        {#ifdef WV_INSTRUMENTATION	taskClassId->initRtn = taskInstClassId;	classInstrument (taskClassId, taskInstClassId);#endif        taskLibInstalled = TRUE;        }    return ((taskLibInstalled) ? OK : ERROR);    }/********************************************************************************

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲午夜激情av| 国产精品综合视频| 欧美撒尿777hd撒尿| 亚洲国产视频一区| 日韩视频中午一区| 精品一区精品二区高清| 久久久久久久久久久电影| 成人福利视频网站| 亚洲激情综合网| 欧美日韩国产不卡| 韩国一区二区三区| 自拍偷自拍亚洲精品播放| 99久久久精品| 黄色小说综合网站| 国产精品美女久久久久久久久| 成人h动漫精品一区二区 | 欧美一区二区在线视频| 麻豆精品新av中文字幕| 中日韩av电影| 欧美日韩在线直播| 国产主播一区二区三区| 亚洲欧美另类久久久精品2019| 欧美日韩国产综合草草| 国产毛片一区二区| 亚洲电影第三页| 久久色.com| 欧美午夜不卡在线观看免费| 国产曰批免费观看久久久| 亚洲男人的天堂一区二区| 日韩视频一区二区| 91无套直看片红桃| 美女www一区二区| 尤物在线观看一区| 国产午夜精品一区二区三区嫩草 | 色香蕉久久蜜桃| 亚洲日本免费电影| 成人黄色电影在线| 亚洲欧美福利一区二区| 色综合久久88色综合天天免费| 不卡的av中国片| 亚洲特黄一级片| 成人美女视频在线观看| 久久蜜臀精品av| 久国产精品韩国三级视频| 日韩一区二区三区免费观看| 成人深夜福利app| 91麻豆国产精品久久| 日本亚洲免费观看| 欧美精品三级在线观看| 亚洲天堂免费在线观看视频| 黄色精品一二区| 综合电影一区二区三区| 精品国产91久久久久久久妲己| 91福利在线观看| 成人av电影在线播放| 国产自产高清不卡| 男女男精品视频| 性感美女久久精品| 亚洲综合一区二区三区| 国产精品大尺度| 国模大尺度一区二区三区| 日韩免费视频线观看| 成人中文字幕在线| 国产综合久久久久影院| 久久精品国产秦先生| 日日欢夜夜爽一区| 性做久久久久久免费观看欧美| 亚洲精品中文字幕在线观看| 国产精品视频一二三| 国产三级精品视频| 国产日本一区二区| 国产视频在线观看一区二区三区| 精品蜜桃在线看| 精品国产91亚洲一区二区三区婷婷| 欧美一级二级三级蜜桃| 日韩一区二区在线看片| 成人av网站免费| 成人av网址在线| 99国产精品99久久久久久| 91丨九色丨国产丨porny| 99久久99久久精品免费观看| 95精品视频在线| 在线日韩av片| 欧美日韩久久久| 91精品中文字幕一区二区三区| 国产精品毛片高清在线完整版| 日韩免费一区二区| youjizz国产精品| 99v久久综合狠狠综合久久| 91久久精品一区二区三区| 男男成人高潮片免费网站| 看片网站欧美日韩| 韩日精品视频一区| 99视频精品在线| 在线观看av不卡| 日韩午夜av电影| 中文字幕av免费专区久久| 亚洲精品国产一区二区精华液| 午夜国产精品一区| 成人高清在线视频| 色播五月激情综合网| 91麻豆精品国产91久久久久久久久| 26uuu精品一区二区| 国产精品私房写真福利视频| 亚洲乱码日产精品bd| 蜜桃视频第一区免费观看| 国产精品911| 欧日韩精品视频| 日韩欧美一级二级三级久久久| 中文字幕av不卡| 婷婷丁香久久五月婷婷| 国产福利一区在线| 欧美影院一区二区| 精品久久人人做人人爽| 亚洲伦理在线免费看| 久久精品国产精品亚洲综合| 91色porny| 久久蜜桃av一区精品变态类天堂| 亚洲欧洲在线观看av| 轻轻草成人在线| 97se亚洲国产综合自在线| 日韩精品中文字幕一区二区三区 | 波多野结衣欧美| 欧美日韩精品免费观看视频| 成人av免费在线| 久久久亚洲国产美女国产盗摄| 亚洲午夜免费电影| 国产毛片精品一区| 91精品在线麻豆| 亚洲一区二区av电影| 成人v精品蜜桃久久一区| 欧美日韩精品欧美日韩精品| 日韩一级完整毛片| 国产精品成人在线观看| 一区二区三区不卡视频| 亚洲人成网站精品片在线观看 | 国产精品成人网| 日韩电影在线免费看| 成人av第一页| 久久精品欧美一区二区三区麻豆 | 久久91精品国产91久久小草| 欧美在线高清视频| 日韩美女啊v在线免费观看| 国产美女视频91| 91影院在线观看| 国产日韩欧美综合在线| 中文欧美字幕免费| 日韩精品久久理论片| 欧美日韩亚洲丝袜制服| 1区2区3区精品视频| 欧美午夜精品一区| 中文字幕在线视频一区| 精品一区二区三区视频在线观看| 日本韩国精品在线| 亚洲免费观看视频| 91视频精品在这里| 国产精品色一区二区三区| 国产在线不卡一区| 欧美成人a∨高清免费观看| 免播放器亚洲一区| 4438x亚洲最大成人网| 亚洲大尺度视频在线观看| 欧洲精品在线观看| 亚洲天堂成人在线观看| 91蝌蚪porny九色| 一区在线观看免费| 色婷婷精品久久二区二区蜜臀av| 国产精品超碰97尤物18| 99视频在线观看一区三区| 亚洲色图制服诱惑| 欧美性淫爽ww久久久久无| 一二三区精品视频| 欧美日韩精品三区| 日韩电影免费在线观看网站| 日韩一区二区高清| 激情欧美日韩一区二区| 精品国产a毛片| 成人一区二区三区在线观看| 国产精品久久久久影院老司 | 99re这里都是精品| 一区二区激情视频| 91精品国产欧美一区二区| 免费在线看成人av| 久久久91精品国产一区二区精品| 粉嫩一区二区三区性色av| 中文字幕一区二区三区在线观看 | 丝袜诱惑制服诱惑色一区在线观看| 欧美欧美午夜aⅴ在线观看| 青青草原综合久久大伊人精品| 欧美v日韩v国产v| 国产69精品久久久久毛片| 亚洲人成影院在线观看| 91浏览器在线视频| 日日夜夜一区二区| 国产女同互慰高潮91漫画| 一本一道久久a久久精品| 日本亚洲欧美天堂免费| 国产免费观看久久| 欧美日韩另类国产亚洲欧美一级| 精品一区二区三区在线播放视频 |