summaryrefslogtreecommitdiff
path: root/src/buildtool/multithreading
AgeCommit message (Collapse)Author
2024-11-14multithreading: Implement IWYU suggestionsPaul Cristian Sarbu
2024-10-25Add dependencies explicitly that are included directlyKlaus Aehlig
... instead of relying on those dependencies being pulled in indirectly.
2024-10-08Name local variables using lower_caseMaksim Denisov
...and private members using lower_case_
2024-10-07Enable readability-* checks.Maksim Denisov
2024-10-07Enable readability-redundant-member-init check.Maksim Denisov
2024-09-23Reorder dependencies and remove duplicates in OSSMaksim Denisov
2024-08-29async_map_utils: Pass key_printer also for reporting pending tasks...Paul Cristian Sarbu
...in async map instances, same as for reporting cycles. This removes the restriction that the key object has to posses the ToString method, allowing it to be used, e.g., with just-mr maps. The now obsolete HasToString concept is removed.
2024-08-07Replace classic C boolean operators with keywordsMaksim Denisov
! => not; && => and, || => or
2024-04-29Fix race condition in task queueKlaus Aehlig
To avoid lock contention, our task system queues tasks in several queues. In order to know when there is no more work to be done, a global counter keeps track of the total work. Here, it is important that this counter be incremented before a value is added to the queue, for otherwise some other thread could pick it up and decrement the total work load, hence getting us in a state where the counter underestimates the total amount of work to be done. Fix the order of those operations.
2024-04-08Use properly included standard library types by defaultPaul Cristian Sarbu
2024-03-26Add missing system includesPaul Cristian Sarbu
Main culprits: - std::size_t, std::nullptr_t, and NULL require <cstddef> - std::move and std::forward require <utility> - unordered maps and sets require respective includes - std::for_each and std::all_of require <algorithm>
2024-03-19just analysis: Be explicit in logging locationPaul Cristian Sarbu
...by allowing a Logger instance to be provided.
2024-02-16async maps: Create utility library to handle cycle detectionPaul Cristian Sarbu
2024-02-15Replace glibc sync stubs when linking pthreadsOliver Reiche
... glibc provides synchronization stubs for single-threaded environments as weak symobls. When linking pthreads, these weak symbols must be replaced by the strong symbols provided by the pthread library. For dynamically linking pthreads, this is done automatically. However, to support this for static linking, we must ensure to link the whole archive.
2023-04-26imports: Switch to Microsoft GSL implementationOliver Reiche
... with two minor code base changes compared to previous use of gsl-lite: - dag.hpp: ActionNode::Ptr and ArtifactNode::Ptr are not wrapped in gsl::not_null<> anymore, due to lack of support for wrapping std::unique_ptr<>. More specifically, the move constructor is missing, rendering it impossible to use std::vector<>::emplace_back(). - utils/cpp/gsl.hpp: New header file added to implement the macros ExpectsAudit() and EnsureAudit(), asserts running only in debug builds, which were available in gsl-lite but are missing in MS GSL.
2023-03-15add missing ldflags -pthread and use -pthread consistentlyAlberto Sartori
2023-02-22cleanup: Fix typos in code line comments and logging messagesPaul Cristian Sarbu
2022-11-21Use the newly-added concept of private-depsKlaus Aehlig
While there, also add all direct dependencies explicitly; using directly dependencies that are pulled in only indireclty causes problems from a maintainability point of view.
2022-10-12Add copyright and license notice to all source and header filesKlaus Aehlig
Signed-off-by: Goetz Brasche <goetz.brasche@huawei.com>
2022-09-13Fix arch-specific type mismatchOliver Reiche
2022-07-07TaskSystem: Implement shutdownOliver Reiche
2022-07-06TaskSystem: Support wait for finishOliver Reiche
2022-07-06TaskSystem: Fix early shutdownOliver Reiche
... conceptually, it was possible that a previous task decrements the `num_threads_running_` counter before it is incremented by the next task. Therefore, we have to unify the queue and thread status in a single counter (`total_workload_`) and ensure that woken threads increment it before decrementing it for popping a queue.
2022-07-04Drop copy constructor from atomic valueOliver Reiche
2022-06-13multithreading: Add AtomicValue to atomically set/get valueOliver Reiche
... and use it to replace the commonly used pattern in Expression, LinkedMap, and GitTreeEntry. Furthermore, remove assignment operators for Expression and LinkedMap as those are considered to be used in an immutable manner anyway.
2022-06-02Add missing direct dependenciesKlaus Aehlig
2022-03-23Apply changes suggested by clang-format 11Oliver Reiche
2022-03-16Format: Apply compact JSON formattingOliver Reiche
2022-02-22Initial self-hosting commitKlaus Aehlig
This is the initial version of our tool that is able to build itself. In can be bootstrapped by ./bin/bootstrap.py Co-authored-by: Oliver Reiche <oliver.reiche@huawei.com> Co-authored-by: Victor Moreno <victor.moreno1@huawei.com>