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

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

?? vmlib.c

?? vxworks的完整的源代碼
?? C
?? 第 1 頁 / 共 3 頁
字號:
    /* set the state of all the global memory we just created */     for (i = 0; i < numDescArrayElements; i++)        {        thisDesc = &pMemDescArray[i];	if (vmStateSet (&sysVmContext, thisDesc->virtualAddr, thisDesc->len,		thisDesc->initialStateMask, thisDesc->initialState) == ERROR)	    return (NULL);        }    currentContext = &sysVmContext;    MMU_CURRENT_SET (sysVmContext.mmuTransTbl);    if (enable)	if (MMU_ENABLE (TRUE) == ERROR)	    return (NULL);    return (&sysVmContext);    }/********************************************************************************* vmContextCreate - create a new virtual memory context (VxVMI Option)** This routine creates a new virtual memory context.  The newly created* context does not become the current context until explicitly installed by* a call to vmCurrentSet().  Modifications to the context state (mappings,* state changes, etc.) may be performed on any virtual memory context, even* if it is not the current context.** This routine should not be called from interrupt level.** AVAILABILITY* This routine is distributed as a component of the unbundled virtual memory* support option, VxVMI.** RETURNS: A pointer to a new virtual memory context, or * NULL if the allocation or initialization fails.*/VM_CONTEXT_ID vmContextCreate (void)    {    VM_CONTEXT_ID context;    /* call the vm class's memory allocator to get memory for the object */    context = (VM_CONTEXT *) objAlloc ((OBJ_CLASS *) vmContextClassId);    if (context == NULL)	return (NULL);    if (vmContextInit (context) == ERROR)	{	objFree ((OBJ_CLASS *) vmContextClassId, (char *) context);	return (NULL);	}        return (context);    }/********************************************************************************* vmContextInit - initialize VM_CONTEXT structures** This routine may be used to initialize static definitions of VM_CONTEXT* structures, instead of dynamically creating the object with* vmContextCreate().  Note that virtual memory contexts created in this* manner may not be deleted.** This routine should not be called from interrupt level.** AVAILABILITY* This routine is distributed as a component of the unbundled virtual memory* support option, VxVMI.** RETURNS: OK, or ERROR if the translation table cannot be created.** NOMANUAL*/STATUS vmContextInit     (    VM_CONTEXT *pContext    )    {    objCoreInit (&pContext->objCore, (CLASS_ID) vmContextClassId);    semMInit (&pContext->sem, mutexOptionsVmLib);    pContext->mmuTransTbl = MMU_TRANS_TBL_CREATE ();    if (pContext->mmuTransTbl == NULL)	return (ERROR);    lstAdd (&vmContextList, &pContext->links);    return (OK);    }/********************************************************************************* vmContextDelete - delete a virtual memory context (VxVMI Option)** This routine deallocates the underlying translation table associated with* a virtual memory context.  It does not free the physical memory already* mapped into the virtual memory space.** This routine should not be called from interrupt level.** AVAILABILITY* This routine is distributed as a component of the unbundled virtual memory* support option, VxVMI.** RETURNS: OK, or ERROR if <context> is not a valid context descriptor or* if an error occurs deleting the translation table.*/STATUS vmContextDelete     (    VM_CONTEXT_ID context    )    {    if (OBJ_VERIFY (context, vmContextClassId) != OK)	return (ERROR);    /* take the context's mutual exclusion semaphore - this is really      * inadequate.     */    semTake (&context->sem, WAIT_FOREVER);    /* invalidate the object */    objCoreTerminate (&context->objCore);    if (MMU_TRANS_TBL_DELETE (context->mmuTransTbl) == ERROR)	return (ERROR);    lstDelete (&vmContextList, &context->links);    free (context);    return (OK);    }/********************************************************************************* vmStateSet - change the state of a block of virtual memory (VxVMI Option)** This routine changes the state of a block of virtual memory.  Each page* of virtual memory has at least three elements of state information:* validity, writability, and cacheability.  Specific architectures may* define additional state information; see vmLib.h for additional* architecture-specific states.  Memory accesses to a page marked as* invalid will result in an exception.  Pages may be invalidated to prevent* them from being corrupted by invalid references.  Pages may be defined as* read-only or writable, depending on the state of the writable bits.* Memory accesses to pages marked as not-cacheable will always result in a* memory cycle, bypassing the cache.  This is useful for multiprocessing,* multiple bus masters, and hardware control registers.** The following states are provided and may be or'ed together in the * state parameter:  ** .TS* tab(|);* l2 l2 l .* VM_STATE_VALID     | VM_STATE_VALID_NOT     | valid/invalid* VM_STATE_WRITABLE  | VM_STATE_WRITABLE_NOT  | writable/write-protected* VM_STATE_CACHEABLE | VM_STATE_CACHEABLE_NOT | cacheable/not-cacheable* .TE** Additionally, the following masks are provided so that only specific* states may be set.  These may be or'ed together in the `stateMask' parameter. **  VM_STATE_MASK_VALID*  VM_STATE_MASK_WRITABLE*  VM_STATE_MASK_CACHEABLE** If <context> is specified as NULL, the current context is used.** This routine is callable from interrupt level.** AVAILABILITY* This routine is distributed as a component of the unbundled virtual memory* support option, VxVMI.** RETURNS: OK or, ERROR if the validation fails, <pVirtual> is not on a page* boundary, <len> is not a multiple of page size, or the* architecture-dependent state set fails for the specified virtual address.** ERRNO: * S_vmLib_NOT_PAGE_ALIGNED,* S_vmLib_BAD_STATE_PARAM,* S_vmLib_BAD_MASK_PARAM*/STATUS vmStateSet     (    VM_CONTEXT_ID context, 	/* context - NULL == currentContext         */    void *pVirtual, 		/* virtual address to modify state of       */    int len, 			/* len of virtual space to modify state of  */    UINT stateMask, 		/* state mask                               */    UINT state			/* state                                    */    )    {    FAST int	pageSize 	= vmPageSize;    FAST char *	thisPage 	= (char *) pVirtual;    FAST UINT 	numBytesProcessed = 0;    UINT 	archDepState;    UINT 	archDepStateMask;    STATUS 	retVal 		= OK;    if (!vmLibInfo.vmLibInstalled)	return (ERROR);    if (context == NULL)	context = currentContext;    if (OBJ_VERIFY (context, vmContextClassId) != OK)	return (ERROR);    if (NOT_PAGE_ALIGNED (thisPage))	{	errno = S_vmLib_NOT_PAGE_ALIGNED;        return (ERROR); 	}    if (NOT_PAGE_ALIGNED (len))	{	errno = S_vmLib_NOT_PAGE_ALIGNED;        return (ERROR); 	}    if (state > NUM_PAGE_STATES)	{	errno = S_vmLib_BAD_STATE_PARAM;	return (ERROR);	}    if (stateMask > NUM_PAGE_STATES)	{	errno = S_vmLib_BAD_MASK_PARAM;	return (ERROR);	}    archDepState = vmStateTransTbl [state];    archDepStateMask = vmMaskTransTbl [stateMask];    while (numBytesProcessed < len)        {        if (MMU_STATE_SET (context->mmuTransTbl, thisPage,                         archDepStateMask, archDepState) == ERROR)           {	   retVal = ERROR;	   break;	   }        thisPage += pageSize;	numBytesProcessed += pageSize;	}    return (retVal);    }/********************************************************************************* vmStateGet - get the state of a page of virtual memory (VxVMI Option)** This routine extracts state bits with the following masks: **  VM_STATE_MASK_VALID*  VM_STATE_MASK_WRITABLE*  VM_STATE_MASK_CACHEABLE** Individual states may be identified with the following constants:** .TS* tab(|);* l2 l2 l .* VM_STATE_VALID    | VM_STATE_VALID_NOT     | valid/invalid* VM_STATE_WRITABLE | VM_STATE_WRITABLE_NOT  | writable/write-protected* VM_STATE_CACHEABLE| VM_STATE_CACHEABLE_NOT | cacheable/not-cacheable* .TE** For example, to see if a page is writable, the following code would be used:** .CS*     vmStateGet (vmContext, pageAddr, &state);*     if ((state & VM_STATE_MASK_WRITABLE) & VM_STATE_WRITABLE)*        ...* .CE** If <context> is specified as NULL, the current virtual memory context * is used.** This routine is callable from interrupt level.** AVAILABILITY* This routine is distributed as a component of the unbundled virtual memory* support option, VxVMI.** RETURNS: OK, or ERROR if <pageAddr> is not on a page boundary, the* validity check fails, or the architecture-dependent state get fails for* the specified virtual address.** ERRNO: S_vmLib_NOT_PAGE_ALIGNED*/STATUS vmStateGet     (    VM_CONTEXT_ID context, 	/* context - NULL == currentContext */    void *pPageAddr, 		/* virtual page addr                */    UINT *pState		/* where to return state            */    )    {    UINT archDepStateGotten;    int j;    if (context == NULL)	context = currentContext;    if (OBJ_VERIFY (context, vmContextClassId) != OK)	return (ERROR);    if (NOT_PAGE_ALIGNED (pPageAddr))	{	errno = S_vmLib_NOT_PAGE_ALIGNED;        return (ERROR); 	}    *pState = 0;    if (MMU_STATE_GET (context->mmuTransTbl,		       pPageAddr, &archDepStateGotten) == ERROR)	return (ERROR);    /* translate from arch dependent state to arch independent state */    for (j = 0; j < mmuStateTransArraySize; j++)	{	STATE_TRANS_TUPLE *thisTuple = &mmuStateTransArray[j];	UINT archDepMask = thisTuple->archDepMask;	UINT archDepState = thisTuple->archDepState;	UINT archIndepState = thisTuple->archIndepState;	if ((archDepStateGotten & archDepMask) == archDepState)	    *pState |= archIndepState;	}    return (OK);    }/********************************************************************************* vmMap - map physical space into virtual space (VxVMI Option)** This routine maps physical pages into a contiguous block of virtual* memory.  <virtualAddr> and <physicalAddr> must be on page boundaries, and* <len> must be evenly divisible by the page size.  After the call to* vmMap(), the state of all pages in the the newly mapped virtual memory is* valid, writable, and cacheable.** The vmMap() routine can fail if the specified virtual address space* conflicts with the translation tables of the global virtual memory space.* The global virtual address space is architecture-dependent and is* initialized at boot time with calls to vmGlobalMap() by* vmGlobalMapInit().  If a conflict results, `errno' is set to* S_vmLib_ADDR_IN_GLOBAL_SPACE.  To avoid this conflict, use* vmGlobalInfoGet() to ascertain which portions of the virtual address space* are reserved for the global virtual address space.  If <context> is* specified as NULL, the current virtual memory context is used.** This routine should not be called from interrupt level.** AVAILABILITY* This routine is distributed as a component of the unbundled virtual memory* support option, VxVMI.** RETURNS: OK, or ERROR if <virtualAddr> or <physicalAddr> are not * on page boundaries, <len> is not a multiple of the page size, * the validation fails, or the mapping fails.** ERRNO:* S_vmLib_NOT_PAGE_ALIGNED,* S_vmLib_ADDR_IN_GLOBAL_SPACE*/STATUS vmMap     (    VM_CONTEXT_ID context, 	/* context - NULL == currentContext   */    void *virtualAddr, 		/* virtual address                    */    void *physicalAddr,		/* physical address                   */    UINT len			/* len of virtual and physical spaces */    )    {    int pageSize = vmPageSize;    char *thisVirtPage = (char *) virtualAddr;    char *thisPhysPage = (char *) physicalAddr;    FAST UINT numBytesProcessed = 0;    STATUS retVal = OK;    if (context == NULL)	context = currentContext;    if (OBJ_VERIFY (context, vmContextClassId) != OK)	return (ERROR);    if (NOT_PAGE_ALIGNED (thisVirtPage))	{	errno = S_vmLib_NOT_PAGE_ALIGNED;        return (ERROR); 	}    if ((!mmuPhysAddrShift) && (NOT_PAGE_ALIGNED (thisPhysPage)))	{	errno = S_vmLib_NOT_PAGE_ALIGNED;        return (ERROR); 	}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩三级中文字幕| 亚洲日本免费电影| 美腿丝袜在线亚洲一区| 日韩三级免费观看| 丁香婷婷综合五月| 伊人夜夜躁av伊人久久| 欧美人成免费网站| 精品午夜久久福利影院| 国产精品素人一区二区| 91久久国产最好的精华液| 五月婷婷久久综合| 日韩美女精品在线| 成人激情免费网站| 一个色妞综合视频在线观看| 欧美日韩精品三区| 国产一区亚洲一区| 亚洲欧美偷拍三级| 欧美一级夜夜爽| 成人综合婷婷国产精品久久 | 91精品免费在线观看| 久久99国产精品尤物| 国产精品理论在线观看| 欧美精品自拍偷拍| 国产91对白在线观看九色| 香蕉影视欧美成人| 久久综合久久99| 欧美综合一区二区三区| 国产在线精品免费| 亚洲国产精品久久久久秋霞影院| 亚洲精品在线观看网站| 色欧美片视频在线观看| 免费美女久久99| 亚洲色图在线看| 欧美一三区三区四区免费在线看| 国产精品一区一区| 天天影视涩香欲综合网 | 欧美一区二区三区在| 97久久超碰国产精品电影| 久久99久久99精品免视看婷婷| 亚洲精品欧美综合四区| 久久天堂av综合合色蜜桃网| 欧美日韩精品二区第二页| 成人h动漫精品一区二| 蜜臀av性久久久久av蜜臀妖精 | 国产精品白丝av| 丝瓜av网站精品一区二区| 成人免费一区二区三区视频| 精品美女被调教视频大全网站| 在线亚洲一区观看| 粉嫩久久99精品久久久久久夜| 日韩中文字幕不卡| 亚洲精品视频一区二区| 国产精品卡一卡二| 欧美精彩视频一区二区三区| 欧美α欧美αv大片| 欧美日韩一区二区欧美激情| av亚洲精华国产精华精华| 九九热在线视频观看这里只有精品 | 国产麻豆精品在线| 美女视频第一区二区三区免费观看网站| 国产精品青草综合久久久久99| 久久无码av三级| 久久久五月婷婷| 精品日韩在线一区| 日韩写真欧美这视频| 91精品综合久久久久久| 精品视频一区二区不卡| 欧美在线观看视频一区二区三区| 成人精品鲁一区一区二区| 国产69精品久久久久毛片| 国产不卡高清在线观看视频| 国产成人综合在线观看| 岛国av在线一区| 99久久免费视频.com| www.欧美.com| 色偷偷88欧美精品久久久| 91免费视频网址| 在线看国产一区二区| 欧美这里有精品| 777亚洲妇女| 日韩欧美一区电影| 久久久久久久久一| 中文字幕日本乱码精品影院| 专区另类欧美日韩| 亚洲成人免费看| 久久精品国产精品亚洲红杏| 国产精品一线二线三线精华| 福利一区在线观看| 一本在线高清不卡dvd| 欧美日韩黄色一区二区| 日韩欧美一二三四区| 久久丝袜美腿综合| 亚洲视频在线一区观看| 亚洲第一成人在线| 美女一区二区三区| 岛国精品一区二区| 欧美日韩国产首页| 精品国一区二区三区| 国产精品情趣视频| 亚洲一二三四在线| 国内精品免费**视频| av亚洲产国偷v产偷v自拍| 色综合天天视频在线观看| 欧美日韩亚洲综合一区二区三区 | 成人免费毛片嘿嘿连载视频| 91一区在线观看| 日韩一区二区三区精品视频 | 欧美亚洲动漫另类| 日韩精品中文字幕一区二区三区| 国产三级一区二区| 亚洲女女做受ⅹxx高潮| 日韩国产欧美在线播放| 国产.欧美.日韩| 欧美日韩亚洲另类| 国产亚洲欧美在线| 亚洲va韩国va欧美va| 国产精品99久久久久| 欧美色涩在线第一页| 国产夜色精品一区二区av| 亚洲综合色噜噜狠狠| 国产精品一区久久久久| 精品1区2区3区| 中文字幕乱码日本亚洲一区二区| 夜夜精品浪潮av一区二区三区| 国产在线精品一区二区三区不卡 | 亚洲婷婷在线视频| 久99久精品视频免费观看| 一本到三区不卡视频| 欧美成人一区二区| 美国欧美日韩国产在线播放| 成人av网站在线观看免费| 777xxx欧美| 怡红院av一区二区三区| 国产成人亚洲精品狼色在线| 欧美一区二区三区四区视频| 亚洲乱码精品一二三四区日韩在线| 精东粉嫩av免费一区二区三区| 91久久香蕉国产日韩欧美9色| 精品国产百合女同互慰| 日本在线观看不卡视频| 91高清视频在线| 日本一区二区综合亚洲| 免费在线看成人av| 欧美色电影在线| 亚洲六月丁香色婷婷综合久久 | 午夜天堂影视香蕉久久| 在线视频国产一区| 亚洲视频一区二区在线观看| 国产精品一区二区在线观看网站 | 美腿丝袜亚洲色图| 51精品视频一区二区三区| 亚洲一区免费视频| 91黄色免费版| 亚洲激情av在线| 色狠狠一区二区| 亚洲精品视频一区二区| 99久久精品免费| 1区2区3区国产精品| 成人禁用看黄a在线| 色婷婷综合久久久久中文一区二区 | 日韩欧美在线影院| 丝瓜av网站精品一区二区| 欧美日韩免费一区二区三区视频 | 欧美一区二区三区在线看| 午夜精品影院在线观看| 欧美性大战xxxxx久久久| 亚洲已满18点击进入久久| 91国在线观看| 亚洲影视资源网| 欧美女孩性生活视频| 日韩影院免费视频| 911精品国产一区二区在线| 天天色图综合网| 欧美一级免费大片| 精品亚洲国内自在自线福利| 久久午夜老司机| 岛国一区二区三区| 亚洲精品国产一区二区精华液| 日本韩国精品在线| 午夜精品久久久久| 欧美大片一区二区| 夫妻av一区二区| 亚洲人成精品久久久久| 欧美另类高清zo欧美| 免费成人美女在线观看.| 久久影视一区二区| 成人黄色av网站在线| 亚洲女爱视频在线| 制服丝袜成人动漫| 国产乱人伦精品一区二区在线观看 | 亚洲精品视频在线| 欧美一区二区精品久久911| 国产福利精品一区二区| 日韩理论片网站| 欧美一区二区在线视频| 国产盗摄一区二区三区| 亚洲乱码精品一二三四区日韩在线| 制服丝袜成人动漫| 不卡影院免费观看| 日韩成人午夜电影|