Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
51dec77e
Commit
51dec77e
authored
Mar 21, 2016
by
Pedro Gonnet
Browse files
implement fix suggested by peter.
parent
b875704d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scheduler.c
View file @
51dec77e
...
...
@@ -1011,6 +1011,7 @@ void scheduler_start(struct scheduler *s, unsigned int mask,
/* Wait for the rewait tasks to have executed. */
pthread_mutex_lock
(
&
s
->
sleep_mutex
);
pthread_cond_broadcast
(
&
s
->
sleep_cond
);
while
(
s
->
waiting
>
waiting_old
)
{
pthread_cond_wait
(
&
s
->
sleep_cond
,
&
s
->
sleep_mutex
);
}
...
...
@@ -1032,6 +1033,11 @@ void scheduler_start(struct scheduler *s, unsigned int mask,
}
}
/* To be safe, fire of one last sleep_cond in a safe way. */
pthread_mutex_lock
(
&
s
->
sleep_mutex
);
pthread_cond_broadcast
(
&
s
->
sleep_cond
);
pthread_mutex_unlock
(
&
s
->
sleep_mutex
);
// message( "enqueueing tasks took %.3f %s." ,
// clocks_from_ticks( getticks() - tic ), clocks_getunit());
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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