aboutsummaryrefslogtreecommitdiff
path: root/libgo/runtime/go-libmain.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2017-07-18 23:14:29 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2017-07-18 23:14:29 +0000
commit9e45ca5f83954a340cc78c2f86b7b3294188047f (patch)
tree127c7047f2588027e80a69215a4ce7e2adb7b509 /libgo/runtime/go-libmain.c
parentab86687fee4024af20d852e26fbb743de05d0efe (diff)
downloadgcc-9e45ca5f83954a340cc78c2f86b7b3294188047f.zip
gcc-9e45ca5f83954a340cc78c2f86b7b3294188047f.tar.gz
gcc-9e45ca5f83954a340cc78c2f86b7b3294188047f.tar.bz2
re PR go/81451 (missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’)
PR go/81451 runtime: inline runtime_osinit We had two identical copies of runtime_osinit. They set runtime_ncpu, a variable that is no longer used. Removing that leaves us with two lines. Inline those two lines in the two places the function was called. This fixes GCC PR 81451. Reviewed-on: https://go-review.googlesource.com/48862 From-SVN: r250326
Diffstat (limited to 'libgo/runtime/go-libmain.c')
-rw-r--r--libgo/runtime/go-libmain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgo/runtime/go-libmain.c b/libgo/runtime/go-libmain.c
index 06f6bd3..5e3b8d9 100644
--- a/libgo/runtime/go-libmain.c
+++ b/libgo/runtime/go-libmain.c
@@ -105,7 +105,8 @@ gostart (void *arg)
runtime_check ();
runtime_args (a->argc, (byte **) a->argv);
- runtime_osinit ();
+ setncpu (getproccount ());
+ setpagesize (getpagesize ());
runtime_sched = runtime_getsched();
runtime_schedinit ();
__go_go (runtime_main, NULL);