mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-09 07:06:47 +00:00
bugfix: 修复进程退出时未释放signal和sighand && 增加赞赏者名单:David Wen (#93)
* bugfix: 修复进程退出时未释放signal和sighand的bug * 增加赞赏者名单:David Wen
This commit is contained in:
parent
0274cd6eee
commit
ad23fcddf8
@ -90,6 +90,7 @@
|
|||||||
|
|
||||||
### 个人赞赏者列表
|
### 个人赞赏者列表
|
||||||
|
|
||||||
|
- David Wen
|
||||||
- 悟
|
- 悟
|
||||||
- [TerryLeeSCUT · GitHub](https://github.com/TerryLeeSCUT)
|
- [TerryLeeSCUT · GitHub](https://github.com/TerryLeeSCUT)
|
||||||
- slientbard
|
- slientbard
|
||||||
|
@ -80,6 +80,7 @@ We hope that in the future, some enterprises can sponsor DragonOS and inject fin
|
|||||||
|
|
||||||
### Individual Sponsor List
|
### Individual Sponsor List
|
||||||
|
|
||||||
|
- David Wen
|
||||||
- 悟
|
- 悟
|
||||||
- [TerryLeeSCUT · GitHub](https://github.com/TerryLeeSCUT)
|
- [TerryLeeSCUT · GitHub](https://github.com/TerryLeeSCUT)
|
||||||
- slientbard
|
- slientbard
|
||||||
|
@ -46,6 +46,9 @@ extern struct mm_struct initial_mm;
|
|||||||
extern struct signal_struct INITIAL_SIGNALS;
|
extern struct signal_struct INITIAL_SIGNALS;
|
||||||
extern struct sighand_struct INITIAL_SIGHAND;
|
extern struct sighand_struct INITIAL_SIGHAND;
|
||||||
|
|
||||||
|
extern void process_exit_sighand(struct process_control_block *pcb);
|
||||||
|
extern void process_exit_signal(struct process_control_block *pcb);
|
||||||
|
|
||||||
// 设置初始进程的PCB
|
// 设置初始进程的PCB
|
||||||
#define INITIAL_PROC(proc) \
|
#define INITIAL_PROC(proc) \
|
||||||
{ \
|
{ \
|
||||||
@ -91,8 +94,6 @@ uint64_t process_exit_files(struct process_control_block *pcb);
|
|||||||
*/
|
*/
|
||||||
uint64_t process_exit_mm(struct process_control_block *pcb);
|
uint64_t process_exit_mm(struct process_control_block *pcb);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 切换进程
|
* @brief 切换进程
|
||||||
*
|
*
|
||||||
@ -784,7 +785,6 @@ uint64_t process_exit_mm(struct process_control_block *pcb)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief todo: 回收线程结构体
|
* @brief todo: 回收线程结构体
|
||||||
*
|
*
|
||||||
@ -811,7 +811,8 @@ int process_release_pcb(struct process_control_block *pcb)
|
|||||||
// todo: 对相关的pcb加锁
|
// todo: 对相关的pcb加锁
|
||||||
pcb->prev_pcb->next_pcb = pcb->next_pcb;
|
pcb->prev_pcb->next_pcb = pcb->next_pcb;
|
||||||
pcb->next_pcb->prev_pcb = pcb->prev_pcb;
|
pcb->next_pcb->prev_pcb = pcb->prev_pcb;
|
||||||
|
process_exit_sighand(pcb);
|
||||||
|
process_exit_signal(pcb);
|
||||||
// 释放当前pcb
|
// 释放当前pcb
|
||||||
kfree(pcb);
|
kfree(pcb);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user