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
feat: kill(2) implementation
[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 26f33bd84dd9fbb21f753b5735a45a84458c2c5c..589bfaa7348d529cae2a72972931ed86b4136563 100644
(file)
--- a/
lunaix-os/includes/lunaix/process.h
+++ b/
lunaix-os/includes/lunaix/process.h
@@
-21,10
+21,13
@@
#define PROC_TERMMASK 0x6
#define PROC_TERMMASK 0x6
+#define PROC_FINPAUSE 1
+#define PROC_FALRMSET (1 << 1)
+
struct proc_mm
{
heap_context_t u_heap;
struct proc_mm
{
heap_context_t u_heap;
- struct mm_region
*
regions;
+ struct mm_region regions;
};
struct proc_sig
};
struct proc_sig
@@
-64,6
+67,8
@@
struct proc_info
int32_t k_status;
sigset_t sig_pending;
sigset_t sig_mask;
int32_t k_status;
sigset_t sig_pending;
sigset_t sig_mask;
+ sigset_t sig_inprogress;
+ int flags;
void* sig_handler[_SIG_NUM];
pid_t pgid;
struct lx_timer* timer;
void* sig_handler[_SIG_NUM];
pid_t pgid;
struct lx_timer* timer;
@@
-71,11
+76,21
@@
struct proc_info
extern volatile struct proc_info* __current;
extern volatile struct proc_info* __current;
-pid_t
-alloc_pid();
+/**
+ * @brief 分配并初始化一个进程控制块
+ *
+ * @return struct proc_info*
+ */
+struct proc_info*
+alloc_process();
+/**
+ * @brief 初始化进程用户空间
+ *
+ * @param pcb
+ */
void
void
-init_proc(struct proc_info* pcb);
+init_proc
_user_space
(struct proc_info* pcb);
/**
* @brief 向系统发布一个进程,使其可以被调度。
/**
* @brief 向系统发布一个进程,使其可以被调度。
@@
-83,7
+98,7
@@
init_proc(struct proc_info* pcb);
* @param process
*/
void
* @param process
*/
void
-
push
_process(struct proc_info* process);
+
commit
_process(struct proc_info* process);
pid_t
destroy_process(pid_t pid);
pid_t
destroy_process(pid_t pid);