diff options
Diffstat (limited to 'include/libtf/defines.h')
-rw-r--r-- | include/libtf/defines.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/libtf/defines.h b/include/libtf/defines.h index 8e39c7e..44ead8a 100644 --- a/include/libtf/defines.h +++ b/include/libtf/defines.h @@ -57,6 +57,7 @@ #define attribute_warn_unused_result __attribute__((warn_unused_result)) #define attribute_deprecated __attribute__((deprecated)) +/* FIXME: glibc fprintf requires 8kB on stack */ #define TF_BUG_ON(cond) if (unlikely(cond)) { \ fprintf(stderr, "BUG: failure at %s:%d/%s(): %s!\n", \ __FILE__, __LINE__, __func__, #cond); \ @@ -68,14 +69,19 @@ #define TF_EMPTY_ARRAY 0 +#define TF_BIT(n) (1 << (n)) + #ifndef TF_STACK_SIZE -#define TF_STACK_SIZE 4096 +/* FIXME: glibc fprintf requires 8kB on stack */ +#define TF_STACK_SIZE (4*4096) #endif /* Monotonic time */ typedef uint32_t tf_mtime_t; typedef int32_t tf_mtime_diff_t; +tf_mtime_t tf_mtime_now(void); + static inline tf_mtime_diff_t tf_mtime_diff(tf_mtime_t a, tf_mtime_t b) { |