* lib/sched_yield.c (sched_yield) [OS/2 kLIBC]: New. * modules/yield (Depends-on): Add sched_yield. --- lib/sched_yield.c | 13 +++++++++++++ modules/yield | 1 + 2 files changed, 14 insertions(+)
diff --git a/lib/sched_yield.c b/lib/sched_yield.c index 0a0ff3c9c..880711405 100644 --- a/lib/sched_yield.c +++ b/lib/sched_yield.c @@ -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. */ diff --git a/modules/yield b/modules/yield index 5ca862067..4481fde25 100644 --- a/modules/yield +++ b/modules/yield @@ -6,6 +6,7 @@ lib/glthread/yield.h m4/yield.m4 Depends-on: +sched_yield threadlib configure.ac: -- 2.22.0