Created
March 22, 2021 10:36
-
-
Save TrigDevelopment/2057188c594aa9c5ed87a475ed1baf15 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| typedef struct { | |
| int counter; | |
| } atomic_t; | |
| /*@ ensures v.counter == \old(v.counter) + 1; | |
| */ | |
| static inline void atomic_inc(atomic_t v); | |
| /*@ assigns \nothing; | |
| ensures 1 == 0; | |
| */ | |
| void f() { | |
| atomic_t some_atomic; | |
| atomic_inc(some_atomic); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment