diff options
| author | Chris Denton <chris@chrisdenton.dev> | 2024-07-14 07:41:14 +0000 |
|---|---|---|
| committer | Chris Denton <chris@chrisdenton.dev> | 2024-07-15 05:01:22 +0000 |
| commit | e2b062c9b5ffbb2a57688cfa6efd9843ad70c454 (patch) | |
| tree | f00ae0d55f19cee669e50bc5cd8dfc9702047dff /library/std/src/sys/thread_local | |
| parent | d8d7c5c3b96b386403c094946fa5d0a8cef3b666 (diff) | |
| download | rust-e2b062c9b5ffbb2a57688cfa6efd9843ad70c454.tar.gz rust-e2b062c9b5ffbb2a57688cfa6efd9843ad70c454.zip | |
Remove DWORD
Diffstat (limited to 'library/std/src/sys/thread_local')
| -rw-r--r-- | library/std/src/sys/thread_local/guard/windows.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sys/thread_local/key/windows.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sys/thread_local/guard/windows.rs b/library/std/src/sys/thread_local/guard/windows.rs index c35b717fe75..f6cd457046f 100644 --- a/library/std/src/sys/thread_local/guard/windows.rs +++ b/library/std/src/sys/thread_local/guard/windows.rs @@ -75,9 +75,9 @@ pub fn enable() { #[link_section = ".CRT$XLB"] #[cfg_attr(miri, used)] // Miri only considers explicitly `#[used]` statics for `lookup_link_section` -pub static CALLBACK: unsafe extern "system" fn(*mut c_void, c::DWORD, *mut c_void) = tls_callback; +pub static CALLBACK: unsafe extern "system" fn(*mut c_void, u32, *mut c_void) = tls_callback; -unsafe extern "system" fn tls_callback(_h: *mut c_void, dw_reason: c::DWORD, _pv: *mut c_void) { +unsafe extern "system" fn tls_callback(_h: *mut c_void, dw_reason: u32, _pv: *mut c_void) { // See comments above for what this is doing. Note that we don't need this // trickery on GNU windows, just on MSVC. #[cfg(all(target_env = "msvc", not(target_thread_local)))] diff --git a/library/std/src/sys/thread_local/key/windows.rs b/library/std/src/sys/thread_local/key/windows.rs index baf23979c7c..8b43e558d5d 100644 --- a/library/std/src/sys/thread_local/key/windows.rs +++ b/library/std/src/sys/thread_local/key/windows.rs @@ -33,11 +33,11 @@ use crate::sync::atomic::{ use crate::sys::c; use crate::sys::thread_local::guard; -pub type Key = c::DWORD; +pub type Key = u32; type Dtor = unsafe extern "C" fn(*mut u8); pub struct LazyKey { - /// The key value shifted up by one. Since TLS_OUT_OF_INDEXES == DWORD::MAX + /// The key value shifted up by one. Since TLS_OUT_OF_INDEXES == u32::MAX /// is not a valid key value, this allows us to use zero as sentinel value /// without risking overflow. key: AtomicU32, |
