summaryrefslogtreecommitdiff
path: root/storage/xtradb/os/os0sync.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/os/os0sync.cc')
-rw-r--r--storage/xtradb/os/os0sync.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/storage/xtradb/os/os0sync.cc b/storage/xtradb/os/os0sync.cc
index 779152a3a56..451ba5285e3 100644
--- a/storage/xtradb/os/os0sync.cc
+++ b/storage/xtradb/os/os0sync.cc
@@ -890,6 +890,25 @@ os_fast_mutex_unlock_func(
}
/**********************************************************//**
+Releases ownership of a fast mutex. Implies a full memory barrier even on
+platforms such as PowerPC where this is not normally required. */
+UNIV_INTERN
+void
+os_fast_mutex_unlock_full_barrier(
+/*=================*/
+ os_fast_mutex_t* fast_mutex) /*!< in: mutex to release */
+{
+#ifdef __WIN__
+ LeaveCriticalSection(&fast_mutex->mutex);
+#else
+ pthread_mutex_unlock(&fast_mutex->mutex);
+#ifdef __powerpc__
+ os_mb;
+#endif
+#endif
+}
+
+/**********************************************************//**
Frees a mutex object. */
UNIV_INTERN
void