Brian Anderson
dd63c5ef1d
rt: Add an assert to rust_get_current_task
2012-04-02 14:23:24 -07:00
Jon Morton
fa88d15d63
remove unneeded assert, move get_task_tls to sched_loop
2012-04-02 14:21:09 -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
Brian Anderson
d0268cbe5f
doc: Abbreviate Thursday as 'th', not 'do'
2012-04-02 14:17:33 -07:00
Jon Morton
bcb9269d84
rt: cleanup passing around of rust_env
2012-04-02 03:11:58 -05:00
Brian Anderson
bee45f0ef0
rt: rust_env is a struct
2012-04-01 21:07:42 -07:00
Brian Anderson
3232c52a61
rt: Assert things that are true
2012-04-01 20:54:30 -07:00
Brian Anderson
6042aefeeb
rt: Convert an old warning to an assert
2012-04-01 20:49:41 -07: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
3654ef0078
rt: Introduce rust_manual_sched_launcher_factory. Again, so sorry
2012-04-01 17:35:35 -07:00
Brian Anderson
7c1be236a5
rt: Introduce rust_sched_launcher_factory. Sorry, I need one
2012-04-01 17:27:18 -07:00
Brian Anderson
fb528dd7d6
rt: Allow some schedulers to stay alive even without tasks to execute
2012-04-01 16:57:14 -07:00
Brian Anderson
0a5e9d45e1
rt: Introduce rust_manual_sched_launcher
2012-04-01 16:21:48 -07:00
Brian Anderson
9ec21933f1
doc: Tutorial fixes
...
Thanks to Mohd. Bilal Husain
2012-04-01 15:36:56 -07:00
Brian Anderson
efe4c6af23
core: Use the or binop instead of the double-star binop
2012-04-01 15:05:29 -07:00
Brian Anderson
494cf46ea3
Add Jonathan Sternberg to AUTHORS.txt
2012-04-01 15:01:16 -07:00
Brian Anderson
252086c89a
Merge pull request #2099 from jsternberg/master
...
os::list_dir to return only the contents of the directory
2012-04-01 14:59:07 -07:00
Brian Anderson
9d5c20ecca
rt: rust_sched_launcher needs a virtual destructor
2012-04-01 13:25:49 -07:00
Jonathan Sternberg
3a0477c398
Fixing issue 1919. list_dir is the more general version that returns a vector with the contents of the directory. list_dir_path contains the old behavior (as a convenience function).
2012-04-01 11:39:17 -04:00
Brian Anderson
ac0381c0bb
rt: rust_sched_launcher does not need a join() method
2012-04-01 00:24:25 -07: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
de47fcfdf9
rt: Extract rust_thread_sched_launcher from rust_sched_launcher
2012-03-31 23:35:41 -07:00
Brian Anderson
21064637ed
rt: Fix whitespace
2012-03-31 23:12:06 -07:00
Brian Anderson
cf0c4cd7d2
rt: Begin running tidy on C++ code again. Oops
2012-03-31 23:05:04 -07:00
Brian Anderson
a17097a57b
rt: Make rust_sched_launcher hide it's thread implementation
2012-03-31 21:48:52 -07:00
Brian Anderson
2d8ef7387e
rt: Add some more locking asserts to rust_sched_loop
2012-03-31 19:51:30 -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
609144f7a6
rt: Extract start_main_loop from rust_sched_loop to rust_sched_driver
2012-03-31 19:51:29 -07:00
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
771c1be6a6
rt: Refactor the scheduler loop so that it can be driven from without
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
6bf8d19712
rt: Extract rust_sched_launcher from rust_task_thread
...
rust_sched_launcher is actually responsible for setting up the thread and
starting the loop. There will be other implementations that do not actually
set up a new thread, in order to support scheduling tasks on the main OS
thread.
2012-03-31 19:51:29 -07:00
Brian Anderson
620b4d4946
Add Jon Morton to AUTHORS.txt
2012-03-31 17:56:51 -07:00
Jon Morton
9851a906a5
initialize cur_thread, first task on thread 0
2012-03-31 13:14:54 -05:00
Jon Morton
8aee42a382
Choose task thread in rust_scheduler by round robin
...
Remove the random context from rust_scheduler and use a simple round robin system to choose which thread a new task gets put on. Also, some incorrect tab indents around scoped blocks were fixed.
2012-03-31 02:14:44 -05:00
Brian Anderson
0904f25507
rustc: Convert some error logs to debug
2012-03-30 17:31:40 -07:00
Marijn Haverbeke
a4906b81f7
Change a span_err back to span_fatal
...
Closes #2073
2012-03-30 08:25:45 +02:00
Brian Anderson
6e8cf935db
core: Add each, each_char to str::extensions
2012-03-29 22:30:15 -07:00
Brian Anderson
8641c95221
core: Add str::each_char
2012-03-29 22:28:26 -07:00
Brian Anderson
9bff2f2545
core: Add each, eachi to vec::extensions
2012-03-29 22:17:11 -07:00
Brian Anderson
5d54defce4
core: Add extension methods for vec
2012-03-29 20:56:50 -07:00
Brian Anderson
f65ea0c812
core: Add extension methods for option
2012-03-29 20:56:50 -07:00
Brian Anderson
392d3c8d44
core: Add extension methods for str
2012-03-29 20:56:50 -07:00
Niko Matsakis
35a3fa0999
add some comments explaining how the tables work
2012-03-29 19:41:09 -07:00
Niko Matsakis
2b45da8a33
refactor to store the types during inference in tables in the fcx
...
this is a step towards separating out the repr. of
types during inference from the repr. in later stages.
2012-03-29 19:41:09 -07:00
Niko Matsakis
f682b99e36
generate correct constraints for assignments
2012-03-29 19:41:09 -07:00
Niko Matsakis
76d0a13ae5
resolve type variables with no constraints to bot
2012-03-29 19:41:09 -07:00
Brian Anderson
f452973a7f
build: Add --enable-debug configure option
...
When CFG_ENABLE_DEBUG is defined it will call rustc with -g --cfg=debug
and cc with -DRUST_DEBUG. Otherwise it calls rustc with --cfg=ndebug and cc
with -DRUST_NDEBUG.
I plan to use this for a few things in the runtime.
2012-03-29 19:10:38 -07:00
Brian Anderson
5b3740508a
test: Prevent run-fail/too-much-recursion from being optimized to nothing
2012-03-29 16:43:18 -07:00