[openib-general] Re: [PATCH] Opensm - asserts before OSM_LOG_ENTER

Michael S. Tsirkin mst at mellanox.co.il
Wed Feb 1 06:47:21 PST 2006


Quoting r. Hal Rosenstock <halr at voltaire.com>:
> >  #define OSM_LOG_EXIT( OSM_LOG_PTR ) \
> >  	osm_log( OSM_LOG_PTR, OSM_LOG_FUNCS, \
> > -		 "%s: ]\n", osm_log_func_name );
> > +		 "%s: ]\n", __func__ )
> >  
> >  /****h* OpenSM/Log
> >  * NAME
> 
> 
> This looks fine for Linux to me but since this file is shared by
> Windows, doesn't it need a conditionalization for those builds ? 
> 
> Also, will __FUNCTION__ work in all the Windows cases ?
> 
> -- Hal
> 

BTW functions that include ';' like OSM_LOG_EXIT here must be wrapped with do {}
while (0), in any case.

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list