diff --git a/boost/thread/pthread/condition_variable.hpp b/boost/thread/pthread/condition_variable.hpp
index 160c707..07e61f2 100644
a
|
b
|
namespace boost
|
52 | 52 | thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard; |
53 | 53 | detail::interruption_checker check_for_interruption(&internal_mutex,&cond); |
54 | 54 | guard.activate(m); |
55 | | res=pthread_cond_wait(&cond,&internal_mutex); |
| 55 | int ret; |
| 56 | do { |
| 57 | ret = pthread_cond_wait(&cond,m.mutex()->native_handle()); |
| 58 | } while (ret == EINTR); |
56 | 59 | } |
57 | 60 | this_thread::interruption_point(); |
58 | 61 | if(res) |
diff --git a/boost/thread/pthread/condition_variable_fwd.hpp b/boost/thread/pthread/condition_variable_fwd.hpp
index 365f511..b94c735 100644
a
|
b
|
namespace boost
|
44 | 44 | ~condition_variable() |
45 | 45 | { |
46 | 46 | BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex)); |
47 | | BOOST_VERIFY(!pthread_cond_destroy(&cond)); |
| 47 | int ret; |
| 48 | do { |
| 49 | ret = pthread_cond_destroy(&cond); |
| 50 | } while (ret == EINTR); |
48 | 51 | } |
49 | 52 | |
50 | 53 | void wait(unique_lock<mutex>& m); |
diff --git a/boost/thread/pthread/mutex.hpp b/boost/thread/pthread/mutex.hpp
index 2a326d7..4a4205d 100644
a
|
b
|
namespace boost
|
44 | 44 | } |
45 | 45 | ~mutex() |
46 | 46 | { |
47 | | BOOST_VERIFY(!pthread_mutex_destroy(&m)); |
| 47 | int ret; |
| 48 | do { |
| 49 | ret = pthread_mutex_destroy(&m); |
| 50 | } while (ret == EINTR); |
48 | 51 | } |
49 | 52 | |
50 | 53 | void lock() |
51 | 54 | { |
52 | | int const res=pthread_mutex_lock(&m); |
53 | | if(res) |
54 | | { |
| 55 | int res; |
| 56 | do { |
| 57 | res = pthread_mutex_lock(&m); |
| 58 | } while (res == EINTR); |
| 59 | |
| 60 | if (res) { |
55 | 61 | boost::throw_exception(lock_error(res)); |
56 | 62 | } |
57 | 63 | } |
58 | 64 | |
59 | 65 | void unlock() |
60 | 66 | { |
61 | | BOOST_VERIFY(!pthread_mutex_unlock(&m)); |
| 67 | int ret; |
| 68 | do { |
| 69 | ret = pthread_mutex_unlock(&m); |
| 70 | } while (ret == EINTR); |
| 71 | BOOST_VERIFY(!ret); |
62 | 72 | } |
63 | 73 | |
64 | 74 | bool try_lock() |
65 | 75 | { |
66 | | int const res=pthread_mutex_trylock(&m); |
| 76 | int res; |
| 77 | do { |
| 78 | res = pthread_mutex_trylock(&m); |
| 79 | } while (res == EINTR); |
67 | 80 | if(res && (res!=EBUSY)) |
68 | 81 | { |
69 | 82 | boost::throw_exception(lock_error(res)); |