Skip to content

Commit 924b8d1

Browse files
committed
---
yaml --- r: 32175 b: refs/heads/dist-snap c: edd6d9e h: refs/heads/master i: 32173: eafcb36 32171: 27ee71a 32167: 486597d 32159: cc636ce v: v3
1 parent 0f387af commit 924b8d1

File tree

4 files changed

+138
-136
lines changed

4 files changed

+138
-136
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: cf1d2a7fef9a1962d9883eead2c67bfa391d8aae
10+
refs/heads/dist-snap: edd6d9ea37f55cce3298deb6ef271cb7d03a824a
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libstd/arc.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@ import unsafe::{SharedMutableState, shared_mutable_state,
1010
clone_shared_mutable_state, unwrap_shared_mutable_state,
1111
get_shared_mutable_state, get_shared_immutable_state};
1212
import sync;
13-
import sync::{mutex, mutex_with_condvars, rwlock, rwlock_with_condvars};
13+
import sync::{Mutex, mutex, mutex_with_condvars,
14+
RWlock, rwlock, rwlock_with_condvars};
1415

1516
export arc, clone, get;
1617
export condvar, mutex_arc, mutex_arc_with_condvars, unwrap_mutex_arc;
1718
export rw_arc, rw_arc_with_condvars, rw_write_mode, rw_read_mode;
1819
export unwrap_rw_arc;
1920

2021
/// As sync::condvar, a mechanism for unlock-and-descheduling and signalling.
21-
struct condvar { is_mutex: bool; failed: &mut bool; cond: &sync::condvar; }
22+
struct condvar { is_mutex: bool; failed: &mut bool; cond: &sync::Condvar; }
2223

2324
impl &condvar {
2425
/// Atomically exit the associated ARC and block until a signal is sent.
@@ -113,7 +114,7 @@ fn unwrap<T: const send>(+rc: arc<T>) -> T {
113114
****************************************************************************/
114115

115116
#[doc(hidden)]
116-
struct mutex_arc_inner<T: send> { lock: mutex; failed: bool; data: T; }
117+
struct mutex_arc_inner<T: send> { lock: Mutex; failed: bool; data: T; }
117118
/// An ARC with mutable data protected by a blocking mutex.
118119
struct mutex_arc<T: send> { x: SharedMutableState<mutex_arc_inner<T>>; }
119120

@@ -234,7 +235,7 @@ struct poison_on_fail {
234235
****************************************************************************/
235236
236237
#[doc(hidden)]
237-
struct rw_arc_inner<T: const send> { lock: rwlock; failed: bool; data: T; }
238+
struct rw_arc_inner<T: const send> { lock: RWlock; failed: bool; data: T; }
238239
/**
239240
* A dual-mode ARC protected by a reader-writer lock. The data can be accessed
240241
* mutably or immutably, and immutably-accessing tasks may run concurrently.
@@ -383,17 +384,17 @@ fn unwrap_rw_arc<T: const send>(+arc: rw_arc<T>) -> T {
383384
// lock it. This wraps the unsafety, with the justification that the 'lock'
384385
// field is never overwritten; only 'failed' and 'data'.
385386
#[doc(hidden)]
386-
fn borrow_rwlock<T: const send>(state: &r/mut rw_arc_inner<T>) -> &r/rwlock {
387+
fn borrow_rwlock<T: const send>(state: &r/mut rw_arc_inner<T>) -> &r/RWlock {
387388
unsafe { unsafe::transmute_immut(&mut state.lock) }
388389
}
389390
390391
// FIXME (#3154) ice with struct/&<T> prevents these from being structs.
391392
392393
/// The "write permission" token used for rw_arc.write_downgrade().
393394
enum rw_write_mode<T: const send> =
394-
(&mut T, sync::rwlock_write_mode, poison_on_fail);
395+
(&mut T, sync::RWlockWriteMode, poison_on_fail);
395396
/// The "read permission" token used for rw_arc.write_downgrade().
396-
enum rw_read_mode<T:const send> = (&T, sync::rwlock_read_mode);
397+
enum rw_read_mode<T:const send> = (&T, sync::RWlockReadMode);
397398

398399
impl<T: const send> &rw_write_mode<T> {
399400
/// Access the pre-downgrade rw_arc in write mode.

branches/dist-snap/src/libstd/std.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ mod cell;
5050

5151
// Concurrency
5252

53+
#[warn(non_camel_case_types)]
5354
mod sync;
5455
mod arc;
5556
mod comm;

0 commit comments

Comments
 (0)