Skip to content

Commit

Permalink
[component/tgui] update to shorten interrupt safe time
Browse files Browse the repository at this point in the history
  • Loading branch information
versaloon committed Nov 13, 2024
1 parent 93242dc commit 34b3786
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions source/component/ui/tgui/vsf_tgui.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ vsf_err_t vk_tgui_close_root_container(vsf_tgui_t* gui_ptr)

bool vk_tgui_send_message(vsf_tgui_t* gui_ptr, vsf_tgui_evt_t event)
{
bool is_to_notify;
class_internal(gui_ptr, this_ptr, vsf_tgui_t);
if (NULL == gui_ptr) {
return false;
Expand All @@ -202,14 +203,18 @@ bool vk_tgui_send_message(vsf_tgui_t* gui_ptr, vsf_tgui_evt_t event)
}

__vsf_interrupt_safe(
if (this.consumer.param.Attribute.is_queue_drain) {
is_to_notify = this.consumer.param.Attribute.is_queue_drain;
if (is_to_notify) {
this.consumer.param.Attribute.is_queue_drain = false;
//! wake pt task up
vsf_eda_post_evt(&(this.consumer.use_as__vsf_pt_t.use_as__vsf_eda_t),
VSF_TGUI_MSG_AVAILABLE);
}
)

if (is_to_notify) {
//! wake pt task up
vsf_eda_post_evt(&(this.consumer.use_as__vsf_pt_t.use_as__vsf_eda_t),
VSF_TGUI_MSG_AVAILABLE);
}

return true;
}

Expand Down

0 comments on commit 34b3786

Please sign in to comment.