Ticket #3335: mutex.hpp.patch

File mutex.hpp.patch, 973 bytes (added by Andrew Chittenden <andyc@…>, 13 years ago)

patch to boost/thread/pthread/mutex.hpp to make it BOOST_NO_EXCEPTIONS aware.

  • boost/thread/pthread/mutex.hpp

    ===== boost/thread/pthread/mutex.hpp 1.1 vs edited =====
    old new  
    3737            int const res=pthread_mutex_init(&m,NULL);
    3838            if(res)
    3939            {
     40#ifndef BOOST_NO_EXCEPTIONS
    4041                throw thread_resource_error();
     42#endif
    4143            }
    4244        }
    4345        ~mutex()
     
    8991            int const res=pthread_mutex_init(&m,NULL);
    9092            if(res)
    9193            {
     94#ifndef BOOST_NO_EXCEPTIONS
    9295                throw thread_resource_error();
     96#endif
    9397            }
    9498#ifndef BOOST_PTHREAD_HAS_TIMEDLOCK
    9599            int const res2=pthread_cond_init(&cond,NULL);
    96100            if(res2)
    97101            {
    98102                BOOST_VERIFY(!pthread_mutex_destroy(&m));
     103#ifndef BOOST_NO_EXCEPTIONS
    99104                throw thread_resource_error();
     105#endif
    100106            }
    101107            is_locked=false;
    102108#endif