2025-02-13 11:18:19 +08:00
|
|
|
#pragma
|
|
|
|
|
|
|
|
|
|
#include "thread.h"
|
|
|
|
|
typedef struct thread_wait_entry
|
|
|
|
|
{
|
|
|
|
|
slist_head_t node;
|
|
|
|
|
thread_t *th;
|
|
|
|
|
umword_t times;
|
2025-03-09 23:53:18 +08:00
|
|
|
umword_t times_debug;
|
2025-02-13 11:18:19 +08:00
|
|
|
} thread_wait_entry_t;
|
|
|
|
|
void thread_check_timeout(void);
|
|
|
|
|
thread_wait_entry_t *thread_sleep_del(thread_t *th);
|
|
|
|
|
void thread_sleep_del_and_wakeup(thread_t *th);
|
|
|
|
|
umword_t thread_sleep(umword_t tick);
|