summaryrefslogtreecommitdiff
path: root/libcr
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-26 02:57:12 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-10-26 02:57:12 -0600
commit1dad21650eb6fb3a4b9bba6c0ddd1402930163e2 (patch)
tree0779682be9a5f22d8e7c33824319d291105fa2c8 /libcr
parent20ff819fc032fb6ae902022f12891ae7c9f73151 (diff)
Lint for tabs-as-alignment
Diffstat (limited to 'libcr')
-rw-r--r--libcr/coroutine.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libcr/coroutine.c b/libcr/coroutine.c
index 568de4e..e080644 100644
--- a/libcr/coroutine.c
+++ b/libcr/coroutine.c
@@ -17,26 +17,26 @@
#include "config.h"
#ifndef CONFIG_COROUTINE_DEFAULT_STACK_SIZE
-# error config.h must define CONFIG_COROUTINE_DEFAULT_STACK_SIZE
+ #error config.h must define CONFIG_COROUTINE_DEFAULT_STACK_SIZE
#endif
#ifndef CONFIG_COROUTINE_NUM
-# error config.h must define CONFIG_COROUTINE_NUM
+ #error config.h must define CONFIG_COROUTINE_NUM
#endif
#ifndef CONFIG_COROUTINE_MEASURE_STACK
-# error config.h must define CONFIG_COROUTINE_MEASURE_STACK
+ #error config.h must define CONFIG_COROUTINE_MEASURE_STACK
#endif
#ifndef CONFIG_COROUTINE_PROTECT_STACK
-# error config.h must define CONFIG_COROUTINE_PROTECT_STACK
+ #error config.h must define CONFIG_COROUTINE_PROTECT_STACK
#endif
#ifndef CONFIG_COROUTINE_DEBUG
-# error config.h must define CONFIG_COROUTINE_DEBUG
+ #error config.h must define CONFIG_COROUTINE_DEBUG
#endif
#ifndef CONFIG_COROUTINE_VALGRIND
-# error config.h must define CONFIG_COROUTINE_VALGRIND
+ #error config.h must define CONFIG_COROUTINE_VALGRIND
#endif
#if CONFIG_COROUTINE_VALGRIND
-# include <valgrind/valgrind.h>
+ #include <valgrind/valgrind.h>
#endif
/* Implementation *************************************************************/
@@ -309,10 +309,10 @@ static const uint8_t stack_pattern[] = {
};
#endif
#if CONFIG_COROUTINE_PROTECT_STACK
-# define STACK_GUARD_SIZE \
+ #define STACK_GUARD_SIZE \
ROUND_UP(sizeof(stack_pattern), CR_PLAT_STACK_ALIGNMENT)
#else
-# define STACK_GUARD_SIZE 0
+ #define STACK_GUARD_SIZE 0
#endif
/* global variables ***********************************************************/
@@ -358,20 +358,20 @@ static cid_t coroutine_running = 0;
#define errorf(...) fprintf(stderr, "error: " __VA_ARGS__)
#define infof(...) printf("info: " __VA_ARGS__)
#if CONFIG_COROUTINE_DEBUG
-# define debugf(...) printf("dbg: " __VA_ARGS__)
+ #define debugf(...) printf("dbg: " __VA_ARGS__)
#else
-# define debugf(...)
+ #define debugf(...)
#endif
#ifdef __GLIBC__
-# define assertf(expr, ...) ({ \
+ #define assertf(expr, ...) ({ \
if (!(expr)) { \
errorf("assertion: " __VA_ARGS__); \
__assert_fail(#expr, __FILE__, __LINE__, __func__); \
} \
})
#else
-# define assertf(expr, ...) assert(expr)
+ #define assertf(expr, ...) assert(expr)
#endif
static inline const char* coroutine_state_str(enum coroutine_state state) {
@@ -406,10 +406,10 @@ static inline void assert_cid(cid_t cid) {
#endif
}
-#define assert_cid_state(cid, expr) do { \
- assert_cid(cid); \
+#define assert_cid_state(cid, expr) do { \
+ assert_cid(cid); \
cid_t state = coroutine_table[(cid)-1].state; \
- assert(expr); \
+ assert(expr); \
} while (0)