File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -76,24 +76,24 @@ impl Condvar {
7676
7777 #[ inline]
7878 pub unsafe fn wait ( & self , mutex : & Mutex ) {
79- let mutex = mutex:: raw ( mutex) ;
79+ let mutex = unsafe { mutex:: raw ( mutex) } ;
8080 self . verify ( mutex) ;
81- let r = libc:: pthread_cond_wait ( raw ( self ) , mutex) ;
81+ let r = unsafe { libc:: pthread_cond_wait ( raw ( self ) , mutex) } ;
8282 debug_assert_eq ! ( r, 0 ) ;
8383 }
8484
8585 pub unsafe fn wait_timeout ( & self , mutex : & Mutex , dur : Duration ) -> bool {
8686 use crate :: sys:: time:: Timespec ;
8787
88- let mutex = mutex:: raw ( mutex) ;
88+ let mutex = unsafe { mutex:: raw ( mutex) } ;
8989 self . verify ( mutex) ;
9090
9191 let timeout = Timespec :: now ( libc:: CLOCK_MONOTONIC )
9292 . checked_add_duration ( & dur)
9393 . and_then ( |t| t. to_timespec ( ) )
9494 . unwrap_or ( TIMESPEC_MAX ) ;
9595
96- let r = pthread_cond_timedwait ( raw ( self ) , mutex, & timeout) ;
96+ let r = unsafe { pthread_cond_timedwait ( raw ( self ) , mutex, & timeout) } ;
9797 assert ! ( r == libc:: ETIMEDOUT || r == 0 ) ;
9898 r == 0
9999 }
You can’t perform that action at this time.
0 commit comments