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

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

?? winddemo.c

?? IXP425的BSP代碼
?? C
字號:
/* windDemo - repeatedly test various kernel function *//*modification history--------------------02d,28apr99,jrp  upped stack size to make it run on sparc ss5 etc.02c,23aug93,jcf  fixed synchronization.02b,01aug93,dvs  fixed loop count printing.02a,18mar93,dvs  took out timer/benchmark information.                 ansified code.		 general cleanup of code to use as MicroWorks demo.01a,12nov90,shl  written.*//*DESCRIPTIONThis program repeatedly exercises different kernel facilities of the Wind kernel.The functions involved include the use of semaphores as sychronizationand mutual exclusion primitives, the use of taskSuspend()/taskResume() for task control, the use of message queues for communication and the use of watchdogs for task timeouts.To exercise these kernel facilities two tasks are used, a high priority task and a low priority task. The high priority task executes functionswith which the resources are not available. As the high prioritytask blocks, the low priority task takes over and makes availablethe resources that the high priority task is waiting for. This maysound simple at first but the underlying execution of this test programinvolves context switching, rescheduling of tasks, and shuffling ofthe ready queue, pend queue, and the timer queue.These functions are chosen because they are the most commonly usedfunctions in sychronization, mutual exclusion, task control, inter-taskcommunication and timer facilities. These are the basic building blocks ofthe operating system itself and also used in applications.  Repeatedlyexecution of this "death loop" is a good indication of how the system willperform in real-life as these functions are utiltized heavily in everyapplication.The following is the thread of execution of this test program.	     Higher Priority	   	Lower Priority		  Task1			    Task2	     ===============            ==============		  |		  V	/----->	semGive()	|	semTake()	|	  |	|	  V	|	semTake()	|	  \	|	   \		|	    \------------->	   semGive()	|				       /	|				      /	|	taskSuspend()  <-------------/	|	  \	|	   \	|	    \------------->	   taskResume()	|				       /	|				      /	|	msgQSend()     <-------------/	|	msgQReceive()	|	  |	|	  V	|	msgQReceive()	|	  \	|	   \		|	    \------------->	   msgQSend()	|				       /	|				      /    	|	wdStart()      <-------------/     	|	wdCancel()        \---------|		  V		exit           		  \		   \			    \------------->	   exit*/#include "vxWorks.h"#include "semLib.h"#include "taskLib.h"#include "msgQLib.h"#include "wdLib.h"#include "logLib.h"#include "tickLib.h"#include "sysLib.h"#include "stdio.h"/* defines */#if FALSE#define STATUS_INFO			/* define to allow printf() calls */#endif#define MAX_MSG		1		/* max number of messages in queue */#define MSG_SIZE	sizeof (MY_MSG)	/* size of message */#define DELAY		100		/* 100 ticks */#define	HIGH_PRI	150		/* priority of high priority task */#define LOW_PRI		200		/* priority of low priority task */#define TASK_HIGHPRI_TEXT	"Hello from the 'high priority' task"#define TASK_LOWPRI_TEXT	"Hello from the 'low priority' task"/* typedefs */typedef struct my_msg	{	int    childLoopCount;		/* loop count in task sending msg */	char * buffer;			/* message text */	} MY_MSG;/* globals */SEM_ID		semId;			/* semaphore ID */MSG_Q_ID	msgQId;			/* message queue ID */WDOG_ID		wdId;			/* watchdog ID */int		highPriId;		/* task ID of high priority task */int		lowPriId;		/* task ID of low priority task */int		windDemoId;		/* task ID of windDemo task *//* forward declarations */LOCAL void taskHighPri (int iteration);LOCAL void taskLowPri (int iteration);/********************************************************************************* windDemo - parent task to spawn children ** This task calls taskHighPri() and taskLowPri() to do the* actual operations of the test and suspends itself.* Task is resumed by the low priority task.**/void windDemo     (    int iteration			/* number of iterations of child code */    )    {    int loopCount = 0; 			/* number of times through windDemo */#ifdef	STATUS_INFO    printf ("Entering windDemo\n");#endif /* STATUS_INFO */    if (iteration == 0)			/* set default to 10,000 */	iteration = 10000;    /* create objects used by the child tasks */    msgQId	= msgQCreate (MAX_MSG, MSG_SIZE, MSG_Q_FIFO);    semId	= semBCreate (SEM_Q_PRIORITY, SEM_FULL);    wdId	= wdCreate ();    windDemoId = taskIdSelf ();    FOREVER	{	/* spawn child tasks to exercise kernel routines */    	highPriId = taskSpawn ("tHighPri", HIGH_PRI, VX_SUPERVISOR_MODE, 4000, 			   (FUNCPTR) taskHighPri, iteration,0,0,0,0,0,0,0,0,0);    	lowPriId = taskSpawn ("tLowPri", LOW_PRI, VX_SUPERVISOR_MODE, 4000, 			   (FUNCPTR) taskLowPri, iteration,0,0,0,0,0,0,0,0,0);    	taskSuspend (0);		/* to be waken up by taskLowPri */ #ifdef	STATUS_INFO    	printf ("\nParent windDemo has just completed loop number %d\n",		loopCount);#endif /* STATUS_INFO */    	loopCount++;	}    }/********************************************************************************* taskHighPri - high priority task** This tasks exercises various kernel functions. It will block if the* resource is not available and relingish the CPU to the next ready task.**/LOCAL void taskHighPri     (    int iteration			/* number of iterations through loop */    )    {    int    ix;				/* loop counter */    MY_MSG msg;				/* message to send */    MY_MSG newMsg;			/* message to receive */    for (ix = 0; ix < iteration; ix++)	{	/* take and give a semaphore - no context switch involved */	semGive (semId);			semTake (semId, 100);		/* semTake with timeout */	/* 	 * take semaphore - context switch will occur since semaphore 	 * is unavailable 	 */	semTake (semId, WAIT_FOREVER);	/* semaphore not available */	taskSuspend (0);		/* suspend itself */	/* build message and send it */	msg.childLoopCount = ix;	msg.buffer = TASK_HIGHPRI_TEXT;	msgQSend (msgQId, (char *) &msg, MSG_SIZE, 0, MSG_PRI_NORMAL);	/* 	 * read message that this task just sent and print it - no context 	 * switch will occur since there is a message already in the queue 	 */	msgQReceive (msgQId, (char *) &newMsg, MSG_SIZE, NO_WAIT);#ifdef	STATUS_INFO	printf ("%s\n Number of iterations is %d\n", 		newMsg.buffer, newMsg.childLoopCount);#endif /* STATUS_INFO */	/* 	 * block on message queue waiting for message from low priority task 	 * context switch will occur since there is no message in the queue	 * when message is received, print it 	 */	msgQReceive (msgQId, (char *) &newMsg, MSG_SIZE, WAIT_FOREVER);#ifdef	STATUS_INFO	printf ("%s\n Number of iterations by this task is: %d\n", 		newMsg.buffer, newMsg.childLoopCount);#endif /* STATUS_INFO */	/* test watchdog timer */	wdStart (wdId, DELAY, (FUNCPTR) tickGet, 1); 	wdCancel (wdId);	}    }/********************************************************************************* taskLowPri - low priority task** This task runs at a lower priority and is designed to make available* the resouces that the high priority task is waiting for and subsequently* unblock the high priority task.**/LOCAL void taskLowPri     (    int iteration			/* number of times through loop */    )    {    int    ix;				/* loop counter */    MY_MSG msg;				/* message to send */    for (ix = 0; ix < iteration; ix++)	{	semGive (semId);		/* unblock tHighPri */	taskResume (highPriId);		/* unblock tHighPri */	/* build message and send it */	msg.childLoopCount = ix;	msg.buffer = TASK_LOWPRI_TEXT;	msgQSend (msgQId, (char *) &msg, MSG_SIZE, 0, MSG_PRI_NORMAL);	taskDelay (60);	}    taskResume (windDemoId);		/* wake up the windDemo task */    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
粉嫩绯色av一区二区在线观看| 日韩电影免费在线| 欧美成人一区二区三区| 日韩美女视频在线| 欧美日韩国产免费一区二区 | 亚洲精品第1页| 国产精品九色蝌蚪自拍| 国产精品网站一区| 国产精品久久久久久久第一福利| 久久精品夜色噜噜亚洲a∨| 国产日产精品一区| 中文字幕va一区二区三区| 国产精品嫩草影院com| 国产精品网站在线| 一区二区免费看| 日韩va欧美va亚洲va久久| 免费精品99久久国产综合精品| 免费观看久久久4p| 国产精品18久久久久久久久久久久| 国产一区在线观看麻豆| 成人av午夜电影| 欧美性欧美巨大黑白大战| 欧美日韩美少妇| xvideos.蜜桃一区二区| 国产精品视频一二三| 亚洲国产三级在线| 人妖欧美一区二区| 国产九九视频一区二区三区| 99精品视频在线免费观看| 色菇凉天天综合网| 日韩一二三区不卡| 欧美激情综合在线| 一区二区在线观看免费视频播放| 日本一不卡视频| 国产精品一区免费视频| 91福利国产成人精品照片| 欧美一区二区性放荡片| 中文字幕乱码日本亚洲一区二区| 亚洲六月丁香色婷婷综合久久 | 国产三区在线成人av| 中文字幕日韩精品一区| 日韩电影免费一区| 成人高清视频在线| 欧美一区二区三级| 1000部国产精品成人观看| 热久久一区二区| 成人午夜看片网址| 在线电影院国产精品| 中文字幕av在线一区二区三区| 亚洲www啪成人一区二区麻豆| 精品一区免费av| 亚洲少妇屁股交4| 免费成人结看片| 91原创在线视频| 国产午夜精品久久久久久久 | 欧美一级高清大全免费观看| 国产精品护士白丝一区av| 欧美aⅴ一区二区三区视频| 色婷婷综合激情| 中文字幕成人在线观看| 国产在线精品免费| 国产午夜精品一区二区三区视频| 偷拍日韩校园综合在线| 91福利国产成人精品照片| 中文字幕国产一区| 久久99国产精品久久99| 3d动漫精品啪啪1区2区免费| 亚洲激情第一区| 91麻豆6部合集magnet| 欧美激情资源网| 国产91精品一区二区麻豆亚洲| 欧美一级一区二区| 日韩va欧美va亚洲va久久| 欧美伦理视频网站| 日韩中文字幕av电影| 欧美中文字幕亚洲一区二区va在线| 亚洲欧美自拍偷拍| 97成人超碰视| 亚洲最大色网站| 91久久人澡人人添人人爽欧美| 亚洲人123区| 欧美亚男人的天堂| 亚洲一区二区欧美| 69av一区二区三区| 久久9热精品视频| 久久久久亚洲蜜桃| 粉嫩欧美一区二区三区高清影视| 欧美国产精品专区| 色综合天天综合网国产成人综合天| 亚洲欧美视频在线观看视频| 日本高清成人免费播放| 亚洲bt欧美bt精品| 欧美一区二视频| 国产一区二区精品久久99| 国产色一区二区| 99精品在线免费| 亚洲成人综合视频| 日韩一区二区三区视频在线| 麻豆国产精品一区二区三区| 2023国产精品自拍| caoporn国产精品| 亚洲国产综合色| 欧美一区二区三区四区视频| 国产剧情av麻豆香蕉精品| 亚洲欧美日韩中文字幕一区二区三区 | 黄色资源网久久资源365| 2023国产精华国产精品| 99国产精品久久久| 丝袜亚洲另类欧美综合| 久久久久9999亚洲精品| 91免费国产在线观看| 亚洲一区二区三区免费视频| 精品女同一区二区| 在线免费视频一区二区| 久久99国产精品成人| 亚洲日本丝袜连裤袜办公室| 欧美xxxxxxxxx| 色视频欧美一区二区三区| 老司机一区二区| 中文字幕日韩av资源站| 日韩一区二区三区高清免费看看 | 国产精品夫妻自拍| 欧美精品色综合| 成人av电影免费观看| 亚洲成人av资源| 亚洲视频免费看| 欧美tk丨vk视频| 久久久夜色精品亚洲| 欧美在线不卡视频| av在线不卡电影| 韩国精品主播一区二区在线观看 | 欧美放荡的少妇| 色呦呦国产精品| 美女视频黄久久| 亚洲少妇屁股交4| 国产精品18久久久久久久久久久久| 免费成人av资源网| 激情成人综合网| 9l国产精品久久久久麻豆| av中文字幕一区| 欧美日韩另类一区| 欧美电影免费观看高清完整版在线 | 欧美片网站yy| 日韩欧美综合一区| 国产欧美日韩在线看| 亚洲欧洲中文日韩久久av乱码| 一区二区三区中文在线| 水野朝阳av一区二区三区| 国产综合色精品一区二区三区| 成人免费看视频| 欧美日韩一区高清| 久久久久久一二三区| 一区二区三区在线免费播放| 麻豆国产精品一区二区三区| 国产成人av电影在线观看| 91丨九色丨黑人外教| 4438成人网| 中文字幕一区二区视频| 亚洲1区2区3区4区| 国产精品888| 欧美日韩国产精选| 国产精品全国免费观看高清| 成人午夜又粗又硬又大| 在线不卡免费av| 国产精品视频线看| 久久99久久久久久久久久久| 91视频免费观看| 国产亚洲欧美一级| 青草av.久久免费一区| 91麻豆国产精品久久| 久久久欧美精品sm网站 | 国产精品久久久久久久浪潮网站 | 日韩一区中文字幕| 国产九色sp调教91| 91精品国产综合久久福利| 亚洲欧美自拍偷拍| 国产风韵犹存在线视精品| 欧美老年两性高潮| 亚洲欧美经典视频| 国产电影精品久久禁18| 欧美大片一区二区| 日韩影院免费视频| 色激情天天射综合网| 中文字幕一区二区在线播放 | 亚洲一区二区三区美女| 99久久国产免费看| 亚洲国产精品成人综合| 国产一区二区精品久久| 欧美成人r级一区二区三区| 日韩在线一区二区| 欧美日韩免费电影| 午夜伦理一区二区| 国产精品久久久久久亚洲伦 | 欧美一级二级三级乱码| 午夜免费久久看| 欧美日韩黄色一区二区| 亚洲成人先锋电影| 在线看日本不卡| 午夜一区二区三区视频| 欧美三级一区二区|