Re: [PATCH V5 04/16] rv/include: Add deterministic automata monitor definition via C macros
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH V5 04/16] rv/include: Add deterministic automata monitor definition via C macros
- From: Daniel Bristot de Oliveira <bristot@xxxxxxxxxx>
- Date: Mon, 18 Jul 2022 09:54:16 +0200
- Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>, Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Jonathan Corbet <corbet@xxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Marco Elver <elver@xxxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>, Gabriele Paoloni <gpaoloni@xxxxxxxxxx>, Juri Lelli <juri.lelli@xxxxxxxxxx>, Clark Williams <williams@xxxxxxxxxx>, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-trace-devel@xxxxxxxxxxxxxxx
- In-reply-to: <YtQoYMLHgvTV0lea@geo.homenetwork>
- References: <cover.1657745645.git.bristot@kernel.org> <5e0447aa9d114c52fd2bc335de036c61d9625f1c.1657745645.git.bristot@kernel.org> <YtQoYMLHgvTV0lea@geo.homenetwork>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0
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
[Index of Archives]
[Linux USB Development]
[Linux USB Development]
[Linux Audio Users]
[Yosemite Hiking]
[Linux Kernel]
[Linux SCSI]