Skip to content

Fix Issue 275#276

Merged
viboes merged 1 commit intoboostorg:developfrom
austin-beer:fix_eintr_issue_275
Apr 2, 2019
Merged

Fix Issue 275#276
viboes merged 1 commit intoboostorg:developfrom
austin-beer:fix_eintr_issue_275

Conversation

@austin-beer
Copy link
Copy Markdown
Contributor

  • Re-fixed the EINTR bug that exists in some pthreads implementations.
    It was originally fixed in https://svn.boost.org/trac10/ticket/6200 and
    was accidentally disabled in 5b209c2.
  • Made sure that the fix for the EINTR bug was consistently applied to
    all code in the library.
  • Made sure that all pthread_mutex_() and pthread_cond_() function
    calls in the library were consistently decorated with
    BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS.

* Re-fixed the EINTR bug that exists in some pthreads implementations.
It was originally fixed in https://svn.boost.org/trac10/ticket/6200 and
was accidentally disabled in 5b209c2.
* Made sure that the fix for the EINTR bug was consistently applied to
all code in the library.
* Made sure that all pthread_mutex_*() and pthread_cond_*() function
calls in the library were consistently decorated with
BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS.
@viboes viboes merged commit 5c6180f into boostorg:develop Apr 2, 2019
@austin-beer austin-beer deleted the fix_eintr_issue_275 branch April 2, 2019 17:09
ret = pthread_cond_destroy(&cond);
} while (ret == EINTR);
ret = posix::pthread_cond_destroy(&cond);
BOOST_ASSERT(!ret);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change both BOOST_ASSERT into BOOST_VERIFY if everything is ok with the logic itself.

gcc.compile.c++ ../../../../bin.v2/libs/spirit/classic/test/grammar_mt_tests.test/gcc-8/release/cxxstd-03-iso/threadapi-pthread/threading-multi/visibility-hidden/grammar_mt_tests.o
In file included from ../../../../boost/thread/pthread/thread_data.hpp:14,
                 from ../../../../boost/thread/thread_only.hpp:17,
                 from ../../../../boost/thread/thread.hpp:12,
                 from grammar_mt_tests.cpp:33:
../../../../boost/thread/pthread/condition_variable_fwd.hpp: In destructor ‘boost::condition_variable::~condition_variable()’:
../../../../boost/thread/pthread/condition_variable_fwd.hpp:79:17: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
             int ret;
                 ^~~
cc1plus: all warnings being treated as errors
    "ccache" "g++-8"   -std=c++03 -fvisibility-inlines-hidden -fPIC -m64 -pthread -O3 -finline-functions -Wno-inline -Wall -Wextra -Werror -fvisibility=hidden -Wno-maybe-uninitialized -Wno-sign-compare -Wno-implicit-fallthrough  -DBOOST_ALL_NO_LIB -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DNDEBUG  -I"." -I"../../../.." -c -o "../../../../bin.v2/libs/spirit/classic/test/grammar_mt_tests.test/gcc-8/release/cxxstd-03-iso/threadapi-pthread/threading-multi/visibility-hidden/grammar_mt_tests.o" "grammar_mt_tests.cpp"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll submit another PR for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants