Skip to content

Commit 9ee7b31

Browse files
olsonjefferybrson
authored andcommitted
std: cleanup in sync.rs for things missed in last rebase
1 parent 2f32c0d commit 9ee7b31

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/libstd/sync.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,11 @@ impl<Q: Send> &Sem<Q> {
9696
state.count -= 1;
9797
if state.count < 0 {
9898
// Create waiter nobe.
99-
let (signal_end, wait_end) = pipes::oneshot();
99+
let (SignalEnd, WaitEnd) = pipes::oneshot();
100100
// Tell outer scope we need to block.
101-
waiter_nobe = Some(wait_end);
101+
waiter_nobe = Some(WaitEnd);
102102
// Enqueue ourself.
103-
state.waiters.tail.send(signal_end);
103+
state.waiters.tail.send(SignalEnd);
104104
}
105105
}
106106
}
@@ -202,9 +202,9 @@ impl &Condvar {
202202
*/
203203
fn wait_on(condvar_id: uint) {
204204
// Create waiter nobe.
205-
let (signal_end, wait_end) = pipes::oneshot();
206-
let mut wait_end = Some(wait_end);
207-
let mut signal_end = Some(signal_end);
205+
let (SignalEnd, WaitEnd) = pipes::oneshot();
206+
let mut WaitEnd = Some(WaitEnd);
207+
let mut SignalEnd = Some(SignalEnd);
208208
let mut reacquire = None;
209209
let mut out_of_bounds = None;
210210
unsafe {
@@ -218,8 +218,8 @@ impl &Condvar {
218218
signal_waitqueue(&state.waiters);
219219
}
220220
// Enqueue ourself to be woken up by a signaller.
221-
let signal_end = option::swap_unwrap(&mut signal_end);
222-
state.blocked[condvar_id].tail.send(signal_end);
221+
let SignalEnd = option::swap_unwrap(&mut SignalEnd);
222+
state.blocked[condvar_id].tail.send(SignalEnd);
223223
} else {
224224
out_of_bounds = Some(vec::len(state.blocked));
225225
}
@@ -238,7 +238,7 @@ impl &Condvar {
238238
// Unconditionally "block". (Might not actually block if a
239239
// signaller already sent -- I mean 'unconditionally' in contrast
240240
// with acquire().)
241-
let _ = pipes::recv_one(option::swap_unwrap(&mut wait_end));
241+
let _ = pipes::recv_one(option::swap_unwrap(&mut WaitEnd));
242242
}
243243

244244
// This is needed for a failing condition variable to reacquire the

0 commit comments

Comments
 (0)