Brian Anderson
d2a1378ed8
core::rt: Add MessageQueue type
...
This is the queue used to send messages to Schedulers
2013-05-20 15:20:49 -07:00
Corey Richardson
cc57ca012a
Use assert_eq! rather than assert! where possible
2013-05-19 08:16:02 -04:00
Brian Anderson
f5987b03b8
core::rt: implement oneshot
and stream
.
2013-05-17 17:54:18 -07:00
Brian Anderson
390dde571e
core::rt: Rename Task to Coroutine
2013-05-15 12:19:16 -07:00
Brian Anderson
c42b03de17
core::rt: Fix scheduling logic for enqueued tasks
2013-05-15 12:19:15 -07:00
Brian Anderson
013b7760b7
core: Turn task::unkillable, etc. into no-ops in newsched. #6377
...
Not necessary just yet but they make ARC not work.
2013-05-15 12:19:15 -07:00
Brian Anderson
0a54bad3d1
core::rt: Initialize logging
2013-05-15 12:19:14 -07:00
Brian Anderson
36ad366519
core::rt: Add a test of standalone use of the runtime
2013-05-15 12:19:14 -07:00
Brian Anderson
b04fce6a90
Merge remote-tracking branch 'brson/io-upstream' into incoming
...
Conflicts:
src/libcore/logging.rs
src/libcore/rt/local_services.rs
src/libcore/rt/uv/mod.rs
src/libcore/rt/uv/net.rs
src/libcore/rt/uv/uvio.rs
src/libcore/unstable.rs
2013-05-14 15:30:01 -07:00
Brian Anderson
f934fa73ac
core::rt: Docs
2013-05-14 14:52:07 -07:00
Brian Anderson
329dfcaba0
core: Move unstable::exchange_alloc to rt::global_heap
2013-05-14 14:52:07 -07:00
Brian Anderson
414f3c7d25
core::rt: Add a simple channel type for passing buffered messages between Scheduler and Task
...
Called 'Tube' for lack of anything better.
2013-05-14 14:52:06 -07:00
Brian Anderson
40a9de5ebc
core::rt: Add a very simple ref counted pointer
2013-05-14 14:52:06 -07:00
Brian Anderson
10355d7a7d
core::rt Wire up logging to newsched tasks
2013-05-14 14:52:06 -07:00
Brian Anderson
01b7b7d5a0
core::rt: Use unsafe pointers instead of transmuted regions
2013-05-14 14:52:02 -07:00
Alex Crichton
66e1e51701
Remove re-exports from libcore/core.rc
...
Also fix up all the fallout elsewhere throughout core. It's really nice being
able to have the prelude.
2013-05-13 18:51:40 -04:00
Brian Anderson
ab284d44d8
core::rt Restructure some modules
...
Put all uv code under rt::uv, as if it were in its own crate.
Pull local_sched out of rt::sched.
2013-05-13 14:24:10 -07:00
Brian Anderson
23bf892ae5
core::rt: Improve docs
2013-05-13 14:24:10 -07:00
Brian Anderson
b2fbd34603
core::rt: Begin implementing TcpStream
...
This ended up touching a lot of code related to error handling.
2013-05-13 14:24:10 -07:00
Brian Anderson
80061ecb1d
rt: Remove rust_call_nullary_fn
...
There's no need to delegate to C to call the Rust main function.
2013-05-07 23:01:05 -07:00
Brian Anderson
8081e8debf
Register snapshots
2013-05-04 15:43:51 -07:00
Brian Anderson
c0e734d203
core::rt: Add more I/O docs
2013-04-23 23:52:56 -07:00
Brian Anderson
2a819ae465
core::rt: Tasks to not require an unwinder
...
A task without an unwinder will abort the process on failure.
I'm using this in the runtime tests to guarantee that a call to
`assert!` actually triggers some kind of failure (an abort)
instead of silently doing nothing. This is essentially in lieu
of a working linked failure implementation.
2013-04-23 15:11:28 -07:00
Brian Anderson
d7f5e437a2
core::rt: Add the local heap to newsched tasks
...
Reusing the existing boxed_region implementation from the runtime
2013-04-21 19:03:54 -07:00
Brian Anderson
f9069baa70
core::rt: Add LocalServices for thread-local language services
...
Things like the GC heap and unwinding are desirable everywhere the language
might be used, not just in tasks. All Rust code should have access to
LocalServices.
2013-04-21 16:28:19 -07:00
Brian Anderson
1a7561be4d
core::rt: Remove redundant copy of run_in_newsched_task
2013-04-20 01:37:59 -07:00
Brian Anderson
744ba627f3
core::rt: Add a test mod and put run_in_newsched_task there
2013-04-20 00:33:49 -07:00
Brian Anderson
d261bb32d9
core: More tweaks to the thread-local scheduler interface
2013-04-19 12:05:18 -07:00
Brian Anderson
15ece0c23e
core: Wire up spawn
to the new scheduler
...
It will check which scheduler it is running under and create the
correct type of task as appropriate. Most options aren't supported
but basic spawning works.
2013-04-19 12:05:18 -07:00
Brian Anderson
b96765179e
core: Add rt::context for figuring out what runtime services are available
...
Conflicts:
src/libcore/rt/sched/mod.rs
2013-04-19 12:05:18 -07:00
Brian Anderson
1f8ebb6a8e
core::rt: Move thread-local scheduler to its own module
2013-04-15 15:18:49 -07:00
Luqman Aden
eadd358b2a
Correct type signature for start lang item.
2013-03-30 19:59:21 -07:00
Brian Anderson
e5f8026eba
core: Make sure every module at least has a one-line description
2013-03-26 11:48:22 -07:00
Brian Anderson
5af5766512
core: Initialize global state lazily in the Scheduler ctor
...
I don't want any global one-time initalization functions because
that will make embedding harder.
2013-03-18 17:00:35 -07:00
Brian Anderson
044703435b
Add a way to run the test suite with the new scheduler
...
TESTARGS=--newrt make check-stage1-rpass
Conflicts:
src/rt/rustrt.def.in
2013-03-18 17:00:35 -07:00
Brian Anderson
a882554a78
core: Refactor uv bindings
...
I can already see these are going to get massive. Putting them into multiple
files.
2013-03-18 16:59:37 -07:00
Brian Anderson
57e85b5f94
core: Add rt::io and start sketching the API
2013-03-18 16:59:37 -07:00
Brian Anderson
9a075f264a
core: Rename rt::io to rt::rtio
...
This is an internal interface. I want to use rt::io for public interfaces.
2013-03-18 16:59:37 -07:00
Brian Anderson
723d2247c1
core: Don't use printf in rtdebug!
...
The bots were showing a segfault that I can't reproduce. Assuming it's
varargs related so let's not use printf
2013-03-18 16:59:11 -07:00
Brian Anderson
d30c758974
Give core::rt and std::net their own uvll bindings
...
I intend to do some big refactoring and don't want to deal w/ std just now
2013-03-18 16:59:11 -07:00
Brian Anderson
63d18658c1
rt: Add RUST_DEBUG_MEM to rust_env to avoid races
2013-03-16 14:25:44 -07:00
Brian Anderson
806732a70b
core: Turn off rtdebug logging
2013-03-12 13:05:45 -07:00
Brian Anderson
e28d4b3516
core: Add context switching for ARM and MIPS
...
ARM definitely compiles
2013-03-11 23:33:05 -07:00
Brian Anderson
676e0290ed
core: Add rt mod and add the new scheduler code
2013-03-11 19:44:29 -07:00