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
*
@ -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,
* 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 data_ptr = ptr::addr_of(data) as *();
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.
*

View File

@ -1,3 +1,7 @@
// NB: transitionary, de-mode-ing.
#[forbid(deprecated_mode)];
#[forbid(deprecated_pattern)];
#[doc(hidden)];
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.
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
* 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.
*
@ -836,7 +839,7 @@ mod tests {
}
}
#[cfg(test)]
fn test_rwlock_exclusion(x: ~rwlock, mode1: rwlock_mode,
fn test_rwlock_exclusion(+x: ~rwlock, mode1: rwlock_mode,
mode2: rwlock_mode) {
// Test mutual exclusion between readers and writers. Just like the
// mutex mutual exclusion test, a ways above.
@ -881,7 +884,7 @@ mod tests {
test_rwlock_exclusion(~rwlock(), downgrade, downgrade);
}
#[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) {
// Much like sem_multi_resource.
let x2 = ~x.clone();