Letter “m” – is generally often used as a shorthand to a phrase (current) OS thread
– see: (link).
Strictly related:
M
(struct M
) – is an internal C struct containing some data related to an OS thread – see: pkg/runtime/runtime.hM m
) – is a thread-local variable of type struct M
containing data related to the current OS thread – see also: (link), Thread-local storageextern 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 #include “runtime.h”
.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.