2
0
mirror of https://github.com/boostorg/thread.git synced 2026-01-23 06:02:14 +00:00

Protect get_thread_info from macro expansion to prevent errors on Haiku. Fixes #4341.

[SVN r63295]
This commit is contained in:
Steven Watanabe
2010-06-24 19:38:16 +00:00
parent 4551e8759b
commit 6b9a2d791b
3 changed files with 17 additions and 17 deletions

View File

@@ -196,14 +196,14 @@ namespace boost
detach();
}
detail::thread_data_ptr thread::get_thread_info() const
detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
{
return thread_info;
}
void thread::join()
{
detail::thread_data_ptr const local_thread_info=get_thread_info();
detail::thread_data_ptr const local_thread_info=(get_thread_info)();
if(local_thread_info)
{
bool do_join=false;
@@ -246,7 +246,7 @@ namespace boost
bool thread::timed_join(system_time const& wait_until)
{
detail::thread_data_ptr const local_thread_info=get_thread_info();
detail::thread_data_ptr const local_thread_info=(get_thread_info)();
if(local_thread_info)
{
bool do_join=false;
@@ -293,7 +293,7 @@ namespace boost
bool thread::joinable() const
{
return get_thread_info();
return (get_thread_info)();
}
@@ -391,7 +391,7 @@ namespace boost
thread::id thread::get_id() const
{
detail::thread_data_ptr const local_thread_info=get_thread_info();
detail::thread_data_ptr const local_thread_info=(get_thread_info)();
if(local_thread_info)
{
return id(local_thread_info);
@@ -404,7 +404,7 @@ namespace boost
void thread::interrupt()
{
detail::thread_data_ptr const local_thread_info=get_thread_info();
detail::thread_data_ptr const local_thread_info=(get_thread_info)();
if(local_thread_info)
{
lock_guard<mutex> lk(local_thread_info->data_mutex);
@@ -418,7 +418,7 @@ namespace boost
bool thread::interruption_requested() const
{
detail::thread_data_ptr const local_thread_info=get_thread_info();
detail::thread_data_ptr const local_thread_info=(get_thread_info)();
if(local_thread_info)
{
lock_guard<mutex> lk(local_thread_info->data_mutex);
@@ -432,7 +432,7 @@ namespace boost
thread::native_handle_type thread::native_handle()
{
detail::thread_data_ptr const local_thread_info=get_thread_info();
detail::thread_data_ptr const local_thread_info=(get_thread_info)();
if(local_thread_info)
{
lock_guard<mutex> lk(local_thread_info->data_mutex);