Calling the tx_events_flags_get() function with the "requested_flags" parameter equal to 0UL seems to result in infinite wait. Logically, it is pointless to wait for no flags to be raised; it should return immediately. Yet with this input the function never exits. Is this a bug in the function or am I missing something?
Here's the code I've written:
UINT ret;
TX_EVENT_FLAGS_GROUP evt_grp;
ret = tx_event_flags_create(&evt_grp, "evt_grp");
ret = tx_event_flags_set(&evt_grp, 1UL, TX_OR);
ULONG actual_flags;
ret = tx_event_flags_get(&evt_grp, 0UL, TX_OR, &actual_flags, TX_WAIT_FOREVER);
You are not missing anything. This is a bug. We will fix this in the next release, aiming for the end of April, 2022. In the future, it might be easier to post on github issues: https://github.com/azure-rtos/threadx/issues