From 67496884aee65b324dc0082119e53e0f0f331266 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 5 Apr 2011 10:37:58 +0300 Subject: Bug 12323643 - CLEAN UP THE INNODB THREAD SHUTDOWN AND ASSERTIONS (WL#5136) On shutdown, do not exit threads in os_event_wait(). This method of exiting was only used by the I/O handler threads. Exit them on a higher level. os_event_wait_low(), os_event_wait_time_low(): Do not exit on shutdown. os_thread_exit(), ut_dbg_assertion_failed(), ut_print_timestamp(): Add attribute cold, so that GCC knows that these functions are rarely invoked and can be optimized for size. os_aio_linux_collect(): Return on shutdown. os_aio_linux_handle(), os_aio_simulated_handle(), os_aio_windows_handle(): Set *message1 = *message2 = NULL and return TRUE on shutdown. fil_aio_wait(): Return on shutdown. logs_empty_and_mark_files_at_shutdown(): Even in very fast shutdown (innodb_fast_shutdown=2), allow the background threads to exit, but skip the flushing and log checkpointing. innobase_shutdown_for_mysql(): Always wait for all the threads to exit. rb:633 approved by Sunny Bains --- storage/innobase/include/os0thread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'storage/innobase/include/os0thread.h') diff --git a/storage/innobase/include/os0thread.h b/storage/innobase/include/os0thread.h index cc56e2158ee..3a4448b463e 100644 --- a/storage/innobase/include/os0thread.h +++ b/storage/innobase/include/os0thread.h @@ -107,8 +107,9 @@ UNIV_INTERN void os_thread_exit( /*===========*/ - void* exit_value); /*!< in: exit value; in Windows this void* + void* exit_value) /*!< in: exit value; in Windows this void* is cast as a DWORD */ + __attribute__((cold, noreturn)); /*****************************************************************//** Returns the thread identifier of current thread. @return current thread identifier */ -- cgit v1.2.1