testing/ostest: Fix nxstyle errors.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
This commit is contained in:
parent
0e9f08e454
commit
e86faa6966
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* testing/ostest/barrier.c
|
* apps/testing/ostest/barrier.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 2011, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* 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",
|
printf("barrier_func: ERROR thread %d could not get semaphore value\n",
|
||||||
id);
|
id);
|
||||||
}
|
}
|
||||||
|
|
||||||
FFLUSH();
|
FFLUSH();
|
||||||
|
|
||||||
usleep(HALF_SECOND);
|
usleep(HALF_SECOND);
|
||||||
@ -165,6 +166,7 @@ void barrier_test(void)
|
|||||||
printf("barrier_test: Thread %d created\n", i);
|
printf("barrier_test: Thread %d created\n", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FFLUSH();
|
FFLUSH();
|
||||||
|
|
||||||
/* Wait for all thread instances to complete */
|
/* Wait for all thread instances to complete */
|
||||||
@ -200,5 +202,6 @@ abort_test:
|
|||||||
printf("barrier_test: pthread_barrierattr_destroy failed, status=%d\n",
|
printf("barrier_test: pthread_barrierattr_destroy failed, status=%d\n",
|
||||||
status);
|
status);
|
||||||
}
|
}
|
||||||
|
|
||||||
FFLUSH();
|
FFLUSH();
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* mutex.c
|
* apps/testing/ostest/mutex.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
@ -57,8 +57,16 @@
|
|||||||
|
|
||||||
static pthread_mutex_t mut;
|
static pthread_mutex_t mut;
|
||||||
static volatile int my_mutex = 0;
|
static volatile int my_mutex = 0;
|
||||||
static unsigned long nloops[2] = {0, 0};
|
static unsigned long nloops[2] =
|
||||||
static unsigned long nerrors[2] = {0, 0};
|
{
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
static unsigned long nerrors[2] =
|
||||||
|
{
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
@ -102,6 +110,7 @@ static void *thread_func(FAR void *parameter)
|
|||||||
id, status);
|
id, status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
return NULL; /* Non-reachable -- needed for some compilers */
|
return NULL; /* Non-reachable -- needed for some compilers */
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,8 @@ static void *thread_func(FAR void *parameter)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(stderr, "pthread: pthread_mutex_timedlock() failed: %d\n",
|
fprintf(stderr,
|
||||||
|
"pthread: pthread_mutex_timedlock() failed: %d\n",
|
||||||
status);
|
status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user