source: bootcd/isolinux/syslinux-6.03/core/thread/idle_thread.c

Last change on this file was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 455 bytes
Line 
1#include "thread.h"
2#include <limits.h>
3#include <sys/cpu.h>
4
5static void default_idle_thread_hook(void)
6{
7}
8
9void (*idle_thread_hook)(void) = default_idle_thread_hook;
10
11static void idle_thread_func(void *dummy)
12{
13    (void)dummy;
14
15    for (;;) {
16        cli();
17        idle_thread_hook();
18        __schedule();
19        asm volatile("sti ; hlt" : : : "memory");
20    }
21}
22
23void start_idle_thread(void)
24{
25    start_thread("idle", 4096, IDLE_THREAD_PRIORITY, idle_thread_func, NULL);
26}
27
Note: See TracBrowser for help on using the repository browser.