diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-12 12:46:15 -0700 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-11-12 12:46:49 -0700 |
commit | aec7a1209a7c2314acc5703a94509a403c796444 (patch) | |
tree | 0bc2f20573becea8a032f495a2f7d8e9f3de2bda /libcr | |
parent | 3f66d2019879a4d3d97e43bd598e6286a21cc01d (diff) |
Avoid using fprintf
Diffstat (limited to 'libcr')
-rw-r--r-- | libcr/coroutine.c | 4 | ||||
-rw-r--r-- | libcr/include/libcr/coroutine.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/libcr/coroutine.c b/libcr/coroutine.c index ed1c8e0..553acc8 100644 --- a/libcr/coroutine.c +++ b/libcr/coroutine.c @@ -6,7 +6,7 @@ #include <setjmp.h> /* for setjmp(), longjmp(), jmp_buf */ #include <stdint.h> /* for uint8_t */ -#include <stdio.h> /* for printf(), fprintf(), stderr */ +#include <stdio.h> /* for printf() */ #include <stdlib.h> /* for aligned_alloc(), free() */ #include <libmisc/assert.h> @@ -356,7 +356,7 @@ static cid_t coroutine_running = 0; /* utility functions **********************************************************/ -#define errorf(...) fprintf(stderr, "error: " __VA_ARGS__) +#define errorf(...) printf("error: " __VA_ARGS__) #define infof(...) printf("info: " __VA_ARGS__) #if CONFIG_COROUTINE_DEBUG #define debugf(...) printf("dbg: " __VA_ARGS__) diff --git a/libcr/include/libcr/coroutine.h b/libcr/include/libcr/coroutine.h index 368974f..d673fb6 100644 --- a/libcr/include/libcr/coroutine.h +++ b/libcr/include/libcr/coroutine.h @@ -95,9 +95,9 @@ cid_t coroutine_add(cr_fn_t fn, void *args); /** * The main scheduler loop. * - * "Should" never return, but will print a message to stderr and - * return if there are no coroutines (there were no calls to - * coroutine_add(), or all coroutines cr_exit()). + * "Should" never return, but will print a message and return if there + * are no coroutines (there were no calls to coroutine_add(), or all + * coroutines cr_exit()). */ void coroutine_main(void); |