mirror of
https://github.com/boostorg/thread.git
synced 2026-02-08 23:22:13 +00:00
Make it possible to compile with BOOST_NO_EXCEPTIONS defined
This commit is contained in:
@@ -27,9 +27,9 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__VXWORKS__)
|
||||
#if defined(__VXWORKS__)
|
||||
#include <vxCpuLib.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <boost/algorithm/string/split.hpp>
|
||||
#include <boost/algorithm/string/trim.hpp>
|
||||
@@ -53,11 +53,13 @@ namespace boost
|
||||
i->second->unlock();
|
||||
i->first->notify_all();
|
||||
}
|
||||
//#ifndef BOOST_NO_EXCEPTIONS
|
||||
for (async_states_t::iterator i = async_states_.begin(), e = async_states_.end();
|
||||
i != e; ++i)
|
||||
{
|
||||
(*i)->notify_deferred();
|
||||
}
|
||||
//#endif
|
||||
}
|
||||
|
||||
struct thread_exit_callback_node
|
||||
@@ -213,8 +215,10 @@ namespace boost
|
||||
~externally_launched_thread() {
|
||||
BOOST_ASSERT(notify.empty());
|
||||
notify.clear();
|
||||
//#ifndef BOOST_NO_EXCEPTIONS
|
||||
BOOST_ASSERT(async_states_.empty());
|
||||
async_states_.clear();
|
||||
//#endif
|
||||
}
|
||||
void run()
|
||||
{}
|
||||
@@ -498,9 +502,9 @@ namespace boost
|
||||
set &= set -1;
|
||||
}
|
||||
return(i);
|
||||
#else
|
||||
#else
|
||||
return (__builtin_popcount(set) );
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(__GLIBC__)
|
||||
return get_nprocs();
|
||||
#else
|
||||
@@ -773,6 +777,8 @@ namespace boost
|
||||
current_thread_data->notify_all_at_thread_exit(&cond, lk.release());
|
||||
}
|
||||
}
|
||||
|
||||
//#ifndef BOOST_NO_EXCEPTIONS
|
||||
namespace detail {
|
||||
|
||||
void BOOST_THREAD_DECL make_ready_at_thread_exit(shared_ptr<shared_state_base> as)
|
||||
@@ -784,7 +790,7 @@ namespace detail {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user