简体   繁体   中英

Is there a bug in Azure RTOS ThreadX's tx_event_flags_get function?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM