Ticket #8458: 8458.2.patch

File 8458.2.patch, 7.6 KB (added by viboes, 9 years ago)

Replaced erroneus patch

  • boost/thread/detail/thread.hpp

     
    157157#endif
    158158    }
    159159
    160     class BOOST_THREAD_DECL thread
     160    class thread
    161161    {
    162162    public:
    163163      typedef thread_attributes attributes;
     
    167167
    168168        struct dummy;
    169169
    170         void release_handle();
     170        BOOST_THREAD_DECL void release_handle();
    171171
    172172        detail::thread_data_ptr thread_info;
    173173
    174174    private:
    175         bool start_thread_noexcept();
    176         bool start_thread_noexcept(const attributes& attr);
     175        BOOST_THREAD_DECL bool start_thread_noexcept();
     176        BOOST_THREAD_DECL bool start_thread_noexcept(const attributes& attr);
    177177    public:
    178178        void start_thread()
    179179        {
     
    190190          }
    191191        }
    192192
    193         explicit thread(detail::thread_data_ptr data);
     193        BOOST_THREAD_DECL explicit thread(detail::thread_data_ptr data);
    194194
    195         detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
     195        BOOST_THREAD_DECL detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
    196196
    197197#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
    198198#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
     
    243243        thread(const volatile thread&);
    244244#endif
    245245#endif
    246         thread() BOOST_NOEXCEPT;
     246        BOOST_THREAD_DECL thread() BOOST_NOEXCEPT;
    247247        ~thread()
    248248        {
    249249
     
    459459#endif
    460460
    461461
    462         bool joinable() const BOOST_NOEXCEPT;
     462        BOOST_THREAD_DECL bool joinable() const BOOST_NOEXCEPT;
    463463    private:
    464         bool join_noexcept();
     464        BOOST_THREAD_DECL bool join_noexcept();
    465465    public:
    466466        inline void join();
    467467
     
    494494#endif
    495495#if defined(BOOST_THREAD_PLATFORM_WIN32)
    496496    private:
    497         bool do_try_join_until_noexcept(uintmax_t milli, bool& res);
     497        BOOST_THREAD_DECL bool do_try_join_until_noexcept(uintmax_t milli, bool& res);
    498498        inline bool do_try_join_until(uintmax_t milli);
    499499    public:
    500         bool timed_join(const system_time& abs_time);
     500        BOOST_THREAD_DECL bool timed_join(const system_time& abs_time);
    501501        //{
    502502        //  return do_try_join_until(get_milliseconds_until(wait_until));
    503503        //}
     
    543543            return timed_join(get_system_time()+rel_time);
    544544        }
    545545#endif
    546         void detach();
     546        BOOST_THREAD_DECL void detach();
    547547
    548         static unsigned hardware_concurrency() BOOST_NOEXCEPT;
     548        BOOST_THREAD_DECL static unsigned hardware_concurrency() BOOST_NOEXCEPT;
    549549
    550550#define BOOST_THREAD_DEFINES_THREAD_NATIVE_HANDLE
    551551        typedef detail::thread_data_base::native_handle_type native_handle_type;
    552         native_handle_type native_handle();
     552        BOOST_THREAD_DECL native_handle_type native_handle();
    553553
    554554#if defined BOOST_THREAD_PROVIDES_THREAD_EQ
    555555        // Use thread::id when comparisions are needed
     
    571571
    572572#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
    573573        // extensions
    574         void interrupt();
    575         bool interruption_requested() const BOOST_NOEXCEPT;
     574        BOOST_THREAD_DECL void interrupt();
     575        BOOST_THREAD_DECL bool interruption_requested() const BOOST_NOEXCEPT;
    576576#endif
    577577    };
    578578
     
    595595#ifdef BOOST_THREAD_PLATFORM_PTHREAD
    596596        inline thread::id get_id() BOOST_NOEXCEPT;
    597597#else
    598         thread::id BOOST_THREAD_DECL get_id() BOOST_NOEXCEPT;
     598        BOOST_THREAD_DECL thread::id BOOST_THREAD_DECL get_id() BOOST_NOEXCEPT;
    599599#endif
    600600
    601601#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
  • libs/thread/src/win32/thread.cpp

     
    230230        }
    231231    }
    232232
    233     thread::thread() BOOST_NOEXCEPT
     233    BOOST_THREAD_DECL thread::thread() BOOST_NOEXCEPT
    234234    {}
    235235
    236     bool thread::start_thread_noexcept()
     236    BOOST_THREAD_DECL bool thread::start_thread_noexcept()
    237237    {
    238238        uintptr_t const new_thread=_beginthreadex(0,0,&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
    239239        if(!new_thread)
     
    247247        return true;
    248248    }
    249249
    250     bool thread::start_thread_noexcept(const attributes& attr)
     250    BOOST_THREAD_DECL bool thread::start_thread_noexcept(const attributes& attr)
    251251    {
    252252      //uintptr_t const new_thread=_beginthreadex(attr.get_security(),attr.get_stack_size(),&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
    253253      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);
     
    262262      return true;
    263263    }
    264264
    265     thread::thread(detail::thread_data_ptr data):
     265    BOOST_THREAD_DECL thread::thread(detail::thread_data_ptr data):
    266266        thread_info(data)
    267267    {}
    268268
     
    317317
    318318    }
    319319
    320     thread::id thread::get_id() const BOOST_NOEXCEPT
     320    BOOST_THREAD_DECL thread::id thread::get_id() const BOOST_NOEXCEPT
    321321    {
    322322    #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
    323323      detail::thread_data_ptr local_thread_info=(get_thread_info)();
     
    328328    #endif
    329329    }
    330330
    331     bool thread::joinable() const BOOST_NOEXCEPT
     331    BOOST_THREAD_DECL bool thread::joinable() const BOOST_NOEXCEPT
    332332    {
    333333        return (get_thread_info)() ? true : false;
    334334    }
    335     bool thread::join_noexcept()
     335    BOOST_THREAD_DECL bool thread::join_noexcept()
    336336    {
    337337
    338338        detail::thread_data_ptr local_thread_info=(get_thread_info)();
     
    349349    }
    350350
    351351#if defined BOOST_THREAD_USES_DATETIME
    352     bool thread::timed_join(boost::system_time const& wait_until)
     352    BOOST_THREAD_DECL bool thread::timed_join(boost::system_time const& wait_until)
    353353    {
    354354      return do_try_join_until(get_milliseconds_until(wait_until));
    355355    }
    356356#endif
    357     bool thread::do_try_join_until_noexcept(uintmax_t milli, bool& res)
     357    BOOST_THREAD_DECL bool thread::do_try_join_until_noexcept(uintmax_t milli, bool& res)
    358358    {
    359359      detail::thread_data_ptr local_thread_info=(get_thread_info)();
    360360      if(local_thread_info)
     
    385385    }
    386386
    387387#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
    388     void thread::interrupt()
     388    BOOST_THREAD_DECL void thread::interrupt()
    389389    {
    390390        detail::thread_data_ptr local_thread_info=(get_thread_info)();
    391391        if(local_thread_info)
     
    394394        }
    395395    }
    396396
    397     bool thread::interruption_requested() const BOOST_NOEXCEPT
     397    BOOST_THREAD_DECL bool thread::interruption_requested() const BOOST_NOEXCEPT
    398398    {
    399399        detail::thread_data_ptr local_thread_info=(get_thread_info)();
    400400        return local_thread_info.get() && (detail::win32::WaitForSingleObject(local_thread_info->interruption_handle,0)==0);
    401401    }
    402402
    403     unsigned thread::hardware_concurrency() BOOST_NOEXCEPT
     403    BOOST_THREAD_DECL unsigned thread::hardware_concurrency() BOOST_NOEXCEPT
    404404    {
    405405        //SYSTEM_INFO info={{0}};
    406406        SYSTEM_INFO info;
     
    409409    }
    410410#endif
    411411
    412     thread::native_handle_type thread::native_handle()
     412    BOOST_THREAD_DECL thread::native_handle_type thread::native_handle()
    413413    {
    414414        detail::thread_data_ptr local_thread_info=(get_thread_info)();
    415415        return local_thread_info?(detail::win32::handle)local_thread_info->thread_handle:detail::win32::invalid_handle_value;
    416416    }
    417417
    418     detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
     418    BOOST_THREAD_DECL detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
    419419    {
    420420        return thread_info;
    421421    }