@@ -11,7 +11,7 @@ use crate::*;
11
11
#[ inline]
12
12
fn mutexattr_kind_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
13
13
Ok ( match & * ecx. tcx . sess . target . os {
14
- "linux" | "illumos" | "solaris" | "macos" | "freebsd" => 0 ,
14
+ "linux" | "illumos" | "solaris" | "macos" | "freebsd" | "android" => 0 ,
15
15
os => throw_unsup_format ! ( "`pthread_mutexattr` is not supported on {os}" ) ,
16
16
} )
17
17
}
@@ -76,7 +76,7 @@ fn mutex_id_offset<'tcx>(ecx: &MiriInterpCx<'tcx>) -> InterpResult<'tcx, u64> {
76
76
// When adding a new OS, make sure we also support all its static initializers in
77
77
// `mutex_kind_from_static_initializer`!
78
78
let offset = match & * ecx. tcx . sess . target . os {
79
- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
79
+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
80
80
// macOS stores a signature in the first bytes, so we have to move to offset 4.
81
81
"macos" => 4 ,
82
82
os => throw_unsup_format ! ( "`pthread_mutex` is not supported on {os}" ) ,
@@ -105,7 +105,7 @@ fn mutex_id_offset<'tcx>(ecx: &MiriInterpCx<'tcx>) -> InterpResult<'tcx, u64> {
105
105
check_static_initializer ( "PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP" ) ;
106
106
check_static_initializer ( "PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP" ) ;
107
107
}
108
- "illumos" | "solaris" | "macos" | "freebsd" => {
108
+ "illumos" | "solaris" | "macos" | "freebsd" | "android" => {
109
109
// No non-standard initializers.
110
110
}
111
111
os => throw_unsup_format ! ( "`pthread_mutex` is not supported on {os}" ) ,
@@ -216,7 +216,7 @@ pub struct AdditionalRwLockData {
216
216
217
217
fn rwlock_id_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
218
218
let offset = match & * ecx. tcx . sess . target . os {
219
- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
219
+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
220
220
// macOS stores a signature in the first bytes, so we have to move to offset 4.
221
221
"macos" => 4 ,
222
222
os => throw_unsup_format ! ( "`pthread_rwlock` is not supported on {os}" ) ,
@@ -269,7 +269,7 @@ fn rwlock_get_id<'tcx>(
269
269
#[ inline]
270
270
fn condattr_clock_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
271
271
Ok ( match & * ecx. tcx . sess . target . os {
272
- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
272
+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
273
273
// macOS does not have a clock attribute.
274
274
os => throw_unsup_format ! ( "`pthread_condattr` clock field is not supported on {os}" ) ,
275
275
} )
@@ -321,7 +321,7 @@ fn condattr_set_clock_id<'tcx>(
321
321
322
322
fn cond_id_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
323
323
let offset = match & * ecx. tcx . sess . target . os {
324
- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
324
+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
325
325
// macOS stores a signature in the first bytes, so we have to move to offset 4.
326
326
"macos" => 4 ,
327
327
os => throw_unsup_format ! ( "`pthread_cond` is not supported on {os}" ) ,
0 commit comments