Skip to content

Commit

Permalink
Merge pull request #5520 from onflow/jribbink/windows-binstat-fix
Browse files Browse the repository at this point in the history
Port Windows binstat fix to `master`
  • Loading branch information
jribbink authored Mar 6, 2024
2 parents 19d31c7 + eafb3c0 commit 64ab8d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utils/binstat/binstat.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@ uint64_t gettid() { return syscall(SYS_gettid); }
#include <stdint.h>
#include <pthread.h>
uint64_t gettid() { uint64_t tid; pthread_threadid_np(NULL, &tid); return tid; }
#elif defined(_WIN32)
#include <stdint.h>
#include <windows.h>
uint64_t gettid() { return (uint64_t)GetCurrentThreadId(); }
#else
# error "Unknown platform; __linux__ or __APPLE__ supported"
# error "Unknown platform; __linux__ or __APPLE__ or _WIN32 expected"
#endif
*/
import "C"
Expand Down

0 comments on commit 64ab8d2

Please sign in to comment.