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------- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/