Skip to content

Commit c8e7b67

Browse files
prattmicgvisor-bot
authored andcommitted
Adjust runtime schedt.nmspinning offset for go1.25
https://go.dev/cl/669235 changes the offset for schedt.nmspinning. PiperOrigin-RevId: 761043475
1 parent d19c3bc commit c8e7b67

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

pkg/sync/runtime_spinning_amd64.s

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
//go:build amd64
15+
// https://go.dev/cl/669235 (1.25) adds a new schedt field prior to nmspinning.
16+
//go:build amd64 && !go1.25
1617

1718
#include "textflag.h"
1819

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2018 The gVisor Authors.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// https://go.dev/cl/669235 (1.25) adds a new schedt field prior to nmspinning.
16+
//go:build amd64 && go1.25
17+
18+
#include "textflag.h"
19+
20+
#define NMSPINNING_OFFSET 100 // +checkoffset runtime schedt.nmspinning
21+
22+
TEXT ·addrOfSpinning(SB),NOSPLIT|NOFRAME,$0-8
23+
LEAQ runtime·sched(SB), AX
24+
ADDQ $NMSPINNING_OFFSET, AX
25+
MOVQ AX, ret+0(FP)
26+
RET

0 commit comments

Comments
 (0)