Is it possible to suspend a thread that has an “active” IRP (i.e. IRP is
somewhere inside the driver chain, no STATUS_PENDING returned)?
TIA,
Vladimir
Is it possible to suspend a thread that has an “active” IRP (i.e. IRP is
somewhere inside the driver chain, no STATUS_PENDING returned)?
TIA,
Vladimir
yes, a user-mode thread can get suspended even when it’s running in
kernel mode - unless the thread is at APC level (or higher) or has
entered a critical region (not the same as a critical section … i
don’t have a DDK in front of me so i can’t tell you the function set off
the top of my head). Most of our synchronization mechanisms, with the
exception of events which are really notification primitives, do this.
i don’t believe that system threads will be suspended.
-p
-----Original Message-----
From: Vladimir Chtchetkine [mailto:xxxxx@starbase.com]
Sent: Tuesday, June 04, 2002 4:24 PM
To: NT Developers Interest List
Subject: [ntdev] Suspending thread.
You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%
Any thread, kernel, user, whatever, that is running at < DISPATCH_LEVEL can
be suspended/pre-empted by quantum exhaustion, higher priority ready thread,
or by volunteering to wait for some dispatcher object or other. Being in the
middle of processing an IRP has nothing at all to do with this, other than
the fact that the time the thread spends processing that IRP is charged
against the thread’s quantum.
-----Original Message-----
From: Peter Wieland [mailto:xxxxx@windows.microsoft.com]
Sent: Wednesday, June 05, 2002 11:09 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Suspending thread.yes, a user-mode thread can get suspended even when it’s
running in kernel mode - unless the thread is at APC level
(or higher) or has entered a critical region (not the same as
a critical section … i don’t have a DDK in front of me so i
can’t tell you the function set off the top of my head).
Most of our synchronization mechanisms, with the exception of
events which are really notification primitives, do this.i don’t believe that system threads will be suspended.
-p
-----Original Message-----
From: Vladimir Chtchetkine [mailto:xxxxx@starbase.com]
Sent: Tuesday, June 04, 2002 4:24 PM
To: NT Developers Interest List
Subject: [ntdev] Suspending thread.Is it possible to suspend a thread that has an “active” IRP
(i.e. IRP is somewhere inside the driver chain, no
STATUS_PENDING returned)? TIA,
VladimirYou are currently subscribed to ntdev as:
xxxxx@microsoft.com To unsubscribe send a blank email to
%%email.unsub%%
You are currently subscribed to ntdev as:
xxxxx@stratus.com To unsubscribe send a blank email to
%%email.unsub%%
The call to KeEnterCriticalRegion/KeLeaveCriticalRegion will ensure that
your thread cannot be suspended by some user mode application while
executing a kernel mode code. This is especially true if the driver is
acquiring a resource. A deadlock can occur if the driver acquires a system
wide resource and get suspended.
“Roddy, Mark” wrote in message news:xxxxx@ntdev…
>
> Any thread, kernel, user, whatever, that is running at < DISPATCH_LEVEL
can
> be suspended/pre-empted by quantum exhaustion, higher priority ready
thread,
> or by volunteering to wait for some dispatcher object or other. Being in
the
> middle of processing an IRP has nothing at all to do with this, other than
> the fact that the time the thread spends processing that IRP is charged
> against the thread’s quantum.
>
> > -----Original Message-----
> > From: Peter Wieland [mailto:xxxxx@windows.microsoft.com]
> > Sent: Wednesday, June 05, 2002 11:09 AM
> > To: NT Developers Interest List
> > Subject: [ntdev] RE: Suspending thread.
> >
> >
> > yes, a user-mode thread can get suspended even when it’s
> > running in kernel mode - unless the thread is at APC level
> > (or higher) or has entered a critical region (not the same as
> > a critical section … i don’t have a DDK in front of me so i
> > can’t tell you the function set off the top of my head).
> > Most of our synchronization mechanisms, with the exception of
> > events which are really notification primitives, do this.
> >
> > i don’t believe that system threads will be suspended.
> >
> > -p
> > -----Original Message-----
> > From: Vladimir Chtchetkine [mailto:xxxxx@starbase.com]
> > Sent: Tuesday, June 04, 2002 4:24 PM
> > To: NT Developers Interest List
> > Subject: [ntdev] Suspending thread.
> >
> >
> > Is it possible to suspend a thread that has an “active” IRP
> > (i.e. IRP is somewhere inside the driver chain, no
> > STATUS_PENDING returned)? TIA,
> > Vladimir
> > —
> > You are currently subscribed to ntdev as:
> > xxxxx@microsoft.com To unsubscribe send a blank email to
> > %%email.unsub%%
> >
> > —
> > You are currently subscribed to ntdev as:
> > xxxxx@stratus.com To unsubscribe send a blank email to
> > %%email.unsub%%
> >
>
>