From: Mitchell Blank Jr <mitch@sfgoth.com>
To: li nux <lnxluv@yahoo.com>
Cc: Coywolf Qi Hunt <coywolf@gmail.com>,
linux <linux-kernel@vger.kernel.org>
Subject: Re: lock_kernel twice possible ?
Date: Sat, 15 Oct 2005 00:58:51 -0700 [thread overview]
Message-ID: <20051015075851.GA10778@gaz.sfgoth.com> (raw)
In-Reply-To: <20051015073803.26937.qmail@web33311.mail.mud.yahoo.com>
li nux wrote:
> Sorry, couldn't get what you want to say.
> Can you please elaborate.
A "recursive lock" is one that can be taken multiple times by the same
owner. So:
lock_kernel();
lock_kernel();
unlock_kernel();
unlock_kernel();
is perfectly ok. The lock_kernel() code detects that the calling thread
already owns the lock and just increments current->lock_depth.
Under linux locks are non-recursive EXCEPT for lock_kernel() (aka the BLK
or "big kernel lock")
See lib/kernel_lock.c for more details.
-Mitch
prev parent reply other threads:[~2005-10-15 7:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-15 7:04 li nux
2005-10-15 7:33 ` Coywolf Qi Hunt
2005-10-15 7:38 ` li nux
2005-10-15 7:47 ` Coywolf Qi Hunt
2005-10-19 21:29 ` Bill Davidsen
2005-10-20 7:00 ` Steven Rostedt
2005-10-15 7:58 ` Mitchell Blank Jr [this message]
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=20051015075851.GA10778@gaz.sfgoth.com \
--to=mitch@sfgoth.com \
--cc=coywolf@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lnxluv@yahoo.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
Powered by JetHome