Commit Graph

28 Commits

Author SHA1 Message Date
edef f21b8dc936 Update the license headers for MIT/Apache 2016-08-20 23:45:01 +02:00
whitequark b79e7c0a9b Rename Stack::top() to Stack::base(), which is correct.
Fixes #25.
2016-08-13 13:38:04 +02:00
whitequark 302ceef10a Clarify the Windows situation.
Also, remove the Windows OsStack implementation. It will not ever
be useful in libfringe, as even if we add support for Windows
using fibers, the OS allocates stacks for fibers and we needn't
do it manually.
2016-08-13 13:38:04 +02:00
whitequark 892a7696ec Allow unwinding to propagate across a context swap.
The main purpose of this is having nice backtraces in gdb, although
it also slightly simplifies poisoning state of the API consumers
after a panic.
2016-08-13 13:38:04 +02:00
whitequark 16c674b4f4 Implement the GuardedStack marker trait. 2016-07-17 13:56:03 -04:00
whitequark 758088c673 Fix Stack::new(0). 2016-07-17 13:55:43 -04:00
whitequark aa364056fd Add more documentation, and rephrase it elsewhere. 2016-07-16 20:54:47 -04:00
whitequark ebd9ca8dec Allocate guard page under existing stack, not in it.
This fixes a segfault when the allocated stack is just one page long.

This also refactors the fringe::os module to use Result consistently.

close #22
2016-07-16 20:54:33 -04:00
whitequark cbe136b762 Completely rework fringe::Context and fringe::arch.
The new design concerns itself with one thing and exactly one thing:
passing values back and forth with an extern "C" function.
This allows to simplify fringe::arch into a single primitive, swap.

Close #21
2016-07-16 15:04:15 -04:00
edef 0d7b3d7091 add Windows support to OsStack
Fix #18
2016-04-16 07:51:10 +02:00
edef b986931817 remove copyright years
They're obnoxious to update, and I'm told they have no legal value.
2016-03-22 08:25:23 +01:00
edef 4ffdba3ea6 minor style fixes 2016-03-16 00:20:45 +01:00
edef bb2b92bf6b remove feature attributes for stable stuff 2016-03-16 00:14:09 +01:00
edef c83143511e core::atomic -> core::sync::atomic 2015-08-26 00:20:23 +02:00
edef e290a8bbaf remove `extern crate core` and prelude imports
the latest Rust nightly makes this unnecessary
2015-08-26 00:19:53 +02:00
edef 6d1c5d0df1 it's fine to inline a simple FFI call 2015-04-27 17:19:13 +02:00
edef d627f0d725 big rename — we're libfringe now 2015-04-16 08:11:12 -04:00
edef af7e9ea67c add FreeBSD + DragonFlyBSD MAP_STACK workaround
http://lists.freebsd.org/pipermail/freebsd-bugs/2011-July/044840.html
according to libgreen, DragonFlyBSD suffers from this too
2015-04-16 07:59:59 -04:00
edef 01e57ce9f5 let os::Stack's docs shine through the facade 2015-04-16 07:47:23 -04:00
edef ff25697444 remove StackSource
Nothing in this library took StackSources, and it's probably too
high-level a concept to include here. Maybe later.
2015-04-16 07:42:16 -04:00
edef bdb6e0bd8b let StackSource::get_stack take &mut self 2015-04-16 07:35:29 -04:00
edef 9bb0ce483d derive Copy and Clone for os::StackSource 2015-04-16 07:33:27 -04:00
edef a389576d0f document os 2015-04-16 07:30:53 -04:00
edef 519d86ca4c implement Send where applicable 2015-04-16 07:23:57 -04:00
edef 6f750ab484 move all OS-related code into src/os 2015-04-16 06:42:31 -04:00
edef 52c0c92cd8 move OS specifics into sys 2015-04-16 05:49:34 -04:00
edef 8dd3044da5 don't re-export os::unix internals 2015-04-16 05:34:09 -04:00
edef 7e0b126f42 separate all the libc interaction out per OS
We're now handling more of this ourselves, and leaving less to libstd.
Hopefully, we'll eventually break free of libstd, leaving a
highly-focused low-level library that retains all its conveniences in
freestanding environments.
2015-04-16 02:16:08 -04:00