<p>I see what you are changing here and agree that thread_yield() should not be called cpu_switch_context_exit(). However, there is something else going on with the context changing code now because thread tests that were passing previously (eg. thread_msg_block_race, thread_race, etc...) are now not working. This PR is fine by me to address the immediate issue raised, but there is still a problem that needs fixing. I'm just not sure what that is at the moment.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/12109?email_source=notifications&email_token=ABE7WYBRB4X3HBLYKPC5XMLQIFCY3A5CNFSM4IRLVZKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6AFQRA#issuecomment-528504900">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYDTA73KPBM7FHJBGNLQIFCY3ANCNFSM4IRLVZKA">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYFMC4I5ZWGCNAYDKGDQIFCY3A5CNFSM4IRLVZKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6AFQRA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/12109?email_source=notifications\u0026email_token=ABE7WYBRB4X3HBLYKPC5XMLQIFCY3A5CNFSM4IRLVZKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6AFQRA#issuecomment-528504900",
"url": "https://github.com/RIOT-OS/RIOT/pull/12109?email_source=notifications\u0026email_token=ABE7WYBRB4X3HBLYKPC5XMLQIFCY3A5CNFSM4IRLVZKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6AFQRA#issuecomment-528504900",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>