From b6fe9da1b28a34603c52d92ae081bb4a96f42a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=95=E5=AD=90=E4=B8=80=E4=B8=AA=E8=BD=A9?= <12101062+one-xuan@user.noreply.gitee.com> Date: Wed, 11 Sep 2024 15:00:04 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91RT-Thre?= =?UTF-8?q?ad=E6=96=87=E6=A1=A3=E4=B8=AD=E4=BA=8B=E4=BB=B6=E9=9B=86?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../programming-manual/ipc1/ipc1.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md b/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md index 8e32325..8786636 100644 --- a/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md +++ b/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md @@ -1411,6 +1411,8 @@ static void thread1_recv_event(void *param) { rt_kprintf("thread1: AND recv event 0x%x\n", e); } + /*执行完该事件集后进行事件集的脱离,事件集重复初始化会导致再次运行时,出现重复初始化的问题*/ + rt_event_detach(&event); rt_kprintf("thread1 leave.\n"); } @@ -1477,8 +1479,19 @@ MSH_CMD_EXPORT(event_sample, event sample); ```c \ | / - RT - Thread Operating System - / | \ 3.1.0 build Aug 24 2018 - 2006 - 2018 Copyright by rt-thread team + / | \ 4.1.1 build Sep 5 2024 15:53:21 + 2006 - 2022 Copyright by RT-Thread team +[D/main] Hello RT-Thread! +msh >event_sample +thread2: send event3 +thread1: OR recv event 0x8 +thread1: delay 1s to prepare the second event +msh >thread2: send event5 +thread2: send event3 +thread2 leave. +thread1: AND recv event 0x28 +thread1 leave. + msh >event_sample thread2: send event3 thread1: OR recv event 0x8 -- Gitee From ef1f2748c47153619fccd021ae8f7daa47acb258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=95=E5=AD=90=E4=B8=80=E4=B8=AA=E8=BD=A9?= <12101062+one-xuan@user.noreply.gitee.com> Date: Wed, 11 Sep 2024 15:17:58 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91RT-Thre?= =?UTF-8?q?ad=E6=96=87=E6=A1=A3=E4=B8=AD=E4=BA=8B=E4=BB=B6=E9=9B=86?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rt-thread-standard/programming-manual/ipc1/ipc1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md b/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md index 8786636..6897b6c 100644 --- a/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md +++ b/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md @@ -1411,7 +1411,7 @@ static void thread1_recv_event(void *param) { rt_kprintf("thread1: AND recv event 0x%x\n", e); } - /*执行完该事件集后进行事件集的脱离,事件集重复初始化会导致再次运行时,出现重复初始化的问题*/ + /* 执行完该事件集后进行事件集的脱离,事件集重复初始化会导致再次运行时,出现重复初始化的问题 */ rt_event_detach(&event); rt_kprintf("thread1 leave.\n"); } -- Gitee From c76d6c2454dbf4202c40785755686ac6c2ee9871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=95=E5=AD=90=E4=B8=80=E4=B8=AA=E8=BD=A9?= <12101062+one-xuan@user.noreply.gitee.com> Date: Wed, 11 Sep 2024 15:22:11 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91RT-Thre?= =?UTF-8?q?ad=E6=96=87=E6=A1=A3=E4=B8=AD=E4=BA=8B=E4=BB=B6=E9=9B=86?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rt-thread-standard/programming-manual/ipc1/ipc1.md | 1 - 1 file changed, 1 deletion(-) diff --git a/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md b/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md index 6897b6c..f701f29 100644 --- a/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md +++ b/rt-thread-version/rt-thread-standard/programming-manual/ipc1/ipc1.md @@ -1481,7 +1481,6 @@ MSH_CMD_EXPORT(event_sample, event sample); - RT - Thread Operating System / | \ 4.1.1 build Sep 5 2024 15:53:21 2006 - 2022 Copyright by RT-Thread team -[D/main] Hello RT-Thread! msh >event_sample thread2: send event3 thread1: OR recv event 0x8 -- Gitee