Re: Semaphore with timeout....

From: Davide Libenzi
Date: Thu Feb 12 2004 - 11:16:24 EST


On Thu, 12 Feb 2004, Christoph Hellwig wrote:

> On Thu, Feb 12, 2004 at 08:22:04AM -0500, RANDAZZO@xxxxxxxxxxx wrote:
> >
> > In reference to loadable kernel modules... (drivers)
> >
> > Is there a semaphore call that will either release with token or a specified
> > amt of time....
>
> There's no down_timeout. Unfortunately - at least the qlogic fibrechannel
> driver would love to have a primitive for that.
>
> Look at drivers/scsi/qla2xxx/qla_os.c:qla2x00_down_timeout() for a horrible
> hack to emulate one.

Why wouldn't, a timer with a timer function that does signal_wake_up()
plus a down_interruptible(), work for this?



- Davide



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/