<< | Thread Index | >> ]    [ << | Date Index | >> ]

To: bytexu <bytexu,AT,sina,DOT,com>
Subject: Re: questions on CIPE.
From: "Damion K. Wilson" <dwilson,AT,ibl,DOT,bm>
Date: Mon, 14 Jul 2003 09:59:01 -0300
Cc: cipe-l,AT,inka,DOT,de
In-reply-to: <20030714061411.18220.qmail@sina.com>
References: <20030714061411.18220.qmail@sina.com>
Reply-to: dwilson,AT,ibl,DOT,bm

Well spotted. It appears that the call to QueueExtract shouldn't be tested 
for 
a return value of p_IRP. It should simply be destructive, i.e. just removing 
any entry of p_IRP in the list.

I'll add that to the list

DKW

On Monday 14 July 2003 03:14 am, you wrote:
> Hello, I've download CIPE Version 2.0-pre15 windows version. And I've done
> some testing on it and found some questions.
> I write a user mode program to open cipe device and
> issue a "WriteFile" operatoin on it. Because kernel has
> no packet for this read operation, WriteFile will be in
> pending state. Then, I let the system in "StandBy" mode.
> After about 10 seconds, I wake up the system, everything
> seems OK, but when I want to close my user mode program,
> I found that the user mode program leave in "Waiting" state without
> quiting. So I check the source code of CIPE:
>
> // In DestroyTapDevice:
>  while (QueueCount (&l_Extension->m_IrpQueue)) if (l_IRP = QueuePop
> (&l_Extension->m_IrpQueue))  ///////////(#1) {
>     CancelIRP (p_Adapter->m_TapDevice, l_IRP);
> }
>
> // In CancelIRP:
> if (p_IRP) if (QueueExtract (&l_Extension->m_IrpQueue, p_IRP) == p_IRP)  
> ////////////////(#2) {
>     IoSetCancelRoutine (p_IRP, NULL);
>     IoReleaseCancelSpinLock (p_IRP->CancelIrql);
>     p_IRP->IoStatus.Status = STATUS_CANCELLED;
>     p_IRP->IoStatus.Information = 0;
>     IoCompleteRequest (p_IRP, IO_NO_INCREMENT);
> }
>
>
> In code (#1), QueuePop has removed the IRP from the list, So what dose (#2)
> mean? Can this "if" statement be true?
>
> Can you tell me what should i do to prevent my program
> from being in "Waiting" state?
>
> BTW, if the system dose not go to "StandBy" mode, it can quit successfully.
>
> Thanks.
>
> regards,
> bytexu
> ______________________________________
> _____________________
> bytexu,AT,sina,DOT,com
> (o)025-4614226-8401
> 51# Muxuyuan street,
> Nanjing,jiangsu,China
> ---------------------
> ===================================================================


<< | Thread Index | >> ]    [ << | Date Index | >> ]