Skip to content

Commit f3d837d

Browse files
---
yaml --- r: 143321 b: refs/heads/try2 c: 39b3a05 h: refs/heads/master i: 143319: a65d2d5 v: v3
1 parent c9c3219 commit f3d837d

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: d0b7515aedcaa161bb206e651a374d7ff27e52a7
8+
refs/heads/try2: 39b3a0561f06b1ea01a12d8fc3372334116a7833
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/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)