Brian Anderson
0616cba62b
libcore: Add sys::set_exit_status
...
Sets the process exit code
2012-01-12 22:24:27 -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
Elly Jones
89e880d613
std: file_is_dir -> path_is_dir, add path_exists
2011-12-16 17:37:21 -05:00
Brian Anderson
a731f165df
test: Test hitting the dynamic linker in the red zone
2011-12-05 17:20:59 -08:00
Brian Anderson
f2de42c39a
rt: Reorganize stack growth code
2011-11-30 20:31:33 -08:00
Brian Anderson
d6ab8ebb07
rt: Add more comments to rust_task_sleep
2011-11-18 16:02:48 -08:00
Brian Anderson
1e58049da2
rt: Remove fail calls from rust_task::yield
2011-11-18 15:36:48 -08:00
Brian Anderson
792068d871
rt: Remove unblock call from rust_task::yield
2011-11-18 14:45:48 -08:00
Brian Anderson
3a6320f71b
intrinsics: Eliminate recv intrinsic
...
This intrinsic existed just to get ahold of the return pointer. I replaced it
with a call_with_retptr intrinsic that grabs the return pointer and passes it
to another Rust function, thereby eliminating the need to call C functions on
the Rust stack.
2011-11-18 12:48:54 -08:00
Brian Anderson
21865ddce6
intrinsics: Remove the call to get_task from task_sleep
2011-11-18 10:32:27 -08:00
Brian Anderson
9ca2005959
rt: Remove size_of and align_of functions. Now written in Rust
2011-11-18 10:32:27 -08:00
Brian Anderson
342dc21d2c
Disconnect ports before draining them. Issue #1155
2011-11-16 17:22:14 -08:00
Brian Anderson
5b9f76eb7c
stdlib: Run cleanups on data that fails to send
2011-11-14 14:07:52 -08:00
Brian Anderson
138d9ca5d5
Drop enqueued elements when a port is destructed. Closes #1155
2011-11-13 15:43:58 -08:00
Brian Anderson
3d9023fa4d
rt: Take the task lock when dropping port refcounts
...
Sucks, but otherwise there are races when one task drops the refcount to zero
followed by another bumping it again
2011-11-11 16:11:31 -08:00
Brian Anderson
5e0e32faac
rt: Remove drop_port. Unused
2011-11-11 12:11:21 -08:00
Brian Anderson
5d1e321ecb
rt: Remove rust_chan
2011-11-11 12:11:21 -08:00
Brian Anderson
793da65a8e
rt: Move rust_chan::send to rust_port::send
2011-11-10 17:53:19 -08:00
Brian Anderson
f5c4ce79a7
rt: Remove del_chan, take_chan, drop_chan. Unused
2011-11-10 17:28:28 -08:00
Brian Anderson
e4f980810b
rt: Simplify channel-port association
...
It turns out that there's only ever a single channel per port these days,
and it always has the same lifetime as the port, so we don't need a list or a
complex association protocol.
2011-11-10 17:26:22 -08:00
Brian Anderson
08d0ff38bc
rt: Remove new_chan. Not needed
2011-11-10 15:59:31 -08:00
Brian Anderson
0dc8387995
rt: Remove chan_send. Unused.
2011-11-10 15:36:09 -08:00
Brian Anderson
061d2c2f77
Make task_sleep an intrinsic.
2011-11-08 15:58:08 -08:00
Brian Anderson
68f82de817
rt: Remove task_yield builtin
...
This is just a special case of task_sleep
2011-11-08 14:28:41 -08:00
Brian Anderson
17c651b3b0
Remove task::join_id
...
This is the old, racy way of joining to a task. It is no longer used.
2011-10-26 20:43:47 -07:00
Niko Matsakis
02d7a1e781
move sys fns into c-stack-cdecl and get_type_desc() into rusti
...
there is one test failure, stdtest/sys.rs, which inexplicably
(thus far) fails to compile because it invokes
sys::rustrt::last_os_error() instead of invoking
sys::last_os_error(). If stdtest/sys.rs is updated to invoke
the wrapper, it passes. Still tracing the source of this error.
2011-10-24 16:06:17 -07:00
Niko Matsakis
0598635bdc
migrate leak
2011-10-24 16:06:17 -07:00
Niko Matsakis
5ddc15e42e
migrate debugging funcs
2011-10-24 16:06:17 -07:00
Niko Matsakis
96629d5c21
move rand functions into c-stack-cdecl mode
2011-10-24 16:06:17 -07:00
Niko Matsakis
b13e7e0f3d
move fs routines to c-stack-stdlib
2011-10-24 16:06:16 -07:00
Niko Matsakis
4880065429
rip out unused task pointers
2011-10-24 16:06:16 -07:00
Niko Matsakis
d9b23cb022
move comm functions out of rust abi
2011-10-24 16:06:16 -07:00
Niko Matsakis
cdf91bbf9a
add get_type_desc function to library
2011-10-21 16:19:27 -07:00
Marijn Haverbeke
8124846b2c
Get rid of taskpointer-passing throughout the compiler
...
Only intrinsics still take a dummy taskptr. We'll have to do some
makefile stunts to snapshot a version without taskptrs-in-intrinsics.
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
457683c7fe
Do not pass taskpointers to "rust" native functions
...
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
e927df17f7
Remove spawn_wrap and main_wrap kludges
...
This isn't needed now that our functions are cdecl (and was apparently
only still working by accident).
Issue #992
2011-10-20 13:15:09 +02:00
Patrick Walton
a7b44e847a
rt: Make the builtins no longer take an explicit task parameter
2011-10-03 18:23:30 -07:00
Patrick Walton
ad19ab4c6f
rt: Make the logic that moves environments between tasks update the GC alloc chain correctly
2011-09-26 16:59:15 -07:00
Brian Anderson
dbd2ee015a
Remove is_stateful flag from tydesc. Closes #136
2011-09-22 22:15:25 -07:00
Patrick Walton
5209b19255
rt: Rename rand() to isaac_rand() since the former prevents lots of standard headers from being included
2011-09-20 15:34:47 -07:00
Patrick Walton
9a8b4a1be6
Revert "rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing"
...
This reverts commit f6871e832c
.
2011-09-20 13:57:04 -07:00
Brian Anderson
4028a099f5
Yield after send
2011-09-16 11:08:01 -07:00
Patrick Walton
f6871e832c
rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing
2011-09-16 10:51:58 -07:00
Brian Anderson
22001d1dce
Remove hack_allow_leaks
...
Happy to close the loop on this one.
Issue #236
2011-09-11 17:31:40 -07:00
Marijn Haverbeke
139b1d1b31
Get rid of some unused upcalls
...
I guess these became obsolete when the communication stuff moved into
the stdlib.
2011-09-09 14:02:07 +02:00
Brian Anderson
25ae3d655c
Rewrite spawn yet again
...
The motivation here is that the bottom of each stack needs to contain a C++
try/catch block so that we can unwind. This is already the case for main, but
not spawned tasks.
Issue #236
2011-09-07 10:32:58 -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