Ticket #9284: boost_interprocess_1_58_0.patch

File boost_interprocess_1_58_0.patch, 1.8 KB (added by megaposer <hp@…>, 7 years ago)

Patch to fix remaining synchronization object WAIT_ABANDONDED issues

  • include/boost/interprocess/detail/workaround.hpp

    diff --git a/include/boost/interprocess/detail/workaround.hpp b/include/boost/interprocess/detail/workaround.hpp
    index daf4455..e7efbe9 100644
    a b  
    2323
    2424#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
    2525   #define BOOST_INTERPROCESS_WINDOWS
    26    #define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION
     26   //#define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION
    2727   #define BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME
    2828   //Define this to connect with shared memory created with versions < 1.54
    2929   //#define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
  • include/boost/interprocess/sync/windows/winapi_wrapper_common.hpp

    diff --git a/include/boost/interprocess/sync/windows/winapi_wrapper_common.hpp b/include/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
    index 428a26e..0021132 100644
    a b inline bool winapi_wrapper_try_wait_for_single_object(void *handle)  
    5555   else if(ret == winapi::wait_timeout){
    5656      return false;
    5757   }
     58   else if(ret == winapi::wait_abandoned)
     59   {
     60       winapi::release_mutex(handle);
     61       throw interprocess_exception(owner_dead_error);
     62   }
    5863   else{
    5964      error_info err = system_error_code();
    6065      throw interprocess_exception(err);
    inline bool winapi_wrapper_timed_wait_for_single_object(void *handle, const boos  
    8287   else if(ret == winapi::wait_timeout){
    8388      return false;
    8489   }
     90   else if (ret == winapi::wait_abandoned)
     91   {
     92       winapi::release_mutex(handle);
     93       throw interprocess_exception(owner_dead_error);
     94   }
    8595   else{
    8696      error_info err = system_error_code();
    8797      throw interprocess_exception(err);