Re: [Coding style question] XXX_register or register_XXX

Robert Love (rml@tech9.net)
20 Nov 2002 20:08:28 -0500


On Wed, 2002-11-20 at 18:49, Rusty Lynch wrote:

> Is there an accepted standard on naming for registration functions? If have
> a foo object that other things can register and unregister with,
> should the function names be:

I do not think there is an accepted practice here.

> int register_foo(&something);
> int unregister_foo(&something);

I bet this is more common.

> int foo_register(&something);
> int foo_unregister(&something);

But I prefer this - I like there to be a namespace for a given subsystem
and for it to be a prefix.

Robert Love

-
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/