runtime: testing runtime

This commit is contained in:
Li Jie
2025-02-14 17:18:13 +08:00
parent 66909b3000
commit 5329f28580
83 changed files with 3376 additions and 2061 deletions

View File

@@ -22,6 +22,8 @@ var (
type Errno uintptr
type Dirent = syscall.Dirent
func (e Errno) Error() string {
ret := c.Strerror(c.Int(e))
return unsafe.String((*byte)(unsafe.Pointer(ret)), c.Strlen(ret))
@@ -69,3 +71,11 @@ func (s Signal) String() string {
*/
panic("todo: syscall.Signal.String")
}
func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
panic("todo: syscall.Mmap")
}
func Munmap(b []byte) (err error) {
panic("todo: syscall.Munmap")
}