Skip to content

Commit 96507ee

Browse files
committed
---
yaml --- r: 140767 b: refs/heads/try2 c: fa1d047 h: refs/heads/master i: 140765: 8edf1f0 140763: f5f0e94 140759: a456d59 140751: 3094429 140735: 9cd40f6 v: v3
1 parent c6ca8ba commit 96507ee

File tree

12 files changed

+314
-296
lines changed

12 files changed

+314
-296
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 4f446244155984a6674f69ab6e9d49704ab0c20d
8+
refs/heads/try2: fa1d0477edab6fa800eabd951d88f6bd12fbcfff
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libcore/comm.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ use option::{Option, Some, None};
1919
use uint;
2020
use unstable;
2121
use vec;
22-
use unstable::Exclusive;
2322
use util::replace;
23+
use unstable::sync::{Exclusive, exclusive};
2424

2525
use pipes::{recv, try_recv, wait_many, peek, PacketHeader};
2626

@@ -304,7 +304,7 @@ pub struct SharedChan<T> {
304304
impl<T: Owned> SharedChan<T> {
305305
/// Converts a `chan` into a `shared_chan`.
306306
pub fn new(c: Chan<T>) -> SharedChan<T> {
307-
SharedChan { ch: unstable::exclusive(c) }
307+
SharedChan { ch: exclusive(c) }
308308
}
309309
}
310310

branches/try2/src/libcore/os.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ FIXME #4726: It would probably be appropriate to make this a real global
152152
*/
153153
fn with_env_lock<T>(f: &fn() -> T) -> T {
154154
use unstable::global::global_data_clone_create;
155-
use unstable::{Exclusive, exclusive};
155+
use unstable::sync::{Exclusive, exclusive};
156156

157157
struct SharedValue(());
158158
type ValueMutex = Exclusive<SharedValue>;
@@ -860,7 +860,7 @@ pub fn change_dir(p: &Path) -> bool {
860860
/// is otherwise unsuccessful.
861861
pub fn change_dir_locked(p: &Path, action: &fn()) -> bool {
862862
use unstable::global::global_data_clone_create;
863-
use unstable::{Exclusive, exclusive};
863+
use unstable::sync::{Exclusive, exclusive};
864864
865865
fn key(_: Exclusive<()>) { }
866866

branches/try2/src/libcore/task/spawn.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ use task::{ExistingScheduler, SchedulerHandle};
9090
use task::unkillable;
9191
use uint;
9292
use util;
93+
use unstable::sync::{Exclusive, exclusive};
9394

9495
#[cfg(test)] use task::default_task_opts;
9596

@@ -128,7 +129,7 @@ struct TaskGroupData {
128129
// tasks in this group.
129130
descendants: TaskSet,
130131
}
131-
type TaskGroupArc = unstable::Exclusive<Option<TaskGroupData>>;
132+
type TaskGroupArc = Exclusive<Option<TaskGroupData>>;
132133

133134
type TaskGroupInner<'self> = &'self mut Option<TaskGroupData>;
134135

@@ -158,7 +159,7 @@ struct AncestorNode {
158159
ancestors: AncestorList,
159160
}
160161

161-
struct AncestorList(Option<unstable::Exclusive<AncestorNode>>);
162+
struct AncestorList(Option<Exclusive<AncestorNode>>);
162163

163164
// Accessors for taskgroup arcs and ancestor arcs that wrap the unsafety.
164165
#[inline(always)]
@@ -167,7 +168,7 @@ fn access_group<U>(x: &TaskGroupArc, blk: &fn(TaskGroupInner) -> U) -> U {
167168
}
168169

169170
#[inline(always)]
170-
fn access_ancestors<U>(x: &unstable::Exclusive<AncestorNode>,
171+
fn access_ancestors<U>(x: &Exclusive<AncestorNode>,
171172
blk: &fn(x: &mut AncestorNode) -> U) -> U {
172173
x.with(blk)
173174
}
@@ -479,7 +480,7 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
479480
// here.
480481
let mut members = new_taskset();
481482
taskset_insert(&mut members, spawner);
482-
let tasks = unstable::exclusive(Some(TaskGroupData {
483+
let tasks = exclusive(Some(TaskGroupData {
483484
members: members,
484485
descendants: new_taskset(),
485486
}));
@@ -508,7 +509,7 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
508509
(g, a, spawner_group.is_main)
509510
} else {
510511
// Child is in a separate group from spawner.
511-
let g = unstable::exclusive(Some(TaskGroupData {
512+
let g = exclusive(Some(TaskGroupData {
512513
members: new_taskset(),
513514
descendants: new_taskset(),
514515
}));
@@ -528,7 +529,7 @@ fn gen_child_taskgroup(linked: bool, supervised: bool)
528529
};
529530
assert!(new_generation < uint::max_value);
530531
// Build a new node in the ancestor list.
531-
AncestorList(Some(unstable::exclusive(AncestorNode {
532+
AncestorList(Some(exclusive(AncestorNode {
532533
generation: new_generation,
533534
parent_group: Some(spawner_group.tasks.clone()),
534535
ancestors: old_ancestors,

branches/try2/src/libcore/unstable/global.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ use kinds::Owned;
3131
use libc::{c_void};
3232
use option::{Option, Some, None};
3333
use ops::Drop;
34-
use unstable::{Exclusive, exclusive};
34+
use unstable::sync::{Exclusive, exclusive};
3535
use unstable::at_exit::at_exit;
3636
use unstable::intrinsics::atomic_cxchg;
3737
use hashmap::HashMap;
3838
use sys::Closure;
3939

40-
#[cfg(test)] use unstable::{SharedMutableState, shared_mutable_state};
41-
#[cfg(test)] use unstable::get_shared_immutable_state;
40+
#[cfg(test)] use unstable::sync::{SharedMutableState, shared_mutable_state};
41+
#[cfg(test)] use unstable::sync::get_shared_immutable_state;
4242
#[cfg(test)] use task::spawn;
4343
#[cfg(test)] use uint;
4444

0 commit comments

Comments
 (0)