Skip to content

Commit ab1f7a5

Browse files
olsonjefferybrson
authored andcommitted
---
yaml --- r: 12561 b: refs/heads/master c: f06362d h: refs/heads/master i: 12559: 95f5365 v: v3
1 parent fbaf582 commit ab1f7a5

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: c6667c06c34a25a8a21a1805b4f454f2d05d337c
2+
refs/heads/master: f06362d5bbef9c569e06d66662cf49ead846ce0a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/libcore/priv.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#[doc(hidden)];
22

3-
export chan_from_global_ptr;
3+
export chan_from_global_ptr, weaken_task;
44

55
import compare_and_swap = rustrt::rust_compare_and_swap_ptr;
66

@@ -32,8 +32,11 @@ unsafe fn chan_from_global_ptr<T: send>(
3232
abort
3333
}
3434

35+
log(debug,"ENTERING chan_from_global_ptr, before is_prob_zero check");
3536
let is_probably_zero = *global == 0u;
37+
log(debug,"after is_prob_zero check");
3638
if is_probably_zero {
39+
log(debug,"is probably zero...");
3740
// There's no global channel. We must make it
3841

3942
let setup_po = comm::port();
@@ -51,14 +54,17 @@ unsafe fn chan_from_global_ptr<T: send>(
5154
}
5255
};
5356

57+
log(debug,"before setup recv..");
5458
// This is the proposed global channel
5559
let ch = comm::recv(setup_po);
5660
// 0 is our sentinal value. It is not a valid channel
5761
assert unsafe::reinterpret_cast(ch) != 0u;
5862

5963
// Install the channel
64+
log(debug,"BEFORE COMPARE AND SWAP");
6065
let swapped = compare_and_swap(
6166
global, 0u, unsafe::reinterpret_cast(ch));
67+
log(debug,#fmt("AFTER .. swapped? %?", swapped));
6268

6369
if swapped {
6470
// Success!
@@ -70,6 +76,7 @@ unsafe fn chan_from_global_ptr<T: send>(
7076
unsafe::reinterpret_cast(*global)
7177
}
7278
} else {
79+
log(debug, "global != 0");
7380
unsafe::reinterpret_cast(*global)
7481
}
7582
}

0 commit comments

Comments
 (0)