summaryrefslogtreecommitdiff
path: root/libcr_ipc/tests
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-15 01:25:24 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2025-04-15 07:30:39 -0600
commit0aa6b262aeeea7ba24a75e3a89c9c767f35f05a6 (patch)
tree40b78e1e66cce61d063d2a0473542b5f8f68c99e /libcr_ipc/tests
parent03113da787fb1617a9c460b9ce012c9efe3c7838 (diff)
libcr_ipc: Have generic cr_chan_* funcs instead of chan-specific funcs
Diffstat (limited to 'libcr_ipc/tests')
-rw-r--r--libcr_ipc/tests/test_chan.c10
-rw-r--r--libcr_ipc/tests/test_select.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/libcr_ipc/tests/test_chan.c b/libcr_ipc/tests/test_chan.c
index 9b6f018..e5d9dc8 100644
--- a/libcr_ipc/tests/test_chan.c
+++ b/libcr_ipc/tests/test_chan.c
@@ -15,12 +15,12 @@ COROUTINE cr_producer(void *_ch) {
intchan_t *ch = _ch;
cr_begin();
- intchan_send(ch, 1);
+ cr_chan_send(ch, 1);
- while (!intchan_can_send(ch))
+ while (!cr_chan_can_send(ch))
cr_yield();
- intchan_send(ch, 2);
+ cr_chan_send(ch, 2);
cr_end();
@@ -31,10 +31,10 @@ COROUTINE cr_consumer(void *_ch) {
intchan_t *ch = _ch;
cr_begin();
- x = intchan_recv(ch);
+ x = cr_chan_recv(ch);
test_assert(x == 1);
- x = intchan_recv(ch);
+ x = cr_chan_recv(ch);
test_assert(x == 2);
cr_end();
diff --git a/libcr_ipc/tests/test_select.c b/libcr_ipc/tests/test_select.c
index 1db645b..f0a71a3 100644
--- a/libcr_ipc/tests/test_select.c
+++ b/libcr_ipc/tests/test_select.c
@@ -65,7 +65,7 @@ COROUTINE cr_producer(void *_n) {
int n = *(int *)_n;
cr_begin();
- intchan_send(&ch[n], n);
+ cr_chan_send(&ch[n], n);
cr_end();
}
@@ -73,7 +73,7 @@ COROUTINE cr_producer(void *_n) {
COROUTINE cr_final(void *) {
cr_begin();
- int ret = intchan_recv(&fch);
+ int ret = cr_chan_recv(&fch);
printf("ret=%d\n", ret);
test_assert(ret == 567);