arch: deprecate _current

`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
This commit is contained in:
Yong Cong Sin 2024-11-19 13:57:54 +08:00 committed by Anas Nashif
commit b1def7145f
107 changed files with 490 additions and 479 deletions

View file

@ -254,7 +254,7 @@ const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks)
"There is no power state defined");
/* make sure this is idle thread */
zassert_true(z_is_idle_thread_object(_current));
zassert_true(z_is_idle_thread_object(arch_current_thread()));
zassert_true(ticks == _kernel.idle);
zassert_false(k_can_yield());
idle_entered = true;
@ -276,7 +276,7 @@ static void notify_pm_state_entry(enum pm_state state)
/* enter suspend */
zassert_true(notify_app_entry == true,
"Notification to enter suspend was not sent to the App");
zassert_true(z_is_idle_thread_object(_current));
zassert_true(z_is_idle_thread_object(arch_current_thread()));
zassert_equal(state, PM_STATE_SUSPEND_TO_IDLE);
pm_device_state_get(device_dummy, &device_power_state);
@ -301,7 +301,7 @@ static void notify_pm_state_exit(enum pm_state state)
/* leave suspend */
zassert_true(notify_app_exit == true,
"Notification to leave suspend was not sent to the App");
zassert_true(z_is_idle_thread_object(_current));
zassert_true(z_is_idle_thread_object(arch_current_thread()));
zassert_equal(state, PM_STATE_SUSPEND_TO_IDLE);
/* at this point, devices are active again*/