aboutsummaryrefslogtreecommitdiff
path: root/source/include/actbl1.h
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2012-08-16 17:26:22 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2012-08-16 17:26:22 +0000
commitfc8e34d9a95f87b780f9ee3d400dd995aba2ce27 (patch)
treea28a9676fa0b9e969cfd83d7a508660c754c8b3e /source/include/actbl1.h
parent8724452f676e45bfd39cfb47234f7def5551f067 (diff)
downloadsrc-fc8e34d9a95f87b780f9ee3d400dd995aba2ce27.tar.gz
src-fc8e34d9a95f87b780f9ee3d400dd995aba2ce27.zip
Import ACPICA 20120816.vendor/acpica/20120816
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=239332 svn path=/vendor-sys/acpica/20120816/; revision=239333; tag=vendor/acpica/20120816
Diffstat (limited to 'source/include/actbl1.h')
-rw-r--r--source/include/actbl1.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index c24178f9c409..c95d0c944e3d 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -82,9 +82,15 @@
#pragma pack(1)
/*
- * Note about bitfields: The UINT8 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
*/