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

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

?? list.c

?? 開源ZigBee 協議棧
?? C
字號:
/*
	FreeRTOS V3.2.0 - Copyright (C) 2003 - 2005 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.
	***************************************************************************
*/

/*
Changes from V1.2.0

	+ Removed the volatile modifier from the function parameters.  This was
	  only ever included to prevent compiler warnings.  Now warnings are 
	  removed by casting parameters where the calls are made.

	+ prvListGetOwnerOfNextEntry() and prvListGetOwnerOfHeadEntry() have been
	  removed from the c file and added as macros to the h file.

	+ uxNumberOfItems has been added to the list structure.  This removes the
	  need for a pointer comparison when checking if a list is empty, and so
	  is slightly faster.

	+ Removed the NULL check in vListRemove().  This makes the call faster but
	  necessitates any application code utilising the list implementation to
	  ensure NULL pointers are not passed.

Changes from V2.0.0

	+ Double linked the lists to allow faster removal item removal.

Changes from V2.6.1

	+ Make use of the new portBASE_TYPE definition where ever appropriate.

Changes from V3.0.0

	+ API changes as described on the FreeRTOS.org WEB site.
*/

#include <stdlib.h>
#include "FreeRTOS.h"
#include "list.h"

/*-----------------------------------------------------------
 * PUBLIC LIST API documented in list.h
 *----------------------------------------------------------*/

void vListInitialise( xList *pxList )
{
	/* The list structure contains a list item which is used to mark the 
	end of the list.  To initialise the list the list end is inserted
	as the only list entry. */
	pxList->pxHead = &( pxList->xListEnd );
	pxList->pxIndex = pxList->pxHead;

	/* The list end value is the highest possible value in the list to
	ensure it remains at the end of the list. */
	pxList->xListEnd.xItemValue = portMAX_DELAY;

	/* The list end next and previous pointers point to itself so we know
	when the list is empty. */
	pxList->xListEnd.pxNext = &( pxList->xListEnd );
	pxList->xListEnd.pxPrevious = &( pxList->xListEnd );

	/* The list head will never get used and has no owner. */
	pxList->xListEnd.pvOwner = NULL;

	/* Make sure the marker items are not mistaken for being on a list. */
	vListInitialiseItem( ( xListItem * ) &( pxList->xListEnd ) );

	pxList->uxNumberOfItems = 0;
}
/*-----------------------------------------------------------*/

void vListInitialiseItem( xListItem *pxItem )
{
	/* Make sure the list item is not recorded as being on a list. */
	pxItem->pvContainer = NULL;
}
/*-----------------------------------------------------------*/

void vListInsertEnd( xList *pxList, xListItem *pxNewListItem )
{
volatile xListItem * pxIndex;

	/* Insert a new list item into pxList, but rather than sort the list, 
	makes the new list item the last item to be removed by a call to 
	pvListGetOwnerOfNextEntry.  This means it has to be the item pointed to by
	the pxIndex member. */
	pxIndex = pxList->pxIndex;

	pxNewListItem->pxNext = pxIndex->pxNext;
	pxNewListItem->pxPrevious = pxList->pxIndex;
	pxIndex->pxNext->pxPrevious = ( volatile xListItem * ) pxNewListItem;
	pxIndex->pxNext = ( volatile xListItem * ) pxNewListItem;
	pxList->pxIndex = ( volatile xListItem * ) pxNewListItem;

	/* Remember which list the item is in. */
	pxNewListItem->pvContainer = ( void * ) pxList;

	( pxList->uxNumberOfItems )++;
}
/*-----------------------------------------------------------*/

