fix: use wait queue for blocking process
[lunaix-os.git] / lunaix-os / includes / lunaix / process.h
index c014443089bb557b35991bb7f1968c3873123a7b..7674a925ab182dc7b90bfa9f41cff7c59f3d663a 100644 (file)
@@ -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 分配并初始化一个进程控制块
  *