From - Wed Sep 24 14:55:55 1997
Path: news.mitre.org!blanket.mitre.org!agate!newsgate.duke.edu!nntprelay.mathworks.com!newsfeed.direct.ca!news.he.net!newshub.cts.com!newsfeed.cts.com!cmkrnl!jeh
From: jeh@cmkrnl.com (Jamie Hanrahan)
Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode,microsoft.public.win32.programmer.kernel
Subject: Re: [Q] Can multiple processes wait on Event signaled from kernel-mode?
Message-ID: <1997Sep24.094546.8221@cmkrnl>
Date: 24 Sep 97 09:45:46 PST
References: <01bcc875$d69eee40$86adb9cd@matt-s-pc.motu.com>
Organization: Kernel Mode Systems, San Diego, CA
Lines: 34
Xref: news.mitre.org comp.os.ms-windows.programmer.nt.kernel-mode:3676 microsoft.public.win32.programmer.kernel:731

In article <01bcc875$d69eee40$86adb9cd@matt-s-pc.motu.com>, "Matt Arnold" <marnold@don't.spam.motu.com> writes:
> If arrange for N processes to call CreateEvent(), specifying a name, they
> will all basically get a handle to the same Event object, right?

Yes. 

> Can these N processes all call WaitForSingleObject() and begin waiting for
> my one "global" Event, perhaps all at the same time?  

Well, it's actually threads that will do the calling, but yes. 

> And, when I signal
> the Event with SetEvent() or PulseEvent(), will all the blocked threads (in
> all the processes waiting for the Event) begin pre-emptively executing
> according to their respective priorities?

Yes. 

> Is there a limit to the number N?

No. 

> Finally, if all the answer to all the above questions is "Certainly, sir!",
> will there be any trouble signaling the Event from kernel-mode using
> ObReferenceObjectByHandle() and KeSetEvent()?

Not if you get the calls right. :-)

	--- Jamie Hanrahan, Kernel Mode Systems, San Diego CA
        Internet: jeh@cmkrnl.com (JH645)  CompuServe: 74140,2055  
drivers, internals, networks, applications, and training for VMS and Windows NT
NT driver FAQ, links, and other information:  http://www.cmkrnl.com/

If you post a reply in news, please don't e-mail it too.