unified: remove mention of 'fiber' in kernel_event_logger

Adapting to unified kernel naming of 'coop thread'.

Change-Id: I66cb766c2269acf0867e434bc21f633ea1111f89
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-10-26 14:09:23 -04:00 committed by Anas Nashif
commit 115d118a2e

View file

@ -25,11 +25,12 @@
#include <init.h> #include <init.h>
#include <nano_private.h> #include <nano_private.h>
#include <kernel_event_logger_arch.h> #include <kernel_event_logger_arch.h>
#include <misc/__assert.h>
uint32_t _sys_k_event_logger_buffer[CONFIG_KERNEL_EVENT_LOGGER_BUFFER_SIZE]; uint32_t _sys_k_event_logger_buffer[CONFIG_KERNEL_EVENT_LOGGER_BUFFER_SIZE];
#ifdef CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH #ifdef CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH
void *_collector_fiber; void *_collector_coop_thread;
#endif #endif
#ifdef CONFIG_KERNEL_EVENT_LOGGER_SLEEP #ifdef CONFIG_KERNEL_EVENT_LOGGER_SLEEP
@ -100,7 +101,7 @@ void _sys_k_event_logger_context_switch(void)
return; return;
} }
if (_collector_fiber == _nanokernel.current) { if (_collector_coop_thread == _nanokernel.current) {
return; return;
} }
@ -129,9 +130,19 @@ void _sys_k_event_logger_context_switch(void)
ARRAY_SIZE(data)); ARRAY_SIZE(data));
} }
#ifdef CONFIG_KERNEL_V2
#define ASSERT_CURRENT_IS_COOP_THREAD() \
__ASSERT(_current.prio < 0, "must be a coop thread")
#else
#define ASSERT_CURRENT_IS_COOP_THREAD() \
__ASSERT(_nanokernel.current->flags & FIBER, "must be a fiber")
#endif
void sys_k_event_logger_register_as_collector(void) void sys_k_event_logger_register_as_collector(void)
{ {
_collector_fiber = _nanokernel.current; ASSERT_CURRENT_IS_COOP_THREAD();
_collector_coop_thread = _nanokernel.current;
} }
#endif /* CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH */ #endif /* CONFIG_KERNEL_EVENT_LOGGER_CONTEXT_SWITCH */