summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-21 09:02:22 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-02-21 10:33:25 -0700
commit5dab625d981e0039a5d874f5d8a6f795472785bc (patch)
treea89dead6dd34f95b3e644edeb02fe1ca70a28784 /cmd/sbc_harness
parent3d5cb59006cf393a97ad3f87ef64fb258fd79ce9 (diff)
Make use of the generated stack.c
Diffstat (limited to 'cmd/sbc_harness')
-rw-r--r--cmd/sbc_harness/config/config.h12
-rw-r--r--cmd/sbc_harness/main.c2
2 files changed, 11 insertions, 3 deletions
diff --git a/cmd/sbc_harness/config/config.h b/cmd/sbc_harness/config/config.h
index 6046b31..b569cd5 100644
--- a/cmd/sbc_harness/config/config.h
+++ b/cmd/sbc_harness/config/config.h
@@ -7,6 +7,8 @@
#ifndef _CONFIG_H_
#define _CONFIG_H_
+#include <stddef.h> /* for size_t */
+
/* W5500 **********************************************************************/
/**
@@ -86,7 +88,13 @@
/* COROUTINE ******************************************************************/
-#define CONFIG_COROUTINE_DEFAULT_STACK_SIZE (2*1024)
+extern const size_t CONFIG_COROUTINE_STACK_SIZE_dhcp_cr;
+extern const size_t CONFIG_COROUTINE_STACK_SIZE_init_cr;
+extern const size_t CONFIG_COROUTINE_STACK_SIZE_lib9p_srv_write_cr;
+extern const size_t CONFIG_COROUTINE_STACK_SIZE_read9p_cr;
+extern const size_t CONFIG_COROUTINE_STACK_SIZE_usb_common_cr;
+extern const size_t CONFIG_COROUTINE_STACK_SIZE_usb_keyboard_cr;
+extern const size_t CONFIG_COROUTINE_STACK_SIZE_w5500_irq_cr;
#define CONFIG_COROUTINE_NAME_LEN 16
#define CONFIG_COROUTINE_MEASURE_STACK 1 /* bool */
#define CONFIG_COROUTINE_PROTECT_STACK 1 /* bool */
@@ -94,7 +102,7 @@
#define CONFIG_COROUTINE_VALGRIND 0 /* bool */
#define CONFIG_COROUTINE_GDB 1 /* bool */
-#define _CONFIG_9P_NUM_SOCKS 7
+#define _CONFIG_9P_NUM_SOCKS 3 /* FIXME: bump this back up to 8 */
#define CONFIG_COROUTINE_NUM ( \
1 /* usb_common */ + \
1 /* usb_keyboard */ + \
diff --git a/cmd/sbc_harness/main.c b/cmd/sbc_harness/main.c
index 69df077..2e83476 100644
--- a/cmd/sbc_harness/main.c
+++ b/cmd/sbc_harness/main.c
@@ -221,7 +221,7 @@ COROUTINE init_cr(void *) {
coroutine_add("usb_common", usb_common_cr, NULL);
coroutine_add("usb_keyboard", usb_keyboard_cr, &globals.keyboard_chan);
//coroutine_add("hello_world", hello_world_cr, &globals.keyboard_chan);
- coroutine_add_with_stack_size(4*1024, "dhcp", dhcp_cr, NULL);
+ coroutine_add("dhcp", dhcp_cr, NULL);
for (int i = 0; i < _CONFIG_9P_NUM_SOCKS; i++) {
char name[] = {'r', 'e', 'a', 'd', '-', hexdig[i], '\0'};
coroutine_add(name, read9p_cr, NULL);