LWN.net Logo

When in doubt, add another layer of indirection

When in doubt, add another layer of indirection

Posted Jun 1, 2011 23:37 UTC (Wed) by darthscsi (subscriber, #8111)
In reply to: When in doubt, add another layer of indirection by sethml
Parent article: Object-oriented design patterns in the kernel, part 1

Doing this without language level support for appending arrays gets really ugly. That said, the kernel plays linker script magic other places to create appending arrays.


(Log in to post comments)

When in doubt, add another layer of indirection

Posted Jun 2, 2011 8:33 UTC (Thu) by koverstreet (subscriber, #4296) [Link]

In order to make it work with modules you'd need to generate the idx at runtime, which would actually solve both problems...

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds