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
d50649ec
Commit
d50649ec
authored
Jan 24, 2012
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
small cleanups
parent
b1422b8f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
27 deletions
+12
-27
sql/scheduler.h
sql/scheduler.h
+2
-18
sql/sql_parse.cc
sql/sql_parse.cc
+0
-1
sql/threadpool.h
sql/threadpool.h
+6
-0
sql/threadpool_common.cc
sql/threadpool_common.cc
+3
-0
sql/threadpool_unix.cc
sql/threadpool_unix.cc
+0
-2
sql/threadpool_win.cc
sql/threadpool_win.cc
+1
-6
No files found.
sql/scheduler.h
View file @
d50649ec
...
...
@@ -95,26 +95,8 @@ struct thd_scheduler
*/
PSI_thread
*
m_psi
;
void
*
data
;
/* scheduler-specific data structure */
#ifndef DBUG_OFF
bool
set_explain
;
char
dbug_explain
[
512
];
#endif
};
void
*
thd_get_scheduler_data
(
THD
*
thd
);
void
thd_set_scheduler_data
(
THD
*
thd
,
void
*
data
);
PSI_thread
*
thd_get_psi
(
THD
*
thd
);
void
thd_set_psi
(
THD
*
thd
,
PSI_thread
*
psi
);
/* Common thread pool routines, suitable for different implementations */
extern
void
threadpool_remove_connection
(
THD
*
thd
);
extern
int
threadpool_process_request
(
THD
*
thd
);
extern
int
threadpool_add_connection
(
THD
*
thd
);
extern
scheduler_functions
*
thread_scheduler
;
#endif
/* SCHEDULER_INCLUDED */
#if !defined(EMBEDDED_LIBRARY)
#define HAVE_POOL_OF_THREADS 1
void
pool_of_threads_scheduler
(
scheduler_functions
*
func
,
...
...
@@ -124,3 +106,5 @@ void pool_of_threads_scheduler(scheduler_functions* func,
#define pool_of_threads_scheduler(A,B,C) \
one_thread_per_connection_scheduler(A, B, C)
#endif
#endif
/* SCHEDULER_INCLUDED */
sql/sql_parse.cc
View file @
d50649ec
...
...
@@ -683,7 +683,6 @@ void cleanup_items(Item *item)
@retval
1 request of thread shutdown (see dispatch_command() description)
*/
int
skip_net_wait_timeout
=
0
;
bool
do_command
(
THD
*
thd
)
{
...
...
sql/threadpool.h
View file @
d50649ec
...
...
@@ -10,6 +10,12 @@ extern uint threadpool_max_threads; /* Maximum threads in pool */
extern
uint
threadpool_oversubscribe
;
/* Maximum active threads in group */
/* Common thread pool routines, suitable for different implementations */
extern
void
threadpool_remove_connection
(
THD
*
thd
);
extern
int
threadpool_process_request
(
THD
*
thd
);
extern
int
threadpool_add_connection
(
THD
*
thd
);
/*
Functions used by scheduler.
OS-specific implementations are in
...
...
sql/threadpool_common.cc
View file @
d50649ec
...
...
@@ -19,6 +19,9 @@ uint threadpool_stall_limit;
uint
threadpool_max_threads
;
uint
threadpool_oversubscribe
;
/* Stats */
TP_STATISTICS
tp_stats
;
extern
"C"
pthread_key
(
struct
st_my_thread_var
*
,
THR_KEY_mysys
);
extern
bool
do_command
(
THD
*
);
...
...
sql/threadpool_unix.cc
View file @
d50649ec
...
...
@@ -60,8 +60,6 @@ static PSI_thread_info thread_list[] =
#define PSI_register(X) \
if(PSI_server) PSI_server->register_ ## X("threadpool", X ## _list, array_elements(X ## _list))
TP_STATISTICS
tp_stats
;
struct
thread_group_t
;
...
...
sql/threadpool_win.cc
View file @
d50649ec
...
...
@@ -17,9 +17,6 @@
#include <windows.h>
TP_STATISTICS
tp_stats
;
#define WEAK_SYMBOL(return_type, function, ...) \
typedef return_type (WINAPI *pFN_##function)(__VA_ARGS__); \
static pFN_##function my_##function = (pFN_##function) \
...
...
@@ -136,7 +133,6 @@ static void tp_log_warning(const char *msg, const char *fct)
PTP_POOL
pool
;
DWORD
fls
;
extern
int
skip_net_wait_timeout
;
static
bool
skip_completion_port_on_success
=
false
;
...
...
@@ -544,7 +540,7 @@ void tp_end(void)
This would not be necessary if CloseThreadpool() would synchronously
release all threads and wait until they disappear and call all their FLS
destr
r
uctors . However, threads in the pool are released asynchronously
destructors . However, threads in the pool are released asynchronously
and might spend some time in the CRT shutdown code. Thus zero
num_worker_threads, to avoid thread destructor's my_thread_end()s after
this point.
...
...
@@ -560,7 +556,6 @@ void tp_end(void)
mysql_mutex_unlock
(
&
THR_LOCK_threads
);
}
}
skip_net_wait_timeout
=
0
;
}
/*
...
...
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