Graydon Hoare
3b61064631
Revert all of yesterday's snapshots and try again. Cursed!
2011-12-22 10:30:04 -08:00
Brian Anderson
dedfef4c4c
Revert "wip"
...
This reverts commit aeadc6269e
.
2011-12-20 20:57:04 -08:00
Brian Anderson
854daaec0c
rt: Lock before using the random number generator
...
Seeing crashes here trying to stress test concurrent tasks
2011-12-20 20:56:06 -08:00
Brian Anderson
aeadc6269e
wip
2011-12-20 20:15:09 -08:00
Brian Anderson
128621be97
rt: Remove rust_task::grow. Obsolete
2011-12-20 20:02:57 -08:00
Brian Anderson
cab4da70c8
rt: Don't check the stack canary on most upcalls
2011-12-20 16:50:54 -08:00
Brian Anderson
2a490d1cf8
Revert "rt: Reduce the mac red zone to 2K"
...
This reverts commit ba8f369f89
.
2011-12-20 15:17:30 -08:00
Brian Anderson
ba8f369f89
rt: Reduce the mac red zone to 2K
2011-12-20 14:24:13 -08:00
Brian Anderson
2e230b1cf9
rt: Reduce the linux red zone to 2K
2011-12-20 14:02:59 -08:00
Brian Anderson
6443a7b513
rt: Do fewer stack canary checks
2011-12-20 13:54:47 -08:00
Brian Anderson
93fef2e113
rt: Parenthesize the red zone macros
2011-12-20 11:57:22 -08:00
Brian Anderson
784713ec68
rt: Add a canary value to the end of every stack
...
Check it on upcall entry and exit, and on stack deletion
2011-12-20 11:48:47 -08:00
Brian Anderson
56ec9cb278
rt: Run yet more task_start_wrapper cleanup on the C stack
2011-12-20 10:29:40 -08:00
Brian Anderson
25f7c844df
rt: Don't reuse stack segments when they are not big enough
2011-12-19 22:47:28 -08:00
Brian Anderson
05bf105c90
rt: Rename asm_call_on_stack to __morestack
...
Newer gdb's will backtrace through functions named __morestack even
if they change the stack.
2011-12-19 22:05:40 -08:00
Brian Anderson
edf6e1ec0e
rt: Zero the bottom frame's return address and base pointer
...
My reading of libunwind leads me to believe this is expected.
Closes #1322
2011-12-19 18:47:39 -08:00
Brian Anderson
1bfc4e2e6c
rt: Save and restore %rax/%eax in __morestack
...
This doesn't matter now since we use an out pointer for return
values but it's sure to show up mysteriously someday.
2011-12-19 18:16:21 -08:00
Brian Anderson
c3569abb8c
rt: Remove some unused stack from i386/morestack.S
2011-12-19 18:16:19 -08:00
Brian Anderson
d2e7336a01
rt: Remove unused saves from __morestack
2011-12-19 16:24:10 -08:00
Brian Anderson
50dc80f617
rt: Give upcall_new_stack the same convention as other upcalls
2011-12-19 16:24:10 -08:00
Brian Anderson
bedcaad97e
rt: Give upcall_del_stack the same convention as other upcalls
2011-12-19 16:24:10 -08:00
Brian Anderson
bd6b80c972
rt: Get rid of the rethrow in upcall_fail
...
Throwing in upcall_fail ends up running lots of code in the red zone. To avoid
it we have the personality function figure out which stack it's on and switch
as needed.
2011-12-18 17:17:31 -08:00
Brian Anderson
c73eb8ff51
rt: Create different stack-switching paths for upcalls and shims
...
Shims need to play with the stack limit, upcalls don't. Only one upcall,
upcall_fail is allowed to catch, and we need a find a way to get rid of that
catch as well because it results in _Unwind_Resume running off the end of the
Rust stack.
2011-12-18 16:17:55 -08:00
Brian Anderson
f57fd8de1f
rt: Run the cycle collector on the C stack
2011-12-18 15:23:44 -08:00
Brian Anderson
74d5faa86e
rt: Give each platform its own red zone definition
2011-12-18 15:23:41 -08:00
Brian Anderson
762d7e43a6
rt: Trim the red zone to 20k on all platforms
2011-12-18 15:22:56 -08:00
Brian Anderson
3fa930f598
rt: Remove a bogus FIXME from ~rust_task
2011-12-18 02:09:41 -08:00
Brian Anderson
1a1fdf34b1
rt: Add lots of documentation to __morestack
2011-12-18 02:02:35 -08:00
Brian Anderson
7359fa422b
Revert "rt: Turn on big stacks again. Unwinding still doesn't always succeed on mac"
...
This reverts commit 68f4849f0f
.
2011-12-18 00:42:46 -08:00
Brian Anderson
68f4849f0f
rt: Turn on big stacks again. Unwinding still doesn't always succeed on mac
2011-12-17 17:54:43 -08:00
Brian Anderson
fe683dfb80
rt: Get rid of the valgrind guard bytes at the end of the stack
...
Preventing us from writing beyond our allocations is _what valgrind does_,
so telling valgrind not to let us write to the end of the stack isn't
buying anything.
2011-12-17 16:46:50 -08:00
Brian Anderson
471b4d6e58
rt: Use a DWARF CFI scheme that works on mac in __morestack
2011-12-17 14:10:44 -08:00
Brian Anderson
7da8ab8fab
rt: Turn on stack alignment checks for mac
2011-12-17 14:10:40 -08:00
Brian Anderson
4ac345939c
rt: Cache an extra stack segment to avoid bad behavior at stack boundaries
2011-12-17 13:45:38 -08:00
Brian Anderson
0ed5117a9d
rt: Set the default stack size to 768 bytes. Double on each alloc
2011-12-17 13:45:38 -08:00
Brian Anderson
b5b2ac0ec4
rt: Make 32-bit morestack compatible with fastcc
2011-12-16 18:18:43 -08:00
Brian Anderson
7d51961b6f
rt: Fix saved address of unwinding %rsp in __morestack
...
I haven't thought too deeply about this, but I think I was telling the
unwinder to use the stack pointer for the wrong frame when unwinding. Not sure
how that could have worked at all, but this results in the correct alignment
for cleanups.
2011-12-16 18:18:43 -08:00
Brian Anderson
9d70c1949e
rt: Fix alignment of the call to upcall_del_stack in __morestack
2011-12-16 18:18:43 -08:00
Brian Anderson
23df4de86d
rt: Fix alignment of new stack segments
2011-12-16 18:18:43 -08:00
Brian Anderson
ab4f35c1f1
rt: Only call check_stack_alignment on linux
2011-12-16 18:18:43 -08:00
Brian Anderson
121c420184
rt: Insert stack alignment checks into upcalls
2011-12-16 18:18:43 -08:00
Elly Jones
89e880d613
std: file_is_dir -> path_is_dir, add path_exists
2011-12-16 17:37:21 -05:00
Niko Matsakis
88818334b7
update to not look at descs[], which is not necessarily valid
...
if the input is a statically allocated type_desc
2011-12-16 08:06:45 -08:00
Niko Matsakis
1e3259e119
massive refactor of how closures work
2011-12-15 13:44:06 -08:00
Niko Matsakis
35fe86dab7
export upcall_clone_type_desc
2011-12-14 14:32:25 -08:00
Niko Matsakis
f512e67fb9
clone type desc into exchange heap
2011-12-14 14:32:24 -08:00
Niko Matsakis
6a8cb704d9
get basic code generation working, clone type descs for lambda[send]
2011-12-14 14:32:20 -08:00
Brian Anderson
f0254e1e0d
rt: Add a FIXME to 32-bit __morestack about trashing %eax
2011-12-13 19:13:17 -08:00
Brian Anderson
f332643e7f
rt: Use %ecx instead of %eax during the second half of __morestack
...
If Rust code made use of return values then using %eax here would clobber it
2011-12-13 18:26:56 -08:00
Brian Anderson
32087f5c2a
rt: Don't clobber fastcc argument registers in __morestack
2011-12-13 15:54:14 -08:00
Niko Matsakis
a98dec035f
fix track alloc code
2011-12-12 18:25:17 -08:00
Brian Anderson
1c1bc2f1cd
rt: Remove some duplicated code from 64-bit __morestack
2011-12-12 16:58:21 -08:00
Brian Anderson
887d970fee
rt: Make unwinding through __morestack work on mac
...
Had to bump the min stack size in some of the tests from 256 bytes
to 1024 bytes. Not sure why yet.
2011-12-12 16:15:29 -08:00
Brian Anderson
3e32f6623c
rt: Write CFI instructions that (might) work on mac in __morestack
...
The DW_CFA_val_offset_sf instruction doesn't seem to work on mac,
even after implementing it in the llvm-mc assembler, so now
I'm looking for a different way to communicate the stack pointer
adjustment to the unwinder.
2011-12-12 16:14:17 -08:00
Brian Anderson
7a8e73662d
rt: Make unwinding through __morestack work on mac
...
Had to bump the min stack size in some of the tests from 256 bytes
to 1024 bytes. Not sure why yet.
2011-12-11 18:49:04 -08:00
Brian Anderson
7bc34f63d8
rt: Write CFI instructions that (might) work on mac in __morestack
...
The DW_CFA_val_offset_sf instruction doesn't seem to work on mac,
even after implementing it in the llvm-mc assembler, so now
I'm looking for a different way to communicate the stack pointer
adjustment to the unwinder.
2011-12-11 16:32:36 -08:00
Brian Anderson
b73caec3ce
rt: Call upcall_fail on the C stack
2011-12-11 14:35:18 -08:00
Brian Anderson
5cd08586f6
rt: Add DWARF CFI info to asm_call_on_stack
...
This will allow the unwinder to unwind this function so we can call
upcall_fail on the C stack.
2011-12-11 14:35:09 -08:00
Brian Anderson
4699b6865f
build: Use llvm-mc as our assembler
...
LLVM's assembler understands .cfi pseudo-ops on the mac, which we need in
order to generate frames that can be DWARF-unwound
2011-12-10 18:51:21 -08:00
Brian Anderson
9e6ff44d93
rt: Make __morestack work on win32
2011-12-08 16:47:33 -08:00
Brian Anderson
94b0fee6f1
rt: Reorganize and add documentation for rust_upcall.cpp
2011-12-07 18:50:23 -08:00
Brian Anderson
31fe5d0bd8
rt: Run most upcalls on the C stack
2011-12-07 18:50:23 -08:00
Brian Anderson
81f932e7d7
rt: Fix alignment of stacks generated by __morestack
2011-12-07 14:06:46 -08:00
Brian Anderson
9656ceac60
rt: Put 16 guard bytes at the end of the stack
2011-12-06 22:35:42 -08:00
Brian Anderson
5d1a1dc420
rt: Rename stk_seg.limit to stk_seg.end
...
rust_task is using the word limit it two ways, so one has to change.
2011-12-06 21:45:53 -08:00
Brian Anderson
3d7b89bc4d
rt: Reorganize rust_upcall.cpp a bit
2011-12-06 21:44:19 -08:00
Brian Anderson
00636e3155
rt: Convert log_type and cmp_type upcalls to shim form
2011-12-06 21:44:19 -08:00
Brian Anderson
c11d0b0aa0
rt: Move upcall_cmp_type/upcall_log_type to rust_upcall.cpp
2011-12-06 21:44:18 -08:00
Niko Matsakis
9b7347dd96
modify upcalls to take structs as args
2011-12-06 21:44:18 -08:00
Brian Anderson
9a738fd61d
rt: Various tweaks to make __morestack unwinding work on linux
...
When unwinding through __morestack the stack limit in the TLS is invalidated
and must be reset. Instead of actually landing at __morestack we're
just going to make all our Rust landing pads call upcall_reset_stack_limit,
which will find the stack segment that corresponds to the current stack
pointer and put the limit in the TLS.
Also massively expand the stack segment red zone to make more room for the
dynamic linker. Will fix in the future.
2011-12-06 16:32:41 -08:00
Austin Seipp
b513a5a500
Make valgrind usage more consistent and less error prone.
...
I was still having issues with the build system somehow getting confused
as to which set of valgrind headers to use when compiling rt.
This commit moves all the valgrind headers into their own directory
under rt and makes the usage more consistent. The compiler is now passed
the -DNVALGRIND flag when valgrind is not installed, as opposed to
passing -DHAVE_VALGRIND.
We also pass -I src/rt to the compiler when building rt so you can more
easily import what you want. I also cleaned up some erroneous #includes
along the way.
It should be safe to always just import the local valgrind headers and use
them without question. NVALGRIND turns the operations to no-ops when it
is active, and the build and tests run cleanly with or without.
2011-12-06 01:15:29 -06:00
Brian Anderson
58844aee42
rt: Make stack unwinding work more correctly with stack growth
2011-12-05 17:42:58 -08:00
Brian Anderson
a731f165df
test: Test hitting the dynamic linker in the red zone
2011-12-05 17:20:59 -08:00
Brian Anderson
3b8bfaf534
rt: Use an out pointer for rust_new_stack
...
upcall_call_shim_on_c_stack does not handle return values
2011-12-05 17:11:35 -08:00
Brian Anderson
98cd96ce96
test: Add more tests for stack growth
2011-12-05 14:44:15 -08:00
Brian Anderson
1720bc2e81
rt: Unwind through __morestack on 32-bit linux
2011-12-05 12:10:55 -08:00
Brian Anderson
52d7dc5e0a
rt: Update 32-bit __morestack for recent LLVM changes
2011-12-04 20:40:34 -08:00
Brian Anderson
292663b8ef
rt: Implement 32-bit __morestack for mac
2011-12-02 17:44:23 -08:00
Brian Anderson
c254936f32
rt: Fix __morestack prologue on x86_64 mac
2011-12-02 15:32:51 -08:00
Brian Anderson
691b517fb9
rt: Fix 64-bit linux __morestack
2011-12-01 20:56:05 -08:00
Brian Anderson
3e5b314c0b
rt: Implement __morestack for 64-bit mac. Doesn't unwind yet
2011-12-01 19:44:14 -08:00
Brian Anderson
8bf3d85b9d
rt: Implement record_sp for 64-bit mac
2011-12-01 19:44:13 -08:00
Brian Anderson
1974cf9a81
rt: Move RED_ZONE_SIZE to rust_task.cpp
2011-12-01 15:50:00 -08:00
Brian Anderson
249f017bf2
rt: Add FIXME's about future changes to LLVM's __morestack impl
2011-12-01 15:33:15 -08:00
Brian Anderson
6da1a3fcd6
rt: Refactor record_sp into task::record_stack_limit
2011-12-01 15:26:42 -08:00
Brian Anderson
7476a39e47
stdlib: Implement some preliminary libuv bindings
...
std::uv is intended to be low-level, exactly mirroring the C API.
Difficult to continue the implementation now without scheduler
improvements.
2011-12-01 10:24:21 -08:00
Brian Anderson
f2de42c39a
rt: Reorganize stack growth code
2011-11-30 20:31:33 -08:00
Brian Anderson
dd48a1af58
rt: Remove redundant defs of RUST_DEL_STACK
2011-11-30 20:31:33 -08:00
Brian Anderson
e6ef4d929c
rt: Remove the stack pointer field of stk_seg
2011-11-30 20:31:33 -08:00
Brian Anderson
408d4ec0ef
rt: Remove upcall_alloc_c_stack/call_c_stack, et. al.
...
We are using upcall_call_shim_on_c_stack now
2011-11-30 20:31:32 -08:00
Brian Anderson
037ca7f7cb
rt: Rewrite 32-bit __morestack to use the shim upcall
2011-11-30 20:31:32 -08:00
Brian Anderson
777c3584b9
rt: Request the correct number of bytes on the C stack
2011-11-29 23:01:19 -08:00
Brian Anderson
06f4cb43f6
rt: Delete the entire stack chain on task destruction
...
Unwinding through __morestack on 64-bit Linux seems to be no big deal, and
all we have to do is free the stacks to make unwinding work with split stacks.
2011-11-29 22:22:49 -08:00
Brian Anderson
72baf70748
rt: Conditionalize out the 32-bit __morestack for everything but Linux
...
Currently broken everywhere else
2011-11-29 13:52:34 -08:00
Brian Anderson
8cbba79208
rt: Fix the name of the linux macro in x86_64/morestack.S
2011-11-29 13:50:34 -08:00
Brian Anderson
afb8f01741
rt: Fix calculation of stack args location in x86_64/morestack.S
2011-11-29 13:47:54 -08:00
Brian Anderson
9675343dc9
rt: Fix i386/morestack.S for static linking
2011-11-29 13:47:54 -08:00
Brian Anderson
a9967423f8
rt: Make 64-bit __morestack grow and shrink properly
2011-11-28 21:57:52 -08:00
Brian Anderson
5461c61af2
rt: Remove a FIXME frome x86_64/morestack.S
2011-11-28 20:14:12 -08:00
Brian Anderson
ef20afc36c
rt: Get 64-bit Linux __morestack allocating new stacks
2011-11-28 18:39:18 -08:00
Brian Anderson
3a80d7b0e3
rt: Set hidden visibility on __morestack
...
Each crate will have its own copy of this function, which should not be
exported.
2011-11-28 18:01:39 -08:00
Brian Anderson
28745aa07f
rt: Rename L$bail to .L$bail in i386/morestack.S
2011-11-28 17:10:00 -08:00
Brian Anderson
e075412a92
build: Stop linking morestack.S to rt
...
__morestack has to be linked statically. The odd calling convention on x86_64
results in the arguments to __morestack (r10 & r11) being clobbered by the
dynamic linker. gcc links all the __morestack functions statically.
2011-11-28 16:37:29 -08:00
Brian Anderson
cd75c9ce11
rt: Implement part of the 64-bit __morestack
2011-11-28 16:29:52 -08:00
Brian Anderson
020d8f12a0
rt: Implement record_sp for 64-bit linux
2011-11-27 19:00:26 -08:00
Brian Anderson
93e8783496
rt: Make __morestack build on win32
2011-11-22 18:02:13 -08:00
Brian Anderson
0580d4e77a
rt: Add x86_64 record_sp stub
2011-11-22 18:02:12 -08:00
Brian Anderson
6bdf347418
rt: Make __morestack (without unwinding) work on 32-bit linux
2011-11-22 18:02:10 -08:00
Niko Matsakis
9fa44a41e6
get pure wrappers approach running
2011-11-18 16:32:19 -08:00
Brian Anderson
d6ab8ebb07
rt: Add more comments to rust_task_sleep
2011-11-18 16:02:48 -08:00
Brian Anderson
9aa67052e1
rt: Remove some stack-wasting macros from rust_task::yield
2011-11-18 15:59:10 -08:00
Brian Anderson
71bcba6815
intrinsics: Remove declaration of port_recv
2011-11-18 15:37:14 -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
0f339b481a
rt: Remove a lock from task_start_wrapper that does nothing
2011-11-18 13:38:20 -08:00
Brian Anderson
3cfcdb4bb2
rt: Replace two uses of yield with ctx->swap
...
These uses aren't really doing a full yield. They are just giving up control
to the scheduler and will never return.
2011-11-18 13:38:18 -08:00
Brian Anderson
57b43b53f9
rt: Add comments to rust_task::yield
2011-11-18 13:28:12 -08:00
Brian Anderson
d1ef29ab37
rt: rust_task::conclude_failure doesn't need to call unblock
2011-11-18 13:23:27 -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
93931311ff
rt: Add FIXMEs about races in rust_task
2011-11-18 10:32:27 -08:00
Brian Anderson
0dfa1410d3
rt: Remove task::on_wakeup. Unused
2011-11-18 10:32:27 -08:00
Brian Anderson
63d40b8ab6
rt: Remove some unnecessary setting of rust_task::killed
...
The value of this variable doesn't matter after the task fails.
2011-11-18 10:32:27 -08:00
Brian Anderson
d52888f0ba
rt: Remove rust_task::yield. Unused
2011-11-18 10:32:27 -08:00
Brian Anderson
5e9f9e8c48
rt: Add some comments about methods that run on the Rust stack
2011-11-18 10:32:27 -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
eecbc815ac
intrinsics: Add some comments
2011-11-18 10:32:27 -08:00
Brian Anderson
3feaecd757
intrinsics: Move the call to upcall_fail out of rust_intrinsic_cast
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
Niko Matsakis
eff7fae7b9
comparing/walking two pointers still aligns same as 1 ptr
2011-11-17 15:41:45 -08:00
Niko Matsakis
60e93cd1ec
Re-enable cycle coll. on x86_64, seems to work better now.
2011-11-17 14:40:03 -08:00
Niko Matsakis
f597971441
make ref cnts a long not an int
2011-11-17 14:23:48 -08:00
Niko Matsakis
11187437c5
Merge branch 'master' of github.com:graydon/rust
2011-11-17 13:44:04 -08:00
Brian Anderson
6a0e85b81c
Remove intrinsic_2 functions
2011-11-17 13:23:35 -08:00
Niko Matsakis
f9231e932c
add an extra underscore
2011-11-17 12:02:15 -08:00
Brian Anderson
dd275cd749
Stop using temporary intrinsic_2 functions
2011-11-17 11:55:04 -08:00
Brian Anderson
30871408a6
rt: Remove debug printf in rust_start
2011-11-17 11:48:10 -08:00
Brian Anderson
a92699fe58
rt: Make morestack link on x86_64. Still utterly broken
2011-11-17 11:12:59 -08:00
Brian Anderson
d624e523c9
rt: Make stack growth code build on Linux
2011-11-17 10:53:06 -08:00
Patrick Walton
e6c3c4e48c
rt: More work on morestack
2011-11-17 10:52:59 -08:00
Brian Anderson
02cebbb9f1
Revert "rt: More work on morestack"
...
This reverts commit 68aff2ad6d
.
2011-11-16 18:49:19 -08:00
Brian Anderson
5559e149e4
Revert "rt: Make stack growth code build on Linux"
...
This reverts commit da4b7da4e1
.
2011-11-16 18:49:07 -08:00
Brian Anderson
da4b7da4e1
rt: Make stack growth code build on Linux
2011-11-16 18:33:00 -08:00
Patrick Walton
68aff2ad6d
rt: More work on morestack
2011-11-16 18:00:57 -08:00
Brian Anderson
8199558443
rt: Remove an unnecessary check from rust_task::yield
2011-11-16 17:55:04 -08:00
Brian Anderson
bae817efe6
rt: Remove rust_task::notify_tasks_wating_to_join
2011-11-16 17:22:14 -08:00
Brian Anderson
342dc21d2c
Disconnect ports before draining them. Issue #1155
2011-11-16 17:22:14 -08:00
Niko Matsakis
cbcdeb80d9
remove wrappers from intrinsics
2011-11-16 15:27:08 -08:00
Brian Anderson
d2199e8716
Various fixes for x86_64 on linux
...
Configure LLVM correctly, use the right data layout, add the readlink
function back, fix C constants, etc.
2011-11-16 15:24:56 -08:00
Niko Matsakis
5aaafa704f
adjust alignment, size of tag variant id and make it easy to
...
adjust in the future
2011-11-16 15:16:43 -08:00
Niko Matsakis
26b0662fb8
fix alignment for chan_handle structs; rust equiv is translated
...
to char[16], not struct{long,long}
2011-11-16 15:16:42 -08:00
Niko Matsakis
69911c2bc1
temp. disable cycle coll. on x86_64
2011-11-16 15:16:41 -08:00
Niko Matsakis
b78c096ebc
enum does not have a size consistent with a tag, so use unsigned long instead
2011-11-16 15:16:41 -08:00
Niko Matsakis
59e2a0a9c1
add shim upcall func
2011-11-16 15:16:40 -08:00
Niko Matsakis
3617f0377f
correct alignment
2011-11-16 15:16:40 -08:00
Niko Matsakis
85083ec51b
begin efforts to use shim functions for c-stack calls
2011-11-16 15:16:40 -08:00
Patrick Walton
b3cf0c4d1b
Revert "rt: More work on morestack"
...
This reverts commit ced0d4f15e
.
2011-11-14 16:20:53 -08:00
Patrick Walton
ced0d4f15e
rt: More work on morestack
2011-11-14 16:17:08 -08:00
Brian Anderson
5b9f76eb7c
stdlib: Run cleanups on data that fails to send
2011-11-14 14:07:52 -08:00
Brian Anderson
f619d5e9e2
rt: Add locking invariants to rust_port
2011-11-13 16:38:34 -08:00
Brian Anderson
58e923de6e
rt: Perform task notification before killing the parent task
2011-11-13 16:36:47 -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
a6f9f73f06
rt: Make rust_port's ref counting non-atomic
...
Now that the task lock must be held there's no need for atomicity
2011-11-11 16:12:48 -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
07771ec25b
Fix run-fail/spawnfail
...
Catch the case where a parent is killed immediately before it terminates
normally.
2011-11-11 14:20:00 -08:00
Brian Anderson
2385deaa0d
rt: Add locking invariants to rust_task
2011-11-11 12:11:21 -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
f705f68121
rt: Remove rust_aio.cpp. Bitrotted.
2011-11-10 18:02:08 -08:00
Brian Anderson
793da65a8e
rt: Move rust_chan::send to rust_port::send
2011-11-10 17:53:19 -08:00
Brian Anderson
371574f64b
rt: Remove rust_token. Unused
2011-11-10 17:35:21 -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
Niko Matsakis
7baf68b0bd
hack around the problem that x86_64 expects first few args in regs.
...
call on c-stack expects all data to be delivered on the stack.
2011-11-09 20:05:49 -08:00
Niko Matsakis
fc064f4410
use uint64_t when adjusting stack ptr
2011-11-09 20:05:49 -08:00
Niko Matsakis
ff5b319ce5
correct stack alignment
2011-11-08 21:14:09 -08:00
Niko Matsakis
2edd3135ad
cleanup, removing comments and dead code
2011-11-08 21:14:09 -08:00
Niko Matsakis
1a28ad4fa4
fix bug in loading argument regs
2011-11-08 21:14:09 -08:00
Niko Matsakis
b30a76ed1b
correct calling convention for x86_64
2011-11-08 21:14:09 -08:00
Niko Matsakis
0668eed81e
fix alignment of xmm register storage
2011-11-08 21:11:47 -08:00
Niko Matsakis
e24d1dd6f5
rewrite so that memory allocations have 0 overhead by default
2011-11-08 21:11:47 -08:00
Niko Matsakis
75b98a9076
Correct the arithmetic on 64-bit builds.
2011-11-08 21:11:47 -08:00
Erick Tryzelaar
1c87b9708c
Removing the baked in libuv.
2011-11-08 19:01:47 -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
Erick Tryzelaar
a727bbaf70
Revert "Removing the baked in libuv."
...
This reverts commit df30663fdd
.
2011-11-07 21:38:33 -08:00
Erick Tryzelaar
e8519b5b2f
Revert "Reimporting libuv as a submodule."
...
This reverts commit cbae254d8a
.
2011-11-07 21:38:18 -08:00
Erick Tryzelaar
cbae254d8a
Reimporting libuv as a submodule.
...
Closes #1152 .
2011-11-07 21:34:17 -08:00
Erick Tryzelaar
df30663fdd
Removing the baked in libuv.
2011-11-07 21:34:17 -08:00
Brian Anderson
8857657640
Rename rust_uv.cpp to rust_aio.cpp
2011-11-07 19:35:39 -08:00
Brian Anderson
fdeb5ba304
Upgrade libuv to f1859eb841be2fe48512bc10e64556383f408b01
2011-11-07 19:24:25 -08:00
Brian Anderson
b0c2416270
Clean up logging output. Closes #1088
2011-11-07 14:14:36 -08:00
Niko Matsakis
b578ed9b2a
add required symbols
2011-11-02 14:14:20 -07:00
Niko Matsakis
0982c7f78c
hastily port so we don't fail to build
2011-11-02 14:14:20 -07:00
Niko Matsakis
f1bc9307d8
get things checking on ia32
2011-11-02 14:14:19 -07:00
Niko Matsakis
f05761ddb3
enable intrinsics for multiple arch
2011-11-02 14:13:22 -07:00
Niko Matsakis
20946e6970
start going back to an i386 build
2011-11-02 14:13:22 -07:00
Niko Matsakis
8011e3fabb
hack around on makefiles trying to get a 64 bit build
...
right now there are many temporary hacks, search for NDM to find them
2011-11-02 14:13:22 -07:00
Niko Matsakis
020cd360e1
modify x64 assembly and so forth
2011-11-02 14:13:22 -07:00