Letter “m” – is generally often used as a shorthand to a phrase
(current) OS thread – see: (link).
struct M) – is an internal C struct containing some data related to an OS thread – see: pkg/runtime/runtime.h
- 'm' (
M m) – is a thread-local variable of type
struct Mcontaining data related to the current OS thread – see also: (link), Thread-local storage
- NOTE: This variable is of special kind
extern register, and thus it must be declared in the same way in every C unit of compilation "in all modules and libraries". This is guaranteed if you
You can think of it as a “machine”. There are one or more machines, and the scheduler is putting one or more goroutines onto them.
go/internals/m.txt · Last modified: 2020/11/23 17:23 by 127.0.0.1