Hello,
I am writing a Win2K Bus Driver to simulate a novel high-performance
hardware device.
This Bus Driver will be used to develop the actual Device Drivers for
the device until the real hardware is available. The aim of the Bus
Driver is to take control of one of the CPUs (on an MP system), and
behave as the novel device(s).
What the Bus Driver does:
-Simulates the Register Space of the device and communicates the Base
Address of the Register Space to the Function (Device) Driver for the
device.
-Creates a thread:
-sets thread affinity to a particular CPU
-sets thread priority to HIGH_PRIORITY
-this thread continuously monitors the Register Space of device
for any changes and takes appropriate action.
My questions:
- Can I run this thread continuously or do I need some way for it
to block ? (since this is a HIGH_PRIORITY real-time thread ?)
Please remember that this Bus Driver is not for production and
will only be used to develope the actual Funtion Driver]
- Type of synchronization mechanism ?
-I create the thread in my AddDevice() for the Bus Driver
-In ThreadMain() I need to monitor the Register Spaces of the
simulated devices (but the simulated devices don’t come into
existence until the PDOs are created).
-I store a “list of PDOs created” and “# PDOs currently
enumerated” in my Bus FDO DevExtn.
So I am thinking that I could block the thread while #PDOs = 0
From my understanding, I can use a Notification Event or Binary
Semaphore for this purpose. But I am not sure which one to use
and how ?
Please help!
Thanks much.
Puja
Get free email and a permanent address at http://www.amexmail.com/?A=1