uORB: SubscriptionBlocking purged the broken attempt to set the mutex protocol in constructor

This commit is contained in:
Eric Katzfey 2024-03-21 17:53:34 -07:00 committed by GitHub
parent 710286da72
commit 5f6dc1c5d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 25 deletions

View File

@ -56,31 +56,6 @@ public:
SubscriptionBlocking(const orb_metadata *meta, uint32_t interval_us = 0, uint8_t instance = 0) : SubscriptionBlocking(const orb_metadata *meta, uint32_t interval_us = 0, uint8_t instance = 0) :
SubscriptionCallback(meta, interval_us, instance) 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() virtual ~SubscriptionBlocking()