===== boost/thread/pthread/mutex.hpp 1.1 vs edited =====
|
old
|
new
|
|
| 37 | 37 | int const res=pthread_mutex_init(&m,NULL); |
| 38 | 38 | if(res) |
| 39 | 39 | { |
| | 40 | #ifndef BOOST_NO_EXCEPTIONS |
| 40 | 41 | throw thread_resource_error(); |
| | 42 | #endif |
| 41 | 43 | } |
| 42 | 44 | } |
| 43 | 45 | ~mutex() |
| … |
… |
|
| 89 | 91 | int const res=pthread_mutex_init(&m,NULL); |
| 90 | 92 | if(res) |
| 91 | 93 | { |
| | 94 | #ifndef BOOST_NO_EXCEPTIONS |
| 92 | 95 | throw thread_resource_error(); |
| | 96 | #endif |
| 93 | 97 | } |
| 94 | 98 | #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK |
| 95 | 99 | int const res2=pthread_cond_init(&cond,NULL); |
| 96 | 100 | if(res2) |
| 97 | 101 | { |
| 98 | 102 | BOOST_VERIFY(!pthread_mutex_destroy(&m)); |
| | 103 | #ifndef BOOST_NO_EXCEPTIONS |
| 99 | 104 | throw thread_resource_error(); |
| | 105 | #endif |
| 100 | 106 | } |
| 101 | 107 | is_locked=false; |
| 102 | 108 | #endif |