diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-09-08 13:34:43 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2015-09-22 21:21:34 +0000 |
commit | dc9f5cd54661e5ba3fffee7af0ba17dde9367b95 (patch) | |
tree | 43b5eca98ba0b09390ff9a6d1174c2e0cce94e1b /src/include/stdlib.h | |
parent | 4b93a4f47a7457162d1be20eeffe57f81d5cd6af (diff) | |
download | coreboot-dc9f5cd54661e5ba3fffee7af0ba17dde9367b95.tar.gz coreboot-dc9f5cd54661e5ba3fffee7af0ba17dde9367b95.tar.bz2 coreboot-dc9f5cd54661e5ba3fffee7af0ba17dde9367b95.zip |
coreboot: introduce commonlib
Instead of reaching into src/include and re-writing code
allow for cleaner code sharing within coreboot and its
utilities. The additional thing needed at this point is
for the utilities to provide a printk() declaration within
a <console/console.h> file. That way code which uses printk()
can than be mapped properly to verbosity of utility parameters.
Change-Id: I9e46a279569733336bc0a018aed96bc924c07cdd
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/11592
Tested-by: build bot (Jenkins)
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/include/stdlib.h')
-rw-r--r-- | src/include/stdlib.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/include/stdlib.h b/src/include/stdlib.h index 13f48e24e795..d6e7fafb25c9 100644 --- a/src/include/stdlib.h +++ b/src/include/stdlib.h @@ -3,20 +3,6 @@ #include <stddef.h> -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - -#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1UL) -#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) -#define ALIGN_UP(x,a) ALIGN((x),(a)) -#define ALIGN_DOWN(x,a) ((x) & ~((typeof(x))(a)-1UL)) -#define IS_ALIGNED(x,a) (((x) & ((typeof(x))(a)-1UL)) == 0) - -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#define MAX(a,b) ((a) > (b) ? (a) : (b)) -#define ABS(a) (((a) < 0) ? (-(a)) : (a)) -#define CEIL_DIV(a, b) (((a) + (b) - 1) / (b)) -#define IS_POWER_OF_2(x) (((x) & ((x) - 1)) == 0) - #define min(a,b) MIN((a),(b)) #define max(a,b) MAX((a),(b)) |