]> Savannah Git Hosting - gnulib.git/commitdiff
sched_yield: Implement for OS/2 kLIBC.
authorKO Myung-Hun <komh78@gmail.com>
Tue, 19 Jan 2021 17:41:09 +0000 (18:41 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Jan 2021 17:41:09 +0000 (18:41 +0100)
* lib/sched_yield.c (sched_yield) [OS/2 kLIBC]: New implementation.

ChangeLog
lib/sched_yield.c

index 228a784ce73d157fc48e34e80711bf56c1f61365..b013f08e08e6dae7249e8259d33251da9f525b57 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-01-19  KO Myung-Hun  <komh78@gmail.com>
+
+       sched_yield: Implement for OS/2 kLIBC.
+       * lib/sched_yield.c (sched_yield) [OS/2 kLIBC]: New implementation.
+
 2021-01-19  KO Myung-Hun  <komh78@gmail.com>
 
        spawn: Use special invocation for <spawn.h> on OS/2 kLIBC.
index 0a0ff3c9c4620a53e1d036c13da25e53f99f2fd6..880711405e400a0bd5b4b8d607f9684acb12e279 100644 (file)
@@ -34,6 +34,19 @@ sched_yield (void)
   return 0;
 }
 
+#elif defined __KLIBC__
+/* OS/2 kLIBC implementation */
+
+# define INCL_DOS
+# include <os2.h>
+
+int
+sched_yield (void)
+{
+  DosSleep (0);
+  return 0;
+}
+
 #else
 /* Provide a dummy implementation for single-threaded applications.  */