RE: How to determin that thread context is arbitrary or n on-arbitray?

Easy, just figure out when it isn’t abitrary :-). The OS really only
guarantees that top level drivers can assume that their dispatch routines
are called in the originating thread context, so if you aren’t a top level
driver, or if you aren’t in a dispatch routine or a routine that can only be
called from a dispatch routine, you are in arbitrary thread context. (Even
this guarantee may not hold for ‘real’ filesystem drivers outside of a
subset of dispatch routines, like create.)

You could make adjustments within your own driver to extend the guarantees
of the OS, based on a fairly limited assumption that create requests are
called in the originating thread context, to record the originating thread,
save it in some per-create instance context, and use that context to work
out which thread you are actually using at any point in time, but one has to
wonder why you are bothering with this.

-----Original Message-----
From: Paul [mailto:xxxxx@sina.com]
Sent: Monday, April 29, 2002 9:04 AM
To: NT Developers Interest List
Subject: [ntdev] How to determin that thread context is arbitrary or
non-arbitray?

Hi:
In a kernel-mode driver,how to determin
whether Its thread context is arbitray or not when a functio is called?

Thanks
Paul

b嫐.Ф\??辷?底痡?瓺hu墁抖??.炈洷殊m?澲洉╀zf?y炞^縨=?b槽(卜(