GIT.Harvie.CZ
/
mirrors
/
Programs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
extra yield
[mirrors/Programs.git]
/
c
/
pthread_extra
/
pthread_pause.c
diff --git
a/c/pthread_extra/pthread_pause.c
b/c/pthread_extra/pthread_pause.c
index c0d43507d12702e4b6174d99d299e8cbbb3700df..d168121f20e6fb986440380865beb5bbe2cb2867 100644
(file)
--- a/
c/pthread_extra/pthread_pause.c
+++ b/
c/pthread_extra/pthread_pause.c
@@
-63,6
+63,12
@@
int pthread_pause_reschedule(pthread_t thread) {
return 0;
}
return 0;
}
+int pthread_extra_yield() {
+ //Yield to both schedulers
+ pthread_pause_reschedule(pthread_self());
+ return pthread_yield();
+}
+
int pthread_pause(pthread_t thread) {
//Set thread as paused and notify it via signal (wait when queue full)
pthread_user_data_internal(thread)->running = 0;
int pthread_pause(pthread_t thread) {
//Set thread as paused and notify it via signal (wait when queue full)
pthread_user_data_internal(thread)->running = 0;
This page took
0.127945 seconds
and
4
git commands to generate.