mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 14:16:33 +00:00
磁盘请求在处理时,切换进程
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
#include "../process/process.h"
|
||||
#include <exception/gate.h>
|
||||
#include <exception/irq.h>
|
||||
#include<driver/disk/ahci/ahci.h>
|
||||
|
||||
// 导出系统调用入口函数,定义在entry.S中
|
||||
extern void system_call(void);
|
||||
@ -85,6 +86,12 @@ ul sys_printf(struct pt_regs *regs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
ul sys_ahci_end_req(struct pt_regs *regs)
|
||||
{
|
||||
ahci_end_request();
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 系统调用的内核入口程序
|
||||
void do_syscall_int(struct pt_regs *regs, unsigned long error_code)
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "../process/ptrace.h"
|
||||
|
||||
// 定义最大系统调用数量
|
||||
#define MAX_SYSTEM_CALL_NUM 128
|
||||
#define MAX_SYSTEM_CALL_NUM 256
|
||||
|
||||
#define ESYSCALL_NOT_EXISTS 1
|
||||
|
||||
@ -53,6 +53,8 @@ ul system_call_not_exists(struct pt_regs *regs)
|
||||
*/
|
||||
ul sys_printf(struct pt_regs *regs);
|
||||
|
||||
ul sys_ahci_end_req(struct pt_regs *regs);
|
||||
|
||||
// 系统调用的内核入口程序
|
||||
void do_syscall_int(struct pt_regs *regs, unsigned long error_code);
|
||||
|
||||
@ -60,4 +62,5 @@ system_call_t system_call_table[MAX_SYSTEM_CALL_NUM] =
|
||||
{
|
||||
[0] = system_call_not_exists,
|
||||
[1] = sys_printf,
|
||||
[2 ... MAX_SYSTEM_CALL_NUM - 1] = system_call_not_exists};
|
||||
[2 ... 254] = system_call_not_exists,
|
||||
[255] = sys_ahci_end_req};
|
||||
|
@ -1,4 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* 系统调用说明
|
||||
* 1 printf
|
||||
*
|
||||
*
|
||||
* 255 AHCI end_request
|
||||
*
|
||||
*/
|
||||
|
||||
#define SYS_NOT_EXISTS 0
|
||||
#define SYS_PRINTF 1
|
||||
#define SYS_PRINTF 1
|
||||
|
||||
#define SYS_AHCI_END_REQ 255
|
Reference in New Issue
Block a user