@@ -64,6 +64,7 @@ use crate::sync::atomic::{
6464} ; 
6565use  crate :: sys:: { c,  dur2timeout} ; 
6666use  crate :: time:: Duration ; 
67+ use  core:: ffi:: c_void; 
6768
6869pub  struct  Parker  { 
6970    state :  AtomicI8 , 
@@ -117,7 +118,7 @@ impl Parker {
117118
118119        loop  { 
119120            // Wait for something to happen, assuming it's still set to PARKED. 
120-             c:: WaitOnAddress ( self . ptr ( ) ,  & PARKED  as  * const  _  as  c :: LPVOID ,  1 ,  c:: INFINITE ) ; 
121+             c:: WaitOnAddress ( self . ptr ( ) ,  & PARKED  as  * const  _  as  * const   c_void ,  1 ,  c:: INFINITE ) ; 
121122            // Change NOTIFIED=>EMPTY but leave PARKED alone. 
122123            if  self . state . compare_exchange ( NOTIFIED ,  EMPTY ,  Acquire ,  Acquire ) . is_ok ( )  { 
123124                // Actually woken up by unpark(). 
@@ -144,7 +145,7 @@ impl Parker {
144145        } 
145146
146147        // Wait for something to happen, assuming it's still set to PARKED. 
147-         c:: WaitOnAddress ( self . ptr ( ) ,  & PARKED  as  * const  _  as  c :: LPVOID ,  1 ,  dur2timeout ( timeout) ) ; 
148+         c:: WaitOnAddress ( self . ptr ( ) ,  & PARKED  as  * const  _  as  * const   c_void ,  1 ,  dur2timeout ( timeout) ) ; 
148149        // Set the state back to EMPTY (from either PARKED or NOTIFIED). 
149150        // Note that we don't just write EMPTY, but use swap() to also 
150151        // include an acquire-ordered read to synchronize with unpark()'s 
@@ -177,8 +178,8 @@ impl Parker {
177178        } 
178179    } 
179180
180-     fn  ptr ( & self )  -> c :: LPVOID  { 
181-         core:: ptr:: addr_of!( self . state)   as  c :: LPVOID 
181+     fn  ptr ( & self )  -> * const   c_void  { 
182+         core:: ptr:: addr_of!( self . state) . cast :: < c_void > ( ) 
182183    } 
183184} 
184185
0 commit comments