Преглед изворни кода

fix: fix compiling warning

simon пре 10 месеци
родитељ
комит
509cb83441
4 измењених фајлова са 9 додато и 8 уклоњено
  1. 5 0
      device/ioqueue.c
  2. 0 5
      device/ioqueue.h
  3. 4 1
      device/keyboard.c
  4. 0 2
      device/keyboard.h

+ 5 - 0
device/ioqueue.c

@@ -4,6 +4,11 @@
 
 /// @brief 返回 pos 在缓冲区的下一个位置
 static int32_t next_pos(int32_t pos);
+/// @brief 使生产者或消费者在此缓冲区上等待
+/// @param waiter
+static void ioq_wait(struct task_struct **waiter);
+/// @brief 唤醒 waiter
+static void wakeup(struct task_struct **waiter);
 
 /// @brief 初始化 ioqueue 队列
 void ioqueue_init(struct ioqueue *ioq)

+ 0 - 5
device/ioqueue.h

@@ -38,11 +38,6 @@ bool ioq_full(struct ioqueue *ioq);
 /// @param ioq
 /// @return TRUE OR FALSE
 bool ioq_empty(struct ioqueue *ioq);
-/// @brief 使生产者或消费者在此缓冲区上等待
-/// @param waiter
-static void ioq_wait(struct task_struct **waiter);
-/// @brief 唤醒 waiter
-static void wakeup(struct task_struct **waiter);
 /// @brief 消费者从 ioq 队列中获取一个字符
 char ioq_getchar(struct ioqueue *ioq);
 /// @brief 生产者往 ioq 队列中添加一个字符

+ 4 - 1
device/keyboard.c

@@ -103,6 +103,9 @@ static char keymap[][2] = {
     /* 其它按键暂不处理 */
 };
 
+// 键盘中断处理程序
+static void intr_keyboard_handler(void);
+
 void keyboard_init(void)
 {
     put_str("keyboard init start\n");
@@ -118,7 +121,7 @@ void keyboard_init(void)
 static void intr_keyboard_handler(void)
 {
     /* 这次中断发生之前的上一次中断,以下任意三个键是否有按下 */
-    bool ctrl_down_last = ctrl_status;
+    // bool ctrl_down_last = ctrl_status;
     bool shift_down_last = shift_status;
     bool caps_lock_last = caps_lock_status;
 

+ 0 - 2
device/keyboard.h

@@ -13,8 +13,6 @@
 
 #define KBD_STATUS_MASK 0x02
 
-// 键盘中断处理程序
-static void intr_keyboard_handler(void);
 void keyboard_init(void);
 extern struct ioqueue keyboard_buf;