Introducing a global variable to define the number of threads

* NEWS: Announce
* spot/Makefile.am: Add pthread to use threads
* spot/misc/common.cc,
  spot/misc/common.hh: Add variable + getter/setter
* spot/misc/Makefile.am: Add common.cc
This commit is contained in:
Philipp Schlehuber-Caissier 2022-05-15 23:54:18 +02:00
parent b11208440b
commit e064726b64
5 changed files with 46 additions and 1 deletions

View file

@ -169,3 +169,11 @@ namespace spot
# define SPOT_make_shared_enabled__(TYPE, ...) \
std::make_shared<TYPE>(__VA_ARGS__)
#endif
// Global variable to determine the maximal number of threads
SPOT_API void
set_nthreads(unsigned nthreads);
SPOT_API unsigned
get_nthreads();