diff options
| author | bors <bors@rust-lang.org> | 2014-04-08 08:16:52 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-04-08 08:16:52 -0700 |
| commit | 02f51211eddbbaf6c6e02cecc78957ce1d5b4600 (patch) | |
| tree | d7c5f1dbc4a37e473577b39abd56e2f1df433069 /src/libstd/rt | |
| parent | e415c25bcd81dc1f9a5a3d25d9b48ed2d545336b (diff) | |
| parent | da8d4fddc6445c19ad434a1f104c1c310c6c3c34 (diff) | |
| download | rust-02f51211eddbbaf6c6e02cecc78957ce1d5b4600.tar.gz rust-02f51211eddbbaf6c6e02cecc78957ce1d5b4600.zip | |
auto merge of #13397 : alexcrichton/rust/rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/at_exit_imp.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/local_ptr.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/mod.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/rtio.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/task.rs | 4 | ||||
| -rw-r--r-- | src/libstd/rt/thread.rs | 12 |
6 files changed, 14 insertions, 14 deletions
diff --git a/src/libstd/rt/at_exit_imp.rs b/src/libstd/rt/at_exit_imp.rs index a5bfaf190d9..4be9c8a84ac 100644 --- a/src/libstd/rt/at_exit_imp.rs +++ b/src/libstd/rt/at_exit_imp.rs @@ -21,7 +21,7 @@ use ptr::RawPtr; use unstable::sync::Exclusive; use slice::OwnedVector; -type Queue = Exclusive<~[proc:Send()]>; +type Queue = Exclusive<~[proc():Send]>; // You'll note that these variables are *not* atomic, and this is done on // purpose. This module is designed to have init() called *once* in a @@ -40,7 +40,7 @@ pub fn init() { } } -pub fn push(f: proc:Send()) { +pub fn push(f: proc():Send) { unsafe { rtassert!(!RUNNING); rtassert!(!QUEUE.is_null()); diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs index e486932ac3c..e3f64f40c0d 100644 --- a/src/libstd/rt/local_ptr.rs +++ b/src/libstd/rt/local_ptr.rs @@ -12,7 +12,7 @@ //! //! The runtime will use this for storing ~Task. //! -//! XXX: Add runtime checks for usage of inconsistent pointer types. +//! FIXME: Add runtime checks for usage of inconsistent pointer types. //! and for overwriting an existing pointer. #![allow(dead_code)] diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 5e2f8efd2e3..f4a4fd9ab2e 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -157,7 +157,7 @@ pub trait Runtime { // Miscellaneous calls which are very different depending on what context // you're in. - fn spawn_sibling(~self, cur_task: ~Task, opts: TaskOpts, f: proc:Send()); + fn spawn_sibling(~self, cur_task: ~Task, opts: TaskOpts, f: proc():Send); fn local_io<'a>(&'a mut self) -> Option<rtio::LocalIo<'a>>; /// The (low, high) edges of the current stack. fn stack_bounds(&self) -> (uint, uint); // (lo, hi) @@ -196,7 +196,7 @@ pub fn init(argc: int, argv: **u8) { /// /// It is forbidden for procedures to register more `at_exit` handlers when they /// are running, and doing so will lead to a process abort. -pub fn at_exit(f: proc:Send()) { +pub fn at_exit(f: proc():Send) { at_exit_imp::push(f); } diff --git a/src/libstd/rt/rtio.rs b/src/libstd/rt/rtio.rs index 54708d19a1b..1750e685627 100644 --- a/src/libstd/rt/rtio.rs +++ b/src/libstd/rt/rtio.rs @@ -36,7 +36,7 @@ pub trait Callback { pub trait EventLoop { fn run(&mut self); - fn callback(&mut self, arg: proc:Send()); + fn callback(&mut self, arg: proc():Send); fn pausable_idle_callback(&mut self, ~Callback:Send) -> ~PausableIdleCallback:Send; fn remote_callback(&mut self, ~Callback:Send) -> ~RemoteCallback:Send; diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index fc266df11e4..bae20d3bb9b 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -70,7 +70,7 @@ pub enum BlockedTask { pub enum DeathAction { /// Action to be done with the exit code. If set, also makes the task wait /// until all its watched children exit before collecting the status. - Execute(proc:Send(TaskResult)), + Execute(proc(TaskResult):Send), /// A channel to send the result of the task on when the task exits SendMessage(Sender<TaskResult>), } @@ -236,7 +236,7 @@ impl Task { /// Spawns a sibling to this task. The newly spawned task is configured with /// the `opts` structure and will run `f` as the body of its code. - pub fn spawn_sibling(mut ~self, opts: TaskOpts, f: proc:Send()) { + pub fn spawn_sibling(mut ~self, opts: TaskOpts, f: proc():Send) { let ops = self.imp.take_unwrap(); ops.spawn_sibling(self, opts, f) } diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index c35ffac064c..b1c7c5aab02 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -68,13 +68,13 @@ impl Thread<()> { /// to finish executing. This means that even if `join` is not explicitly /// called, when the `Thread` falls out of scope its destructor will block /// waiting for the OS thread. - pub fn start<T: Send>(main: proc:Send() -> T) -> Thread<T> { + pub fn start<T: Send>(main: proc():Send -> T) -> Thread<T> { Thread::start_stack(DEFAULT_STACK_SIZE, main) } /// Performs the same functionality as `start`, but specifies an explicit /// stack size for the new thread. - pub fn start_stack<T: Send>(stack: uint, main: proc:Send() -> T) -> Thread<T> { + pub fn start_stack<T: Send>(stack: uint, main: proc():Send -> T) -> Thread<T> { // We need the address of the packet to fill in to be stable so when // `main` fills it in it's still valid, so allocate an extra ~ box to do @@ -99,13 +99,13 @@ impl Thread<()> { /// This corresponds to creating threads in the 'detached' state on unix /// systems. Note that platforms may not keep the main program alive even if /// there are detached thread still running around. - pub fn spawn(main: proc:Send()) { + pub fn spawn(main: proc():Send) { Thread::spawn_stack(DEFAULT_STACK_SIZE, main) } /// Performs the same functionality as `spawn`, but explicitly specifies a /// stack size for the new thread. - pub fn spawn_stack(stack: uint, main: proc:Send()) { + pub fn spawn_stack(stack: uint, main: proc():Send) { unsafe { let handle = imp::create(stack, ~main); imp::detach(handle); @@ -156,7 +156,7 @@ mod imp { pub type rust_thread = HANDLE; pub type rust_thread_return = DWORD; - pub unsafe fn create(stack: uint, p: ~proc:Send()) -> rust_thread { + pub unsafe fn create(stack: uint, p: ~proc():Send) -> rust_thread { let arg: *mut libc::c_void = cast::transmute(p); // FIXME On UNIX, we guard against stack sizes that are too small but // that's because pthreads enforces that stacks are at least @@ -215,7 +215,7 @@ mod imp { pub type rust_thread = libc::pthread_t; pub type rust_thread_return = *u8; - pub unsafe fn create(stack: uint, p: ~proc:Send()) -> rust_thread { + pub unsafe fn create(stack: uint, p: ~proc():Send) -> rust_thread { let mut native: libc::pthread_t = mem::uninit(); let mut attr: libc::pthread_attr_t = mem::uninit(); assert_eq!(pthread_attr_init(&mut attr), 0); |
