diff options
author | Mike Buland <mike@xagasoft.com> | 2022-09-29 18:18:36 -0700 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2022-09-29 18:18:36 -0700 |
commit | fbcbfceb7fe95b974a4bbe46a1726034edde3946 (patch) | |
tree | 71de02874f123aca189234da299bbbc4ba755b37 /src/stable/thread.cpp | |
parent | 2cc382a91d4d252244ce6a5035932aab085b9b3f (diff) | |
download | libbu++-fbcbfceb7fe95b974a4bbe46a1726034edde3946.tar.gz libbu++-fbcbfceb7fe95b974a4bbe46a1726034edde3946.tar.bz2 libbu++-fbcbfceb7fe95b974a4bbe46a1726034edde3946.tar.xz libbu++-fbcbfceb7fe95b974a4bbe46a1726034edde3946.zip |
Replaced deprecated thread_yield with sched_yield.
Diffstat (limited to 'src/stable/thread.cpp')
-rw-r--r-- | src/stable/thread.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/stable/thread.cpp b/src/stable/thread.cpp index 7d362e9..5fe034a 100644 --- a/src/stable/thread.cpp +++ b/src/stable/thread.cpp | |||
@@ -6,6 +6,7 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include "bu/thread.h" | 8 | #include "bu/thread.h" |
9 | #include <sched.h> | ||
9 | 10 | ||
10 | namespace Bu { subExceptionDef( ThreadException ); } | 11 | namespace Bu { subExceptionDef( ThreadException ); } |
11 | 12 | ||
@@ -73,10 +74,6 @@ bool Bu::Thread::join() | |||
73 | 74 | ||
74 | void Bu::Thread::yield() | 75 | void Bu::Thread::yield() |
75 | { | 76 | { |
76 | #ifndef WIN32 | ||
77 | pthread_yield(); | ||
78 | #else | ||
79 | sched_yield(); | 77 | sched_yield(); |
80 | #endif | ||
81 | } | 78 | } |
82 | 79 | ||