Feat: POSIX signal
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <vector.h>
|
||||
#include <signal.h>
|
||||
|
||||
typedef struct {
|
||||
uint64_t x0, x1;
|
||||
@@ -38,6 +40,13 @@ typedef struct process {
|
||||
void *mem;
|
||||
size_t mem_size;
|
||||
|
||||
void *sigstack;
|
||||
size_t sigstack_size;
|
||||
|
||||
bool sigstate[SIGNAL_NUM];
|
||||
int32_t current_signal;
|
||||
signal_handler_t sighandlers[SIGNAL_NUM];
|
||||
|
||||
trapframe_t *regs;
|
||||
} process_t;
|
||||
|
||||
@@ -51,3 +60,4 @@ int32_t run_process(uint64_t process);
|
||||
process_t *fork_process(const process_t *from);
|
||||
|
||||
extern int32_t global_pid_counter;
|
||||
extern vector_t *global_processes;
|
||||
|
||||
Reference in New Issue
Block a user