Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #2039 - Amanieu:aarch64_ilp32, r=JohnTitor
Add support for the ILP32 variant of AArch64 This also fixes mutex initializers on big-endian AArch64.
- Loading branch information
Showing
5 changed files
with
160 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
use pthread_mutex_t; | ||
|
||
pub type c_long = i32; | ||
pub type c_ulong = u32; | ||
|
||
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; | ||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32; | ||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; | ||
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 48; | ||
|
||
align_const! { | ||
#[cfg(target_endian = "little")] | ||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "little")] | ||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "little")] | ||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "big")] | ||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "big")] | ||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "big")] | ||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
} | ||
|
||
pub const SYS_sync_file_range2: ::c_long = 84; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
use pthread_mutex_t; | ||
|
||
pub type c_long = i64; | ||
pub type c_ulong = u64; | ||
|
||
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8; | ||
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48; | ||
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8; | ||
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; | ||
|
||
align_const! { | ||
#[cfg(target_endian = "little")] | ||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "little")] | ||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "little")] | ||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "big")] | ||
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "big")] | ||
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
#[cfg(target_endian = "big")] | ||
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = | ||
pthread_mutex_t { | ||
size: [ | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, | ||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, | ||
], | ||
}; | ||
} | ||
|
||
pub const SYS_renameat: ::c_long = 38; | ||
pub const SYS_sync_file_range: ::c_long = 84; | ||
pub const SYS_getrlimit: ::c_long = 163; | ||
pub const SYS_setrlimit: ::c_long = 164; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters