mirror of
https://github.com/curl/curl.git
synced 2026-08-24 19:03:40 +03:00
add and use beginthread/createthread macro for windowses
This commit is contained in:
parent
4d825c74d4
commit
57ff443a4c
5 changed files with 9 additions and 13 deletions
|
|
@ -568,7 +568,8 @@ static HANDLE select_ws_wait(HANDLE handle, HANDLE signal, HANDLE abort)
|
|||
data->abort = abort;
|
||||
|
||||
/* launch waiting thread */
|
||||
thread = _beginthreadex(NULL, 0, &select_ws_wait_thread, data, 0, NULL);
|
||||
thread = CURL_WIN_BEGINTHREAD(NULL, 0, &select_ws_wait_thread, data, 0,
|
||||
NULL);
|
||||
|
||||
/* free data if thread failed to launch */
|
||||
if(!thread) {
|
||||
|
|
|
|||
|
|
@ -625,8 +625,9 @@ void install_signal_handlers(bool keep_sigalrm)
|
|||
#if !defined(CURL_WINDOWS_UWP) && !defined(UNDER_CE)
|
||||
{
|
||||
curl_win_thread_handle_t thread;
|
||||
thread = _beginthreadex(NULL, 0, &main_window_loop,
|
||||
(void *)GetModuleHandle(NULL), 0, &thread_main_id);
|
||||
thread = CURL_WIN_BEGINTHREAD(NULL, 0, &main_window_loop,
|
||||
(void *)GetModuleHandle(NULL), 0,
|
||||
&thread_main_id);
|
||||
thread_main_window = (HANDLE)thread;
|
||||
if(!thread_main_window || !thread_main_id)
|
||||
logmsg("cannot start main window loop");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue