Browse Source

bugfix:解决显示刷新线程未正确设置name字段的问题

longjin 2 years ago
parent
commit
b6a77da0c9
3 changed files with 5 additions and 4 deletions
  1. 1 1
      kernel/driver/video/video.c
  2. 1 0
      kernel/process/kthread.c
  3. 3 3
      kernel/process/proc-types.h

+ 1 - 1
kernel/driver/video/video.c

@@ -104,7 +104,7 @@ int video_reinitialize(bool level) // 这个函数会在main.c调用, 保证 vid
         video_refresh_expire_jiffies = cal_next_n_ms_jiffies(10 * REFRESH_INTERVAL);
 
         // 创建video守护进程
-        video_daemon_pcb = kthread_run(&video_refresh_daemon, NULL, CLONE_FS | CLONE_SIGNAL);
+        video_daemon_pcb = kthread_run(&video_refresh_daemon, NULL, "Video refresh daemon");
         video_daemon_pcb->virtual_runtime = 0; // 特殊情况, 最高优先级, 以后再改
 
         // 启用屏幕刷新软中断

+ 1 - 0
kernel/process/kthread.c

@@ -3,6 +3,7 @@
 #include <common/spinlock.h>
 #include <sched/sched.h>
 #include <debug/bug.h>
+#include <time/sleep.h>
 
 static spinlock_t __kthread_create_lock;           // kthread创建过程的锁
 static struct List kthread_create_list;            // kthread创建任务的链表

+ 3 - 3
kernel/process/proc-types.h

@@ -30,9 +30,9 @@
 #define USER_DS (0x30)
 
 // 进程初始化时的数据拷贝标志位
-#define CLONE_FS (1 << 0) // 在进程间共享打开的文件
-#define CLONE_SIGNAL (1 << 1)
-#define CLONE_VM (1 << 2) // 在进程间共享虚拟内存空间
+#define CLONE_FS (1UL << 0) // 在进程间共享打开的文件
+#define CLONE_SIGNAL (1UL << 1)
+#define CLONE_VM (1UL << 2) // 在进程间共享虚拟内存空间
 
 struct thread_struct
 {