Patrick Walton
0391e14fc2
rt: Double stack size
2011-07-06 15:13:00 -07:00
Patrick Walton
91eb63eaee
rt: Add a stack check to upcall_get_type_desc
2011-07-06 15:07:04 -07:00
Eric Holk
111989a626
Removed what seems to be the last of the calls to rand(). Closes #582 .
2011-07-06 11:50:25 -07:00
Eric Holk
bc5d6aefda
Added a task wakeup callback. Closes #599 .
...
The callback happens when a task moves from the "blocked" state to the
"running" state. The callback is also inherited by child tasks. There
is currently only a native API.
This code hasn't been heavily exercised yet.
2011-07-06 11:30:00 -07:00
Patrick Walton
291df4d732
rt: Add missing CDECL to routines in rust_builtin
2011-07-05 14:29:14 -07:00
Rob Arnold
4e59b0be54
Sync rust_chan's deref() method with rustc's code.
...
If the channel is associated with a port then the destructor will assert.
Additionally, destruction of the object is not always appropriate. This brings
the deref() method into sync with the behavior of generated rust code which
only invokes destroy() once the reference count goes to 0.
2011-07-01 16:59:11 -07:00
Rob Arnold
02a5949aba
Add macro for refcounting runtime structures.
...
The macro with the extra dtor parameter is intended for structures like
rust_chan which may not necessarily delete themselves when the ref count
becomes 0. This functionality will be used in an upcoming changeset.
2011-07-01 16:59:10 -07:00
Rob Arnold
73cc624e8e
Move the channel destroy code into rust_chan.
...
This lets native code more easily destroy channels since directly deleting a
channel is not always the right way to destroy it.
2011-07-01 16:59:10 -07:00
Rob Arnold
09921cf86f
Move channel cloning logic into a method on rust_chan.
...
This will allow us to more easily clone channels from native code.
2011-07-01 16:59:10 -07:00
Patrick Walton
be50cdd24a
rt: Add room for the new fill slot when resizing interior vectors
2011-06-30 11:35:05 -07:00
Eric Holk
b4a145e60f
Added a nanosecond timer to time.rs, support for some floating point casts, and a commandline-driven mode for pfib.rs
2011-06-30 11:32:10 -07:00
Eric Holk
b3e5b5bd05
Added inheritance for task pinning. Closes #598 for real.
2011-06-29 18:56:34 -07:00
Eric Holk
63dcd325b9
Adding support for pinning tasks to the currently running thread. Closes #598 .
2011-06-29 18:47:47 -07:00
Graydon Hoare
c796a8f24d
Re-enable tidy (it was broken) and fix various non-tidy things.
2011-06-29 15:14:55 -07:00
Tim Chevalier
1ba85932b1
Add a runtime flag to enable/disable claims en masse
...
Now, if the environment variable CHECK_CLAIMS is set, then all
claims turn into checks. Otherwise, claims are no-ops.
2011-06-29 14:28:02 -07:00
Rafael Ávila de Espíndola
8c535d4aba
Don't enable ssp everywhere.
2011-06-29 16:25:54 -04:00
Patrick Walton
a2ce532337
rt: Remove the lock around upcall_vec_append. Add a test case. Closes #156 .
2011-06-29 10:33:51 -07:00
Patrick Walton
74f8eb51ae
rustc: Move duplicate_heap_parts to copy glue; add a test case
2011-06-28 17:59:30 -07:00
Patrick Walton
dfcfef41df
rustc: Rename take glue to copy glue
2011-06-28 16:52:59 -07:00
Eric Holk
866ee6ecb4
Re-enabling some tests.
2011-06-28 16:12:34 -07:00
Eric Holk
f6f8a06d6b
Resurrecting the runtime unit tests, and modifying them so they compile under the latest refactoring changes.
2011-06-28 16:12:34 -07:00
Eric Holk
657e5a2bd5
Renamed what's left of rust_dom to rust_scheduler
2011-06-28 16:12:33 -07:00
Eric Holk
02f6645fca
Moved win32_require to the kernel.
2011-06-28 16:12:33 -07:00
Eric Holk
2f84987a48
Fixed Win32 compile errors.
2011-06-28 16:12:33 -07:00
Eric Holk
49a8cb34d2
Removed dom_owned, splitting things between task_owned and kernel_owned. Had to re-xfail a few tests brson recently un-xfailed.
2011-06-28 16:12:33 -07:00
Eric Holk
f6f945fed5
Moved thread management to rust_kernel.
2011-06-28 16:12:33 -07:00
Eric Holk
c6d8324830
There is only one domain per kernel now.
2011-06-28 16:12:33 -07:00
Eric Holk
1c852ac9c0
Removing runtime tests. The runtime is tested well enough by the standard library tests, so we might as well have less code to fix during refactoring.
2011-06-28 16:12:33 -07:00
Michael Sullivan
99b4fff4d2
Properly handle the case where src==dst but we have to allocate a new vector.
2011-06-27 12:34:45 -07:00
Michael Sullivan
8ad7f3b56b
Properly handle the case where src==dst in upcall_vec_append.
2011-06-27 12:34:44 -07:00
Graydon Hoare
bc9fa31618
A little tidying in rt.
2011-06-27 10:08:57 -07:00
Eric Holk
022ebc198b
Implementation mising features in lock_and_signal for Win32. Also lowered the minimum stack size to get the pfib benchmark to run without exhausting its address space on Windows.
2011-06-27 09:58:39 -07:00
Eric Holk
681c063ec0
Conservatively serialize nearly all upcalls. Successfuly ran make check with RUST_THREADS=8, so we're probably fairly safe now. In the future we can relax the synchronization to get better performance.
2011-06-27 09:58:39 -07:00
Eric Holk
6367bcf427
Fixed a few concurrency bugs. Still not perfect, but overall it seems much more reliable.
2011-06-27 09:58:39 -07:00
Eric Holk
4d99bf9af2
Added some locking to ports to prevent the case where two threads simultaneously wake up a task blocked on a certain port.
2011-06-27 09:58:39 -07:00
Eric Holk
cb00befff0
Added an environment variable to control how many threads to use.
2011-06-27 09:58:39 -07:00
Eric Holk
4bc773465f
Basic multithreading support. The infinite loops test successfully maxes out the CPU.
2011-06-27 09:58:39 -07:00
Eric Holk
860e8fd98b
Combined set_registers and get_registers into swap_registers.
2011-06-23 20:23:04 -07:00
Eric Holk
98dee91f25
Wrote swap_context in assembly. Closes #548 . This also allows us to re-enable optimization on OSX for both gcc and clang. Also, re-enamed task-comm-1.rs, which was previously broken by optimization.
2011-06-23 18:49:29 -07:00
Eric Holk
a2dcd08cc2
Added string duplication to deep_copy. Closes #520 .
2011-06-20 13:47:02 -07:00
Patrick Walton
8cdef277b2
rt: Fix size miscalculation in ivec_reserve
2011-06-19 18:03:19 -07:00
Patrick Walton
5fb9325848
rustc: Fix a bunch of memory management bugs relating to generic interior vectors. Uncomment all tests in lib-ivec.
2011-06-17 17:31:24 -07:00
Eric Holk
7c57b8baf5
Updating rustrt.def.in so that the path manipulation functions work on OS X.
2011-06-17 15:53:20 -07:00
Eric Holk
a40116b398
stdlib: added getcwd and a convenience function to make relative paths absolute. This will be helpful for #441 .
2011-06-17 15:53:19 -07:00
Patrick Walton
982f51aa95
stdlib: Fix reserve on zero-length interior vectors; uncomment test_unsafe_ptrs()
2011-06-16 18:01:57 -07:00
Patrick Walton
40746fa447
rustc: Implement conversions from interior vector data to unsafe pointers and vice-versa
2011-06-16 17:07:02 -07:00
Patrick Walton
050f62983d
stdlib: Introduce an ivec module into the standard library; add a minimal test case
2011-06-16 16:08:26 -07:00
Eric Holk
6ed6791df4
Removing dead upcall_join. Closes #509 .
2011-06-16 12:23:13 -07:00
Michael Sullivan
bd8f6097a7
Get rid of old vec_append glue.
2011-06-16 11:58:29 -07:00
Patrick Walton
02c0501a61
rt: memory_region::free(NULL) shouldn't touch the live allocation count
2011-06-16 11:16:03 -07:00