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

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

?? modulelib.c

?? vxworks的開發
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* 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)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产日产av| 亚洲欧美成aⅴ人在线观看| 日韩一区二区视频| 欧美精品vⅰdeose4hd| 久久精品视频在线免费观看| 国产精品污网站| 91色porny在线视频| 91精品久久久久久久91蜜桃| 蜜乳av一区二区| 欧美精品日韩综合在线| 亚洲色图20p| 美女视频网站黄色亚洲| 7777精品伊人久久久大香线蕉| 国产精品美女视频| 不卡电影一区二区三区| 国产精品久久久久aaaa| 午夜影视日本亚洲欧洲精品| 综合亚洲深深色噜噜狠狠网站| 久久久久久亚洲综合| 五月天久久比比资源色| 成人午夜在线视频| 久久久国产精品不卡| 日韩精品一区第一页| 成人av小说网| 中文字幕av一区二区三区| 日韩av中文字幕一区二区| 欧美久久一二区| 最新热久久免费视频| 激情综合网最新| 欧美精选一区二区| 亚洲视频一区在线| 成人成人成人在线视频| 国产欧美日韩在线观看| 久久国产综合精品| 欧美二区乱c少妇| 日韩国产高清在线| 色婷婷激情综合| 亚洲v中文字幕| 欧美性猛片aaaaaaa做受| 国产精品天干天干在线综合| 高清在线观看日韩| 欧美日韩二区三区| 一区二区不卡在线视频 午夜欧美不卡在| 黄页网站大全一区二区| 欧美日韩在线观看一区二区| 中文字幕一区视频| 成人免费观看男女羞羞视频| 欧美一级二级三级乱码| 日韩高清不卡一区二区| 欧美日韩www| youjizz国产精品| 91福利视频在线| 国产精品美女一区二区| 中文字幕一区二区三区四区不卡| 日韩欧美综合一区| 专区另类欧美日韩| 亚洲欧洲精品天堂一级| 26uuu精品一区二区| 26uuu色噜噜精品一区二区| 欧美一区欧美二区| 欧美一级片免费看| 91精品国产丝袜白色高跟鞋| 欧美手机在线视频| 欧美情侣在线播放| 国产精品热久久久久夜色精品三区| 日韩激情中文字幕| 欧美一区二区三区四区在线观看| 国产米奇在线777精品观看| 国产日韩欧美制服另类| 国产1区2区3区精品美女| 一二三四区精品视频| 国产欧美一区二区三区鸳鸯浴 | 麻豆国产一区二区| 日韩精品一区二区三区在线播放| 成人av在线电影| 亚洲无线码一区二区三区| 色综合久久久网| 日韩一区欧美二区| 亚洲精品一线二线三线无人区| 国产成人免费视频一区| 亚洲免费观看高清完整版在线观看熊| 99久久精品免费看国产免费软件| 亚洲国产一区二区在线播放| 欧美日韩一区精品| 激情小说欧美图片| 综合电影一区二区三区| 精品精品欲导航| 色悠悠久久综合| 国产91丝袜在线播放0| 一区二区在线观看不卡| 久久久精品日韩欧美| 欧洲色大大久久| 九九国产精品视频| 香蕉影视欧美成人| 久久日韩精品一区二区五区| 欧美日韩视频在线第一区| 国产成人精品免费一区二区| 婷婷久久综合九色国产成人 | 亚洲精品国产视频| 7777精品伊人久久久大香线蕉 | av在线一区二区三区| 奇米影视一区二区三区| 日韩一级高清毛片| 欧美性受xxxx黑人xyx| 国产成人精品网址| 国产精品1区2区3区| 日韩和的一区二区| 亚洲国产精品自拍| 国产午夜亚洲精品不卡| 亚洲国产裸拍裸体视频在线观看乱了| 日韩码欧中文字| 国产亲近乱来精品视频| 精品国产乱码久久久久久久 | 一区二区三区四区高清精品免费观看 | 久久狠狠亚洲综合| 亚洲美女区一区| 亚洲日本丝袜连裤袜办公室| 日本一区二区三区视频视频| 91精品国产色综合久久ai换脸 | 欧美精品在线观看一区二区| 9久草视频在线视频精品| 日本不卡在线视频| 日韩福利电影在线| 三级在线观看一区二区 | 国产传媒久久文化传媒| 风间由美一区二区av101| 精品无码三级在线观看视频| 亚洲一区二区三区四区在线| 国产精品国产三级国产| 久久免费美女视频| 国产精品久久久久久久久动漫| 午夜精品国产更新| 久久一夜天堂av一区二区三区| 69成人精品免费视频| 91麻豆精品久久久久蜜臀| 91精品国产综合久久婷婷香蕉 | 亚洲精品视频一区| 国产精品久久网站| 国产一区二区不卡老阿姨| 91视频一区二区| 欧美视频自拍偷拍| 色狠狠色噜噜噜综合网| 欧美性大战久久| www.成人在线| 91片在线免费观看| 欧美午夜免费电影| 欧美视频在线播放| 日韩欧美美女一区二区三区| 日韩精品在线一区二区| 日韩伦理电影网| 日韩和欧美的一区| 国产一级精品在线| 成人午夜免费av| 色婷婷国产精品综合在线观看| 欧美日韩免费电影| 国产日韩在线不卡| 亚洲精选视频免费看| 裸体一区二区三区| av在线不卡电影| 欧美一级片在线看| 国产精品电影一区二区三区| 国产精品丝袜久久久久久app| 亚洲夂夂婷婷色拍ww47| 亚洲精品v日韩精品| 日本视频在线一区| 日本强好片久久久久久aaa| 亚洲你懂的在线视频| 国产亚洲欧洲一区高清在线观看| 精品国产乱子伦一区| 国产精品毛片高清在线完整版| 国产精品久久久久久户外露出 | 国产午夜亚洲精品午夜鲁丝片| 国产清纯在线一区二区www| 综合av第一页| 精品一区二区三区在线视频| 国产精品自拍一区| 日本久久电影网| 亚洲精品一区在线观看| 婷婷久久综合九色国产成人| 国产成人精品三级| 91免费观看国产| 国产欧美一区二区精品久导航| 亚洲永久精品大片| 欧美电影免费观看高清完整版| 国产网站一区二区| 午夜精品视频在线观看| 成人高清av在线| 91一区二区三区在线观看| 国产亚洲va综合人人澡精品| 亚洲成人av一区| 在线观看免费视频综合| 久久众筹精品私拍模特| 日韩av一区二| 在线视频国内自拍亚洲视频| 最新热久久免费视频| 国产乱人伦偷精品视频不卡| 精品国免费一区二区三区| 亚洲精品福利视频网站| 青青青爽久久午夜综合久久午夜| 欧美日韩精品一区二区天天拍小说|