summaryrefslogtreecommitdiff
path: root/innobase/os/os0sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/os/os0sync.c')
-rw-r--r--innobase/os/os0sync.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/innobase/os/os0sync.c b/innobase/os/os0sync.c
index a9127e6310a..407b280f805 100644
--- a/innobase/os/os0sync.c
+++ b/innobase/os/os0sync.c
@@ -68,9 +68,10 @@ os_event_create(
os_fast_mutex_init(&(event->os_mutex));
#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10)
- pthread_cond_init(&(event->cond_var), pthread_condattr_default);
+ ut_a(0 == pthread_cond_init(&(event->cond_var),
+ pthread_condattr_default));
#else
- pthread_cond_init(&(event->cond_var), NULL);
+ ut_a(0 == pthread_cond_init(&(event->cond_var), NULL));
#endif
event->is_set = FALSE;
@@ -130,7 +131,7 @@ os_event_set(
/* Do nothing */
} else {
event->is_set = TRUE;
- pthread_cond_broadcast(&(event->cond_var));
+ ut_a(0 == pthread_cond_broadcast(&(event->cond_var)));
}
os_fast_mutex_unlock(&(event->os_mutex));
@@ -182,7 +183,7 @@ os_event_free(
ut_a(event);
os_fast_mutex_free(&(event->os_mutex));
- pthread_cond_destroy(&(event->cond_var));
+ ut_a(0 == pthread_cond_destroy(&(event->cond_var)));
ut_free(event);
#endif
@@ -446,9 +447,9 @@ os_fast_mutex_init(
InitializeCriticalSection((LPCRITICAL_SECTION) fast_mutex);
#else
#if defined(UNIV_HOTBACKUP) && defined(UNIV_HPUX10)
- pthread_mutex_init(fast_mutex, pthread_mutexattr_default);
+ ut_a(0 == pthread_mutex_init(fast_mutex, pthread_mutexattr_default));
#else
- pthread_mutex_init(fast_mutex, MY_MUTEX_INIT_FAST);
+ ut_a(0 == pthread_mutex_init(fast_mutex, MY_MUTEX_INIT_FAST));
#endif
#endif
}
@@ -495,10 +496,7 @@ os_fast_mutex_free(
ut_a(fast_mutex);
DeleteCriticalSection((LPCRITICAL_SECTION) fast_mutex);
-#elif defined(__NETWARE__) || defined(SAFE_MUTEX_DETECT_DESTROY)
- pthread_mutex_destroy(fast_mutex);
#else
- UT_NOT_USED(fast_mutex);
-
+ ut_a(0 == pthread_mutex_destroy(fast_mutex));
#endif
}