about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-11-10 21:56:08 -0800
committerbors <bors@rust-lang.org>2013-11-10 21:56:08 -0800
commit46100c06223f737a7604b46667800ed42cf20d3b (patch)
tree03a4791a263cabaa75471632553f1adc3aa9ab30 /src/libstd/rt
parent63cfc9989d62e0047c2f9597d2b2283717397dea (diff)
parent7407bcc1a2aa46949d3dadd1d9b79c76ad18d4cf (diff)
downloadrust-46100c06223f737a7604b46667800ed42cf20d3b.tar.gz
rust-46100c06223f737a7604b46667800ed42cf20d3b.zip
auto merge of #10408 : alexcrichton/rust/snapshots, r=huonw
Mostly just using the `system` abi where possible.
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/thread.rs12
-rw-r--r--src/libstd/rt/thread_local_storage.rs15
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;