diff -r d2b0c768755d -r e3db472b0dfb svghmi/svghmi.c --- a/svghmi/svghmi.c Thu Jul 29 11:59:28 2021 +0200 +++ b/svghmi/svghmi.c Mon Aug 16 22:49:08 2021 +0200 @@ -208,8 +208,17 @@ return 0; } -void SVGHMI_SuspendFromPythonThread(void); -void SVGHMI_WakeupFromRTThread(void); +static void *svghmi_handle; + +void SVGHMI_SuspendFromPythonThread(void) +{ + wait_RT_to_nRT_signal(svghmi_handle); +} + +void SVGHMI_WakeupFromRTThread(void) +{ + unblock_RT_to_nRT_signal(svghmi_handle); +} int svghmi_continue_collect; @@ -220,6 +229,12 @@ svghmi_continue_collect = 1; + /* create svghmi_pipe */ + svghmi_handle = create_RT_to_nRT_signal("SVGHMI_pipe"); + + if(!svghmi_handle) + return 1; + return 0; } @@ -227,6 +242,7 @@ { svghmi_continue_collect = 0; SVGHMI_WakeupFromRTThread(); + delete_RT_to_nRT_signal(svghmi_handle); } void __retrieve_svghmi()