]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/acpi/actbl.h
ACPI / PM: Move routines for adding/removing device wakeup notifiers
[karo-tx-linux.git] / include / acpi / actbl.h
index d54e3580b7d1c0da34e362a99b0a0b7c12488537..4f94b1d812d5a7af89abbcda02ae4adf9924e42f 100644 (file)
 #pragma pack(1)
 
 /*
- * Note about bitfields: The u8 type is used for bitfields in ACPI tables.
- * This is the only type that is even remotely portable. Anything else is not
- * portable, so do not use any other bitfield types.
+ * Note: C bitfields are not used for this reason:
+ *
+ * "Bitfields are great and easy to read, but unfortunately the C language
+ * does not specify the layout of bitfields in memory, which means they are
+ * essentially useless for dealing with packed data in on-disk formats or
+ * binary wire protocols." (Or ACPI tables and buffers.) "If you ask me,
+ * this decision was a design error in C. Ritchie could have picked an order
+ * and stuck with it." Norman Ramsey.
+ * See http://stackoverflow.com/a/1053662/41661
  */
 
 /*******************************************************************************