microkernel: fix build issue when CONFIG_TASK_MONITOR=y

Note that the A->Comm is a pointer to the microkernel functions,
and thus is highly probable that the high 8-bit is occupied.
Therefore adds a new field in the monitor struct to store the pointer.

Change-Id: I7bcb34108c89a97cc38b2ac411ae4139b62786f3
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2015-12-28 11:32:16 -08:00 committed by Anas Nashif
commit 699564c69c
3 changed files with 5 additions and 2 deletions

View file

@ -26,7 +26,7 @@
* @{
*/
#include <nanokernel.h>
#include <microkernel.h>
#include <sys_clock.h>
/* externs */

View file

@ -136,6 +136,7 @@ struct k_mrec {
uint32_t time;
uint32_t data1;
uint32_t data2;
void *ptr;
};
typedef enum {

View file

@ -77,9 +77,11 @@ void _k_task_monitor_args(struct k_args *A)
if (cmd_type == KERNEL_CMD_EVENT_TYPE) {
k_monitor_wptr->data2 = MO_EVENT | (uint32_t)A;
k_monitor_wptr->ptr = (void *)0;
} else {
k_monitor_wptr->data1 = _k_current_task->id;
k_monitor_wptr->data2 = MO_LCOMM | A->Comm;
k_monitor_wptr->data2 = MO_LCOMM;
k_monitor_wptr->ptr = A->Comm;
}
if (++K_monitor_wind == k_monitor_capacity) {