File tree Expand file tree Collapse file tree 1 file changed +5
-26
lines changed Expand file tree Collapse file tree 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
22
33package syscall
44
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+ )
228
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
2910
3011func CloseOnExec (fd int ) {
3112 system .CloseOnExec (fd )
@@ -34,5 +15,3 @@ func CloseOnExec(fd int) {
3415func SetNonblock (fd int , nonblocking bool ) (err error ) {
3516 return system .SetNonblock (fd , nonblocking )
3617}
37-
38- // type SysProcAttr struct{}
You can’t perform that action at this time.
0 commit comments