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: restructure the user space stuff.
[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 0b8d302e6e093e7122d7afcc93222f64b3e1ef43..974907d0d56ebfc1bbbd8f550cd8c500a0ff8e48 100644
(file)
--- a/
lunaix-os/includes/lunaix/process.h
+++ b/
lunaix-os/includes/lunaix/process.h
@@
-6,6
+6,7
@@
#include <lunaix/ds/waitq.h>
#include <lunaix/fs.h>
#include <lunaix/mm/mm.h>
#include <lunaix/ds/waitq.h>
#include <lunaix/fs.h>
#include <lunaix/mm/mm.h>
+#include <lunaix/mm/region.h>
#include <lunaix/signal.h>
#include <lunaix/timer.h>
#include <lunaix/types.h>
#include <lunaix/signal.h>
#include <lunaix/timer.h>
#include <lunaix/types.h>
@@
-25,12
+26,6
@@
#define PROC_FINPAUSE 1
#define PROC_FINPAUSE 1
-struct proc_mm
-{
- heap_context_t u_heap;
- struct mm_region regions;
-};
-
struct proc_sigstate
{
isr_param proc_regs;
struct proc_sigstate
{
isr_param proc_regs;
@@
-57,8
+52,8
@@
struct proc_info
pid_t pid; // offset = 0
struct proc_info* parent; // offset = 4
isr_param intr_ctx; // offset = 8
pid_t pid; // offset = 0
struct proc_info* parent; // offset = 4
isr_param intr_ctx; // offset = 8
-
uintptr_t ustack_top;
// offset = 84 -> 56 -> 60
-
void*
page_table; // offset = 88 -> 60 -> 64
+
ptr_t ustack_top;
// offset = 84 -> 56 -> 60
+
ptr_t
page_table; // offset = 88 -> 60 -> 64
void* fxstate; // offset = 92 -> 64 -> 68
/* ---- critical section end ---- */
void* fxstate; // offset = 92 -> 64 -> 68
/* ---- critical section end ---- */
@@
-78,7
+73,7
@@
struct proc_info
struct proc_mm mm;
time_t created;
struct proc_mm mm;
time_t created;
- u
int
8_t state;
+ u8_t state;
int32_t exit_code;
int32_t k_status;
sigset_t sig_pending;
int32_t exit_code;
int32_t k_status;
sigset_t sig_pending;
@@
-127,7
+122,7
@@
pid_t
destroy_process(pid_t pid);
void
destroy_process(pid_t pid);
void
-setup_proc_mem(struct proc_info* proc,
uint
ptr_t kstack_from);
+setup_proc_mem(struct proc_info* proc, ptr_t kstack_from);
/**
* @brief 复制当前进程(LunaixOS的类 fork (unix) 实现)
/**
* @brief 复制当前进程(LunaixOS的类 fork (unix) 实现)