diff --git a/sched/pthread/pthread_condclockwait.c b/sched/pthread/pthread_condclockwait.c index 7012dd7219..a600d301f4 100644 --- a/sched/pthread/pthread_condclockwait.c +++ b/sched/pthread/pthread_condclockwait.c @@ -109,11 +109,7 @@ int pthread_cond_clockwait(FAR pthread_cond_t *cond, else { -#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE - uint8_t mflags; -#endif #ifdef CONFIG_PTHREAD_MUTEX_TYPES - uint8_t type; int16_t nlocks; #endif @@ -131,11 +127,7 @@ int pthread_cond_clockwait(FAR pthread_cond_t *cond, /* Give up the mutex */ mutex->pid = INVALID_PROCESS_ID; -#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE - mflags = mutex->flags; -#endif #ifdef CONFIG_PTHREAD_MUTEX_TYPES - type = mutex->type; nlocks = mutex->nlocks; #endif ret = pthread_mutex_give(mutex); @@ -163,11 +155,7 @@ int pthread_cond_clockwait(FAR pthread_cond_t *cond, if (status == OK) { mutex->pid = mypid; -#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE - mutex->flags = mflags; -#endif #ifdef CONFIG_PTHREAD_MUTEX_TYPES - mutex->type = type; mutex->nlocks = nlocks; #endif } diff --git a/sched/pthread/pthread_condwait.c b/sched/pthread/pthread_condwait.c index 412814d339..ada6658d95 100644 --- a/sched/pthread/pthread_condwait.c +++ b/sched/pthread/pthread_condwait.c @@ -81,11 +81,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) } else { -#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE - uint8_t mflags; -#endif #ifdef CONFIG_PTHREAD_MUTEX_TYPES - uint8_t type; int16_t nlocks; #endif @@ -96,11 +92,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) flags = enter_critical_section(); sched_lock(); mutex->pid = INVALID_PROCESS_ID; -#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE - mflags = mutex->flags; -#endif #ifdef CONFIG_PTHREAD_MUTEX_TYPES - type = mutex->type; nlocks = mutex->nlocks; #endif ret = pthread_mutex_give(mutex); @@ -144,11 +136,7 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex) /* Yes.. Then initialize it properly */ mutex->pid = nxsched_gettid(); -#ifndef CONFIG_PTHREAD_MUTEX_UNSAFE - mutex->flags = mflags; -#endif #ifdef CONFIG_PTHREAD_MUTEX_TYPES - mutex->type = type; mutex->nlocks = nlocks; #endif }