Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adélie Linux
gcompat
Commits
aa649428
Verified
Commit
aa649428
authored
Aug 18, 2020
by
Hal G
Committed by
A. Wilcox
Aug 18, 2020
Browse files
pthread: Add pthread_yield()
Calls the more standard sched_yield().
parent
2d759935
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.rst
View file @
aa649428
...
...
@@ -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)
==================
...
...
libgcompat/pthread.c
View file @
aa649428
...
...
@@ -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
();
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment