Closed CrustyAuklet closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 93.87%. Comparing base (
fb1f8dd
) to head (73f4935
).
The CI failures weren't related to this PR and have been fixed in main
. Once you have addressed the review comments above; please rebase onto the latest main
, or merge main
. This should make the build go green.
thread local variables will trigger a memory allocation on a bare metal system. When running tests on a single thread, or a system without threads, there is no benefit to using a
thread_local
variable. As discussed in #158.This change creates a feature flag to control if snitch should be compiled with support for threading. A macro
SNITCH_THREAD_LOCAL
is defined in the config header that resolves to nothing when the feature flag is disabled, orthread_local
when it is enabled. The feature flag is enabled by default to preserve existing behavior.I names the feature flag
SNITCH_WITH_MULTITHREADING
to let it be used for any future threading features as well. If you want a more granular option that is an easy change.I updated the CMake project file, and the meson options. I don't use meson so someone double checking my work there would be great. The change seems simple enough though 😄