From: Jerry Jiang <wjiang@resilience.com>
To: linux-kernel@vger.kernel.org
Subject: [LOCK] Is it really necessary to use a "big module lock"?
Date: Wed, 14 Nov 2007 12:35:13 +0800 [thread overview]
Message-ID: <20071114123513.fbff2683.wjiang@resilience.com> (raw)
Hi all,
I came across a question when review other's module code.
something like:
int __init module_init()
{
down_interruptible(the_big_module_sem);
// code for init...
up(the_big_module_sem);
}
void __exit module_exit()
{
down_interruptible(the_big_module_sem);
// code for exit...
up(the_big_module_sem);
}
My question is:
- Is the lock truly necessary?
- If adding it into code, what happens?
Thank you
-- Jerry
reply other threads:[~2007-11-14 4:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20071114123513.fbff2683.wjiang@resilience.com \
--to=wjiang@resilience.com \
--cc=linux-kernel@vger.kernel.org \
/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