Skip to content

Commit beaaf31

Browse files
committed
---
yaml --- r: 23138 b: refs/heads/master c: 42825fb h: refs/heads/master v: v3
1 parent 3446f0d commit beaaf31

File tree

13 files changed

+320
-273
lines changed

13 files changed

+320
-273
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: 4808d59909b9350fcb557ec7e6f0ce21c505e803
2+
refs/heads/master: 42825fbea659b555e7624c5a4f2e0f5bc3264c24
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be

trunk/src/libcore/arc.rs

Lines changed: 0 additions & 219 deletions
This file was deleted.

trunk/src/libcore/core.rc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export float, f32, f64;
3939
export box, char, str, ptr, vec, at_vec, bool;
4040
export either, option, result, iter;
4141
export libc, os, io, run, rand, sys, unsafe, logging;
42-
export arc, comm, task, future, pipes, sync;
42+
export comm, task, future, pipes;
4343
export extfmt;
4444
// The test harness links against core, so don't include runtime in tests.
4545
// FIXME (#2861): Uncomment this after snapshot gets updated.
@@ -199,12 +199,10 @@ mod dlist_iter {
199199
mod send_map;
200200

201201
// Concurrency
202-
mod arc;
203202
mod comm;
204203
mod task;
205204
mod future;
206205
mod pipes;
207-
mod sync;
208206

209207
// Runtime and language-primitive support
210208

trunk/src/libcore/pipes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ impl<T: send> port<T>: selectable {
10641064
}
10651065

10661066
/// A channel that can be shared between many senders.
1067-
type shared_chan<T: send> = arc::exclusive<chan<T>>;
1067+
type shared_chan<T: send> = unsafe::exclusive<chan<T>>;
10681068

10691069
impl<T: send> shared_chan<T>: channel<T> {
10701070
fn send(+x: T) {
@@ -1088,7 +1088,7 @@ impl<T: send> shared_chan<T>: channel<T> {
10881088

10891089
/// Converts a `chan` into a `shared_chan`.
10901090
fn shared_chan<T:send>(+c: chan<T>) -> shared_chan<T> {
1091-
arc::exclusive(c)
1091+
unsafe::exclusive(c)
10921092
}
10931093

10941094
/// Receive a message from one of two endpoints.

trunk/src/libcore/sys.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,17 @@ export min_align_of;
77
export pref_align_of;
88
export refcount;
99
export log_str;
10-
export little_lock, methods;
1110
export shape_eq, shape_lt, shape_le;
1211

13-
import task::atomically;
14-
1512
enum type_desc = {
1613
size: uint,
1714
align: uint
1815
// Remaining fields not listed
1916
};
2017

21-
type rust_little_lock = *libc::c_void;
22-
2318
#[abi = "cdecl"]
2419
extern mod rustrt {
2520
pure fn shape_log_str(t: *sys::type_desc, data: *()) -> ~str;
26-
27-
fn rust_create_little_lock() -> rust_little_lock;
28-
fn rust_destroy_little_lock(lock: rust_little_lock);
29-
fn rust_lock_little_lock(lock: rust_little_lock);
30-
fn rust_unlock_little_lock(lock: rust_little_lock);
3121
}
3222

3323
#[abi = "rust-intrinsic"]
@@ -98,30 +88,6 @@ pure fn log_str<T>(t: T) -> ~str {
9888
}
9989
}
10090

101-
class little_lock {
102-
let l: rust_little_lock;
103-
new() {
104-
self.l = rustrt::rust_create_little_lock();
105-
}
106-
drop { rustrt::rust_destroy_little_lock(self.l); }
107-
}
108-
109-
impl little_lock {
110-
unsafe fn lock<T>(f: fn() -> T) -> T {
111-
class unlock {
112-
let l: rust_little_lock;
113-
new(l: rust_little_lock) { self.l = l; }
114-
drop { rustrt::rust_unlock_little_lock(self.l); }
115-
}
116-
117-
do atomically {
118-
rustrt::rust_lock_little_lock(self.l);
119-
let _r = unlock(self.l);
120-
f()
121-
}
122-
}
123-
}
124-
12591
#[cfg(test)]
12692
mod tests {
12793

0 commit comments

Comments
 (0)