From: Steve Youngs <sryoungs@bigpond.net.au>
To: Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: PATCH: (as177) Add class_device_unregister_wait() and platform_device_unregister_wait() to the driver model core
Date: Mon, 26 Jan 2004 15:55:06 +1000 [thread overview]
Message-ID: <microsoft-free.87d697s18l.fsf@eicq.dnsalias.org> (raw)
In-Reply-To: <200401260521.i0Q5LRha021370@turing-police.cc.vt.edu> (Valdis Kletnieks's message of "Mon, 26 Jan 2004 00:21:27 -0500")
[-- Attachment #1: Type: text/plain, Size: 1383 bytes --]
* Valdis Kletnieks <Valdis.Kletnieks@vt.edu> writes:
> On Mon, 26 Jan 2004 15:06:48 +1000, Steve Youngs <sryoungs@bigpond.net.au> said:
>> > A boolean is just a one-bit reference count. If the maximum number of
>> > simultaneous 'users' for a given module is one, then a boolean will work.
>> > If there is potential for more than one simultaneous user then you need
>> > more bits.
>>
>> Why? A module is either being used or it isn't, the number of uses
>> shouldn't even come into it.
> OK. There's 2 users of the module. The first one exits. How does
> it (or anything else) know that it's NOT safe to just clear the
> in-use bit and clean it up?
Because the 2nd user is still using the module so its in-use bit
should still be set. Remember that when the module was first loaded
it registered a function with the kernel for testing whether the
module is in use.
I must be overlooking something because I see the answer so clearly.
Maybe if someone could give me a real world example of a situation
where it'd be hard/impossible/unsafe to unload a module and I'll see
if my ideas can be applied.
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Ashes to ashes, dust to dust. |
| The proof of the pudding, is under the crust. |
|------------------------------<sryoungs@bigpond.net.au>---|
[-- Attachment #2: Type: application/pgp-signature, Size: 256 bytes --]
next prev parent reply other threads:[~2004-01-26 5:55 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-23 16:58 PATCH: (as177) Add class_device_unregister_wait() and platform_device_unregister_wait() to the driver model core Alan Stern
2004-01-23 17:42 ` Linus Torvalds
2004-01-23 18:03 ` Alan Stern
2004-01-23 18:10 ` viro
2004-01-23 18:18 ` Greg KH
2004-01-23 18:15 ` Linus Torvalds
2004-01-23 18:31 ` Greg KH
2004-01-23 18:11 ` Greg KH
2004-01-23 18:19 ` Linus Torvalds
2004-01-23 18:27 ` Greg KH
2004-01-25 17:32 ` Alan Stern
2004-01-25 19:02 ` Linus Torvalds
2004-01-25 20:21 ` viro
2004-01-27 6:51 ` Rusty Russell
2004-01-27 13:56 ` Roman Zippel
2004-01-27 23:29 ` Rusty Russell
2004-01-28 2:36 ` Roman Zippel
2004-01-28 3:54 ` Rusty Russell
2004-01-25 23:12 ` Steve Youngs
2004-01-26 3:22 ` Adam Kropelin
2004-01-26 5:06 ` Steve Youngs
2004-01-26 5:21 ` Valdis.Kletnieks
2004-01-26 5:55 ` Steve Youngs [this message]
2004-01-26 6:25 ` Valdis.Kletnieks
2004-01-26 8:48 ` Helge Hafting
2004-01-26 15:50 ` Adam Kropelin
2004-01-26 16:22 ` Roman Zippel
2004-01-27 19:32 ` Russell King
2004-01-27 20:28 ` Greg KH
2004-01-27 20:29 ` Greg KH
2004-01-28 2:03 ` Roman Zippel
2004-01-28 2:17 ` viro
2004-01-28 2:53 ` Roman Zippel
2004-01-27 6:41 ` Rusty Russell
2004-01-23 19:45 ` viro
2004-01-26 5:50 ` Rusty Russell
2004-01-26 15:51 ` Alan Stern
2004-01-27 22:55 ` Rusty Russell
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=microsoft-free.87d697s18l.fsf@eicq.dnsalias.org \
--to=sryoungs@bigpond.net.au \
--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