Re: Wait for two clock ticks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 6, 2009 at 9:59 AM, Asim <linkasim@xxxxxxxxx> wrote:
> Yes - Actually I need to wait for a device to finish something after
> which I(device) error out. Ideally, I would like a simple
> function using the standard apis that works on most kernels. I cannot
> use jiffies as I mentioned earlier. Still working on it.
>
> -Asim

In general the idea of waiting 2 whole ticks with interrupts disabled
is such a bad idea that I don't think you will find a pre-existing API
to do that.

You definitely will not be able to simply check a variable because
with interrupts disabled, their is no one to update the variable.

If you really need this, you will likely need a call into a routine
the gets the current time from a hardware clock.

IMHO, such misbehaving code will never get into mainline and is not
even a good learning experience.

Greg
-- 
Greg Freemyer
Litigation Triage Solutions Specialist
http://www.linkedin.com/in/gregfreemyer
First 99 Days Litigation White Paper -
http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf

The Norcross Group
The Intersection of Evidence & Technology
http://www.norcrossgroup.com

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux