samples:philosophers:Reformated 80-column width, 80-chars tabs

This patch reformats philosophers sample to fit in 80 columns
with 8-char tabs. It also fixes other coding style issues
reported by chechpatch.pl script with -f option.

Change-Id: Ie7ed59db4e67e279a26000247a1838221ac37cd3
Signed-off-by: Yannis Damigos <giannis.damigos@gmail.com>
This commit is contained in:
Yannis Damigos 2016-03-08 12:24:05 +02:00 committed by Gerrit Code Review
commit 31100d1a61
3 changed files with 18 additions and 18 deletions

View file

@ -27,7 +27,8 @@
* Therefore use puts() instead of printf().
*/
#if defined(CONFIG_STDOUT_CONSOLE)
#define PRINTF(...) {char output[256]; sprintf(output, __VA_ARGS__); puts(output);}
#define PRINTF(...) { char output[256]; \
sprintf(output, __VA_ARGS__); puts(output); }
#else
#define PRINTF(...) printk(__VA_ARGS__)
#endif

View file

@ -19,7 +19,7 @@
#include "phil.h"
#ifdef CONFIG_NANOKERNEL
#define FORK(x) &forks[x]
#define FORK(x) (&forks[x])
#define TAKE(x) nano_fiber_sem_take(x, TICKS_UNLIMITED)
#define GIVE(x) nano_fiber_sem_give(x)
#else /* ! CONFIG_NANOKERNEL */
@ -37,7 +37,8 @@
extern struct nano_sem forks[N_PHILOSOPHERS];
#else /* ! CONFIG_NANOKERNEL */
kmutex_t forks[] = {forkMutex0, forkMutex1, forkMutex2, forkMutex3, forkMutex4, forkMutex5};
kmutex_t forks[] = {forkMutex0, forkMutex1, forkMutex2, forkMutex3, forkMutex4,
forkMutex5};
#endif /* CONFIG_NANOKERNEL */
/**

View file

@ -29,7 +29,6 @@
"of differing priorities and the %s semaphores and timers."
#ifdef CONFIG_NANOKERNEL
#define STSIZE 1024
/* externs */
@ -71,7 +70,6 @@ int main(void)
nano_cpu_idle();
}
}
#else
/**
*