Browse Source

update timer handler

Signed-off-by: FuangCao <cavan.cao@foxmail.com>
FuangCao 5 năm trước cách đây
mục cha
commit
5719a669e9
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      Application/libs/shark_task.c
  2. 1 1
      Application/libs/shark_task.h

+ 1 - 1
Application/libs/shark_task.c

@@ -86,7 +86,7 @@ static u32 shark_timer_task_handler(void)
 
 		if (timer != &shark_timer_head) {
 			shark_timer_cancel(timer);
-			timer->handler();
+			timer->handler(timer);
 		} else {
 			break;
 		}

+ 1 - 1
Application/libs/shark_task.h

@@ -12,7 +12,7 @@ typedef struct shark_timer {
 	u64 time;
 	struct shark_timer *prev;
 	struct shark_timer *next;
-	void (*handler)(void);
+	void (*handler)(struct shark_timer *timer);
 } shark_timer_t;
 
 u64 shark_get_mseconds(void);