On Thu, Nov 20, 2025 at 03:49:04PM +0100, Marco Elver wrote:
> +/**
> + * __guarded_by - struct member and globals attribute, declares variable
> + * only accessible within active context
> + *
> + * Declares that the struct member or global variable is only accessible
> within
> + * the context entered by the given context guard. Read operations on the
> data
> + * require shared access, while write operations require exclusive access.
> + *
> + * .. code-block:: c
> + *
> + * struct some_state {
> + * spinlock_t lock;
> + * long counter __guarded_by(&lock);
> + * };
> + */
> +# define __guarded_by(...) __attribute__((guarded_by(__VA_ARGS__)))
I must express pure hatred for this '.. code-block:: c' thing.