Vytautas Astrauskas
6842eb2b84
Rename global tls dtor to thread dtor.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
69df2e19de
Move prctl to Linux specific shims.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
d6c03926ab
Rename MacOS set global dtor function.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
46fd333daa
Implement thread::yield_now.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
d062f63519
Fix support for MacOS.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
1d0eb93ebd
Fix typo in a comment.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
325c31e578
Address some of the reviewers comments.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
2202278f6a
Fix pthread_self.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
f21197f081
Store the thread name.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
1f33f04fd4
Move pthread_create and related shims to a separate file.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
58a6a2729a
Add a warning that Miri does not check for data-races.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
82f17ab917
Implement basic support for concurrency (Linux only).
2020-04-27 14:23:32 -07:00
David Cook
54897f66f8
Implement ftruncate64/ftruncate for File::set_len
2020-04-21 21:17:54 -05:00
bors
8d9db57a0d
Auto merge of #1335 - vakaras:add-threads-noop, r=RalfJung
...
Move the stack to the evaluator. (no-op PR for 70598)
The changes to Miri to make it to compile with Rustc PR https://github.com/rust-lang/rust/pull/70598 .
2020-04-20 08:39:29 +00:00
Vytautas Astrauskas
5224c72403
Move the stack to the evaluator to make Miri compile with the newest Rustc.
2020-04-20 09:19:37 +02:00
David Cook
7b69a6271e
Add support for std: 🧵 :yield_now
2020-04-18 19:31:02 -05:00
Samrat Man Singh
5f6d250b30
[macOS] Implement mach_timebase_info
...
Since we return nanoseceonds instead of ticks from
`mach_absolute_time`, we don't need to scale the absolute time
2020-04-13 21:18:34 +05:30
David Cook
0f5f0e1520
Fix spelling typo
2020-04-05 20:55:39 -05:00
David Cook
79f3307f30
Update comments, rearrange code
2020-04-05 12:09:31 -05:00
David Cook
8293d80b53
Set explicit return value size for windows shim
2020-04-05 10:36:14 -05:00
David Cook
e1a1592991
Set some explicit return value sizes
2020-04-05 10:35:08 -05:00
David Cook
37ddde9f70
Implement TryEnterCriticalSection
2020-04-05 10:33:32 -05:00
David Cook
dd9896b0f8
Implement mutex and rwlock functions
2020-04-05 10:03:22 -05:00
David Cook
88f319fb4c
Add failing tests for mutex and rwlock
2020-04-05 09:25:21 -05:00
David Cook
46679bc9ef
Add shims for RwLock::try_read/RwLock::try_write
2020-04-05 09:25:21 -05:00
bors
0e8a1a40f2
Auto merge of #1294 - JOE1994:windows_instant, r=RalfJung
...
Add support for 'std::time::Instant' in Windows
Add support for creating `std::time::Instant` in Windows
Includes shims for `QueryPerformanceCounter` & `QueryPerformanceFrequency` in Windows, which are both called in Windows when `std::time::Instant` is created.
Windows docs page ["Acquiring high-resolution time stamps"](https://docs.microsoft.com/en-us/windows/win32/sysinfo/acquiring-high-resolution-time-stamps ) was helpful in learning how `QueryPerformanceCounter` & `QueryPerformanceFrequency` work.
closes #1291
2020-04-03 06:36:15 +00:00
Ralf Jung
9f3383d55d
rustup for import changes
2020-04-03 00:05:35 +02:00
JOE1994
957ec2be10
Add support for 'std::time::Instant' in Windows
2020-04-01 20:35:56 -04:00
JOE1994
b3f9e53049
Implement 'GetSystemTimeAsFileTime' shim for Windows
2020-04-01 10:55:26 -04:00
Ralf Jung
8948a29a4c
adjust for librustc rename; reduce 'extern crate' to rustc crates
2020-03-30 11:07:32 +02:00
JOE1994
1141b21e50
Windows shims for GetCurrentDirectoryW/SetCurrentDirectoryW
2020-03-29 11:30:08 -04:00
Ralf Jung
d6795a77b4
precise getrandom return type and align_offset arithmetic
2020-03-28 17:47:00 +01:00
Ralf Jung
fbbca59de7
avoid Scalar::from_(u)int in favor of giving the size explicitly
2020-03-28 17:35:40 +01:00
Ralf Jung
6ab82f5d35
posix_fadvise is Linux-only; also validate arguments a bit
2020-03-28 11:33:56 +01:00
Ralf Jung
9e39bfbbd9
organize shims and make some only available to libstd as they are incomplete
2020-03-28 11:15:11 +01:00
Ralf Jung
02897e03cf
cleanup tcx usage and a few comments
2020-03-28 09:50:24 +01:00
bors
f4308a0728
Auto merge of #1267 - RalfJung:macos-dtors, r=RalfJung
...
implement TLS cleanup for macOS
Now that I can run macOS interpretation locally, this was not that hard to fix. ;)
Fixes https://github.com/rust-lang/miri/issues/443
2020-03-28 07:55:42 +00:00
Ralf Jung
da5f2f305b
implement TLS cleanup for macOS
2020-03-27 19:39:00 +01:00
JOE1994
4e38fbe6be
follow-up2 to review (few issues not resolved yet)
2020-03-27 08:43:50 -04:00
JOE1994
2051805e95
follow-up to reviews
2020-03-27 08:43:50 -04:00
JOE1994
2fa07009f2
Windows shims for env var emulation
...
Shims for GetEnvironmentVariableW / SetEnvironmentVariableW /
GetEnvironmentStringsW.
Passes test 'tests/run-pass/env.rs'
2020-03-27 08:43:08 -04:00
Ralf Jung
b4b8750e44
bump Rust; HashMap should now work on macOS even with isolation
2020-03-23 10:34:15 +01:00
Ralf Jung
f430e54456
implement mach_absolute_time for macOS
2020-03-20 16:15:37 +01:00
Ralf Jung
681819c8ad
getting a path should never fail
...
we basically treat them as lang items
2020-03-19 08:26:08 +01:00
Ralf Jung
e6e8773272
start messages in lower-case
2020-03-19 08:25:08 +01:00
Ralf Jung
1103a10e2c
adjust for error reform
2020-03-19 08:25:08 +01:00
Ralf Jung
8b6af3eacb
avoid using unchecked casts or arithmetic
2020-03-17 15:21:43 +01:00
Christian Poveda
5dc60d974b
move environ place to EnvVars
2020-03-08 11:58:20 -05:00
Christian Poveda
8392a0c589
only expose environ on linux
2020-03-08 10:16:31 -05:00
Christian Poveda
e31b8b3342
add _NSGetEnviron
foreign function for macos
2020-03-07 10:06:20 -05:00