You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Internally, m->procid is set by the OS specific functions defined by the Go runtime such as runtime.clone on Linux. These functions are not called when using cgo, preferring instead the C version.
Would it make sense to set m->procid in the various runtime.minit functions that are OS specific? That would ensure m->procid is always set, as I assume runtime.minit will always be called for any new thread.
The text was updated successfully, but these errors were encountered:
For debuggers, mostly - the actual runtime never cares about procid as far as I know. An M still represents an OS thread and will exist whether or not cgo is enabled, so procid should contain the correct thread ID.
mikioh
changed the title
m->procid not set when using cgo
runtime: m->procid not set when using cgo
Feb 18, 2015
Internally,
m->procid
is set by the OS specific functions defined by the Go runtime such asruntime.clone
on Linux. These functions are not called when using cgo, preferring instead the C version.Would it make sense to set
m->procid
in the variousruntime.minit
functions that are OS specific? That would ensurem->procid
is always set, as I assumeruntime.minit
will always be called for any new thread.The text was updated successfully, but these errors were encountered: