Skip to content

Commit

Permalink
Fix nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstewartgallus committed Jul 28, 2013
1 parent d0b7515 commit 39b3a05
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
17 changes: 9 additions & 8 deletions src/libextra/arc.rs
Expand Up @@ -182,11 +182,11 @@ impl<T:Send> MutexArc<T> {
* Create a mutex-protected Arc with the supplied data and a specified number
* of condvars (as sync::Mutex::new_with_condvars).
*/
pub fn new_with_condvars(user_data: T,
num_condvars: uint) -> MutexArc<T> {
let data =
MutexArcInner { lock: Mutex::new_with_condvars(num_condvars),
failed: false, data: user_data };
pub fn new_with_condvars(user_data: T, num_condvars: uint) -> MutexArc<T> {
let data = MutexArcInner {
lock: Mutex::new_with_condvars(num_condvars),
failed: false, data: user_data
};
MutexArc { x: UnsafeAtomicRcBox::new(data) }
}

Expand Down Expand Up @@ -333,9 +333,10 @@ impl<T:Freeze + Send> RWArc<T> {
* of condvars (as sync::RWLock::new_with_condvars).
*/
pub fn new_with_condvars(user_data: T, num_condvars: uint) -> RWArc<T> {
let data =
RWArcInner { lock: RWLock::new_with_condvars(num_condvars),
failed: false, data: user_data };
let data = RWArcInner {
lock: RWLock::new_with_condvars(num_condvars),
failed: false, data: user_data
};
RWArc { x: UnsafeAtomicRcBox::new(data), }
}

Expand Down
16 changes: 7 additions & 9 deletions src/libstd/unstable/sync.rs
Expand Up @@ -236,13 +236,11 @@ impl<T> Drop for UnsafeAtomicRcBox<T>{

/****************************************************************************/

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

pub struct LittleLock {
l: *RTLittleLock,
l: rust_little_lock,
}

impl Drop for LittleLock {
Expand Down Expand Up @@ -351,10 +349,10 @@ impl<T:Send> Exclusive<T> {
}

extern {
fn rust_create_little_lock() -> *RTLittleLock;
fn rust_destroy_little_lock(lock: *RTLittleLock);
fn rust_lock_little_lock(lock: *RTLittleLock);
fn rust_unlock_little_lock(lock: *RTLittleLock);
fn rust_create_little_lock() -> rust_little_lock;
fn rust_destroy_little_lock(lock: rust_little_lock);
fn rust_lock_little_lock(lock: rust_little_lock);
fn rust_unlock_little_lock(lock: rust_little_lock);
}

#[cfg(test)]
Expand Down

5 comments on commit 39b3a05

@bors
Copy link
Contributor

@bors bors commented on 39b3a05 Jul 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from bblum
at mstewartgallus@39b3a05

@bors
Copy link
Contributor

@bors bors commented on 39b3a05 Jul 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging sstewartgallus/rust/rename_arc = 39b3a05 into auto

@bors
Copy link
Contributor

@bors bors commented on 39b3a05 Jul 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sstewartgallus/rust/rename_arc = 39b3a05 merged ok, testing candidate = 9325535

@bors
Copy link
Contributor

@bors bors commented on 39b3a05 Jul 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 9325535

Please sign in to comment.