[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 2/2] include/uk: add indirection to macro UK_CTOR_FUNC



Hi Yuri,

Patch looks good.

Thanks,

-- Felipe

Reviewed-by: Felipe Huici <felipe.huici@xxxxxxxxx>

============================================================
Dr. Felipe Huici
Chief Researcher, Systems and Machine Learning Group
NEC Laboratories Europe GmbH
Kurfuerstenanlage 36, D-69115 Heidelberg
Tel.  +49
(0)6221 4342-241
Fax:  +49
(0)6221 4342-155
 
e-mail:
felipe.huici@xxxxxxxxx
============================================================
Registered at Amtsgericht Mannheim, Germany, HRB728558

On 18.04.19, 18:32, "Minios-devel on behalf of Yuri Volchkov" 
<minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of 
yuri.volchkov@xxxxxxxxx> wrote:

    If level is passed as a macro, the concatenation will paste the name
    of the macro instead of constant it represents. The solution is
    standard - just another layer of macro indirection.
    
    Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
    ---
     include/uk/ctors.h | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/include/uk/ctors.h b/include/uk/ctors.h
    index 15ec90fe..a3432e2b 100644
    --- a/include/uk/ctors.h
    +++ b/include/uk/ctors.h
    @@ -55,11 +55,11 @@ extern const uk_ctor_func_t uk_ctortab[];
      * @param ctorf
      *   Constructor function to be called
      */
    -#define UK_CTOR_FUNC(lvl, ctorf) \
    +#define __UK_CTOR_FUNC(lvl, ctorf) \
                static const uk_ctor_func_t     \
                __used __section(".uk_ctortab" #lvl)    \
                __uk_ctab ## lvl ## _ ## ctorf = (ctorf)
    -
    +#define UK_CTOR_FUNC(lvl, ctorf) __UK_CTOR_FUNC(lvl, ctorf)
     
     #ifdef __cplusplus
     }
    -- 
    2.19.2
    
    
    _______________________________________________
    Minios-devel mailing list
    Minios-devel@xxxxxxxxxxxxxxxxxxxx
    https://lists.xenproject.org/mailman/listinfo/minios-devel

_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.