Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 72cea16

Browse filesBrowse files
committed
remove old forklock stub and replace it with sync.RWMutex
Signed-off-by: leongross <leon.gross@9elements.com>
1 parent c3a2e91 commit 72cea16
Copy full SHA for 72cea16

File tree

Expand file treeCollapse file tree

1 file changed

+5
-26
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-26
lines changed

‎src/syscall/forklock.go

Copy file name to clipboard
+5-26Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,12 @@
1-
//go:build tinygo && linux && !wasip1 && !wasip2 && !darwin && !baremetal
1+
//go:build tinygo && linux && !wasip1 && !wasip2 && !darwin && !baremetal && !tinygo.wasm
22

33
package 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

3011
func CloseOnExec(fd int) {
3112
system.CloseOnExec(fd)
@@ -34,5 +15,3 @@ func CloseOnExec(fd int) {
3415
func SetNonblock(fd int, nonblocking bool) (err error) {
3516
return system.SetNonblock(fd, nonblocking)
3617
}
37-
38-
// type SysProcAttr struct{}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.