Commit Graph

297 Commits

Author SHA1 Message Date
Ben Blum
a10f52c579 Revert linked failure (rust_port locking)
This reverts commit 343e9de8ef.
2012-07-12 19:49:49 -04: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
343e9de8ef Proper locking with blocked_on()/wakeup() in rust_port. Closes #2787. Closes #1923. 2012-07-12 18:08:36 -04:00
Ben Blum
b897696a3a Rename runtime *_locked() and *_unlocked() fns to *_inner() (closes #2864) 2012-07-12 18:08:36 -04:00
Ben Blum
74f4b8d901 Unify state_lock + kill_lock -> lifecycle_lock (#2787) 2012-07-11 12:09:07 -04:00
Ben Blum
5d6d3d0565 Linked failure in task.rs instead of rust_task.cpp (#1868, #1189) 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
7b3add0632 make disallow_kill an int for nested unkillables (closes #2782) 2012-07-05 19:56:09 -04:00
Ben Blum
ae7b0ac390 move reset_stack_limit off C stack (closes #2679) 2012-06-28 14:53:21 -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
576f59a79b Change 'upcall fail' to 'task failed at', close #2678. 2012-06-27 13:30:49 -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
Michael Sullivan
b4484d51c1 Some cleanup in the runtime. 2012-06-18 15:54:37 -07:00
Brian Anderson
4c8bc19ad2 rt: Refactor task failure to go through rust_task_fail
This is the place to but a breakpoint. We will raise SIGINT here
to break into the debugger.
2012-05-31 23:47:52 -07:00
Brian Anderson
a2bbdd3f52 rt: Remove upcall_shared_malloc/free/realloc 2012-05-30 21:23:34 -07:00
Brian Anderson
5d625af9f9 rt: Make task killing synchronization possibly more correct
I could not come up with a test but this looks better to me.
2012-05-15 16:13:42 -07:00
Brian Anderson
7277cd7198 core: Add task::unkillable 2012-05-15 16:13:42 -07:00
Niko Matsakis
be48cd87dc make poison-on-free work, disable copying if borrowck is enabled 2012-05-15 11:49:08 -07:00
Brian Anderson
564d8e09c7 rt: Fix typo 2012-04-09 16:26:23 -07:00
Brian Anderson
596376ea55 rt: Allow 2x normal stack during unwinding. Closes #2173
Allows room for destructors to run without allowing the stack to grow forever.
2012-04-09 16:03:06 -07:00
Brian Anderson
b42c6d07dc rt: Don't limit the amount of stack available during unwinding. Closes #2144 2012-04-09 15:36:45 -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
Jon Morton
bcb9269d84 rt: cleanup passing around of rust_env 2012-04-02 03:11:58 -05:00
Jon Morton
128a8b6ed5 remove rust_srv 2012-04-01 22:18:40 -05:00
Jon Morton
413994ea3e replace assertion macros with plain asserts 2012-04-01 21:14:16 -05:00
Brian Anderson
e78396850d Merge remote-tracking branch 'brson/mainthread'
Conflicts:
	src/rt/rust_sched_loop.cpp
	src/rt/rust_shape.cpp
	src/rt/rust_task.cpp
2012-04-01 00:15:04 -07:00
Brian Anderson
21064637ed rt: Fix whitespace 2012-03-31 23:12:06 -07:00
Brian Anderson
c8dc6fcb4c Revert "rt: Remove lock_held_by_current_thread"
Adds back the ability to make assertions about locks, but only under the
--enable-debug configuration

This reverts commit b247de6458.

Conflicts:

	src/rt/rust_sched_loop.cpp
2012-03-31 19:51:29 -07: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
Brian Anderson
5747fe7a2c rt: For now, only run the box annihilator after task failure 2012-03-29 16:43:18 -07:00
Brian Anderson
7f9ed39040 rustc: Only invoke when there are cleanups 2012-03-29 16:43:18 -07:00
Brian Anderson
3a7a408386 rt: Free all outstanding boxes at task death 2012-03-29 16:43:18 -07:00
Graydon Hoare
2aaca455b9 Tidy up multiple declarations and STDC_FOO_MACROS guards in headers. 2012-03-28 14:26:51 -07:00
Brian Anderson
08f783ff10 rt: Add a task field to stk_seg and populate it 2012-03-21 19:10:32 -07:00
Brian Anderson
ba322b0a70 rt: Reset the stack limit after catching an exception
This wasn't causing problems but it looked wrong
2012-03-21 19:10:31 -07:00
Brian Anderson
b78af4f7c4 rt: Inline a bunch of stack switching code 2012-03-21 19:10:31 -07:00
Brian Anderson
d5968d9f38 rt: Swap the definition of stk_seg::next and prev 2012-03-21 19:10:31 -07:00
Brian Anderson
6115b13dfc rt: Don't switch to the C stack on the upcall_new_stack fast path 2012-03-21 19:10:31 -07:00
Brian Anderson
8a145a601e rt: Don't swatch stacks during upcall_del_stack 2012-03-21 19:10:31 -07:00
Brian Anderson
05466c6138 rt: Use an enum to represent the task state 2012-03-18 17:41:56 -07:00
Brian Anderson
b247de6458 rt: Remove lock_held_by_current_thread 2012-03-18 17:03:35 -07:00
Marijn Haverbeke
22bef74b55 Remove shared tydescs
All tydescs are static now, there's no need to worry about
marshalling them between threads anymore.
2012-03-16 15:38:42 +01:00
Marijn Haverbeke
76d07f4056 Remove dynastack support from runtime
Issue #1982
2012-03-16 00:44:06 +01:00
Marijn Haverbeke
146b61189a Get rid of rust_crate_cache in the runtime
We are no longer generating dynamic tydescs or dicts.

Issue #1982
2012-03-16 00:44:06 +01:00
Brian Anderson
561511e628 core: Channels are just port ids 2012-03-15 11:10:53 -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
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
0a5603cb58 rt: Make linked failure less prone to deadlock
Still a mess.
2012-03-05 19:39:56 -08:00