* generic sleeping locks?
@ 2000-12-18 22:54 Eli Carter
2000-12-18 23:01 ` Alan Cox
0 siblings, 1 reply; 5+ messages in thread
From: Eli Carter @ 2000-12-18 22:54 UTC (permalink / raw)
To: linux-kernel
Allow me to display my ignorance a moment.
Are there blocking lock primitives already defined somewhere in the
kernel?
It just seems that
while( lockvar )
sleep_on( &lockwaitq );
along with its various permutations would be commonly used and worthy of
being made into a generic sleep lock. A few blind greps through the
source didn't find anything that caught my eye.
If there aren't, would a patch to add them be of interest to anyone?
Input on design details welcome.
TIA,
Eli
--------------------. "To the systems programmer, users and applications
Eli Carter | serve only to provide a test load."
eli.carter@inet.com `---------------------------------- (random fortune)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: generic sleeping locks?
2000-12-18 22:54 generic sleeping locks? Eli Carter
@ 2000-12-18 23:01 ` Alan Cox
2000-12-18 23:08 ` Eli Carter
0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2000-12-18 23:01 UTC (permalink / raw)
To: Eli Carter; +Cc: linux-kernel
> Are there blocking lock primitives already defined somewhere in the
> kernel?
down and up are normally appropriate for this
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: generic sleeping locks?
2000-12-18 23:01 ` Alan Cox
@ 2000-12-18 23:08 ` Eli Carter
2000-12-19 0:06 ` Rusty Russell
0 siblings, 1 reply; 5+ messages in thread
From: Eli Carter @ 2000-12-18 23:08 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
Alan Cox wrote:
>
> > Are there blocking lock primitives already defined somewhere in the
> > kernel?
>
> down and up are normally appropriate for this
Ungh. Forest. Trees. *sigh* Sorry for the dumb question.
Thanks for the reply Alan. :)
Ok, second part of the question: What about blocking read/write locks
(with _interruptible variants)?
TIA,
Eli
--------------------. "To the systems programmer, users and applications
Eli Carter | serve only to provide a test load."
eli.carter@inet.com `---------------------------------- (random fortune)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: generic sleeping locks?
2000-12-18 23:08 ` Eli Carter
@ 2000-12-19 0:06 ` Rusty Russell
2000-12-19 15:19 ` Eli Carter
0 siblings, 1 reply; 5+ messages in thread
From: Rusty Russell @ 2000-12-19 0:06 UTC (permalink / raw)
To: Eli Carter; +Cc: linux-kernel
In message <3A3E98E9.F68BC13A@inet.com> you write:
> Alan Cox wrote:
> >
> > > Are there blocking lock primitives already defined somewhere in the
> > > kernel?
> >
> > down and up are normally appropriate for this
>
> Ungh. Forest. Trees. *sigh* Sorry for the dumb question.
> Thanks for the reply Alan. :)
>
> Ok, second part of the question: What about blocking read/write locks
> (with _interruptible variants)?
Documentation/DocBook/kernel-locking*
Rusty.
--
Hacking time.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: generic sleeping locks?
2000-12-19 0:06 ` Rusty Russell
@ 2000-12-19 15:19 ` Eli Carter
0 siblings, 0 replies; 5+ messages in thread
From: Eli Carter @ 2000-12-19 15:19 UTC (permalink / raw)
To: Rusty Russell; +Cc: linux-kernel
Rusty Russell wrote:
>
> In message <3A3E98E9.F68BC13A@inet.com> you write:
> > Alan Cox wrote:
> > >
> > > > Are there blocking lock primitives already defined somewhere in the
> > > > kernel?
> > >
> > > down and up are normally appropriate for this
> >
> > Ungh. Forest. Trees. *sigh* Sorry for the dumb question.
> > Thanks for the reply Alan. :)
> >
> > Ok, second part of the question: What about blocking read/write locks
> > (with _interruptible variants)?
>
> Documentation/DocBook/kernel-locking*
>
> Rusty.
> --
> Hacking time.
Perhaps I should have specified that I'm working with 2.2.xy....
I'll d/l a 2.4.0-test and look at the docbook in that. Thanks for the
pointer.
Eli
--------------------. "To the systems programmer, users and applications
Eli Carter | serve only to provide a test load."
eli.carter@inet.com `---------------------------------- (random fortune)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2000-12-19 15:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-18 22:54 generic sleeping locks? Eli Carter
2000-12-18 23:01 ` Alan Cox
2000-12-18 23:08 ` Eli Carter
2000-12-19 0:06 ` Rusty Russell
2000-12-19 15:19 ` Eli Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox