Skip to content

Instantly share code, notes, and snippets.

@okumura
Last active December 26, 2015 15:29
Show Gist options
  • Save okumura/7173498 to your computer and use it in GitHub Desktop.
Save okumura/7173498 to your computer and use it in GitHub Desktop.
Get Thread ID for Windows.
unsigned int mw32GetTID() {
#if defined(_M_X64)
return __readgsdword(0x48);
#else
return __readfsdword(0x24);
#endif
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment