De-mode comm, libc, priv, rt, sync, arc. Super easy.
This commit is contained in:
parent
4377802202
commit
958df4b003
@ -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);
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
// NB: transitionary, de-mode-ing.
|
||||||
|
#[forbid(deprecated_mode)];
|
||||||
|
#[forbid(deprecated_pattern)];
|
||||||
/*!
|
/*!
|
||||||
* Bindings for libc.
|
* Bindings for libc.
|
||||||
*
|
*
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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.
|
||||||
|
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user