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

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

?? usbfx2lk_queue.cpp

?? VisualC++寫的一個(gè)USB的驅(qū)動(dòng)程序。
?? CPP
?? 第 1 頁 / 共 2 頁
字號(hào):
///////////////////////////////////////////////////////////////////////////////
//
//    (C) Copyright 2005 OSR Open Systems Resources, Inc.
//    All Rights Reserved
//
//    This sofware is supplied for instructional purposes only.
//
//    OSR Open Systems Resources, Inc. (OSR) expressly disclaims any warranty
//    for this software.  THIS SOFTWARE IS PROVIDED  "AS IS" WITHOUT WARRANTY
//    OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION,
//    THE IMPLIED WARRANTIES OF MECHANTABILITY OR FITNESS FOR A PARTICULAR
//    PURPOSE.  THE ENTIRE RISK ARISING FROM THE USE OF THIS SOFTWARE REMAINS
//    WITH YOU.  OSR's entire liability and your exclusive remedy shall not
//    exceed the price paid for this material.  In no event shall OSR or its
//    suppliers be liable for any damages whatsoever (including, without
//    limitation, damages for loss of business profit, business interruption,
//    loss of business information, or any other pecuniary loss) arising out
//    of the use or inability to use this software, even if OSR has been
//    advised of the possibility of such damages.  Because some states/
//    jurisdictions do not allow the exclusion or limitation of liability for
//    consequential or incidental damages, the above limitation may not apply
//    to you.
//
//    OSR Open Systems Resources, Inc.
//    105 Route 101A Suite 19
//    Amherst, NH 03031  (603) 595-6500 FAX: (603) 595-6503
//    email bugs to: bugs@osr.com
//
//
//    MODULE:
//
//      USBFX2LK_Queue.cpp
//
//    ABSTRACT:
//
//      This file contains the routines that handle cancel processing for the 
//      OSR USB FX2 Learning Kit device driver
//
//    AUTHOR(S):
//
//      OSR Open Systems Resources, Inc.
// 
///////////////////////////////////////////////////////////////////////////////
#include "usbfx2lk.h"

#ifdef WPP_TRACING
//
// Include the necessary tmh file - this is 
//  just a matter of course if you're using WPP tracing.
//
extern "C" {
#include "usbfx2lk_queue.tmh"
}

#endif // WPP_TRACING



///////////////////////////////////////////////////////////////////////////////
//
// OsrCsqInsertIoIrp
//
//  This routine is called by the cancel safe queue library
//   when it has a new Irp for us to queue
//
//
//  INPUTS:
//
//      Csq  -  Our cancel safe queue
//
//      Irp  -  The Irp to enqueue
//
//  OUTPUTS:
//
//      None
//
//  RETURNS:
//
//      None
//
//  IRQL:
//
//      Because we're using a spinlcok for synchronization in
//       OsrCsqAcquireIoLock/OsrCsqReleaseIoLock, this 
//       routine will be called at IRQL == DISPATCH_LEVEL.. 
//
//  CONTEXT:
//
//      Arbitrary
//
//  NOTES:
//
//      **Enters and exits with the CancelSafeWriteLock held**
//
///////////////////////////////////////////////////////////////////////////////
#ifdef W2K3
NTSTATUS OsrCsqInsertIoIrpEx(PIO_CSQ Csq,PIRP Irp,PVOID InsertContext)
#else // W2K3
VOID OsrCsqInsertIoIrp(PIO_CSQ Csq,PIRP Irp) 
#endif // W2K3
{
    PUSBFX2LK_EXT      devExt;
//    PIO_STACK_LOCATION ioStack = IoGetCurrentIrpStackLocation(Irp);;

    //
    // We should never be here and not at DISPATCH_LEVEL
    //
    ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);

    //
    // Get a pointer to our device extension...
    // 
#ifdef W2K3
    devExt = (PUSBFX2LK_EXT) InsertContext;
#else // W2K3
    devExt = (PUSBFX2LK_EXT)CONTAINING_RECORD(Csq,USBFX2LK_EXT,CancelSafeIoQueue);
