about summary refs log tree commit diff
path: root/src/rt
AgeCommit message (Collapse)AuthorLines
2012-06-16Revert "Adding a lock/condition variable to libcore."Tim Chevalier-82/+0
This reverts commit e394ebda37bf6bbe4c516e2b9381aac8bd964dcc.
2012-06-15Adding a lock/condition variable to libcore.Eric Holk-0/+82
2012-06-15Remove some dead code from rust_shapeMichael Sullivan-7/+3
2012-06-15Make the shape interpreter actually advance past fixed length vectors. ↵Michael Sullivan-0/+2
Closes #2613.
2012-06-13Add upcall_malloc_dyn to rustrt.def.in.Michael Sullivan-0/+1
2012-06-13Make trans only generate calls to the _dyn malloc upcalls, so we can get rid ↵Michael Sullivan-0/+2
of the non dyn ones.
2012-06-13Add a malloc_dyn upcall for dynamically sized allocations on the shared heap.Michael Sullivan-39/+98
2012-06-12Introduce a SHAPE_UNBOXED_VEC shape in order to seperate out vector logic.Michael Sullivan-2/+91
2012-06-11Clean up tydesc declaration to make it clear what is unused.Michael Sullivan-14/+9
2012-06-11Get rid of a bunch of dead shape code. Closes #2552.Michael Sullivan-309/+69
2012-06-11Add emacs settings to some runtime files where they were missing.Michael Sullivan-0/+55
2012-06-07Remove a bunch of old "remove after snapshot" code.Michael Sullivan-18/+0
2012-06-07rt: Remove check_stack_alignmentBrian Anderson-34/+0
This function does not do what it tries to do and it is expensive
2012-06-06std: Add debug::breakpointBrian Anderson-0/+19
2012-06-05rt: Unique allocations have -1 ref countBrian Anderson-0/+3
2012-06-05rt: Fix iaac_init using wrong type and not seeding correctlyBrian Anderson-5/+5
This was a result of changing the vector representation to contain a box header.
2012-06-04Revert "rt: Unique allocations have -1 ref count"Brian Anderson-3/+0
This reverts commit 422aec85d6c02c7ff46be7032a2436c22ffd37fa.
2012-06-04rt: Unique allocations have -1 ref countBrian Anderson-0/+3
2012-06-04Moved log method into logger class better than scheduler fixes #2495Arkaitz Jimenez-24/+25
2012-06-03rt: Add a FIXME about #2495Brian Anderson-0/+1
2012-06-03Show ellipsis sign when log line is truncatedArkaitz Jimenez-1/+7
2012-06-02rt: Improve docs for main, kernel, scheduler, and taskBrian Anderson-37/+120
2012-05-31rt: Refactor task failure to go through rust_task_failBrian Anderson-3/+45
This is the place to but a breakpoint. We will raise SIGINT here to break into the debugger.
2012-05-30rt: Don't zero the unique box headerBrian Anderson-1/+3
2012-05-30rt: Remove upcall_shared_malloc/free/reallocBrian Anderson-86/+3
2012-05-30rt: Fix build errors on winBrian Anderson-3/+3
2012-05-30rt: Fix vec_from_buf_shared for new vecsBrian Anderson-5/+6
2012-05-30rt: Fix rust_list_files for new vecsBrian Anderson-5/+5
2012-05-30Various changes for self-describing vecsBrian Anderson-59/+68
2012-05-30rt: Add yet another allocating upcallBrian Anderson-14/+44
upcall_exchange_malloc_dyn, for allocating unique boxes for types that don't have a fixed size.
2012-05-30rustc: Make unique boxes self-describingBrian Anderson-6/+26
2012-05-30rt: Add upcall_exchange_malloc/freeBrian Anderson-1/+58
2012-05-23A shareable atomically reference counted pointer wrapper.Eric Holk-0/+12
Needs more tests to ensure safety, and probably some more work on usability too.
2012-05-22std: splitting out tcp server API + testsJeff Olson-2/+2
- we now have two interfaces for the TCP/IP server/listener workflow, based on different user approaches surrounding how to deal with the flow of accept a new tcp connection: 1. the "original" API closely mimics the low-level libuv API, in that we have an on_connect_cb that the user provides *that is ran on the libuv thread*. In this callback, the user can accept() a connection, turning it into a tcp_socket.. of course, before accepting, they have the option of passing it to a new task, provided they *make the cb block until the accept is done* .. this is because, in libuv, you have to do the uv_accept call in the span of that on_connect_cb callback that gets fired when a new connection comes in. thems the breaks.. I wanted to just get rid of this API, because the general proposition of users always running code on the libuv thread sounds like an invitation for many future headaches. the API restriction to have to choose to immediately accept a connection (and allow the user to block libuv as needed) isn't too bad for power users who could conceive of circumstances where they would drop an incoming TCP connection and know what they're doing, in general. but as a general API, I thought this was a bit cumbersome, so I ended up devising.. 2. an API that is initiated with a call to `net::tcp::new_listener()` .. has a similar signature to `net::tcp::listen()`, except that is just returns an object that sort of behaves like a `comm::port`. Users can block on the `tcp_conn_port` to receive new connections, either in the current task or in a new task, depending on which API route they take (`net::tcp::conn_recv` or `net::tcp::conn_recv_spawn` respectively).. there is also a `net::tcp::conn_peek` function that will do a peek on the underlying port to see if there are pending connections. The main difference, with this API, is that the low-level libuv glue is going to *accept every connection attempt*, along with the overhead that that brings. But, this is a much more hassle-free API for 95% of use cases and will probably be the one that most users will want to reach for.
2012-05-22std: splitting out tcp server API WIPJeff Olson-2/+2
2012-05-22rt: adding rust_uv_* binding for kernel malloc and free'ing :/Jeff Olson-0/+12
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-21rt: Fix def of isaac_seed on windowsBrian Anderson-3/+3
2012-05-21add a seeded random number generator so that sequences of random numbers can ↵Gareth Daniel Smith-43/+77
be easily reproduced (for https://github.com/mozilla/rust/issues/2379)
2012-05-19expose tzsetErick Tryzelaar-1/+6
2012-05-18add a new debugging aid--tracingNiko Matsakis-0/+23
2012-05-15rt: Make task killing synchronization possibly more correctBrian Anderson-4/+12
I could not come up with a test but this looks better to me.
2012-05-15core: Add task::unkillableBrian Anderson-1/+30
2012-05-15get preservation of boxes working, at least in simple casesNiko Matsakis-1/+0
2012-05-15make poison-on-free work, disable copying if borrowck is enabledNiko Matsakis-5/+14
2012-05-07rt: Start tasks, ports and scheds at 1, assert when we see 0. Closes #2321Brian Anderson-3/+5
2012-05-03core: Add comm::recv_chan to receive from a channelBrian Anderson-0/+21
2012-05-03More shape fixes for evecs.Graydon Hoare-27/+30
2012-05-03Implement better shape code for evec, estr.Graydon Hoare-10/+249
2012-05-02rt: Fix some record alignment issues on windowsBrian Anderson-0/+2
2012-05-02Revert "rt: Fix some record alignment issues on windows"Brian Anderson-2/+0
This reverts commit a2457f5864092161a7224c667c4a2e8b60f06d4a.