File tree 1 file changed +5
-26
lines changed
1 file changed +5
-26
lines changed Original file line number Diff line number Diff line change 1
- //go:build tinygo && linux && !wasip1 && !wasip2 && !darwin && !baremetal
1
+ //go:build tinygo && linux && !wasip1 && !wasip2 && !darwin && !baremetal && !tinygo.wasm
2
2
3
3
package syscall
4
4
5
- // This is the original ForkLock:
6
- //
7
- // var ForkLock sync.RWMutex
8
- //
9
- // This requires importing sync, but importing sync causes an import loop:
10
- //
11
- // package tinygo.org/x/drivers/examples/net/tcpclient
12
- // imports bytes
13
- // imports io
14
- // imports sync
15
- // imports internal/task
16
- // imports runtime/interrupt
17
- // imports device/arm
18
- // imports syscall
19
- // imports sync: import cycle not allowed
20
- //
21
- // So for now, make our own stubbed-out ForkLock that doesn't use sync..
5
+ import (
6
+ "sync"
7
+ )
22
8
23
- type forklock struct {}
24
-
25
- func (f forklock ) RLock () {}
26
- func (f forklock ) RUnlock () {}
27
-
28
- var ForkLock forklock
9
+ var ForkLock sync.RWMutex
29
10
30
11
func CloseOnExec (fd int ) {
31
12
system .CloseOnExec (fd )
@@ -34,5 +15,3 @@ func CloseOnExec(fd int) {
34
15
func SetNonblock (fd int , nonblocking bool ) (err error ) {
35
16
return system .SetNonblock (fd , nonblocking )
36
17
}
37
-
38
- // type SysProcAttr struct{}
You can’t perform that action at this time.
0 commit comments