Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created March 3, 2017 10:39
Show Gist options
  • Save dogbert17/fd8f2ca807c4e57256f389c5deb87871 to your computer and use it in GitHub Desktop.
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
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