Created
March 3, 2017 10:39
-
-
Save dogbert17/fd8f2ca807c4e57256f389c5deb87871 to your computer and use it in GitHub Desktop.
Stupid code trying to figure if the same tc is messing itself up
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
static void enter_single_user(MVMThreadContext *tc, MVMDecoder *decoder) { | |
if (!MVM_trycas(&(decoder->body.in_use), 0, 1)) { | |
if (tc == decoder->body.tc) | |
fprintf(stderr, "tc's are equal\n"); | |
MVM_panic(17, "Decoder may not be used concurrently. Aborting ..."); | |
} | |
decoder->body.tc = tc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment