[dpdk-dev] [PATCH v2 1/3] eal/arm64: add 128-bit atomic compare exchange

Honnappa Nagarahalli Honnappa.Nagarahalli at arm.com
Mon Jun 24 19:41:07 CEST 2019


> 
> 24/06/2019 18:12, Honnappa Nagarahalli:
> > > > > +	} else {
> > > > > +		rte_panic("Invalid memory order\n");
> > > >
> > > >
> > > > rte_panic should be removed from library. In this case, I think,
> > > > invalid mo can go for strongest barrier.
> >
> > It is added here to capture programming errors.
> > Memory order can be passed during compilation or during run time.
> > 'rte_panic' supports both of these.
> > Adding code with strongest memory order will mask the programming error.
> 
> An error must return a specific code from the function.
> rte_panic is really forbidden in libraries.
> We are in the process of removing all of them.
Thank you for clarifying.
In this particular use case, the API is similar to '__atomic_compare_exchange' built-in. Users would expect similar behavior. If we are differing from the standard behavior, we should document it in the API definition.
 
> 
> 


More information about the dev mailing list