Skip to content

Commit

Permalink
Add go1.23 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Jul 16, 2024
1 parent 8c0f67b commit 9b57d68
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
- '1.20'
- '1.21'
- '1.22'
- '1.23rc2'
exclude:
# Support for s390x was added in Go1.7. See https://go.dev/doc/go1.7#ports.
- arch: s390x
Expand Down
38 changes: 38 additions & 0 deletions runtime_go1.23.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//go:build gc && go1.23
// +build gc,go1.23

package goid

type stack struct {
lo uintptr
hi uintptr
}

type gobuf struct {
sp uintptr
pc uintptr
g uintptr
ctxt uintptr
ret uintptr
lr uintptr
bp uintptr
}

type g struct {
stack stack
stackguard0 uintptr
stackguard1 uintptr

_panic uintptr
_defer uintptr
m uintptr
sched gobuf
syscallsp uintptr
syscallpc uintptr
syscallbp uintptr
stktopsp uintptr
param uintptr
atomicstatus uint32
stackLock uint32
goid int64 // Here it is!
}
4 changes: 2 additions & 2 deletions runtime_go1.9.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build gc && go1.9
// +build gc,go1.9
//go:build gc && go1.9 && !go1.23
// +build gc,go1.9,!go1.23

package goid

Expand Down

0 comments on commit 9b57d68

Please sign in to comment.