Ticket #7078: thread.patch

File thread.patch, 1.0 KB (added by Luke Elliott <lukester_null@…>, 10 years ago)
  • libs\thread\src\win32\thread.cpp

     
    218218        ResumeThread(thread_info->thread_handle);
    219219    }
    220220
    221221    void thread::start_thread(const attributes& attr)
    222222    {
    223223      //uintptr_t const new_thread=_beginthreadex(attr.get_security(),attr.get_stack_size(),&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
    224       uintptr_t const new_thread=_beginthreadex(0,attr.get_stack_size(),&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
     224      uintptr_t const new_thread=_beginthreadex(0,static_cast<unsigned int>(attr.get_stack_size()),&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
    225225      if(!new_thread)
    226226      {
    227227          boost::throw_exception(thread_resource_error());
    228228      }
    229229      intrusive_ptr_add_ref(thread_info.get());
    230230      thread_info->thread_handle=(detail::win32::handle)(new_thread);