-
Matthew Dempsky authored
darwin/386, freebsd/386, and linux/386 use a setldt system call to setup each M's thread-local storage area, and they need access to the M's id for this. The current code copies m.id into m.tls[0] (and this logic has been cargo culted to OSes like NetBSD and OpenBSD, which don't even need m.id to configure TLS), and then the 386 assembly loads m.tls[0]... but since the assembly code already has a pointer to the M, it might as well just load m.id directly. Change-Id: I1a7278f1ec8ebda8d1de3aa3a61993070e3a8cdf Reviewed-on: https://go-review.googlesource.com/16881 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
dbdd8c2c