diff options
author | David Timber <mieabby@gmail.com> | 2020-08-10 13:57:00 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-08-10 13:57:00 +0930 |
commit | 195946d11f8a7870b435e0eba32f2299aa1b96a1 (patch) | |
tree | 62470aff372efb7cb66d9a90c1fc33c60b19738f /src/util_ct.h | |
parent | d61c0f9ddba9176c09ed751587343f3268ac6812 (diff) |
Changes for xcomp ...
* Add 'pthsem' dependency
* Remove m68k, spc arch
* Add proone-stress, proone-arch-test
Diffstat (limited to 'src/util_ct.h')
-rw-r--r-- | src/util_ct.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/util_ct.h b/src/util_ct.h index c8068c7..134ac57 100644 --- a/src/util_ct.h +++ b/src/util_ct.h @@ -1,13 +1,15 @@ #pragma once #include <assert.h> +#include <stdint.h> - -#define PRNE_LIMIT_ENUM(t,x,l) _Static_assert(x<=l,"enum overflow: "#t) +#define PRNE_LIMIT_ENUM(t,x,l) _Static_assert(x <= l,"enum overflow: "#t) #define prne_op_min(a, b) (a < b ? a : b) #define prne_op_max(a, b) (a > b ? a : b) #define prne_op_spaceship(a, b) (a == b ? 0 : a < b ? -1 : 1) +#define prne_malign_to(x, align) ((x % align == 0) ? x : (x / align + 1) * align) + #if !defined(memzero) #define memzero(addr, len) memset(addr, 0, len) #endif |