Function report |
Source Code:arch\x86\kernel\apm_32.c |
Create Date:2022-07-28 08:22:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:apm
Proto:static int apm(void *unused)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
void * | unused |
1731 | set_cpus_allowed_ptr(current process, cpumask_of - the cpumask containing just a given cpu*@cpu: the cpu (<= nr_cpu_ids)(0)) |
1732 | BUG_ON(smp_processor_id() != 0) |
1734 | If connection_version == 0 Then |
1735 | connection_version = version |
1736 | If connection_version > 0x100 Then |
1740 | If connection_version > 0x0102 Then connection_version = 0x0102 |
1742 | error = apm_driver_version - APM driver version*@val: loaded with the APM version on return* Retrieve the APM version supported by the BIOS |
1743 | If error != Error codes Then |
1751 | If debug Then printk(formational "apm: Connection version %d.%d\n", (connection_version >> 8) & 0xff, connection_version & 0xff) |
1771 | If flags & APM_BIOS_DISENGAGED && connection_version > 0x0100 Then |
1774 | If error Then |
1780 | If debug && ( num_online_cpus() == 1 || smp) Then |
1782 | If error Then printk(formational "apm: power status not available\n") |
1784 | Else |
1786 | Case & == 0 |
1787 | power_stat = "off line" |
1788 | Break |
1789 | Case & == 1 |
1790 | power_stat = "on line" |
1791 | Break |
1792 | Case & == 2 |
1793 | power_stat = "on backup power" |
1794 | Break |
1795 | Default |
1796 | power_stat = "unknown" |
1797 | Break |
1800 | Case & == 0 |
1801 | bat_stat = "high" |
1802 | Break |
1803 | Case & == 1 |
1804 | bat_stat = "low" |
1805 | Break |
1806 | Case & == 2 |
1807 | bat_stat = "critical" |
1808 | Break |
1809 | Case & == 3 |
1810 | bat_stat = "charging" |
1811 | Break |
1812 | Default |
1813 | bat_stat = "unknown" |
1814 | Break |
1816 | printk(formational "apm: AC %s, battery status %s, battery life ", power_stat, bat_stat) |
1823 | If connection_version > 0x100 Then |
1838 | If power_off Then pm_power_off = apm_power_off - ask the BIOS to power off* Handle the power off sequence |
1841 | If num_online_cpus() == 1 || smp Then |
1851 | Return 0 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |