Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重构系统调用模块 #267

Merged
merged 7 commits into from
May 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
1
fslongjin committed May 23, 2023
commit 988e4f9aceeee8b1124e078217f69877a08cb05e
28 changes: 13 additions & 15 deletions kernel/src/syscall/syscall_num.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#pragma once

/**
* 系统调用说明
* 1 printf
*
* 请注意!!!由于系统调用模块已经使用Rust重构,当修改系统调用号时,需要同时修改syscall_num.h和syscall/mod.rs中的系统调用号
* 并且以syscall/mod.rs中的为准!!!
*
* 255 AHCI end_request
* TODO:在完成系统的重构后,删除syscall_num.h
*
*/

@@ -43,15 +41,15 @@
#define SYS_DUP2 29
#define SYS_SOCKET 30 // 创建一个socket

#define SYS_SETSOCKOPT 31 // 设置socket的选项
#define SYS_GETSOCKOPT 32 // 获取socket的选项
#define SYS_CONNECT 33 // 连接到一个socket
#define SYS_BIND 34 // 绑定一个socket
#define SYS_SENDTO 35 // 向一个socket发送数据
#define SYS_RECVFROM 36 // 从一个socket接收数据
#define SYS_RECVMSG 37 // 从一个socket接收消息
#define SYS_LISTEN 38 // 监听一个socket
#define SYS_SHUTDOWN 39 // 关闭socket
#define SYS_ACCEPT 40 // 接受一个socket连接
#define SYS_SETSOCKOPT 31 // 设置socket的选项
#define SYS_GETSOCKOPT 32 // 获取socket的选项
#define SYS_CONNECT 33 // 连接到一个socket
#define SYS_BIND 34 // 绑定一个socket
#define SYS_SENDTO 35 // 向一个socket发送数据
#define SYS_RECVFROM 36 // 从一个socket接收数据
#define SYS_RECVMSG 37 // 从一个socket接收消息
#define SYS_LISTEN 38 // 监听一个socket
#define SYS_SHUTDOWN 39 // 关闭socket
#define SYS_ACCEPT 40 // 接受一个socket连接
#define SYS_GETSOCKNAME 41 // 获取socket的名字
#define SYS_GETPEERNAME 42 // 获取socket的对端名字