#endif //W2K3


    OsrTracePrint(TRACE_LEVEL_INFORMATION,OSRDBG_READWRITE,
                 ("OsrCsqInsertIoIrp: Inserting Irp 0x%p into the cancel safe queue...\n",
                 Irp));


    //
    // Insert this entry into our write queue. No extra synchronization
    //  needs to be done here since this call will be wrapped in calls
    //  to OsrCsqAcquireIoLock/OsrCsqReleaseIoLock by the CSQ
    //  library...
    //
    InsertTailList(&devExt->IoQueue, &Irp->Tail.Overlay.ListEntry);

#ifdef W2K3
    return STATUS_SUCCESS;
#else // W2K3
    return;
#endif // W2K3
}


///////////////////////////////////////////////////////////////////////////////
//
// OsrCsqRemoveIoIrp
//
//  This routine is called by the cancel safe queue library
//   when it wamts is to remove a Irp from our queue
//
//
//  INPUTS:
//
//      Csq  -  Our cancel safe queue
//
//      Irp  -  The Irp to dequeue
//
//
//  OUTPUTS:
//
//      None
//
//  RETURNS:
//
//      None
//
//  IRQL:
//
//      Because we're using a spinlcok for synchronization in
//       OsrCsqAcquireIoLock/OsrCsqReleaseIoLock, this 
//       routine will be called at IRQL == DISPATCH_LEVEL.. 
//
//  CONTEXT:
//
//      Arbitrary
//
//  NOTES:
//
//      **Enters and exits with the CancelSafeIoLock held**
//
//
///////////////////////////////////////////////////////////////////////////////
VOID OsrCsqRemoveIoIrp(PIO_CSQ Csq,PIRP Irp) 
{

    UNREFERENCED_PARAMETER(Csq);

    //
    // We should never be here and not at DISPATCH_LEVEL
    //
    ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);


    OsrTracePrint(TRACE_LEVEL_INFORMATION,OSRDBG_READWRITE, 
        ("OsrCsqRemoveIoIrp: Removing Irp 0x%p from the cancel safe queue...\n",
                Irp));

    //
    // Remove this entry from our write queue. No extra synchronization
    //  needs to be done here since this call will be wrapped in calls
    //  to OsrCsqAcquireWriteLock/OsrCsqReleaseWriteLock by the CSQ
    //  library...
    //
    RemoveEntryList(&Irp->Tail.Overlay.ListEntry);

    return;

}


