Ben Blum
d338879ba5
Reintroduce linked failure (killing runtime)
...
This reverts commit 5724c64549
.
2012-07-13 20:13:53 -04:00
Tim Chevalier
81ecd272d3
Comments only: TODOs to FIXME in the runtime
2012-07-12 19:06:08 -07:00
Ben Blum
5724c64549
Revert linked failure (killing runtime)
...
This reverts commit 200a2ded32
.
2012-07-12 19:49:49 -04:00
Ben Blum
200a2ded32
Fix linked failure with root taskgroup to kill the runtime too.
2012-07-12 18:08:36 -04:00
Ben Blum
9c0b469613
Add rust_task_kill_other
2012-07-11 12:07:06 -04:00
Eric Holk
26e6eb3d14
Handle failure conditions correctly in pipes.
2012-07-10 22:00:47 -07:00
Eric Holk
e5c9cb2b3d
Pipes sleep and wake properly.
2012-07-06 10:42:39 -07:00
Ben Blum
6fc730baf6
Cleanup failure handling around rust_new_task_in_sched - closes #2668
2012-06-28 19:02:48 -04:00
Ben Blum
af2d01e36b
Fix sys::refcount and remove dbg::refcount
2012-06-28 14:40:31 -04:00
Ben Blum
1ba3028d8b
rt: Add task_local_data and related builtin calls ( Closes #2680 )
2012-06-28 00:10:03 -04:00
Graydon Hoare
d3c6119a7a
More keyword paring and migration in runtime, docs, code modes.
2012-06-27 13:30:49 -07:00
Eric Holk
26c11f7b50
Use must_have_lock instead of private functions. (Issue #2700 )
...
I hereby declare that messages sent from the same source arrive in order (Issue #2605 )
Removing FIXME, owned is the correct type here. (Issue #2704 )
Remove outdated FIXME (Issue #2703 )
Updating test for spawning native functions (Issue #2602 )
Removing bogus FIXME (Issue #2599 )
2012-06-22 15:14:42 -07:00
Graydon Hoare
312faf31df
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
2012-06-21 16:44:10 -07:00
Tim Chevalier
c814df0bd6
Comments only: annotate FIXMEs
2012-06-21 16:03:28 -07:00
Eric Holk
ec0fbf526e
Fixed a compile error in runtime.
2012-06-19 12:26:58 -07:00
Eric Holk
dc718d97a6
Adding a lock/condition variable to libcore.
2012-06-19 10:31:12 -07:00
Michael Sullivan
b4484d51c1
Some cleanup in the runtime.
2012-06-18 15:54:37 -07:00
Tim Chevalier
3e2006a570
Revert "Adding a lock/condition variable to libcore."
...
This reverts commit e394ebda37
.
2012-06-16 15:34:15 -07:00
Eric Holk
e394ebda37
Adding a lock/condition variable to libcore.
2012-06-15 22:00:24 -04:00
Brian Anderson
c816eea000
std: Add debug::breakpoint
2012-06-06 23:39:55 -07:00
Brian Anderson
78fe75a741
rt: Fix iaac_init using wrong type and not seeding correctly
...
This was a result of changing the vector representation to contain
a box header.
2012-06-05 00:21:19 -07:00
Brian Anderson
70ecfa686a
rt: Fix build errors on win
2012-05-30 21:23:34 -07:00
Brian Anderson
3f8223ffc2
rt: Fix vec_from_buf_shared for new vecs
2012-05-30 21:23:34 -07:00
Brian Anderson
ecd4318094
rt: Fix rust_list_files for new vecs
2012-05-30 21:23:34 -07:00
Brian Anderson
09a1b94907
Various changes for self-describing vecs
2012-05-30 21:23:34 -07:00
Eric Holk
6fa1a084f7
A shareable atomically reference counted pointer wrapper.
...
Needs more tests to ensure safety, and probably some more work on usability too.
2012-05-23 14:58:16 -07:00
Brian Anderson
17dd5650f8
rt: Fix def of isaac_seed on windows
2012-05-21 17:42:32 -07:00
Gareth Daniel Smith
c9f8ae02bc
add a seeded random number generator so that sequences of random numbers can be easily reproduced (for https://github.com/mozilla/rust/issues/2379 )
2012-05-21 17:38:05 -07:00
Erick Tryzelaar
e7ca3e4db0
expose tzset
2012-05-19 10:08:43 -07:00
Brian Anderson
7277cd7198
core: Add task::unkillable
2012-05-15 16:13:42 -07:00
Brian Anderson
beb1a59f82
core: Add comm::recv_chan to receive from a channel
2012-05-03 16:38:16 -07:00
Brian Anderson
46cc11ea88
core: Serialize all access to the environment using a weak global task
2012-04-30 17:34:29 -07:00
Brian Anderson
01dc4a8b26
core: Add priv::weaken_task
2012-04-07 19:56:41 -07:00
Brian Anderson
63942c969d
core: Add priv::chan_from_global_ptr
...
This allows singleton, globally accessible tasks to be created
2012-04-06 17:44:26 -07:00
Erick Tryzelaar
4a4889859e
std: add localtime/gmtime support.
2012-04-03 22:43:10 -07:00
Erick Tryzelaar
44c7386376
std: fix a typo.
2012-04-03 22:43:09 -07:00
Erick Tryzelaar
4871f11439
std: change timeval to ns resolution timespec
...
This lets us use the more precise clock_gettime on posix
machines.
2012-04-03 22:43:08 -07:00
Erick Tryzelaar
7aae7320db
std: change time::timeval to be {sec: i64, usec: i32}.
...
It's possible to have negative times if expressing time before 1970, so
we should use signed types. Other platforms can return times at a higher
resolution, so we should use 64 bits.
2012-04-03 22:43:08 -07:00
Brian Anderson
e325146eb4
Merge remote-tracking branch 'brson/mainthread'
...
Conflicts:
src/rt/rust_kernel.cpp
src/rt/rust_scheduler.cpp
src/rt/rust_scheduler.h
2012-04-03 20:30:01 -07:00
Jon Morton
632a4c9326
Refactor includes structure, getting rid of rust_internal.h
...
Many changes to code structure are included:
- removed TIME_SLICE_IN_MS
- removed sychronized_indexed_list
- removed region_owned
- kernel_owned move to kernel.h, task_owned moved to task.h
- global configs moved to rust_globals.h
- changed #pragma once to standard guard in rust_upcall.h
- got rid of memory.h
2012-04-03 16:02:38 -07:00
Brian Anderson
bef72447e7
core: Add a scheduler mode, osmain, to spawn onto the main scheduler
2012-04-03 14:28:30 -07:00
Jon Morton
33a949eed6
Add global rust_get_current_task
...
Previously two methods existed: rust_sched_loop::get_task and rust_task::get_task_from_tcb. Merge both of them into one, trying the faster one (tcb) first, and if that fails, the slower one from the tls.
2012-04-02 14:21:08 -07:00
Jon Morton
413994ea3e
replace assertion macros with plain asserts
2012-04-01 21:14:16 -05:00
Brian Anderson
243790836a
rt: Rename rust_task_thread to rust_sched_loop
...
This class no longer represents a thread; it just schedules tasks.
2012-03-31 19:51:29 -07:00
Graydon Hoare
855c99ea75
Some tests for passing and returning structures by value on x64. Close #1402 . Close #1970 .
2012-03-20 16:44:56 -07:00
Brian Anderson
561511e628
core: Channels are just port ids
2012-03-15 11:10:53 -07:00
Brian Anderson
1366d65660
rt: Remove remaining uses of rust_kernel::get_task_by_id
2012-03-15 11:10:52 -07:00
Brian Anderson
b278d675a2
rt: Look up ports through a single port table
...
Instead of a two-level lookup, just use one big table
2012-03-15 11:10:52 -07:00
Brian Anderson
dc0b9f44e2
rt: Change the rust_port refcounting scheme to avoid races
...
Hopefully...
2012-03-06 17:14:40 -08:00
Brian Anderson
ee991cae81
rt: Add a hack to fix a port detach bug
2012-03-05 20:02:25 -08:00
Brian Anderson
958c321083
rt: Fix the atomic get_ref_count method to avoid races
2012-03-05 19:39:56 -08:00
Brian Anderson
1347d04bb0
rt: Properly block tasks while waiting for port detach
2012-03-05 19:39:56 -08:00
Brian Anderson
4c4a2320eb
rt: Make rust_port_detach less contentious
...
It still utterly dominates some benchmarks with busy waiting, but at least it
doesn't create lock contention while doing so.
2012-03-05 19:39:56 -08:00
Brian Anderson
e08f46db68
rt: Move receive code into rust_port
2012-03-05 19:39:56 -08:00
Brian Anderson
77295c56c5
rt: Simplify the recv interface
2012-03-05 19:39:56 -08:00
Brian Anderson
8e0efce0da
rt: Move some code from rust_port_detach into rust_port::detach
2012-03-05 19:39:56 -08:00
Brian Anderson
e3ccac8ed3
rt: Renome rust_task::lock to port_lock
2012-03-05 19:39:55 -08:00
Graydon Hoare
6c87c34277
Remove dead code from rt (debug_obj, rust_obj, rust_closure, rust_box_obj, rust_vtable)
2012-03-05 15:50:11 -08:00
Brian Anderson
f4ce965ce7
rt: Port ref counts are protected by the task lock. Ick.
2012-03-02 16:33:33 -08:00
Niko Matsakis
def72bda47
retool inline encoding to handle methods, fix tests
2012-03-02 06:47:25 -08:00
Niko Matsakis
7d0958f70f
add the ability to snag the frame so we can verify that we are inlining
2012-02-29 11:54:47 -08:00
Brian Anderson
4220dcf1e9
core: New task API
2012-02-20 18:58:04 -08:00
Chris Peterson
3d202d7eae
rt: rename nano_time() builtin to match time::precise_time_ns()
2012-02-18 01:39:42 -08:00
Chris Peterson
123a920f59
std: Fix Windows system time conversion for get_time()
2012-02-18 01:21:26 -08:00
Brian Anderson
b2cfb7ef82
rt: Add rust_port_select function
2012-02-16 11:12:22 -08:00
Brian Anderson
d5e7f0d113
rt: Don't kill tasks while they are in a callback from C
2012-02-14 11:24:09 -08:00
Brian Anderson
214cdd0dee
rustc: Translate crust functions
2012-02-14 11:24:09 -08:00
Brian Anderson
4cc1e31f74
rt: Add a Rust callback debugging function
2012-02-14 11:24:09 -08:00
Brian Anderson
d39ea47746
rt: Remove rust_task_user struct
2012-02-09 19:00:15 -08:00
Brian Anderson
1dad32c015
rt: Remove unused builtins
2012-02-09 19:00:15 -08:00
Brian Anderson
d756b01619
rt: Add a function for configuring task notification
2012-02-09 19:00:15 -08:00
Jyun-Yan You
b778dac197
fix build on freebsd
2012-02-09 18:41:57 -08:00
Brian Anderson
149d1d4a6e
core: Add a test for blocking in native code
2012-02-08 15:42:51 -08:00
Brian Anderson
35ba9715fa
core: Add task::spawn_sched
...
This function creates a new scheduler with a specified number of threads and
immediately executes a task on it. The scheduler is configured to terminate
when the task dies. This is the minimum API necessary to enable blocking C
calls.
2012-02-08 15:42:51 -08:00
Brian Anderson
2f4e7c157e
rt: Export a scheduler API
2012-02-08 15:42:51 -08:00
Graydon Hoare
93450abb4b
Make process-spawning take environments and working directories, remove procsrv task from compiletest.
2012-02-07 19:57:03 -08:00
Marijn Haverbeke
b28a5552e3
Reuse monomorphized functions for different box types
...
The free glue for opaque boxes will pick the actual tydesc out of the
box, and call its glue.
Issue #1736
2012-02-07 14:36:02 +01:00
Kevin Cantu
6be25c8a0c
Adding str::reserve
2012-02-05 14:56:16 -08:00
Kevin Cantu
d3dfe8758d
Making vec::reserve reserve precisely the size given (untested)
2012-02-05 14:56:16 -08:00
Brian Anderson
21d783c338
rt: Make isaac_init not a template
2012-02-03 23:48:12 -08:00
Brian Anderson
bf250bec7c
rt: Create new tasks through the current thread's scheduler
2012-02-03 23:48:12 -08:00
Brian Anderson
3d0e7a7af3
rt: Add a field to rust_task to hold its scheduler
2012-02-03 23:48:12 -08:00
Brian Anderson
8d881967a2
rt: Extract rust_scheduler from rust_task_thread
2012-02-03 23:48:12 -08:00
Brian Anderson
f94339cc1c
rt: Rename rust_scheduler to rust_task_thread
2012-02-03 23:48:12 -08:00
Marijn Haverbeke
c1b075d042
Remove experimental GC code
...
It's been sitting unused long enough to have bitrotted completely.
2012-02-03 11:34:12 +01:00
Brian Anderson
57cad61353
rt: Remove task pinning. Does nothing
2012-02-02 18:10:24 -08:00
Brian Anderson
18de0f2aeb
rt: Rename task_sleep intrinsic to task_yield. Remove usec param
2012-02-02 18:10:24 -08:00
Brian Anderson
8693fcc2d7
rt: Remove yield timers
2012-02-02 18:10:24 -08:00
Niko Matsakis
196d69beb2
make boxes self-describing ( fixes #1493 )" (take 2)
...
this will be used to generate a new snapshot.
2012-02-01 18:52:08 -08:00
Niko Matsakis
3116643806
Revert "make boxes self-describing ( fixes #1493 )" until a new
...
snapshot is prepared.
2012-02-01 18:50:19 -08:00
Niko Matsakis
c36207bfb8
make boxes self-describing ( fixes #1493 )
2012-02-01 18:18:07 -08:00
Brian Anderson
fa13fd9d64
rt: Remove set_min_stack
2012-01-29 21:27:37 -08:00
Brian Anderson
f5f36e8b49
rt: Allow console logging to be turned off
2012-01-13 13:44:09 -08:00
Brian Anderson
0616cba62b
libcore: Add sys::set_exit_status
...
Sets the process exit code
2012-01-12 22:24:27 -08:00
Niko Matsakis
8506241f3a
fix how we walk functions to match new closure fmt
2012-01-06 22:40:31 -08:00
Niko Matsakis
25e81e34ea
rewrite task tests
2012-01-06 22:40:31 -08:00
Niko Matsakis
98f5109cde
simplify task impl
2012-01-06 22:40:31 -08:00
Elly Jones
89e880d613
std: file_is_dir -> path_is_dir, add path_exists
2011-12-16 17:37:21 -05:00
Brian Anderson
a731f165df
test: Test hitting the dynamic linker in the red zone
2011-12-05 17:20:59 -08:00
Brian Anderson
f2de42c39a
rt: Reorganize stack growth code
2011-11-30 20:31:33 -08:00