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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? modulelib.c

?? vxworks系統(tǒng)的源代碼 不容錯(cuò)過(guò)
?? C
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
/* moduleLib.c - object module management library */ /* Copyright 1992-1996 Wind River Systems, Inc. */#include "copyright_wrs.h" /*modification history--------------------01r,15mar99,c_c  Doc: updated moduleSegAdd () (SPR #6138).01q,27sep96,pad  reinstated a line I deleted accidentally.01p,11sep96,pad  strengthened group number handling (SPR #7133).01o,10oct95,jdi  doc: added .tG Shell to SEE ALSO for moduleShow();		 changed .pG Cross-Dev to .tG; corrections to moduleCreate().01n,14mar93,jdi  fixed documentation for moduleDelete().01m,15feb93,kdl  changed documentation for moduleFlagsGet().01l,12feb93,jmm  changed documentation for moduleDelete ()01k,27nov92,jdi  documentation cleanup.01j,30oct92,jmm  moduleSegInfoGet() now zeros out info structure (spr 1702)                 moduleFindByName () gets just the name part of moduleName		     (spr 1718)01i,14oct92,jdi  made moduleInit() and moduleTerminate() NOMANUAL.01h,12oct92,jdi  fixed mangen problem in moduleCreateHookDelete().01g,27aug92,jmm  changed moduleSegInfoGet() to use new MODULE_SEG_INFO struct                 changed symFlags to flags		 added moduleNameGet(), moduleFlagsGet()		 set ctors and dtors to NULL in moduleInit()01f,31jul92,jmm  cleaned up forward declarations01e,30jul92,smb  changed format for printf to avoid zero padding.01d,28jul92,jmm  made NODE_TO_ID macro portable to i96001c,20jul92,jmm  removed checksum() routine (duplicate of routine in cksumLib.c)                 removed bzero() of segment id from moduleSegGet()		 added check for HIDDEN_MODULE flag to moduleDisplayGeneric()01b,18jul92,smb  Changed errno.h to errnoLib.h.01a,jmm,01may92  written */ /*DESCRIPTIONThis library is a class manager, using the standard VxWorks class/objectfacilities.  The library is used to keep track of which object moduleshave been loaded into VxWorks, to maintain information about objectmodule segments associated with each module, and to track whichsymbols belong to which module.  Tracking modules makes it possible tolist which modules are currently loaded, and to unload them whenthey are no longer needed.The module object contains the following information:    - name    - linked list of segments, including base addresses      and sizes    - symbol group number    - format of the object module (a.out, COFF, ECOFF, etc.)    - the <symFlag> passed to ld() when the module was      loaded.  (For more information about <symFlag> and the      loader, see the manual entry for loadLib.)Multiple modules with the same name are allowed (the same module maybe loaded without first being unloaded) but "find" functions find themost recently created module.The symbol group number is a unique number for each module, used toidentify the module's symbols in the symbol table.  This number isassigned by moduleLib when a module is created.In general, users will not access these routines directly, with theexception of moduleShow(), which displays information about currentlyloaded modules.  Most calls to this library will be from routines inloadLib and unldLib.INCLUDE FILES: moduleLib.hSEE ALSO: loadLib,.tG "Cross-Development"*/#include "vxWorks.h"#include "classLib.h"#include "dllLib.h"#include "errnoLib.h"#include "moduleLib.h"#include "objLib.h"#include "pathLib.h"#include "semLib.h"#include "stdio.h"#include "stdlib.h"#include "stddef.h"#include "string.h"#include "vxLib.h"#include "loadLib.h"#define NODE_TO_ID(pNode) (pNode != NULL ? (MODULE_ID) ((char *) pNode - \				         offsetof (MODULE, moduleNode)) : NULL)typedef struct    {    DL_NODE node;    FUNCPTR func;    } MODCREATE_HOOK;/* forward declarations */ LOCAL STATUS moduleDestroy (MODULE_ID moduleId, BOOL dealloc);LOCAL STATUS moduleDisplayGeneric (MODULE_ID moduleId, UINT options);LOCAL STATUS moduleSegInfoGet (MODULE_ID moduleId,			       MODULE_SEG_INFO *pModSegInfo);LOCAL BOOL   moduleCheckSegment (SEGMENT_ID segmentId);LOCAL BOOL   moduleCheckOne (MODULE_ID moduleId, int options);LOCAL STATUS moduleInsert (MODULE_ID newModule);/* LOCALS */static BOOL	 moduleLibInitialized = FALSE; /* prevent multiple inits */LOCAL OBJ_CLASS	 moduleClass;LOCAL DL_LIST 	 moduleCreateHookList;LOCAL SEM_ID	 moduleCreateHookSem;LOCAL BOOL 	 moduleCreateHookInitialized 	= FALSE;LOCAL BOOL  	 moduleLibDebug 		= FALSE;LOCAL DL_LIST	 moduleList;	/* list of loaded modules */LOCAL SEM_ID	 moduleListSem;	/* semaphore to protect moduleList */LOCAL SEM_ID	 moduleSegSem;	/* semaphore to protect all segment lists */LOCAL FUNCPTR 	 moduleDisplayRtn;/* GLOBALS */CLASS_ID moduleClassId = &moduleClass;/******************************************************************************** moduleLibInit - initialize object module library* * This routine initializes the object module tracking facility.  It* should be called once from usrRoot().* * RETURNS: OK or ERROR.* * NOMANUAL*/STATUS moduleLibInit    (    void    )    {    STATUS      returnValue;	/* function return value */    /*     * If moduleLibInitialized has been set to TRUE, the library's already     * initialized.  Return OK.     */    if (moduleLibInitialized)        return (OK);    /* Initialize the module list and its protecting semaphore */    moduleListSem = semMCreate (SEM_DELETE_SAFE);    dllInit (&moduleList);    /* Initialize the semaphore protecting all segment lists */    moduleSegSem = semMCreate (SEM_DELETE_SAFE);    /* Initialize the create hook list */    moduleCreateHookSem = semMCreate (SEM_DELETE_SAFE);    dllInit (&moduleCreateHookList);    moduleCreateHookInitialized = TRUE;    /*     * Initialize the display routine function pointer.     * Currently, this is hard-coded to moduleDisplayGeneric().     * At some future point, when we need to display other object     * module formats, this will need to be changed.     */    moduleDisplayRtn = moduleDisplayGeneric;    /* Initialize the module class */    returnValue = classInit (moduleClassId, sizeof (MODULE),			     OFFSET (MODULE, objCore),			     (FUNCPTR) moduleCreate, (FUNCPTR) moduleInit,			     (FUNCPTR) moduleDestroy);    /* Library has been initialized, return */    moduleLibInitialized = TRUE;    return (returnValue);    }/******************************************************************************** moduleCreate - create and initialize a module* * This routine creates an object module descriptor.* * The arguments specify the name of the object module file, * the object module format, and an argument specifying which symbols* to add to the symbol table.  See the loadModuleAt() description of <symFlag>* for possibles <flags> values.* * Space for the new module is dynamically allocated.* * RETURNS: MODULE_ID, or NULL if there is an error.** SEE ALSO: loadModuleAt()*/MODULE_ID moduleCreate    (    char *	name,	 /* module name */    int 	format,	 /* object module format */    int		flags	 /* <symFlag> as passed to loader (see loadModuleAt()) */    )    {    MODULE_ID	moduleId;    /* Allocate the object, return NULL if objAlloc() fails */    moduleId = objAlloc (moduleClassId);    if (moduleId == NULL)	{	printf ("errno %#x\n", errnoGet());        return (NULL);	}    /* Call moduleInit() to do the real work */    if (moduleInit (moduleId, name, format, flags) != OK)	{	objFree (moduleClassId, (char *) moduleId);        return (NULL);	}    return (moduleId);    }/******************************************************************************** moduleInit - initialize a module* * This routine initializes an object module descriptor.  Instead of* dynamically allocating the space for the module descriptor,* moduleInit() takes a pointer to an existing MODULE structure to initialize.* The other arguments are identical to the moduleCreate() arguments.* * RETURNS: OK, or ERROR.** NOMANUAL*/STATUS moduleInit    (    MODULE_ID		moduleId,	/* ptr to module to initialize */    char *		name,		/* module name */    int 		format,		/* object module format */    int			flags		/* symFlags as passed to loader */    )    {    static UINT16 	nextGroupNumber = 1;	/* 1 is VxWorks */    MODCREATE_HOOK *	createHookNode;    MODULE_ID		oldModule;		/* ID of previous same module */    MODULE_ID		lastModule;		/* ID of last module in list */    /* Split the name into it's name and path components */    pathSplit (name, moduleId->path, moduleId->name);    /* see if the module was loaded earlier */    semTake (moduleListSem, WAIT_FOREVER);    if ((oldModule = moduleFindByName (moduleId->name)) != NULL)	{	/* we found an old module, mark it as obsolete */	oldModule->flags |= MODULE_REPLACED;	}    /*     * Today, due to a poor/incomplete implementation of the module group     * concept, only 65534 modules can be loaded in a VxWorks session's life.     * The group number counter was simply incremented at each load operation.     * See SPR #7133 for more precisions on the troubles this brought.     *     * Reset the next group number counter to the highest value actually     * available. This is a first step to work around SPR #7133.     */    if ((lastModule = NODE_TO_ID (DLL_LAST (&moduleList))) != NULL)	{	nextGroupNumber = lastModule->group;	nextGroupNumber++;	}	    /* Set the module's group number */    if (nextGroupNumber < MODULE_GROUP_MAX)	{        moduleId->group = nextGroupNumber++;	/* Add the module to the end of the module list */	dllAdd (&moduleList, &moduleId->moduleNode);	}    else	{	/*	 * When all group slots are apparently used, we must walk through the	 * module list and try to find a free group number due to previous	 * unloadings. This is the second step to work around SPR #7133.	 */	if (moduleInsert (moduleId) != OK)	    {            printf ("No free group number. Abort load operation.\n");	    errnoSet (S_moduleLib_MAX_MODULES_LOADED);            return (ERROR);	    }	}    semGive (moduleListSem);        /* Set the module format and flags */    moduleId->flags = flags;    moduleId->format = format;    moduleId->ctors = NULL;    moduleId->dtors = NULL;    /* Initialize the segment list */    if (dllInit (&moduleId->segmentList) != OK)	return (ERROR);        /* Initialize the object stuff */    objCoreInit (&moduleId->objCore, moduleClassId);    /* Call any moduleCreateHook routines */    semTake (moduleCreateHookSem, WAIT_FOREVER);    for (createHookNode = (MODCREATE_HOOK *) DLL_FIRST (&moduleCreateHookList);	 createHookNode != NULL;	 createHookNode = (MODCREATE_HOOK *) DLL_NEXT ((DL_NODE *)						       createHookNode))	{	(* createHookNode->func) (moduleId);	}    semGive (moduleCreateHookSem);        /* If debugging is on, print out the name of the module. */    if (moduleLibDebug)        printf ("Module %s, group %d added\n", moduleId->name, moduleId->group);    return (OK);    }/******************************************************************************** moduleInsert - insert the module in list when possible** This routine walks the module list in order to find a hole in the group* numbering. As soon as a free group number is found, the new module is* inserted in the list and is given the available group number.  ** This routine should be called only when all the group numbers have been* allocated (i.e. when the group number counter reaches its maximum).** WARNING: the module list semaphore must be taken by the caller.** RETURNS: OK or ERROR if the module could not be inserted.*/LOCAL STATUS moduleInsert    (    MODULE_ID 	newModule		/* module to insert */    )    {    MODULE_ID 	currentModule;		/* module pointer */    MODULE_ID 	nextModule;		/* module pointer */    /* Go through the module list and try to insert the new module */    for (currentModule = NODE_TO_ID (DLL_FIRST (&moduleList));	 currentModule != NULL;	 currentModule = NODE_TO_ID (DLL_NEXT (&currentModule->moduleNode)))	{	nextModule = NODE_TO_ID (DLL_NEXT (&currentModule->moduleNode));	/* Check if we reached the end of the list: this means no room left */	if (nextModule == NULL)	    break;	/* Insert the new module when there is a whole in the group numbers */	if (nextModule->group > (currentModule->group + 1))	    {	    dllInsert (&moduleList, &currentModule->moduleNode,		       &newModule->moduleNode);	    newModule->group = currentModule->group + 1;	    break;	    }	}    if (nextModule == NULL)	return (ERROR);    else	return (OK);    }/******************************************************************************** moduleTerminate - terminate a module* * This routine terminates a static object module descriptor that was* initialized with moduleInit().* * RETURNS: OK or ERROR.* * NOMANUAL*/STATUS moduleTerminate    (    MODULE_ID moduleId		/* module to terminate */    )    {    return (moduleDestroy (moduleId, FALSE));    }/******************************************************************************** moduleDelete - delete module ID information (use unld() to reclaim space)* * This routine deletes a module descriptor, freeing any space that was* allocated for the use of the module ID.** This routine does not free space allocated for the object module itself --* this is done by unld().* * RETURNS: OK or ERROR.*/STATUS moduleDelete    (    MODULE_ID moduleId		/* module to delete */    )    {    return (moduleDestroy (moduleId, TRUE));    }/******************************************************************************** moduleDestroy - destroy module** This is the underlying routine for moduleDelete() and moduleTerminate().* * RETURNS: OK or ERROR.* * NOMANUAL*/LOCAL STATUS moduleDestroy    (    MODULE_ID 	moduleId,	/* module to destroy */    BOOL      	dealloc		/* deallocate memory associated with module */    )    {    SEGMENT_ID	pSegment;	/* temp. storage for deleting segments */    /* Make sure moduleId is a real object of class moduleClassId */    if (OBJ_VERIFY (moduleId, moduleClassId) != OK)  /* validate module id */	{	return (ERROR);	}    objCoreTerminate (&moduleId->objCore);	/* INVALIDATE */    /* Remove the module from the module list */    semTake (moduleListSem, WAIT_FOREVER);    dllRemove (&moduleList, &moduleId->moduleNode);    semGive (moduleListSem);    /* Remove any segment records associated with the module. */    while ((pSegment = moduleSegGet (moduleId)) != NULL)        free (pSegment);    /* Deallocate the module id object itself */    if (dealloc)

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲第一av色| 91麻豆蜜桃一区二区三区| 成人午夜看片网址| 日韩一区二区视频| 一区二区三区免费看视频| 国产一区二三区| 欧美精品一卡二卡| 亚洲乱码国产乱码精品精可以看| 国产一区二区三区四区五区美女| 91精品国产综合久久久久久久 | 欧美亚洲丝袜传媒另类| 国产日韩成人精品| 久久精品国产免费看久久精品| 欧美色国产精品| 亚洲一区二区三区在线| 色悠悠亚洲一区二区| 国产精品久久久久久一区二区三区 | 国产一区二区电影| 精品日本一线二线三线不卡| 视频一区视频二区在线观看| 欧美日韩综合在线免费观看| 亚洲大片免费看| 欧美日韩在线三级| 一区二区三区鲁丝不卡| 色综合中文字幕国产| 精品国产精品一区二区夜夜嗨| 婷婷成人激情在线网| 欧美日韩高清影院| 日韩高清不卡一区| 91精品国产综合久久久久久久 | 在线成人免费观看| 亚洲韩国一区二区三区| 色婷婷久久综合| 亚洲精品写真福利| 日本韩国欧美一区| 亚洲国产视频一区| 91精品国产美女浴室洗澡无遮挡| 日韩精品1区2区3区| 欧美一区二区三区日韩视频| 日韩综合在线视频| 欧美xxxxx牲另类人与| 激情都市一区二区| 欧美国产一区二区在线观看| 97久久超碰国产精品| 亚洲综合区在线| 日韩色在线观看| 狠狠色狠狠色综合日日91app| 欧美国产日韩在线观看| 91原创在线视频| 日韩激情中文字幕| 久久综合色一综合色88| 成人激情小说网站| 天堂在线亚洲视频| 久久综合久久综合九色| 91色综合久久久久婷婷| 天天色天天操综合| 国产日韩欧美综合一区| 在线一区二区三区做爰视频网站| 视频一区在线视频| 中文av字幕一区| 欧美日本韩国一区二区三区视频 | 婷婷成人综合网| 国产亚洲精品aa午夜观看| 91碰在线视频| 精品无码三级在线观看视频| 国产精品久久久久久福利一牛影视| 在线欧美日韩国产| 国产自产v一区二区三区c| 中文字幕在线观看不卡视频| 欧美日韩dvd在线观看| 成人美女视频在线观看| 午夜欧美视频在线观看| 欧美激情综合五月色丁香| 欧美日韩卡一卡二| 成人激情视频网站| 久久成人免费网| 亚洲无人区一区| 欧美国产一区视频在线观看| 欧美一级二级在线观看| 在线一区二区视频| 成人少妇影院yyyy| 久久99精品久久久久久| 亚洲成人激情社区| 日韩一区欧美一区| 国产亚洲精品aa| 日韩女同互慰一区二区| 欧美色综合网站| 99精品在线免费| 高清在线观看日韩| 青青草原综合久久大伊人精品优势| 亚洲精品中文字幕乱码三区| 国产欧美日韩在线| 亚洲精品在线免费观看视频| 欧美一区二区在线播放| 色先锋aa成人| 91在线免费看| 91在线视频免费91| 成人免费毛片片v| 国产综合色精品一区二区三区| 日韩精品91亚洲二区在线观看| 亚洲制服欧美中文字幕中文字幕| 国产精品久久久一本精品| 国产欧美精品一区| 欧美激情一区二区三区不卡| 久久人人97超碰com| 日韩美一区二区三区| 日韩一级精品视频在线观看| 91精品国产色综合久久ai换脸| 久久噜噜亚洲综合| 在线亚洲人成电影网站色www| jiyouzz国产精品久久| 成人黄页在线观看| 99这里只有久久精品视频| 成人爽a毛片一区二区免费| 国产高清不卡二三区| 国产传媒一区在线| 国产成人欧美日韩在线电影| 成人福利视频在线| 99久久精品国产毛片| 欧美中文字幕一二三区视频| 日本久久精品电影| 欧美日韩在线三级| 欧美裸体一区二区三区| 日韩三级免费观看| wwwwww.欧美系列| 国产欧美日韩久久| 国产精品久久久久久久久快鸭| 日韩一区中文字幕| 亚洲国产视频直播| 蜜臀a∨国产成人精品| 国产精品1024| 91婷婷韩国欧美一区二区| 欧美在线|欧美| 日韩欧美中文字幕精品| 精品成人a区在线观看| 欧美国产精品一区二区三区| 亚洲精品国产成人久久av盗摄 | 精品99一区二区三区| 久久久久久久网| 亚洲精品久久嫩草网站秘色| 日韩va亚洲va欧美va久久| 国产精品一级在线| 日本韩国精品一区二区在线观看| 欧美人与禽zozo性伦| 久久久影院官网| 一区二区三区日本| 日本伊人色综合网| 成人手机在线视频| 五月综合激情婷婷六月色窝| 国产欧美一区二区精品性色超碰| 亚洲狠狠丁香婷婷综合久久久| 美女性感视频久久| a亚洲天堂av| 精品少妇一区二区三区 | 久久综合色一综合色88| 伊人夜夜躁av伊人久久| 国产一区二区伦理| 欧美三区在线视频| 国产欧美视频一区二区| 午夜久久久久久电影| 99久久精品费精品国产一区二区| 91精品国产91久久久久久一区二区| 国产精品私人影院| 麻豆成人免费电影| 欧洲中文字幕精品| 成人欧美一区二区三区黑人麻豆| 强制捆绑调教一区二区| 在线看不卡av| 国产精品白丝在线| 国模冰冰炮一区二区| 欧美一区永久视频免费观看| 亚洲激情自拍偷拍| 成人国产精品免费网站| 久久亚洲二区三区| 麻豆一区二区在线| 欧美丝袜自拍制服另类| 亚洲另类在线一区| 91亚洲精华国产精华精华液| 26uuu亚洲综合色| 久久精品国产99国产| 欧美精品在欧美一区二区少妇| 亚洲免费观看高清在线观看| 国产99精品国产| 欧美成人vps| 激情六月婷婷久久| 日韩欧美国产小视频| 免费成人深夜小野草| 91精品国产入口| 麻豆成人av在线| 欧美裸体bbwbbwbbw| 亚洲与欧洲av电影| 欧美在线观看视频在线| 亚洲一区二区三区四区在线观看| 色女孩综合影院| 亚洲黄色性网站| 欧美亚洲尤物久久| 亚洲资源中文字幕| 欧美猛男男办公室激情| 视频在线观看一区二区三区| 制服丝袜中文字幕亚洲|