cl: compileFuncDecl/funcName fix; patch library: sync

This commit is contained in:
xushiwei
2024-06-17 18:32:58 +08:00
parent bec29f99e6
commit 98f3e45c0a
6 changed files with 76 additions and 11 deletions

View File

@@ -30,12 +30,15 @@ const (
LLGoPackage = "link"
)
// -----------------------------------------------------------------------------
// Once is an object that will perform exactly one action.
type Once C.pthread_once_t
//go:linkname onceInitVal C.llgoSyncOnceInitVal
func onceInitVal() Once
var OnceInit = onceInitVal()
//go:linkname OnceInit llgoSyncOnceInitVal
var OnceInit Once
// llgo:link (*Once).Do C.pthread_once
func (o *Once) Do(f func()) c.Int { return 0 }
// -----------------------------------------------------------------------------