Allow to alter DEFAULT/MAX_NTHREADS values in test_malloc/stack
authorIvan Maidanski <ivmai@mail.ru>
Wed, 6 Dec 2017 21:22:41 +0000 (00:22 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 22 Dec 2017 07:42:17 +0000 (10:42 +0300)
commit1c8c267f932de9c9613d35c802a333d80e21c941
tree9cd0670de8135bd2aa9af835024307549b15f36a
parentaf5a0a0061fa6941262db93680f6d14757b50569
Allow to alter DEFAULT/MAX_NTHREADS values in test_malloc/stack
(code refactoring)

* tests/run_parallel.h [!MAX_NTHREADS] (MAX_NTHREADS): Define (move
from test_malloc.c).
* tests/run_parallel.h [USE_PTHREADS || USE_VXTHREADS
|| USE_WINTHREADS] (run_parallel): Replace 100 with MAX_NTHREADS.
* tests/test_malloc.c (main): Add assertion that DEFAULT_NTHREADS
is not greater than MAX_NTHREADS.
* tests/test_stack.c (main): Likewise.
* tests/test_stack.c [!DEFAULT_NTHREADS] (DEFAULT_NTHREADS): Define
(to 4).
* tests/test_stack.c (main): Use DEFAULT_NTHREADS (instead of 4).
tests/run_parallel.h
tests/test_malloc.c
tests/test_stack.c