#include "RetainerSet.h"
#include "Schedule.h"
#include "Printer.h"
-#include "Storage.h"
#include "RtsFlags.h"
#include "Weak.h"
#include "Sanity.h"
#include "Profiling.h"
#include "Stats.h"
-#include "BlockAlloc.h"
#include "ProfHeap.h"
#include "Apply.h"
return; // no child
break;
- case TVAR_WAIT_QUEUE:
- *first_child = (StgClosure *)((StgTVarWaitQueue *)c)->waiting_tso;
+ case TVAR_WATCH_QUEUE:
+ *first_child = (StgClosure *)((StgTVarWatchQueue *)c)->closure;
se.info.next.step = 2; // 2 = second
break;
case TVAR:
// following statement by either a memcpy() call or a switch statement
// on the type of the element. Currently, the size of stackElement is
// small enough (5 words) that this direct assignment seems to be enough.
+
+ // ToDo: The line below leads to the warning:
+ // warning: 'se.info.type' may be used uninitialized in this function
+ // This is caused by the fact that there are execution paths through the
+ // large switch statement above where some cases do not initialize this
+ // field. Is this really harmless? Can we avoid the warning?
*stackTop = se;
#ifdef DEBUG_RETAINER
*r = se->c_child_r;
return;
- case TVAR_WAIT_QUEUE:
+ case TVAR_WATCH_QUEUE:
if (se->info.next.step == 2) {
- *c = (StgClosure *)((StgTVarWaitQueue *)se->c)->next_queue_entry;
+ *c = (StgClosure *)((StgTVarWatchQueue *)se->c)->next_queue_entry;
se->info.next.step++; // move to the next step
// no popOff
} else {
- *c = (StgClosure *)((StgTVarWaitQueue *)se->c)->prev_queue_entry;
+ *c = (StgClosure *)((StgTVarWatchQueue *)se->c)->prev_queue_entry;
popOff();
}
*cp = se->c;
return;
case TVAR:
- *c = (StgClosure *)((StgTVar *)se->c)->first_wait_queue_entry;
+ *c = (StgClosure *)((StgTVar *)se->c)->first_watch_queue_entry;
*cp = se->c;
*r = se->c_child_r;
popOff();
case BCO:
case ARR_WORDS:
// STM
- case TVAR_WAIT_QUEUE:
+ case TVAR_WATCH_QUEUE:
case TREC_HEADER:
case TREC_CHUNK:
return rtsFalse;