tests: kernel/events/event_api: memory coherence fixes
When CONFIG_KERNEL_COHERENCE=y, the k_event struct objects cannot be declared on stacks since they are incoherent among CPUs in the system. So mark them as static to place them in global data section and thus are coherence between CPUs. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
96b4a86a51
commit
7dac931e36
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ static void entry_extra2(void *p1, void *p2, void *p3)
|
|||
|
||||
void test_k_event_init(void)
|
||||
{
|
||||
struct k_event event;
|
||||
static struct k_event event;
|
||||
struct k_thread *thread;
|
||||
|
||||
k_event_init(&event);
|
||||
|
@ -338,7 +338,7 @@ void test_wake_multiple_threads(void)
|
|||
|
||||
void test_event_deliver(void)
|
||||
{
|
||||
struct k_event event;
|
||||
static struct k_event event;
|
||||
uint32_t events;
|
||||
|
||||
k_event_init(&event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue