On 12/13/2011 11:43 AM, Dominique Dhumieres wrote: >> I've committed the patch. > > It caused: > > ../../../work/libitm/config/posix/rwlock.cc: In member function 'bool > GTM::gtm_rwlock::write_lock_generic(GTM::gtm_thread*)': > ../../../work/libitm/config/posix/rwlock.cc:196:56: error: comparison between > signed and unsigned integer expressions [-Werror=sign-compare] > cc1plus: all warnings being treated as errors
Fixed. Tested on linux with --disable-linux-futex. r~
Index: libitm/ChangeLog =================================================================== --- libitm/ChangeLog (revision 182301) +++ libitm/ChangeLog (working copy) @@ -1,5 +1,8 @@ 2011-12-13 Richard Henderson <r...@redhat.com> + * config/posix/rwlock.cc (gtm_rwlock::write_lock_generic): Fix + signed/unsigned comparison werror. + * local_atomic: New file. * libitm_i.h: Include it. (gtm_thread::shared_state): Use atomic template. Index: libitm/config/posix/rwlock.cc =================================================================== --- libitm/config/posix/rwlock.cc (revision 182301) +++ libitm/config/posix/rwlock.cc (working copy) @@ -193,7 +193,7 @@ it = it->next_thread) { // Don't count ourself if this is an upgrade. - if (it->shared_state.load(memory_order_relaxed) != -1) + if (it->shared_state.load(memory_order_relaxed) != (gtm_word)-1) readers++; }