summaryrefslogtreecommitdiff
path: root/libcr
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-05 21:41:15 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-05 21:41:15 -0600
commit5d72b64e90cd5252c2c25b6c6eb1e9cf5cc739f9 (patch)
tree3a29d91c3dfb3c7c580c87184a15b5bd54e55172 /libcr
parent7fe3755f3a3dc11f1371b2b104fe3cf357da2310 (diff)
parent9758d91ea795448689ec401570bf556b8107177c (diff)
Merge branch 'lukeshu/net-flash'
Diffstat (limited to 'libcr')
-rw-r--r--libcr/CMakeLists.txt2
-rw-r--r--libcr/coroutine.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/libcr/CMakeLists.txt b/libcr/CMakeLists.txt
index 0a4696c..80a4ece 100644
--- a/libcr/CMakeLists.txt
+++ b/libcr/CMakeLists.txt
@@ -4,7 +4,7 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
add_library(libcr INTERFACE)
-target_include_directories(libcr SYSTEM INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
+target_include_directories(libcr PUBLIC INTERFACE ${CMAKE_CURRENT_LIST_DIR}/include)
target_sources(libcr INTERFACE
coroutine.c
)
diff --git a/libcr/coroutine.c b/libcr/coroutine.c
index 33e8141..bf44219 100644
--- a/libcr/coroutine.c
+++ b/libcr/coroutine.c
@@ -424,9 +424,9 @@ static const uint8_t stack_pattern[] = {
#endif
#if CONFIG_COROUTINE_PROTECT_STACK
#define CR_STACK_GUARD_SIZE \
- LM_ROUND_UP(sizeof(stack_pattern), CR_PLAT_STACK_ALIGNMENT)
+ ((size_t)LM_ROUND_UP(sizeof(stack_pattern), CR_PLAT_STACK_ALIGNMENT))
#else
- #define CR_STACK_GUARD_SIZE 0
+ #define CR_STACK_GUARD_SIZE ((size_t)0)
#endif
/* global variables ***********************************************************/
@@ -584,7 +584,7 @@ cid_t coroutine_add_with_stack_size(size_t stack_size,
name, stack_size, CR_STACK_GUARD_SIZE, coroutine_table[child-1].stack_size);
coroutine_table[child-1].stack =
aligned_alloc(CR_PLAT_STACK_ALIGNMENT, coroutine_table[child-1].stack_size);
- infof("... done, stack is [%#zx,%#zx)",
+ infof("... done, stack is [0x%p,0x%p)",
coroutine_table[child-1].stack + CR_STACK_GUARD_SIZE,
coroutine_table[child-1].stack + CR_STACK_GUARD_SIZE + stack_size);
#if CONFIG_COROUTINE_MEASURE_STACK || CONFIG_COROUTINE_PROTECT_STACK