亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
中文字幕一区二区在线观看| 精品久久久久久久久久久久包黑料 | www.欧美.com| 国产成人在线观看| 国产原创一区二区| 国产电影一区在线| 成人在线一区二区三区| 成人性色生活片| 97精品视频在线观看自产线路二| av中文一区二区三区| 91美女视频网站| 色综合一个色综合| 欧美视频精品在线观看| 欧美电影影音先锋| 精品日韩一区二区三区免费视频| 精品久久久久久久久久久久久久久久久| 日韩一区二区三区免费看| 日韩色在线观看| 国产午夜亚洲精品午夜鲁丝片| 中文av一区特黄| 一区二区三区精品视频| 琪琪久久久久日韩精品| 国产一区二区三区综合| 99re视频精品| 91精品国产综合久久久久久久 | 欧洲亚洲精品在线| 91精品国产综合久久久久久漫画 | 国产精品嫩草影院av蜜臀| 亚洲四区在线观看| 日本不卡一区二区三区| 国产成人精品免费| 欧美日韩在线播| 久久色视频免费观看| 亚洲男女一区二区三区| 捆绑调教一区二区三区| 欧美日韩一二三区| 久久亚洲影视婷婷| 一区二区三区日韩精品| 国产麻豆欧美日韩一区| 91久久一区二区| 26uuu另类欧美亚洲曰本| 亚洲激情自拍偷拍| 国产成人亚洲综合a∨婷婷| 欧美在线观看一区| 久久伊人蜜桃av一区二区| 亚洲精品久久久蜜桃| 国产麻豆成人精品| 欧美日韩午夜在线| 国产精品福利av| 国产乱码精品一品二品| 欧美精品亚洲二区| 亚洲免费av高清| 国产一区中文字幕| 欧美一区二区视频观看视频| 亚洲欧洲制服丝袜| 成人动漫精品一区二区| 日韩视频在线你懂得| 亚洲中国最大av网站| 成人不卡免费av| 久久久久9999亚洲精品| 久久99精品久久久| 欧美一区二区三区在| 亚洲综合在线五月| 91视频国产资源| 国产精品久久久久久久久免费丝袜 | 国产精品欧美极品| 国产一区二区在线影院| 欧美一区二视频| 青青草成人在线观看| 4438x成人网最大色成网站| 亚洲欧美乱综合| 99re热视频精品| 18成人在线视频| 色婷婷久久99综合精品jk白丝| 国产精品久久久久久久久免费丝袜 | 蜜臂av日日欢夜夜爽一区| 欧美色图12p| 丝袜美腿亚洲一区二区图片| 欧美日韩精品欧美日韩精品一 | 国产婷婷精品av在线| 国产真实乱对白精彩久久| 欧美日韩国产美女| 综合激情网...| 99re热这里只有精品免费视频 | 免费亚洲电影在线| 在线观看91精品国产入口| 亚洲国产成人自拍| 国产91对白在线观看九色| 精品国产乱码久久久久久闺蜜| 日本人妖一区二区| 欧美性受极品xxxx喷水| 日韩激情视频在线观看| 制服丝袜成人动漫| 亚洲亚洲人成综合网络| 欧美人与禽zozo性伦| 午夜婷婷国产麻豆精品| 91福利在线看| 青青青伊人色综合久久| 日韩欧美aaaaaa| bt欧美亚洲午夜电影天堂| 亚洲欧洲99久久| 在线观看91精品国产入口| 亚洲一区在线播放| 欧美一区在线视频| 国产综合色产在线精品| 欧美日韩亚洲综合在线| 国产高清不卡一区| 亚洲色图制服诱惑| 欧美浪妇xxxx高跟鞋交| 免费亚洲电影在线| 久久久久97国产精华液好用吗| 成人毛片老司机大片| 亚洲欧美在线高清| 欧美一级片在线| 国产91精品在线观看| 亚洲免费看黄网站| 欧美一级高清大全免费观看| 国产精品一区一区三区| 亚洲精品国产一区二区精华液| 欧美老女人第四色| 国产经典欧美精品| 亚洲国产精品久久久久秋霞影院 | 精品毛片乱码1区2区3区| 丁香亚洲综合激情啪啪综合| 亚洲图片你懂的| 678五月天丁香亚洲综合网| 国产最新精品免费| 亚洲永久精品国产| 国产午夜精品久久| 精品国产免费一区二区三区四区| 成人黄色在线看| 日韩和的一区二区| 国产精品女同互慰在线看| 欧美一区二区三区日韩视频| 99久久国产综合色|国产精品| 亚洲精品乱码久久久久久| 国产精品国产a级| 精品久久人人做人人爰| 欧美午夜影院一区| 国产a久久麻豆| 亚洲精品写真福利| 91精选在线观看| 99久久er热在这里只有精品66| 精品亚洲成a人在线观看| 亚洲综合在线免费观看| 国产欧美精品一区aⅴ影院 | 亚洲视频一二区| 日韩一级二级三级精品视频| 91丨九色丨蝌蚪丨老版| 国产一区二区按摩在线观看| 亚洲成在线观看| 亚洲最大色网站| 国产精品卡一卡二| 国产精品国产三级国产有无不卡 | 中文字幕精品一区| 日韩欧美国产一区二区在线播放| 欧美在线观看你懂的| 在线一区二区三区四区五区| 国产成人av影院| 国产精品一区二区三区网站| 免费观看在线色综合| 亚洲国产日韩一级| 亚洲最大成人网4388xx| 国产精品丝袜一区| 亚洲欧美色综合| 亚洲日韩欧美一区二区在线| 国产精品卡一卡二卡三| 国产精品美女久久久久久久久| 国产午夜精品一区二区| 91精品国产综合久久小美女| 久久久亚洲精品石原莉奈| 精品少妇一区二区三区免费观看| 日韩一区二区三区四区五区六区 | 日韩欧美国产精品一区| 日韩精品一区二区三区中文精品| 日韩午夜小视频| 久久久久国产精品麻豆ai换脸| 欧美一区二区私人影院日本| 久久先锋影音av| 国产精品免费人成网站| 亚洲私人黄色宅男| 一区二区三区四区高清精品免费观看| 亚洲蜜桃精久久久久久久| 亚洲视频网在线直播| 日韩av在线发布| 国产高清视频一区| 91在线精品秘密一区二区| 色呦呦国产精品| 91麻豆精品国产自产在线| 日韩免费高清电影| 亚洲三级电影全部在线观看高清| 亚洲一区二区三区爽爽爽爽爽| 日韩电影在线看| 国产剧情一区在线| 91在线精品秘密一区二区| 91久久国产综合久久| 精品免费日韩av| 亚洲黄一区二区三区| 免费在线一区观看| 成人性色生活片免费看爆迷你毛片|