mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-18 12:16:31 +00:00
匿名管道重构&增加IrqArch trait以及IrqFlags及其守卫 (#253)
* 实现匿名管道 * 增加IrqArch trait以及IrqFlags及其守卫 --------- Co-authored-by: longjin <longjin@RinGoTek.cn>
This commit is contained in:
@ -16,8 +16,3 @@ int mstat(struct mstat_t *stat)
|
||||
{
|
||||
return syscall_invoke(SYS_MSTAT, (uint64_t)stat, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
int pipe(int *fd)
|
||||
{
|
||||
return syscall_invoke(SYS_PIPE, (uint64_t)fd, 0, 0,0,0,0,0,0);
|
||||
}
|
@ -65,7 +65,14 @@ pid_t fork(void)
|
||||
{
|
||||
return (pid_t)syscall_invoke(SYS_FORK, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 调用匿名管道
|
||||
*
|
||||
* @return int 如果失败返回负数
|
||||
*/
|
||||
int pipe(int fd[2]){
|
||||
return (int)syscall_invoke(SYS_PIPE, fd, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
/**
|
||||
* @brief fork当前进程,但是与父进程共享VM、flags、fd
|
||||
*
|
||||
|
Reference in New Issue
Block a user