summaryrefslogtreecommitdiff
path: root/sql/threadpool_generic.cc
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2020-03-27 02:24:49 +0400
committerSergey Vojtovich <svoj@mariadb.org>2020-03-27 11:41:46 +0400
commit9eae063e79376fd71586e1106e750a366467a984 (patch)
treeccc44a915a5f5d0b5644fae281f40698d29d055f /sql/threadpool_generic.cc
parente91a3ea73284c53acda86b8bcaa02e8c92cbbf2e (diff)
downloadmariadb-git-9eae063e79376fd71586e1106e750a366467a984.tar.gz
num_worker_threads my_atomic to Atomic_counter
Diffstat (limited to 'sql/threadpool_generic.cc')
-rw-r--r--sql/threadpool_generic.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc
index 786fb5659c8..f128661ec60 100644
--- a/sql/threadpool_generic.cc
+++ b/sql/threadpool_generic.cc
@@ -908,7 +908,7 @@ static void add_thread_count(thread_group_t *thread_group, int32 count)
thread_group->thread_count += count;
/* worker starts out and end in "active" state */
thread_group->active_thread_count += count;
- my_atomic_add32(&tp_stats.num_worker_threads, count);
+ tp_stats.num_worker_threads+= count;
}
@@ -928,7 +928,7 @@ static int create_worker(thread_group_t *thread_group)
int err;
DBUG_ENTER("create_worker");
- if (tp_stats.num_worker_threads >= (int)threadpool_max_threads
+ if (tp_stats.num_worker_threads >= threadpool_max_threads
&& thread_group->thread_count >= 2)
{
err= 1;