Function report |
Source Code:kernel\cpu.c |
Create Date:2022-07-28 09:00:58 |
| Last Modify:2020-03-18 13:00:59 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__cpuhp_setup_state_cpuslocked - Setup the callbacks for an hotplug machine state*@state: The state to setup*@invoke: If true, the startup function is invoked for cpus where* cpu state >= @state*@startup: startup callback function*@teardown: teardown
Proto:int __cpuhp_setup_state_cpuslocked(enum cpuhp_state state, const char *name, bool invoke, int (*startup)(unsigned int cpu), int (*teardown)(unsigned int cpu), bool multi_instance)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| enum cpuhp_state | state | |
| const char * | name | |
| bool | invoke | |
| int (* | startup | |
| int (* | teardown | |
| bool | multi_instance |
| 1754 | ret = 0 |
| 1757 | lockdep_assert_cpus_held() |
| 1759 | If Sanity check for callbacks || Not name Then Return -EINVAL |
| 1762 | mutex_lock( & cpuhp_state_mutex) |
| 1764 | ret = cpuhp_store_callbacks(state, name, startup, teardown, multi_instance) |
| 1767 | dynstate = state == CPUHP_AP_ONLINE_DYN |
| 1780 | for_each_present_cpu(cpu) |
| 1781 | st = per_cpu_ptr( & cpuhp_state, cpu) |
| 1788 | If ret Then |
| 1789 | If teardown Then Called from __cpuhp_setup_state on a recoverable failure.* Note: The teardown callbacks for rollback are not allowed to fail! |
| 1791 | cpuhp_store_callbacks(state, NULL, NULL, NULL, false) |
| 1792 | Go to out |
| 1795 | out : |
| 1796 | mutex_unlock( & cpuhp_state_mutex) |
| 1803 | Return ret |
| Name | Describe |
|---|---|
| __cpuhp_setup_state |
| 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 |