summaryrefslogtreecommitdiff
path: root/libcr_ipc/tests/test_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcr_ipc/tests/test_select.c')
-rw-r--r--libcr_ipc/tests/test_select.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcr_ipc/tests/test_select.c b/libcr_ipc/tests/test_select.c
index 3da1c78..9b5d117 100644
--- a/libcr_ipc/tests/test_select.c
+++ b/libcr_ipc/tests/test_select.c
@@ -14,7 +14,7 @@ CR_CHAN_DECLARE(intchan, int);
intchan_t ch[10] = {0};
intchan_t fch = {0};
-COROUTINE cr_consumer(void *) {
+COROUTINE consumer_cr(void *) {
cr_begin();
struct cr_select_arg args[11];
@@ -60,7 +60,7 @@ COROUTINE cr_consumer(void *) {
cr_end();
}
-COROUTINE cr_producer(void *_n) {
+COROUTINE producer_cr(void *_n) {
int n = *(int *)_n;
cr_begin();
@@ -69,7 +69,7 @@ COROUTINE cr_producer(void *_n) {
cr_end();
}
-COROUTINE cr_final(void *) {
+COROUTINE final_cr(void *) {
cr_begin();
int ret = cr_chan_recv(&fch);
@@ -81,9 +81,9 @@ COROUTINE cr_final(void *) {
int main() {
for (int i = 0; i < 10; i++)
- coroutine_add("producer", cr_producer, &i);
- coroutine_add("consumer", cr_consumer, NULL);
- coroutine_add("final", cr_final, NULL);
+ coroutine_add("producer", producer_cr, &i);
+ coroutine_add("consumer", consumer_cr, NULL);
+ coroutine_add("final", final_cr, NULL);
coroutine_main();
return 0;
}