lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 14 Feb 2008 00:14:54 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	"Ricardo J. Rodríguez" <ricardo.rdez@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Semaphores with timeouts

On Thu, 14 Feb 2008 01:08:28 +0100
"Ricardo J. Rodríguez" <ricardo.rdez@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