Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fedora 30 packaging fix issu
[src/app-framework-binder.git]
/
src
/
jobs.c
diff --git
a/src/jobs.c
b/src/jobs.c
index
4a88c30
..
e75a117
100644
(file)
--- a/
src/jobs.c
+++ b/
src/jobs.c
@@
-337,7
+337,7
@@
static void evloop_release()
{
struct thread *nh, *ct = current_thread;
{
struct thread *nh, *ct = current_thread;
- if (evloop.holder == ct) {
+ if (
ct &&
evloop.holder == ct) {
nh = ct->nholder;
evloop.holder = nh;
if (nh)
nh = ct->nholder;
evloop.holder = nh;
if (nh)
@@
-355,6
+355,9
@@
static int evloop_get()
if (evloop.holder)
return evloop.holder == ct;
if (evloop.holder)
return evloop.holder == ct;
+ if (!evloop.sdev)
+ return 0;
+
ct->nholder = NULL;
evloop.holder = ct;
return 1;
ct->nholder = NULL;
evloop.holder = ct;
return 1;
@@
-397,6
+400,7
@@
static void evloop_acquire()
*/
static void thread_enter(volatile struct thread *me)
{
*/
static void thread_enter(volatile struct thread *me)
{
+ evloop_release();
/* initialize description of itself and link it in the list */
me->tid = pthread_self();
me->stop = 0;
/* initialize description of itself and link it in the list */
me->tid = pthread_self();
me->stop = 0;