Verified Commit aa649428 authored by Hal G's avatar Hal G Committed by A. Wilcox
Browse files

pthread: Add pthread_yield()

Calls the more standard sched_yield().
parent 2d759935
......@@ -8,6 +8,15 @@
© 2016-2019 Adélie Linux and contributors. NCSA open source licence.
0.9.1 (2020-08-??)
==================
pthread
-------
* Add pthread_yield from Hal G.
0.9.0 (2020-07-06)
==================
......
......@@ -2,6 +2,7 @@
#include <errno.h> /* errno */
#include <fcntl.h> /* O_CLOEXEC, O_RDONLY */
#include <pthread.h> /* pthread_atfork */
#include <sched.h> /* sched_yield */
#include <unistd.h> /* open, read */
#include "alias.h" /* weak_alias */
......@@ -52,3 +53,11 @@ int pthread_getname_np(pthread_t thread, char *name, size_t len)
return 0;
}
/**
* Yield this thread.
*/
int pthread_yield(void)
{
return sched_yield();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment