mirror of
https://github.com/BoredDevNL/BoredOS.git
synced 2026-05-15 10:48:38 +00:00
fix(net): guard network_cleanup() with TCP connection ownership token
This commit is contained in:
parent
987a96e2e8
commit
034aab48d3
2 changed files with 6 additions and 0 deletions
|
|
@ -475,6 +475,11 @@ process_t* process_get_current(void) {
|
||||||
return current_process[cpu];
|
return current_process[cpu];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint32_t process_get_current_pid(void) {
|
||||||
|
process_t *p = process_get_current();
|
||||||
|
return p ? p->pid : 0;
|
||||||
|
}
|
||||||
|
|
||||||
uint64_t process_schedule(uint64_t current_rsp) {
|
uint64_t process_schedule(uint64_t current_rsp) {
|
||||||
uint32_t my_cpu = smp_this_cpu_id();
|
uint32_t my_cpu = smp_this_cpu_id();
|
||||||
uint64_t rflags = spinlock_acquire_irqsave(&runqueue_lock);
|
uint64_t rflags = spinlock_acquire_irqsave(&runqueue_lock);
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,7 @@ process_t* process_create(void (*entry_point)(void), bool is_user);
|
||||||
process_t* process_create_elf(const char* filepath, const char* args_str, bool terminal_proc, int tty_id);
|
process_t* process_create_elf(const char* filepath, const char* args_str, bool terminal_proc, int tty_id);
|
||||||
int process_exec_replace_current(registers_t *regs, const char* filepath, const char* args_str);
|
int process_exec_replace_current(registers_t *regs, const char* filepath, const char* args_str);
|
||||||
process_t* process_get_current(void);
|
process_t* process_get_current(void);
|
||||||
|
uint32_t process_get_current_pid(void);
|
||||||
void process_set_current_for_cpu(uint32_t cpu_id, process_t* p);
|
void process_set_current_for_cpu(uint32_t cpu_id, process_t* p);
|
||||||
process_t* process_get_current_for_cpu(uint32_t cpu_id);
|
process_t* process_get_current_for_cpu(uint32_t cpu_id);
|
||||||
uint64_t process_schedule(uint64_t current_rsp);
|
uint64_t process_schedule(uint64_t current_rsp);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue