On Wed, Sep 9, 2020 at 7:39 PM Yonatan Gizachew <emeg...@gmail.com> wrote: > > This might be trivial, but could you explain me the relationship between the > following? > 1. value returned by __tls_get_addr
This is the address of the TLS control block. The exact definition depends on the architecture. All TLS variables are at some offset from this value. > 2. runtime.g A TLS variable that holds the current goroutine, a pointer to a g struct. > 3. runtime.g0 A global variable that holds the g struct used for the initial goroutine. > 4. runtime.m0 A global variable that holds the m struct used for the initial thread. > 5. runtime.m gccgo no longer uses this. In earlier releases it was a TLS variable that holds the current thread, a pointer to an m struct. In current releases gccgo uses g->m for this. Ian -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXZPrfi1i1vR_bYCkrSOkUd9NWp2YoCQMrBF-0Zj%3DDazQ%40mail.gmail.com.