about summary refs log tree commit diff
path: root/src/libgreen/stack.rs
AgeCommit message (Collapse)AuthorLines
2014-11-20Remove libgreenAaron Turon-215/+0
With runtime removal complete, there is no longer any reason to provide libgreen. [breaking-change]
2014-11-20Rename remaining Failures to PanicSubhash Bhushan-1/+1
2014-11-17Fix fallout from coercion removalNick Cameron-2/+2
2014-10-29Rename fail! to panic!Steve Klabnik-4/+4
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-24Print stack overflow messages for Windows, Linux and OS XJohn Kåre Alsaker-0/+5
Fixes #17562
2014-10-10Register new snapshotsAlex Crichton-3/+3
Also convert a number of `static mut` to just a plain old `static` and remove some unsafe blocks.
2014-09-30Fix libgreenSteven Fackler-3/+2
2014-08-20Stage #[repr(packed)] in std::rtCorey Richardson-1/+2
2014-08-20libgreen: use FFI-safe typesCorey Richardson-1/+1
2014-08-04stabilize atomics (now atomic)Aaron Turon-4/+4
This commit stabilizes the `std::sync::atomics` module, renaming it to `std::sync::atomic` to match library precedent elsewhere, and tightening up behavior around incorrect memory ordering annotations. The vast majority of the module is now `stable`. However, the `AtomicOption` type has been deprecated, since it is essentially unused and is not truly a primitive atomic type. It will eventually be replaced by a higher-level abstraction like MVars. Due to deprecations, this is a: [breaking-change]
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-1/+5
Not included are two required patches: * LLVM: segmented stack support for DragonFly [1] * jemalloc: simple configure patches [1]: http://reviews.llvm.org/D4705
2014-07-11std: Move MemoryMap fields to methodsAlex Crichton-11/+13
If modified, you can safely unmap arbitrary memory. These fields are not intended to be modified, so read-only accessors are the only ones that are provided. Closes #15478
2014-07-03Fix spelling errors.Joseph Crail-1/+1
2014-06-28Rename all raw pointers as necessaryAlex Crichton-6/+6
2014-06-18fix signatures of mmap-related functions from libcDaniel Micay-1/+1
2014-06-06libs: Fix miscellaneous fallout of librustrtAlex Crichton-2/+18
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-2/+2
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-04-10green: de-~[].Huon Wilson-2/+2
2014-04-04Fix fallout from std::libc separationCorey Richardson-1/+1
2014-03-31green: Switch field privacy as necessaryAlex Crichton-4/+4
2014-02-24std: make .swap_remove return Option<T>.Huon Wilson-1/+1
This is one of the last raw "indexing" method on vectors that returns `T` instead of the Option.
2014-02-13Fix a bug where cached stacks weren't re-usedAlex Crichton-2/+32
The condition was the wrong direction and it also didn't take equality into account. Tests were added for both cases. For the small benchmark of `task::try(proc() {}).unwrap()`, this takes the iteration time on OSX from 15119 ns/iter to 6179 ns/iter (timed with RUST_THREADS=1) cc #11389
2014-01-26Removed all instances of XXX in preparation for relaxing of FIXME ruleSalem Talha-2/+2
2014-01-26Bring in the line-length policeAlex Crichton-33/+35
2014-01-24Fix zero-sized memory mappingCorey Richardson-2/+14
2014-01-24Use `mmap` to map in task stacks and guard pageCorey Richardson-26/+95
Also implement caching of stacks.
2014-01-04Don't allow newtype structs to be dereferenced. #6246Brian Anderson-2/+2
2013-12-24green: Rip the bandaid off, introduce libgreenAlex Crichton-0/+75
This extracts everything related to green scheduling from libstd and introduces a new libgreen crate. This mostly involves deleting most of std::rt and moving it to libgreen. Along with the movement of code, this commit rearchitects many functions in the scheduler in order to adapt to the fact that Local::take now *only* works on a Task, not a scheduler. This mostly just involved threading the current green task through in a few locations, but there were one or two spots where things got hairy. There are a few repercussions of this commit: * tube/rc have been removed (the runtime implementation of rc) * There is no longer a "single threaded" spawning mode for tasks. This is now encompassed by 1:1 scheduling + communication. Convenience methods have been introduced that are specific to libgreen to assist in the spawning of pools of schedulers.