User Tools

Site Tools


go:internals:m

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
go:internals:m [2019/03/04 10:33] – created fgmgo:internals:m [2019/03/04 11:54] – [See also] fgm
Line 6: Line 6:
  
   - ''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'' (''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]]+  - '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"''.     * 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"''.
  
Line 14: Line 14:
  
   * [[G]]   * [[G]]
-  * [[Thread local storage]]+  * [[Thread-local storage]]
  
go/internals/m.txt · Last modified: 2020/11/23 17:23 by 127.0.0.1