Commit Graph

89 Commits

Author SHA1 Message Date
Brian Anderson 218dd08469 rt: Introduce rust_sched_reaper
This just moves the responsibility for joining with scheduler threads
off to a worker thread. This will be needed when we allow tasks to be
scheduled on the main thread.
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 f5f6135fd0 rt: Stop using large stacks for the main task 2012-03-21 19:10:32 -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 7685e5de94 rt: Refactor the rust_kernel interface a bit 2012-02-08 15:42:47 -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
Brian Anderson e7f00b6493 rt: Do all task creation through a 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
Brian Anderson 6548cdd59b rt: Make the initial segment of the main task's stack 1MB
This is a trick to fool microbenchmarks. Closes #1681
2012-01-29 21:20:39 -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
Brian Anderson 30871408a6 rt: Remove debug printf in rust_start 2011-11-17 11:48:10 -08:00
Patrick Walton e6c3c4e48c rt: More work on morestack 2011-11-17 10:52:59 -08:00
Brian Anderson 02cebbb9f1 Revert "rt: More work on morestack"
This reverts commit 68aff2ad6d.
2011-11-16 18:49:19 -08:00
Patrick Walton 68aff2ad6d rt: More work on morestack 2011-11-16 18:00:57 -08:00
Patrick Walton b3cf0c4d1b Revert "rt: More work on morestack"
This reverts commit ced0d4f15e.
2011-11-14 16:20:53 -08:00
Patrick Walton ced0d4f15e rt: More work on morestack 2011-11-14 16:17:08 -08:00
Marijn Haverbeke ef63f09dcd Don't rely on main.ll anymore
I'll remove the actual file after I register a snapshot.

Issue #992
2011-10-20 17:18:38 +02:00
Niko Matsakis 61c9c46d94 remove pthread_exit() from rust_start()
It was causing OS X Lion to hang and (according to Apple) is undefined
in any case
2011-10-05 16:10:36 -07:00
Brian Anderson 23210a3293 Remove unused runtime functions. Issue #855 2011-09-03 00:50:57 -07:00
Brian Anderson 1b67d211b4 Add a rust_str typedef to the runtime. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson 01b254b411 Rename istr-stuff to str in the runtime. Issue #855 2011-09-02 22:11:46 -07:00
Brian Anderson 99ee0fca67 Remove estrs and evecs from runtime. Issue #855 2011-09-02 15:13:41 -07:00
Brian Anderson 9c173f17c0 Remove lots of estr code from rustc. Issue #855 2011-09-01 23:25:33 -07:00
Brian Anderson 372aa4d210 Factor out make_istr utility function in runtime. Issue #855 2011-09-01 15:51:47 -07:00
Brian Anderson be2ad97a61 Allow main to take istrs. Issue #855 2011-08-30 23:57:09 -07:00
Marijn Haverbeke c9c5ee252a Implement non-internal ivecs
Vectors are now similar to our old, pre-internal vectors, except that
they are uniquely owned, not refcounted.

Their name should probably change too, then. I've renamed them to vec
in the runtime, will do so throughout the compiler later.
2011-08-29 09:07:53 +02:00
Marijn Haverbeke 054914712e Remove rust_start_ivec 2011-08-24 13:59:22 +02:00
Brian Anderson 250cc45c3b Remove oldvecs from runtime command line processing 2011-08-18 13:09:49 -07:00
Brian Anderson 0a8bffceb3 Simplify the _rust_main/rust_start interface
rust_start will always call _rust_main with the command line args, and it is
_rust_main's responsibility to free the args ivec heap. _rust_main will be
generated slightly differently depending on whether main takes an ivec or not:
if so then it's just passed through to main, otherwise it frees the ivec
directly.
2011-08-18 13:09:49 -07:00
Brian Anderson c2d8a4df35 Continue transition to an ivec-only main
Only generate a single main function. Rename rust_start_ivec to rust_start,
leaving a transitional rust_start_ivec in place.
2011-08-18 13:09:49 -07:00
Brian Anderson 053b8bff5a Accept main(args: [str]) as main signature 2011-08-16 10:29:08 -07:00
Eric Holk d63f8340a5 Properly ref counting to fix valgrind issues on linux. 2011-08-15 09:26:52 -07:00
unknown 44bef5f2cb Introduced task handles.
This is the new way to refer to tasks in rust-land. Currently all they
do is serve as a key to look up the old rust_task structure. Ideally
they won't be ref counted, but baby steps.
2011-08-08 16:55:38 -07:00
Eric Holk d1dbb99984 Removing proxies and message queues. 2011-07-29 18:54:59 -07:00
Brian Anderson 4ef1ec580a Do all runtime calls to getenv at initialization
getenv is not threadsafe and (maybe as a result) it's randomly crashing with
CFLAGS=-g and RUST_THREADS=32. Calls from rust code are still on their
own.
2011-07-28 12:23:01 -07:00
Eric Holk 62bc6b5113 Per-thread scheduling. Closes #682.
Tasks are spawned on a random thread. Currently they stay there, but
we should add task migration and load balancing in the future. This
should drammatically improve our task performance benchmarks.
2011-07-28 10:47:28 -07:00
Eric Holk b51f5c395c Made root_task no longer special. 2011-07-28 10:47:28 -07:00
Brian Anderson 49a98f1508 Base scheduler threads on number of cores. Closes #739 2011-07-26 11:12:20 -07:00
Eric Holk 3ae4dcd41e Lots of work on memory tracking and channels.
We're trying to get closer to doing correct move semantics for channel
operations. This involves a lot of cleanup (such as removing the
unused sched parameter from rust_vec constructor) and making
circular_buffer kernel_owned.

Added tagging for memory allocations. This means we give a string tag
to everything we allocate. If we leak something and TRACK_ALLOCATIONS
is enabled, then it's much easier now to tell exactly what is leaking.
2011-07-21 11:51:22 -07:00
Graydon Hoare 39151f2ad8 Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases. 2011-07-13 15:44:09 -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
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