@@ -38,7 +38,7 @@ pub extern "C" fn creat(path: *const c_char, mode: mode_t) -> c_int {
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn fcntl(fildes: c_int, cmd: c_int, arg: c_int) -> c_int {
|
||||
unimplemented!();
|
||||
platform::fcntl(fildes, cmd, arg)
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
||||
@@ -62,6 +62,10 @@ pub fn fchdir(fildes: c_int) -> c_int {
|
||||
e(unsafe { syscall!(FCHDIR, fildes) }) as c_int
|
||||
}
|
||||
|
||||
pub fn fcntl(fildes: c_int, cmd: c_int, arg: c_int) -> c_int {
|
||||
e(unsafe { syscall!(FCNTL, fildes, cmd, arg) }) as c_int
|
||||
}
|
||||
|
||||
pub fn fork() -> pid_t {
|
||||
e(unsafe { syscall!(FORK) }) as pid_t
|
||||
}
|
||||
|
||||
@@ -63,6 +63,10 @@ pub fn fchdir(fd: c_int) -> c_int {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn fcntl(fd: c_int, cmd: c_int, args: c_int) -> c_int {
|
||||
e(syscall::fcntl(fd as usize, cmd as usize, args as usize)) as c_int
|
||||
}
|
||||
|
||||
pub fn fork() -> pid_t {
|
||||
e(unsafe { syscall::clone(0) }) as pid_t
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user