[commit: ghc] master: Ensure gc_thread->wakeup is of type StgWord8. (fe6db46)

Austin Seipp mad.one at gmail.com
Fri Jun 21 07:25:29 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/fe6db466ec0ae56d33d0fdecc4694d63fed61fa8

>---------------------------------------------------------------

commit fe6db466ec0ae56d33d0fdecc4694d63fed61fa8
Author: Austin Seipp <aseipp at pobox.com>
Date:   Fri Jun 21 00:12:20 2013 -0500

    Ensure gc_thread->wakeup is of type StgWord8.
    
    rtsBool is defined to only have two inhabitants, which are true (1) and
    false (0)
    
    But the wakeup flag is set to 4 possible values, outside the range of
    rtsBool. This leads Clang to warn about tautological comparisons.
    
    Signed-off-by: Austin Seipp <aseipp at pobox.com>

>---------------------------------------------------------------

 rts/sm/GCThread.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rts/sm/GCThread.h b/rts/sm/GCThread.h
index 7aacb4e..748b068 100644
--- a/rts/sm/GCThread.h
+++ b/rts/sm/GCThread.h
@@ -122,7 +122,7 @@ typedef struct gc_thread_ {
     OSThreadId id;                 // The OS thread that this struct belongs to
     SpinLock   gc_spin;
     SpinLock   mut_spin;
-    volatile rtsBool wakeup;
+    volatile StgWord8 wakeup;
 #endif
     nat thread_index;              // a zero based index identifying the thread
     rtsBool idle;                  // sitting out of this GC cycle





More information about the ghc-commits mailing list