void vListInsert( xList *pxList, xListItem *pxNewListItem )
{
volatile xListItem *pxIterator;
register portTickType xValueOfInsertion;

	/* Insert the new list item into the list, sorted in ulListItem order. */
	xValueOfInsertion = pxNewListItem->xItemValue;

	/* If the list already contains a list item with the same item value then
	the new list item should be placed after it.  This ensures that TCB's which
	are stored in ready lists (all of which have the same ulListItem value)
	get an equal share of the CPU.  However, if the xItemValue is the same as 
	the back marker the iteration loop below will not end.  This means we need
	to guard against this by checking the value first and modifying the 
	algorithm slightly if necessary. */
	if( xValueOfInsertion == portMAX_DELAY )
	{
		for( pxIterator = pxList->pxHead; pxIterator->pxNext->xItemValue < xValueOfInsertion; pxIterator = pxIterator->pxNext )
		{
			/* There is nothing to do here, we are just iterating to the 
			wanted insertion position. */
		}
	}
	else
	{
		for( pxIterator = pxList->pxHead; pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext )
		{
			/* There is nothing to do here, we are just iterating to the 
			wanted insertion position. */
		}
	}

	pxNewListItem->pxNext = pxIterator->pxNext;
	pxNewListItem->pxNext->pxPrevious = ( volatile xListItem * ) pxNewListItem;
	pxNewListItem->pxPrevious = pxIterator;
	pxIterator->pxNext = ( volatile xListItem * ) pxNewListItem;

	/* Remember which list the item is in.  This allows fast removal of the
	item later. */
	pxNewListItem->pvContainer = ( void * ) pxList;

	( pxList->uxNumberOfItems )++;
}
/*-----------------------------------------------------------*/

