diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-11-10 14:57:53 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-11-10 17:51:56 -0800 |
| commit | 7407bcc1a2aa46949d3dadd1d9b79c76ad18d4cf (patch) | |
| tree | 5719bee6a4d111ae19f9759274d1322fee62199a /src/libstd/rt | |
| parent | b5e602ac563422e13a18be9f79100f96359d582a (diff) | |
| download | rust-7407bcc1a2aa46949d3dadd1d9b79c76ad18d4cf.tar.gz rust-7407bcc1a2aa46949d3dadd1d9b79c76ad18d4cf.zip | |
Register new snapshots
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/thread.rs | 12 | ||||
| -rw-r--r-- | src/libstd/rt/thread_local_storage.rs | 15 |
2 files changed, 4 insertions, 23 deletions
diff --git a/src/libstd/rt/thread.rs b/src/libstd/rt/thread.rs index 9838a191197..b21a8f5981d 100644 --- a/src/libstd/rt/thread.rs +++ b/src/libstd/rt/thread.rs @@ -118,16 +118,8 @@ impl Drop for Thread { } } -#[cfg(windows, target_arch = "x86")] -extern "stdcall" { - fn CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES, dwStackSize: SIZE_T, - lpStartAddress: extern "C" fn(*libc::c_void) -> rust_thread_return, - lpParameter: LPVOID, dwCreationFlags: DWORD, lpThreadId: LPDWORD) -> HANDLE; - fn WaitForSingleObject(hHandle: HANDLE, dwMilliseconds: DWORD) -> DWORD; -} - -#[cfg(windows, target_arch = "x86_64")] -extern { +#[cfg(windows)] +extern "system" { fn CreateThread(lpThreadAttributes: LPSECURITY_ATTRIBUTES, dwStackSize: SIZE_T, lpStartAddress: extern "C" fn(*libc::c_void) -> rust_thread_return, lpParameter: LPVOID, dwCreationFlags: DWORD, lpThreadId: LPDWORD) -> HANDLE; diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs index ddb104240f2..4ae1fe59a37 100644 --- a/src/libstd/rt/thread_local_storage.rs +++ b/src/libstd/rt/thread_local_storage.rs @@ -88,8 +88,8 @@ pub unsafe fn get(key: Key) -> *mut c_void { TlsGetValue(key) } -#[cfg(windows, target_arch = "x86")] -extern "stdcall" { +#[cfg(windows)] +extern "system" { fn TlsAlloc() -> DWORD; // See the reasoning in pthread_getspecific as to why this has the @@ -101,17 +101,6 @@ extern "stdcall" { fn TlsSetValue(dwTlsIndex: DWORD, lpTlsvalue: LPVOID) -> BOOL; } -#[cfg(windows, target_arch = "x86_64")] -extern { - fn TlsAlloc() -> DWORD; - - // See above. - #[rust_stack] - fn TlsGetValue(dwTlsIndex: DWORD) -> LPVOID; - #[rust_stack] - fn TlsSetValue(dwTlsIndex: DWORD, lpTlsvalue: LPVOID) -> BOOL; -} - #[test] fn tls_smoke_test() { use cast::transmute; |
