Re: Whats the best way to sleep a thread?



Hello Matt,
You may want to look at the thread's TCB structure because the delay
of the thread is just about the setting or unsetting a certain member
of this structure. I am now out of my office, and I don't have the
proper documentation, but I willprovide you with the algorithm for you
to see what is going on actually when the system delay's a thread and
wakes it up.
You may also want to see if you are compiling Checked Build or Free
Build.
my mail is
gamitech@xxxxxxxxx
Keep in touch.




On May 9, 10:57 am, matt_sykes <zzeb...@xxxxxxxxxxx> wrote:
Hi all

I have an interesting situation: An Ndis driver creates a thread in
MiniportInitialise. For now thwe thread does nothing else.

When the system goes to standby the thread does a
KeWaitForSibngleObject on an event (which is never set) with a timeout
of 10 seconds.

However, I have noticed different behaviour coming out of Hibernate
while attatched to WinDbg.

Without the thread, the PC comes out of Hibernate attatched to the
debugger.

With the thread, the PC comes out of Hibernate not attatched to the
debugger.

I have also tried KeDelayExecutionThread() which gives exactly the
same results.

So the question is, is there a way to halt a thread without affecting
system functionality in this respect?

Thanks in advance.


.



Relevant Pages

  • Re: Hibernation is in NT Service
    ... Not, without my service running, both my machine and vmWare environments ... hibernate correctly. ... My service has no dependencies at all. ... I haven't checked the SCM with a debugger but to be honest, ...
    (microsoft.public.win32.programmer.kernel)
  • Whats the best way to sleep a thread?
    ... For now thwe thread does nothing else. ... When the system goes to standby the thread does a ... I have noticed different behaviour coming out of Hibernate ... debugger. ...
    (microsoft.public.development.device.drivers)

Loading