builtin: sigjmpbuf/sigsetjmp/siglongjmp

This commit is contained in:
xushiwei
2024-06-08 14:49:48 +08:00
parent a1978f661b
commit 93be634673
7 changed files with 189 additions and 4 deletions

17
c/c.go
View File

@@ -57,9 +57,6 @@ func Alloca(size uintptr) Pointer
//go:linkname AllocaCStr llgo.allocaCStr
func AllocaCStr(s string) *Char
//go:linkname Unreachable llgo.unreachable
func Unreachable()
//go:linkname Malloc C.malloc
func Malloc(size uintptr) Pointer
@@ -84,6 +81,20 @@ func Remove(path *Char) Int
// -----------------------------------------------------------------------------
//go:linkname AllocaSigjmpBuf llgo.sigjmpbuf
func AllocaSigjmpBuf() Pointer
//go:linkname Sigsetjmp llgo.sigsetjmp
func Sigsetjmp(jb Pointer, savemask Int) Int
//go:linkname Siglongjmp llgo.siglongjmp
func Siglongjmp(jb Pointer, retval Int)
//go:linkname Unreachable llgo.unreachable
func Unreachable()
// -----------------------------------------------------------------------------
//go:linkname Exit C.exit
func Exit(Int)