From cf09b851b818b56d99ca25d63bf4ea4075e9abd6 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Thu, 14 Dec 2023 15:45:27 +0200 Subject: [PATCH] Fix a bug in callback_thread Signed-off-by: Jukka Laitinen --- platforms/common/uORB/SubscriptionCallback.hpp | 4 +++- platforms/common/uORB/uORBManager.cpp | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/platforms/common/uORB/SubscriptionCallback.hpp b/platforms/common/uORB/SubscriptionCallback.hpp index f8e900bc1a20..3c83b766cab7 100644 --- a/platforms/common/uORB/SubscriptionCallback.hpp +++ b/platforms/common/uORB/SubscriptionCallback.hpp @@ -128,7 +128,7 @@ class SubscriptionCallback : public SubscriptionInterval, public ListNodepriority()); - sub->do_call(); + /* Just in cast the callback thread has been starved, + * run all the queued callbacks now + */ + while (sub->do_call()) {} } unlock_cb_list();