Commit Graph

76 Commits

Author SHA1 Message Date
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
Graydon Hoare bc9fa31618 A little tidying in rt. 2011-06-27 10:08:57 -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 67360ae618 Fixed a problem where spawn arguments were getting lost again. Also, fixed up stack alignment, which closes #496 2011-06-15 18:16:59 -07:00
Eric Holk 02018fed42 Step 3 of cdecl conversion. 2011-06-15 16:04:39 -07:00
Eric Holk 92bd35075b Step 2 of cdecl task transition. 2011-06-15 14:25:53 -07:00
Eric Holk 01ea27b205 Step 1 of moving task startup to always be cdecl. 2011-06-15 12:10:15 -07:00
Eric Holk d1857d30fc This is the mega-ucontext commit. It replaces the task switching mechanism with a new one inspired by ucontext. It works under Linux, OS X and Windows, and is Valgrind clean on Linux and OS X (provided the runtime is built with gcc).
This commit also moves yield and join to the standard library, as requested in #42. Join is currently a no-op though.
2011-06-13 18:14:13 -07:00
Graydon Hoare 1d1010cac0 Move rt:: logging namespace to ::rt:: and implement RUST_LOG=? and RUST_LOG=::help as synonyms that dump the crate logging map. Also warn when some logging specs don't match. 2011-06-10 17:31:48 -07:00
Rafael Ávila de Espíndola 3dc6c3b737 Remove code that is now dead. 2011-05-31 13:38:10 -04:00
Rafael Ávila de Espíndola e66f9e46f6 Start finishing up the rust_start signature transition. 2011-05-31 11:17:17 -04:00
Graydon Hoare 79c9e13073 More delicious dead code removal from runtime, upcalls. 2011-05-26 18:21:02 -07:00
Rafael Ávila de Espíndola 94129c4216 dead argument removal part one. 2011-05-25 15:33:57 -04:00