Revert of Use sched_yield on all POSIX platforms in PlatformThread. (patchset #1 id:1 of https://codereview.webrtc.org/2725573002/ )

Reason for revert:
breaks linux_ubsan bots.

Original issue's description:
> Reland of Use sched_yield on all POSIX platforms in PlatformThread. (patchset #1 id:1 of https://codereview.webrtc.org/2712133003/ )
>
> Reason for revert:
> Relanding - using sched_yield() in PlatformThread on all posix platforms.
>
> Original issue's description:
> > Revert of Use sched_yield on all POSIX platforms in PlatformThread. (patchset #1 id:1 of https://codereview.webrtc.org/2716683002/ )
> >
> > Reason for revert:
> > Reverting this change since it didn't affect the perf regressions we were seeing and actually seems to have caused more regressions as per comment in the bug.
> >
> > Original issue's description:
> > > Use sched_yield on all POSIX platforms in PlatformThread.
> > > (not only MacOS)
> > >
> > > This is a test to see if perf regressions we're seeing may be related to the use of nanosleep().
> > >
> > > BUG=695438
> > > TBR=solenberg@webrtc.org
> > >
> > > Review-Url: https://codereview.webrtc.org/2716683002 .
> > > Cr-Commit-Position: refs/heads/master@{#16807}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/384498abb5a0dc3e871e437e56b4a556c3ec1023
> >
> > TBR=solenberg@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=695438
> >
> > Review-Url: https://codereview.webrtc.org/2712133003
> > Cr-Commit-Position: refs/heads/master@{#16833}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/3ba1a8cd1b875dc7bfcb7075fe4f78d0dfe0ff98
>
> TBR=solenberg@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=695438
>
> Review-Url: https://codereview.webrtc.org/2725573002
> Cr-Commit-Position: refs/heads/master@{#16899}
> Committed: https://chromium.googlesource.com/external/webrtc/+/4974df41838367e4d50c42bef3be121c7ac6e331

TBR=solenberg@webrtc.org,tommi@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=695438

Review-Url: https://codereview.webrtc.org/2721893002
Cr-Commit-Position: refs/heads/master@{#16903}
diff --git a/webrtc/base/platform_thread.cc b/webrtc/base/platform_thread.cc
index 8961d0f..52f8810 100644
--- a/webrtc/base/platform_thread.cc
+++ b/webrtc/base/platform_thread.cc
@@ -221,6 +221,9 @@
     return;
   }
 // TODO(tommi): Delete the below.
+#if !defined(WEBRTC_MAC) && !defined(WEBRTC_WIN)
+  const struct timespec ts_null = {0};
+#endif
   do {
     // The interface contract of Start/Stop is that for a successful call to
     // Start, there should be at least one call to the run function.  So we
@@ -232,7 +235,11 @@
     SleepEx(0, true);
   } while (!stop_);
 #else
+#if defined(WEBRTC_MAC)
     sched_yield();
+#else
+    nanosleep(&ts_null, nullptr);
+#endif
   } while (!AtomicOps::AcquireLoad(&stop_flag_));
 #endif  // defined(WEBRTC_WIN)
 }