On Jul 20, 2010, at 8:03 AM, N.M. Maclaren wrote:

> > Also, it seems like the 3rd parameter could be problematic if it ever
> > goes larger than 2B -- it'll increment in the wrong direction, won't it?
> 
> Not on most systems.  

Ah -- I just checked -- the associativity of + and (cast) are equal, and are 
right to left.  So it should be ok.  But still, for defensive programming 
purposes, I'd prefer this:

       } while (!OPAL_ATOMIC_CMPSET_32((int32_t*)&ep->eager_rdma_remote.seq,
                                       (int32_t)ftr->seq, 
(int32_t)(ftr->seq+1)));

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/


Reply via email to