]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/interprocess/detail/os_thread_functions.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / interprocess / detail / os_thread_functions.hpp
index 4b13a116c78b98e5f6dc1cb66272f3d391905691..624321fc6b72120f3dbb5949775f9c6787a0fa72 100644 (file)
 #include <boost/interprocess/detail/config_begin.hpp>
 #include <boost/interprocess/detail/workaround.hpp>
 #include <boost/interprocess/streams/bufferstream.hpp>
-#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
 #include <cstddef>
 #include <ostream>
 
 #if defined(BOOST_INTERPROCESS_WINDOWS)
 #  include <boost/interprocess/detail/win32_api.hpp>
-#  include <process.h>
+#  include <boost/winapi/thread.hpp>
 #else
 #  include <pthread.h>
 #  include <unistd.h>
@@ -158,7 +157,7 @@ inline OS_highres_count_t get_current_system_highres_count()
    if(!winapi::query_performance_counter(&count)){
       count = winapi::get_tick_count();
    }
-   return count;
+   return (OS_highres_count_t)count;
 }
 
 inline void zero_highres_count(OS_highres_count_t &count)
@@ -422,7 +421,7 @@ inline void thread_sleep_tick()
    struct timespec rqt;
    //Sleep for the half of the tick time
    rqt.tv_sec  = 0;
-   rqt.tv_nsec = get_system_tick_ns()/2;
+   rqt.tv_nsec = (long)get_system_tick_ns()/2;
    ::nanosleep(&rqt, 0);
 }
 
@@ -519,9 +518,9 @@ inline void get_pid_str(pid_str_t &pid_str)
 
 #if defined(BOOST_INTERPROCESS_WINDOWS)
 
-inline int thread_create( OS_thread_t * thread, unsigned (__stdcall * start_routine) (void*), void* arg )
+inline int thread_create( OS_thread_t * thread, boost::ipwinapiext::LPTHREAD_START_ROUTINE_ start_routine, void* arg )
 {
-   void* h = (void*)_beginthreadex( 0, 0, start_routine, arg, 0, 0 );
+   void* h = boost::ipwinapiext::CreateThread(0, 0, start_routine, arg, 0, 0);
 
    if( h != 0 ){
       thread->m_handle = h;
@@ -530,9 +529,6 @@ inline int thread_create( OS_thread_t * thread, unsigned (__stdcall * start_rout
    else{
       return 1;
    }
-
-   thread->m_handle = (void*)_beginthreadex( 0, 0, start_routine, arg, 0, 0 );
-   return thread->m_handle != 0;
 }
 
 inline void thread_join( OS_thread_t thread)
@@ -576,7 +572,7 @@ class os_thread_func_ptr_deleter
 
 #if defined(BOOST_INTERPROCESS_WINDOWS)
 
-inline unsigned __stdcall launch_thread_routine( void * pv )
+inline boost::winapi::DWORD_ __stdcall launch_thread_routine(boost::winapi::LPVOID_ pv)
 {
    os_thread_func_ptr_deleter<abstract_thread> pt( static_cast<abstract_thread *>( pv ) );
    pt->run();
@@ -605,7 +601,7 @@ class launch_thread_impl
       : f_( f )
    {}
 
-   void run()
+   virtual void run() BOOST_OVERRIDE
    {  f_();  }
 
    private: