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
fix: use wait queue for blocking process
[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 c014443089bb557b35991bb7f1968c3873123a7b..7674a925ab182dc7b90bfa9f41cff7c59f3d663a 100644
(file)
--- a/
lunaix-os/includes/lunaix/process.h
+++ b/
lunaix-os/includes/lunaix/process.h
@@
-93,6
+93,12
@@
struct proc_info
extern volatile struct proc_info* __current;
extern volatile struct proc_info* __current;
+static inline void
+block_current()
+{
+ __current->state = PS_BLOCKED;
+}
+
/**
* @brief 分配并初始化一个进程控制块
*
/**
* @brief 分配并初始化一个进程控制块
*