Commit graph

528 commits

Author SHA1 Message Date
Eric Holk
efac7c9a19 Yet another comm interface. 2011-08-17 14:42:40 -07:00
Patrick Walton
702fe5cdac rustc: Run obstack cleanups at the end of each function 2011-08-17 13:58:49 -07:00
Patrick Walton
3aab46b020 rustc: Mark an obstack fencepost when entering a dynamically-sized frame 2011-08-17 13:16:15 -07:00
Patrick Walton
d8c5bd6195 rt: Implement obstacks, untested as of yet 2011-08-16 19:49:25 -07:00
Eric Holk
8686645aad New channel-based task status notifications. 2011-08-16 16:47:40 -07:00
Eric Holk
3db300b06e Removing port, chan and task shapes. 2011-08-16 12:30:32 -07:00
Eric Holk
89df915a13 Removing task, chan and port upcalls. 2011-08-16 11:22:24 -07:00
Brian Anderson
053b8bff5a Accept main(args: [str]) as main signature 2011-08-16 10:29:08 -07:00
Eric Holk
76aab80e39 Disabling TRACK_ALLOCATIONS 2011-08-16 10:28:09 -07:00
Eric Holk
cf2def46c1 Removed trans_comm.rs from the compiler. Updating aio/sio to work with the new chan and port system, started on a networking module for the standard library. 2011-08-16 09:36:29 -07:00
Brian Anderson
977d8ba0e9 Abort abruptly on failure on windows
Trying to shutdown cleanly results in wierd failures
2011-08-15 19:25:47 -07:00
Eric Holk
5c6790519b Reducing the chances for race conditions in join. 2011-08-15 12:39:55 -07:00
Eric Holk
3fd3f35699 Fixing win32 build. 2011-08-15 10:48:04 -07:00
Eric Holk
d63f8340a5 Properly ref counting to fix valgrind issues on linux. 2011-08-15 09:26:52 -07:00
Eric Holk
be7325073a Removed spawn and task from the parser. Updated all the tests except for the benchmarks. 2011-08-15 09:26:52 -07:00
Eric Holk
b9f1f77622 Fixed memory accounting and task stack creation bugs. 2011-08-15 09:26:51 -07:00
Eric Holk
2f23405a60 Working on more spawn test cases. 2011-08-15 09:26:51 -07:00
Eric Holk
a332043561 Updating to build on Linux and Mac, and hopefully Windows too. 2011-08-15 09:26:51 -07:00
Eric Holk
b2dad8af31 Added a library version of spawn. Before long, we can remove the old version. 2011-08-15 09:26:51 -07:00
Eric Holk
39b16077bb Port ID-based channels. 2011-08-15 09:26:51 -07:00
Eric Holk
04af99ecb0 First step towards port handles. 2011-08-15 09:26:51 -07:00
Brian Anderson
4fc0848a49 Rename rust_list_files_ivec to rust_list_files 2011-08-12 12:14:07 -07:00
Brian Anderson
8561f7654c Remove rust_list_files from std and rt 2011-08-12 12:14:07 -07:00
Brian Anderson
d1b3ed8c3f Remove runtime vector builtins 2011-08-12 12:14:07 -07:00
Brian Anderson
878fbac278 Remove str_from_vec runtime function 2011-08-12 12:08:27 -07:00
Brian Anderson
2e7e58812b Remove vec version of str::bytes, rename bytes_ivec to str::bytes 2011-08-12 12:08:26 -07:00
Patrick Walton
ba7c8f18d4 rustc: Remove unused "trace" upcalls 2011-08-10 18:09:52 -07:00
Patrick Walton
347230b001 rt: Add the last few cases to polymorphic log 2011-08-10 15:45:32 -07:00
Patrick Walton
955ac84da4 rt: Step over type params properly in glue 2011-08-10 15:39:05 -07:00
Patrick Walton
15e1e3185d rt: Allow records and boxes to be logged 2011-08-10 15:36:37 -07:00
Patrick Walton
6affa3264b rt: Allow tags to be logged 2011-08-10 14:57:02 -07:00
Patrick Walton
f5c8c85196 rt: Implement logging of vectors 2011-08-10 14:42:06 -07:00
Patrick Walton
dc720c3aba rt: Implement polymorphic log on strings 2011-08-10 14:35:12 -07:00
Patrick Walton
adce35acd4 rustc: Use polymorphic logging 2011-08-10 14:35:12 -07:00
Brian Anderson
0cd607bcbd rt: Shutdown gracefully on failure
When the kernel fails, kill all tasks and wait for the schedulers to stop
instead of just exiting. I'm sure there are tons of lurking issues here but
this is enough to fail without leaking (at least in the absence of cleanups).
2011-08-10 13:02:31 -07:00
Patrick Walton
f6ad051408 rt: Use _LP64 instead of SIZE_MAX and UINT64_MAX to try to put out the burning tinderbox 2011-08-10 10:55:41 -07:00
Patrick Walton
ceaf02abe1 rt: Attempt to quiet MinGW by including limits.h 2011-08-10 05:17:30 -07:00
Patrick Walton
6fbb7ffdbd rt: Stub code for polymorphic log 2011-08-09 19:01:15 -07:00
Patrick Walton
1f8e0fa083 rt: Implement comparison of functions, objects, ports, channels, and tasks 2011-08-09 17:02:17 -07:00
Patrick Walton
ade998d743 rt: Don't walk vars twice. We self-host with compare glue now. 2011-08-09 17:02:17 -07:00
Patrick Walton
1e1125fcbe rt: Initialize "result" in all constructors for cmp 2011-08-09 17:02:17 -07:00
Patrick Walton
e5533a5d5e rt: Compare exterior vectors 2011-08-09 12:49:52 -07:00
Patrick Walton
b83167cf91 rt: Make comparison through type vars work 2011-08-09 12:19:40 -07:00
Patrick Walton
f9363f01a1 rt: Fix comparison of interior vectors 2011-08-09 12:19:40 -07:00
Patrick Walton
f7749b1608 rt: Add code to walk over interior vectors, untested as of yet 2011-08-08 19:16:33 -07:00
Patrick Walton
7d7f62613a rt: Compare tags 2011-08-08 18:29:20 -07:00
Patrick Walton
e5531504c9 rt: Align when comparing the insides of boxes 2011-08-08 17:30:21 -07:00
Patrick Walton
0459e38bde rt: Align mallocs to 16 byte boundaries 2011-08-08 17:30:21 -07:00
Eric Holk
42b13c1db3 Disabling TRACK_ALLOCATIONS 2011-08-08 17:12:44 -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
Patrick Walton
f4f057ced1 rt: Compare the insides of boxes 2011-08-08 16:52:11 -07:00
Patrick Walton
42daeab7df rt: "const foo const &" == "const foo &", duh. Puts out burning tinderbox. 2011-08-08 14:55:35 -07:00
Patrick Walton
eb7e9dce4d rt: Stub the shape-based cmp upcall 2011-08-08 14:33:06 -07:00
Eric Holk
d9b84a546c Converted the rest of the task-comm-* tests over. Also fixed some
channel lifecycle bugs.
2011-08-08 08:57:52 -07:00
Patrick Walton
0aeddb3673 rt: Stub compare glue 2011-08-05 18:47:12 -07:00
Patrick Walton
d7828e694d rt: Uncomment data<T> 2011-08-05 17:50:59 -07:00
Eric Holk
50670eb426 Removing trailing whitespace in rust_shape.cpp 2011-08-05 17:08:22 -07:00
Patrick Walton
5261bd771f rt: Simplify the signature of walk_tag; stub code for the data walker 2011-08-05 16:47:43 -07:00
Brian Anderson
f918418953 Fix a type in the libuv mingw makefile 2011-08-05 15:48:19 -07:00
Eric Holk
b62e80c1f0 Atomic ref counting for chans. 2011-08-05 15:27:28 -07:00
Eric Holk
200bbcf91b Rewrote receive to return a value. This lets us initialize variables by receiving them. 2011-08-05 15:27:27 -07:00
Graydon Hoare
7da64ae461 Munge libuv makefiles sufficiently to build out of tree. 2011-08-05 11:57:07 -07:00
Brian Anderson
f6d5c56f21 Tweak libuv makefiles so they pick up custom CFLAGS 2011-08-05 11:57:07 -07:00
Brian Anderson
e653520a6f Fix uv_buf_t declaration on win32
The fields of this structure are mysteriously defined in the opposite order
on windows as on unix
2011-08-05 11:57:06 -07:00
Rob Arnold
a4951cab7f Add libuv Makefile 2011-08-05 11:57:06 -07:00
Rob Arnold
8229c3fa75 Update libuv to revision ee599ec1141cc48f895de1f9d148033babdf9c2a 2011-08-05 11:57:06 -07:00
Rob Arnold
f4b87c749f Basic async IO module using libuv 2011-08-05 11:57:06 -07:00
Rob Arnold
b64a52df42 Integrate libuv into the build system 2011-08-05 11:57:06 -07:00
Rob Arnold
904f443fa9 Drop in libuv rev 2b5707d834a6b85b8e589ac04cb61a6db2dab94b 2011-08-05 11:57:06 -07:00
Rob Arnold
b6be83885f Log tags in memory_region::{free,realloc}
Make this useful and consistent with the destructor.
2011-08-05 11:57:06 -07:00
Patrick Walton
6bb6922c28 rt: Change int to uint32_t. Put out burning tinderbox. 2011-08-04 09:50:11 -07:00
Patrick Walton
e351ad762d rt: Stub shape glue and implement shape::print and shape::size_of. 2011-08-03 20:25:44 -07:00
Erick Tryzelaar
a8943f3442 timeout_in_ns was renamed to timeout_in_ms. 2011-08-03 19:28:49 -07:00
Eric Holk
7a2e9f4874 Sleep for a nonzero amount of time on Windows. 2011-08-03 18:21:19 -07:00
Brian Anderson
2298a2b29f Whitespace cleanup 2011-08-03 16:25:38 -07:00
Brian Anderson
4ae6c835cb Add some hacks to get stdin piping working more correctly in windows
The way pipes work in windows is not the same as unix, though I'm not
entirely clear on the differences. This patch changes the windows pipe
method to return non-inheritable fds, and the windows rust_run_program
method to duplicate them before spawning the new process.

