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

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

?? death.c

?? 最新版FreeRTOS, 包擴(kuò)多種開發(fā)平臺(tái)的移植
?? C
字號(hào):
/*
	FreeRTOS.org V4.1.1 - Copyright (C) 2003-2006 Richard Barry.

	This file is part of the FreeRTOS.org distribution.

	FreeRTOS.org is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.

	FreeRTOS.org is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with FreeRTOS.org; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

	A special exception to the GPL can be applied should you wish to distribute
	a combined work that includes FreeRTOS.org, without being obliged to provide
	the source code for any proprietary components.  See the licensing section
	of http://www.FreeRTOS.org for full details of how and when the exception
	can be applied.

	***************************************************************************
	See http://www.FreeRTOS.org for documentation, latest information, license
	and contact details.  Please ensure to read the configuration and relevant
	port sections of the online documentation.
	***************************************************************************
*/

/**
 * Create a single persistent task which periodically dynamically creates another
 * four tasks.  The original task is called the creator task, the four tasks it
 * creates are called suicidal tasks.
 *
 * Two of the created suicidal tasks kill one other suicidal task before killing
 * themselves - leaving just the original task remaining.
 *
 * The creator task must be spawned after all of the other demo application tasks
 * as it keeps a check on the number of tasks under the scheduler control.  The
 * number of tasks it expects to see running should never be greater than the
 * number of tasks that were in existence when the creator task was spawned, plus
 * one set of four suicidal tasks.  If this number is exceeded an error is flagged.
 *
 * \page DeathC death.c
 * \ingroup DemoFiles
 * <HR>
 */

/*
Changes from V3.0.0
	+ CreationCount sizes changed from unsigned portBASE_TYPE to
	  unsigned portSHORT to minimize the risk of overflowing.
	
	+ Reset of usLastCreationCount added
	
Changes from V3.1.0
	+ Changed the dummy calculation to use variables of type long, rather than
	  float.  This allows the file to be used with ports that do not support
	  floating point.

*/

#include <stdlib.h>

/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"

/* Demo program include files. */
#include "death.h"

#define deathSTACK_SIZE		( configMINIMAL_STACK_SIZE + 24 )

/* The task originally created which is responsible for periodically dynamically
creating another four tasks. */
static portTASK_FUNCTION_PROTO( vCreateTasks, pvParameters );

/* The task function of the dynamically created tasks. */
static portTASK_FUNCTION_PROTO( vSuicidalTask, pvParameters );

/* A variable which is incremented every time the dynamic tasks are created.  This
is used to check that the task is still running. */
static volatile unsigned portSHORT usCreationCount = 0;

/* Used to store the number of tasks that were originally running so the creator
task can tell if any of the suicidal tasks have failed to die.
*/
static volatile unsigned portBASE_TYPE uxTasksRunningAtStart = 0;

/* Tasks are deleted by the idle task.  Under heavy load the idle task might
not get much processing time, so it would be legitimate for several tasks to
remain undeleted for a short period. */
static const unsigned portBASE_TYPE uxMaxNumberOfExtraTasksRunning = 4;

/* Used to store a handle to the tasks that should be killed by a suicidal task,
before it kills itself. */
xTaskHandle xCreatedTask1, xCreatedTask2;

/*-----------------------------------------------------------*/

void vCreateSuicidalTasks( unsigned portBASE_TYPE uxPriority )
{
unsigned portBASE_TYPE *puxPriority;

	/* Create the Creator tasks - passing in as a parameter the priority at which
	the suicidal tasks should be created. */
	puxPriority = ( unsigned portBASE_TYPE * ) pvPortMalloc( sizeof( unsigned portBASE_TYPE ) );
	*puxPriority = uxPriority;

	xTaskCreate( vCreateTasks, "CREATOR", deathSTACK_SIZE, ( void * ) puxPriority, uxPriority, NULL );

	/* Record the number of tasks that are running now so we know if any of the
	suicidal tasks have failed to be killed. */
	uxTasksRunningAtStart = ( unsigned portBASE_TYPE ) uxTaskGetNumberOfTasks();
	
	/* FreeRTOS.org versions before V3.0 started the idle-task as the very
	first task. The idle task was then already included in uxTasksRunningAtStart.
	From FreeRTOS V3.0 on, the idle task is started when the scheduler is
	started. Therefore the idle task is not yet accounted for. We correct
	this by increasing uxTasksRunningAtStart by 1. */
	uxTasksRunningAtStart++;
}
/*-----------------------------------------------------------*/
					
