====== M ====== Letter "m" -- is generally often used as a shorthand to a phrase ''(current) OS thread'' -- see: [[http://groups.google.com/group/golang-nuts/browse_thread/thread/3bdf4b609417939e/8ddea965ec294ad6#8ddea965ec294ad6|(link)]]. Strictly related: - ''M'' (''struct M'') -- is an internal C struct containing some data related to an OS thread -- see: [[http://golang.org/src/pkg/runtime/runtime.h|pkg/runtime/runtime.h]] - 'm' (''M m'') -- is a thread-local variable of type ''struct M'' containing data related to the **current** OS thread -- see also: [[http://groups.google.com/group/golang-nuts/browse_thread/thread/3bdf4b609417939e/8ddea965ec294ad6#8ddea965ec294ad6|(link)]], [[Thread-local storage]] * NOTE: This variable [[https://code.google.com/p/go/source/diff?spec=svn9ef1fd2b7e476df9c04fec3c9833fe473cbacc42&name=9ef1fd2b7e47&r=9ef1fd2b7e476df9c04fec3c9833fe473cbacc42&format=side&path=/src/pkg/runtime/runtime.h#sc_svn9ef1fd2b7e476df9c04fec3c9833fe473cbacc42_94|is of special kind]] ''extern register'', and thus it [[http://doc.cat-v.org/plan_9/4th_edition/papers/compiler|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. ==== See also ==== * [[G]] * [[Thread-local storage]]