Skip to content

Commit

Permalink
syscall_task: add empty set/getpgid interface
Browse files Browse the repository at this point in the history
--------

Signed-off-by: guoweikang <[email protected]>
  • Loading branch information
guoweikang committed Feb 26, 2024
1 parent d617b85 commit ef998aa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ulib/axstarry/syscall_task/src/imp/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,16 @@ pub fn syscall_prlimit64(
Ok(0)
}

/// not support
pub fn syscall_getpgid() -> SyscallResult {
Ok(0)
}

pub fn syscall_setpgid(pgid: usize) -> SyscallResult {
info!("not support setpgid, try to set {}", pgid);
Ok(0)
}

/// 当前不涉及多核情况
pub fn syscall_getpid() -> SyscallResult {
Ok(current_process().pid() as isize)
Expand Down
2 changes: 2 additions & 0 deletions ulib/axstarry/syscall_task/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ pub fn task_syscall(syscall_id: task_syscall_id::TaskSyscallId, args: [usize; 6]
TIMES => syscall_time(args[0] as *mut TMS),
UNAME => syscall_uname(args[0] as *mut UtsName),
GETTIMEOFDAY => syscall_get_time_of_day(args[0] as *mut TimeVal),
SETPGID => syscall_setpgid(args[0]),
GETPGID => syscall_getpgid(),
GETPID => syscall_getpid(),
GETPPID => syscall_getppid(),
WAIT4 => syscall_wait4(
Expand Down
2 changes: 2 additions & 0 deletions ulib/axstarry/syscall_task/src/task_syscall_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ pub enum TaskSyscallId {
SCHED_GETSCHEDULER = 120,
SCHED_SETAFFINITY = 122,
SCHED_GETAFFINITY = 123,
SETPGID = 154,
GETPGID = 155,
SETSID = 157,
GETRUSAGE = 165,
UMASK = 166,
Expand Down

0 comments on commit ef998aa

Please sign in to comment.