aboutsummaryrefslogtreecommitdiff
path: root/go/mismatch.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/mismatch.go')
-rw-r--r--go/mismatch.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/go/mismatch.go b/go/mismatch.go
new file mode 100644
index 0000000..bbcf6eb
--- /dev/null
+++ b/go/mismatch.go
@@ -0,0 +1,15 @@
+// Program mismatch should panic because the syscall being requested
+// never returns consistent results.
+package main
+
+import (
+ "fmt"
+ "syscall"
+
+ "kernel.org/pub/linux/libs/security/libcap/psx"
+)
+
+func main() {
+ tid, _, err := psx.Syscall3(syscall.SYS_GETTID, 0, 0, 0)
+ fmt.Printf("gettid() -> %d: %v\n", tid, err)
+}