diff options
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/src/thread.cc | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index bf7f50e..05b0c1e 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2009-12-17 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/42198 + * src/thread.cc (thread::_M_start_thread): Throw system_error + immediately if the thread system is inactive. + 2009-12-16 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/21772 part 2 diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc index 334e5cb..879e864 100644 --- a/libstdc++-v3/src/thread.cc +++ b/libstdc++-v3/src/thread.cc @@ -83,6 +83,9 @@ namespace std void thread::_M_start_thread(__shared_base_type __b) { + if (!__gthread_active_p()) + __throw_system_error(int(errc::operation_not_permitted)); + __b->_M_this_ptr = __b; int __e = __gthread_create(&_M_id._M_thread, &execute_native_thread_routine, __b.get()); |