| Crates.io | tg-syscall |
| lib.rs | tg-syscall |
| version | 0.1.0-preview.1 |
| created_at | 2026-01-22 13:12:28.694709+00 |
| updated_at | 2026-01-22 13:12:28.694709+00 |
| description | System call definitions and interfaces for rCore tutorial OS. |
| homepage | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| repository | https://github.com/rcore-os/rCore-Tutorial-in-single-workspace |
| max_upload_size | |
| id | 2061512 |
| size | 40,680 |
System call definitions and interfaces for the rCore tutorial operating system.
This crate provides system call number definitions and a framework for implementing system calls in the rCore tutorial kernel. System call numbers are generated from Musl Libc for RISC-V source code.
kernel feature)use tg_syscall::{Caller, SyscallId, SyscallResult};
// Initialize syscall handlers
tg_syscall::init_io(&my_io_impl);
tg_syscall::init_process(&my_process_impl);
tg_syscall::init_scheduling(&my_sched_impl);
// Handle syscalls
let result = tg_syscall::handle(caller, id, args);
user feature)use tg_syscall::{write, read, exit};
// Make system calls
write(STDOUT, buffer);
exit(0);
kernel - Enable kernel-side syscall handling interfacesuser - Enable user-space syscall wrappersStandard POSIX-compatible system calls including:
read, write, open, closefork, exec, exit, wait, getpidkill, sigaction, sigprocmask, sigreturnthread_create, gettid, waittidsched_yieldclock_gettimesemaphore_*, mutex_*, condvar_*Licensed under either of MIT license or Apache License, Version 2.0 at your option.