From 9aa69168e40c76005b7beb5cdabc97aaae7fa123 Mon Sep 17 00:00:00 2001 From: anjiahao Date: Thu, 23 Dec 2021 17:43:45 +0800 Subject: [PATCH] libc/pthread:pthread_barrierinit sem use pri_none barrier is used protect resources. don't lock Signed-off-by: anjiahao --- libs/libc/pthread/pthread_barrierinit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/libc/pthread/pthread_barrierinit.c b/libs/libc/pthread/pthread_barrierinit.c index dc232ffa3f..f737b322b5 100644 --- a/libs/libc/pthread/pthread_barrierinit.c +++ b/libs/libc/pthread/pthread_barrierinit.c @@ -82,6 +82,7 @@ int pthread_barrier_init(FAR pthread_barrier_t *barrier, else { sem_init(&barrier->sem, 0, 0); + sem_setprotocol(&barrier->sem, SEM_PRIO_NONE); barrier->count = count; }