User: Password:
|
|
Subscribe / Log in / New account

Object-oriented design patterns in the kernel, part 2

Object-oriented design patterns in the kernel, part 2

Posted Jun 8, 2011 13:14 UTC (Wed) by nix (subscriber, #2304)
In reply to: Object-oriented design patterns in the kernel, part 2 by cmccabe
Parent article: Object-oriented design patterns in the kernel, part 2

Ah yes. You have access to flexible array members and can assume that you're using GCC. Alas, when I perpetrated this trick I could assume neither of these, so needed a suitable union as a final member to ensure correct alignment.

The macros are just to make things less horrendously unreadable. :)


(Log in to post comments)


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