Skip to content

Commit 148cfbc

Browse files
committed
align GOOS=tamago support go go1.23.0
1 parent 30ba71e commit 148cfbc

9 files changed

+12
-52
lines changed

src/internal/filepathlite/path_unix.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build unix || (js && wasm) || wasip1
5+
//go:build unix || (js && wasm) || wasip1 || tamago
66

77
package filepathlite
88

src/os/pidfd_other.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Use of this source code is governed by a BSD-style
33
// license that can be found in the LICENSE file.
44

5-
//go:build (unix && !linux) || (js && wasm) || wasip1 || windows
5+
//go:build (unix && !linux) || (js && wasm) || wasip1 || windows || tamago
66

77
package os
88

src/os/stat_tamago.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@
77
package os
88

99
import (
10+
"internal/filepathlite"
1011
"syscall"
1112
"time"
1213
)
1314

1415
func fillFileStatFromSys(fs *fileStat, name string) {
15-
fs.name = basename(name)
16+
fs.name = filepathlite.Base(name)
1617
fs.size = fs.sys.Size
1718
fs.modTime = time.Unix(fs.sys.Mtime, fs.sys.MtimeNsec)
1819
fs.mode = FileMode(fs.sys.Mode & 0777)

src/runtime/os_tamago_arm.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
package runtime
88

99
import (
10-
"runtime/internal/atomic"
10+
"internal/runtime/atomic"
1111
"unsafe"
1212
)
1313

src/runtime/os_tamago_riscv64.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
package runtime
88

99
import (
10-
"runtime/internal/atomic"
10+
"internal/runtime/atomic"
1111
"unsafe"
1212
)
1313

src/runtime/proc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6027,7 +6027,7 @@ var needSysmonWorkaround bool = false
60276027
// haveSysmon indicates whether there is sysmon thread support.
60286028
//
60296029
// No threads on wasm yet, so no sysmon.
6030-
const haveSysmon = GOARCH != "wasm"
6030+
const haveSysmon = (GOARCH != "wasm" && GOOS != "tamago")
60316031

60326032
// Always runs without a P, so write barriers are not allowed.
60336033
//

src/syscall/net_tamago.go

+5-24
Original file line numberDiff line numberDiff line change
@@ -30,45 +30,26 @@ type runtimeTimer struct {
3030
seq uintptr
3131
}
3232

33-
func startTimer(*runtimeTimer)
34-
func stopTimer(*runtimeTimer) bool
35-
3633
type timer struct {
3734
expired bool
3835
q *queue
3936
r runtimeTimer
4037
}
4138

4239
func (t *timer) start(q *queue, deadline int64) {
43-
if deadline == 0 {
44-
return
40+
if deadline != 0 {
41+
panic("unsupported deadline")
4542
}
46-
t.q = q
47-
t.r.when = deadline
48-
t.r.f = timerExpired
49-
t.r.arg = t
50-
startTimer(&t.r)
5143
}
5244

5345
func (t *timer) stop() {
54-
if t.r.f == nil {
55-
return
56-
}
57-
stopTimer(&t.r)
46+
return
5847
}
5948

6049
func (t *timer) reset(q *queue, deadline int64) {
61-
t.stop()
62-
if deadline == 0 {
63-
return
64-
}
65-
if t.r.f == nil {
66-
t.q = q
67-
t.r.f = timerExpired
68-
t.r.arg = t
50+
if deadline != 0 {
51+
panic("unsupported deadline")
6952
}
70-
t.r.when = deadline
71-
startTimer(&t.r)
7253
}
7354

7455
func timerExpired(i interface{}, seq uintptr) {

src/syscall/time_tamago_arm.s

-11
This file was deleted.

src/syscall/time_tamago_riscv64.s

-11
This file was deleted.

0 commit comments

Comments
 (0)