From 5e77dea5af47c4e2f77a888b594e88bbddff2a10 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Thu, 28 Jan 2021 15:15:07 +0800 Subject: [PATCH] pthread/barrier: call sem_get_value instead of nxsem_get_value N/A Signed-off-by: Xiang Xiao Change-Id: I65eef2c23f0b59627730a45577d158877c987b78 --- libs/libc/pthread/pthread_barrierdestroy.c | 2 +- libs/libc/pthread/pthread_barrierinit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/libc/pthread/pthread_barrierdestroy.c b/libs/libc/pthread/pthread_barrierdestroy.c index c9192e485ca..205978fce79 100644 --- a/libs/libc/pthread/pthread_barrierdestroy.c +++ b/libs/libc/pthread/pthread_barrierdestroy.c @@ -85,7 +85,7 @@ int pthread_barrier_destroy(FAR pthread_barrier_t *barrier) } else { - nxsem_get_value(&barrier->sem, &semcount); + sem_getvalue(&barrier->sem, &semcount); if (semcount == 0) { sem_destroy(&barrier->sem); diff --git a/libs/libc/pthread/pthread_barrierinit.c b/libs/libc/pthread/pthread_barrierinit.c index e39a77d9ff0..c529f020a09 100644 --- a/libs/libc/pthread/pthread_barrierinit.c +++ b/libs/libc/pthread/pthread_barrierinit.c @@ -96,7 +96,7 @@ int pthread_barrier_init(FAR pthread_barrier_t *barrier, } else { - nxsem_get_value(&barrier->sem, &semcount); + sem_getvalue(&barrier->sem, &semcount); if (semcount == 0) { sem_init(&barrier->sem, 0, 0);