void vListRemove( xListItem *pxItemToRemove )
{
xList * pxList;

	pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
	pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
	
	/* The list item knows which list it is in.  Obtain the list from the list
	item. */
	pxList = ( xList * ) pxItemToRemove->pvContainer;

	/* Make sure the index is left pointing to a valid item. */
	if( pxList->pxIndex == pxItemToRemove )
	{
		pxList->pxIndex = pxItemToRemove->pxPrevious;
	}

	pxItemToRemove->pvContainer = NULL;
	( pxList->uxNumberOfItems )--;
}
/*-----------------------------------------------------------*/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
夜夜揉揉日日人人青青一国产精品| 色激情天天射综合网| 亚洲国产婷婷综合在线精品| 国产精品伦一区| 久久精品一级爱片| 日韩免费观看2025年上映的电影| 欧美群妇大交群的观看方式| 色狠狠色狠狠综合| 欧美日韩一级二级三级| 欧美日韩成人综合天天影院| 欧美无乱码久久久免费午夜一区| 欧美午夜精品理论片a级按摩| 欧美性大战久久久久久久蜜臀| 欧美日韩小视频| 日韩欧美中文一区二区| 欧美精品一区二区三区蜜桃视频| 久久久久亚洲综合| 国产精品久久久久久亚洲伦| 一色屋精品亚洲香蕉网站| 亚洲欧美日韩一区二区 | 26uuu亚洲综合色欧美| 欧美本精品男人aⅴ天堂| 精品国产三级a在线观看| 国产日韩欧美一区二区三区乱码 | 国内精品不卡在线| 国产91精品久久久久久久网曝门| 成人综合婷婷国产精品久久蜜臀| 99国产欧美久久久精品| 欧美欧美欧美欧美首页| 精品毛片乱码1区2区3区| 91在线精品一区二区| 亚洲宅男天堂在线观看无病毒| 日韩理论片网站| 亚洲国产成人av好男人在线观看| 日韩精品亚洲一区二区三区免费| 久久99国产精品久久99| 国产成人啪免费观看软件| 国产夫妻精品视频| 欧美三级视频在线观看| 日韩一区二区三区四区| 亚洲色图制服丝袜| 韩国精品在线观看| 91麻豆免费看| 久久久九九九九| 亚洲午夜久久久久久久久电影网| 久久精品99国产精品| 色系网站成人免费| 26uuu久久综合| 亚洲不卡av一区二区三区| 国产成人自拍高清视频在线免费播放| 色综合中文字幕国产| 欧美精品v日韩精品v韩国精品v| 久久久久久夜精品精品免费| 亚洲成人午夜影院| 91在线你懂得| 欧美国产97人人爽人人喊| 日本不卡一区二区| 在线观看中文字幕不卡| 日本一区二区三级电影在线观看 | 99久久免费精品高清特色大片| 制服丝袜一区二区三区| 亚洲三级电影全部在线观看高清| 美国三级日本三级久久99| 色999日韩国产欧美一区二区| 久久久精品综合| 久久成人免费日本黄色| 7777精品伊人久久久大香线蕉经典版下载 | 中文久久乱码一区二区| 美女一区二区视频| 67194成人在线观看| 亚洲国产综合色| 在线视频国内一区二区| 亚洲免费视频中文字幕| 亚洲欧美经典视频| 久久久亚洲精华液精华液精华液| 欧美色老头old∨ideo| 亚洲精品菠萝久久久久久久| 欧美午夜精品一区二区三区| 国产真实乱对白精彩久久| 日本欧美肥老太交大片| 欧美性videosxxxxx| 中文字幕日本乱码精品影院| 欧美日韩在线播放| 在线观看欧美日本| 制服.丝袜.亚洲.另类.中文| 亚洲自拍另类综合| 欧美日韩一区二区在线视频| 午夜一区二区三区在线观看| 欧美日韩小视频| 青青草原综合久久大伊人精品优势| 欧美一区二区免费观在线| 美女网站一区二区| 久久精品亚洲麻豆av一区二区| 国产精品99久久久久久有的能看| 久久婷婷久久一区二区三区| 大尺度一区二区| 国产精品精品国产色婷婷| 色综合网站在线| 香蕉加勒比综合久久| 日韩欧美国产一区在线观看| 国产一区二区影院| 亚洲美女少妇撒尿| 欧美一级片免费看| 粉嫩嫩av羞羞动漫久久久| 国产精品国产三级国产aⅴ中文 | 中文字幕巨乱亚洲| 色综合天天综合| 麻豆精品在线看| 国产精品久久久久影院亚瑟| 久久伊人蜜桃av一区二区| 国产高清不卡二三区| 亚洲欧美日韩中文播放| 欧美成人精品3d动漫h| 成人a免费在线看| 午夜精品成人在线视频| 国产亚洲污的网站| 欧美日本国产一区| 成人黄色777网| 午夜精品福利一区二区三区av| 2021中文字幕一区亚洲| 欧美亚洲日本一区| 国产麻豆精品95视频| 亚洲精品高清视频在线观看| 精品国内片67194| 欧洲色大大久久| 高清国产午夜精品久久久久久| 亚洲在线一区二区三区| 国产精品乱码一区二区三区软件 | 夜夜嗨av一区二区三区| 精品国产污网站| 欧美片在线播放| 日本高清不卡一区| 国产不卡视频一区二区三区| 天堂在线亚洲视频| 亚洲男人的天堂在线aⅴ视频| 久久伊人蜜桃av一区二区| 精品视频123区在线观看| 99riav久久精品riav| 国产伦精品一区二区三区在线观看| 亚洲午夜久久久| 一片黄亚洲嫩模| 亚洲欧美怡红院| 国产日产欧美一区二区视频| 欧美一区二区啪啪| 91精品国产色综合久久ai换脸| 欧美视频在线一区| 91久久精品日日躁夜夜躁欧美| 夫妻av一区二区| 成人综合在线观看| 成人精品国产免费网站| 国产一区福利在线| 国产剧情av麻豆香蕉精品| 免费人成在线不卡| 麻豆中文一区二区| 精品一区二区成人精品| 精品综合久久久久久8888| 一本到不卡精品视频在线观看| 成人亚洲一区二区一| 成人激情开心网| 91麻豆国产精品久久| 色88888久久久久久影院按摩| 99久久久久久99| 99久久久久久| 精品视频123区在线观看| 欧美日韩精品一区二区三区四区 | 国产欧美日韩在线看| 国产亚洲欧美色| 中文一区在线播放| |精品福利一区二区三区| 亚洲卡通动漫在线| 天堂久久久久va久久久久| 美女视频黄久久| 国产成人在线网站| 一本色道**综合亚洲精品蜜桃冫| 91福利国产精品| 91精品午夜视频| 欧美国产1区2区| 亚洲不卡av一区二区三区| 久久超碰97中文字幕| 高清不卡在线观看av| 色噜噜狠狠成人中文综合| 91精品国产色综合久久| 日本一区二区免费在线观看视频 | 亚洲成人免费视频| 美女任你摸久久| 成人一二三区视频| 欧美日韩国产欧美日美国产精品| 精品对白一区国产伦| 日韩一区欧美小说| 另类欧美日韩国产在线| 99久久er热在这里只有精品15| 欧美精品一二三四| 国产精品久久久久aaaa| 日韩黄色免费电影| 不卡一二三区首页| 欧美日韩高清一区二区不卡| 国产亚洲自拍一区| 午夜一区二区三区视频| 99久久婷婷国产综合精品电影| 在线成人免费视频|