Commit Graph

11 Commits

Author SHA1 Message Date
Aliaksey Kandratsenka 38d741710b drop unused pwd.h/grp.h checks 2024-03-24 16:59:58 -04:00
Aliaksey Kandratsenka 701777bbee dont define unused HAVE_MEMORY_H in windows config.h 2024-03-24 16:59:57 -04:00
Aliaksey Kandratsenka ae31e6afa3 drop unused LT_OBJDIR from cmake config.h template 2024-03-24 16:59:57 -04:00
Aliaksey Kandratsenka e867bb7818 amputate unused Elf32_Versym check 2024-03-24 16:59:57 -04:00
Aliaksey Kandratsenka b65b9e3e61 amputate unused AC_INSTALL_PREFIX 2024-03-24 16:59:57 -04:00
Aliaksey Kandratsenka 93380fc754 drop dependency on sys/resource.h
Biggest part of it is removal of SetTestResourceLimit. The reasoning
behind it is, we don't do it on windows. Tests pass just fine. So,
there is no reason to bother.
2024-03-20 16:05:06 -04:00
Aliaksey Kandratsenka 6691226953 split and rewrite TLS access for thread caches
Logic was removed from thread_cache.{h,cc} into
thread_cache_ptr.{h,cc}.

Separation will help possible future evolution, and we already changed
the logic quite a bit:

* early access (when TLS isn't initialized yet) now uses global
ThreadCache instance. We therefore have ThreadCachePtr instances
managing required locking. This eliminates unnecessary complication of
PTHREADS_CRASHES_IF_RUN_TOO_EARLY logic, and any other danger of
touching TLS too early. BTW previous implementation actually leaked
initial early-initialized ThreadCache instance(!)

* old configure-time HAVE_TLS logic is amputated. Config-time part of
it made little sense as C++ 17 guarantees availability of
thread_local, but we have manually curated deny-list of "bad" OSes,
that we tested (via compile checks!) at configure time. Now this
is all compile time. There is now compile-time kHaveGoodTLS variable
and we're using it mostly via if constexpr.

* kHaveGoodTLS case of creating thread cache is simplified and made
more straightforward (no need to have in_setspecific logic).

* !kHaveGoodTLS case if fixed and improved too. We avoid
std:🧵:get_id, as it deadlocks on mingw. We use errno address as
a portable and (usually) async-signal safe 'my thread' identifier. We
also eliminate linear searching of thread's cache and replace it with
straightforward hash table lookup.
2024-02-03 15:57:14 -05:00
Aliaksey Kandratsenka 82a36a6fcd bump required c++ standard to c++-17 2024-01-30 15:54:24 -05:00
Aliaksey Kandratsenka 71b3a0c6c4 unreak gperftools/tcmalloc.h inclusion in MSVC projects 2024-01-30 15:53:10 -05:00
Aliaksey Kandratsenka d6728a0b4c drop unused PACKAGE_XYZ defines from {cmake/vsproject}/config.h
Automake or autoconf adds them automagically, but we don't really need
them. Main effect of this change is that MSVC version of config.h
doesn't duplicate package version.
2024-01-29 20:58:02 -05:00
lennoxho 9a6848de8a A number of cleanups
* Remove build dependency on HAVE_PTHREAD
* Remove build dependency on HAVE_STD_ALIGNED_VAL_T and ENABLE_ALIGNED_NEW_DELETE
* Remove redundant tcmalloc.h files & ensure there are no cross-build-tool references
* Adopt automake commit 26927d1 in the CMake build
2024-01-29 17:15:53 -08:00