Thread (113 messages) 113 messages, 8 authors, 2021-11-04

Re: [dpdk-dev] [RFC PATCH v3 1/5] eal: add new definitions for wait scheme

From: Stephen Hemminger <stephen@networkplumber.org>
Date: 2021-10-13 17:00:30

On Wed, 13 Oct 2021 15:03:56 +0000
"Ananyev, Konstantin" [off-list ref] wrote:
quoted
addr value' can be before other operations.
  
quoted
BTW, if we expect memorder to always be a constant, might be better
BUILD_BUG_ON()?  
If I understand correctly, you means we can replace 'assert' by 'build_bug_on':
RTE_BUILD_BUG_ON(memorder != __ATOMIC_ACQUIRE && memorder !=__ATOMIC_RELAXED);  
Yes, that was my thought.
In that case I think we should be able to catch wrong memorder at compilation stage.
Maybe:
   RTE_BUILD_BUG_ON(!_constant_p(memorder));
   RTE_BUILD_BUG_ON(memorder != __ATOMIC_ACQUIRE && memorder !=__ATOMIC_RELAXED);  
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help