Re: [patch] Workqueue Abstraction, 2.5.40-H7

From: Randy.Dunlap (rddunlap@osdl.org)
Date: Wed Oct 02 2002 - 14:18:42 EST


On Tue, 1 Oct 2002, Ingo Molnar wrote:

| i dont think i've encountered much kernel code that tried to pass
| structures along by value without a good reason - OTOH complex and
| inefficient function interfaces outweigh these instances, by far. And
| there's way too much code that has two screens full of local variable
| declarations, where in the middle a 3K big array gets easily lost to the
| eye. struct pre and postfix does not help much there.

Sounds like a good reason to have a gcc flag, or more likely a
Stanford checker or smatch checker for structs (or large typedefs :)
as return values.

| And structure pointers are almost as simple to pass around and handle as
| the basic types declared on the stack - and that is their main use. Ease
| of understanding is i think by far the most important aspect of source
| code - abuse and mistaken use of constructs is always possible, no matter
| how long the name is.

-- 
~Randy

- 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 : Mon Oct 07 2002 - 22:00:35 EST