Skip to content

Commit 037cb87

Browse files
lyakhkartben
authored andcommitted
llext: export spinlock debugging symbols to extensions
With spinlock debugging enabled LLEXTs need additional symbols exported by the kernel. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent a2a587a commit 037cb87

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

kernel/idle.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <zephyr/toolchain.h>
99
#include <zephyr/linker/sections.h>
1010
#include <zephyr/drivers/timer/system_timer.h>
11+
#include <zephyr/llext/symbol.h>
1112
#include <zephyr/pm/pm.h>
1213
#include <stdbool.h>
1314
#include <zephyr/logging/log.h>
@@ -100,3 +101,4 @@ void __weak arch_spin_relax(void)
100101

101102
arch_nop();
102103
}
104+
EXPORT_SYMBOL(arch_spin_relax);

kernel/spinlock_validate.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
#include <kernel_internal.h>
77
#include <zephyr/spinlock.h>
8+
#include <zephyr/llext/symbol.h>
89

910
bool z_spin_lock_valid(struct k_spinlock *l)
1011
{
@@ -17,6 +18,7 @@ bool z_spin_lock_valid(struct k_spinlock *l)
1718
}
1819
return true;
1920
}
21+
EXPORT_SYMBOL(z_spin_lock_valid);
2022

2123
bool z_spin_unlock_valid(struct k_spinlock *l)
2224
{
@@ -33,15 +35,18 @@ bool z_spin_unlock_valid(struct k_spinlock *l)
3335
}
3436
return true;
3537
}
38+
EXPORT_SYMBOL(z_spin_unlock_valid);
3639

3740
void z_spin_lock_set_owner(struct k_spinlock *l)
3841
{
3942
l->thread_cpu = _current_cpu->id | (uintptr_t)_current;
4043
}
44+
EXPORT_SYMBOL(z_spin_lock_set_owner);
4145

4246
#ifdef CONFIG_KERNEL_COHERENCE
4347
bool z_spin_lock_mem_coherent(struct k_spinlock *l)
4448
{
4549
return arch_mem_coherent((void *)l);
4650
}
51+
EXPORT_SYMBOL(z_spin_lock_mem_coherent);
4752
#endif /* CONFIG_KERNEL_COHERENCE */

0 commit comments

Comments
 (0)