@@ -10,9 +10,7 @@ use crate::*;
1010// - kind: i32
1111
1212#[ inline]
13- fn mutexattr_kind_offset < ' tcx > (
14- ecx : & MiriInterpCx < ' tcx > ,
15- ) -> InterpResult < ' tcx , u64 > {
13+ fn mutexattr_kind_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
1614 Ok ( match & * ecx. tcx . sess . target . os {
1715 "linux" | "illumos" | "solaris" | "macos" => 0 ,
1816 os => throw_unsup_format ! ( "`pthread_mutexattr` is not supported on {os}" ) ,
@@ -53,17 +51,11 @@ fn mutexattr_set_kind<'tcx>(
5351/// in `pthread_mutexattr_settype` function.
5452const PTHREAD_MUTEX_NORMAL_FLAG : i32 = 0x8000000 ;
5553
56- fn is_mutex_kind_default < ' tcx > (
57- ecx : & MiriInterpCx < ' tcx > ,
58- kind : i32 ,
59- ) -> InterpResult < ' tcx , bool > {
54+ fn is_mutex_kind_default < ' tcx > ( ecx : & MiriInterpCx < ' tcx > , kind : i32 ) -> InterpResult < ' tcx , bool > {
6055 Ok ( kind == ecx. eval_libc_i32 ( "PTHREAD_MUTEX_DEFAULT" ) )
6156}
6257
63- fn is_mutex_kind_normal < ' tcx > (
64- ecx : & MiriInterpCx < ' tcx > ,
65- kind : i32 ,
66- ) -> InterpResult < ' tcx , bool > {
58+ fn is_mutex_kind_normal < ' tcx > ( ecx : & MiriInterpCx < ' tcx > , kind : i32 ) -> InterpResult < ' tcx , bool > {
6759 let mutex_normal_kind = ecx. eval_libc_i32 ( "PTHREAD_MUTEX_NORMAL" ) ;
6860 Ok ( kind == ( mutex_normal_kind | PTHREAD_MUTEX_NORMAL_FLAG ) )
6961}
@@ -220,9 +212,7 @@ fn rwlock_get_id<'tcx>(
220212// - clock: i32
221213
222214#[ inline]
223- fn condattr_clock_offset < ' tcx > (
224- ecx : & MiriInterpCx < ' tcx > ,
225- ) -> InterpResult < ' tcx , u64 > {
215+ fn condattr_clock_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
226216 Ok ( match & * ecx. tcx . sess . target . os {
227217 "linux" | "illumos" | "solaris" => 0 ,
228218 // macOS does not have a clock attribute.
0 commit comments