v2 / vlib / sync / thread_windows.c.v
9 lines · 7 sloc · 231 bytes · fcbe2e6ce77207e4d35b31cade9d6f1ecef55b5f
Raw
1module sync
2
3// Get current thread ID from Windows API (via C interface)
4fn C.GetCurrentThreadId() u32
5
6// thread_id returns a unique identifier for the caller thread.
7pub fn thread_id() u64 {
8 return u64(C.GetCurrentThreadId())
9}
10