I need to block indefinetly on an Event in my Ndis Driver
I am setting 0 for MsToWait in NdisWaitEvent. But
NdisWaitEvent at times comes out of the wait even if no NdisSetEvent is issued.
Am i missing something ? Any one any clue ?
Regards
Anandhi
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Your other question about NdisMSleep() leads me to the assumption you
are calling NdisWaitEvent() from APC_LEVEL? This is an illegal
operation as NdisWaitEvent() can only be called at PASSIVE_LEVEL.
NDIS drivers usually only know of PASSIVE_LEVEL, DISPATCH_LEVEL, and
DIRQL. How come your NDIS driver runs at APC_LEVEL?
Stephan
On 14 Feb 2002 14:58:27 -0000, “Anandhi” wrote:
>Hi,=0A=0AI need to block indefinetly on an Event in my Ndis Driver=0AI am s= >etting 0 for MsToWait in NdisWaitEvent. But =0ANdisWaitEvent at times com= >es out of the wait even if no NdisSetEvent is issued. =0A=0AAm i missing so= >mething ? Any one any clue ?=0A=0ARegards=0AAnandhi =0A
— You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’) To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
I need to block indefinetly on an Event in my Ndis Driver
I am setting 0 for MsToWait in NdisWaitEvent. But
NdisWaitEvent at times comes out of the wait even if no NdisSetEvent is
issued.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Your other question about NdisMSleep() leads me to the assumption you
are calling NdisWaitEvent() from APC_LEVEL? This is an illegal
operation as NdisWaitEvent() can only be called at PASSIVE_LEVEL.
NDIS drivers usually only know of PASSIVE_LEVEL, DISPATCH_LEVEL, and
DIRQL. How come your NDIS driver runs at APC_LEVEL?
Stephan
On 14 Feb 2002 14:58:27 -0000, “Anandhi” > wrote: > > >Hi,=0A=0AI need to block indefinetly on an Event in my Ndis Driver=0AI am s= > >etting 0 for MsToWait in NdisWaitEvent. But =0ANdisWaitEvent at times com= > >es out of the wait even if no NdisSetEvent is issued. =0A=0AAm i missing so= > >mething ? Any one any clue ?=0A=0ARegards=0AAnandhi =0A > > — > You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’) > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
— You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’) To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
My code was like
FunctionABC()
{
…
NdisSetEvent(&event)
…
}
WAIT THREAD:
while(bThread)
{
if(condition A)
{
NdisWaitEvent(&event, 0);
NdisResetEvent(&event);
}
.
//do rest of stuff
.
}
The problem with this code is if condition A is not satisfied a reset will
not be done at all. Thus nuber of sets & resets do not match
The code needs to be changed to
WAIT THREAD:
while(bThread)
{
if(condition A)
{
NdisWaitEvent(&event, 0);
}
NdisResetEvent(&event);
.
//do rest of stuff
.
}
Thanx & Regards
Anandhi
On 02/15/02, ““Rajinder Sharma” ” wrote: > I hope in your wait thread, you do something like this : > > WAIT THREAD: > while(bThread) > { > NdisWaitEvent(&event, 0); > NdisResetEvent(&event); > . > //do rest of stuff > . > } > > Good luck. > > > > > > >Hi, > > > >I need to block indefinetly on an Event in my Ndis Driver > >I am setting 0 for MsToWait in NdisWaitEvent. But > >NdisWaitEvent at times comes out of the wait even if no NdisSetEvent is > >issued. > > > >Am i missing something ? Any one any clue ? > > > >Regards > >Anandhi > > > _________________________________________________________________ > Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > > > — > You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’) > To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
— You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’) To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com