@@ -11,7 +11,7 @@ use crate::*;
1111#[ inline]
1212fn mutexattr_kind_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
1313 Ok ( match & * ecx. tcx . sess . target . os {
14- "linux" | "illumos" | "solaris" | "macos" | "freebsd" => 0 ,
14+ "linux" | "illumos" | "solaris" | "macos" | "freebsd" | "android" => 0 ,
1515 os => throw_unsup_format ! ( "`pthread_mutexattr` is not supported on {os}" ) ,
1616 } )
1717}
@@ -76,7 +76,7 @@ fn mutex_id_offset<'tcx>(ecx: &MiriInterpCx<'tcx>) -> InterpResult<'tcx, u64> {
7676 // When adding a new OS, make sure we also support all its static initializers in
7777 // `mutex_kind_from_static_initializer`!
7878 let offset = match & * ecx. tcx . sess . target . os {
79- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
79+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
8080 // macOS stores a signature in the first bytes, so we have to move to offset 4.
8181 "macos" => 4 ,
8282 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> {
105105 check_static_initializer ( "PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP" ) ;
106106 check_static_initializer ( "PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP" ) ;
107107 }
108- "illumos" | "solaris" | "macos" | "freebsd" => {
108+ "illumos" | "solaris" | "macos" | "freebsd" | "android" => {
109109 // No non-standard initializers.
110110 }
111111 os => throw_unsup_format ! ( "`pthread_mutex` is not supported on {os}" ) ,
@@ -216,7 +216,7 @@ pub struct AdditionalRwLockData {
216216
217217fn rwlock_id_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
218218 let offset = match & * ecx. tcx . sess . target . os {
219- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
219+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
220220 // macOS stores a signature in the first bytes, so we have to move to offset 4.
221221 "macos" => 4 ,
222222 os => throw_unsup_format ! ( "`pthread_rwlock` is not supported on {os}" ) ,
@@ -269,7 +269,7 @@ fn rwlock_get_id<'tcx>(
269269#[ inline]
270270fn condattr_clock_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
271271 Ok ( match & * ecx. tcx . sess . target . os {
272- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
272+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
273273 // macOS does not have a clock attribute.
274274 os => throw_unsup_format ! ( "`pthread_condattr` clock field is not supported on {os}" ) ,
275275 } )
@@ -321,7 +321,7 @@ fn condattr_set_clock_id<'tcx>(
321321
322322fn cond_id_offset < ' tcx > ( ecx : & MiriInterpCx < ' tcx > ) -> InterpResult < ' tcx , u64 > {
323323 let offset = match & * ecx. tcx . sess . target . os {
324- "linux" | "illumos" | "solaris" | "freebsd" => 0 ,
324+ "linux" | "illumos" | "solaris" | "freebsd" | "android" => 0 ,
325325 // macOS stores a signature in the first bytes, so we have to move to offset 4.
326326 "macos" => 4 ,
327327 os => throw_unsup_format ! ( "`pthread_cond` is not supported on {os}" ) ,
0 commit comments