projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1936ffc
)
Do not call sem_getvalue in stop_world if one thread exists
author
Ivan Maidanski
<ivmai@mail.ru>
Thu, 28 Dec 2017 08:18:25 +0000
(11:18 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Thu, 28 Dec 2017 08:18:25 +0000
(11:18 +0300)
* pthread_stop_world.c [!GC_OPENBSD_UTHREADS && !NACL] (GC_stop_world):
Do not call sem_getvalue() if n_live_threads is zero (matters only if
GC_retry_signals).
pthread_stop_world.c
patch
|
blob
|
history
diff --git
a/pthread_stop_world.c
b/pthread_stop_world.c
index
6e9f406
..
bda842c
100644
(file)
--- a/
pthread_stop_world.c
+++ b/
pthread_stop_world.c
@@
-808,7
+808,7
@@
GC_INNER void GC_stop_world(void)
AO_store_release(&GC_world_is_stopped, TRUE);
n_live_threads = GC_suspend_all();
- if (GC_retry_signals) {
+ if (GC_retry_signals
&& n_live_threads > 0
) {
unsigned long wait_usecs = 0; /* Total wait since retry. */
# define WAIT_UNIT 3000
# define RETRY_INTERVAL 100000