Commit 21326513 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Remove some trailing whitespaces.

parent 5bf9e0f8
...@@ -138,7 +138,7 @@ struct TP_pool ...@@ -138,7 +138,7 @@ struct TP_pool
#ifdef _WIN32 #ifdef _WIN32
struct TP_pool_win:TP_pool struct TP_pool_win:TP_pool
{ {
TP_pool_win(); TP_pool_win();
virtual int init(); virtual int init();
virtual ~TP_pool_win(); virtual ~TP_pool_win();
virtual TP_connection *new_connection(CONNECT *c); virtual TP_connection *new_connection(CONNECT *c);
......
...@@ -60,24 +60,24 @@ static inline TP_connection *get_TP_connection(THD *thd) ...@@ -60,24 +60,24 @@ static inline TP_connection *get_TP_connection(THD *thd)
/* /*
Worker threads contexts, and THD contexts. Worker threads contexts, and THD contexts.
========================================= =========================================
Both worker threads and connections have their sets of thread local variables Both worker threads and connections have their sets of thread local variables
At the moment it is mysys_var (this has specific data for dbug, my_error and At the moment it is mysys_var (this has specific data for dbug, my_error and
similar goodies), and PSI per-client structure. similar goodies), and PSI per-client structure.
Whenever query is executed following needs to be done: Whenever query is executed following needs to be done:
1. Save worker thread context. 1. Save worker thread context.
2. Change TLS variables to connection specific ones using thread_attach(THD*). 2. Change TLS variables to connection specific ones using thread_attach(THD*).
This function does some additional work , e.g setting up This function does some additional work , e.g setting up
thread_stack/thread_ends_here pointers. thread_stack/thread_ends_here pointers.
3. Process query 3. Process query
4. Restore worker thread context. 4. Restore worker thread context.
Connection login and termination follows similar schema w.r.t saving and Connection login and termination follows similar schema w.r.t saving and
restoring contexts. restoring contexts.
For both worker thread, and for the connection, mysys variables are created For both worker thread, and for the connection, mysys variables are created
using my_thread_init() and freed with my_thread_end(). using my_thread_init() and freed with my_thread_end().
*/ */
...@@ -154,7 +154,7 @@ static void thread_attach(THD* thd) ...@@ -154,7 +154,7 @@ static void thread_attach(THD* thd)
} }
/* /*
Determine connection priority , using current Determine connection priority , using current
transaction state and 'threadpool_priority' variable value. transaction state and 'threadpool_priority' variable value.
*/ */
static TP_PRIORITY get_priority(TP_connection *c) static TP_PRIORITY get_priority(TP_connection *c)
...@@ -289,7 +289,7 @@ static void threadpool_remove_connection(THD *thd) ...@@ -289,7 +289,7 @@ static void threadpool_remove_connection(THD *thd)
delete thd; delete thd;
/* /*
Free resources associated with this connection: Free resources associated with this connection:
mysys thread_var and PSI thread. mysys thread_var and PSI thread.
*/ */
my_thread_end(); my_thread_end();
...@@ -323,8 +323,8 @@ static int threadpool_process_request(THD *thd) ...@@ -323,8 +323,8 @@ static int threadpool_process_request(THD *thd)
if (thd->killed >= KILL_CONNECTION) if (thd->killed >= KILL_CONNECTION)
{ {
/* /*
killed flag was set by timeout handler killed flag was set by timeout handler
or KILL command. Return error. or KILL command. Return error.
*/ */
retval= 1; retval= 1;
......
This diff is collapsed.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#ifdef _WIN32 #ifdef _WIN32
#include <windows.h> #include <windows.h>
/* AIX may define this, too ?*/ /* AIX may define this, too ?*/
#define HAVE_IOCP #define HAVE_IOCP
#endif #endif
......
...@@ -59,10 +59,10 @@ PTP_CALLBACK_ENVIRON get_threadpool_win_callback_environ() ...@@ -59,10 +59,10 @@ PTP_CALLBACK_ENVIRON get_threadpool_win_callback_environ()
*/ */
static void CALLBACK timer_callback(PTP_CALLBACK_INSTANCE instance, static void CALLBACK timer_callback(PTP_CALLBACK_INSTANCE instance,
PVOID context, PTP_TIMER timer); PVOID context, PTP_TIMER timer);
static void CALLBACK io_completion_callback(PTP_CALLBACK_INSTANCE instance, static void CALLBACK io_completion_callback(PTP_CALLBACK_INSTANCE instance,
PVOID context, PVOID overlapped, ULONG io_result, ULONG_PTR nbytes, PTP_IO io); PVOID context, PVOID overlapped, ULONG io_result, ULONG_PTR nbytes, PTP_IO io);
...@@ -128,7 +128,7 @@ void TP_pool_win::add(TP_connection *c) ...@@ -128,7 +128,7 @@ void TP_pool_win::add(TP_connection *c)
TP_connection_win::TP_connection_win(CONNECT *c) : TP_connection_win::TP_connection_win(CONNECT *c) :
TP_connection(c), TP_connection(c),
timeout(ULONGLONG_MAX), timeout(ULONGLONG_MAX),
callback_instance(0), callback_instance(0),
io(0), io(0),
timer(0), timer(0),
...@@ -218,14 +218,14 @@ int TP_connection_win::start_io() ...@@ -218,14 +218,14 @@ int TP_connection_win::start_io()
if (retval == 0 || last_error == ERROR_MORE_DATA) if (retval == 0 || last_error == ERROR_MORE_DATA)
{ {
/* /*
IO successfully finished (synchronously). IO successfully finished (synchronously).
If skip_completion_port_on_success is set, we need to handle it right If skip_completion_port_on_success is set, we need to handle it right
here, because completion callback would not be executed by the pool. here, because completion callback would not be executed by the pool.
*/ */
if (skip_completion_port_on_success) if (skip_completion_port_on_success)
{ {
CancelThreadpoolIo(io); CancelThreadpoolIo(io);
io_completion_callback(callback_instance, this, &overlapped, last_error, io_completion_callback(callback_instance, this, &overlapped, last_error,
num_bytes, io); num_bytes, io);
} }
return 0; return 0;
...@@ -322,7 +322,7 @@ static void pre_callback(PVOID context, PTP_CALLBACK_INSTANCE instance) ...@@ -322,7 +322,7 @@ static void pre_callback(PVOID context, PTP_CALLBACK_INSTANCE instance)
/* /*
Decrement number of threads when a thread exits . Decrement number of threads when a thread exits.
On Windows, FlsAlloc() provides the thread destruction callbacks. On Windows, FlsAlloc() provides the thread destruction callbacks.
*/ */
static VOID WINAPI thread_destructor(void *data) static VOID WINAPI thread_destructor(void *data)
...@@ -346,7 +346,7 @@ static inline void tp_callback(PTP_CALLBACK_INSTANCE instance, PVOID context) ...@@ -346,7 +346,7 @@ static inline void tp_callback(PTP_CALLBACK_INSTANCE instance, PVOID context)
/* /*
Handle read completion/notification. Handle read completion/notification.
*/ */
static VOID CALLBACK io_completion_callback(PTP_CALLBACK_INSTANCE instance, static VOID CALLBACK io_completion_callback(PTP_CALLBACK_INSTANCE instance,
PVOID context, PVOID overlapped, ULONG io_result, ULONG_PTR nbytes, PTP_IO io) PVOID context, PVOID overlapped, ULONG io_result, ULONG_PTR nbytes, PTP_IO io)
{ {
TP_connection_win *c= (TP_connection_win *)context; TP_connection_win *c= (TP_connection_win *)context;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment