Hi!
>
> Was your change to modify librttest.h as follows :
> /* atomic_add - add integer to atomic variable and returns a value.
> * i: integer value to add
> * v: pointer of type atomic_t
> */
> static inline void atomic_add( int i, atomic_t *v )
> {
> (void)__sync_add_and_fetch(&v->counter, i);
> }
>
> /* atomic_inc: atomically increment the integer passed by reference
> */
> static inline int atomic_inc(atomic_t *v)
> {
> return (int)__sync_add_and_fetch(&v->counter, 1);
> }
No. I send a patch to fix inline assembler for x86 machine. But
Gowrishankar send a better patch that replaces inline assembler with gcc
builins. So I agreed that this is a better solution and acked his patch.
Anyway casts to (void) and (int) are useless here as the compiler
figures out this itself. And also atomic_add() is unused function after
this change as atomic_inc() was previously implemented as atomic_add(1, v)
and atomic_add() was used only to implement atomic_inc().
--
Cyril Hrubis
[email protected]
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list