pthread: Fix compilation error on pthread_cond_wait
authorEunBong Song <eunb.song@samsung.com>
Tue, 2 May 2017 07:59:26 +0000 (16:59 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Sat, 6 May 2017 14:00:44 +0000 (23:00 +0900)
This patch fixes compilation error when CONFIG_CANCELLATION_POINTS and
CONFIG_PTHREAD_MUTEX_UNSAFE are enabled.

Change-Id: I4b0cfda0ff054568b29aae1c1560c7442da37887
Signed-off-by: EunBong Song <eunb.song@samsung.com>
os/kernel/pthread/pthread.h

index 0cb7d38..1793cf0 100644 (file)
@@ -135,7 +135,7 @@ void pthread_mutex_inconsistent(FAR struct pthread_tcb_s *tcb);
 #define pthread_mutex_give(m)   pthread_givesemaphore(&(m)->sem)
 #endif
 
-#if defined(CONFIG_CANCELLATION_POINTS)
+#if defined(CONFIG_CANCELLATION_POINTS) && !defined(CONFIG_PTHREAD_MUTEX_UNSAFE)
 uint16_t pthread_disable_cancel(void);
 void pthread_enable_cancel(uint16_t oldstate);
 #else