You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can add some annotations to mutexes when using Clang, and in exchange get static checking for correctness (to a degree)
This is separate from TSAN runtime checks:
Then you can add -Wthread-safety -Wthread-safety-beta to compile flags
For example, here I annotate page_table here with GUARDED_BY(mutex), then it tells me in get_frame that I can't read/write to page_table without holding the mutex guarding it:
clion64_GcOEaCcBSZ.mp4
The text was updated successfully, but these errors were encountered:
That's great!!! This is one of the most functionality that I've missed from the Rust programming language when I started to work on the BusTub project.
You can add some annotations to mutexes when using Clang, and in exchange get static checking for correctness (to a degree)
This is separate from TSAN runtime checks:
-Wthread-safety -Wthread-safety-beta
to compile flagsFor example, here I annotate
page_table
here withGUARDED_BY(mutex)
, then it tells me inget_frame
that I can't read/write topage_table
without holding themutex
guarding it:clion64_GcOEaCcBSZ.mp4
The text was updated successfully, but these errors were encountered: