/usr/include/boost/asio/detail/impl
NameSizeModeActions
buffer_sequence_adapter.ipp30960644editdlrm
descriptor_ops.ipp150910644editdlrm
dev_poll_reactor.hpp25870644editdlrm
dev_poll_reactor.ipp131380644editdlrm
epoll_reactor.hpp24390644editdlrm
epoll_reactor.ipp223720644editdlrm
eventfd_select_interrupter.ipp45980644editdlrm
handler_tracking.ipp117820644editdlrm
kqueue_reactor.hpp25900644editdlrm
kqueue_reactor.ipp170450644editdlrm
null_event.ipp19060644editdlrm
pipe_select_interrupter.ipp31760644editdlrm
posix_event.ipp17760644editdlrm
posix_mutex.ipp12350644editdlrm
posix_thread.ipp19640644editdlrm
posix_tss_ptr.ipp12610644editdlrm
reactive_descriptor_service.ipp63880644editdlrm
reactive_serial_port_service.ipp42780644editdlrm
reactive_socket_service_base.ipp88020644editdlrm
resolver_service_base.ipp38910644editdlrm
scheduler.ipp158920644editdlrm
select_reactor.hpp29850644editdlrm
select_reactor.ipp93520644editdlrm
service_registry.hpp26520644editdlrm
service_registry.ipp54620644editdlrm
signal_set_service.ipp203760644editdlrm
socket_ops.ipp1137980644editdlrm
socket_select_interrupter.ipp58580644editdlrm
strand_executor_service.hpp115700644editdlrm
strand_executor_service.ipp36370644editdlrm
strand_service.hpp35740644editdlrm
strand_service.ipp50370644editdlrm
throw_error.ipp12680644editdlrm
timer_queue_ptime.ipp24100644editdlrm
timer_queue_set.ipp23170644editdlrm
winrt_ssocket_service_base.ipp175130644editdlrm
winrt_timer_scheduler.hpp26640644editdlrm
winrt_timer_scheduler.ipp29620644editdlrm
winsock_init.ipp20500644editdlrm
win_event.ipp20680644editdlrm
win_iocp_handle_service.ipp143940644editdlrm
win_iocp_io_context.hpp30260644editdlrm
win_iocp_io_context.ipp166340644editdlrm
win_iocp_serial_port_service.ipp60210644editdlrm
win_iocp_socket_service_base.ipp250410644editdlrm
win_mutex.ipp22130644editdlrm
win_object_handle_service.ipp124950644editdlrm
win_static_mutex.ipp36360644editdlrm
win_thread.ipp41020644editdlrm
win_tss_ptr.ipp14480644editdlrm
Edit: /usr/include/boost/asio/detail/impl/win_thread.ipp (4102B)
// // detail/impl/win_thread.ipp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_DETAIL_IMPL_WIN_THREAD_IPP #define BOOST_ASIO_DETAIL_IMPL_WIN_THREAD_IPP #if defined(_MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) #include #if defined(BOOST_ASIO_WINDOWS) \ && !defined(BOOST_ASIO_WINDOWS_APP) \ && !defined(UNDER_CE) #include #include #include #include #include namespace boost { namespace asio { namespace detail { win_thread::~win_thread() { ::CloseHandle(thread_); // The exit_event_ handle is deliberately allowed to leak here since it // is an error for the owner of an internal thread not to join() it. } void win_thread::join() { HANDLE handles[2] = { exit_event_, thread_ }; ::WaitForMultipleObjects(2, handles, FALSE, INFINITE); ::CloseHandle(exit_event_); if (terminate_threads()) { ::TerminateThread(thread_, 0); } else { ::QueueUserAPC(apc_function, thread_, 0); ::WaitForSingleObject(thread_, INFINITE); } } std::size_t win_thread::hardware_concurrency() { SYSTEM_INFO system_info; ::GetSystemInfo(&system_info); return system_info.dwNumberOfProcessors; } void win_thread::start_thread(func_base* arg, unsigned int stack_size) { ::HANDLE entry_event = 0; arg->entry_event_ = entry_event = ::CreateEventW(0, true, false, 0); if (!entry_event) { DWORD last_error = ::GetLastError(); delete arg; boost::system::error_code ec(last_error, boost::asio::error::get_system_category()); boost::asio::detail::throw_error(ec, "thread.entry_event"); } arg->exit_event_ = exit_event_ = ::CreateEventW(0, true, false, 0); if (!exit_event_) { DWORD last_error = ::GetLastError(); delete arg; boost::system::error_code ec(last_error, boost::asio::error::get_system_category()); boost::asio::detail::throw_error(ec, "thread.exit_event"); } unsigned int thread_id = 0; thread_ = reinterpret_cast(::_beginthreadex(0, stack_size, win_thread_function, arg, 0, &thread_id)); if (!thread_) { DWORD last_error = ::GetLastError(); delete arg; if (entry_event) ::CloseHandle(entry_event); if (exit_event_) ::CloseHandle(exit_event_); boost::system::error_code ec(last_error, boost::asio::error::get_system_category()); boost::asio::detail::throw_error(ec, "thread"); } if (entry_event) { ::WaitForSingleObject(entry_event, INFINITE); ::CloseHandle(entry_event); } } unsigned int __stdcall win_thread_function(void* arg) { win_thread::auto_func_base_ptr func = { static_cast(arg) }; ::SetEvent(func.ptr->entry_event_); func.ptr->run(); // Signal that the thread has finished its work, but rather than returning go // to sleep to put the thread into a well known state. If the thread is being // joined during global object destruction then it may be killed using // TerminateThread (to avoid a deadlock in DllMain). Otherwise, the SleepEx // call will be interrupted using QueueUserAPC and the thread will shut down // cleanly. HANDLE exit_event = func.ptr->exit_event_; delete func.ptr; func.ptr = 0; ::SetEvent(exit_event); ::SleepEx(INFINITE, TRUE); return 0; } #if defined(WINVER) && (WINVER < 0x0500) void __stdcall apc_function(ULONG) {} #else void __stdcall apc_function(ULONG_PTR) {} #endif } // namespace detail } // namespace asio } // namespace boost #include #endif // defined(BOOST_ASIO_WINDOWS) // && !defined(BOOST_ASIO_WINDOWS_APP) // && !defined(UNDER_CE) #endif // BOOST_ASIO_DETAIL_IMPL_WIN_THREAD_IPP