summaryrefslogtreecommitdiff
path: root/sync/sync0arr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sync/sync0arr.cc')
-rw-r--r--sync/sync0arr.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/sync/sync0arr.cc b/sync/sync0arr.cc
index 00f92239b64..e06bc01c890 100644
--- a/sync/sync0arr.cc
+++ b/sync/sync0arr.cc
@@ -304,9 +304,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 */
@@ -365,13 +366,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;
}
/******************************************************************//**
@@ -1077,7 +1077,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;