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

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

?? osslib.c

?? Vxworks5.5的USB驅(qū)動(dòng)程序,包括主機(jī)和設(shè)備型
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* ossLib.c - O/S-independent services for vxWorks *//* Copyright 2000-2002 Wind River Systems, Inc. *//*Modification history--------------------01f,22jan02,wef  All USB memory now comes from a cacheDmaMalloc'd partition.  		 Instrument routines to get partition information.01e,25oct01,wef  changed ossMalloc to call memalign instead of malloc - it now		 returns buffers that are a multiple of a cache line size 		 aligned on a cache line boundary01d,18sep01,wef  merge from wrs.tor2_0.usb1_1-f for veloce01c,01aug01,rcb  fixed manpage generation in comments01b,07mar00,rcb  Cast handles as necessary to reflect change in handle		 definition from UINT32 to pVOID.01a,07jun99,rcb  First.*//*DESCRIPTIONImplements functions defined by ossLib.h.  See ossLib.h fora complete description of these functions.*//* includes */#include "vxWorks.h"#include "stdio.h"#include "stdlib.h"#include "string.h"#include "errnoLib.h"		/* errno */#include "sysLib.h"		/* sysClkRateGet(), etc. */#include "taskLib.h"		/* taskSpawn(), etc. */#include "semLib.h"		/* semCreate(), etc. */#include "objLib.h"		/* S_objLib_OBJ_xxxx errors */#include "tickLib.h"		/* tickGet(), etc. */#include "cacheLib.h"		/* cacheDmaMalloc, Free */#include "usb/usbPlatform.h"#include "usb/ossLib.h" 	/* Our API *//* Defines *//* #define  FILL_MEMORY */	    /* for debugging *//* Definitions related to the creation of new threads. */#define DEFAULT_OPTIONS     0	    /* task options */#define DEFAULT_STACK	    0x4000  /* Default stack size *//*  * TIMEOUT() calculates the number of ticks for a timeout from a blockFlag * parameter to one of the ossLib functions. */#define TIMEOUT(bf) (((bf) == OSS_BLOCK) ? \    WAIT_FOREVER : ((bf) + msecsPerTick - 1) / msecsPerTick)#define USB_MEM_PART_DEF_SIZE 0x10000	/* 0x10000  Default 					 * partition size - 64k 					 *//* typedefs *//* globals *//* Default to using the partition method of malloc / free. */FUNCPTR ossMallocFuncPtr;FUNCPTR ossFreeFuncPtr;/* locals */LOCAL int msecsPerTick = 55;	    /* milliseconds per system tick */				    /* value updated by ossInitialize() */LOCAL BOOL 	ossPartInitFlag = TRUE;LOCAL char *  	pUsbMemSpace; LOCAL PART_ID 	usbMemPartId;LOCAL UINT32 	usbMemPartSize = USB_MEM_PART_DEF_SIZE;LOCAL UINT32 	usbMemCount = 0;LOCAL UINT32 	ossOldInstallFlag = FALSE;/* Functions *//***************************************************************************** translateError - translates vxWorks error to S_ossLib_xxxx** Translates certain vxWorks errno values to an appropriate S_ossLib_xxxx.* This function should only be invoked when the caller has already* ascertained that a vxWorks function has returned an error.** RETURNS: S_ossLib_xxxx** ERRNO:*  S_ossLib_BAD_HANDLE*  S_ossLib_TIMEOUT*  S_ossLib_GENERAL_FAULT*/LOCAL int translateError (void)    {    switch (errno)	{	case S_objLib_OBJ_ID_ERROR:	return S_ossLib_BAD_HANDLE;	case S_objLib_OBJ_TIMEOUT:	return S_ossLib_TIMEOUT;	default:			return S_ossLib_GENERAL_FAULT;	}    }/***************************************************************************** translatePriority - translates OSS_PRIORITY_xxx to vxWorks priority** RETURNS: vxWorks task priority*/LOCAL int translatePriority    (    UINT16 priority    )    {    int curPriority;    switch (priority)	{	case OSS_PRIORITY_LOW:	case OSS_PRIORITY_TYPICAL:	case OSS_PRIORITY_HIGH:	case OSS_PRIORITY_INTERRUPT:	    return priority;	case OSS_PRIORITY_INHERIT:	default:	    taskPriorityGet (0, &curPriority);	    return curPriority;	}    }/***************************************************************************** threadHead - vxWorks taskSpawn() compatible thread entry point** ossThreadCreate() uses this intermediary function to spawn threads.  The* vxWorks taskSpawn() function passes 10 int parameters to the task entry* point.  By convention, ossThreadCreate passes the function's real entry* point in <arg1> and the thread's <param> in <arg2>..*/LOCAL int threadHead    (    int arg1,			    /* <func> in this parameter */    int arg2,			    /* <param> in this parameter */    int arg3,    int arg4,    int arg5,    int arg6,    int arg7,    int arg8,    int arg9,    int arg10    )        {    THREAD_PROTOTYPE func = (THREAD_PROTOTYPE) arg1;    pVOID param = (pVOID) arg2;    (*func) (param);    return 0;    }/***************************************************************************** ossStatus - Returns OK or ERROR and sets errno based on status** If <status> & 0xffff is not equal to zero, then sets errno to the* indicated <status> and returns ERROR.  Otherwise, does not set errno* and returns OK.** RETURNS: OK or ERROR*/STATUS ossStatus     (    int status    )    {    if ((status & 0xffff) != 0)	{	errnoSet (status);	return ERROR;	}        return OK;    }/***************************************************************************** ossShutdown - Shuts down ossLib** This function should be called once at system shutdown if an only if* the corresponding call to ossInitialize() was successful.** RETURNS: OK or ERROR*/STATUS ossShutdown (void)    {    return OK;    }/***************************************************************************** ossThreadCreate - Spawns a new thread** The ossThreadCreate() function creates a new thread which begins execution * with the specified <func>.  The <param> argument will be passed to <func>.  * The ossThreadCreate() function creates the new thread with a stack of a * default size and with no security restrictions - that is, there are no * restrictions on the use of the returned <pThreadHandle> by other threads.  * The newly created thread will execute in the same address space as the * calling thread.  <priority> specifies the thread's desired priority - in* systems which implement thread priorities, as OSS_PRIORITY_xxxx.  ** RETURNS: OK or ERROR** ERRNO:*  S_ossLib_BAD_PARAMETER*  S_ossLib_GENERAL_FAULT*/STATUS ossThreadCreate     (    THREAD_PROTOTYPE func,	    /* function to spawn as new thread */    pVOID param,		    /* Parameter to be passed to new thread */    UINT16 priority,		    /* OSS_PRIORITY_xxxx */    pCHAR name, 		    /* thread name or NULL */    pTHREAD_HANDLE pThreadHandle    /* Handle of newly spawned thread */    )    {    /* validate params */    if (pThreadHandle == NULL)	return ossStatus (S_ossLib_BAD_PARAMETER);    /* Use vxWorks to spawn a new thread (task in vxWorks parlance). */    if ((*pThreadHandle = (THREAD_HANDLE) taskSpawn (name, 	translatePriority (priority), DEFAULT_OPTIONS, DEFAULT_STACK, 	threadHead, (int) func, (int) param, 0, 0, 0, 0, 0, 0, 0, 0)) == 	(THREAD_HANDLE) ERROR)	return ossStatus (S_ossLib_GENERAL_FAULT);    return OK;    }/***************************************************************************** ossThreadDestroy - Attempts to destroy a thread** This function attempts to destroy the thread specified by <threadHandle>.** NOTE: Generally, this function should be called only after the given* thread has terminated normally.  Destroying a running thread may result* in a failure to release resources allocated by the thread.** RETURNS: OK or ERROR** ERRNO:*  S_ossLib_GENERAL_FAULT*/STATUS ossThreadDestroy     (    THREAD_HANDLE threadHandle	    /* handle of thread to be destroyed */    )    {    if (taskDelete ((int) threadHandle) == ERROR)	return ossStatus (S_ossLib_GENERAL_FAULT);    return OK;    }    /***************************************************************************** ossThreadSleep - Voluntarily relinquishes the CPU** Threads may call ossThreadSleeph() to voluntarily release the CPU to* another thread/process.  If the <msec> argument is 0, then the thread will* be reschuled for execution as soon as possible.  If the <msec> argument is* greater than 0, then the current thread will sleep for at least the number* of milliseconds specified.** RETURNS: OK or ERROR*/STATUS ossThreadSleep    (    UINT32 msec 		    /* Number of msec to sleep */    )    {    /* Delay for a number of ticks at least as long as the number of    milliseconds requested by the caller. */    taskDelay ((msec == 0) ? 0 : ((msec + msecsPerTick - 1) / msecsPerTick) + 1);    return OK;    }/***************************************************************************** ossSemCreate - Creates a new semaphore** This function creates a new semaphore and returns the handle of that* semaphore in <pSemHandle>.  The semaphore's initial count is set to* <curCount> and has a maximum count as specified by <maxCount>.** RETURNS: OK or ERROR* * ERRNO:*  S_ossLib_BAD_PARAMETER*  S_ossLib_GENERAL_FAULT*/STATUS ossSemCreate     (    UINT32 maxCount,		    /* Max count allowed for semaphore */    UINT32 curCount,		    /* initial count for semaphore */    pSEM_HANDLE pSemHandle	    /* newly created semaphore handle */    )    {    /* Validate parameters */    if (pSemHandle == NULL) 	return ossStatus (S_ossLib_BAD_PARAMETER);    if ((*pSemHandle = (SEM_HANDLE) semCCreate (SEM_Q_FIFO, curCount)) == NULL)	return ossStatus (S_ossLib_GENERAL_FAULT);    return OK;    }/***************************************************************************** ossSemDestroy - Destroys a semaphore** Destroys the semaphore <semHandle> created by ossSemCreate().** RETURNS: OK or ERROR** ERRNO:*  S_ossLib_GENERAL_FAULT*/STATUS ossSemDestroy     (    SEM_HANDLE semHandle	    /* Handle of semaphore to destroy */    )    {    if (semDelete ((SEM_ID) semHandle) != OK)	return ossStatus (S_ossLib_GENERAL_FAULT);    return OK;    }/***************************************************************************** ossSemGive - Signals a semaphore** This function signals the sepcified semaphore.  A semaphore may have more* than one outstanding signal, as specified by the maxCount parameter when* the semaphore was created by ossSemCreate().	While the semaphore is at its* maximum count, additional calls to ossSemSignal for that semaphore have no* effect.** RETURNS: OK or ERROR** ERRNO:*  S_ossLib_BAD_HANDLE*/STATUS ossSemGive    (    SEM_HANDLE semHandle	    /* semaphore to signal */    )    {    if (semGive ((SEM_ID) semHandle) != OK)	return ossStatus (S_ossLib_BAD_HANDLE);    return OK;    }/***************************************************************************** ossSemTake - Attempts to take a semaphore** ossSemTake() attempts to "take" the semaphore specified by <semHandle>.* <blockFlag> specifies the blocking behavior.	OSS_BLOCK blocks indefinitely* waiting for the semaphore to be signalled.  OSS_DONT_BLOCK does not block* and returns an error if the semaphore is not in the signalled state.	Other* values of <blockFlag> are interpreted as a count of milliseconds to wait* for the semaphore to enter the signalled state before declaring an error.** RETURNS: OK or ERROR*/STATUS ossSemTake     (    SEM_HANDLE semHandle,	    /* semaphore to take */    UINT32 blockFlag		    /* specifies blocking action */    )    {    if (semTake ((SEM_ID) semHandle, TIMEOUT (blockFlag)) != OK)	return ossStatus (translateError ());    return OK;    }/***************************************************************************** ossMutexCreate - Creates a new mutex** This function creates a new mutex and returns the handle of that* mutex in <pMutexHandle>.  The mutex is created in the "untaken" state.** RETURNS: OK or STATUS** ERRNO:*  S_ossLib_BAD_PARAMETER*  S_ossLib_GENERAL_FAULT*/STATUS ossMutexCreate     (    pMUTEX_HANDLE pMutexHandle	    /* Handle of newly created mutex */    )    {        /* Validate parameters */    if (pMutexHandle == NULL) 	return ossStatus (S_ossLib_BAD_PARAMETER);    if ((*pMutexHandle = (MUTEX_HANDLE) semMCreate (SEM_Q_FIFO)) == NULL)	return ossStatus (S_ossLib_GENERAL_FAULT);    return OK;    }/***************************************************************************** ossMutexDestroy - Destroys a mutex** Destroys the mutex <mutexHandle> created by ossMutexCreate().** RETURNS: OK or ERROR** ERRNO:

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产成人一区二区三区| 狠狠网亚洲精品| 久久精品99国产精品| 国产精品羞羞答答xxdd| 色噜噜狠狠成人中文综合| 亚洲综合无码一区二区| 久久99在线观看| 欧美日韩成人激情| 亚洲欧洲在线观看av| 国产在线播放一区三区四| 欧美美女一区二区在线观看| 最好看的中文字幕久久| 精品人在线二区三区| 一区二区三区**美女毛片| 国产成人精品www牛牛影视| 日韩精品自拍偷拍| 天堂va蜜桃一区二区三区漫画版| 91久久免费观看| 国产精品美女久久久久久久 | 欧美一区二区福利在线| 亚洲日韩欧美一区二区在线| 风间由美一区二区三区在线观看 | 看国产成人h片视频| 欧美性高清videossexo| 国产盗摄视频一区二区三区| 日韩三级视频在线观看| 天天操天天色综合| 欧美日韩国产成人在线免费| 亚洲伊人伊色伊影伊综合网| 在线看日本不卡| 亚洲一区在线视频| 欧美视频中文字幕| 久久成人久久爱| 欧美哺乳videos| 国产在线一区观看| 久久精品视频在线看| 丰满亚洲少妇av| 日韩一区中文字幕| 欧美无砖专区一中文字| 亚洲高清免费视频| 日本一区二区三区在线不卡| 9人人澡人人爽人人精品| 亚洲人成精品久久久久久| 色成人在线视频| 亚洲一区二区精品久久av| 欧美日产国产精品| 久久精品72免费观看| 久久精品一区四区| 国产亚洲综合色| 91色婷婷久久久久合中文| 一区二区欧美国产| 日韩欧美中文一区| 国产成人精品亚洲777人妖| 中文字幕亚洲一区二区va在线| 91天堂素人约啪| 日韩电影在线一区二区三区| 免费精品视频最新在线| 久久网这里都是精品| 99热在这里有精品免费| 石原莉奈在线亚洲三区| 久久众筹精品私拍模特| 色偷偷成人一区二区三区91| 蜜桃视频一区二区三区在线观看 | 韩国一区二区视频| 国产精品视频免费看| 欧美三级中文字| 国产999精品久久久久久| 一区二区高清视频在线观看| 精品久久久久久综合日本欧美 | 亚洲精品视频在线观看免费| 欧美三级日韩在线| 国产精品一区二区久激情瑜伽| 日韩理论在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 91亚洲精品一区二区乱码| 日本成人在线不卡视频| 最近日韩中文字幕| 欧美精品一区二区在线播放| 国产精品网站导航| 日韩一区二区免费在线电影| 99久久精品国产精品久久| 久久精品国产网站| 亚洲综合免费观看高清在线观看| 久久久精品tv| 91麻豆精品国产91久久久久| av电影一区二区| 国产高清亚洲一区| 另类小说综合欧美亚洲| 91免费视频观看| 欧美v日韩v国产v| 欧美午夜精品久久久久久孕妇| av毛片久久久久**hd| 国产一区二区伦理片| 麻豆91精品视频| 午夜精品福利一区二区三区av| 综合欧美一区二区三区| 国产亚洲成av人在线观看导航 | 欧美日本一道本在线视频| 国产成人免费av在线| 久久99国产精品久久99| 午夜精品123| 亚洲电影激情视频网站| 亚洲少妇中出一区| 1024成人网| 国产精品免费久久久久| 中文一区二区在线观看| 久久这里都是精品| 久久综合九色综合97婷婷女人| 亚洲一区免费视频| 亚洲一区二区三区国产| 亚洲毛片av在线| 亚洲精品久久嫩草网站秘色| 亚洲素人一区二区| 亚洲视频在线观看三级| 国产精品初高中害羞小美女文| 国产精品视频yy9299一区| 欧美高清在线视频| 国内精品第一页| 国产一区日韩二区欧美三区| 韩日av一区二区| 成人在线视频一区| 97精品国产露脸对白| 日本韩国一区二区三区视频| 日本电影亚洲天堂一区| 欧美揉bbbbb揉bbbbb| 欧美精品在线一区二区| 日韩午夜精品电影| 日本视频在线一区| 久久 天天综合| 粉嫩绯色av一区二区在线观看| 成人av影视在线观看| 91色视频在线| 8x8x8国产精品| 久久久精品人体av艺术| 最新不卡av在线| 日本怡春院一区二区| 国产呦萝稀缺另类资源| 久久久久九九视频| 亚洲码国产岛国毛片在线| 丝袜美腿亚洲一区二区图片| 国产一区二区精品久久| 一本到三区不卡视频| 欧美一区二区免费| 国产精品久久久久永久免费观看 | 中文字幕不卡三区| 色婷婷综合久久久久中文一区二区 | 亚洲观看高清完整版在线观看| 天堂一区二区在线| 国产不卡一区视频| 欧美伊人久久久久久久久影院| 日韩免费一区二区| 成人欧美一区二区三区白人 | 欧美一区二区视频在线观看2020 | 亚洲r级在线视频| 国模套图日韩精品一区二区| 成人免费毛片app| 欧美一区日本一区韩国一区| 国产精品网站在线| 免费久久99精品国产| 色欧美乱欧美15图片| 精品国精品国产| 亚洲二区在线视频| 国产精品一区三区| 亚洲精品国产高清久久伦理二区| 久久精品国产网站| 欧美日韩精品一区视频| 国产精品久久毛片| 国产一区二区三区国产| 欧美三级中文字幕在线观看| 亚洲国产精品成人综合色在线婷婷| 日本va欧美va瓶| 日本福利一区二区| 国产精品成人一区二区三区夜夜夜| 六月丁香婷婷久久| 亚洲欧美日韩一区二区 | 蜜桃一区二区三区在线观看| av电影一区二区| 国产人成亚洲第一网站在线播放| 三级久久三级久久久| 91福利视频久久久久| 国产精品久久国产精麻豆99网站| 欧美体内she精高潮| 成人欧美一区二区三区| 国产精品亚洲成人| 久久中文字幕电影| 精品在线播放免费| 欧美成人性战久久| 青草av.久久免费一区| 69堂亚洲精品首页| 亚洲第一会所有码转帖| 在线观看区一区二| 有码一区二区三区| 国产精品乱码人人做人人爱| 久久不见久久见中文字幕免费| 欧美精品久久天天躁| 亚洲成人动漫在线免费观看| 欧美在线免费播放| 亚洲电影在线播放| 欧美精品日韩精品| 蜜臀国产一区二区三区在线播放 |