Skip to content

Commit 448def0

Browse files
---
yaml --- r: 64788 b: refs/heads/snap-stage3 c: 39b3a05 h: refs/heads/master v: v3
1 parent e1bbdf5 commit 448def0

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: d0b7515aedcaa161bb206e651a374d7ff27e52a7
4+
refs/heads/snap-stage3: 39b3a0561f06b1ea01a12d8fc3372334116a7833
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/arc.rs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ impl<T:Send> MutexArc<T> {
182182
* Create a mutex-protected Arc with the supplied data and a specified number
183183
* of condvars (as sync::Mutex::new_with_condvars).
184184
*/
185-
pub fn new_with_condvars(user_data: T,
186-
num_condvars: uint) -> MutexArc<T> {
187-
let data =
188-
MutexArcInner { lock: Mutex::new_with_condvars(num_condvars),
189-
failed: false, data: user_data };
185+
pub fn new_with_condvars(user_data: T, num_condvars: uint) -> MutexArc<T> {
186+
let data = MutexArcInner {
187+
lock: Mutex::new_with_condvars(num_condvars),
188+
failed: false, data: user_data
189+
};
190190
MutexArc { x: UnsafeAtomicRcBox::new(data) }
191191
}
192192

@@ -333,9 +333,10 @@ impl<T:Freeze + Send> RWArc<T> {
333333
* of condvars (as sync::RWLock::new_with_condvars).
334334
*/
335335
pub fn new_with_condvars(user_data: T, num_condvars: uint) -> RWArc<T> {
336-
let data =
337-
RWArcInner { lock: RWLock::new_with_condvars(num_condvars),
338-
failed: false, data: user_data };
336+
let data = RWArcInner {
337+
lock: RWLock::new_with_condvars(num_condvars),
338+
failed: false, data: user_data
339+
};
339340
RWArc { x: UnsafeAtomicRcBox::new(data), }
340341
}
341342

branches/snap-stage3/src/libstd/unstable/sync.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,11 @@ impl<T> Drop for UnsafeAtomicRcBox<T>{
236236

237237
/****************************************************************************/
238238

239-
enum RTLittleLock {
240-
// We know nothing about the runtime's representation of the
241-
// little lock so we leave the definition empty.
242-
}
239+
#[allow(non_camel_case_types)] // runtime type
240+
type rust_little_lock = *libc::c_void;
243241

244242
pub struct LittleLock {
245-
l: *RTLittleLock,
243+
l: rust_little_lock,
246244
}
247245

248246
impl Drop for LittleLock {
@@ -351,10 +349,10 @@ impl<T:Send> Exclusive<T> {
351349
}
352350

353351
extern {
354-
fn rust_create_little_lock() -> *RTLittleLock;
355-
fn rust_destroy_little_lock(lock: *RTLittleLock);
356-
fn rust_lock_little_lock(lock: *RTLittleLock);
357-
fn rust_unlock_little_lock(lock: *RTLittleLock);
352+
fn rust_create_little_lock() -> rust_little_lock;
353+
fn rust_destroy_little_lock(lock: rust_little_lock);
354+
fn rust_lock_little_lock(lock: rust_little_lock);
355+
fn rust_unlock_little_lock(lock: rust_little_lock);
358356
}
359357

360358
#[cfg(test)]

0 commit comments

Comments
 (0)