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: input device subsystem to resolve race condition on polling input
[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 2cd4330b041b8f711bafb6bbf13d489aabe9104f..9686ee074de99ec4fb88c1e4e42703d627d7c907 100644
(file)
--- a/
lunaix-os/includes/lunaix/process.h
+++ b/
lunaix-os/includes/lunaix/process.h
@@
-3,6
+3,8
@@
#include <arch/x86/interrupts.h>
#include <lunaix/clock.h>
#include <arch/x86/interrupts.h>
#include <lunaix/clock.h>
+#include <lunaix/ds/waitq.h>
+#include <lunaix/fs.h>
#include <lunaix/mm/mm.h>
#include <lunaix/signal.h>
#include <lunaix/timer.h>
#include <lunaix/mm/mm.h>
#include <lunaix/signal.h>
#include <lunaix/timer.h>
@@
-12,14
+14,14
@@
// 虽然内核不是进程,但为了区分,这里使用Pid=-1来指代内核。这主要是方便物理页所有权检查。
#define KERNEL_PID -1
// 虽然内核不是进程,但为了区分,这里使用Pid=-1来指代内核。这主要是方便物理页所有权检查。
#define KERNEL_PID -1
-#define P
ROC_STOPPED
0
-#define P
ROC
_RUNNING 1
-#define P
ROC
_TERMNAT 2
-#define P
ROC
_DESTROY 4
-#define P
ROC
_BLOCKED 8
-#define P
ROC
_CREATED 16
+#define P
S_READY
0
+#define P
S
_RUNNING 1
+#define P
S
_TERMNAT 2
+#define P
S
_DESTROY 4
+#define P
S
_BLOCKED 8
+#define P
S
_CREATED 16
-#define PROC_TERM
MASK 0x6
+#define PROC_TERM
INATED(state) (state & 0x6)
#define PROC_FINPAUSE 1
#define PROC_FINPAUSE 1
@@
-59,6
+61,15
@@
struct proc_info
struct llist_header siblings;
struct llist_header children;
struct llist_header grp_member;
struct llist_header siblings;
struct llist_header children;
struct llist_header grp_member;
+ waitq_t waitqueue;
+
+ struct
+ {
+ struct llist_header sleepers;
+ time_t wakeup_time;
+ time_t alarm_time;
+ } sleep;
+
struct proc_mm mm;
time_t created;
uint8_t state;
struct proc_mm mm;
time_t created;
uint8_t state;
@@
-66,10
+77,12
@@
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];
int flags;
void* sig_handler[_SIG_NUM];
+ struct v_fdtable* fdtable;
+ struct v_dnode* cwd;
pid_t pgid;
pid_t pgid;
- struct lx_timer* timer;
};
extern volatile struct proc_info* __current;
};
extern volatile struct proc_info* __current;