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:
parent
efeb9b6534
commit
699564c69c
3 changed files with 5 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <nanokernel.h>
|
#include <microkernel.h>
|
||||||
#include <sys_clock.h>
|
#include <sys_clock.h>
|
||||||
|
|
||||||
/* externs */
|
/* externs */
|
||||||
|
|
|
@ -136,6 +136,7 @@ struct k_mrec {
|
||||||
uint32_t time;
|
uint32_t time;
|
||||||
uint32_t data1;
|
uint32_t data1;
|
||||||
uint32_t data2;
|
uint32_t data2;
|
||||||
|
void *ptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -77,9 +77,11 @@ void _k_task_monitor_args(struct k_args *A)
|
||||||
|
|
||||||
if (cmd_type == KERNEL_CMD_EVENT_TYPE) {
|
if (cmd_type == KERNEL_CMD_EVENT_TYPE) {
|
||||||
k_monitor_wptr->data2 = MO_EVENT | (uint32_t)A;
|
k_monitor_wptr->data2 = MO_EVENT | (uint32_t)A;
|
||||||
|
k_monitor_wptr->ptr = (void *)0;
|
||||||
} else {
|
} else {
|
||||||
k_monitor_wptr->data1 = _k_current_task->id;
|
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) {
|
if (++K_monitor_wind == k_monitor_capacity) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue