From 74bc666de6b0fb5334425817f1111437276a3f9a Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 29 Jan 2026 16:17:58 +0100 Subject: [PATCH] replaced _gx_system_lock and _gx_system_unlock with GX_ENTER_CRITICAL and GX_EXIT_CRITICAL --- common/src/gx_horizontal_list_total_columns_set.c | 8 ++++---- common/src/gx_system_animation_free.c | 4 ++-- common/src/gx_system_animation_get.c | 4 ++-- common/src/gx_system_timer_start.c | 4 ++-- common/src/gx_system_timer_stop.c | 4 ++-- common/src/gx_system_timer_update.c | 4 ++-- common/src/gx_vertical_list_total_rows_set.c | 8 ++++---- common/src/gx_widget_attach.c | 4 ++-- common/src/gx_widget_back_attach.c | 4 ++-- common/src/gx_widget_create.c | 4 ++-- common/src/gx_widget_delete.c | 3 ++- common/src/gx_widget_detach.c | 4 ++-- 12 files changed, 28 insertions(+), 27 deletions(-) diff --git a/common/src/gx_horizontal_list_total_columns_set.c b/common/src/gx_horizontal_list_total_columns_set.c index 45a62b4a..4d5671eb 100644 --- a/common/src/gx_horizontal_list_total_columns_set.c +++ b/common/src/gx_horizontal_list_total_columns_set.c @@ -55,8 +55,8 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock Obtain GUIX system lock */ -/* _gx_system_unlock Release GUIX system lock */ +/* GX_ENTER_CRITICAL Obtain GUIX system lock */ +/* GX_EXIT_CRITICAL Release GUIX system lock */ /* _gx_first_client_child_get Get the first client child */ /* _gx_window_scrollbar_find Find the scrollbar */ /* _gx_scrollbar_reset Reset the schollbar */ @@ -85,7 +85,7 @@ INT index; GX_WIDGET *test; GX_SCROLLBAR *pScroll; - _gx_system_lock(); + GX_ENTER_CRITICAL /* Update total count of rows. */ list -> gx_horizontal_list_total_columns = count; @@ -183,7 +183,7 @@ GX_SCROLLBAR *pScroll; _gx_scrollbar_reset(pScroll, GX_NULL); } - _gx_system_unlock(); + GX_EXIT_CRITICAL /* Refresh screen. */ if (list -> gx_widget_status & GX_STATUS_VISIBLE) diff --git a/common/src/gx_system_animation_free.c b/common/src/gx_system_animation_free.c index cdbacf76..d0688fc0 100644 --- a/common/src/gx_system_animation_free.c +++ b/common/src/gx_system_animation_free.c @@ -52,8 +52,8 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock lock system mutex */ -/* _gx_system_unlock unlock system mutex */ +/* GX_ENTER_CRITICAL lock system mutex */ +/* GX_EXIT_CRITICAL unlock system mutex */ /* */ /* CALLED BY */ /* */ diff --git a/common/src/gx_system_animation_get.c b/common/src/gx_system_animation_get.c index 0c793cea..a4a14e08 100644 --- a/common/src/gx_system_animation_get.c +++ b/common/src/gx_system_animation_get.c @@ -52,8 +52,8 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock lock system mutex */ -/* _gx_system_unlock unlock system mutex */ +/* GX_ENTER_CRITICAL lock system mutex */ +/* GX_EXIT_CRITICAL unlock system mutex */ /* */ /* CALLED BY */ /* */ diff --git a/common/src/gx_system_timer_start.c b/common/src/gx_system_timer_start.c index 2419b5ed..14c7ea7a 100644 --- a/common/src/gx_system_timer_start.c +++ b/common/src/gx_system_timer_start.c @@ -56,8 +56,8 @@ /* CALLS */ /* */ /* tx_timer_activate start the ThreadX timer */ -/* _gx_system_lock lock system mutex */ -/* _gx_system_unlock unlock system mutex */ +/* GX_ENTER_CRITICAL lock system mutex */ +/* GX_EXIT_CRITICAL unlock system mutex */ /* */ /* CALLED BY */ /* */ diff --git a/common/src/gx_system_timer_stop.c b/common/src/gx_system_timer_stop.c index 94b8f894..b3c16f97 100644 --- a/common/src/gx_system_timer_stop.c +++ b/common/src/gx_system_timer_stop.c @@ -53,8 +53,8 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock lock critical section */ -/* _gx_system_unlock unlock critical section */ +/* GX_ENTER_CRITICAL lock critical section */ +/* GX_EXIT_CRITICAL unlock critical section */ /* tx_timer_deactivate stop the ThreadX timer */ /* */ /* CALLED BY */ diff --git a/common/src/gx_system_timer_update.c b/common/src/gx_system_timer_update.c index c75574d3..ba221b07 100644 --- a/common/src/gx_system_timer_update.c +++ b/common/src/gx_system_timer_update.c @@ -54,8 +54,8 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock Lock system mutex */ -/* _gx_system_unlock Unlock system mutex */ +/* GX_ENTER_CRITICAL Lock system mutex */ +/* GX_EXIT_CRITICAL Unlock system mutex */ /* [gx_widget_event_process_function] Event handler of timer owner */ /* _gx_system_timer_stop Stop the system timer */ /* _gx_animation_update Update the animation sequence */ diff --git a/common/src/gx_vertical_list_total_rows_set.c b/common/src/gx_vertical_list_total_rows_set.c index c427e62a..e454d666 100644 --- a/common/src/gx_vertical_list_total_rows_set.c +++ b/common/src/gx_vertical_list_total_rows_set.c @@ -55,8 +55,8 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock Obtain GUIX system lock */ -/* _gx_system_unlock Release GUIX system lock */ +/* GX_ENTER_CRITICAL Obtain GUIX system lock */ +/* GX_EXIT_CRITICAL Release GUIX system lock */ /* _gx_first_client_child_get Get the first client child */ /* [gx_vertical_list_callback] Vertical list callback */ /* _gx_window_scrollbar_find Find the scrollbar */ @@ -86,7 +86,7 @@ INT index; GX_WIDGET *test; GX_SCROLLBAR *pScroll; - _gx_system_lock(); + GX_ENTER_CRITICAL /* Update total count of rows. */ list -> gx_vertical_list_total_rows = count; @@ -183,7 +183,7 @@ GX_SCROLLBAR *pScroll; _gx_scrollbar_reset(pScroll, GX_NULL); } - _gx_system_unlock(); + GX_EXIT_CRITICAL /* Refresh screen. */ if (list -> gx_widget_status & GX_STATUS_VISIBLE) diff --git a/common/src/gx_widget_attach.c b/common/src/gx_widget_attach.c index 3ceb2bb9..1635d4f2 100644 --- a/common/src/gx_widget_attach.c +++ b/common/src/gx_widget_attach.c @@ -55,10 +55,10 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock Obtain GUIX system lock */ +/* GX_ENTER_CRITICAL Obtain GUIX system lock */ /* _gx_widget_detach Detach from current parent */ /* _gx_widget_link Link widget */ -/* _gx_system_unlock Release GUIX system lock */ +/* GX_EXIT_CRITICAL Release GUIX system lock */ /* */ /* CALLED BY */ /* */ diff --git a/common/src/gx_widget_back_attach.c b/common/src/gx_widget_back_attach.c index 627df461..c1f80fd2 100644 --- a/common/src/gx_widget_back_attach.c +++ b/common/src/gx_widget_back_attach.c @@ -55,10 +55,10 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock Obtain GUIX system lock */ +/* GX_ENTER_CRITICAL Obtain GUIX system lock */ /* _gx_widget_detach Detach widget */ /* _gx_widget_back_link Link widget in back */ -/* _gx_system_unlock Release GUIX system lock */ +/* GX_EXIT_CRITICAL Release GUIX system lock */ /* */ /* CALLED BY */ /* */ diff --git a/common/src/gx_widget_create.c b/common/src/gx_widget_create.c index ee9512c6..ab278a00 100644 --- a/common/src/gx_widget_create.c +++ b/common/src/gx_widget_create.c @@ -59,9 +59,9 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock Lock access to GUIX */ +/* GX_ENTER_CRITICAL Lock access to GUIX */ /* _gx_widget_link Link a widget to parent */ -/* _gx_system_unlock Release the protection */ +/* GX_EXIT_CRITICAL Release the protection */ /* */ /* CALLED BY */ /* */ diff --git a/common/src/gx_widget_delete.c b/common/src/gx_widget_delete.c index a76f3d63..576430b9 100644 --- a/common/src/gx_widget_delete.c +++ b/common/src/gx_widget_delete.c @@ -138,9 +138,10 @@ GX_EVENT delete_event; /* */ /* CALLS */ /* */ -/* _gx_system_lock Lock access to GUIX */ +/* GX_ENTER_CRITICAL Lock access to GUIX */ /* _gx_widget_delete_helper Safely delete widget instance */ /* _gx_widget_free Free memory owned by widget */ +/* GX_EXIT_CRITICAL Release the protection */ /* */ /* CALLED BY */ /* */ diff --git a/common/src/gx_widget_detach.c b/common/src/gx_widget_detach.c index ac2a64dc..83f9b2aa 100644 --- a/common/src/gx_widget_detach.c +++ b/common/src/gx_widget_detach.c @@ -53,10 +53,10 @@ /* */ /* CALLS */ /* */ -/* _gx_system_lock Lock access to GUIX */ +/* GX_ENTER_CRITICAL Lock access to GUIX */ /* _gx_widget_hide Hide the widget */ /* _gx_widget_unlink Unlink the widget */ -/* _gx_system_unlock Release the protection */ +/* GX_EXIT_CRITICAL Release the protection */ /* */ /* CALLED BY */ /* */