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

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

?? loglib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* logLib.c - message logging library *//* Copyright 1984-1995 Wind River Systems, Inc. */#include "copyright_wrs.h"/*modification history--------------------03l,13may02,cyr  fix SPR 32358 documentation clarification on logMsg03k,29oct01,cyr  doc:doc: correct SPR 7113 logMsg03j,30oct95,ism  added simsolaris support03i,09nov94,ms   undid 03h. Bumped stack size for SIMSPARC.03h,17jul94,ms   jacked up the stack size for VxSim/HPPA.03g,24aug93,dvs  added reset of logFdFromRlogin.03f,23aug93,dvs  fixed logFdSet() for rlogin sessions (SPR #2212).03e,15feb93,jdi  fixed doc for logMsg() to mention fixed number of args.03d,21jan93,jdi  documentation cleanup for 5.1.03c,13nov92,jcf  added _func_logMsg initialization.  added include semLibP.h.03b,17jul92,gae  reverted to 02x -- eliminating stdargs change.		 Documentation sprs #600 and #1148 fixed.  Checked		 for null format specifier.03a,18jul92,smb  Changed errno.h to errnoLib.h.02z,26may92,rrr  the tree shuffle02y,04mar92,gae  Used stdargs for logMsg, no longer fixed at 6 parameters.		 Allowed messages to be dropped via global var. logMsgTimeout.		 Reduced stack size from 5000 to 3000.		 Checked for null format specifier.		 Fixed spr #600 (documentation of logMsg).		 Fixed spr #1138 (printing of floating point numbers).		 Fixed spr #1148 (document use of message queues)02x,10dec91,gae  added includes for ANSI.02w,04oct91,rrr  passed through the ansification filter                  -changed functions to ansi style		  -changed VOID to void		  -changed copyright notice02v,01aug91,yao  changed to check for dead task in logTask(). added missing		 arg to lprintf() call.02u,10jun91,del  changed MAX_ARGS to MAX_LOGARGS to silence redef warning.02t,05apr91,jdi	 documentation -- removed header parens and x-ref numbers;		 doc review by dnw.02s,11feb91,jaa	 documentation cleanup.02r,08oct90,dnw  lint02q,05oct90,dnw  changed to new msgQ interface.02p,10aug90,dnw  changed declaration for logMsg from void to int.		 added include of logLib.h.02o,10aug90,kdl  added forward declaration for lprintf.02n,19jul90,dnw  changed to use message queue instead of pipe		 changed logTask stack from 10k to 5k		 spr 641: changed logMsg to return number of bytes written to			msg q or EOF if error writing		 improved module and logMsg doc, esp about volitile args02m,10jul90,dnw  logTask no longer dies with bus error when printing msg from		   interrupt level (fixed to not call taskName(-1))		 changed to use INT_CONTEXT() instead of intContext()02l,26jun90,jcf  changed logTask semaphore to mutex.02k,15apr90,jcf  changed logTask name to tLogTask.02j,14mar90,jdi  documentation cleanup.02i,16sep88,ecs  bumped logTaskStackSize from 2000 to 10000.		 removed architectural assumption from logMsg.02h,14jun89,gae  changed the format of the logMsg's to be more intelligible.02g,07jul88,jcf  made logShow global but NOMANUAL, so lint would let up.02f,22jun88,dnw  name tweaks.02e,06jun88,dnw  changed taskSpawn/taskCreate args.02d,30may88,dnw  changed to v4 names.02c,23apr88,jcf  changed semaphores for new semLib.02b,05apr88,gae  changed fprintf() to fdprintf().  Added debug rtn logShow().02a,26jan88,jcf  made kernel independent.01q,14dec87,gae  changed logMsg() to not have multiple argument decl's for		   parsing by the C interface generator.01p,16nov87,ecs  documentation.01o,03nov87,dnw  changed to let system pick logTask id;		   now available in logTaskId.01n,14oct87,gae  added log{Add,Del}Fd(), allowing multiple logging fds.		 removed NOT_GENERIC stuff.01m,24mar87,jlf  documentation01l,21dec86,dnw  changed to not get include files from default directories.01k,31jul86,llk  uses new spawn01j,09jul86,dnw  restored NOT_GENERIC stuff that got lost in v01i.01i,01jul86,jlf  minor documentation01h,09apr86,dnw  added call to vxSetTaskBreakable to make logTask unbreakable.		 fixed documentation of logMsg().01g,07apr86,dnw  increased logTsk stack from 1000 to 2000.		 corrected errors in documentation.		 added logSetFd().01f,11mar86,jlf  changed GENERIC to NOT_GENERIC01e,20jul85,jlf  documentation.01d,04jan85,ecs  added an ARGSUSED to logMsg, got rid of 'housetime'.01c,19sep84,jlf  cleaned up comments a little01b,07sep84,jlf  added copyright notice and comments.01a,28aug84,dnw  culled from fioLib and enhanced.*//*DESCRIPTIONThis library handles message logging.  It is usually used to display errormessages on the system console, but such messages can also be sent to adisk file or printer.The routines logMsg() and logTask() are the basic components of thelogging system.  The logMsg() routine has the same calling sequence asprintf(), but instead of formatting and outputting the message directly,it sends the format string and arguments to a message queue.  The tasklogTask() waits for messages on this message queue.  It formats eachmessage according to the format string and arguments in the message,prepends the ID of the sender, and writes it on one or more filedescriptors that have been specified as logging output streams (bylogInit() or subsequently set by logFdSet() or logFdAdd()).USE IN INTERRUPT SERVICE ROUTINESBecause logMsg() does not directly cause output to I/O devices, butinstead simply writes to a message queue, it can be called from aninterrupt service routine as well as from tasks.  Normal I/O, such asprintf() output to a serial port, cannot be done from an interrupt serviceroutine.DEFERRED LOGGINGPrint formatting is performed within the context of logTask(), rather thanthe context of the task calling logMsg().  Since formatting can requireconsiderable stack space, this can reduce stack sizes for tasks that onlyneed to do I/O for error output.However, this also means that the arguments to logMsg() are not interpretedat the time of the call to logMsg(), but rather are interpreted at somelater time by logTask().  This means that the arguments to logMsg() shouldnot be pointers to volatile entities.  For example, pointers to dynamic orchanging strings and buffers should not be passed as arguments to be formatted.Thus the following would not give the desired results:.ne 8.CS    doLog (which)	{	char string [100];	strcpy (string, which ? "hello" : "goodbye");	...	logMsg (string);	}.CEBy the time logTask() formats the message, the stack frame of the caller mayno longer exist and the pointer <string> may no longer be valid.On the other hand, the following is correct since the string pointer passedto the logTask() always points to a static string:.CS    doLog (which)	{	char *string;	string = which ? "hello" : "goodbye";	...	logMsg (string);	}.CEINITIALIZATIONTo initialize the message logging facilities, the routine logInit() mustbe called before calling any other routine in this module.  This is doneby the root task, usrRoot(), in usrConfig.c.INCLUDE FILES: logLib.hSEE ALSO: msgQLib,.pG "I/O System"*//* LINTLIBRARY */#include "vxWorks.h"#include "errnoLib.h"#include "logLib.h"#include "ioLib.h"#include "taskLib.h"#include "semLib.h"#include "intLib.h"#include "msgQLib.h"#include "stdio.h"#include "private/semLibP.h"#include "private/funcBindP.h"#define MAX_LOGARGS	6	/* max args to log message */#define MAX_LOGFDS	5	/* max log fds */typedef struct				/* LOG_MSG */    {    int		id;			/* ID of sending task */    char *	fmt;			/* pointer to format string */    int		arg [MAX_LOGARGS];	/* args for format string */    } LOG_MSG;/* logTask parameters */int logTaskId		= 0;int logTaskPriority	= 0;int logTaskOptions	= VX_UNBREAKABLE;#if    CPU_FAMILY == SIMSPARCSUNOS || CPU_FAMILY == SIMSPARCSOLARISint logTaskStackSize    = 8000;#else  /* CPU_FAMILY != SIMSPARCSUNOS */int logTaskStackSize	= 5000;#endif /* CPU_FAMILY == SIMSPARCSUNOS || CPU_FAMILY == SIMSPARCSOLARIS */int mutexOptionsLogLib = SEM_Q_FIFO | SEM_DELETE_SAFE; /* mutex options */int logFdFromRlogin	= NONE;		/* fd of pty for rlogin *//* local variables */LOCAL SEMAPHORE	logFdSem;		/* semaphore for accessing logFd's */LOCAL MSG_Q_ID	logMsgQId = 0;		/* ID of misg q to log task */LOCAL int	logFd [MAX_LOGFDS];	/* output fd's used for logging */LOCAL int	numLogFds = 0;		/* number of active logging fd's */LOCAL int	logMsgsLost = 0;	/* count of log messages lost *//* forward static functions */static void lprintf (char *fmt, int arg1, int arg2, int arg3, int arg4,		     int arg5, int arg6);/********************************************************************************* logInit - initialize message logging library** This routine specifies the file descriptor to be used as the logging* device and the number of messages that can be in the logging queue.  If* more than <maxMsgs> are in the queue, they will be discarded.  A message* is printed to indicate lost messages.** This routine spawns logTask(), the task-level portion of error logging.** This routine must be called before any other routine in logLib.* This is done by the root task, usrRoot(), in usrConfig.c.** RETURNS* OK, or ERROR if a message queue could not be created* or logTask() could not be spawned.*/STATUS logInit    (    int fd,             /* file descriptor to use as logging device */    int maxMsgs         /* max. number of messages allowed in log queue */    )    {    if (logTaskId != 0)	return (ERROR);         /* already called */    logMsgQId = msgQCreate (maxMsgs, sizeof (LOG_MSG), MSG_Q_FIFO);    if (logMsgQId == NULL)	return (ERROR);    logTaskId = taskSpawn ("tLogTask", logTaskPriority,			   logTaskOptions, logTaskStackSize,			   (FUNCPTR)logTask, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);    if (logTaskId == ERROR)	{	/* XXX free message q? */	return (ERROR);	}   _func_logMsg = (FUNCPTR) logMsg;    semMInit (&logFdSem, mutexOptionsLogLib);    logFdSet (fd);    return (OK);    }/********************************************************************************* logMsg - log a formatted error message** This routine logs a specified message via the logging task.  This* routine's syntax is similar to printf() -- a format string is followed* by arguments to format.  However, the logMsg() routine takes a char ** rather than a const char * and requires a fixed number of arguments* (6).** The task ID of the caller is prepended to the specified message.** SPECIAL CONSIDERATIONS* Because logMsg() does not actually perform the output directly to the* logging streams, but instead queues the message to the logging task,* logMsg() can be called from interrupt service routines.** However, since the arguments are interpreted by the logTask() at the* time of actual logging, instead of at the moment when logMsg() is called,* arguments to logMsg() should not be pointers to volatile entities* (e.g., dynamic strings on the caller stack).** logMsg() checks to see whether or not it is running in interupt context. * If it is, it will not block.  However, if invoked from a task, it can * cause the task to block.  *** For more detailed information about the use of logMsg(), see the manual* entry for logLib.*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色视频一区| 亚洲精品国产视频| 国产人久久人人人人爽| ...中文天堂在线一区| 亚洲国产综合色| 成人久久久精品乱码一区二区三区| 国产成人午夜精品影院观看视频| 欧美三级电影精品| 中文字幕综合网| 国产乱淫av一区二区三区| 欧美亚洲国产一区二区三区| 久久精品亚洲麻豆av一区二区| 一区二区三区在线看| 国产成人午夜片在线观看高清观看| 6080午夜不卡| 夜夜亚洲天天久久| 97se亚洲国产综合自在线不卡| 久久噜噜亚洲综合| 日本中文字幕一区二区有限公司| 91麻豆精东视频| 国产欧美精品一区| 久久99国产精品麻豆| 7777精品伊人久久久大香线蕉超级流畅| 中文字幕在线一区免费| 国产高清在线观看免费不卡| 精品国产网站在线观看| 丝袜美腿亚洲一区二区图片| 欧美午夜在线观看| 尤物av一区二区| 99re66热这里只有精品3直播| 亚洲视频小说图片| 成人高清视频在线| 久久久久久97三级| 国产精品一区二区久久不卡| 久久天天做天天爱综合色| 免费在线观看一区二区三区| 欧美一区二区三区系列电影| 天堂va蜜桃一区二区三区| 欧美日韩中文字幕精品| 亚洲综合自拍偷拍| 欧美日韩国产高清一区二区 | 欧美在线看片a免费观看| 日韩毛片高清在线播放| 日本久久一区二区| 亚洲国产一区视频| 日韩一区二区在线观看视频 | 视频一区免费在线观看| 欧美挠脚心视频网站| 丝袜美腿成人在线| 日韩美女一区二区三区| 国产九色精品成人porny | 国产日产亚洲精品系列| 成人免费毛片片v| 亚洲精品成人少妇| 欧美色图12p| 麻豆一区二区在线| 久久精品无码一区二区三区| 成年人国产精品| 亚洲精品久久久蜜桃| 91精品在线一区二区| 久久精品国产精品亚洲精品| 国产三级欧美三级日产三级99| 成人精品一区二区三区中文字幕| 亚洲人精品午夜| 在线播放91灌醉迷j高跟美女| 精品一区二区三区久久久| 欧美韩国日本综合| 欧美日本精品一区二区三区| 韩国v欧美v日本v亚洲v| 日韩美女啊v在线免费观看| 69堂成人精品免费视频| 国产成人在线观看| 亚洲18女电影在线观看| 久久精品亚洲一区二区三区浴池| 欧洲日韩一区二区三区| 国产一区二区三区视频在线播放| 亚洲欧美日韩中文播放| 日韩视频免费观看高清完整版| 成人免费av网站| 日韩在线观看一区二区| 国产精品另类一区| 欧美高清视频一二三区 | 久久aⅴ国产欧美74aaa| 亚洲色图制服诱惑| 久久嫩草精品久久久久| 欧美这里有精品| 国产成人精品亚洲午夜麻豆| 精品一区二区三区免费观看| 亚洲一区影音先锋| 国产精品色哟哟| 精品国产三级a在线观看| 欧美日精品一区视频| 成人午夜电影久久影院| 久久精品999| 亚洲第一综合色| 亚洲精品日韩综合观看成人91| 亚洲精品在线一区二区| 56国语精品自产拍在线观看| 97久久精品人人做人人爽 | 欧美aⅴ一区二区三区视频| 国产精品福利一区二区三区| 久久蜜桃香蕉精品一区二区三区| 91麻豆精品久久久久蜜臀| 91网站最新网址| 成人av电影观看| 国产99一区视频免费| 韩国成人精品a∨在线观看| 日韩精品一区第一页| 亚洲第一电影网| 一区二区三区免费看视频| 18成人在线观看| 国产精品久久夜| 国产精品久久三区| 国产精品网曝门| 国产精品免费久久| 国产欧美日韩精品一区| 国产三级欧美三级| 国产三级精品视频| 欧美国产日本视频| 国产精品视频一二三| 中文一区二区在线观看| 国产精品看片你懂得| 亚洲欧洲精品成人久久奇米网| 国产精品久久网站| 亚洲色图欧洲色图| 亚洲激情第一区| 亚洲午夜成aⅴ人片| 午夜成人免费电影| 三级在线观看一区二区| 免费观看91视频大全| 久久99国内精品| 国产一区二区精品久久| 丰满亚洲少妇av| 一本色道久久综合亚洲精品按摩| 91婷婷韩国欧美一区二区| 在线免费av一区| 717成人午夜免费福利电影| 欧美成人性福生活免费看| 国产午夜精品一区二区三区视频| 中文字幕欧美一区| 亚洲一区二区视频在线观看| 日韩二区三区在线观看| 国产自产高清不卡| av在线这里只有精品| 欧美视频中文字幕| 久久久精品tv| 中文字幕亚洲一区二区av在线| 一区二区久久久| 视频一区二区国产| 成人妖精视频yjsp地址| 在线视频你懂得一区二区三区| 欧美肥胖老妇做爰| 国产欧美精品国产国产专区 | 国产嫩草影院久久久久| 一区二区三区在线免费视频| 久久不见久久见免费视频1| 成人高清免费在线播放| 欧美日韩国产首页| 国产三级三级三级精品8ⅰ区| 亚洲高清在线视频| 成人小视频在线| 在线播放欧美女士性生活| 国产精品女人毛片| 捆绑调教美女网站视频一区| 91色porny蝌蚪| 久久这里只有精品首页| 亚洲动漫第一页| 成人avav在线| 久久久久久99久久久精品网站| 偷拍与自拍一区| 成人精品在线视频观看| 日韩精品一区二区三区在线 | 亚洲欧洲日韩女同| 九一九一国产精品| 久久久久9999亚洲精品| 亚洲成a人v欧美综合天堂| 成人免费视频免费观看| 精品国产乱码久久久久久久久 | 国产一区欧美日韩| 欧美欧美欧美欧美| 一区二区三区在线免费播放 | 中文字幕一区二区三区在线不卡 | 中文字幕一区二区视频| 国内精品不卡在线| 欧美一区永久视频免费观看| 亚洲制服丝袜av| 91网站最新地址| 18成人在线视频| av中文字幕亚洲| 国产精品视频麻豆| 国产精品亚洲人在线观看| 日韩欧美一区在线观看| 日韩黄色免费电影| 欧美精品在线视频| 亚洲成在线观看| 欧美午夜影院一区| 亚洲午夜视频在线| 在线观看精品一区| 夜夜爽夜夜爽精品视频| 欧美在线一二三|