+ return err;
+}
+
+static inline int hinic_mutex_lock(pthread_mutex_t *pthreadmutex)
+{
+ int err;
+
+ err = pthread_mutex_lock(pthreadmutex);
+ if (!err) {
+ return err;
+ } else if (err == EOWNERDEAD) {
+ PMD_DRV_LOG(ERR, "Mutex lock failed. (ErrorNo=%d)", errno);
+#if defined(__GLIBC__)
+#if __GLIBC_PREREQ(2, 12)
+ (void)pthread_mutex_consistent(pthreadmutex);
+#else
+ (void)pthread_mutex_consistent_np(pthreadmutex);
+#endif
+#else
+ (void)pthread_mutex_consistent(pthreadmutex);
+#endif
+ } else {
+ PMD_DRV_LOG(ERR, "Mutex lock failed. (ErrorNo=%d)", errno);