Skip to content

Commit 26b0662

Browse files
committed
fix alignment for chan_handle structs; rust equiv is translated
to char[16], not struct{long,long}
1 parent 5502354 commit 26b0662

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/lib/task.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ native mod rustrt {
8080

8181
type rust_task =
8282
{id: task,
83-
mutable notify_enabled: u32,
83+
mutable notify_enabled: int,
8484
mutable notify_chan: comm::chan<task_notification>,
8585
mutable stack_ptr: *u8};
8686

@@ -318,7 +318,7 @@ fn unsafe_spawn_inner(-thunk: fn@(),
318318
// set up notifications if they are enabled.
319319
alt notify {
320320
some(c) {
321-
(**task_ptr).notify_enabled = 1u32;;
321+
(**task_ptr).notify_enabled = 1;
322322
(**task_ptr).notify_chan = c;
323323
}
324324
none { }

src/rt/rust_task.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ struct frame_glue_fns {
4444
// library. This struct must agree with the std::task::rust_task record.
4545
struct rust_task_user {
4646
rust_task_id id;
47-
uint32_t notify_enabled; // this is way more bits than necessary, but it
47+
intptr_t notify_enabled; // this is way more bits than necessary, but it
4848
// simplifies the alignment.
4949
chan_handle notify_chan;
5050
uintptr_t rust_sp; // Saved sp when not running.

0 commit comments

Comments
 (0)