Export stop/start_world_external only for multi-threaded builds
authorIvan Maidanski <ivmai@mail.ru>
Fri, 27 Jul 2018 21:29:59 +0000 (00:29 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 27 Jul 2018 21:38:19 +0000 (00:38 +0300)
commit92741bb2c9ff09bce7ff8b6c7c7788acc1de331e
tree815a317cc418955869d95baa0729e94c2475a1d5
parent5587a42be326f3102a1fc0da3ab845831f212dae
Export stop/start_world_external only for multi-threaded builds
(fix of commit bb91f03)

Issue #173 (bdwgc).

Also, update GC_world_stopped value in GC_stop_world_external and
GC_start_world_external.

* include/gc.h (GC_stop_world_external, GC_start_world_external): Do not
declare unless GC_THREADS; add comment.
* misc.c (GC_stop_world_external, GC_start_world_external): Do not
define unless THREADS; add assertion that GC is initialized.
* misc.c [THREADS && THREAD_LOCAL_ALLOC] (GC_stop_world_external): Set
GC_world_stopped to true after STOP_WORLD; add assertion that the
world is not stopped.
* misc.c [THREADS && THREAD_LOCAL_ALLOC] (GC_start_world_external): Set
GC_world_stopped to false before START_WORLD; add assertion that the
world is stopped.
* tests/test.c [GC_PTHREADS && CPPCHECK] (main): Add UNTESTED for
GC_stop_world_external and GC_start_world_external.
include/gc.h
misc.c
tests/test.c