@@ -91,7 +91,7 @@ pub fn park() {
91
91
while token_count < 0 {
92
92
unsafe {
93
93
synchapi:: WaitOnAddress (
94
- token_count_cell. as_mut_ptr ( ) . cast ( ) , // location to watch
94
+ token_count_cell. as_ptr ( ) . cast ( ) , // location to watch
95
95
addr_of ! ( token_count) . cast_mut ( ) . cast ( ) , // undesired value
96
96
std:: mem:: size_of :: < isize > ( ) , // value size
97
97
INFINITE , // timeout
@@ -116,7 +116,7 @@ impl Thread {
116
116
let _guard = self . data . remote_op_mutex . lock ( ) . unwrap ( ) ;
117
117
let token_count_cell = & self . data . token_count ;
118
118
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 ( ) ) } ;
120
120
unsafe { processthreadsapi:: ResumeThread ( self . data . hthread ) } ;
121
121
}
122
122
}
@@ -256,7 +256,7 @@ mod mutex {
256
256
{
257
257
unsafe {
258
258
synchapi:: WaitOnAddress (
259
- self . locked . as_mut_ptr ( ) . cast ( ) , // location to watch
259
+ self . locked . as_ptr ( ) . cast ( ) , // location to watch
260
260
[ true ] . as_ptr ( ) . cast_mut ( ) . cast ( ) , // undesired value
261
261
std:: mem:: size_of :: < bool > ( ) , // value size
262
262
INFINITE , // timeout
@@ -283,7 +283,7 @@ mod mutex {
283
283
#[ inline]
284
284
fn drop ( & mut self ) {
285
285
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 ( ) ) } ;
287
287
}
288
288
}
289
289
0 commit comments