2011-11-08 13:09:40 -06:00
|
|
|
// 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.
|
|
|
|
|
2011-06-20 13:00:46 -05:00
|
|
|
/*
|
|
|
|
A reduced test case for Issue #506, provided by Rob Arnold.
|
|
|
|
*/
|
|
|
|
|
2011-08-13 17:20:11 -05:00
|
|
|
use std;
|
2011-12-13 18:25:51 -06:00
|
|
|
import task;
|
2011-08-13 17:20:11 -05:00
|
|
|
|
2011-11-16 22:49:38 -06:00
|
|
|
#[abi = "cdecl"]
|
|
|
|
native mod rustrt {
|
2011-07-27 07:19:39 -05:00
|
|
|
fn task_yield();
|
2011-06-20 13:00:46 -05:00
|
|
|
}
|
|
|
|
|
2011-10-23 09:21:40 -05:00
|
|
|
fn yield_wrap(&&_arg: ()) { rustrt::task_yield(); }
|
2011-06-20 13:00:46 -05:00
|
|
|
|
2011-10-13 23:23:07 -05:00
|
|
|
fn main() { task::spawn((), yield_wrap); }
|