@@ -91,7 +91,7 @@ pub fn park() {
9191 while token_count < 0 {
9292 unsafe {
9393 synchapi:: WaitOnAddress (
94- token_count_cell. as_mut_ptr ( ) . cast ( ) , // location to watch
94+ token_count_cell. as_ptr ( ) . cast ( ) , // location to watch
9595 addr_of ! ( token_count) . cast_mut ( ) . cast ( ) , // undesired value
9696 std:: mem:: size_of :: < isize > ( ) , // value size
9797 INFINITE , // timeout
@@ -116,7 +116,7 @@ impl Thread {
116116 let _guard = self . data . remote_op_mutex . lock ( ) . unwrap ( ) ;
117117 let token_count_cell = & self . data . token_count ;
118118 if token_count_cell. fetch_add ( 1 , Ordering :: Relaxed ) == -1 {
119- unsafe { synchapi:: WakeByAddressAll ( token_count_cell. as_mut_ptr ( ) . cast ( ) ) } ;
119+ unsafe { synchapi:: WakeByAddressAll ( token_count_cell. as_ptr ( ) . cast ( ) ) } ;
120120 unsafe { processthreadsapi:: ResumeThread ( self . data . hthread ) } ;
121121 }
122122 }
@@ -256,7 +256,7 @@ mod mutex {
256256 {
257257 unsafe {
258258 synchapi:: WaitOnAddress (
259- self . locked . as_mut_ptr ( ) . cast ( ) , // location to watch
259+ self . locked . as_ptr ( ) . cast ( ) , // location to watch
260260 [ true ] . as_ptr ( ) . cast_mut ( ) . cast ( ) , // undesired value
261261 std:: mem:: size_of :: < bool > ( ) , // value size
262262 INFINITE , // timeout
@@ -283,7 +283,7 @@ mod mutex {
283283 #[ inline]
284284 fn drop ( & mut self ) {
285285 self . locked . store ( false , Ordering :: Release ) ;
286- unsafe { synchapi:: WakeByAddressSingle ( self . locked . as_mut_ptr ( ) . cast ( ) ) } ;
286+ unsafe { synchapi:: WakeByAddressSingle ( self . locked . as_ptr ( ) . cast ( ) ) } ;
287287 }
288288 }
289289
0 commit comments