Skip to content
Commit 7a3124d8 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Benjamin Cabé
Browse files

kernel: move current thread pointer management to core code



Define the generic _current directly and get rid of the generic
arch_current_get().

The SMP default implementation is now known as z_smp_current_get().
It is no longer inlined which saves significant binary size (about 10%
for some random test case I checked).

Introduce z_current_thread_set() and use it in place of
arch_current_thread_set() for updating the current thread pointer
given this is not necessarily an architecture specific operation.
The architecture specific optimization, when enabled, should only care
about its own things and not have to also update the generic
_current_cpu->current copy.

Signed-off-by: default avatarNicolas Pitre <npitre@baylibre.com>
parent 46aa6717
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment