Hello, I'm reading golang source code, it's in version 1.8. some times, I 
got some functions like: (runtime/proc.go, function main):

   107 func main() {
   108     g := getg()
   109
   110     // Racectx of m0->g0 is used only as the parent of the main 
goroutine.
   111     // It must not be used for anything else.
   112     g.m.g0.racectx = 0

I got the function, getg, and located it in(runtime/stubs.go):

   18 // getg returns the pointer to the current g.
   19 // The compiler rewrites calls to this function into instructions
   20 // that fetch the g directly (from TLS or from the dedicated 
register).
   21 func getg() *g
   22

I've search the golang source code library for it, but results doesn't 
contain the definition. and the comment say, The compiler rewrites calls to 
this function into instructions, so where can I find the rewritten Assembly 
code?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to