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

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

?? workqlib.c

?? vxwork源代碼
?? C
字號(hào):
/* workQLib.c - wind work queue library *//* Copyright 1988-1998 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------01u,09nov01,dee  add CPU_FAMILY != COLDFIRE01t,03mar00,zl   merged SH support into T201u,18dec00,pes  Correct compiler warnings01t,09oct00,pai  added Ping's (pfl) fix for scheduler problem, spr 2864801s,29oct97,cth  removed references to scrPad for WV2.0 for real01r,31jul97,nps  WindView 2.0 - remove reference to scratchPad.01t,18feb98,cdp  undo 01s: put ARM back in list of optimised CPUs.01s,21oct97,kkk  undo 01r, take out ARM from list of optimized CPUs.01r,22apr97,jpd  added ARM to list of non-portable CPUs.01q,24jun96,sbs  made windview instrumentation conditionally compiled01n,21mar95,dvs  removed tron references.01m,09jun93,hdn  added a support for I80X8601p,03nov94,rdc  changed where interrupts get locked in workQDoWork.01o,01sep94,rdc  fixed spr 3442 (scratch pad mismanagement in portable version)01n,10dec93,smb  added instrumentation for windview01l,04jul92,jcf  private header files.01k,26may92,rrr  the tree shuffle01j,15oct91,ajm  added MIPS to list of optimized CPU's.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 TINY and UTINY to INT8 and UINT8		  -changed VOID to void		  -changed copyright notice01h,26sep91,hdn  added TRON to list of non-portable CPU's.01g,24jul91,del  added I960 to list of non-portable CPU's.01f,29dec90,gae  added forward declaration of workQPanic.01e,28sep90,jcf  documentation.01d,01aug90,jcf  added queue overflow panic.01c,15jul90,jcf  made workQDoWork () callable from itself, for watchdogs01b,11may90,jcf  fixed up PORTABLE definition.01a,14jun89,jcf	 written.*//*DESCRIPTIONThe VxWorks kernel provides tasking control services to an application.  Thelibraries kernelLib, taskLib, semLib, tickLib, and wdLib comprise the kernelfunctionality.  This library is internal to the VxWorks kernel and containsno user callable routines.INTERNALThese routines manage the wind work queue.  The work queue is used to queuekernel work that must be deferred because the kernel is already engaged byanother request.  Kernel work deferred to the work queue must originatefrom an interrupt service routine.The work queue is an example of a single reader/multiple writer queue.The reader is always the first task or interrupt that enters the kernel, andthat reader is responsible for emptying the work queue before leaving.  Thework queue writers are from interrupt service routines so the interrupts mustbe locked during work queue write manipulations, but need not be locked duringread operations.The work queue is implemented is implemented as a 1K byte ring buffer.  Eachring entry, or JOB, is 16 bytes in size.  So the ring has 64 entries.  Theselection of this size is based on the efficiency of indexing the work queuewith a single byte index.  To advance the index, all we have to do is add fourto the index, and if our arithmatic is 8 bit, the overflow will be discarded.The efficiency lies in the fact that we have no conditionals to test for ringwrap around.This library should be optimized whenever possible, because the work queueshould scream.CAVEATSTwo constraints make the future of this library somewhat cloudy.  Thelimits of 64 jobs and 16 byte jobs are pretty much hard coded in.  So itslikely that this implementation will give way someday to meet future needs.It remains the most efficient mechanism for the work queue today.SEE ALSO: workALib, windLib, and windALib.NOMANUAL*/#include "vxWorks.h"#include "intLib.h"#include "sysLib.h"#include "errno.h"#include "rebootLib.h"#include "private/workQLibP.h"#include "private/funcBindP.h"/* * optimized version available for 680X0, I960, MIPS, I80X86, SH, * ARM (excluding Thumb) */#if (defined(PORTABLE) || \     ((CPU_FAMILY != MC680X0) && \      (CPU_FAMILY != I960) && \      (CPU_FAMILY != MIPS) && \      (CPU_FAMILY != I80X86) && \      (CPU_FAMILY != SH) && \      (CPU_FAMILY != COLDFIRE) && \      (CPU_FAMILY != ARM)) || \     ((CPU_FAMILY == ARM) && ARM_THUMB))#define workLib_PORTABLE#endif/* globals */volatile UINT8 workQReadIx;		/* circular work queue read index */volatile UINT8 workQWriteIx;		/* circular work queue read index */volatile BOOL  workQIsEmpty;		/* TRUE if work queue is empty */int   pJobPool [WIND_JOBS_MAX * 4];	/* pool of memory for jobs *//********************************************************************************* workQInit - initialize the wind work queue** This routine sets the read and write index to their initial values of zero.*/void workQInit (void)    {    workQReadIx  = workQWriteIx = 0;	/* initialize the indexes */    workQIsEmpty = TRUE;		/* the work queue is empty */    }#ifdef workLib_PORTABLE/********************************************************************************* workQAdd0 - add work with no parameters to the wind work queue** When the kernel is interrupted, new kernel work must be queued to an internal* work queue.  The work queue is emptied by whatever task or interrupt service* routine that entered the kernel first.  The work is emptied as the last* code of reschedule().** INTERNAL* The work queue is single reader, multiple writer, so we should have to lock* out interrupts while the writer is copying into the ring, but because the* reader can never interrupt a writer, interrupts need only be locked while* we advance the write queue pointer.** RETURNS: OK** SEE ALSO: reschedule().** NOMANUAL*/void workQAdd0    (    FUNCPTR func        /* function to invoke */    )    {    int level = intLock ();		/* LOCK INTERRUPTS */    FAST JOB *pJob = (JOB *) &pJobPool [workQWriteIx];    workQWriteIx += 4;			/* advance write index */    if (workQWriteIx == workQReadIx)	workQPanic ();			/* leave interrupts locked */    intUnlock (level);			/* UNLOCK INTERRUPTS */    workQIsEmpty = FALSE;		/* we put something in it */    pJob->function = func;		/* fill in function */    }/********************************************************************************* workQAdd1 - add work with one parameter to the wind work queue** When the kernel is interrupted, new kernel work must be queued to an internal* work queue.  The work queue is emptied by whatever task or interrupt service* routine that entered the kernel first.  The work is emptied as the last* code of reschedule().** INTERNAL* The work queue is single reader, multiple writer, so we should have to lock* out interrupts while the writer is copying into the ring, but because the* reader can never interrupt a writer, interrupts need only be locked while* we advance the write queue pointer.** RETURNS: OK** SEE ALSO: reschedule()** NOMANUAL*/void workQAdd1    (    FUNCPTR func,       /* function to invoke */    int arg1            /* parameter one to function */    )    {    int level = intLock ();		/* LOCK INTERRUPTS */    FAST JOB *pJob = (JOB *) &pJobPool [workQWriteIx];    workQWriteIx += 4;			/* advance write index */    if (workQWriteIx == workQReadIx)	workQPanic ();			/* leave interrupts locked */    intUnlock (level);			/* UNLOCK INTERRUPTS */    workQIsEmpty = FALSE;		/* we put something in it */    pJob->function = func;		/* fill in function */    pJob->arg1 = arg1;			/* fill in argument */    }/********************************************************************************* workQAdd2 - add work with two parameters to the wind work queue** When the kernel is interrupted, new kernel work must be queued to an internal* work queue.  The work queue is emptied by whatever task or interrupt service* routine that entered the kernel first.  The work is emptied as the last* code of reschedule().** INTERNAL* The work queue is single reader, multiple writer, so we should have to lock* out interrupts while the writer is copying into the ring, but because the* reader can never interrupt a writer, interrupts need only be locked while* we advance the write queue pointer.** RETURNS: OK** SEE ALSO: reschedule().** NOMANUAL*/void workQAdd2    (    FUNCPTR func,       /* function to invoke */    int arg1,           /* parameter one to function */    int arg2            /* parameter two to function */    )    {    int level = intLock ();		/* LOCK INTERRUPTS */    FAST JOB *pJob = (JOB *) &pJobPool [workQWriteIx];    workQWriteIx += 4;			/* advance write index */    if (workQWriteIx == workQReadIx)	workQPanic ();			/* leave interrupts locked */    intUnlock (level);			/* UNLOCK INTERRUPTS */    workQIsEmpty = FALSE;		/* we put something in it */    pJob->function = func;		/* fill in function */    pJob->arg1 = arg1;			/* fill in arguments */    pJob->arg2 = arg2;    }/********************************************************************************* workQDoWork - execute all the work in the work queue** When the kernel is interrupted, new kernel work must be queued to an internal* work queue.  The work queue is emptied by whatever task or interrupt service* routine that entered the kernel first.  The work is emptied by calling this* routine as the last code of reschedule().** INTERNAL* The work queue is single reader, multiple writer, so we should have to lock* out interrupts while the writer is copying into the ring, but because the* reader can never interrupt a writer, interrupts need only be locked while* we advance the write queue pointer.** SEE ALSO: reschedule().** NOMANUAL*/void workQDoWork (void)    {    FAST JOB *pJob;    int oldErrno = errno;			/* save errno */    while (workQReadIx != workQWriteIx)	{        pJob = (JOB *) &pJobPool [workQReadIx];	/* get job */	/* increment read index before calling function, because work function	 * could be windTickAnnounce () that calls this routine as well.	 */	workQReadIx += 4;        (FUNCPTR *)(pJob->function) (pJob->arg1, pJob->arg2);	workQIsEmpty = TRUE;			/* leave loop with empty TRUE */	}    errno = oldErrno;				/* restore _errno */    }#endif	/* workLib_PORTABLE *//********************************************************************************* workQPanic - work queue has overflowed so reboot system** The application has really botched things up if we get here, so we reboot* the system.  An overflow can be detected if the read index is one greater than* the write index.** NOMANUAL*/void workQPanic (void)    {    static char *pWorkQMsg = "\nworkQPanic: Kernel work queue overflow.\n";    while ((*(sysExcMsg++) = *(pWorkQMsg++)) != EOS)	;        sysExcMsg --;    reboot (BOOT_WARM_AUTOBOOT);    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美军同video69gay| 亚洲自拍都市欧美小说| 日韩激情视频在线观看| 日本福利一区二区| 亚洲综合av网| 欧洲亚洲精品在线| 亚洲综合成人网| 欧美日韩在线亚洲一区蜜芽| 久久久久久**毛片大全| 成人av网站免费观看| 久久精品水蜜桃av综合天堂| 亚洲二区视频在线| 在线观看亚洲专区| 久久久99久久| 麻豆91精品91久久久的内涵| 久久疯狂做爰流白浆xx| 7777精品伊人久久久大香线蕉完整版| 亚洲精选在线视频| 欧美日韩亚洲高清一区二区| 亚洲国产日韩av| 欧美一区二区美女| 国产69精品久久久久777| 国产精品免费视频观看| 欧美性三三影院| 国产精一区二区三区| 国产精品二三区| 色婷婷综合久久久久中文一区二区| 亚洲欧美激情插| 日韩欧美亚洲国产另类| 不卡视频免费播放| 五月婷婷综合在线| 欧美日韩一区二区三区不卡| 精品一区二区在线视频| 亚洲视频在线一区观看| 日韩一区二区在线免费观看| 91在线观看下载| 美国精品在线观看| 亚洲一区二区欧美日韩| 久久伊99综合婷婷久久伊| 欧美中文字幕一区二区三区亚洲| 国产精品资源站在线| 日本中文一区二区三区| 一区二区三区色| 亚洲欧美综合另类在线卡通| 久久综合久久鬼色中文字| 日本道免费精品一区二区三区| 国产一区二区精品久久99| 香蕉成人伊视频在线观看| 久久综合九色综合欧美98| 欧美日韩精品免费| 色综合久久综合网| 一本色道久久综合亚洲精品按摩| 国产一区二区三区国产| 国产在线播放一区三区四| 亚洲精品视频在线| 欧美一区二区三区四区五区| 日本韩国精品在线| 色婷婷久久一区二区三区麻豆| 99久久精品国产导航| 国产精品亚洲а∨天堂免在线| 国产成人午夜99999| 韩国三级在线一区| 美国三级日本三级久久99| 一区二区三区不卡视频| 国产日产亚洲精品系列| 国产婷婷一区二区| 亚洲精品成人a在线观看| 一区二区国产视频| 久久99久久精品| 丁香亚洲综合激情啪啪综合| 日本精品一区二区三区四区的功能| 在线观看欧美黄色| 日韩一区二区三区在线视频| 久久综合九色综合欧美亚洲| 国产精品女人毛片| 五月天中文字幕一区二区| 国产一区二区在线免费观看| 波波电影院一区二区三区| 欧美人动与zoxxxx乱| 国产日韩综合av| 免费国产亚洲视频| 91啦中文在线观看| 国产在线播放一区三区四| 国产成人h网站| 国产成人av一区| 欧美日韩日日夜夜| 久久久不卡网国产精品二区 | 亚洲欧洲成人自拍| 精品伊人久久久久7777人| 99精品偷自拍| 久久精品一区二区三区av| 日韩1区2区3区| 欧美人体做爰大胆视频| 亚洲啪啪综合av一区二区三区| 久久福利资源站| 制服丝袜日韩国产| 亚洲成人黄色小说| 色域天天综合网| 国产精品国产三级国产aⅴ中文| 久久国内精品自在自线400部| 欧美午夜精品一区二区三区| 国产日韩欧美亚洲| 欧美日韩中文字幕一区二区| 亚洲日本护士毛茸茸| 国产999精品久久久久久| 国产在线不卡一区| 天天综合日日夜夜精品| 处破女av一区二区| 欧美一区二区三区日韩视频| 久久精品人人爽人人爽| 久色婷婷小香蕉久久| 欧美浪妇xxxx高跟鞋交| 轻轻草成人在线| 欧美白人最猛性xxxxx69交| 国产一区视频导航| 国产网站一区二区| 色欧美片视频在线观看 | 国产成人在线色| 久久亚洲综合色一区二区三区| 久久99蜜桃精品| 欧美精品一区二区三区在线 | 在线视频一区二区免费| 亚洲国产精品一区二区尤物区| 欧美一级精品大片| 国产91对白在线观看九色| 一区二区三国产精华液| 日韩亚洲电影在线| 91在线免费看| 成人黄色a**站在线观看| 亚洲一级二级三级在线免费观看| 在线成人小视频| 色综合天天综合网天天看片| 久久精品噜噜噜成人av农村| 亚洲精品网站在线观看| 久久夜色精品国产欧美乱极品| 91福利在线免费观看| 久久99久久久久| 亚洲高清免费一级二级三级| 久久久精品欧美丰满| 91精品一区二区三区在线观看| 97久久精品人人澡人人爽| 国产一区美女在线| 日本女优在线视频一区二区| 亚洲美腿欧美偷拍| 自拍偷拍欧美精品| 国产精品美女久久久久aⅴ国产馆| 日韩精品最新网址| 欧美老女人第四色| 欧美日产在线观看| 色国产综合视频| 91官网在线观看| 欧美亚洲动漫精品| 欧美日韩欧美一区二区| 在线观看成人小视频| 波多野结衣中文一区| 国产在线精品一区二区不卡了 | 国产精品电影院| 亚洲欧美在线高清| 亚洲欧美自拍偷拍色图| 国产精品短视频| 亚洲国产一区二区三区青草影视| 亚洲免费在线看| 日本中文字幕一区| 韩国av一区二区三区| 国产福利精品导航| 成人性生交大片免费看中文网站| 99久久国产免费看| 国内精品视频666| 久久国产欧美日韩精品| av亚洲精华国产精华| 欧美精品色综合| 亚洲欧洲性图库| 麻豆91精品视频| 欧洲在线/亚洲| 久久香蕉国产线看观看99| 一区二区三区免费看视频| 日韩精品一二三四| 色婷婷综合久色| 国产精品拍天天在线| 日韩专区中文字幕一区二区| av一区二区三区在线| 欧美成人vps| 日韩精彩视频在线观看| 不卡视频在线观看| 久久亚洲精品小早川怜子| 亚洲成人av免费| 色综合欧美在线| 亚洲欧美日韩在线不卡| 国产一区二区伦理片| 2023国产精华国产精品| 洋洋成人永久网站入口| 在线亚洲精品福利网址导航| 亚洲国产精品一区二区www | 在线视频观看一区| 成人激情电影免费在线观看| 一本一道久久a久久精品| 欧美亚洲综合色| 国产性色一区二区| 麻豆91在线播放免费| 91伊人久久大香线蕉|