Commit Graph

4431 Commits

Author SHA1 Message Date
Chase Albert
4d3dff2add Address consistency of naming for unused/merely validated arguments. 2020-05-04 13:51:23 -04:00
Chase Albert
46aaab30fe Add a test for check_arg_count. 2020-05-04 13:51:23 -04:00
Chase Albert
78f329513a Check that shims are called with the correct number of arguments 2020-05-04 13:51:21 -04:00
bors
a49234ebaf Auto merge of #1392 - RalfJung:win-lock-check, r=RalfJung
Windows lock primitives: check that we are truly single-threaded

Also rustup because why not.
2020-05-04 07:45:35 +00:00
Ralf Jung
ec95ed4556 rename single-threaded sync test 2020-05-04 09:45:15 +02:00
Ralf Jung
65c3914a29 rustup 2020-05-04 09:43:09 +02:00
Ralf Jung
61a86e1ffe Windows lock primitives: check that we are truly sinle-threaded 2020-05-04 09:37:40 +02:00
bors
1e87c9f8ba Auto merge of #1390 - RalfJung:conc, r=RalfJung
Make spin_loop yield, and a panicking thread test

@vakaras agreed it would make sense to make `spin_loop` yield, so this implements that.

Also add a test for a panic being raised in one thread, caught by the panic machinery, and then expose through the join handle. Miraculously, that just works. :)
2020-05-03 11:23:47 +00:00
Ralf Jung
6b18f6e106 fix setting thread name on macOS 2020-05-03 13:22:56 +02:00
Ralf Jung
6680118588 de-duplicate <unnamed> default thread name 2020-05-03 12:56:38 +02:00
Ralf Jung
f2f4e6fc65 also test panic from thread with name 2020-05-03 12:51:48 +02:00
Ralf Jung
c26fb591fa also test std::hint::spin_loop 2020-05-03 12:47:23 +02:00
Ralf Jung
2b591b849f test panics in threads 2020-05-03 12:43:38 +02:00
Ralf Jung
994b13eaee yield on x86 'pause' hint 2020-05-03 12:43:38 +02:00
Ralf Jung
ff1f0b06cc explain what happens in a test 2020-05-03 12:43:38 +02:00
bors
9ec526478f Auto merge of #1387 - RalfJung:rustup, r=RalfJung
bump Rust, fix warnings
2020-05-03 10:10:57 +00:00
Ralf Jung
1578540959 bump Rust, fix warnings 2020-05-03 12:10:24 +02:00
bors
6ded8aadab Auto merge of #1386 - RalfJung:trophy, r=RalfJung
trophy case: consistent wording (X doing Y)
2020-05-02 09:41:31 +00:00
bors
ee05ad8617 Auto merge of #1383 - brson:tikv-trophy, r=RalfJung
Add another tikv stacked borrowing error to trophy case

@RalfJung please update it with whatever language is most correct :)
2020-05-02 09:21:54 +00:00
Ralf Jung
df4623e5d8 trophy case: consistent wording (X doing Y) 2020-05-02 11:08:20 +02:00
Ralf Jung
15c299e657
Adjust wording 2020-05-02 11:04:45 +02:00
bors
7259bc30ab Auto merge of #1385 - RalfJung:rustup, r=RalfJung
rustup

before making a rustc PR, just to be sure
2020-05-02 09:01:14 +00:00
Ralf Jung
ee6460e763 rustup 2020-05-02 11:00:37 +02:00
bors
4d934fbb3e Auto merge of #1384 - RalfJung:rustup, r=RalfJung
rustup for fixed error messages
2020-05-02 00:17:20 +00:00
Ralf Jung
dbd6403955 rustup for fixed error messages 2020-05-02 02:13:48 +02:00
Brian Anderson
5e25dfaef8 Add another tikv stacked borrowing error to trophy case 2020-05-01 21:34:16 +00:00
bors
d606172f32 Auto merge of #1381 - RalfJung:rustup, r=RalfJung
rustup; fix for changed error messages
2020-05-01 12:44:29 +00:00
Ralf Jung
393165f859 rustup; fix for changed error messages 2020-05-01 14:43:59 +02:00
bors
04f235d555 Auto merge of #1380 - RalfJung:rustup, r=RalfJung
rustup, adjust error messages
2020-05-01 08:30:25 +00:00
Ralf Jung
1a704a517a rustup, adjust error messages 2020-05-01 10:29:39 +02:00
bors
6c4be68b79 Auto merge of #1379 - RalfJung:macos-fn-name, r=RalfJung
make sure macos function has 'macos' in its name

also tiny README tweak
2020-04-30 17:40:40 +00:00
Ralf Jung
580c1194d9 README tweak 2020-04-30 19:39:56 +02:00
Ralf Jung
ba670d6970 make sure macos function has 'macos' in its name 2020-04-30 19:38:17 +02:00
bors
351d46d3fb Auto merge of #1284 - vakaras:add-threads-cr2, r=RalfJung
Implement basic support for concurrency (Linux/macos only)

Changes  (most new code is in `src/threads.rs` and `src/shims/foreign_items/posix.rs`):

1. Move the stack from `Machine` to a newly created `Thread` struct.
2. Add a `ThreadSet` struct that manages the threads.
3. Change `canonical_alloc_id` to create a unique allocation id for each thread local and thread (the responsible struct is `ThreadLocalStorage`)
4. Change the code to execute the thread local destructors immediately when a thread terminates.
5. Add the most basic round-robin scheduler.

This pull request depends on [these changes to the compiler](https://github.com/rust-lang/rust/pull/70598).
2020-04-30 16:21:43 +00:00
Vytautas Astrauskas
48da0cf489 Fix prctl SET_NAME and GET_NAME behaviour. 2020-04-30 08:35:59 -07:00
bors
7aecd7099d Auto merge of #1377 - brson:servo-trophy, r=RalfJung
Add servo_arc to trophy case
2020-04-30 08:41:33 +00:00
Ralf Jung
1aabd6da75
Tweak error wording 2020-04-30 10:24:57 +02:00
bors
4f9e1db8d5 Auto merge of #1378 - RalfJung:workspace-error, r=RalfJung
more helpful error on workspaces
2020-04-30 08:20:25 +00:00
Ralf Jung
e9212d14ac more helpful error on workspaces 2020-04-30 10:19:34 +02:00
Brian Anderson
488f3801e2 Add servo_arc to trophy case 2020-04-30 00:03:43 +00:00
Vytautas Astrauskas
603ec0b3d8 Fix a regression in Windows dtors. 2020-04-29 15:20:26 -07:00
Vytautas Astrauskas
0e052ab897 Use Entry API in set_dtors_running. 2020-04-29 15:12:09 -07:00
Vytautas Astrauskas
46b03174d0 Improve code readability and comments. 2020-04-29 13:16:22 -07:00
bors
dc91c172a4 Auto merge of #1375 - RalfJung:rustup, r=RalfJung
rustup for more LocalDefId changes
2020-04-28 08:31:05 +00:00
Ralf Jung
a5445e0230 rustup for more LocalDefId changes 2020-04-28 10:30:21 +02:00
Vytautas Astrauskas
3b5854191c Fix MacOS and Windows builds. 2020-04-27 15:21:01 -07:00
Vytautas Astrauskas
1355574beb Delete remaining tls entries after all destructors completed. 2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
df2ca53b69 Make From implementations non-failing. 2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
c56ef31780 Improve comments. 2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
331dbd1469 Add a test for joining in a destructor. 2020-04-27 14:26:36 -07:00