static portTASK_FUNCTION( vSuicidalTask, pvParameters )
{
volatile portLONG l1, l2;
xTaskHandle xTaskToKill;
const portTickType xDelay = ( portTickType ) 200 / portTICK_RATE_MS;

	if( pvParameters != NULL )
	{
		/* This task is periodically created four times.  Two created tasks are
		passed a handle to the other task so it can kill it before killing itself.
		The other task is passed in null. */
		xTaskToKill = *( xTaskHandle* )pvParameters;
	}
	else
	{
		xTaskToKill = NULL;
	}

	for( ;; )
	{
		/* Do something random just to use some stack and registers. */
		l1 = 2;
		l2 = 89;
		l2 *= l1;
		vTaskDelay( xDelay );

		if( xTaskToKill != NULL )
		{
			/* Make sure the other task has a go before we delete it. */
			vTaskDelay( ( portTickType ) 0 );
			/* Kill the other task that was created by vCreateTasks(). */
			vTaskDelete( xTaskToKill );
			/* Kill ourselves. */
			vTaskDelete( NULL );
		}
	}
}/*lint !e818 !e550 Function prototype must be as per standard for task functions. */
/*-----------------------------------------------------------*/

static portTASK_FUNCTION( vCreateTasks, pvParameters )
{
const portTickType xDelay = ( portTickType ) 1000 / portTICK_RATE_MS;
unsigned portBASE_TYPE uxPriority;

	uxPriority = *( unsigned portBASE_TYPE * ) pvParameters;
	vPortFree( pvParameters );

	for( ;; )
	{
		/* Just loop round, delaying then creating the four suicidal tasks. */
		vTaskDelay( xDelay );

		xTaskCreate( vSuicidalTask, "SUICID1", deathSTACK_SIZE, NULL, uxPriority, &xCreatedTask1 );
		xTaskCreate( vSuicidalTask, "SUICID2", deathSTACK_SIZE, &xCreatedTask1, uxPriority, NULL );

		xTaskCreate( vSuicidalTask, "SUICID1", deathSTACK_SIZE, NULL, uxPriority, &xCreatedTask2 );
		xTaskCreate( vSuicidalTask, "SUICID2", deathSTACK_SIZE, &xCreatedTask2, uxPriority, NULL );

		++usCreationCount;
	}
}
/*-----------------------------------------------------------*/

