mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 07:06:47 +00:00
30 lines
609 B
C
30 lines
609 B
C
#pragma once
|
|
|
|
#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
|
|
|
|
/**
|
|
* @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); |