Re: nanosleep

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

 



On 7/6/07, hari krishna angadi <reachtohari@xxxxxxxxx> wrote:
hi all,
         I am porting  from 2.4 to 2.6, There is a  problem,  a user space
code which should be pushed to kernel space(driver module). In the user
program there is a  nanosleep()  function i need to know the respective
kernel routine for nanosleep.

kernel does not have something like sleep, it just schedules a new
process in that time. But if you are trying to sleep for very very
short intervals, use a spin loop (typically when you want to give
hardware some breathing space while writing to it). If you want to
sleep for extended periods, What you are looking for is a timer.

Generally busy waiting loops have a pause instruction in them so that
in cases where the user is using processors with HyperThreading kind
of support, it does not starve the  sibling processor.

--
The box said "Requires Windows Vista or better." So I installed LINUX

--
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