diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-17 12:22:35 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2025-04-17 12:24:00 -0600 |
commit | cc7697baae812850b0b9262bc1b3cb303c6a2adf (patch) | |
tree | 655833226ddb7973edb1d1967a7ce77ef16d7517 /libcr_ipc/tests/test_rpc.c | |
parent | 3647041c2ccc95f890acfe15110ad9379a2515ca (diff) |
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.
Diffstat (limited to 'libcr_ipc/tests/test_rpc.c')
-rw-r--r-- | libcr_ipc/tests/test_rpc.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; } |