Brian Anderson
508ccca014
rt: Add upcall_exchange_malloc/free
2012-05-30 21:23:33 -07:00
Eric Holk
6fa1a084f7
A shareable atomically reference counted pointer wrapper.
...
Needs more tests to ensure safety, and probably some more work on usability too.
2012-05-23 14:58:16 -07:00
Jeff Olson
8769409612
rt: adding rust_uv_* binding for kernel malloc and free'ing :/
...
I need these in the context of doing various malloc/free operations for
libuv structs that need to live in the heap, because of API workflow
(there's no stack to put them in). This has cropped up several times
when impl'ing the high-level API for things like timers, but I've decided
to take the plunge and use this approach for the net::tcp module.
Technically, this can be avoided by spawning a new
task that contains the needed memory structures on its stack and then
having it block for the duration of the time we need that memory to be
valid (this is what I did in std::timer). Exposing this API provides a
much lower overhead way to address
the issue, albeit with safety concerns. The main mitigation policy should
be to use malloc/free with libuv handles only when the handles, are then
associated with a resource or class-with-dtor. So we have a finite lifetime
for the object and can gaurantee a free(), barring a runtime crash (in
which case you have bigger problems!)
2012-05-22 22:29:16 -07:00
Gareth Daniel Smith
c9f8ae02bc
add a seeded random number generator so that sequences of random numbers can be easily reproduced (for https://github.com/mozilla/rust/issues/2379 )
2012-05-21 17:38:05 -07:00
Erick Tryzelaar
e7ca3e4db0
expose tzset
2012-05-19 10:08:43 -07:00
Niko Matsakis
f1a46914c4
add a new debugging aid--tracing
2012-05-18 19:07:19 -07:00
Brian Anderson
7277cd7198
core: Add task::unkillable
2012-05-15 16:13:42 -07:00
Brian Anderson
beb1a59f82
core: Add comm::recv_chan to receive from a channel
2012-05-03 16:38:16 -07:00
Brian Anderson
46cc11ea88
core: Serialize all access to the environment using a weak global task
2012-04-30 17:34:29 -07:00
Jeff Olson
577b888e4b
rt: remove unneccesary c++ functions and rust_kernel data, re: global loop
2012-04-27 22:19:30 -07:00
Jeff Olson
fbaba0f404
std: add ll::loop_refcount binding for uv_loop_refcount
2012-04-27 22:19:30 -07:00
Jeff Olson
a045e63639
std: get_monitor_task_gl() is global_loop::get() default
2012-04-20 15:23:23 -07:00
Jeff Olson
bea02ee351
adding missing binding to rustrt.def.in
2012-04-20 15:23:22 -07:00
Jeff Olson
253fad7788
replace impl of globa_async_handle with one using atomic compare-and-swap
2012-04-20 15:23:22 -07:00
Jeff Olson
d7a87aa0a1
remove rustrt.def.in entry for no-longer-existent c++ function
2012-04-20 15:23:22 -07:00
Jeff Olson
e604c15df1
bindings to get/set data field on uv_loop_t* and debug log cleanup
2012-04-20 15:23:21 -07:00
Jeff Olson
c6667c06c3
add needed fields for global libuv loop + bindings to manage from rust
...
adding two pointers fields to rust_kernel :(
.. have to do manual malloc/free for one of the fields, which feels wrong
2012-04-20 15:23:21 -07:00
Jeff Olson
bf99a3aa93
adding low-level uv_timer_* stuff to libuv bindings
2012-04-20 15:23:21 -07:00
Graydon Hoare
82727b926f
Get explicit unique estrs working.
2012-04-16 16:17:51 -07:00
Brian Anderson
01dc4a8b26
core: Add priv::weaken_task
2012-04-07 19:56:41 -07:00
Brian Anderson
63942c969d
core: Add priv::chan_from_global_ptr
...
This allows singleton, globally accessible tasks to be created
2012-04-06 17:44:26 -07:00
Jeff Olson
ce34ccfec9
removed this binding a few commits back. missed it in rustrt.def.in
2012-04-06 15:35:50 -07:00
Jeff Olson
2b606ae5f3
add libuv error msg helpers.. flushing out windows tcp issue.
2012-04-06 15:35:49 -07:00
Jeff Olson
2c26cf7f96
add low-level uv_async bindings for use in tcp test
2012-04-06 15:35:49 -07:00
Jeff Olson
922ed6f947
hello world test for a tcp server in libuv
...
.. im now going to refactor the tcp request and server tests to utilize
each other, so no more external network ugliness
2012-04-06 15:35:49 -07:00
Jeff Olson
f920d38808
adding missing rust_uv_* entries in rustrt.def.in
2012-04-06 15:35:48 -07:00
Erick Tryzelaar
4a4889859e
std: add localtime/gmtime support.
2012-04-03 22:43:10 -07:00
Brian Anderson
e325146eb4
Merge remote-tracking branch 'brson/mainthread'
...
Conflicts:
src/rt/rust_kernel.cpp
src/rt/rust_scheduler.cpp
src/rt/rust_scheduler.h
2012-04-03 20:30:01 -07:00
Brian Anderson
bef72447e7
core: Add a scheduler mode, osmain, to spawn onto the main scheduler
2012-04-03 14:28:30 -07:00
Graydon Hoare
28a0e9c999
Construct new strings through upcalls.
2012-04-02 17:38:06 -07:00
Graydon Hoare
855c99ea75
Some tests for passing and returning structures by value on x64. Close #1402 . Close #1970 .
2012-03-20 16:44:56 -07:00
Graydon Hoare
869b2d7064
Send string concatenation to specialized upcall, shave 17s off librustc compile time.
2012-03-19 14:29:39 -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
ee991cae81
rt: Add a hack to fix a port detach bug
2012-03-05 20:02:25 -08:00
Brian Anderson
958c321083
rt: Fix the atomic get_ref_count method to avoid races
2012-03-05 19:39:56 -08:00
Brian Anderson
1347d04bb0
rt: Properly block tasks while waiting for port detach
2012-03-05 19:39:56 -08:00
Graydon Hoare
6c87c34277
Remove dead code from rt (debug_obj, rust_obj, rust_closure, rust_box_obj, rust_vtable)
2012-03-05 15:50:11 -08:00
Niko Matsakis
def72bda47
retool inline encoding to handle methods, fix tests
2012-03-02 06:47:25 -08:00
Niko Matsakis
7d0958f70f
add the ability to snag the frame so we can verify that we are inlining
2012-02-29 11:54:47 -08:00
Jeff Olson
b79b5739c9
add rust_uv_loop_delete to rustrt.def.in
2012-02-28 17:56:15 -08:00
Jeff Olson
bb5960aa57
moving new uv stuff into uv.rs and rust_uv.cpp
...
- removing the remains of uvtmp.rs and rust_uvtmp.rs
- removing the displaced, low-level libuv bindings
in uv.rs and rust_uv.cpp
2012-02-28 17:56:15 -08:00
Jeff Olson
cf08ed6458
fzzzy's patch for rustrt.def.in
...
adds new c/c++ methods bound in rust for uvtmp::uv
2012-02-28 17:56:15 -08:00
Chris Peterson
3d202d7eae
rt: rename nano_time() builtin to match time::precise_time_ns()
2012-02-18 01:39:42 -08:00
Brian Anderson
54d7bffbb8
rt: Make upcall_vec_push an intrinsic
2012-02-17 12:08:03 -08:00
Brian Anderson
b2cfb7ef82
rt: Add rust_port_select function
2012-02-16 11:12:22 -08:00
Brian Anderson
4cc1e31f74
rt: Add a Rust callback debugging function
2012-02-14 11:24:09 -08:00
Brian Anderson
5d2442d89c
rt: Add upcall_call_shim_on_rust_stack
2012-02-09 19:00:16 -08:00