diff options
Diffstat (limited to 'src/runtime/testdata/testprogcgo/windows')
-rw-r--r-- | src/runtime/testdata/testprogcgo/windows/win.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/runtime/testdata/testprogcgo/windows/win.go b/src/runtime/testdata/testprogcgo/windows/win.go new file mode 100644 index 0000000..f2eabb9 --- /dev/null +++ b/src/runtime/testdata/testprogcgo/windows/win.go @@ -0,0 +1,16 @@ +package windows + +/* +#cgo CFLAGS: -mnop-fun-dllimport + +#include <windows.h> + +DWORD agetthread() { + return GetCurrentThreadId(); +} +*/ +import "C" + +func GetThread() uint32 { + return uint32(C.agetthread()) +} |