///////////////////////////////////////////////////////////////////////////////
//
// OsrCsqPeekNextIoIrp
//
//      We're called here when the CSQ library wants a pointer to the
//      next Irp in the queue
//
//  INPUTS:
//
//      Csq         -  Our cancel safe queue
//
//      Irp         -  The Irp to dequeue
//
//      PeekContext -  The context parameter passed to IoCsqRemoveNextIrp,
//                      in this driver it is not used
//
//  OUTPUTS:
//
//      None
//
//  RETURNS:
//
//      If there is another Irp in the queue, we return its address.
//      Otherwise we return NULL
//
//  IRQL:
//
//      Since we're using a spinlcok for synchronization in
//       OsrCsqAcquireIoLock/OsrCsqReleaseIoLock, this 
//       routine will be called at IRQL == DISPATCH_LEVEL.. 
//
//  CONTEXT:
//
//      Arbitrary
//
//  NOTES:
//
//      **Enters and exits with the CancelSafeIoLock held**
//
///////////////////////////////////////////////////////////////////////////////
PIRP OsrCsqPeekNextIoIrp(PIO_CSQ Csq,PIRP Irp,PVOID PeekContext)
{

    PUSBFX2LK_EXT   devExt;
    PIRP            nextIrp = NULL;
    PLIST_ENTRY     nextEntry;
    PLIST_ENTRY     listHead;

    //
    // We should never be here and not at DISPATCH_LEVEL
    //
    ASSERT(KeGetCurrentIrql() == DISPATCH_LEVEL);

    //
    // Get a pointer to our device extension...
    // 
    devExt = CONTAINING_RECORD(Csq,USBFX2LK_EXT,CancelSafeIoQueue);
    
    listHead = &devExt->IoQueue;

    //
    // If the Irp parameter is NULL, we start with the first Irp
    //  in the queue
    //
    if(Irp == NULL) {       

        OsrTracePrint(TRACE_LEVEL_INFORMATION,OSRDBG_READWRITE, 
                    ("OsrCsqPeekNextIoIrp: Peeking next Irp from the head of the queue...\n"));

        nextEntry = listHead->Flink;

    } else {

        //
        // Otherwise we start with the Irp after the supplied Irp
        //

        OsrTracePrint(TRACE_LEVEL_INFORMATION,OSRDBG_READWRITE, 
                    ("OsrCsqPeekNextIoIrp: Peeking next Irp starting at Irp 0x%p...\n",
                    Irp));

        nextEntry = Irp->Tail.Overlay.ListEntry.Flink;

    }
    
    while(nextEntry != listHead) {
        
        nextIrp = CONTAINING_RECORD(nextEntry, IRP, Tail.Overlay.ListEntry);

        if(PeekContext) {

            //
            // If you passed a PeekContext value when you called
            //  IoCsqRemoveNextIrp, you would do your driver
            //  defined processing here to figure out if 
            //  nextIrp matches the Irp you were looking for
            //

        } else {

            //
            // We don't have any match criteria - just return the 
            // first one we found...
            //
            break;

        }

        nextIrp = NULL;
        
        nextEntry = nextEntry->Flink;

    }

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品在线你懂的| 亚洲视频一区二区在线| 99久久99久久综合| 性感美女久久精品| 欧美韩国日本一区| 日韩欧美一区二区不卡| 欧美在线免费播放| 成人动漫在线一区| 久久疯狂做爰流白浆xx| 国产精品青草综合久久久久99| 日韩一级免费一区| 欧美色欧美亚洲另类二区| 国产成人精品三级| 国产一区二区视频在线播放| 视频一区二区国产| 日韩美女视频19| 56国语精品自产拍在线观看| 成人精品小蝌蚪| 日本三级亚洲精品| 国产精品国产三级国产普通话蜜臀 | 久久精品男人天堂av| 精品伦理精品一区| 欧美性生活久久| 色狠狠一区二区| 97久久超碰精品国产| 国产69精品久久久久毛片| 韩国成人福利片在线播放| 蜜臀久久久久久久| 日本不卡123| 另类专区欧美蜜桃臀第一页| 欧美aaa在线| 视频在线观看一区| 亚洲成人福利片| 午夜欧美视频在线观看| 亚洲成人三级小说| 亚洲一区免费观看| 亚洲国产精品自拍| 日精品一区二区三区| 亚洲第一主播视频| 婷婷久久综合九色综合伊人色| 午夜精品免费在线| 三级在线观看一区二区| 日本女人一区二区三区| 免费高清在线视频一区·| 久久疯狂做爰流白浆xx| 狠狠狠色丁香婷婷综合激情| 国产精品羞羞答答xxdd| 国产xxx精品视频大全| 成人av在线播放网址| 91一区在线观看| 欧美色倩网站大全免费| 日韩一区二区视频在线观看| 精品免费99久久| 国产精品色婷婷久久58| 亚洲免费电影在线| 亚洲电影第三页| 久久成人麻豆午夜电影| 国产1区2区3区精品美女| 成人av在线影院| 欧美日韩三级在线| 日韩欧美的一区| 欧美精彩视频一区二区三区| 亚洲私人影院在线观看| 日韩影院免费视频| 国产一区不卡在线| 91一区二区三区在线播放| 欧美日韩在线综合| 精品久久人人做人人爽| 亚洲欧洲日产国码二区| 亚洲bt欧美bt精品777| 精品一区二区三区免费毛片爱| 成人免费观看男女羞羞视频| 欧日韩精品视频| 久久众筹精品私拍模特| 亚洲女同女同女同女同女同69| 丝袜诱惑亚洲看片| 成人午夜激情在线| 欧美色精品在线视频| 国产偷v国产偷v亚洲高清| 一级做a爱片久久| 国产综合色在线| 欧美亚洲禁片免费| 国产欧美日韩视频一区二区| 亚洲一区二区av在线| 国产成人免费在线观看不卡| 欧美影视一区二区三区| 国产午夜精品一区二区| 午夜激情久久久| 成人avav在线| 日韩欧美一区二区免费| 亚洲美女视频一区| 国产一区二区三区免费| 欧美日韩电影一区| 成人欧美一区二区三区黑人麻豆| 视频一区二区国产| 色综合中文字幕国产| 91精品久久久久久久99蜜桃| 亚洲欧洲三级电影| 寂寞少妇一区二区三区| 在线免费一区三区| 国产精品欧美久久久久一区二区 | 国产高清精品网站| 欧美日韩精品欧美日韩精品一| 亚洲国产精品av| 久久69国产一区二区蜜臀| 精品视频在线免费| 中文字幕五月欧美| 国产精品一卡二卡在线观看| 7777女厕盗摄久久久| 亚洲天堂福利av| 国产激情一区二区三区四区| 日韩一本二本av| 亚洲gay无套男同| 91女人视频在线观看| 国产欧美日韩一区二区三区在线观看| 蜜桃久久久久久久| 欧美日韩另类一区| 一区二区三区在线免费视频| 99精品国产视频| 欧美国产日韩a欧美在线观看| 紧缚奴在线一区二区三区| 欧美一级片免费看| 日韩成人午夜电影| 欧美精品一级二级| 日韩精品亚洲一区| 91麻豆精品91久久久久同性| 亚洲bdsm女犯bdsm网站| 欧美日韩一二三区| 亚洲一二三区视频在线观看| 欧美性三三影院| 亚洲电影第三页| 欧美精品黑人性xxxx| 日韩电影在线免费| 日韩精品一区二区在线观看| 美脚の诱脚舐め脚责91| 精品三级av在线| 国产制服丝袜一区| 久久综合九色综合欧美98| 精彩视频一区二区| 久久久久久电影| 成人一级黄色片| 国产精品女主播在线观看| 不卡一卡二卡三乱码免费网站| 国产精品久久午夜夜伦鲁鲁| a在线播放不卡| 亚洲男人的天堂一区二区| 91色九色蝌蚪| 亚洲va中文字幕| 欧美一级高清片在线观看| 麻豆91免费观看| 久久精品亚洲麻豆av一区二区| 成人涩涩免费视频| 亚洲精品国产品国语在线app| 欧美午夜一区二区| 日本不卡一区二区三区| 久久亚洲欧美国产精品乐播| 成人福利电影精品一区二区在线观看| 亚洲视频每日更新| 欧美高清精品3d| 国产剧情一区二区三区| 1区2区3区欧美| 欧美三级电影在线看| 久久国产日韩欧美精品| 欧美激情中文字幕一区二区| 色噜噜夜夜夜综合网| 亚洲成va人在线观看| 欧美精品一区二区高清在线观看| 成人午夜伦理影院| 午夜精品免费在线| 国产视频亚洲色图| 欧美色图天堂网| 国产在线精品一区二区不卡了 | 亚洲欧美在线高清| 欧美三级电影网站| 国产一区二区三区观看| 亚洲人成网站精品片在线观看 | 亚洲国产经典视频| 欧美午夜片在线看| 国产高清不卡二三区| 亚洲一区二区在线播放相泽 | 一区二区三区精品久久久| 91精品国产一区二区三区| 国产成人免费在线观看不卡| 亚洲一区二区精品视频| www国产亚洲精品久久麻豆| 91在线国产观看| 极品少妇xxxx精品少妇偷拍| 中文字幕一区二区在线观看| 欧美mv日韩mv国产| 在线免费观看日本一区| 国产精品系列在线观看| 天天影视涩香欲综合网| 日本一区二区电影| 日韩美女一区二区三区| 在线这里只有精品| 丁香网亚洲国际| 久久99精品久久久| 日韩精品每日更新| 亚洲激情自拍偷拍| 国产精品人人做人人爽人人添|