diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-28 05:45:49 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-28 05:45:49 +0000 |
commit | 6e7609c89e6a81303eaf119a7c3bfca6dd4098ac (patch) | |
tree | af256a0152425084325ad100d75615322c726b8a /libgo/go | |
parent | bda4944f9fd4e25eef1c093ff7ba7f7aaa709539 (diff) | |
download | gcc-6e7609c89e6a81303eaf119a7c3bfca6dd4098ac.tar.gz |
runtime: Multiplex goroutines onto OS threads.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/syscall/mksyscall.awk | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libgo/go/syscall/mksyscall.awk b/libgo/go/syscall/mksyscall.awk index 1b612f3fb99..49828d94ce3 100644 --- a/libgo/go/syscall/mksyscall.awk +++ b/libgo/go/syscall/mksyscall.awk @@ -102,10 +102,6 @@ BEGIN { gofnname, gofnparams, gofnresults == "" ? "" : "(", gofnresults, gofnresults == "" ? "" : ")", gofnresults == "" ? "" : " ") - if (blocking) { - print "\tentersyscall()" - } - loc = gofnname "/" cfnname ":" split(gofnparams, goargs, ", *") @@ -151,7 +147,8 @@ BEGIN { status = 1 next } - args = args "StringBytePtr(" goname ")" + printf("\t_p%d := StringBytePtr(%s)\n", goarg, goname) + args = sprintf("%s_p%d", args, goarg) } else if (gotype ~ /^\[\](.*)/) { if (ctype !~ /^\*/ || cargs[carg + 1] == "") { print loc, "bad C type for slice:", gotype, ctype | "cat 1>&2" @@ -192,6 +189,10 @@ BEGIN { next } + if (blocking) { + print "\tentersyscall()" + } + printf("\t") if (gofnresults != "") { printf("_r := ") |