Which is the equivalent of Sleep in DDK?.
Greeting
Which is the equivalent of Sleep in DDK?.
Greeting
ollanthay ollanthay wrote:
Which is the equivalent of Sleep in DDK?.
Nominally, KeDelayExecutionThread. However, in many cases there are
better ways to handle this, such as using a timer. What are you waiting
for?
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Depending on the amount of time you need to wait, you can use KeStallExecutionProcessor or KeDelayExecutionThread. Please read the documentation of both the APIs carefully.
Having said, be *very* careful in putting sleep()'s in a driver. Most of the times there’s a better solution than putting a sleep in kernel mode. If possible sleep in user mode. A sleep in the wrong place in a driver can kill the performance of your machine. What problem are you trying to solve with a sleep?
Have a nice day
GV
–
Gianluca Varenni, Windows DDK MVP
CACE Technologies
http://www.cacetech.com
---- Original Message -----
From: ollanthay ollanthay
To: Windows System Software Devs Interest List
Sent: Monday, July 23, 2007 4:43 PM
Subject: [ntdev] Sleep to DDK
Which is the equivalent of Sleep in DDK?.
Greeting
— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Thanks…
Desire to wait for an amount of milliseconds until the term of execution threads…
Greetings
Ollanthay
----- Original Message -----
From: Gianluca Varenni
To: Windows System Software Devs Interest List
Sent: Monday, July 23, 2007 6:57 PM
Subject: Re: [ntdev] Sleep to DDK
Depending on the amount of time you need to wait, you can use KeStallExecutionProcessor or KeDelayExecutionThread. Please read the documentation of both the APIs carefully.
Having said, be *very* careful in putting sleep()'s in a driver. Most of the times there’s a better solution than putting a sleep in kernel mode. If possible sleep in user mode. A sleep in the wrong place in a driver can kill the performance of your machine. What problem are you trying to solve with a sleep?
Have a nice day
GV
–
Gianluca Varenni, Windows DDK MVP
CACE Technologies
http://www.cacetech.com
Analizado por Hacksoft E-mail Solution for Smtp Gateway
That is clear. Why do you think you need to wait? What are you waiting for? for instance, are you initializing a piece of hardware and you need to wait a period of time? Approximately how long do you want to wait? In what context (pnp start device, work item, timer, etc) do you want to wait?
d
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Bryan Ni?o de Guzm?n Paz
Sent: Tuesday, July 24, 2007 4:14 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Sleep to DDK
Thanks…
Desire to wait for an amount of milliseconds until the term of execution threads…
Greetings
Ollanthay
----- Original Message -----
From: Gianluca Varenni mailto:xxxxx
To: Windows System Software Devs Interest List mailto:xxxxx
Sent: Monday, July 23, 2007 6:57 PM
Subject: Re: [ntdev] Sleep to DDK
Depending on the amount of time you need to wait, you can use KeStallExecutionProcessor or KeDelayExecutionThread. Please read the documentation of both the APIs carefully.
Having said, be very careful in putting sleep()'s in a driver. Most of the times there’s a better solution than putting a sleep in kernel mode. If possible sleep in user mode. A sleep in the wrong place in a driver can kill the performance of your machine. What problem are you trying to solve with a sleep?
Have a nice day
GV
–
Gianluca Varenni, Windows DDK MVP
CACE Technologies
http://www.cacetech.com
Analizado por Hacksoft E-mail Solution for Smtp Gateway
—
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>
Sorrry,
Desire to hope that a list of memory nodes is released, these nodes are in
a thread…
On 7/24/07, Doron Holan wrote:
>
> That is clear. Why do you think you need to wait? What are you waiting
> for? for instance, are you initializing a piece of hardware and you need to
> wait a period of time? Approximately how long do you want to wait? In what
> context (pnp start device, work item, timer, etc) do you want to wait?
>
>
>
> d
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *Bryan Ni?o de Guzm?n Paz
> Sent: Tuesday, July 24, 2007 4:14 PM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Sleep to DDK
>
>
>
> Thanks…
>
>
>
> Desire to wait for an amount of milliseconds until the term of
> execution threads…
>
>
>
> Greetings
>
> Ollanthay
>
>
>
> ----- Original Message -----
>
> From: Gianluca Varenni
>
> To: Windows System Software Devs Interest List
>
> Sent: Monday, July 23, 2007 6:57 PM
>
> Subject: Re: [ntdev] Sleep to DDK
>
>
>
> Depending on the amount of time you need to wait, you can use
> KeStallExecutionProcessor or KeDelayExecutionThread. Please read the
> documentation of both the APIs carefully.
>
>
>
> Having said, be very careful in putting sleep()'s in a driver. Most of
> the times there’s a better solution than putting a sleep in kernel mode. If
> possible sleep in user mode. A sleep in the wrong place in a driver can kill
> the performance of your machine. What problem are you trying to solve with a
> sleep?
>
>
>
> Have a nice day
>
> GV
>
>
>
> –
>
> Gianluca Varenni, Windows DDK MVP
>
>
>
> CACE Technologies
> http://www.cacetech.com
>
>
>
> Analizado por Hacksoft E-mail Solution for Smtp Gateway
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
That would appear to me to be a broken design. Why not set some state in a shared context in the thread that you think should sleep and then in the thread which releases the nodes, it checks the state and does the right thing. Sleeping for this scenario is not really compatible with how drivers should be written.
d
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of ollanthay ollanthay
Sent: Tuesday, July 24, 2007 4:49 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Sleep to DDK
Sorrry,
Desire to hope that a list of memory nodes is released, these nodes are in a thread…
On 7/24/07, Doron Holan wrote:
That is clear. Why do you think you need to wait? What are you waiting for? for instance, are you initializing a piece of hardware and you need to wait a period of time? Approximately how long do you want to wait? In what context (pnp start device, work item, timer, etc) do you want to wait?
d
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Bryan Ni?o de Guzm?n Paz
Sent: Tuesday, July 24, 2007 4:14 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Sleep to DDK
Thanks…
Desire to wait for an amount of milliseconds until the term of execution threads…
Greetings
Ollanthay
----- Original Message -----
From: Gianluca Varenni mailto:xxxxx
To: Windows System Software Devs Interest List mailto:xxxxx
Sent: Monday, July 23, 2007 6:57 PM
Subject: Re: [ntdev] Sleep to DDK
Depending on the amount of time you need to wait, you can use KeStallExecutionProcessor or KeDelayExecutionThread. Please read the documentation of both the APIs carefully.
Having said, be very careful in putting sleep()'s in a driver. Most of the times there’s a better solution than putting a sleep in kernel mode. If possible sleep in user mode. A sleep in the wrong place in a driver can kill the performance of your machine. What problem are you trying to solve with a sleep?
Have a nice day
GV
–
Gianluca Varenni, Windows DDK MVP
CACE Technologies
http://www.cacetech.com http:</http:>
Analizado por Hacksoft E-mail Solution for Smtp Gateway
—
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
—
Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>