From 26b0662fb8ccea71f74e98a3c28d8dda6cbb2b20 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Sat, 12 Nov 2011 22:17:40 -0800 Subject: [PATCH] fix alignment for chan_handle structs; rust equiv is translated to char[16], not struct{long,long} --- src/lib/task.rs | 4 ++-- src/rt/rust_task.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/task.rs b/src/lib/task.rs index 6f5a403f2db4..531cf8bac2cc 100644 --- a/src/lib/task.rs +++ b/src/lib/task.rs @@ -80,7 +80,7 @@ native mod rustrt { type rust_task = {id: task, - mutable notify_enabled: u32, + mutable notify_enabled: int, mutable notify_chan: comm::chan, mutable stack_ptr: *u8}; @@ -318,7 +318,7 @@ fn unsafe_spawn_inner(-thunk: fn@(), // set up notifications if they are enabled. alt notify { some(c) { - (**task_ptr).notify_enabled = 1u32;; + (**task_ptr).notify_enabled = 1; (**task_ptr).notify_chan = c; } none { } diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index 399d48b51822..edd4faa8903d 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -44,7 +44,7 @@ struct frame_glue_fns { // library. This struct must agree with the std::task::rust_task record. struct rust_task_user { rust_task_id id; - uint32_t notify_enabled; // this is way more bits than necessary, but it + intptr_t notify_enabled; // this is way more bits than necessary, but it // simplifies the alignment. chan_handle notify_chan; uintptr_t rust_sp; // Saved sp when not running.