Hi,
I am writing a subsystem for NT. My subsystem requires
user mode APCs to be delivered whether or not a thread is
waiting for an object. Is there anyway to tell NT to treat
my thread as always alertable unless I turn it off
inside a specific thread? I will provide functions to
do turn APCs on and off.
Thanks in advance,
Bruce
I think there is no chance to force delivering an user APC
while the thread is not in alertable user wait state.
This is done only by calling some wait function
(KeWaitForSingleObject, KeWaitForMultipleObjects,
KeDelayExecutionThread; is there another else ???).
The point at which is user APC “delivered” (which means
proper values are pushed on the user stack and user
registers are changed to return to routine in NTDLL.DLL -
KiUserApcDispatcher) is only on return from service to
user mode code when there is some APC in the thread
user APC queue.
Paul
PS: To force some user mode routine will be called at any
point in kernel there is probably a need to use user mode callbacks.
(KiUserCallbackDispatcher in NTDLL.DLL, NtCallbackReturn in NTAPI
and KeUserModeCallback in NTOSKRNL.EXE)
-----P?vodn? zpr?va-----
Od: xxxxx@oneimage.com [SMTP:xxxxx@oneimage.com]
Odesl?no: 26. ?ervna 2000 19:24
Komu: NT Developers Interest List
P?edm?t: [ntdev] User mode APCs…
Hi,
I am writing a subsystem for NT. My subsystem requires
user mode APCs to be delivered whether or not a thread is
waiting for an object. Is there anyway to tell NT to treat
my thread as always alertable unless I turn it off
inside a specific thread? I will provide functions to
do turn APCs on and off.
Thanks in advance,
Bruce
You are currently subscribed to ntdev as: xxxxx@sodatsw.cz
To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> PS: To force some user mode routine will be called at any
point in kernel there is probably a need to use user mode callbacks.
(KiUserCallbackDispatcher in NTDLL.DLL, NtCallbackReturn in NTAPI
and KeUserModeCallback in NTOSKRNL.EXE)
win32k.sys uses this to call WndProcs.
Max