亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
91九色最新地址| 国产精品久99| 日韩av网站在线观看| 欧美人体做爰大胆视频| 日本中文字幕一区二区有限公司| 欧美精选午夜久久久乱码6080| 亚洲二区在线视频| 欧美一区二区三区爱爱| 久久爱另类一区二区小说| 久久日韩精品一区二区五区| 国产 日韩 欧美大片| 亚洲另类在线视频| 欧美日韩一本到| 精品一区二区三区在线播放视频 | 亚洲午夜日本在线观看| 欧美日本一区二区三区四区| 麻豆精品新av中文字幕| 国产欧美日韩精品a在线观看| 91丨九色丨蝌蚪富婆spa| 一区二区三区四区视频精品免费| 777亚洲妇女| 不卡视频一二三| 丝袜美腿亚洲一区| 国产日韩精品一区二区三区| 91色乱码一区二区三区| 日本不卡高清视频| 欧美激情一区二区| 欧美日韩在线播放三区| 国产黄色成人av| 亚洲图片欧美综合| 久久久久国产成人精品亚洲午夜| 一区二区三区中文字幕| 国模娜娜一区二区三区| 欧美日韩视频在线第一区| 国产日韩欧美精品在线| 日韩中文欧美在线| 色婷婷香蕉在线一区二区| 日韩三级视频在线观看| 日韩影院精彩在线| 欧美亚洲国产一卡| 亚洲第一会所有码转帖| 秋霞影院一区二区| 国产欧美日韩另类一区| 在线成人av网站| av在线这里只有精品| 七七婷婷婷婷精品国产| 亚洲资源在线观看| 国产精品日产欧美久久久久| 日韩一区二区三区四区五区六区| av电影天堂一区二区在线观看| 久久精品av麻豆的观看方式| 亚洲午夜激情网站| 中文字幕视频一区二区三区久| 欧美电视剧免费全集观看| 欧美无人高清视频在线观看| 不卡视频一二三| 国产**成人网毛片九色 | 中文字幕亚洲成人| 精品免费国产二区三区| 欧美午夜精品理论片a级按摩| 99久久精品一区| 豆国产96在线|亚洲| 韩国视频一区二区| 久久国产剧场电影| 日韩黄色小视频| 午夜精品久久久久久久蜜桃app| 国产精品理伦片| 国产女人18水真多18精品一级做| 久久综合色一综合色88| 欧美tk丨vk视频| 日韩欧美国产一二三区| 日韩一级黄色片| 日韩精品一区二区在线| 日韩免费在线观看| 精品奇米国产一区二区三区| 日韩区在线观看| 日韩精品一区二区三区在线观看 | 一区二区三区四区视频精品免费 | 欧美日韩一区在线| 亚洲第四色夜色| 久久久午夜精品理论片中文字幕| 色哟哟精品一区| 99re成人精品视频| 日本美女一区二区三区视频| 亚洲免费在线电影| 99久久国产综合精品女不卡| 五月天精品一区二区三区| 亚洲综合网站在线观看| 亚洲另类春色国产| 亚洲女女做受ⅹxx高潮| 亚洲激情自拍偷拍| 午夜免费久久看| 欧美a级一区二区| 精品无人区卡一卡二卡三乱码免费卡| 久久疯狂做爰流白浆xx| 国产精品99久久久久久久vr | 国产麻豆精品在线| 国产成人亚洲综合a∨婷婷图片| 成人久久视频在线观看| 91美女蜜桃在线| 欧美久久一二三四区| 2020国产精品自拍| 中文字幕在线不卡国产视频| 亚洲国产成人av| 国产精品一区二区久久精品爱涩| 成人美女视频在线观看18| 在线看国产一区| 日韩欧美一区二区视频| 欧美老肥妇做.爰bbww| 久久久无码精品亚洲日韩按摩| 中文字幕av不卡| 91精品国产91热久久久做人人| 欧美日本一区二区| 久久久www成人免费毛片麻豆 | 亚洲欧洲性图库| 首页亚洲欧美制服丝腿| 国产成人综合在线| 欧美日韩一区二区三区视频| 久久天天做天天爱综合色| 久久精品国产秦先生| 久久se这里有精品| 3atv在线一区二区三区| 国产日韩欧美亚洲| 亚洲综合一区二区三区| 老司机免费视频一区二区三区| 91麻豆产精品久久久久久 | a级精品国产片在线观看| 成人福利在线看| 日韩一区二区三| 一级女性全黄久久生活片免费| 在线电影国产精品| 91久久精品网| 久久精品视频一区| 日本欧美大码aⅴ在线播放| av激情成人网| 26uuu精品一区二区| 性做久久久久久久免费看| 成人a区在线观看| 精品毛片乱码1区2区3区| 亚洲一区二区三区爽爽爽爽爽| 丁香婷婷深情五月亚洲| 欧美一区午夜视频在线观看| 一区二区三区 在线观看视频| 国产乱码一区二区三区| 91精品国产综合久久小美女| 亚洲精品成a人| 成人av电影在线| 国产婷婷色一区二区三区四区| 美国三级日本三级久久99| 日韩一区二区电影在线| 亚洲欧美一区二区三区孕妇| 国产黑丝在线一区二区三区| 欧美一级日韩免费不卡| 午夜国产不卡在线观看视频| 色诱视频网站一区| 国产精品理伦片| 成人动漫一区二区| 国产精品美女久久久久久久久| 精品一区二区三区免费播放| 欧美一区二区三区在线| 天天av天天翘天天综合网| 色狠狠色狠狠综合| 亚洲精品一二三四区| 91在线无精精品入口| 亚洲欧洲精品一区二区精品久久久 | 国产精品毛片久久久久久久| 久久99久国产精品黄毛片色诱| 欧美日韩黄色影视| 一区二区三区视频在线观看| 91国偷自产一区二区三区观看 | 成人午夜在线播放| 久久久午夜精品理论片中文字幕| 久久成人免费电影| 国产呦精品一区二区三区网站| 国产成人免费xxxxxxxx| 日韩一区在线免费观看| 欧美人狂配大交3d怪物一区| 国产成人av福利| 午夜视频在线观看一区二区| 日韩一区二区三区观看| 成人av中文字幕| 亚洲制服欧美中文字幕中文字幕| 欧美大尺度电影在线| 97精品电影院| 99麻豆久久久国产精品免费 | 午夜成人免费电影| 欧美图区在线视频| 天天综合天天做天天综合| 欧美日韩大陆在线| 男女性色大片免费观看一区二区| 欧美大黄免费观看| 高清免费成人av| 亚洲午夜免费视频| 欧美va天堂va视频va在线| 成人免费高清视频| 亚洲宅男天堂在线观看无病毒| 91精品国产综合久久香蕉麻豆| 国产91丝袜在线18| 亚洲午夜在线观看视频在线| 欧美一级在线视频|