/* This is called to check that the creator task is still running and that there
are not any more than four extra tasks. */
portBASE_TYPE xIsCreateTaskStillRunning( void )
{
static portSHORT usLastCreationCount = -1;
portBASE_TYPE xReturn = pdTRUE;
static unsigned portBASE_TYPE uxTasksRunningNow;

	if( usLastCreationCount == usCreationCount )
	{
		xReturn = pdFALSE;
	}
	else
	{
		usLastCreationCount = usCreationCount;
	}
	
	uxTasksRunningNow = ( unsigned portBASE_TYPE ) uxTaskGetNumberOfTasks();

	if( uxTasksRunningNow < uxTasksRunningAtStart )
	{
		xReturn = pdFALSE;
	}
	else if( ( uxTasksRunningNow - uxTasksRunningAtStart ) > uxMaxNumberOfExtraTasksRunning )
	{
		xReturn = pdFALSE;
	}
	else
	{
		/* Everything is okay. */
	}

	return xReturn;
}


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区按摩在线观看| 18欧美亚洲精品| 全国精品久久少妇| 欧美一区二区三区视频在线| 久久99国内精品| 欧美国产禁国产网站cc| 99久久免费精品| 午夜精品免费在线| 日韩视频在线永久播放| 国产成人高清视频| 亚洲激情五月婷婷| 日韩天堂在线观看| 成人亚洲一区二区一| 亚洲欧美一区二区三区国产精品| 欧美三级电影网| 精品亚洲aⅴ乱码一区二区三区| 国产亚洲欧美日韩在线一区| 99久久久精品免费观看国产蜜| 一区二区三区四区不卡视频| 欧美一区二区三区四区在线观看| 国产麻豆精品在线观看| 亚洲啪啪综合av一区二区三区| 欧美理论在线播放| 国产精品一二三区在线| 樱桃视频在线观看一区| 欧美α欧美αv大片| 99精品一区二区| 久久99国内精品| 亚洲女厕所小便bbb| 日韩欧美高清在线| 一本一道综合狠狠老| 麻豆精品国产传媒mv男同| 亚洲欧洲日本在线| 欧美成人aa大片| 欧美性大战久久| 大尺度一区二区| 日本aⅴ免费视频一区二区三区 | 国产成人在线视频免费播放| 亚洲日本乱码在线观看| 精品国产免费视频| 欧美熟乱第一页| 成人av在线网站| 蜜臀av性久久久久蜜臀aⅴ| 亚洲女同一区二区| 国产欧美日韩三区| 日韩精品一区在线| 欧美专区日韩专区| 成人av在线影院| 久久国产麻豆精品| 日韩精品亚洲专区| 亚洲激情网站免费观看| 国产欧美日韩视频在线观看| 日韩精品中文字幕一区二区三区| 欧洲国产伦久久久久久久| 99久久国产免费看| 粉嫩aⅴ一区二区三区四区| 蜜桃91丨九色丨蝌蚪91桃色| 亚洲成人手机在线| 亚洲在线视频网站| 亚洲视频免费观看| 国产精品成人在线观看| 国产欧美精品一区二区色综合| 2023国产精品自拍| 26uuu色噜噜精品一区| 日韩一区二区中文字幕| 欧美日韩高清影院| 欧美性感一区二区三区| 在线观看亚洲a| 欧美综合视频在线观看| 99精品一区二区三区| 99久久精品99国产精品| 99视频超级精品| av电影在线观看一区| 成人黄色av电影| 99视频在线精品| aaa欧美日韩| 91久久精品网| 欧美日韩国产高清一区二区三区| 欧美日本精品一区二区三区| 88在线观看91蜜桃国自产| 欧美一区二区私人影院日本| 欧美一二三区精品| 2023国产一二三区日本精品2022| 久久综合中文字幕| 久久精品这里都是精品| 日本一区二区三区四区| 国产精品二三区| 亚洲综合丝袜美腿| 日韩**一区毛片| 精品一区二区免费视频| 国产成人在线免费观看| 99riav久久精品riav| 欧美亚一区二区| 精品卡一卡二卡三卡四在线| 久久久久国产精品麻豆ai换脸| 国产三级一区二区三区| 亚洲乱码日产精品bd| 日本成人在线视频网站| 国产精选一区二区三区| 91色在线porny| 欧美日韩在线直播| 精品久久久久久久久久久院品网| 国产日本一区二区| 亚洲精品成人天堂一二三| 男人操女人的视频在线观看欧美 | 日韩av一级片| 国产乱人伦偷精品视频免下载| 成人黄色在线网站| 欧美视频一区二区| 精品国产一区二区国模嫣然| 亚洲同性同志一二三专区| 偷拍一区二区三区四区| 国产经典欧美精品| 欧美性猛片aaaaaaa做受| 久久综合色8888| 亚洲国产综合91精品麻豆| 激情综合一区二区三区| 成人黄色在线网站| 日韩免费观看高清完整版| 自拍偷拍欧美精品| 久久国产精品99久久久久久老狼| 99在线精品一区二区三区| 欧美一区二区三区四区五区| 亚洲欧美日韩国产综合| 国内精品免费**视频| 欧美无砖专区一中文字| 国产日本欧美一区二区| 日韩国产高清在线| 色婷婷av一区二区三区之一色屋| 精品国产伦理网| 午夜伦欧美伦电影理论片| av欧美精品.com| 精品乱人伦一区二区三区| 亚洲影院久久精品| 99久久精品情趣| 国产午夜亚洲精品理论片色戒| 性久久久久久久久久久久| 91丨九色porny丨蝌蚪| 国产日韩av一区| 久久超碰97中文字幕| 欧美日韩电影一区| 一区二区三区在线视频免费| 国产suv精品一区二区三区| 日韩欧美电影在线| 日精品一区二区三区| 色婷婷久久久亚洲一区二区三区 | 亚洲视频在线观看三级| 激情六月婷婷久久| 日韩亚洲欧美在线观看| 亚洲午夜电影在线| 欧美中文字幕亚洲一区二区va在线| 亚洲国产成人在线| 高清不卡一区二区| 久久精品一区二区三区不卡| 激情综合色综合久久综合| 4438成人网| 免费在线成人网| 日韩午夜电影av| 琪琪一区二区三区| 日韩三级在线免费观看| 男人的j进女人的j一区| 91麻豆精品国产91久久久| 日精品一区二区三区| 这里只有精品电影| 蜜桃av一区二区| 日韩免费视频一区二区| 看片网站欧美日韩| 精品国产麻豆免费人成网站| 国产一区二区导航在线播放| 久久男人中文字幕资源站| 国产在线精品一区二区不卡了 | 欧美国产精品专区| 国产东北露脸精品视频| 国产欧美精品在线观看| 成人国产视频在线观看| 综合久久给合久久狠狠狠97色 | 国产一区二区三区四区五区美女| 精品捆绑美女sm三区| 国产乱妇无码大片在线观看| 国产午夜精品美女毛片视频| av不卡在线观看| 亚洲精品国产无天堂网2021| 欧美在线一二三| 日本特黄久久久高潮| 久久伊99综合婷婷久久伊| 成人性色生活片免费看爆迷你毛片| 最新热久久免费视频| 一本一本久久a久久精品综合麻豆| 亚洲一区二区高清| 日韩亚洲欧美中文三级| 国产91精品欧美| 一区2区3区在线看| 91精品国产91久久久久久一区二区| 狠狠网亚洲精品| 亚洲色图欧美激情| 欧美精品乱码久久久久久| 精品午夜一区二区三区在线观看| 国产精品美女久久久久久久久| 欧美在线制服丝袜| 精品一区二区三区不卡|