RE: How can a driver force a thread to wait for an ev--ent?

Or you can use a simpliest way to do your task.

Application has to pass a handle to an event (named
or unnamed - it is the application’s choice).
Driver has to reference the event handle to:

  1. get a kernel mode pointer to the event for further
    use (eg. to signal it by KeSetEvent)
  2. ensure this event object will stay until it dereferences it
    (dereference the event after signalling it - after dereferencing
    the event should be considered as no more existing)
    and enque the request for processing (which is usually
    asynchronous and done in some system process’ worker thread).

After return from the request to the driver the user thread has
to either:

  1. wait on the event for the request completion
  2. pass the event handle to some other user thread to do the wait
    and continue in its task (eg. request a new operation)

Paul

-----P?vodn? zpr?va-----
Od: Jamey Kirby [SMTP:xxxxx@storagecraft.com]
Odesl?no: Wednesday, August 30, 2000 10:11 PM
Komu: NT Developers Interest List
P?edm?t: [ntdev] RE: How can a driver force a thread to wait for an
ev ent?

Create a named event in the driver inside of the \basenamedobjects
namespace. This named event can be open by the UM process and can be
waited
on. When the driver signals the event, the UM thread will be released.

Jamey

> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com]On Behalf Of Berto
> Sent: Wednesday, August 30, 2000 1:11 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: How can a driver force a thread to wait for an ev
> ent?
>
>
> Isn’t the handle process specific, so can only be signaled in the
> process/thread context. I guess I mean, would the driver have to get a
> “kernel” specific handle?
>
> -----Original Message-----
> From: Kiran Mandava [mailto:xxxxx@skystream.com]
> Sent: Tuesday, August 29, 2000 6:35 PM
> To: NT Developers Interest List
> Subject: [ntdev] RE: How can a driver force a thread to wait for an
> event?
>
>
> Let the user create the Event and pass the Handle to the Kernel…
> and let the User wait on that event and kernel signals it! rather thans
> doing the other way round!
>
> >-----Original Message-----
> >From: Berto [mailto:xxxxx@wcscnet.com]
> >Sent: Tuesday, August 29, 2000 4:29 PM
> >To: NT Developers Interest List
> >Subject: [ntdev] How can a driver force a thread to wait for an event?
> >
> >
> >
> >
> >-----Original Message-----
> >From: Berto [mailto:xxxxx@wcscnet.com]
> >Sent: Monday, August 28, 2000 12:36 PM
> >To: NT Developers Interest List
> >Subject: [ntdev] How Do I Get A Kernel driver Signal a thread?
> >
> >
> >I have a driver that acquires data. Currently, the user
> >reads/writes from/to
> >this driver at will. Some users have requested some sort of
> >notification or
> >signaling. I want to ty two approches and would like suggestions on
> >approches and kernel calls to use. The kernel driver is for
> >Windows NT 4.0
> >and Windows 2000.
> >
> >1. I want to create some sort of object in the kernel driver that the
> >calling user thread can block on till the data/event occurs.
> >2. Alternatively, I would like to have the ability to call a
> >user function
> >in user mode from the kernel driver.
> >3. How would I handle cleanup if the user mode application is aborted
> >abuptly?
> >
> >Thanks for your help.
> >
> >WCSC(Willies Computer Software Co)
> >http://www.wcscnet.com
> >Tel: (281)360-4232 Fax: (281)360-3231
> >
> >
> >—
> >You are currently subscribed to ntdev as: xxxxx@wcscnet.com
> >To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> >
> >—
> >You are currently subscribed to ntdev as: xxxxx@skystream.com
> >To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> >
>
> —
> You are currently subscribed to ntdev as: xxxxx@wcscnet.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>


You are currently subscribed to ntdev as: xxxxx@sodatsw.cz
To unsubscribe send a blank email to $subst(‘Email.Unsub’)