tests: obj_tracing: fix code style

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2017-06-16 22:05:24 -04:00 committed by Kumar Gala
commit 93bcc957da
3 changed files with 11 additions and 11 deletions

View file

@ -55,14 +55,14 @@ static inline int test_thread_monitor(void)
while (thread_list != NULL) {
if (thread_list->base.prio == -1) {
TC_PRINT("PREMPT: %p OPTIONS: 0x%02x, STATE: 0x%02x\n",
thread_list,
thread_list->base.user_options,
thread_list->base.thread_state);
thread_list,
thread_list->base.user_options,
thread_list->base.thread_state);
} else {
TC_PRINT("COOP: %p OPTIONS: 0x%02x, STATE: 0x%02x\n",
thread_list,
thread_list->base.user_options,
thread_list->base.thread_state);
thread_list,
thread_list->base.user_options,
thread_list->base.thread_state);
}
thread_list =
(struct k_thread *)SYS_THREAD_MONITOR_NEXT(thread_list);
@ -92,7 +92,7 @@ void object_monitor(void)
while (obj_list != NULL) {
TC_PRINT("SEMAPHORE REF: %p\n", obj_list);
obj_list = SYS_TRACING_NEXT(OBJ_LIST_TYPE, OBJ_LIST_NAME,
obj_list);
obj_list);
obj_counter++;
}
TC_PRINT("SEMAPHORE QUANTITY: %d\n", obj_counter);

View file

@ -5,4 +5,4 @@
*
* SPDX-License-Identifier: Apache-2.0
*/
#define N_PHILOSOPHERS 5
#define N_PHILOSOPHERS 5

View file

@ -32,8 +32,8 @@ extern struct k_sem forks[N_PHILOSOPHERS];
void phil_entry(void)
{
int counter;
struct k_sem *f1; /* fork #1 */
struct k_sem *f2; /* fork #2 */
struct k_sem *f1; /* fork #1 */
struct k_sem *f2; /* fork #2 */
static int myId; /* next philosopher ID */
int pri = irq_lock(); /* interrupt lock level */
int id = myId++; /* current philosopher ID */
@ -41,7 +41,7 @@ void phil_entry(void)
irq_unlock(pri);
/* always take the lowest fork first */
if ((id+1) != N_PHILOSOPHERS) {
if ((id + 1) != N_PHILOSOPHERS) {
f1 = FORK(id);
f2 = FORK(id + 1);
} else {