mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 03:53:42 +00:00
Replace compiler hack for sync package with //go:linkname
This commit is contained in:
@@ -1325,11 +1325,6 @@ func (c *Compiler) parseBuiltin(frame *Frame, args []ssa.Value, callName string)
|
||||
}
|
||||
|
||||
func (c *Compiler) parseFunctionCall(frame *Frame, args []ssa.Value, llvmFn llvm.Value, blocking bool, parentHandle llvm.Value) (llvm.Value, error) {
|
||||
if llvmFn.Name() == "sync.runtime_registerPoolCleanup" || llvmFn.Name() == "sync.runtime_notifyListCheck" {
|
||||
// Ignore these functions calls for now, as a hack.
|
||||
// TODO: implement //go:linkname.
|
||||
return llvm.Value{}, nil
|
||||
}
|
||||
var params []llvm.Value
|
||||
if blocking {
|
||||
if parentHandle.IsNil() {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package runtime
|
||||
|
||||
// This file contains support code for the sync package.
|
||||
|
||||
//go:linkname registerPoolCleanup sync.runtime_registerPoolCleanup
|
||||
func registerPoolCleanup(cleanup func()) {
|
||||
// Ignore.
|
||||
}
|
||||
|
||||
//go:linkname notifyListCheck sync.runtime_notifyListCheck
|
||||
func notifyListCheck(size uintptr) {
|
||||
// Ignore.
|
||||
}
|
||||
Reference in New Issue
Block a user