git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: re-structure the kernel address space for a more integral layout.
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
process.h
diff --git
a/lunaix-os/includes/lunaix/process.h
b/lunaix-os/includes/lunaix/process.h
index 32b74dff5397e2fe29ce13eab3ef89ea3191f317..26f33bd84dd9fbb21f753b5735a45a84458c2c5c 100644
(file)
--- a/
lunaix-os/includes/lunaix/process.h
+++ b/
lunaix-os/includes/lunaix/process.h
@@
-4,6
+4,7
@@
#include <arch/x86/interrupts.h>
#include <lunaix/clock.h>
#include <lunaix/mm/mm.h>
#include <arch/x86/interrupts.h>
#include <lunaix/clock.h>
#include <lunaix/mm/mm.h>
+#include <lunaix/signal.h>
#include <lunaix/timer.h>
#include <lunaix/types.h>
#include <stdint.h>
#include <lunaix/timer.h>
#include <lunaix/types.h>
#include <stdint.h>
@@
-26,20
+27,44
@@
struct proc_mm
struct mm_region* regions;
};
struct mm_region* regions;
};
+struct proc_sig
+{
+ void* signal_handler;
+ int sig_num;
+ isr_param prev_context;
+};
+
+#define PROC_SIG_SIZE sizeof(struct proc_sig) // size=84
+
struct proc_info
{
struct proc_info
{
+ /*
+ Any change to *critical section*, including layout, size
+ must be reflected in kernel/asm/x86/interrupt.S to avoid
+ disaster!
+ */
+
+ /* ---- critical section start ---- */
+
pid_t pid;
struct proc_info* parent;
pid_t pid;
struct proc_info* parent;
- isr_param intr_ctx;
+ isr_param intr_ctx; // size=76
+ uintptr_t ustack_top;
+ void* page_table;
+
+ /* ---- critical section end ---- */
+
struct llist_header siblings;
struct llist_header children;
struct llist_header grp_member;
struct proc_mm mm;
struct llist_header siblings;
struct llist_header children;
struct llist_header grp_member;
struct proc_mm mm;
- void* page_table;
time_t created;
uint8_t state;
int32_t exit_code;
int32_t k_status;
time_t created;
uint8_t state;
int32_t exit_code;
int32_t k_status;
+ sigset_t sig_pending;
+ sigset_t sig_mask;
+ void* sig_handler[_SIG_NUM];
pid_t pgid;
struct lx_timer* timer;
};
pid_t pgid;
struct lx_timer* timer;
};