This allows make-check-pretty to work on windows.
2011-08-03 15:09:00 -07:00
Eric Holk
286be2d94e Adding an intrinsic for recv. 2011-08-01 18:43:05 -07:00
Eric Holk
939bca0d84 Added send and receive to comm library. 2011-08-01 15:58:39 -07:00
Eric Holk
6a6d5c669e Enabling logging in circular_buffer again. 2011-08-01 15:58:39 -07:00
Eric Holk
b3d9d9b73c Objectified library chans and ports. 2011-08-01 15:58:30 -07:00
Eric Holk
5a673cc2c9 Started working on a library-based comm system. Creating and deleting ports work. 2011-08-01 15:58:30 -07:00
Brian Anderson
7b87fa3683 Replace a lock/unlock with scoped_lock in rust_scheduler::create_task 2011-08-01 11:01:59 -07:00
Brian Anderson
d552a0b959 Minimize scheduler locking on task creation
This takes my CPU utilization on task-perf-spawnalot from 35% to 55%
2011-07-29 23:02:51 -07:00
Brian Anderson
6657e729de Lock the new task's scheduler when creating a task
Previously we were locking the spawning task's scheduler. I couldn't
see that that was protecting anything. The newborn_task list in the new task's
scheduler though was unprotected from concurrent access. So now we're locking
the new task's scheduler.
2011-07-29 22:43:11 -07:00
Brian Anderson
9dbe6941c4 Add sched_threads rt function to get the number of scheduler threads 2011-07-29 21:03:17 -07:00
Eric Holk
d1dbb99984 Removing proxies and message queues. 2011-07-29 18:54:59 -07:00
robarnold
bdf2daee1e Merge pull request #781 from robarnold/upstream-stable
More useful leak debugging output.
2011-07-29 09:13:20 -07:00
Brian Anderson
3dd522b6b7 Add an assertion about the lock in rust_chan::disassociate 2011-07-28 16:04:49 -07:00
Brian Anderson
73812cd3de Turn off TRACK_ALLOCATIONS 2011-07-28 14:52:50 -07:00
Brian Anderson
4b356097c2 Change the locking rules around channel disassociation again
This prevents port's destructor from accessing a deleted channel
2011-07-28 14:25:20 -07:00
Brian Anderson
5c0fd045ce Fiddle with the locking around channel disassociation
This still looks a bit sketchy to me (why isn't there locking in
port::destroy?) but this manages to get rid of a problem with channels
accessing their task after it's NULL.
2011-07-28 12:53:44 -07:00
Brian Anderson
b54eb0480d No strnlen on mac 2011-07-28 12:53:14 -07:00
Brian Anderson
0fcd72c932 When using the allow leaks hack don't even print a warning about the leak
This is only used for the test runner and in that case it just makes the test
output confusing
2011-07-28 12:23:01 -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
Brian Anderson
75985ab75e Remove color-related code from rust_log
This is all dead. If someone decides they want color it will be easy to redo.
2011-07-28 12:23:00 -07:00
Eric Holk
3d7016ae95 Updating to work on Windows. 2011-07-28 10:47:29 -07:00
Eric Holk
9618ab67ae Re-enabled the rest of the asserts and things in rust_chan.cpp 2011-07-28 10:47:29 -07:00
Eric Holk
b85dee8d5b Resurrecting some of the logging in rust_chan.cpp 2011-07-28 10:47:28 -07:00
Eric Holk
9ea8476faa Removed outdated comment. 2011-07-28 10:47:28 -07:00
Eric Holk
279844ce9f Atomic reference counting for tasks. 2011-07-28 10:47:28 -07:00