From cc7697baae812850b0b9262bc1b3cb303c6a2adf Mon Sep 17 00:00:00 2001 From: "Luke T. Shumaker" Date: Thu, 17 Apr 2025 12:22:35 -0600 Subject: tests: Name coroutines foo_cr, not cr_foo This makes debugging failing tests easier because gdb-helpers/libcr.py assumes that anything starting with cr_* is internal to libcr. --- libcr_ipc/tests/test_rpc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libcr_ipc/tests/test_rpc.c') diff --git a/libcr_ipc/tests/test_rpc.c b/libcr_ipc/tests/test_rpc.c index 910b738..1461450 100644 --- a/libcr_ipc/tests/test_rpc.c +++ b/libcr_ipc/tests/test_rpc.c @@ -14,7 +14,7 @@ CR_RPC_DECLARE(intrpc, int, int); /* Test that the RPC is fair, have worker1 start waiting first, and * ensure that it gets the first request. */ -COROUTINE cr_caller(void *_ch) { +COROUTINE caller_cr(void *_ch) { intrpc_t *ch = _ch; cr_begin(); @@ -27,7 +27,7 @@ COROUTINE cr_caller(void *_ch) { cr_exit(); } -COROUTINE cr_worker1(void *_ch) { +COROUTINE worker1_cr(void *_ch) { intrpc_t *ch = _ch; cr_begin(); @@ -38,7 +38,7 @@ COROUTINE cr_worker1(void *_ch) { cr_exit(); } -COROUTINE cr_worker2(void *_ch) { +COROUTINE worker2_cr(void *_ch) { intrpc_t *ch = _ch; cr_begin(); @@ -51,9 +51,9 @@ COROUTINE cr_worker2(void *_ch) { int main() { intrpc_t ch = {0}; - coroutine_add("worker1", cr_worker1, &ch); - coroutine_add("caller", cr_caller, &ch); - coroutine_add("worker2", cr_worker2, &ch); + coroutine_add("worker1", worker1_cr, &ch); + coroutine_add("caller", caller_cr, &ch); + coroutine_add("worker2", worker2_cr, &ch); coroutine_main(); return 0; } -- cgit v1.2.3-2-g168b