Skip to content

Commit

Permalink
uORB: SubscriptionBlocking purged the broken attempt to set the mutex…
Browse files Browse the repository at this point in the history
… protocol in constructor
  • Loading branch information
katzfey authored Mar 22, 2024
1 parent 710286d commit 5f6dc1c
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions platforms/common/uORB/SubscriptionBlocking.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,6 @@ class SubscriptionBlocking : public SubscriptionCallback
SubscriptionBlocking(const orb_metadata *meta, uint32_t interval_us = 0, uint8_t instance = 0) :
SubscriptionCallback(meta, interval_us, instance)
{
// pthread_mutexattr_init
pthread_mutexattr_t attr;
int ret_attr_init = pthread_mutexattr_init(&attr);

if (ret_attr_init != 0) {
PX4_ERR("pthread_mutexattr_init failed, status=%d", ret_attr_init);
}

#if defined(PTHREAD_PRIO_NONE)
// pthread_mutexattr_settype
// PTHREAD_PRIO_NONE not available on cygwin
int ret_mutexattr_settype = pthread_mutexattr_settype(&attr, PTHREAD_PRIO_NONE);

if (ret_mutexattr_settype != 0) {
PX4_ERR("pthread_mutexattr_settype failed, status=%d", ret_mutexattr_settype);
}

#endif // PTHREAD_PRIO_NONE

// pthread_mutex_init
int ret_mutex_init = pthread_mutex_init(&_mutex, &attr);

if (ret_mutex_init != 0) {
PX4_ERR("pthread_mutex_init failed, status=%d", ret_mutex_init);
}
}

virtual ~SubscriptionBlocking()
Expand Down

0 comments on commit 5f6dc1c

Please sign in to comment.