Skip to content

Commit

Permalink
Merge pull request #187 from eagleoflqj/ohos
Browse files Browse the repository at this point in the history
OpenHarmony doesn't support pthread_setcancelstate.
  • Loading branch information
pdimov authored Jan 8, 2025
2 parents 3e147e4 + 9a3febf commit 7178a52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/boost/core/detail/sp_thread_sleep.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ namespace core

inline void sp_thread_sleep() BOOST_NOEXCEPT
{
#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__)
#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__) && !defined(__OHOS__)

int oldst;
pthread_setcancelstate( PTHREAD_CANCEL_DISABLE, &oldst );
Expand All @@ -85,7 +85,7 @@ inline void sp_thread_sleep() BOOST_NOEXCEPT

nanosleep( &rqtp, 0 );

#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__)
#if defined(BOOST_HAS_PTHREADS) && !defined(__ANDROID__) && !defined(__OHOS__)

pthread_setcancelstate( oldst, &oldst );

Expand Down

0 comments on commit 7178a52

Please sign in to comment.