relibc: implement pthread mutex prioceiling get/replace
Added prioceiling: c_int field to RlctMutex struct and real implementations for prioceiling() and replace_prioceiling() methods. Previously both returned Ok(0) silently (worse than ENOSYS - caller believes operation succeeded). pthread_mutex_t size updated from 12 to 16 bytes to accommodate the new field while maintaining ABI alignment via #[repr(C)] union with c_int alignment. Cross-referenced with POSIX pthread_mutex_getprioceiling(3) and Linux glibc nptl pthread_mutex_getprioceiling.c. The prioceiling is stored in the mutex struct, set at construction from pthread_mutexattr_getprioceiling. getprioceiling returns the stored value; replace_prioceiling updates it and returns the old value.
This commit is contained in:
@@ -41,7 +41,7 @@ pub union pthread_barrierattr_t {
|
||||
/// The `pthread_mutex_t` type provided in [`sys/types.h`](crate::header::sys_types).
|
||||
#[repr(C)]
|
||||
pub union pthread_mutex_t {
|
||||
__relibc_internal_size: [c_uchar; 12],
|
||||
__relibc_internal_size: [c_uchar; 16],
|
||||
__relibc_internal_align: c_int,
|
||||
}
|
||||
/// The `pthread_mutexattr_t` type provided in [`sys/types.h`](crate::header::sys_types).
|
||||
|
||||
Reference in New Issue
Block a user