llgo/c/hyper-related c lib

This commit is contained in:
赵英杰
2024-07-16 11:49:38 +08:00
parent 1cf57508b0
commit 519c850f17
9 changed files with 255 additions and 0 deletions

22
c/select/select.go Normal file
View File

@@ -0,0 +1,22 @@
package _select
import (
"github.com/goplus/llgo/c/fddef"
_ "unsafe"
"github.com/goplus/llgo/c"
)
const (
LLGoPackage = "decl"
)
// (TODO) merge to timeval
//
type TimeVal struct {
TvSec c.Long
TvUSec c.Int
}
//go:linkname Select C.select
func Select(n c.Int, r *fddef.FdSet, w *fddef.FdSet, e *fddef.FdSet, timeout *TimeVal) c.Int