mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Semaphore with timeout....
@ 2004-02-12 13:22 RANDAZZO
  2004-02-12 13:53 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: RANDAZZO @ 2004-02-12 13:22 UTC (permalink / raw)
  To: linux-kernel


In reference to loadable kernel modules... (drivers)

Is there a semaphore call that will either release with token or a specified
amt of time....

All I see is:
down_interruptable
up

Maybe there is a spinlock function to do this?

Any help.....
 
"This message may contain company proprietary information. If you are not
the intended recipient, any disclosure, copying, distribution or reliance on
the contents of this message is prohibited. If you received this message in
error, please delete and notify me."


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Semaphore with timeout....
  2004-02-12 13:22 Semaphore with timeout RANDAZZO
@ 2004-02-12 13:53 ` Christoph Hellwig
  2004-02-12 16:15   ` Davide Libenzi
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2004-02-12 13:53 UTC (permalink / raw)
  To: RANDAZZO; +Cc: linux-kernel

On Thu, Feb 12, 2004 at 08:22:04AM -0500, RANDAZZO@ddc-web.com 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Semaphore with timeout....
  2004-02-12 13:53 ` Christoph Hellwig
@ 2004-02-12 16:15   ` Davide Libenzi
  0 siblings, 0 replies; 3+ messages in thread
From: Davide Libenzi @ 2004-02-12 16:15 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: RANDAZZO, linux-kernel

On Thu, 12 Feb 2004, Christoph Hellwig wrote:

> On Thu, Feb 12, 2004 at 08:22:04AM -0500, RANDAZZO@ddc-web.com 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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-02-12 16:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-12 13:22 Semaphore with timeout RANDAZZO
2004-02-12 13:53 ` Christoph Hellwig
2004-02-12 16:15   ` Davide Libenzi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®