Coding convention of function header comments

From: Hua Zhong (hzhong@cisco.com)
Date: Wed Aug 15 2001 - 16:41:41 EST


Hi:

Sorry maybe this is not the best place to ask, but recently I need to come
up with coding conventions regarding function header comments which explain
the usage of functions (meaning of parameters, etc). <linux/list.h> has sth
like this:

/**
 * list_add - add a new entry
 * @new: new entry to be added
 * @head: list head to add it after
 *
 * Insert a new entry after the specified head.
 * This is good for implementing stacks.
 */
static __inline__ void list_add(struct list_head *new, struct list_head
*head)
{
 __list_add(new, head, head->next);
}

Similar to Java. I want to ask that (1) is this a well-known convention or
was just invented (informally) by someone here (e.g., Linus?)? Where can I
find the documentation about this convention? (2) can anyone point me to the
URL of similar well-known coding conventions (except the Java one)?

Many thanks.

-Hua

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



This archive was generated by hypermail 2b29 : Wed Aug 15 2001 - 21:01:01 EST