Patch procf (#90)

* 1234

* 123

* 合并master

* procfs

* 1

* procfs展示进程基本信息

* modified code

* 恢复权限

* 恢复权限

 #恢复权限

* modify permission

* 删除run.sh

* 解决第一次编译时磁盘镜像权限错误的问题

* 恢复.vscode/c_cpp_properties.json

* 删除process.c中错误的do_fork

* remake procfs

* 修改一些变量名

* 修改类型

* modified

* data_puts缓冲区溢出后return

Co-authored-by: longjin <longjin@RinGoTek.cn>
This commit is contained in:
DaJiYuQia
2022-11-26 17:34:00 +08:00
committed by GitHub
parent ad23fcddf8
commit 27a97abd24
19 changed files with 664 additions and 45 deletions

View File

@ -2,6 +2,7 @@
#include <common/err.h>
#include <common/kthread.h>
#include <common/spinlock.h>
#include <filesystem/procfs/procfs.h>
extern spinlock_t process_global_pid_write_lock;
extern long process_global_pid;
@ -135,6 +136,9 @@ unsigned long do_fork(struct pt_regs *regs, unsigned long clone_flags, unsigned
// 唤醒进程
process_wakeup(tsk);
//创建对应procfs文件
procfs_register_pid(tsk->pid);
return retval;
copy_thread_failed:;

View File

@ -22,6 +22,7 @@
#include <filesystem/devfs/devfs.h>
#include <filesystem/fat32/fat32.h>
#include <filesystem/rootfs/rootfs.h>
#include <filesystem/procfs/procfs.h>
#include <ktest/ktest.h>
#include <mm/slab.h>
#include <sched/sched.h>