1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

cpu/msp430_common: Don't access sched_active_*

Replaced accesses to sched_active_* with API calls in C files
This commit is contained in:
Marian Buschsieweke 2020-08-17 11:50:45 +02:00
parent ac394ce826
commit c01ef33ccc
No known key found for this signature in database
GPG Key ID: 61F64C6599B1539F
2 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,7 @@ void thread_yield_higher(void)
__save_context(); __save_context();
/* have sched_active_thread point to the next thread */ /* have thread_get_active() point to the next thread */
sched_run(); sched_run();
__restore_context(); __restore_context();

View File

@ -67,7 +67,7 @@ static inline void __attribute__((always_inline)) __save_context(void)
__asm__("push r5"); __asm__("push r5");
__asm__("push r4"); __asm__("push r4");
__asm__("mov.w r1,%0" : "=r"(sched_active_thread->sp)); __asm__("mov.w r1,%0" : "=r"(thread_get_active()->sp));
} }
/** /**
@ -75,7 +75,7 @@ static inline void __attribute__((always_inline)) __save_context(void)
*/ */
static inline void __attribute__((always_inline)) __restore_context(void) static inline void __attribute__((always_inline)) __restore_context(void)
{ {
__asm__("mov.w %0,r1" : : "m"(sched_active_thread->sp)); __asm__("mov.w %0,r1" : : "m"(thread_get_active()->sp));
__asm__("pop r4"); __asm__("pop r4");
__asm__("pop r5"); __asm__("pop r5");