mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 18:26:48 +00:00
* 添加了GCC_cross_compile——tool_chain * - 解决环境变量路径拼接时,多了`/`的问题 - apt安装时增加-y,不需用户确认 * 解决添加环境变量的命令有误的问题 * 修正编译错误时,还会执行下一步的问题 * new: 编译完成后清理临时文件 * 更新makefile * 调整:把grub安装在 $HOME/opt/dragonos-grub下 * new: 新增dockerfile * 将镜像源换成中科大的(原因是清华的总是ban掉用于构建镜像的服务器的ip) * 修改为基于debian bullseye构建 * 取消指定版本 * 修复MBR磁盘镜像未设置启动标志的bug * 取消在docker中安装grub * 安装grub的过程改到客户机上进行 * bootstrap.sh 添加--no-docker * 使用新版的docker编译镜像 * 修补, 添加了一些关于gcc的check Co-authored-by: longjin <longjin@RinGoTek.cn>
51 lines
1.5 KiB
C
51 lines
1.5 KiB
C
#pragma once
|
||
|
||
#include <libc/src/include/stdint.h>
|
||
|
||
// 系统调用号
|
||
#define SYS_NOT_EXISTS 0
|
||
#define SYS_PUT_STRING 1
|
||
#define SYS_OPEN 2
|
||
#define SYS_CLOSE 3
|
||
#define SYS_READ 4
|
||
#define SYS_WRITE 5
|
||
#define SYS_LSEEK 6
|
||
#define SYS_FORK 7
|
||
#define SYS_VFORK 8
|
||
#define SYS_BRK 9
|
||
#define SYS_SBRK 10
|
||
|
||
#define SYS_REBOOT 11 // 重启
|
||
#define SYS_CHDIR 12 // 切换工作目录
|
||
#define SYS_GET_DENTS 13 // 获取目录中的数据
|
||
#define SYS_EXECVE 14 // 执行新的应用程序
|
||
#define SYS_WAIT4 15 // 等待进程退出
|
||
#define SYS_EXIT 16 // 进程退出
|
||
#define SYS_MKDIR 17 // 创建文件夹
|
||
#define SYS_NANOSLEEP 18 // 纳秒级休眠
|
||
#define SYS_CLOCK 19 // 获取当前cpu时间
|
||
#define SYS_PIPE 20
|
||
|
||
#define SYS_MSTAT 21 // 获取系统的内存状态信息
|
||
#define SYS_UNLINK_AT 22 // 删除文件夹/删除文件链接
|
||
#define SYS_KILL 23 // kill一个进程(向这个进程发出信号)
|
||
#define SYS_SIGACTION 24 // 设置进程的信号处理动作
|
||
#define SYS_RT_SIGRETURN 25 // 从信号处理函数返回
|
||
#define SYS_GETPID 26 // 获取当前进程的pid(进程标识符)
|
||
|
||
/**
|
||
* @brief 用户态系统调用函数
|
||
*
|
||
* @param syscall_id
|
||
* @param arg0
|
||
* @param arg1
|
||
* @param arg2
|
||
* @param arg3
|
||
* @param arg4
|
||
* @param arg5
|
||
* @param arg6
|
||
* @param arg7
|
||
* @return long
|
||
*/
|
||
long syscall_invoke(uint64_t syscall_id, uint64_t arg0, uint64_t arg1, uint64_t arg2, uint64_t arg3, uint64_t arg4,
|
||
uint64_t arg5, uint64_t arg6, uint64_t arg7); |