1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-26 01:43:29 +04:00

Change user sub-project structure

This commit is contained in:
WangRunji 2018-07-13 22:17:24 +08:00
parent f819a702c7
commit 935bcb3e15
7 changed files with 11 additions and 14 deletions

View File

@ -1,6 +1,7 @@
[workspace] [package]
name = "ucore-user-programs"
version = "0.1.0"
authors = ["Runji Wang <wangrunji0408@163.com>"]
members = [ [dependencies]
"ucore-ulib", "ucore-ulib" = { path = "ucore-ulib" }
"hello",
]

View File

@ -1,2 +1,5 @@
# arch = {riscv32, x86_64}
arch := riscv32
all: all:
@RUST_TARGET_PATH=$(pwd) xargo build --target x86_64-blog_os @RUST_TARGET_PATH=$(shell pwd) xargo build --target $(arch)-ucore

View File

@ -1,7 +0,0 @@
[package]
name = "hello"
version = "0.1.0"
authors = ["WangRunji <wangrunji0408@163.com>"]
[dependencies]
ucore-ulib = { path = "../ucore-ulib" }

View File

@ -39,7 +39,7 @@ fn sys_call(id: usize, arg0: usize, arg1: usize, arg2: usize, arg3: usize, arg4:
: "memory" : "memory"
: "volatile"); : "volatile");
#[cfg(target_arch = "x86_64")] #[cfg(target_arch = "x86_64")]
asm!("int 0x80" asm!("int 0x40"
: "={rax}" (ret) : "={rax}" (ret)
: "{rax}" (id), "{rdi}" (arg0), "{rsi}" (arg1), "{rdx}" (arg2), "{rcx}" (arg3), "{r8}" (arg4), "{r9}" (arg5) : "{rax}" (id), "{rdi}" (arg0), "{rsi}" (arg1), "{rdx}" (arg2), "{rcx}" (arg3), "{r8}" (arg4), "{r9}" (arg5)
: "memory" : "memory"