Use must_have_lock instead of private functions. (Issue #2700)
I hereby declare that messages sent from the same source arrive in order (Issue #2605) Removing FIXME, owned is the correct type here. (Issue #2704) Remove outdated FIXME (Issue #2703) Updating test for spawning native functions (Issue #2602) Removing bogus FIXME (Issue #2599)
This commit is contained in:
parent
1d6fb24b70
commit
26c11f7b50
@ -385,7 +385,6 @@ fn shift<T>(&v: [T]) -> T {
|
||||
let mut r <- *vv;
|
||||
|
||||
for uint::range(1u, ln) {|i|
|
||||
// FIXME (#2703): this isn't legal, per se...
|
||||
let r <- *ptr::offset(vv, i);
|
||||
push(v, r);
|
||||
}
|
||||
|
@ -891,9 +891,7 @@ rust_unlock_cond_lock(rust_cond_lock *lock) {
|
||||
extern "C" void
|
||||
rust_wait_cond_lock(rust_cond_lock *lock) {
|
||||
rust_task *task = rust_get_current_task();
|
||||
#ifdef DEBUG_LOCKS
|
||||
assert(lock->lock.lock_held_by_current_thread());
|
||||
#endif
|
||||
lock->lock.must_have_lock();
|
||||
assert(NULL == lock->waiting);
|
||||
lock->waiting = task;
|
||||
task->block(lock, "waiting for signal");
|
||||
@ -905,9 +903,7 @@ rust_wait_cond_lock(rust_cond_lock *lock) {
|
||||
|
||||
extern "C" bool
|
||||
rust_signal_cond_lock(rust_cond_lock *lock) {
|
||||
#ifdef DEBUG_LOCKS
|
||||
assert(lock->lock.lock_held_by_current_thread());
|
||||
#endif
|
||||
lock->lock.must_have_lock();
|
||||
if(NULL == lock->waiting) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1797,7 +1797,6 @@ fn trans_assign_op(bcx: block, ex: @ast::expr, op: ast::binop,
|
||||
arg_exprs([src]), save_in(target));
|
||||
|
||||
ret move_val(bcx, DROP_EXISTING, lhs_res.val,
|
||||
// FIXME (#2704): should kind be owned?
|
||||
{bcx: bcx, val: target, kind: owned},
|
||||
dty);
|
||||
}
|
||||
|
@ -77,7 +77,6 @@ mod map_reduce {
|
||||
|
||||
type putter<K: send, V: send> = fn(K, V);
|
||||
|
||||
// FIXME: the first K1 parameter should probably be a - (#2599)
|
||||
type mapper<K1: send, K2: send, V: send> = fn~(K1, putter<K2, V>);
|
||||
|
||||
type getter<V: send> = fn() -> option<V>;
|
||||
|
@ -1,9 +1,3 @@
|
||||
// xfail-test
|
||||
// FIXME: This test is no longer testing what it was intended to. It should
|
||||
// be testing spawning of a native function, but is actually testing
|
||||
// spawning some other function, then executing a native function.
|
||||
// #2602
|
||||
|
||||
/*
|
||||
A reduced test case for Issue #506, provided by Rob Arnold.
|
||||
*/
|
||||
@ -13,9 +7,7 @@
|
||||
|
||||
#[abi = "cdecl"]
|
||||
native mod rustrt {
|
||||
fn task_yield();
|
||||
fn rust_task_allow_kill();
|
||||
}
|
||||
|
||||
fn yield_wrap(&&_arg: ()) { rustrt::task_yield(); }
|
||||
|
||||
fn main() { task::spawn((), yield_wrap); }
|
||||
fn main() { task::spawn(rustrt::rust_task_allow_kill); }
|
||||
|
@ -52,8 +52,6 @@ enum t { tag1, tag2(int), tag3(int, u8, char), }
|
||||
send(ch, tag1);
|
||||
send(ch, tag2(10));
|
||||
send(ch, tag3(10, 11u8, 'A'));
|
||||
// FIXME: Do port semantics really guarantee these happen in order?
|
||||
// (#2605)
|
||||
let mut t1: t;
|
||||
t1 = recv(po);
|
||||
assert (t1 == tag1);
|
||||
|
Loading…
Reference in New Issue
Block a user