From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Ricardo J. Rodríguez" <ricardo.rdez@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Semaphores with timeouts
Date: Thu, 14 Feb 2008 00:14:54 +0000 [thread overview]
Message-ID: <20080214001454.4e8cb0eb@core> (raw)
In-Reply-To: <9a8e2be0802131608m7eef61efmaee332a661503f39@mail.gmail.com>
On Thu, 14 Feb 2008 01:08:28 +0100
"Ricardo J. Rodríguez" <ricardo.rdez@gmail.com> wrote:
> Hi everybody,
> I'm developing a driver to support a new protocol on the kernel 2.6.x,
> a real time communication protocol used in robotic fields. Skipping
> the intro: I need to know if there is any function in the kernel to
> get the process sleeping, as down_interruptible(...), but with
> timeouts, I mean, I want the process to wake up if no signal is
> detected in a while...
The Unix world normally expects rather different behaviour
With O_NDELAY set -> no delay but -EAGAIN
Normal -> delay until error or completes or EOF
and the use of poll/select to wait until the event can be issued and is
going to complete. Hence the lack of a mutex_lock_interruptible_timeout()
It's certainly possible to add one but the first question would be "why
do you need it - what sort of API are you trying to build"
Alan
next prev parent reply other threads:[~2008-02-14 0:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-14 0:08 Semaphores with timeouts Ricardo J. Rodríguez
2008-02-14 0:14 ` Alan Cox [this message]
2008-02-14 13:34 ` Ricardo J. Rodríguez
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=20080214001454.4e8cb0eb@core \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=ricardo.rdez@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox