Commit c425356c authored by Simon Marlow's avatar Simon Marlow
Browse files

Fix warnings on 64-bit platforms; fixes validate on x86-64

parent db0309b6
...@@ -112,40 +112,41 @@ static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag, ...@@ -112,40 +112,41 @@ static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
tracePreface(); tracePreface();
switch (tag) { switch (tag) {
case EVENT_CREATE_THREAD: // (cap, thread) case EVENT_CREATE_THREAD: // (cap, thread)
debugBelch("cap %d: created thread %ld\n", cap->no, tso->id); debugBelch("cap %d: created thread %lu\n",
cap->no, (lnat)tso->id);
break; break;
case EVENT_RUN_THREAD: // (cap, thread) case EVENT_RUN_THREAD: // (cap, thread)
debugBelch("cap %d: running thread %ld (%s)\n", cap->no, debugBelch("cap %d: running thread %lu (%s)\n",
tso->id, what_next_strs[tso->what_next]); cap->no, (lnat)tso->id, what_next_strs[tso->what_next]);
break; break;
case EVENT_THREAD_RUNNABLE: // (cap, thread) case EVENT_THREAD_RUNNABLE: // (cap, thread)
debugBelch("cap %d: thread %ld appended to run queue\n", debugBelch("cap %d: thread %lu appended to run queue\n",
cap->no, tso->id); cap->no, (lnat)tso->id);
break; break;
case EVENT_RUN_SPARK: // (cap, thread) case EVENT_RUN_SPARK: // (cap, thread)
debugBelch("cap %d: thread %ld running a spark\n", debugBelch("cap %d: thread %lu running a spark\n",
cap->no, tso->id); cap->no, (lnat)tso->id);
break; break;
case EVENT_CREATE_SPARK_THREAD: // (cap, spark_thread) case EVENT_CREATE_SPARK_THREAD: // (cap, spark_thread)
debugBelch("cap %d: creating spark thread %ld\n", debugBelch("cap %d: creating spark thread %lu\n",
cap->no, (long)other); cap->no, (long)other);
break; break;
case EVENT_MIGRATE_THREAD: // (cap, thread, new_cap) case EVENT_MIGRATE_THREAD: // (cap, thread, new_cap)
debugBelch("cap %d: thread %ld migrating to cap %d\n", debugBelch("cap %d: thread %lu migrating to cap %d\n",
cap->no, tso->id, (int)other); cap->no, (lnat)tso->id, (int)other);
break; break;
case EVENT_STEAL_SPARK: // (cap, thread, victim_cap) case EVENT_STEAL_SPARK: // (cap, thread, victim_cap)
debugBelch("cap %d: thread %ld stealing a spark from cap %d\n", debugBelch("cap %d: thread %lu stealing a spark from cap %d\n",
cap->no, tso->id, (int)other); cap->no, (lnat)tso->id, (int)other);
break; break;
case EVENT_THREAD_WAKEUP: // (cap, thread, other_cap) case EVENT_THREAD_WAKEUP: // (cap, thread, other_cap)
debugBelch("cap %d: waking up thread %ld on cap %d\n", debugBelch("cap %d: waking up thread %lu on cap %d\n",
cap->no, tso->id, (int)other); cap->no, (lnat)tso->id, (int)other);
break; break;
case EVENT_STOP_THREAD: // (cap, thread, status) case EVENT_STOP_THREAD: // (cap, thread, status)
debugBelch("cap %d: thread %ld stopped (%s)\n", debugBelch("cap %d: thread %lu stopped (%s)\n",
cap->no, tso->id, thread_stop_reasons[other]); cap->no, (lnat)tso->id, thread_stop_reasons[other]);
break; break;
case EVENT_SHUTDOWN: // (cap) case EVENT_SHUTDOWN: // (cap)
debugBelch("cap %d: shutting down\n", cap->no); debugBelch("cap %d: shutting down\n", cap->no);
...@@ -163,7 +164,8 @@ static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag, ...@@ -163,7 +164,8 @@ static void traceSchedEvent_stderr (Capability *cap, EventTypeNum tag,
debugBelch("cap %d: finished GC\n", cap->no); debugBelch("cap %d: finished GC\n", cap->no);
break; break;
default: default:
debugBelch("cap %2d: thread %ld: event %d\n\n", cap->no, tso->id, tag); debugBelch("cap %2d: thread %lu: event %d\n\n",
cap->no, (lnat)tso->id, tag);
break; break;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment