testing/ostest: Fix nxstyle errors.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
Abdelatif Guettouche 2021-04-30 00:58:23 +01:00 committed by Gustavo Henrique Nihei
parent 0e9f08e454
commit e86faa6966
3 changed files with 21 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/****************************************************************************
* testing/ostest/barrier.c
* apps/testing/ostest/barrier.c
*
* Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -94,6 +94,7 @@ static void *barrier_func(void *parameter)
printf("barrier_func: ERROR thread %d could not get semaphore value\n",
id);
}
FFLUSH();
usleep(HALF_SECOND);
@ -165,6 +166,7 @@ void barrier_test(void)
printf("barrier_test: Thread %d created\n", i);
}
}
FFLUSH();
/* Wait for all thread instances to complete */
@ -200,5 +202,6 @@ abort_test:
printf("barrier_test: pthread_barrierattr_destroy failed, status=%d\n",
status);
}
FFLUSH();
}

View File

@ -1,5 +1,5 @@
/****************************************************************************
* mutex.c
* apps/testing/ostest/mutex.c
*
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@ -57,8 +57,16 @@
static pthread_mutex_t mut;
static volatile int my_mutex = 0;
static unsigned long nloops[2] = {0, 0};
static unsigned long nerrors[2] = {0, 0};
static unsigned long nloops[2] =
{
0,
0
};
static unsigned long nerrors[2] =
{
0,
0
};
/****************************************************************************
* Private Functions
@ -102,6 +110,7 @@ static void *thread_func(FAR void *parameter)
id, status);
}
}
pthread_exit(NULL);
return NULL; /* Non-reachable -- needed for some compilers */
}

View File

@ -107,7 +107,8 @@ static void *thread_func(FAR void *parameter)
}
else
{
fprintf(stderr, "pthread: pthread_mutex_timedlock() failed: %d\n",
fprintf(stderr,
"pthread: pthread_mutex_timedlock() failed: %d\n",
status);
}