-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for tracking thread causality.
This change adds support for tracking causality among thread operations. We do this in the standard way, by associating a vector clock with each thread. The i'th element of a thread's vector clock denotes its knowledge of the clock of thread i. Clocks are partially ordered using a pointwise ordering <. The main property we want is that for any pair of events p, q: (p causally precedes q) iff (clock at p < clock at q). We update the code for thread spawn and join, as well as the various synchronization objects (Atomics, Barriers, CondVars, Mutexes, RwLocks and mpsc channels) to track causality by updating vector clocks appropriately. This change does not currently properly track causality for async interactions; those will be done in a subsequent PR.
- Loading branch information
Rajeev Joshi
authored and
Rajeev Joshi
committed
Jun 29, 2021
1 parent
74fb737
commit 544f247
Showing
16 changed files
with
1,037 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.