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

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

?? qlib.c

?? vxworks的完整的源代碼
?? C
字號:
/* qLib.c - queue library *//* Copyright 1984-1992 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01m,19jul92,pme  made qRemove return STATUS.01l,26may92,rrr  the tree shuffle01k,04dec91,rrr  removed VARARG_OK, no longer needed with ansi c.01j,19nov91,rrr  shut up some ansi warnings.01i,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed includes to have absolute path from h/		  -fixed #else and #endif		  -changed VOID to void		  -changed copyright notice01h,14aug91,del  changed qCreate/qInit interfaces to take fixed number		 of args for I960 case only.01g,18may91,gae  fixed typo in 01f.01f,18may91,gae  fixed varargs for 960 with conditional VARARG_OK,		 namely: qCreate() & qInit().01e,28sep90,jcf  documentation.01d,10aug90,dnw  changed qCalibrate() to not return value since it is void.01c,05jul90,jcf  added qCalibrate().01b,26jun90,jcf  added qResort().01a,14jun89,jcf	 written.*//*DESCRIPTIONThis queue management library implements the multi-way queue data structures.Queues which utilize the data structures Q_HEAD, and Q_NODE are shareablequeues.  The routines of this library perform generic operation on the queueby dereferencing the queue class pointer to invode the correct method forthe operation selected.  All kernel queues are implemented as multi-way queues,and thus may be configured to utilize any queue that conforms to this library.SEE ALSO: qFifoLib, qPriBMapLib, qPriDeltaLib, qPriHeapLib, qPriListLib.*/#include "vxWorks.h"#include "errno.h"#include "stdarg.h"#include "qClass.h"#include "qLib.h"#include "stdlib.h"#define	MAX_ARGS	10	/* number of variable arguments *//********************************************************************************* qCreate - allocate and initialize a multi-way queue** This routine allocates a Q_HEAD structure from the free memory pool.  The* queue head is initialized to the specified multi-way queue class.  Additional* arguments are passed to the queue classes underlying initialization routine.** RETURNS: Pointer to a queue head, or NULL if queue could not be created.** ERRNO: S_qLib_Q_CLASS_ID_ERROR**/Q_HEAD *qCreate    (    Q_CLASS *pQClass,   /* pointer to queue class */    ...              /* optional arguments to create routine */    )    {    va_list pArg;	/* traverses argument list */    Q_HEAD *pQHead;	/* pointer to queue head */    int ix;		/* handy index */    int arg[MAX_ARGS];	/* indigenous variables */    if (Q_CLASS_VERIFY (pQClass) != OK)	{	errno = S_qLib_Q_CLASS_ID_ERROR;	return (NULL);	}    va_start (pArg, pQClass);    for (ix = 0; ix < MAX_ARGS; ++ix)	arg[ix] = va_arg (pArg, int);	/* put args in local vars */    va_end (pArg);    pQHead = (Q_HEAD *) malloc (sizeof (Q_HEAD));    if ((pQHead != NULL) && qInit (pQHead, pQClass, arg[0], arg[1], arg[2],				   arg[3], arg[4], arg[5], arg[6], arg[7],				   arg[8], arg[9]) != OK)	{	/* XXX MAX_ARGS */	free ((char *) pQHead);	return (NULL);	}    return (pQHead);    }/********************************************************************************* qInit - initialize multi-way queue head** This routine initializes the multi-way queue head to the specified queue* class.  Additional arguments are passed to the underlying queue class* initialization routine.** RETURNS OK, or ERROR if initialiazation fails.** ERRNO: S_qLib_Q_CLASS_ID_ERROR**/STATUS qInit    (    Q_HEAD *pQHead,     /* pointer to queue head to initialize */    Q_CLASS *pQClass,   /* pointer to queue class */    ...              /* optional arguments to create routine */    )    {    va_list pArg;	/* traverses argument list */    int ix;		/* handy index */    int arg[MAX_ARGS];	/* indigenous variables */    if (Q_CLASS_VERIFY (pQClass) != OK)	{	errno = S_qLib_Q_CLASS_ID_ERROR;	return (ERROR);	}    va_start (pArg, pQClass);    for (ix = 0; ix < MAX_ARGS; ++ix)	arg[ix] = va_arg (pArg, int);	/* put args in local vars */    va_end (pArg);    pQHead->pQClass = pQClass;			/* store pointer to q class */    return ((* (pQClass->initRtn)) (pQHead, arg[0], arg[1], arg[2], arg[3],				    arg[4], arg[5], arg[6], arg[7], arg[8],				    arg[9]));	/* XXX MAX_ARGS */    }/********************************************************************************* qDelete - deallocate a multi-way queue head** This routine deallocates the multi-way queue head.  All queued nodes are* lost.** RETURNS OK, or ERROR if queue deallocation fails.*/STATUS qDelete    (    Q_HEAD *pQHead    )    {    if (qTerminate (pQHead) != OK)	return (ERROR);    pQHead->pQClass = NULL;			/* invalidate q class */    free ((char *) pQHead);    return OK;    }/********************************************************************************* qTerminate - terminate a multi-way queue head** This routine terminates a multi-way queue head.  All queued nodes will be* lost.** RETURNS OK, or ERROR if termination fails.*/STATUS qTerminate    (    Q_HEAD *pQHead    )    {    if (((* (pQHead->pQClass->terminateRtn)) (pQHead)) != OK)	return (ERROR);    pQHead->pQClass = NULL;			/* invalidate q class */    return (OK);    }/********************************************************************************* qFirst - return first node in multi-way queue** This routine returns a pointer to the first node in the specified multi-way* queue head.  If the queue is empty, NULL is returned.** RETURNS Pointer to first queue node in queue head, or NULL if queue is empty.*/Q_NODE *qFirst    (    Q_HEAD *pQHead    )    {    return (Q_FIRST (pQHead));    }/********************************************************************************* qPut - insert a node into a multi-way queue** This routine inserts a node into a multi-way queue.  The insertion is based* on the key and the underlying queue class.*/void qPut    (    Q_HEAD *pQHead,    Q_NODE *pQNode,    ULONG   key    )    {    Q_PUT (pQHead, pQNode, key);    }/********************************************************************************* qGet - remove and return first node in multi-way queue** This routine removes and returns the first node in a multi-way queue.  If* the queue is empty, NULL is returned.** RETURNS Pointer to first queue node in queue head, or NULL if queue is empty.*/Q_NODE *qGet    (    Q_HEAD *pQHead    )    {    return (Q_GET (pQHead));    }/********************************************************************************* qRemove - remove a node from a multi-way queue** This routine removes a node from the specified multi-way queue.*/STATUS qRemove    (    Q_HEAD *pQHead,    Q_NODE *pQNode    )    {    return (Q_REMOVE (pQHead, pQNode));    }/********************************************************************************* qResort - resort a node to a new position based on a new key** This routine resorts a node to a new position based on a new key.  It can* be used to change the priority of a queued element, for instance.*/void qResort    (    Q_HEAD *pQHead,    Q_NODE *pQNode,    ULONG   newKey    )    {    Q_RESORT (pQHead, pQNode, newKey);    }/********************************************************************************* qAdvance - advance a queues concept of time (timer queues only)** Multi-way queues that keep nodes prioritized by time-to-fire utilize this* routine to advance time.  It is usually called from within a clock-tick* interrupt service routine.*/void qAdvance    (    Q_HEAD *pQHead    )    {    Q_ADVANCE (pQHead);    }/********************************************************************************* qGetExpired - return a time-to-fire expired node** This routine returns a time-to-fire expired node in a multi-way timer queue.* Expired nodes result from a qAdvance(2) advancing a node beyond its delay.* As many nodes may expire on a single qAdvance(2), this routine should be* called inside a while loop until NULL is returned.  NULL is returned when* there are no expired nodes.** RETURNS: Pointer to first queue node in queue head, or NULL if queue is empty.*/Q_NODE *qGetExpired    (    Q_HEAD *pQHead    )    {    return (Q_GET_EXPIRED (pQHead));    }/********************************************************************************* qKey - return the key of a node** This routine returns the key of a node currently in a multi-way queue.  The* keyType determines key style on certain queue classes.** RETURNS: Node's key.*/ULONG qKey    (    Q_HEAD *pQHead,    Q_NODE *pQNode,    int     keyType    )    {    return (Q_KEY (pQHead, pQNode, keyType));    }/********************************************************************************* qCalibrate - offset every node in a queue by some delta** This routine offsets every node in a multi-way queue by some delta.  The* offset may either by positive or negative.*/void qCalibrate    (    Q_HEAD *pQHead,    ULONG   keyDelta    )    {    Q_CALIBRATE (pQHead, keyDelta);    }/********************************************************************************* qInfo - gather information on a multi-way queue** This routine fills up to maxNodes elements of a nodeArray with nodes* currently in a multi-way queue.  The actual number of nodes copied to the* array is returned.  If the nodeArray is NULL, then the number of nodes in* the multi-way queue is returned.** RETURNS: Number of node pointers copied to the nodeArray, or nodes in*	   multi-way queue if nodeArray is NULL.*/int qInfo    (    Q_HEAD *pQHead,    Q_NODE *nodeArray[],    int    maxNodes    )    {    return (Q_INFO (pQHead, nodeArray, maxNodes));    }/********************************************************************************* qEach - call a routine for each node in a queue** This routine calls a user-supplied routine once for each node in the* queue.  The routine should be declared as follows:* .CS*  BOOL routine (pQNode, arg)*      Q_NODE	*pQNode;	/@ pointer to a queue node          @/*      int	arg;		/@ arbitrary user-supplied argument @/* .CE* The user-supplied routine should return TRUE if qEach() is to continue* calling it for each entry, or FALSE if it is done and qEach can exit.** RETURNS: NULL if traversed whole queue, or pointer to Q_NODE that*          qEach ended with.*/Q_NODE *qEach    (    Q_HEAD      *pQHead,        /* queue head of queue to call routine for */    FUNCPTR     routine,        /* the routine to call for each queue node */    int         routineArg      /* arbitrary user-supplied argument */    )    {    return (Q_EACH (pQHead, routine, routineArg));    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品影视在线| 成人激情视频网站| 日韩avvvv在线播放| 91国模大尺度私拍在线视频| 亚洲久草在线视频| 亚洲伊人伊色伊影伊综合网| 午夜视频一区在线观看| 捆绑调教美女网站视频一区| 国产成人在线视频网址| 欧美日韩在线不卡| 国产精品美女久久久久久久久久久 | 久久久久久久综合日本| 一区二区三区毛片| 国产电影一区二区三区| 精品国产1区二区| 久久超碰97人人做人人爱| 美女国产一区二区| 91视频观看视频| 国产精品久久久久久亚洲毛片 | 精品国产伦一区二区三区免费 | 国产在线看一区| 99久久久精品| 制服丝袜一区二区三区| 亚洲天堂网中文字| 久久99国产精品久久99果冻传媒| 一卡二卡欧美日韩| 欧美人成免费网站| 亚洲色图.com| 麻豆精品久久精品色综合| 99精品在线免费| 日韩欧美黄色影院| 91精品一区二区三区久久久久久| 色婷婷激情综合| 久久蜜臀中文字幕| 亚洲一级在线观看| 国产精品自拍av| 高清不卡在线观看| 成人午夜短视频| 91精品国产aⅴ一区二区| 中文字幕一区二区三区不卡 | 欧美成人精品3d动漫h| 一区二区三区资源| 99久久国产综合色|国产精品| 欧美va亚洲va| 水蜜桃久久夜色精品一区的特点| 99久久精品免费| 国产精品午夜在线观看| 韩国v欧美v亚洲v日本v| 91精品国产欧美一区二区成人 | 欧美成人一区二区| 另类综合日韩欧美亚洲| 欧美一卡2卡三卡4卡5免费| 亚洲一区二区三区四区的| 色狠狠综合天天综合综合| 亚洲男人的天堂一区二区| 99精品视频在线免费观看| 国产精品少妇自拍| 高清国产一区二区三区| 久久精品日韩一区二区三区| 国产乱人伦偷精品视频不卡| 国产色综合一区| 成人中文字幕电影| 亚洲视频在线一区二区| 色老综合老女人久久久| 亚洲国产精品精华液网站| 欧美乱熟臀69xxxxxx| 日本不卡视频一二三区| 精品视频在线免费看| 日日夜夜免费精品| 久久综合九色综合97婷婷女人| 国内精品自线一区二区三区视频| 日韩中文字幕麻豆| 欧美xfplay| 91网上在线视频| 日一区二区三区| 精品少妇一区二区三区| 亚洲欧美日韩国产一区二区三区| 亚洲成人免费看| 欧美第一区第二区| 久久国产婷婷国产香蕉| 久久嫩草精品久久久久| 国产精品综合网| 欧美激情一区二区| 欧美视频中文字幕| 蜜臂av日日欢夜夜爽一区| 国产日韩av一区| 色综合天天在线| 亚洲电影一级黄| 国产精品毛片高清在线完整版| 日本高清视频一区二区| 另类小说视频一区二区| 精品国产露脸精彩对白 | 亚洲欧美日韩在线| 欧美一区二区三区视频在线| 丁香婷婷深情五月亚洲| 亚洲福利视频导航| 国产欧美久久久精品影院| 欧美视频日韩视频| 大尺度一区二区| 亚洲狠狠爱一区二区三区| 久久久久久久久伊人| 欧美三级电影在线观看| 国产成人免费在线视频| 亚洲国产成人av| 国产精品嫩草99a| 日韩免费观看高清完整版| 99久久精品国产一区二区三区| 亚洲国产综合色| 国产精品久久久久久久久图文区| 日韩三级在线观看| 在线视频国内自拍亚洲视频| 国产乱码一区二区三区| 午夜电影网亚洲视频| 一区二区三区在线观看国产| 国产欧美日韩卡一| 欧美三级一区二区| 国产成人高清视频| 精品一区二区三区视频| 亚洲成人免费视频| 亚洲午夜久久久久| 亚洲色图欧洲色图| 中文字幕精品在线不卡| 久久众筹精品私拍模特| 日韩一区二区三区免费看 | 最近中文字幕一区二区三区| 久久中文字幕电影| 久久亚洲欧美国产精品乐播| 欧美群妇大交群中文字幕| 99久久精品免费观看| jlzzjlzz亚洲女人18| 成人av免费观看| www.日韩av| av电影在线不卡| 国产伦理精品不卡| 久久精品国产一区二区三区免费看| 亚洲永久免费av| 国产精品福利av| 国产精品乱人伦| 国产精品久久夜| 亚洲欧洲综合另类| 亚洲精品国产无套在线观| 久久麻豆一区二区| 91精品国产色综合久久久蜜香臀| 欧美日韩aaaaaa| 91精品福利在线一区二区三区| 宅男在线国产精品| 欧美成人精品二区三区99精品| 欧美日韩精品电影| 欧美色图免费看| 色天天综合久久久久综合片| 欧美亚洲一区二区在线观看| 欧美日韩一级二级三级| 欧美电影免费观看高清完整版在线| 久久影院视频免费| 国产精品久久久久影院老司| 亚洲少妇最新在线视频| 色呦呦一区二区三区| 在线观看www91| 久久午夜老司机| 亚洲v中文字幕| 成人深夜视频在线观看| 91精品国产aⅴ一区二区| 国产精品乱码久久久久久| 日本女人一区二区三区| 波多野结衣在线一区| 日韩天堂在线观看| 亚洲精品日韩专区silk| 精品一区二区三区不卡 | 国产成人免费网站| 欧美天堂一区二区三区| 国产日韩精品久久久| 青草国产精品久久久久久| 91麻豆6部合集magnet| 久久精品网站免费观看| 舔着乳尖日韩一区| 91美女片黄在线观看91美女| 国产色综合一区| 久久机这里只有精品| 欧美久久久久免费| 亚洲精品高清视频在线观看| 福利一区二区在线| 久久综合资源网| 麻豆精品国产传媒mv男同| 色国产综合视频| 亚洲欧美中日韩| 成人深夜视频在线观看| 精品国产91乱码一区二区三区| 亚洲一区免费观看| 成人av在线一区二区三区| 久久免费视频色| 国产精品一区专区| 精品久久久久久无| 久久er精品视频| 欧美va亚洲va香蕉在线| 伦理电影国产精品| 日韩精品一区二区在线| 秋霞av亚洲一区二区三| 欧美一区二区精品在线| 日本午夜一区二区| 欧美一区在线视频|