refactor(userspace): 清理 t/c 依赖与过时注释
Terminal、SerialLogger 不再 import t, c;dynlib 删除已失效的指针级数说明。
This commit is contained in:
1 parent
3583f78efc
commit
1ccacf8204
3 files changed
+3
-6
No files matched your search
@@ -8,7 +8,7 @@ import vpsdk.stdio as stdio
|
||||
import string
|
||||
import viperlib
|
||||
from stdint import *
|
||||
import t, c
|
||||
|
||||
|
||||
@__attribute__(section(".text.startup"), aligned(16))
|
||||
export def _start() -> int:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import vpsdk.devfs as devfs
|
||||
import t, c
|
||||
|
||||
# S4:原先三次 SERIAL_PUTS 私有 syscall,现改为写 /dev/serial0 设备节点。
|
||||
|
||||
|
||||
export def log_info(msg: const str):
|
||||
devfs.serial_puts("[SerialLogger] ")
|
||||
devfs.serial_puts(msg)
|
||||
|
||||
@@ -5,7 +5,4 @@ def load_so(path: const str) -> uint64:
|
||||
return syscall._syscall1(uint64(syscall.Syscall.LOAD_SO), uint64(path))
|
||||
|
||||
def so_call1(sym_name: const str, arg1: rawptr) -> int:
|
||||
# arg1 只是原样交给系统调用的裸地址,故用 rawptr(未定/通配指针)而非 t.CPtr:
|
||||
# 后者是具体类型的一级指针,调用方传字符串字面量(二级指针)会被判成级数不符
|
||||
# (CastError: pointer level differs, source level 2 -> target level 1)。
|
||||
return int(syscall._syscall2(uint64(syscall.Syscall.SO_CALL1), uint64(sym_name), uint64(arg1)))
|
||||
Reference in new issue
Block a user