File tree 9 files changed +12
-52
lines changed
9 files changed +12
-52
lines changed Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- //go:build unix || (js && wasm) || wasip1
5
+ //go:build unix || (js && wasm) || wasip1 || tamago
6
6
7
7
package filepathlite
8
8
Original file line number Diff line number Diff line change 2
2
// Use of this source code is governed by a BSD-style
3
3
// license that can be found in the LICENSE file.
4
4
5
- //go:build (unix && !linux) || (js && wasm) || wasip1 || windows
5
+ //go:build (unix && !linux) || (js && wasm) || wasip1 || windows || tamago
6
6
7
7
package os
8
8
Original file line number Diff line number Diff line change 7
7
package os
8
8
9
9
import (
10
+ "internal/filepathlite"
10
11
"syscall"
11
12
"time"
12
13
)
13
14
14
15
func fillFileStatFromSys (fs * fileStat , name string ) {
15
- fs .name = basename (name )
16
+ fs .name = filepathlite . Base (name )
16
17
fs .size = fs .sys .Size
17
18
fs .modTime = time .Unix (fs .sys .Mtime , fs .sys .MtimeNsec )
18
19
fs .mode = FileMode (fs .sys .Mode & 0777 )
Original file line number Diff line number Diff line change 7
7
package runtime
8
8
9
9
import (
10
- "runtime/ internal/atomic"
10
+ "internal/runtime /atomic"
11
11
"unsafe"
12
12
)
13
13
Original file line number Diff line number Diff line change 7
7
package runtime
8
8
9
9
import (
10
- "runtime/ internal/atomic"
10
+ "internal/runtime /atomic"
11
11
"unsafe"
12
12
)
13
13
Original file line number Diff line number Diff line change @@ -6027,7 +6027,7 @@ var needSysmonWorkaround bool = false
6027
6027
// haveSysmon indicates whether there is sysmon thread support.
6028
6028
//
6029
6029
// No threads on wasm yet, so no sysmon.
6030
- const haveSysmon = GOARCH != "wasm"
6030
+ const haveSysmon = ( GOARCH != "wasm" && GOOS != "tamago" )
6031
6031
6032
6032
// Always runs without a P, so write barriers are not allowed.
6033
6033
//
Original file line number Diff line number Diff line change @@ -30,45 +30,26 @@ type runtimeTimer struct {
30
30
seq uintptr
31
31
}
32
32
33
- func startTimer (* runtimeTimer )
34
- func stopTimer (* runtimeTimer ) bool
35
-
36
33
type timer struct {
37
34
expired bool
38
35
q * queue
39
36
r runtimeTimer
40
37
}
41
38
42
39
func (t * timer ) start (q * queue , deadline int64 ) {
43
- if deadline = = 0 {
44
- return
40
+ if deadline ! = 0 {
41
+ panic ( "unsupported deadline" )
45
42
}
46
- t .q = q
47
- t .r .when = deadline
48
- t .r .f = timerExpired
49
- t .r .arg = t
50
- startTimer (& t .r )
51
43
}
52
44
53
45
func (t * timer ) stop () {
54
- if t .r .f == nil {
55
- return
56
- }
57
- stopTimer (& t .r )
46
+ return
58
47
}
59
48
60
49
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" )
69
52
}
70
- t .r .when = deadline
71
- startTimer (& t .r )
72
53
}
73
54
74
55
func timerExpired (i interface {}, seq uintptr ) {
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments