![]() | |||||||||||
Messages in this thread |
Paul Sokolovsky wrote: > > In this respect, VTABLE(), METHOD() macros serve the same purpose as > container_of() and list_for_each() - they are besides offering (more) > convenient syntax, also carry important annotattion and educational > messages, like "it's ok, and encouraged to embed one structure into > another - use it!" or "list manipulation is a trivial operation for kernel, > and we want you to treat it as such and use in standard, easily > distinguishable way". > You realize, right, that the Linux kernel already have a much cleaner way to do vtables in the kernel, without this kind of macro crappage? It's called an _ops table, and is used in a patternized way: foo->x_ops->func(foo, ...); ... all over the kernel. We like it that way. -hpa - 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/ | ||||||||||
| Last update: 2007-03-28 18:35 [from the cache] ©2003-2008 | |||||||||||