Skip to content

Commit

Permalink
runtime: move m.thread to mOS
Browse files Browse the repository at this point in the history
This field is only used on Windows.

Change-Id: I12d4df09261f8e7ad54c2abd7beda669af28c8e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/207778
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
  • Loading branch information
aclements committed Nov 20, 2019
1 parent 9c6f640 commit 91bb1d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/runtime/os_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ func tstart_stdcall(newm *m)
func ctrlhandler()

type mOS struct {
thread uintptr // thread handle; accessed atomically

waitsema uintptr // semaphore for parking on locks
resumesema uintptr // semaphore to indicate suspend/resume
}
Expand Down
3 changes: 1 addition & 2 deletions src/runtime/runtime2.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,7 @@ type m struct {
waittraceskip int
startingtrace bool
syscalltick uint32
thread uintptr // thread handle
freelink *m // on sched.freem
freelink *m // on sched.freem

// these are here because they are too large to be on the stack
// of low-level NOSPLIT functions.
Expand Down

0 comments on commit 91bb1d7

Please sign in to comment.