diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-09-07 13:55:11 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-09-07 15:32:14 +0100 |
commit | 41737f12f99c9ea776f7658b93e5b03ffc8f120b (patch) | |
tree | 76dd200a6f0e3fd8af87270ae1010985038c26a9 /rts/Messages.c | |
parent | a8179622f84bbd52e127a9596d2d4a918ca64e0c (diff) | |
download | haskell-41737f12f99c9ea776f7658b93e5b03ffc8f120b.tar.gz |
Deprecate lnat, and use StgWord instead
lnat was originally "long unsigned int" but we were using it when we
wanted a 64-bit type on a 64-bit machine. This broke on Windows x64,
where long == int == 32 bits. Using types of unspecified size is bad,
but what we really wanted was a type with N bits on an N-bit machine.
StgWord is exactly that.
lnat was mentioned in some APIs that clients might be using
(e.g. StackOverflowHook()), so we leave it defined but with a comment
to say that it's deprecated.
Diffstat (limited to 'rts/Messages.c')
-rw-r--r-- | rts/Messages.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/rts/Messages.c b/rts/Messages.c index 6cb66479ee..34dcbdf56d 100644 --- a/rts/Messages.c +++ b/rts/Messages.c @@ -74,7 +74,7 @@ loop: { StgTSO *tso = ((MessageWakeup *)m)->tso; debugTraceCap(DEBUG_sched, cap, "message: try wakeup thread %ld", - (lnat)tso->id); + (W_)tso->id); tryWakeupThread(cap, tso); } else if (i == &stg_MSG_THROWTO_info) @@ -90,7 +90,7 @@ loop: } debugTraceCap(DEBUG_sched, cap, "message: throwTo %ld -> %ld", - (lnat)t->source->id, (lnat)t->target->id); + (W_)t->source->id, (W_)t->target->id); ASSERT(t->source->why_blocked == BlockedOnMsgThrowTo); ASSERT(t->source->block_info.closure == (StgClosure *)m); @@ -167,7 +167,7 @@ nat messageBlackHole(Capability *cap, MessageBlackHole *msg) StgTSO *owner; debugTraceCap(DEBUG_sched, cap, "message: thread %d blocking on blackhole %p", - (lnat)msg->tso->id, msg->bh); + (W_)msg->tso->id, msg->bh); info = bh->header.info; @@ -256,7 +256,7 @@ loop: recordClosureMutated(cap,bh); // bh was mutated debugTraceCap(DEBUG_sched, cap, "thread %d blocked on thread %d", - (lnat)msg->tso->id, (lnat)owner->id); + (W_)msg->tso->id, (W_)owner->id); return 1; // blocked } @@ -289,7 +289,7 @@ loop: } debugTraceCap(DEBUG_sched, cap, "thread %d blocked on thread %d", - (lnat)msg->tso->id, (lnat)owner->id); + (W_)msg->tso->id, (W_)owner->id); // See above, #3838 if (owner->why_blocked == NotBlocked && owner->id != msg->tso->id) { |