summaryrefslogtreecommitdiff
path: root/storage/xtradb/sync/sync0arr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/xtradb/sync/sync0arr.cc')
-rw-r--r--storage/xtradb/sync/sync0arr.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/storage/xtradb/sync/sync0arr.cc b/storage/xtradb/sync/sync0arr.cc
index 3eed5ae47f7..9dd0259b3f9 100644
--- a/storage/xtradb/sync/sync0arr.cc
+++ b/storage/xtradb/sync/sync0arr.cc
@@ -315,9 +315,10 @@ sync_cell_get_event(
/******************************************************************//**
Reserves a wait array cell for waiting for an object.
-The event of the cell is reset to nonsignalled state. */
+The event of the cell is reset to nonsignalled state.
+@return true if free cell is found, otherwise false */
UNIV_INTERN
-void
+bool
sync_array_reserve_cell(
/*====================*/
sync_array_t* arr, /*!< in: wait array */
@@ -374,13 +375,12 @@ sync_array_reserve_cell(
cell->thread = os_thread_get_curr_id();
- return;
+ return(true);
}
}
- ut_error; /* No free cell found */
-
- return;
+ /* No free cell found */
+ return false;
}
/******************************************************************//**
@@ -499,7 +499,7 @@ sync_array_cell_print(
if (type == SYNC_PRIO_MUTEX) {
fprintf(file,
- "high-priority waiters flag %lu\n",
+ "high-priority waiters count %lu\n",
(ulong) prio_mutex->high_priority_waiters);
}
@@ -566,8 +566,8 @@ sync_array_cell_print(
}
if (prio_rwlock) {
- fprintf(file, "high priority S waiters flag %lu, "
- "high priority X waiters flag %lu, "
+ fprintf(file, "high priority S waiters count %lu, "
+ "high priority X waiters count %lu, "
"wait-exclusive waiter is "
"high priority if exists: %lu\n",
prio_rwlock->high_priority_s_waiters,
@@ -1165,7 +1165,7 @@ sync_array_init(
ut_a(sync_wait_array == NULL);
ut_a(srv_sync_array_size > 0);
- ut_a(n_threads > srv_sync_array_size);
+ ut_a(n_threads > 0);
sync_array_size = srv_sync_array_size;