summaryrefslogtreecommitdiffstats
path: root/libgo
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-31 20:47:55 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-31 20:47:55 +0000
commit1c5daf3427a1bf6496237889873323c7fcb38086 (patch)
treec6c3283493da24d6fc2ee24d0da09a1603cbb9f7 /libgo
parent63b32c4037704311d32701ef4283bdc90c3e9893 (diff)
downloadppe42-gcc-1c5daf3427a1bf6496237889873323c7fcb38086.tar.gz
ppe42-gcc-1c5daf3427a1bf6496237889873323c7fcb38086.zip
syscall: Add Gettid on GNU/Linux systems.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183775 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/syscall/libcall_linux.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go
index 7e88d04026e..aa1440118e3 100644
--- a/libgo/go/syscall/libcall_linux.go
+++ b/libgo/go/syscall/libcall_linux.go
@@ -195,9 +195,10 @@ func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0)
// //sys Fstatfs(fd int, buf *Statfs_t) (err error)
// //fstatfs(fd int, buf *Statfs_t) int
-// FIXME: Only available as a syscall.
-// //sysnb Gettid() (tid int)
-// //gettid() Pid_t
+func Gettid() (tid int) {
+ r1, _, _ := Syscall(SYS_GETTID, 0, 0, 0)
+ return int(r1)
+}
// FIXME: mksysinfo linux_dirent
// Or just abandon this function.
OpenPOWER on IntegriCloud