diff options
Diffstat (limited to 'src/libstd/rt/thread.rs')
| -rw-r--r-- | src/libstd/rt/thread.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index 5e535d994f9..e364e5a6603 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -35,7 +35,7 @@ static DEFAULT_STACK_SIZE: libc::size_t = 1024*1024; impl Thread { - pub fn start(main: ~fn()) -> Thread { + pub fn start(main: proc()) -> Thread { // This is the starting point of rust os threads. The first thing we do // is make sure that we don't trigger __morestack (also why this has a // no_split_stack annotation), and then we extract the main function @@ -45,7 +45,7 @@ impl Thread { use rt::context; unsafe { context::record_stack_bounds(0, uint::max_value); - let f: ~~fn() = cast::transmute(trampoline); + let f: ~proc() = cast::transmute(trampoline); (*f)(); } unsafe { cast::transmute(0) } @@ -67,7 +67,7 @@ impl Thread { #[cfg(windows)] fn native_thread_create(thread_start: extern "C" fn(*libc::c_void) -> rust_thread_return, - tramp: ~~fn()) -> rust_thread { + tramp: ~proc()) -> rust_thread { unsafe { let ptr: *mut libc::c_void = cast::transmute(tramp); CreateThread(ptr::mut_null(), DEFAULT_STACK_SIZE, thread_start, ptr, 0, ptr::mut_null()) @@ -82,7 +82,7 @@ fn native_thread_join(native: rust_thread) { #[cfg(unix)] fn native_thread_create(thread_start: extern "C" fn(*libc::c_void) -> rust_thread_return, - tramp: ~~fn()) -> rust_thread { + tramp: ~proc()) -> rust_thread { use unstable::intrinsics; let mut native: libc::pthread_t = unsafe { intrinsics::uninit() }; |
