On 7/17/22 17:18, Tao Zhou wrote: >> +static int task_mon_slot_##name = RV_PER_TASK_MONITOR_INIT; \ > In patch1, RV_PER_TASK_MONITOR_INIT is defined as: > > #define RV_PER_TASK_MONITORS 1 > #define RV_PER_TASK_MONITOR_INIT (RV_PER_TASK_MONITORS) > > RV_PER_TASK_MONITOR_INIT is 1 now, seems not the index of the first only > element in vector. Now no map here, one task has one monitor though if I > am not wrong. > So task_mon_slot_##name must be defined to the index of first element. > Modify the macro definition of RV_PER_TASK_MONITOR_INIT to the index of > first element in vector. > > #define RV_PER_TASK_MONITOR_INIT (RV_PER_TASK_MONITORS) - 1 nop, (RV_PER_TASK_MONITORS) is an invalid vector value, so we can detect things like: disabling a disabled monitor. (I forgot to reset it when disabling a monitor... added) -- Daniel