mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-20 14:16:33 +00:00
build: Remove DragonOS_GCC And make CI use docker image (#954)
* build: 不再需要x86_64-elf-gcc的支持 * ci: 添加ci用的docker镜像 * 切换workflow到构建用的容器上 --------- Signed-off-by: longjin <longjin@DragonOS.org>
This commit is contained in:
@ -2,30 +2,17 @@ include ../env.mk
|
||||
|
||||
# 设置编译器
|
||||
ifeq ($(ARCH), x86_64)
|
||||
|
||||
# 如果 x86_64时,DragonOS_GCC 为空,那么设置为默认值
|
||||
export DragonOS_GCC?=$(HOME)/opt/dragonos-gcc/gcc-x86_64-unknown-none/bin
|
||||
|
||||
export CC=$(DragonOS_GCC)/x86_64-elf-gcc
|
||||
export LD=ld
|
||||
export AS=$(DragonOS_GCC)/x86_64-elf-as
|
||||
export NM=$(DragonOS_GCC)/x86_64-elf-nm
|
||||
export AR=$(DragonOS_GCC)/x86_64-elf-ar
|
||||
export OBJCOPY=$(DragonOS_GCC)/x86_64-elf-objcopy
|
||||
|
||||
CCPREFIX=x86_64-linux-gnu-
|
||||
else ifeq ($(ARCH), riscv64)
|
||||
|
||||
export CC=riscv64-unknown-elf-gcc
|
||||
# binutils版本需要>=2.38
|
||||
# 而ubuntu的unknown-elf的版本比较旧,所以使用了riscv64-linux-gnu-ld
|
||||
export LD=riscv64-linux-gnu-ld
|
||||
export AS=riscv64-unknown-elf-as
|
||||
export NM=riscv64-unknown-elf-nm
|
||||
export AR=riscv64-unknown-elf-ar
|
||||
export OBJCOPY=riscv64-unknown-elf-objcopy
|
||||
|
||||
CCPREFIX=riscv64-linux-gnu-
|
||||
endif
|
||||
|
||||
export CC=$(CCPREFIX)gcc
|
||||
export LD=$(CCPREFIX)ld
|
||||
export AS=$(CCPREFIX)as
|
||||
export NM=$(CCPREFIX)nm
|
||||
export AR=$(CCPREFIX)ar
|
||||
export OBJCOPY=$(CCPREFIX)objcopy
|
||||
|
||||
export DEBUG=DEBUG
|
||||
|
||||
|
@ -36,7 +36,7 @@ export ASFLAGS := --64
|
||||
LD_LIST := ""
|
||||
|
||||
|
||||
kernel_subdirs := common driver debug syscall libs
|
||||
kernel_subdirs := debug
|
||||
|
||||
|
||||
kernel_rust:
|
||||
|
@ -4,17 +4,6 @@ use crate::{exception::InterruptArch, sched::SchedArch, smp::core::smp_get_proce
|
||||
|
||||
use super::{driver::apic::apic_timer::apic_timer_init, CurrentIrqArch};
|
||||
|
||||
// /// @brief 若内核代码不处在中断上下文中,那么将可以使用本函数,发起一个sys_sched系统调用,然后运行调度器。
|
||||
// /// 由于只能在中断上下文中进行进程切换,因此需要发起一个系统调用SYS_SCHED。
|
||||
// #[no_mangle]
|
||||
// pub extern "C" fn sched() {
|
||||
// let _guard = unsafe { CurrentIrqArch::save_and_disable_irq() };
|
||||
// __schedule(SchedMode::SM_NONE);
|
||||
// // unsafe {
|
||||
// // enter_syscall_int(SYS_SCHED as u64, 0, 0, 0, 0, 0, 0);
|
||||
// // }
|
||||
// }
|
||||
|
||||
static mut BSP_INIT_OK: bool = false;
|
||||
|
||||
pub struct X86_64SchedArch;
|
||||
|
@ -1,14 +0,0 @@
|
||||
|
||||
CFLAGS += -I .
|
||||
|
||||
kernel_common_subdirs:= math
|
||||
|
||||
ECHO:
|
||||
@echo "$@"
|
||||
|
||||
$(kernel_common_subdirs): ECHO
|
||||
|
||||
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)"
|
||||
|
||||
all: $(kernel_common_subdirs)
|
||||
|
@ -1,23 +0,0 @@
|
||||
|
||||
/**
|
||||
* @file boot_info.h
|
||||
* @brief 启动信息接口
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "glib.h"
|
||||
|
||||
/**
|
||||
* @brief 启动信息接口
|
||||
* 由引导传递的机器信息处理
|
||||
* 如 grub2 传递的 multiboot2 结构
|
||||
* 注意这部分是通过内存传递的,在重新保存之前不能被覆盖
|
||||
* 架构专有的数据在 dtb.h 或 multiboot2.h
|
||||
* 实现在 dtb.cpp 或 multiboot2.cpp
|
||||
*/
|
||||
/// 声明,定义在具体的实现中
|
||||
/// 地址
|
||||
extern uintptr_t boot_info_addr;
|
||||
/// 长度
|
||||
extern unsigned int boot_info_size;
|
||||
|
@ -6,11 +6,11 @@
|
||||
#pragma once
|
||||
|
||||
// 引入对bool类型的支持
|
||||
#include <stdbool.h>
|
||||
#include <DragonOS/stdint.h>
|
||||
#include <common/stddef.h>
|
||||
#include <arch/arch.h>
|
||||
#include <common/compiler.h>
|
||||
#include <common/stddef.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include <asm/asm.h>
|
||||
|
||||
@ -22,13 +22,11 @@
|
||||
*
|
||||
* 方法:使用ptr减去结构体内的偏移,得到结构体变量的基地址
|
||||
*/
|
||||
#define container_of(ptr, type, member) \
|
||||
({ \
|
||||
typeof(((type *)0)->member) *p = (ptr); \
|
||||
(type *)((unsigned long)p - (unsigned long)&(((type *)0)->member)); \
|
||||
})
|
||||
|
||||
|
||||
#define container_of(ptr, type, member) \
|
||||
({ \
|
||||
typeof(((type *)0)->member) *p = (ptr); \
|
||||
(type *)((unsigned long)p - (unsigned long)&(((type *)0)->member)); \
|
||||
})
|
||||
|
||||
#define ABS(x) ((x) > 0 ? (x) : -(x)) // 绝对值
|
||||
// 最大最小值
|
||||
@ -39,10 +37,7 @@
|
||||
#define MASK_HIGH_32bit(x) (x & (0x00000000ffffffffUL))
|
||||
|
||||
// 四舍五入成整数
|
||||
ul round(double x)
|
||||
{
|
||||
return (ul)(x + 0.5);
|
||||
}
|
||||
ul round(double x) { return (ul)(x + 0.5); }
|
||||
|
||||
/**
|
||||
* @brief 地址按照align进行对齐
|
||||
@ -51,18 +46,6 @@ ul round(double x)
|
||||
* @param _align
|
||||
* @return ul 对齐后的地址
|
||||
*/
|
||||
static __always_inline ul ALIGN(const ul addr, const ul _align)
|
||||
{
|
||||
return (ul)((addr + _align - 1) & (~(_align - 1)));
|
||||
static __always_inline ul ALIGN(const ul addr, const ul _align) {
|
||||
return (ul)((addr + _align - 1) & (~(_align - 1)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief 将数据从src搬运到dst,并能正确处理地址重叠的问题
|
||||
*
|
||||
* @param dst 目标地址指针
|
||||
* @param src 源地址指针
|
||||
* @param size 大小
|
||||
* @return void* 指向目标地址的指针
|
||||
*/
|
||||
void *c_memmove(void *dst, const void *src, uint64_t size);
|
@ -1,10 +0,0 @@
|
||||
SRC = $(wildcard *.c)
|
||||
OBJ = $(SRC:.c=.o)
|
||||
CFLAGS += -I .
|
||||
|
||||
.PHONY: all
|
||||
|
||||
all: $(OBJ)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
@ -1,62 +1,13 @@
|
||||
#pragma once
|
||||
#include "glib.h"
|
||||
/**
|
||||
* @brief 拷贝整个字符串
|
||||
*
|
||||
* @param dst 目标地址
|
||||
* @param src 源地址
|
||||
* @return char* 目标字符串
|
||||
*/
|
||||
char *strcpy(char *dst, const char *src);
|
||||
|
||||
//计算字符串的长度(经过测试,该版本比采用repne/scasb汇编的运行速度快16.8%左右)
|
||||
static inline int strlen(const char *s)
|
||||
{
|
||||
if (s == NULL)
|
||||
return 0;
|
||||
register int __res = 0;
|
||||
while (s[__res] != '\0')
|
||||
{
|
||||
++__res;
|
||||
}
|
||||
return __res;
|
||||
// 计算字符串的长度(经过测试,该版本比采用repne/scasb汇编的运行速度快16.8%左右)
|
||||
static inline int strlen(const char *s) {
|
||||
if (s == NULL)
|
||||
return 0;
|
||||
register int __res = 0;
|
||||
while (s[__res] != '\0') {
|
||||
++__res;
|
||||
}
|
||||
return __res;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 测量字符串的长度
|
||||
*
|
||||
* @param src 字符串
|
||||
* @param maxlen 最大长度
|
||||
* @return long
|
||||
*/
|
||||
long strnlen(const char *src, unsigned long maxlen);
|
||||
|
||||
/*
|
||||
比较字符串 FirstPart and SecondPart
|
||||
FirstPart = SecondPart => 0
|
||||
FirstPart > SecondPart => 1
|
||||
FirstPart < SecondPart => -1
|
||||
*/
|
||||
|
||||
int strcmp(const char *FirstPart, const char *SecondPart);
|
||||
|
||||
char *strncpy(char *restrict d, const char *restrict s, size_t n);
|
||||
|
||||
long strncpy_from_user(char *dst, const char *src, unsigned long size);
|
||||
|
||||
/**
|
||||
* @brief 测量来自用户空间的字符串的长度,会检验地址空间是否属于用户空间
|
||||
* @param src
|
||||
* @param maxlen
|
||||
* @return long
|
||||
*/
|
||||
long strnlen_user(const char *src, unsigned long maxlen);
|
||||
|
||||
/**
|
||||
* @brief 拼接两个字符串(将src接到dest末尾)
|
||||
*
|
||||
* @param dest 目标串
|
||||
* @param src 源串
|
||||
* @return char*
|
||||
*/
|
||||
char *strcat(char *dest, const char *src);
|
@ -1,22 +0,0 @@
|
||||
/**
|
||||
* @file unistd.h
|
||||
* @author fslongjin (longjin@RinGoTek.cn)
|
||||
* @brief
|
||||
* @version 0.1
|
||||
* @date 2022-04-22
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <syscall/syscall.h>
|
||||
#include <syscall/syscall_num.h>
|
||||
|
||||
/**
|
||||
* @brief 交换n字节
|
||||
* @param src 源地址
|
||||
* @param dest 目的地址
|
||||
* @param nbytes 交换字节数
|
||||
*/
|
||||
void swab(void *restrict src, void *restrict dest, ssize_t nbytes);
|
@ -1,5 +1,6 @@
|
||||
|
||||
all: traceback.o
|
||||
all:
|
||||
@echo ""
|
||||
|
||||
CFLAGS += -I .
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
|
||||
CFLAGS += -I .
|
||||
|
||||
kernel_driver_subdirs:=
|
||||
|
||||
ECHO:
|
||||
@echo "$@"
|
||||
|
||||
$(kernel_driver_subdirs): ECHO
|
||||
|
||||
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)"
|
||||
|
||||
all: $(kernel_driver_subdirs)
|
||||
|
||||
|
||||
clean:
|
||||
echo "Done."
|
@ -1,19 +0,0 @@
|
||||
|
||||
CFLAGS += -I .
|
||||
|
||||
kernel_lib_subdirs:=
|
||||
|
||||
kernel_lib_objs:= $(shell find ./*.c)
|
||||
|
||||
ECHO:
|
||||
@echo "$@"
|
||||
|
||||
$(kernel_lib_subdirs): ECHO
|
||||
$(MAKE) -C $@ all CFLAGS="$(CFLAGS)" ASFLAGS="$(ASFLAGS)"
|
||||
|
||||
$(kernel_lib_objs): ECHO
|
||||
$(CC) $(CFLAGS) -c $@ -o $@.o
|
||||
|
||||
all: $(kernel_lib_objs) $(kernel_lib_subdirs)
|
||||
@echo $(kernel_lib_objs)
|
||||
|
@ -1,34 +0,0 @@
|
||||
#include <common/glib.h>
|
||||
#include <common/string.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief 将数据从src搬运到dst,并能正确处理地址重叠的问题
|
||||
*
|
||||
* @param dst 目标地址指针
|
||||
* @param src 源地址指针
|
||||
* @param size 大小
|
||||
* @return void* 指向目标地址的指针
|
||||
*/
|
||||
void *c_memmove(void *dst, const void *src, uint64_t size)
|
||||
{
|
||||
const char *_src = src;
|
||||
char *_dst = dst;
|
||||
|
||||
if (!size)
|
||||
return dst;
|
||||
|
||||
// 当源地址大于目标地址时,使用memcpy来完成
|
||||
if (dst <= src)
|
||||
return memcpy(dst, src, size);
|
||||
|
||||
// 当源地址小于目标地址时,为防止重叠覆盖,因此从后往前拷贝
|
||||
_src += size;
|
||||
_dst += size;
|
||||
|
||||
// 逐字节拷贝
|
||||
while (size--)
|
||||
*--_dst = *--_src;
|
||||
|
||||
return dst;
|
||||
}
|
@ -1,101 +0,0 @@
|
||||
#include <common/string.h>
|
||||
#include <common/glib.h>
|
||||
|
||||
/**
|
||||
* @brief 拷贝整个字符串
|
||||
*
|
||||
* @param dst 目标地址
|
||||
* @param src 源地址
|
||||
* @return char* 目标字符串
|
||||
*/
|
||||
char *strcpy(char *dst, const char *src)
|
||||
{
|
||||
while (*src)
|
||||
{
|
||||
*(dst++) = *(src++);
|
||||
}
|
||||
*dst = 0;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
long strnlen(const char *src, unsigned long maxlen)
|
||||
{
|
||||
|
||||
if (src == NULL)
|
||||
return 0;
|
||||
register int __res = 0;
|
||||
while (src[__res] != '\0' && __res < maxlen)
|
||||
{
|
||||
++__res;
|
||||
}
|
||||
return __res;
|
||||
}
|
||||
|
||||
/*
|
||||
比较字符串 FirstPart and SecondPart
|
||||
FirstPart = SecondPart => 0
|
||||
FirstPart > SecondPart => 1
|
||||
FirstPart < SecondPart => -1
|
||||
*/
|
||||
int strcmp(const char *l, const char *r)
|
||||
{
|
||||
for (; *l == *r && *l; l++, r++)
|
||||
;
|
||||
return *(unsigned char *)l - *(unsigned char *)r;
|
||||
}
|
||||
|
||||
char *__stpncpy(char *restrict d, const char *restrict s, size_t n)
|
||||
{
|
||||
|
||||
for (; n && (*d = *s); n--, s++, d++)
|
||||
;
|
||||
tail:
|
||||
memset(d, 0, n);
|
||||
return d;
|
||||
}
|
||||
|
||||
char *strncpy(char *restrict d, const char *restrict s, size_t n)
|
||||
{
|
||||
__stpncpy(d, s, n);
|
||||
return d;
|
||||
}
|
||||
|
||||
long strncpy_from_user(char *dst, const char *src, unsigned long size)
|
||||
{
|
||||
if (!verify_area((uint64_t)src, size))
|
||||
return 0;
|
||||
|
||||
strncpy(dst, src, size);
|
||||
return size;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 测量来自用户空间的字符串的长度,会检验地址空间是否属于用户空间
|
||||
* @param src
|
||||
* @param maxlen
|
||||
* @return long
|
||||
*/
|
||||
long strnlen_user(const char *src, unsigned long maxlen)
|
||||
{
|
||||
|
||||
unsigned long size = strlen(src);
|
||||
// 地址不合法
|
||||
if (!verify_area((uint64_t)src, size))
|
||||
return 0;
|
||||
|
||||
return size <= maxlen ? size : maxlen;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 拼接两个字符串(将src接到dest末尾)
|
||||
*
|
||||
* @param dest 目标串
|
||||
* @param src 源串
|
||||
* @return char*
|
||||
*/
|
||||
char *strcat(char *dest, const char *src)
|
||||
{
|
||||
strcpy(dest + strlen(dest), src);
|
||||
return dest;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#include <common/unistd.h>
|
||||
#include <common/glib.h>
|
||||
|
||||
|
||||
void swab(void *restrict src, void *restrict dest, ssize_t nbytes)
|
||||
{
|
||||
unsigned char buf[32];
|
||||
char *_src = src;
|
||||
char *_dest = dest;
|
||||
uint32_t transfer;
|
||||
for (; nbytes > 0; nbytes -= transfer)
|
||||
{
|
||||
transfer = (nbytes > 32) ? 32 : nbytes;
|
||||
memcpy(buf, _src, transfer);
|
||||
memcpy(_src, _dest, transfer);
|
||||
memcpy(_dest, buf, transfer);
|
||||
_src += transfer;
|
||||
_dest += transfer;
|
||||
}
|
||||
}
|
@ -12,7 +12,6 @@
|
||||
#include "ptrace.h"
|
||||
#include <common/errno.h>
|
||||
#include <common/glib.h>
|
||||
#include <syscall/syscall.h>
|
||||
|
||||
/**
|
||||
* @brief 进程退出时执行的函数
|
||||
@ -32,6 +31,6 @@ extern uint32_t rs_current_pcb_cpuid();
|
||||
extern uint32_t rs_current_pcb_pid();
|
||||
extern uint32_t rs_current_pcb_preempt_count();
|
||||
extern uint32_t rs_current_pcb_flags();
|
||||
extern int64_t rs_current_pcb_thread_rbp();
|
||||
extern uint64_t rs_current_pcb_thread_rbp();
|
||||
|
||||
#define PF_NEED_SCHED (1UL << 1)
|
||||
|
@ -1,10 +0,0 @@
|
||||
SRC = $(wildcard *.c)
|
||||
OBJ = $(SRC:.c=.o)
|
||||
CFLAGS += -I .
|
||||
|
||||
.PHONY: all
|
||||
|
||||
all: $(OBJ)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $< -o $@
|
@ -1,54 +0,0 @@
|
||||
#include "syscall.h"
|
||||
#include <arch/arch.h>
|
||||
#include <common/errno.h>
|
||||
#include <common/fcntl.h>
|
||||
#include <common/string.h>
|
||||
#include <mm/slab.h>
|
||||
#include <process/process.h>
|
||||
|
||||
#if ARCH(I386) || ARCH(X86_64)
|
||||
// 导出系统调用入口函数,定义在entry.S中
|
||||
extern void syscall_int(void);
|
||||
|
||||
/**
|
||||
* @brief 通过中断进入系统调用
|
||||
*
|
||||
* @param syscall_id
|
||||
* @param arg0
|
||||
* @param arg1
|
||||
* @param arg2
|
||||
* @param arg3
|
||||
* @param arg4
|
||||
* @param arg5
|
||||
* @param arg6
|
||||
* @param arg7
|
||||
* @return long
|
||||
*/
|
||||
|
||||
long enter_syscall_int(ul syscall_id, ul arg0, ul arg1, ul arg2, ul arg3,
|
||||
ul arg4, ul arg5) {
|
||||
long err_code;
|
||||
__asm__ __volatile__("movq %2, %%rdi \n\t"
|
||||
"movq %3, %%rsi \n\t"
|
||||
"movq %4, %%rdx \n\t"
|
||||
"movq %5, %%r10 \n\t"
|
||||
"movq %6, %%r8 \n\t"
|
||||
"movq %7, %%r9 \n\t"
|
||||
"int $0x80 \n\t"
|
||||
: "=a"(err_code)
|
||||
: "a"(syscall_id), "m"(arg0), "m"(arg1), "m"(arg2),
|
||||
"m"(arg3), "m"(arg4), "m"(arg5)
|
||||
: "memory", "r8", "r9", "r10", "rdi", "rsi", "rdx");
|
||||
|
||||
return err_code;
|
||||
}
|
||||
|
||||
#else
|
||||
long enter_syscall_int(ul syscall_id, ul arg0, ul arg1, ul arg2, ul arg3,
|
||||
ul arg4, ul arg5) {
|
||||
while (1) {
|
||||
/* code */
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <common/glib.h>
|
||||
#include <common/kprint.h>
|
||||
#include <common/unistd.h>
|
||||
#include <process/ptrace.h>
|
||||
|
||||
/**
|
||||
* @brief 初始化系统调用模块
|
||||
*
|
||||
*/
|
||||
extern int syscall_init();
|
||||
|
||||
/**
|
||||
* @brief 用户态系统调用入口函数
|
||||
* 从用户态进入系统调用
|
||||
* @param syscall_id 系统调用id
|
||||
* @return long 错误码
|
||||
*/
|
||||
long enter_syscall_int(ul syscall_id, ul arg0, ul arg1, ul arg2, ul arg3, ul arg4, ul arg5);
|
||||
|
@ -1,102 +0,0 @@
|
||||
#pragma once
|
||||
/**
|
||||
* 请注意!!!由于系统调用模块已经使用Rust重构,当修改系统调用号时,需要同时修改syscall_num.h和syscall/mod.rs中的系统调用号
|
||||
* 并且以syscall/mod.rs中的为准!!!
|
||||
*
|
||||
* TODO:在完成系统的重构后,删除syscall_num.h
|
||||
*
|
||||
*/
|
||||
|
||||
// 定义系统调用号
|
||||
#define SYS_READ 0
|
||||
#define SYS_WRITE 1
|
||||
#define SYS_OPEN 2
|
||||
#define SYS_CLOSE 3
|
||||
|
||||
#define SYS_FSTAT 5
|
||||
#define SYS_LSEEK 8
|
||||
#define SYS_MMAP 9
|
||||
#define SYS_MPROTECT 10
|
||||
#define SYS_MUNMAP 11
|
||||
#define SYS_BRK 12
|
||||
#define SYS_SIGACTION 13
|
||||
|
||||
#define SYS_RT_SIGRETURN 15
|
||||
#define SYS_IOCTL 16
|
||||
|
||||
#define SYS_DUP 32
|
||||
#define SYS_DUP2 33
|
||||
|
||||
#define SYS_NANOSLEEP 35
|
||||
#define SYS_ALARM 37
|
||||
#define SYS_GETPID 39
|
||||
|
||||
#define SYS_SOCKET 41
|
||||
#define SYS_CONNECT 42
|
||||
#define SYS_ACCEPT 43
|
||||
#define SYS_SENDTO 44
|
||||
#define SYS_RECVFROM 45
|
||||
|
||||
#define SYS_RECVMSG 47
|
||||
#define SYS_SHUTDOWN 48
|
||||
#define SYS_BIND 49
|
||||
#define SYS_LISTEN 50
|
||||
#define SYS_GETSOCKNAME 51
|
||||
#define SYS_GETPEERNAME 52
|
||||
|
||||
#define SYS_SETSOCKOPT 54
|
||||
#define SYS_GETSOCKOPT 55
|
||||
#define SYS_CLONE 56
|
||||
#define SYS_FORK 57
|
||||
#define SYS_VFORK 58
|
||||
#define SYS_EXECVE 59
|
||||
#define SYS_EXIT 60
|
||||
#define SYS_WAIT4 61
|
||||
#define SYS_KILL 62
|
||||
#define SYS_UNAME 63
|
||||
|
||||
#define SYS_FCNTL 72
|
||||
|
||||
#define SYS_FTRUNCATE 77
|
||||
#define SYS_GET_DENTS 78
|
||||
|
||||
#define SYS_GETCWD 79
|
||||
|
||||
#define SYS_CHDIR 80
|
||||
|
||||
#define SYS_MKDIR 83
|
||||
#define SYS_RMDIR 84
|
||||
|
||||
#define SYS_LINK 86
|
||||
|
||||
#define SYS_GETTIMEOFDAY 96
|
||||
|
||||
#define SYS_ARCH_PRCTL 158
|
||||
|
||||
#define SYS_MOUNT 165
|
||||
#define SYS_REBOOT 169
|
||||
|
||||
#define SYS_GETPPID 110
|
||||
#define SYS_GETPGID 121
|
||||
|
||||
#define SYS_MKNOD 133
|
||||
|
||||
#define SYS_FUTEX 202
|
||||
|
||||
#define SYS_SET_TID_ADDR 218
|
||||
|
||||
#define SYS_UNLINK_AT 263
|
||||
|
||||
#define SYS_LINKAT 265
|
||||
|
||||
#define SYS_PIPE 293
|
||||
|
||||
#define SYS_WRITEV 20
|
||||
|
||||
// 与linux不一致的调用,在linux基础上累加
|
||||
#define SYS_PUT_STRING 100000
|
||||
#define SYS_SBRK 100001
|
||||
/// todo: 该系统调用与Linux不一致,将来需要删除该系统调用!!!
|
||||
/// 删的时候记得改C版本的libc
|
||||
#define SYS_CLOCK 100002
|
||||
#define SYS_SCHED 100003
|
Reference in New Issue
Block a user