All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher Friesen" <cfriesen@nortel.com>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: select(0,NULL,NULL,NULL,&t1) used for delay
Date: Thu, 06 Oct 2005 09:26:48 -0600	[thread overview]
Message-ID: <43454238.4040907@nortel.com> (raw)
In-Reply-To: <81b0412b0510060727h35c0fd78i260037ca89f253f9@mail.gmail.com>

Alex Riesen wrote:

> Why don't you just use nanosleep(2) (or usleep)?

I can think of one main reason...existing code.  Also, nanosleep() 
rounds up excessively in many kernel versions, so that a request to 
sleep for less than 1 tick ends up sleeping for 2 ticks.

The select() man page explicitly mentions this usage;

"Some code calls select with all three sets empty, n zero, and a 
non-null timeout as a fairly portable way to sleep with subsecond 
precision."

Chris


  reply	other threads:[~2005-10-06 15:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-06 13:49 select(0,NULL,NULL,NULL,&t1) used for delay Madhu K.S.
2005-10-06 14:25 ` Jesper Juhl
2005-10-06 14:28   ` Jesper Juhl
2005-10-06 19:05   ` Howard Chu
2005-10-06 19:41     ` Christopher Friesen
2005-10-06 14:27 ` Alex Riesen
2005-10-06 15:26   ` Christopher Friesen [this message]
2005-10-06 15:42     ` Bernd Petrovitsch
2005-10-06 15:57       ` Christopher Friesen
2005-10-06 17:30     ` Bob Copeland
2005-10-10 18:06   ` Bill Davidsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43454238.4040907@nortel.com \
    --to=cfriesen@nortel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.