LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [LOCK] Is it really necessary to use a "big module lock"?
@ 2007-11-14  4:35 Jerry Jiang
  0 siblings, 0 replies; only message in thread
From: Jerry Jiang @ 2007-11-14  4:35 UTC (permalink / raw)
  To: linux-kernel


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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-11-14  4:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-14  4:35 [LOCK] Is it really necessary to use a "big module lock"? Jerry Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).