Main Page | Directories | File List | Globals

idle.c File Reference

#include <agnix/agnix.h>
#include <agnix/tasks.h>
#include <agnix/bios/bios.h>
#include <agnix/irq.h>

Include dependency graph for idle.c:

Go to the source code of this file.

Functions

void idle_state_enter (void)

Variables

int apm_enabled


Function Documentation

void idle_state_enter void   ) 
 

Definition at line 25 of file idle.c.

References __asm__(), apm_cpu_busy(), apm_cpu_idle(), apm_enabled, and flags.

00026 {
00027 
00028 #if CONFIG_BIOS_APM
00029     int i;
00030     u32 flags;
00031 
00032     if (apm_enabled) {
00033         
00034         save_flags(flags); __cli();
00035     
00036         for (i = 0; i < CPU_IDLE_LOOPS; i++)
00037             apm_cpu_idle();
00038 
00039         apm_cpu_busy();
00040     
00041         restore_flags(flags);
00042 
00043     } else {
00044         while(!(current_task->t_resched))
00045             __asm__ __volatile__ ("hlt");
00046     }
00047     
00048 #else
00049 
00050     while(!(current_task->t_resched))
00051         __asm__ __volatile__ ("hlt");
00052     
00053 #endif    
00054 }

Here is the call graph for this function:


Variable Documentation

int apm_enabled
 

Definition at line 42 of file apm.c.

Referenced by apm_enable(), apm_init(), do_machine_powerdown(), and idle_state_enter().

Dokumentacje wygenerowano programem Doxygen 1.4.2 dla projektu Agnix