| 161 | inline bool initialized() { return stack_start != 0; } |
| 162 | |
| 163 | void init() |
| 164 | { |
| 165 | #if _WIN32 |
| 166 | self= thread_id= GetCurrentThreadId(); |
| 167 | #else |
| 168 | #ifdef __NR_gettid |
| 169 | thread_id= (uint32) syscall(__NR_gettid); |
| 170 | #else |
| 171 | thread_id= 0; |
| 172 | #endif |
| 173 | self= pthread_self(); |
| 174 | #endif |
| 175 | char stack_var; |
| 176 | my_get_stack_bounds(&stack_start, &stack_end, &stack_var, my_thread_stack_size); |
| 177 | DBUG_ASSERT(stack_start); |
| 178 | DBUG_ASSERT(stack_end); |
| 179 | } |
| 180 | }; |
| 181 | static thread_local OS_thread_info os_thread_info; |
| 182 |
no test coverage detected