? lib/libpthread/cscope.out Index: lib/libpthread/pthread_mutex.c =================================================================== RCS file: /cvsroot/src/lib/libpthread/pthread_mutex.c,v retrieving revision 1.61 diff -u -p -r1.61 pthread_mutex.c --- lib/libpthread/pthread_mutex.c 16 Jul 2016 12:58:11 -0000 1.61 +++ lib/libpthread/pthread_mutex.c 17 Jul 2016 05:34:26 -0000 @@ -796,7 +796,7 @@ pthread__mutex_deferwake(pthread_t self, int pthread_mutex_getprioceiling(const pthread_mutex_t *ptm, int *ceil) { - *ceil = (unsigned int)ptm->ptm_ceiling; + *ceil = ptm->ptm_ceiling; return 0; } @@ -807,9 +807,9 @@ pthread_mutex_setprioceiling(pthread_mut error = pthread_mutex_lock(ptm); if (error == 0) { - *old_ceil = (unsigned int)ptm->ptm_ceiling; + *old_ceil = ptm->ptm_ceiling; /*check range*/ - ptm->ptm_ceiling = (unsigned char)ceil; + ptm->ptm_ceiling = ceil; pthread_mutex_unlock(ptm); } return error; Index: lib/libpthread/pthread_types.h =================================================================== RCS file: /cvsroot/src/lib/libpthread/pthread_types.h,v retrieving revision 1.18 diff -u -p -r1.18 pthread_types.h --- lib/libpthread/pthread_types.h 3 Jul 2016 14:24:58 -0000 1.18 +++ lib/libpthread/pthread_types.h 17 Jul 2016 05:34:26 -0000 @@ -115,7 +115,10 @@ struct __pthread_mutex_st { #ifdef __CPU_SIMPLE_LOCK_PAD uint8_t ptm_pad1[3]; #endif - __pthread_spin_t ptm_ceiling; + union { + unsigned char ptm_ceiling; + __pthread_spin_t ptm_unused; + }; #ifdef __CPU_SIMPLE_LOCK_PAD uint8_t ptm_pad2[3]; #endif @@ -131,13 +134,13 @@ struct __pthread_mutex_st { #ifdef __CPU_SIMPLE_LOCK_PAD #define _PTHREAD_MUTEX_INITIALIZER { _PT_MUTEX_MAGIC, \ __SIMPLELOCK_UNLOCKED, { 0, 0, 0 }, \ - __SIMPLELOCK_UNLOCKED, { 0, 0, 0 }, \ + { 0 }, { 0, 0, 0 }, \ NULL, NULL, 0, NULL \ } #else #define _PTHREAD_MUTEX_INITIALIZER { _PT_MUTEX_MAGIC, \ __SIMPLELOCK_UNLOCKED, \ - __SIMPLELOCK_UNLOCKED, \ + { 0 } , \ NULL, NULL, 0, NULL \ } #endif /* __CPU_SIMPLE_LOCK_PAD */