code.hybscloud.com/zcall
Package zcall provides zero-overhead syscall primitives for Linux and Darwin. zcall bypasses Go's runtime syscall machinery (entersyscall/exitsyscall) by invoking the kernel directly via raw assembly. This eliminates the latency tax imposed by Go's scheduler hooks, making it suitable for low-latency I/O paths such as io_uring submission and completion. Zero Overhead: All syscalls are implemented in pure assembly without any Go runtime interaction. The caller is responsible for cooperative scheduling. Zero Dependencies: This package does not import "syscall" or "golang.org/x/sys/unix". All syscall numbers and constants are defined internally. Raw Semantics: Functions return (result, errno) directly from the kernel. errno == 0 indicates success; errno != 0 is the raw kernel error number. The caller must handle error translation using zcall.Errno(errno). zcall is designed as a building block for high-performance I/O libraries. Direct usage requires understanding of Linux syscall semantics and careful attention to memory safety. This package uses unsafe operations for pointer-to-uintptr conversion. Callers must ensure that: Since zcall bypasses the Go scheduler's syscall hooks, long-running syscalls may starve other goroutines. Callers should:
proxy.golang.org
v0.3.1
20 days ago
8
Links
| Registry | proxy.golang.org |
| Homepage | Homepage |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/code.hybscloud.com/zcall
spec |
| License | MIT |
| Namespace | code.hybscloud.com |
| First Release | 3 months ago |
| Last Synced | 6 days ago |
Repository
| Stars | 2 on GitHub |
| Forks | 0 on GitHub |