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

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

?? death.c

?? Este é um rtos free para a familia arm7
?? C
字號:
/*
	FreeRTOS V4.0.0 - Copyright (C) 2003-2006 Richard Barry.

	This file is part of the FreeRTOS distribution.

	FreeRTOS 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 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; 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, 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 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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美极品xxx| 色综合网站在线| 久久精品亚洲一区二区三区浴池| 日韩在线a电影| 777久久久精品| 久久精品噜噜噜成人av农村| 欧美一区二区三区在线视频| 免费一区二区视频| 国产日韩三级在线| 99久久精品国产观看| 亚洲高清视频在线| 精品欧美乱码久久久久久 | 成人妖精视频yjsp地址| 国产精品久久久久7777按摩| jlzzjlzz亚洲女人18| 亚洲品质自拍视频| 51精品视频一区二区三区| 经典三级视频一区| 亚洲人成网站色在线观看| 欧美日韩国产电影| 波多野结衣欧美| 1区2区3区国产精品| 欧美精品九九99久久| zzijzzij亚洲日本少妇熟睡| 丝袜美腿亚洲综合| 国产精品激情偷乱一区二区∴| 欧美在线一区二区| 成人一区二区三区中文字幕| 日韩黄色在线观看| 亚洲欧美自拍偷拍色图| 日韩丝袜情趣美女图片| 欧美色中文字幕| 色诱亚洲精品久久久久久| 国产成人亚洲综合a∨婷婷图片| 亚洲国产精品天堂| 1000部国产精品成人观看| 精品美女在线观看| 在线不卡中文字幕| 欧美日韩国产综合一区二区三区| 福利一区福利二区| 成人涩涩免费视频| www.视频一区| 99re这里都是精品| 色94色欧美sute亚洲线路二| 成人三级伦理片| jizz一区二区| av一区二区三区| av欧美精品.com| 91麻豆国产福利精品| 在线免费视频一区二区| 色婷婷香蕉在线一区二区| 日本精品视频一区二区| 欧美三级电影网| 日韩欧美精品在线| 日本一区二区在线不卡| 国产美女主播视频一区| av高清不卡在线| 精品国产自在久精品国产| 欧美日韩一区二区在线观看视频| 在线免费观看一区| 欧美三级三级三级爽爽爽| 日韩一区二区三区免费看 | 日韩一区二区电影网| 日本一区二区三区视频视频| 中文字幕在线不卡国产视频| 亚洲一卡二卡三卡四卡| 激情综合色丁香一区二区| 91美女视频网站| 91精品国产福利| 亚洲欧洲精品成人久久奇米网| 视频一区中文字幕| 国产91精品在线观看| 欧美日韩一区精品| 国产精品电影一区二区| 奇米影视一区二区三区| 本田岬高潮一区二区三区| 7878成人国产在线观看| 成人欧美一区二区三区视频网页| 秋霞成人午夜伦在线观看| 欧洲精品视频在线观看| 中文字幕在线不卡| 国产传媒日韩欧美成人| 日韩精品一区二区三区在线观看| 亚洲精选视频免费看| 色综合天天天天做夜夜夜夜做| 日韩免费视频线观看| 日本一区中文字幕| 色欧美88888久久久久久影院| 久久久久久综合| 国产一区二区看久久| 日韩一区二区在线免费观看| 亚洲mv大片欧洲mv大片精品| 欧美日韩精品一区二区三区| 一区二区三区日韩精品| 91在线无精精品入口| 17c精品麻豆一区二区免费| 成年人网站91| 一区二区三区四区不卡在线| 色综合一区二区| 亚洲最大成人综合| 欧美日韩一区中文字幕| 午夜精品福利视频网站| 欧美日韩电影一区| 欧美aa在线视频| 国产日产欧美精品一区二区三区| 国产成人精品一区二区三区网站观看| 久久亚洲影视婷婷| 成人爱爱电影网址| 亚洲va国产天堂va久久en| 9191成人精品久久| 国产成人在线网站| 一区二区视频免费在线观看| 欧美日韩精品福利| 99这里只有精品| 首页亚洲欧美制服丝腿| 国产日韩欧美激情| 欧美视频一区二区在线观看| 久久精品国产在热久久| 国产精品久久久久久久久果冻传媒 | 五月天网站亚洲| 国产欧美日韩另类一区| 欧美午夜电影一区| 国产精品一区二区三区乱码| 亚洲丝袜精品丝袜在线| 日韩一区二区三区在线观看| 成人av免费在线观看| 激情综合色播五月| 亚洲午夜影视影院在线观看| 久久久精品综合| 91精品欧美综合在线观看最新| 91最新地址在线播放| 国产一区高清在线| 蜜桃精品在线观看| 亚洲第一综合色| 亚洲天堂中文字幕| 国产精品色眯眯| 国产婷婷色一区二区三区在线| 欧美高清激情brazzers| 在线视频欧美精品| 色婷婷精品久久二区二区蜜臀av | 日本欧美肥老太交大片| 一区二区三区免费网站| 亚洲日本丝袜连裤袜办公室| 国产亚洲污的网站| 欧美成人欧美edvon| 日韩区在线观看| 欧美一区二区三区电影| 成人免费在线播放视频| 亚洲色图欧美激情| 亚洲综合丝袜美腿| 日本欧美大码aⅴ在线播放| 蜜臀av一区二区三区| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美体内she精视频| 国产成人免费在线观看不卡| 国产精品乱人伦一区二区| 欧美亚洲动漫另类| 欧美日韩美女一区二区| 成人高清视频在线观看| 欧美日韩一区高清| 国产精品视频线看| 一卡二卡欧美日韩| 五月综合激情网| 激情综合五月婷婷| 国产91精品一区二区麻豆网站| 美女视频网站久久| 国产黄人亚洲片| 欧美在线视频你懂得| 欧美日韩夫妻久久| 精品国产亚洲一区二区三区在线观看| 久久亚洲影视婷婷| 亚洲成人av在线电影| 国产乱对白刺激视频不卡| 久久99精品久久久久久国产越南| 国模冰冰炮一区二区| 国产麻豆一精品一av一免费| 欧美在线观看一区| 国产欧美日韩中文久久| 日本va欧美va精品| 91在线免费看| 国产精品激情偷乱一区二区∴| 青青草一区二区三区| 777久久久精品| 一二三四社区欧美黄| 91同城在线观看| 国产亚洲精品超碰| 黑人精品欧美一区二区蜜桃| 91福利国产精品| 亚洲永久精品大片| 91网站最新地址| 欧美激情一区二区三区不卡| 美女视频网站黄色亚洲| 欧美一区二区三区免费视频| 亚洲成人免费观看| 欧洲视频一区二区| 亚洲大尺度视频在线观看| 94色蜜桃网一区二区三区| 久久久噜噜噜久久中文字幕色伊伊 | 成人黄色在线网站| 国产高清成人在线|