You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/07/29 04:13:21 UTC
[incubator-nuttx-apps] 02/04: testing/smp/smp_main.c: Remove
duplicate initialization of the barrier's attributes.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit eb228229d82f13de3a356f7dd127fa8db5f7969c
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Wed Jul 28 17:00:00 2021 +0200
testing/smp/smp_main.c: Remove duplicate initialization of the barrier's
attributes.
Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
testing/smp/smp_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/testing/smp/smp_main.c b/testing/smp/smp_main.c
index f1ba95b..bab00fe 100644
--- a/testing/smp/smp_main.c
+++ b/testing/smp/smp_main.c
@@ -221,6 +221,8 @@ int main(int argc, FAR char *argv[])
show_cpu(" Main", 0);
printf(" Main[0]: Initializing barrier\n");
+ /* Create the barrier */
+
ret = pthread_barrierattr_init(&barrierattr);
if (ret != OK)
{
@@ -242,10 +244,6 @@ int main(int argc, FAR char *argv[])
goto errout_with_attr;
}
- /* Create the barrier */
-
- pthread_barrierattr_init(&barrierattr);
-
/* Start CONFIG_TESTING_SMP_NBARRIER_THREADS thread instances */
ret = pthread_attr_init(&attr);