This patch makes a couple of fixes to the syscall rewrite I committed
earlier today.  There was a typo in the umask library call.  The gettid
call is actually GNU/Linux-specific.  In any case, gettid and tgkill are
apparently not in libc, and are only available by calling syscall
directly.  Bootstrapped and ran Go testsuite on
x86_64-unknown-linux-gnu.  Committed to mainline.

Ian

diff -r a856d4c9f3bf libgo/go/syscall/libcall_linux.go
--- a/libgo/go/syscall/libcall_linux.go	Sun Oct 23 21:05:06 2011 -0700
+++ b/libgo/go/syscall/libcall_linux.go	Sun Oct 23 21:54:06 2011 -0700
@@ -196,6 +196,10 @@
 // //sys	Fstatfs(fd int, buf *Statfs_t) (errno int)
 // //fstatfs(fd int, buf *Statfs_t) int
 
+// FIXME: Only available as a syscall.
+// //sysnb	Gettid() (tid int)
+// //gettid() Pid_t
+
 //sys	Ioperm(from int, num int, on int) (errno int)
 //ioperm(from _C_long, num _C_long, on int) int
 
@@ -298,8 +302,9 @@
 //sys	Tee(rfd int, wfd int, len int, flags int) (n int64, errno int)
 //tee(rfd int, wfd int, len Size_t, flags uint) Ssize_t
 
-//sysnb	Tgkill(tgid int, tid int, sig int) (errno int)
-//tgkill(tgid int, tid int, sig int) int
+// FIXME: Only available as a syscall.
+// //sysnb	Tgkill(tgid int, tid int, sig int) (errno int)
+// //tgkill(tgid int, tid int, sig int) int
 
 //sys	unlinkat(dirfd int, path string, flags int) (errno int)
 //unlinkat(dirfd int, path *byte, flags int) int
diff -r a856d4c9f3bf libgo/go/syscall/libcall_posix.go
--- a/libgo/go/syscall/libcall_posix.go	Sun Oct 23 21:05:06 2011 -0700
+++ b/libgo/go/syscall/libcall_posix.go	Sun Oct 23 21:54:06 2011 -0700
@@ -236,9 +236,6 @@
 //sysnb	Getrusage(who int, rusage *Rusage) (errno int)
 //getrusage(who int, rusage *Rusage) int
 
-//sysnb	Gettid() (tid int)
-//gettid() Pid_t
-
 //sysnb	gettimeofday(tv *Timeval, tz *byte) (errno int)
 //gettimeofday(tv *Timeval, tz *byte) int
 func Gettimeofday(tv *Timeval) (errno int) {
@@ -334,7 +331,7 @@
 // //times(tms *Tms) _clock_t
 
 //sysnb	Umask(mask int) (oldmask int)
-//umark(mask Mode_t) Mode_t
+//umask(mask Mode_t) Mode_t
 
 //sys	Unlink(path string) (errno int)
 //unlink(path *byte) int

Reply via email to