De-mode comm, libc, priv, rt, sync, arc. Super easy.

This commit is contained in:
Ben Blum 2012-08-14 19:25:42 -04:00
parent 4377802202
commit 958df4b003
6 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,6 @@
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
/*! /*!
* Communication between tasks * Communication between tasks
* *
@ -162,7 +165,7 @@ fn chan<T: send>(p: port<T>) -> chan<T> {
* Sends data over a channel. The sent data is moved into the channel, * Sends data over a channel. The sent data is moved into the channel,
* whereupon the caller loses access to it. * whereupon the caller loses access to it.
*/ */
fn send<T: send>(ch: chan<T>, -data: T) { fn send<T: send>(ch: chan<T>, +data: T) {
let chan_t(p) = ch; let chan_t(p) = ch;
let data_ptr = ptr::addr_of(data) as *(); let data_ptr = ptr::addr_of(data) as *();
let res = rustrt::rust_port_id_send(p, data_ptr); let res = rustrt::rust_port_id_send(p, data_ptr);

View File

@ -1,3 +1,6 @@
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
/*! /*!
* Bindings for libc. * Bindings for libc.
* *

View File

@ -1,3 +1,7 @@
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
#[doc(hidden)]; #[doc(hidden)];
export chan_from_global_ptr, weaken_task; export chan_from_global_ptr, weaken_task;

View File

@ -1,3 +1,6 @@
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
//! Runtime calls emitted by the compiler. //! Runtime calls emitted by the compiler.
import libc::c_char; import libc::c_char;

View File

@ -1,3 +1,6 @@
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
/** /**
* Concurrency-enabled mechanisms for sharing mutable and/or immutable state * Concurrency-enabled mechanisms for sharing mutable and/or immutable state
* between tasks. * between tasks.

View File

@ -1,3 +1,6 @@
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
/** /**
* The concurrency primitives you know and love. * The concurrency primitives you know and love.
* *
@ -836,7 +839,7 @@ mod tests {
} }
} }
#[cfg(test)] #[cfg(test)]
fn test_rwlock_exclusion(x: ~rwlock, mode1: rwlock_mode, fn test_rwlock_exclusion(+x: ~rwlock, mode1: rwlock_mode,
mode2: rwlock_mode) { mode2: rwlock_mode) {
// Test mutual exclusion between readers and writers. Just like the // Test mutual exclusion between readers and writers. Just like the
// mutex mutual exclusion test, a ways above. // mutex mutual exclusion test, a ways above.
@ -881,7 +884,7 @@ mod tests {
test_rwlock_exclusion(~rwlock(), downgrade, downgrade); test_rwlock_exclusion(~rwlock(), downgrade, downgrade);
} }
#[cfg(test)] #[cfg(test)]
fn test_rwlock_handshake(x: ~rwlock, mode1: rwlock_mode, fn test_rwlock_handshake(+x: ~rwlock, mode1: rwlock_mode,
mode2: rwlock_mode, make_mode2_go_first: bool) { mode2: rwlock_mode, make_mode2_go_first: bool) {
// Much like sem_multi_resource. // Much like sem_multi_resource.
let x2 = ~x.clone(); let x2 = ~x.clone();