Re: Rusty's module talk at the Kernel Summit

Thunder from the hill
2002-07-17T19:33:59Z

Hi,

On 17 Jul 2002, bill davidsen wrote:
> | int module_do_blah(struct blah *blah, didel_t dei)
> | #ifdef __MODULE__
> | {
> | locking_code();
> | pure_module_do_blah(blah, dei)
> | unlocking_code();
> | }
> |
> | int pure_module_do_blah(struct blah *blah, didel_t dei)
> | #endif /* __MODULE__ */
>
> I might write the un/lock code as a macro rather than use the ifdef, but
> that's a style thing.

Well, this was the "unpacked" version. Of course one could do that much
better as a macro MODULE_CALL or whatever. However, Roman Zippel promised
to come up with a better solution, and he did come up with a solution. I
didn't yet look at it too much (I've had a trip around the world for
administration purposes), but I don't exclude that it migh be a better
one.

Regards,
Thunder
--
(Use http://www.ebb.org/ungeek if you can't decode)
------BEGIN GEEK CODE BLOCK------
Version: 3.12
GCS/E/G/S/AT d- s++:-- a? C++$ ULAVHI++++$ P++$ L++++(+++++)$ E W-$
N--- o? K? w-- O- M V$ PS+ PE- Y- PGP+ t+ 5+ X+ R- !tv b++ DI? !D G
e++++ h* r--- y-
------END GEEK CODE BLOCK------