[coreboot-gerrit] Patch set updated for coreboot: 7a4ffe0 include/types.h: Provide BIT() macro

Alexandru Gagniuc (mr.nuke.me@gmail.com) gerrit at coreboot.org
Mon Jan 26 04:11:12 CET 2015


Alexandru Gagniuc (mr.nuke.me at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8280

-gerrit

commit 7a4ffe0510100ce7f1fd3a7a50c0745538272151
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
Date:   Sun Jan 25 21:08:42 2015 -0600

    include/types.h: Provide BIT() macro
    
    Change-Id: I86cd8a16420f34ef31b615aec4e0f7bd3191ca35
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
---
 src/include/types.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/include/types.h b/src/include/types.h
index ef5edc1..24ebfaf 100644
--- a/src/include/types.h
+++ b/src/include/types.h
@@ -22,6 +22,13 @@
 #include <stdint.h>
 #include <stddef.h>
 
+/*
+ * This may mean something else on architectures where the bits are numbered
+ * from the MSB (e.g. PowerPC), but until we cross that bridge, this macro is
+ * perfectly fine.
+ */
+#define BIT(x)				(1ul << (x))
+
 /**
  * Coreboot error codes
  *



More information about the coreboot-gerrit mailing list