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

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

?? taskvarlib.c

?? VxWorks操作系統內核源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* taskVarLib.c - task variables support library *//* Copyright 1984-2003 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------02a,14jan03,pcm  add intLock()/intUnlock() around taskVarAdd() critical code01z,21jan93,jdi  documentation cleanup for 5.1.01y,02oct92,jcf  added task validity check to switch hook.01x,18jul92,smb  changed errno.h to errnoLib.h.01w,07jul92,ajm  removed unnecesary cacheClear calls for 04001v,04jul92,jcf  scalable/ANSI/cleanup effort.01u,03jul92,jwt  converted cacheClearEntry() calls to cacheClear() for 5.1.01t,26may92,rrr  the tree shuffle01s,21dec91,gae  added includes for ANSI.01r,19nov91,rrr  shut up some ansi warnings.01q,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -fixed #else and #endif		  -changed VOID to void		  -changed copyright notice01p,27aug91,shl  added cache coherency calls for MC68040 support.01o,220may1,jdi	 documentation tweak.01n,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.01m,24mar91,jdi  documentation cleanup.01l,01oct90,jcf  added taskVarInfo().01k,01aug90,jcf  changed tcb taskVar to pTaskVar.		 added include of taskVarLib.h.01j,19jul90,dnw  mangen fix01i,14apr90,jcf  removed tcb extension dependencies.01h,14mar90,jdi  documentation cleanup.01g,08apr89,dnw  added taskVarInit().01f,17aug88,gae  documentation.01d,22jun88,dnw  name tweaks.01c,30may88,dnw  changed to v4 names.01b,08apr88,gae  added taskId parm. to taskVar{Add,Del}();		 made taskVar{Get,Set}() work with active task.		 Fixed fatal bug in taskVarDel() of not replacing bg value.		 Added taskVarDeleteHook() to cleanup after tasks.		 Lint. Documentation.01a,25jan88,jcf  written by extracting from vxLib.c.*//*DESCRIPTIONVxWorks provides a facility called "task variables," which allows4-byte variables to be added to a task's context, and thevariables' values to be switched each time a task switch occurs to orfrom the calling task.  Typically, several tasks declare the samevariable (4-byte memory location) as a task variable and treat thatmemory location as their own private variable.  For example, thisfacility can be used when a routine must be spawned more than once asseveral simultaneous tasks.The routines taskVarAdd() and taskVarDelete() are used to add or deletea task variable.  The routines taskVarGet() and taskVarSet() are used to getor set the value of a task variable.NOTEIf you are using task variables in a task delete hook(see taskHookLib), refer to the manual entry for taskVarInit()for warnings on proper usage.INCLUDE FILES: taskVarLib.hSEE ALSO: taskHookLib,.pG "Basic OS"*//* LINTLIBRARY */#include "vxWorks.h"#include "stdlib.h"#include "taskHookLib.h"#include "taskVarLib.h"#include "taskLib.h"#include "errnoLib.h"#include "intLib.h"/* forward static functions */static void taskVarDeleteHook (WIND_TCB *pTcb);static void taskVarSwitchHook (WIND_TCB *pOldTcb, WIND_TCB *pNewTcb);/********************************************************************************* taskVarInit - initialize the task variables facility** This routine initializes the task variables facility.  It installs task* switch and delete hooks used for implementing task variables.* If taskVarInit() is not called explicitly, taskVarAdd() will call it* automatically when the first task variable is added.** After the first invocation of this routine, subsequent invocations* have no effect.** WARNING* Order dependencies in task delete hooks often involve* task variables.  If a facility uses task variables and has a* task delete hook that expects to use those task variables,* the facility's delete hook must run before the task* variables' delete hook.  Otherwise, the task variables* will be deleted by the time the facility's delete hook runs.** VxWorks is careful to run the delete hooks in reverse of the order in* which they were installed.  Any facility that has a delete hook that will* use task variables can guarantee proper ordering by calling taskVarInit()* before adding its own delete hook.** Note that this is not an issue in normal use of task variables.  The issue* only arises when adding another task delete hook that uses task variables.** Caution should also be taken when adding task variables from within* create hooks.  If the task variable package has not been installed via* taskVarInit(), the create hook attempts to create a create hook, and that* may cause system failure.  To avoid this situation, taskVarInit() should* be called during system initialization from the root task, usrRoot(), in* usrConfig.c.** RETURNS: OK, or ERROR if the task switch/delete hooks could not be installed.*/STATUS taskVarInit (void)    {    static BOOL taskVarInstalled = FALSE;	/* TRUE = facility installed */    /* if task variables facility is not already installed, then install it     * by adding the switch and delete hooks     */    if (!taskVarInstalled)	{	if ((taskSwitchHookAdd ((FUNCPTR)taskVarSwitchHook) != OK) ||	    (taskDeleteHookAdd ((FUNCPTR)taskVarDeleteHook) != OK))	    {	    return (ERROR);	    }	taskVarInstalled = TRUE;	}    return (OK);    }/********************************************************************************* taskVarDeleteHook - delete task variables of exiting tasks** This routine is the task delete routine that deletes all task* variables of an exiting task.*/LOCAL void taskVarDeleteHook    (    WIND_TCB *pTcb    )    {    FAST TASK_VAR *pTaskVar;    FAST TASK_VAR *pTaskVarNext;    for (pTaskVar = pTcb->pTaskVar;	 pTaskVar != NULL;	 pTaskVar = pTaskVarNext)	{	pTaskVarNext = pTaskVar->next;	free ((char *)pTaskVar);	/* free storage of deleted cell */	}    }/********************************************************************************* taskVarSwitchHook - switch task variables of switching tasks** This routine is the task switch routine that implements the task variable* facility.  It swaps the current and saved values of all the task variables* of the out-going and in-coming tasks.*/LOCAL void taskVarSwitchHook    (    WIND_TCB *pOldTcb,    WIND_TCB *pNewTcb    )    {    FAST TASK_VAR *pTaskVar;    FAST int temp;    /* swap task variables of old task */    if (TASK_ID_VERIFY(pOldTcb) == OK)	/* suicide runs delete hook 1st */	{	for (pTaskVar = pOldTcb->pTaskVar;	     pTaskVar != NULL;	     pTaskVar = pTaskVar->next)	    {	    /* swap current and save value of task variable */	    temp = pTaskVar->value;	    pTaskVar->value = *(pTaskVar->address);	    *(pTaskVar->address) = temp;	    }	}    /* swap task variables of new task */    for (pTaskVar = pNewTcb->pTaskVar;	 pTaskVar != NULL;	 pTaskVar = pTaskVar->next)	{	/* swap current and save value of task variable */	temp = pTaskVar->value;	pTaskVar->value = *(pTaskVar->address);	*(pTaskVar->address) = temp;	}    }/********************************************************************************* taskVarAdd - add a task variable to a task** This routine adds a specified variable <pVar> (4-byte memory location) to a* specified task's context.  After calling this routine, the variable will* be private to the task.  The task can access and modify the variable, but* the modifications will not appear to other tasks, and other tasks'* modifications to that variable will not affect the value seen by the* task.  This is accomplished by saving and restoring the variable's initial* value each time a task switch occurs to or from the calling task.** This facility can be used when a routine is to be spawned repeatedly as* several independent tasks.  Although each task will have its own stack,* and thus separate stack variables, they will all share the same static and* global variables.  To make a variable \f2not\fP shareable, the routine can* call taskVarAdd() to make a separate copy of the variable for each task, but* all at the same physical address.** Note that task variables increase the task switch time to and from the* tasks that own them.  Therefore, it is desirable to limit the number of* task variables that a task uses.  One efficient way to use task variables * is to have a single task variable that is a pointer to a dynamically * allocated structure containing the task's private data.** EXAMPLE:* Assume that three identical tasks were spawned with a routine called* \f2operator()\f1.  All three use the structure OP_GLOBAL for all variables* that are specific to a particular incarnation of the task.  The following* code fragment shows how this is set up:** .CS* OP_GLOBAL *opGlobal;  /@ ptr to operator task's global variables @/** void operator*     (*     int opNum         /@ number of this operator task @/*     )*     {*     if (taskVarAdd (0, (int *)&opGlobal) != OK)*         {*         printErr ("operator%d: can't taskVarAdd opGlobal\en", opNum);*         taskSuspend (0);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜av一区二区三区| 欧美午夜理伦三级在线观看| 久久精品999| 欧美aaaaaa午夜精品| 亚洲成人精品在线观看| 亚洲成人免费看| 亚洲国产精品综合小说图片区| 中文字幕综合网| 亚洲免费三区一区二区| 亚洲欧美日韩中文播放 | 7777精品伊人久久久大香线蕉超级流畅| 97精品久久久久中文字幕| 99精品国产视频| 色av一区二区| 欧美伦理视频网站| 欧美一级一级性生活免费录像| 欧美一级免费观看| 精品嫩草影院久久| 久久久99精品免费观看不卡| 国产精品嫩草影院com| 亚洲欧美日韩小说| 亚洲国产精品久久久久婷婷884| 亚洲福利视频一区| 日韩高清在线不卡| 韩国av一区二区三区四区| 风间由美一区二区av101| 99re热视频精品| 欧美日韩在线播放一区| 欧美一级专区免费大片| 国产香蕉久久精品综合网| 亚洲欧洲日韩综合一区二区| 亚洲国产欧美日韩另类综合 | 国产欧美精品一区| 成人免费视频在线观看| 日韩成人av影视| 国产精品乡下勾搭老头1| 99riav久久精品riav| 欧美日韩国产影片| 久久久亚洲国产美女国产盗摄 | 五月婷婷色综合| 激情另类小说区图片区视频区| 国产成人午夜视频| 色狠狠色噜噜噜综合网| 欧美电视剧免费全集观看| 国产精品天干天干在线综合| 亚洲成av人片在www色猫咪| 国产制服丝袜一区| 色婷婷久久久久swag精品| 欧美不卡一区二区三区| 亚洲乱码一区二区三区在线观看| 日本在线观看不卡视频| 成人精品视频网站| 在线播放欧美女士性生活| 亚洲国产岛国毛片在线| 三级一区在线视频先锋 | 99久久久国产精品| 欧美精品少妇一区二区三区| 久久午夜免费电影| 亚洲午夜久久久久久久久电影院 | 欧美日韩一区二区三区四区五区 | 亚洲成人激情av| 国产成a人亚洲精品| 欧美猛男男办公室激情| 国产精品乱码久久久久久| 奇米综合一区二区三区精品视频| 91小视频在线| 久久亚洲私人国产精品va媚药| 亚洲成国产人片在线观看| aaa亚洲精品一二三区| 欧美成人a视频| 午夜精品久久久久久| 99精品一区二区| 久久久久国产成人精品亚洲午夜 | 色久优优欧美色久优优| 国产欧美日韩精品一区| 久久99久国产精品黄毛片色诱| 欧美亚州韩日在线看免费版国语版| 久久综合久久久久88| 日韩在线a电影| 91福利资源站| 亚洲视频一区在线| 粉嫩av一区二区三区粉嫩| 欧美电影免费观看高清完整版在 | 91视频在线看| 国产午夜精品一区二区三区视频 | 亚洲精品乱码久久久久久久久| 国产精品一区不卡| 欧美成人一级视频| 麻豆久久一区二区| 欧美精品精品一区| 亚洲成人福利片| 欧美在线不卡视频| 一区二区视频免费在线观看| 97精品久久久午夜一区二区三区 | 91高清视频免费看| 亚洲色图都市小说| 国产999精品久久久久久绿帽| 欧美大度的电影原声| 免费一级片91| 日韩午夜激情免费电影| 日韩不卡一区二区三区| 337p亚洲精品色噜噜狠狠| 亚洲国产中文字幕| 欧美日韩国产系列| 视频一区国产视频| 欧美一区二区大片| 日本不卡123| 精品久久免费看| 国产电影精品久久禁18| 国产日韩综合av| 成人免费三级在线| 亚洲人吸女人奶水| 欧美视频一区二区三区四区| 亚洲成人精品一区| 日韩视频免费直播| 黑人巨大精品欧美一区| 国产日韩欧美电影| 91蜜桃在线观看| 亚洲欧美色图小说| 欧美日韩精品一区二区在线播放| 日本一道高清亚洲日美韩| 欧美一区二区三区视频免费播放| 久久精品国产精品亚洲红杏| 久久亚洲欧美国产精品乐播| 北岛玲一区二区三区四区| 亚洲免费在线观看视频| 91.成人天堂一区| 激情综合色丁香一区二区| 国产日韩欧美在线一区| 一本一道久久a久久精品| 亚洲第一搞黄网站| 欧美精品一区二区高清在线观看| 国产成人精品免费网站| 亚洲天堂网中文字| 欧美一区二区在线观看| 老司机一区二区| 中文字幕日韩av资源站| 欧美三级视频在线播放| 精品在线播放午夜| 136国产福利精品导航| 777a∨成人精品桃花网| 国产精品影音先锋| 亚洲精品伦理在线| 精品国产乱子伦一区| av成人老司机| 免费在线成人网| 最近中文字幕一区二区三区| 制服丝袜av成人在线看| 东方aⅴ免费观看久久av| 亚洲午夜在线视频| 久久久午夜精品理论片中文字幕| 在线亚洲一区观看| 国产真实乱偷精品视频免| 亚洲伦在线观看| 精品国产一区a| 在线观看av不卡| 国产一区二区三区免费看| 亚洲一区二区视频在线观看| 2023国产一二三区日本精品2022| 色婷婷亚洲婷婷| 国产成人综合在线观看| 亚洲丶国产丶欧美一区二区三区| 国产日韩欧美综合一区| 3atv在线一区二区三区| 91蜜桃免费观看视频| 精品一区二区在线播放| 亚洲午夜激情网页| 中文字幕一区二区三区精华液 | 欧美韩国日本不卡| 91.xcao| 91视频你懂的| 国产精一区二区三区| 午夜精品在线看| 亚洲美女视频一区| 国产视频911| 日韩天堂在线观看| 欧美亚洲国产怡红院影院| proumb性欧美在线观看| 狠狠色综合日日| 午夜欧美大尺度福利影院在线看| 亚洲欧美自拍偷拍| 久久一二三国产| 日韩欧美123| 欧美精品 国产精品| 91福利视频网站| 成人动漫一区二区三区| 激情综合网av| 美女一区二区三区在线观看| 亚洲一区二区三区四区在线 | 国内欧美视频一区二区| 日韩精品午夜视频| 亚洲一区二区三区免费视频| 中文字幕欧美一| 亚洲欧洲精品一区二区三区| 久久久精品tv| 久久蜜桃一区二区| 26uuu精品一区二区| 精品日韩一区二区三区| 精品日本一线二线三线不卡| 日韩美女视频一区二区在线观看|