Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
da342880
Commit
da342880
authored
Mar 16, 2021
by
Eugene Kosov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: os_thread_yield() -> std::this_thread::yield()
parent
62e4aaa2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
11 additions
and
12 deletions
+11
-12
storage/innobase/btr/btr0sea.cc
storage/innobase/btr/btr0sea.cc
+2
-2
storage/innobase/buf/buf0buf.cc
storage/innobase/buf/buf0buf.cc
+2
-2
storage/innobase/buf/buf0flu.cc
storage/innobase/buf/buf0flu.cc
+1
-1
storage/innobase/include/os0thread.h
storage/innobase/include/os0thread.h
+0
-1
storage/innobase/row/row0ftsort.cc
storage/innobase/row/row0ftsort.cc
+1
-1
storage/innobase/row/row0merge.cc
storage/innobase/row/row0merge.cc
+1
-1
storage/innobase/row/row0mysql.cc
storage/innobase/row/row0mysql.cc
+1
-1
storage/innobase/srv/srv0start.cc
storage/innobase/srv/srv0start.cc
+1
-1
storage/innobase/trx/trx0purge.cc
storage/innobase/trx/trx0purge.cc
+1
-1
storage/innobase/trx/trx0trx.cc
storage/innobase/trx/trx0trx.cc
+1
-1
No files found.
storage/innobase/btr/btr0sea.cc
View file @
da342880
...
...
@@ -2171,7 +2171,7 @@ btr_search_hash_table_validate(ulint hash_table_id)
mysql_mutex_unlock
(
&
buf_pool
.
mutex
);
btr_search_x_unlock_all
();
os_thread_
yield
();
std
::
this_thread
::
yield
();
btr_search_x_lock_all
();
...
...
@@ -2279,7 +2279,7 @@ btr_search_hash_table_validate(ulint hash_table_id)
mysql_mutex_unlock
(
&
buf_pool
.
mutex
);
btr_search_x_unlock_all
();
os_thread_
yield
();
std
::
this_thread
::
yield
();
btr_search_x_lock_all
();
...
...
storage/innobase/buf/buf0buf.cc
View file @
da342880
...
...
@@ -288,7 +288,7 @@ void page_hash_latch::read_lock_wait()
}
/* Fall back to yielding to other threads. */
do
os_thread_
yield
();
std
::
this_thread
::
yield
();
while
(
!
read_trylock
());
}
...
...
@@ -306,7 +306,7 @@ void page_hash_latch::write_lock_wait()
/* Fall back to yielding to other threads. */
do
os_thread_
yield
();
std
::
this_thread
::
yield
();
while
(
!
write_lock_poll
());
}
...
...
storage/innobase/buf/buf0flu.cc
View file @
da342880
...
...
@@ -260,7 +260,7 @@ void buf_flush_remove_pages(ulint id)
break
;
mysql_mutex_unlock
(
&
buf_pool
.
mutex
);
os_thread_
yield
();
std
::
this_thread
::
yield
();
mysql_mutex_lock
(
&
buf_pool
.
mutex
);
buf_flush_wait_batch_end
(
false
);
}
...
...
storage/innobase/include/os0thread.h
View file @
da342880
...
...
@@ -60,7 +60,6 @@ extern "C" { typedef void* (*os_thread_func_t)(void*); }
typedef
void
*
(
*
os_posix_f_t
)
(
void
*
);
#define os_thread_eq(a,b) IF_WIN(a == b, pthread_equal(a, b))
#define os_thread_yield() IF_WIN(SwitchToThread(), sched_yield())
#define os_thread_get_curr_id() IF_WIN(GetCurrentThreadId(), pthread_self())
/****************************************************************//**
...
...
storage/innobase/row/row0ftsort.cc
View file @
da342880
...
...
@@ -919,7 +919,7 @@ void fts_parallel_tokenization(
}
if
(
doc_item
==
NULL
)
{
os_thread_
yield
();
std
::
this_thread
::
yield
();
}
row_merge_fts_get_next_doc_item
(
psort_info
,
&
doc_item
);
...
...
storage/innobase/row/row0merge.cc
View file @
da342880
...
...
@@ -1994,7 +1994,7 @@ row_merge_read_clustered_index(
mtr_started
=
false
;
/* Give the waiters a chance to proceed. */
os_thread_
yield
();
std
::
this_thread
::
yield
();
scan_next:
ut_ad
(
!
mtr_started
);
ut_ad
(
!
mtr
.
is_active
());
...
...
storage/innobase/row/row0mysql.cc
View file @
da342880
...
...
@@ -4205,7 +4205,7 @@ row_rename_table_for_mysql(
for
(
retry
=
0
;
retry
<
100
&&
table
->
n_foreign_key_checks_running
>
0
;
++
retry
)
{
row_mysql_unlock_data_dictionary
(
trx
);
os_thread_
yield
();
std
::
this_thread
::
yield
();
row_mysql_lock_data_dictionary
(
trx
);
}
...
...
storage/innobase/srv/srv0start.cc
View file @
da342880
...
...
@@ -1927,7 +1927,7 @@ void srv_shutdown_bg_undo_sources()
dict_stats_shutdown
();
while
(
row_get_background_drop_list_len_low
())
{
srv_inc_activity_count
();
os_thread_
yield
();
std
::
this_thread
::
yield
();
}
srv_undo_sources
=
false
;
}
...
...
storage/innobase/trx/trx0purge.cc
View file @
da342880
...
...
@@ -967,7 +967,7 @@ trx_purge_choose_next_log(void)
trx_purge_read_undo_rec
();
}
else
{
/* There is nothing to do yet. */
os_thread_
yield
();
std
::
this_thread
::
yield
();
}
}
...
...
storage/innobase/trx/trx0trx.cc
View file @
da342880
...
...
@@ -1378,7 +1378,7 @@ inline void trx_t::commit_in_memory(const mtr_t *mtr)
}
/* NOTE that we could possibly make a group commit more efficient
here: call
os_thread_yield
here to allow also other trxs to come
here: call
std::this_thread::yield()
here to allow also other trxs to come
to commit! */
/*-------------------------------------*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment