diff --git a/sched/clock/clock.h b/sched/clock/clock.h index 1cdcb48116..874edc2a31 100644 --- a/sched/clock/clock.h +++ b/sched/clock/clock.h @@ -35,7 +35,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ + /* If CONFIG_SYSTEM_TIME64 is selected and the CPU supports long long types, * then a 64-bit system time will be used. */ diff --git a/sched/clock/clock_abstime2ticks.c b/sched/clock/clock_abstime2ticks.c index f1f0ba503b..4b7796e69d 100644 --- a/sched/clock/clock_abstime2ticks.c +++ b/sched/clock/clock_abstime2ticks.c @@ -79,14 +79,16 @@ int clock_timespec_compare(FAR const struct timespec *a, * ****************************************************************************/ -int clock_abstime2ticks(clockid_t clockid, FAR const struct timespec *abstime, +int clock_abstime2ticks(clockid_t clockid, + FAR const struct timespec *abstime, FAR sclock_t *ticks) { struct timespec currtime; struct timespec reltime; int ret; - /* Convert the timespec to clock ticks. NOTE: Here we use internal knowledge + /* Convert the timespec to clock ticks. + * NOTE: Here we use internal knowledge * that CLOCK_REALTIME is defined to be zero! */ diff --git a/sched/clock/clock_dow.c b/sched/clock/clock_dow.c index 84271bf556..42a37a7c24 100644 --- a/sched/clock/clock_dow.c +++ b/sched/clock/clock_dow.c @@ -68,5 +68,6 @@ static const uint8_t g_lookup[12] = int clock_dow(int year, int month, int day) { day += month < 2 ? year-- : year - 2; - return ((int)g_lookup[month] + day + 4 + year / 4 - year / 100 + year / 400) % 7; + return ((int)g_lookup[month] + day + 4 + year / 4 - + year / 100 + year / 400) % 7; } diff --git a/sched/environ/env_dup.c b/sched/environ/env_dup.c index 852eabf3e7..e0bdf2e416 100644 --- a/sched/environ/env_dup.c +++ b/sched/environ/env_dup.c @@ -45,8 +45,8 @@ * * Description: * Copy the internal environment structure of a task. This is the action - * that is performed when a new task is created: The new task has a private, - * exact duplicate of the parent task's environment. + * that is performed when a new task is created: The new task has a + * private, exact duplicate of the parent task's environment. * * Input Parameters: * group - The child task group to receive the newly allocated copy of the diff --git a/sched/environ/env_foreach.c b/sched/environ/env_foreach.c index bcf4fec10d..52a7a81491 100644 --- a/sched/environ/env_foreach.c +++ b/sched/environ/env_foreach.c @@ -60,7 +60,9 @@ * ****************************************************************************/ -int env_foreach(FAR struct task_group_s *group, env_foreach_t cb, FAR void *arg) +int env_foreach(FAR struct task_group_s *group, + env_foreach_t cb, + FAR void *arg) { FAR char *ptr; FAR char *end; diff --git a/sched/environ/env_putenv.c b/sched/environ/env_putenv.c index 38d2339a78..4061c7d86e 100644 --- a/sched/environ/env_putenv.c +++ b/sched/environ/env_putenv.c @@ -41,7 +41,8 @@ * Name: putenv * * Description: - * The putenv() function adds or changes the value of environment variables. + * The putenv() function adds or changes the value of environment + * variables. * The argument string is of the form name=value. If name does not already * exist in the environment, then string is added to the environment. If * name does exist, then the value of name in the environment is changed to diff --git a/sched/environ/env_setenv.c b/sched/environ/env_setenv.c index ef41d6d9a2..70593bf956 100644 --- a/sched/environ/env_setenv.c +++ b/sched/environ/env_setenv.c @@ -96,7 +96,9 @@ int setenv(FAR const char *name, FAR const char *value, int overwrite) } else { - /* Otherwise, it is a request to remove a variable without altering it? */ + /* Otherwise, it is a request to remove a variable without + * altering it? + */ return OK; } @@ -131,8 +133,8 @@ int setenv(FAR const char *name, FAR const char *value, int overwrite) env_removevar(group, pvar); } - /* Get the size of the new name=value string. The +2 is for the '=' and for - * null terminator + /* Get the size of the new name=value string. + * The +2 is for the '=' and for null terminator */ varlen = strlen(name) + strlen(value) + 2; diff --git a/sched/environ/environ.h b/sched/environ/environ.h index a0f3ac14b7..3d8fdd012b 100644 --- a/sched/environ/environ.h +++ b/sched/environ/environ.h @@ -58,8 +58,9 @@ extern "C" * * Description: * Copy the internal environment structure of a task. This is the action - * that is performed when a new task is created: The new task has a private, - * exact duplicate of the parent task's environment. + * that is performed when a new task is created: + * The new task has a private, exact duplicate of the parent task's + * environment. * * Input Parameters: * group - The child task group to receive the newly allocated copy of the diff --git a/sched/group/group_addrenv.c b/sched/group/group_addrenv.c index a9de67b80b..14cace70da 100644 --- a/sched/group/group_addrenv.c +++ b/sched/group/group_addrenv.c @@ -59,9 +59,9 @@ grpid_t g_grpid_current; * the head of the ready to run list. * * This function is called from platform-specific code after any context - * switch (i.e., after any change in the thread at the head of the ready-to- - * run list). This function will change the address environment if the - * new thread is part of a different task group. + * switch (i.e., after any change in the thread at the head of the + * ready-to-run list). This function will change the address environment + * if the new thread is part of a different task group. * * Input Parameters: * tcb - The TCB of thread that needs an address environment. This should diff --git a/sched/group/group_find.c b/sched/group/group_find.c index 6091bf7024..b41e29d139 100644 --- a/sched/group/group_find.c +++ b/sched/group/group_find.c @@ -46,8 +46,9 @@ * Description: * Given a group ID, find the group task structure with that ID. IDs are * used instead of pointers to group structures. This is done because a - * group can disappear at any time leaving a stale pointer; an ID is cleaner - * because if the group disappears, this function will fail gracefully. + * group can disappear at any time leaving a stale pointer; an ID is + * cleaner because if the group disappears, this function will fail + * gracefully. * * Input Parameters: * grpid - The group ID to find. diff --git a/sched/group/group_join.c b/sched/group/group_join.c index f60e2d32f1..8da80494a2 100644 --- a/sched/group/group_join.c +++ b/sched/group/group_join.c @@ -128,7 +128,7 @@ static inline int group_addmember(FAR struct task_group_s *group, pid_t pid) * Name: group_bind * * Description: - * A thread joins the group when it is created. This is a two step process, + * A thread joins the group when it is created. This is a two step process, * first, the group must bound to the new threads TCB. group_bind() does * this (at the return from group_join, things are a little unstable: The * group has been bound, but tg_nmembers has not yet been incremented). @@ -165,7 +165,7 @@ int group_bind(FAR struct pthread_tcb_s *tcb) * Name: group_join * * Description: - * A thread joins the group when it is created. This is a two step process, + * A thread joins the group when it is created. This is a two step process, * first, the group must bound to the new threads TCB. group_bind() does * this (at the return from group_join, things are a little unstable: The * group has been bound, but tg_nmembers has not yet been incremented). diff --git a/sched/pthread/pthread_mutexunlock.c b/sched/pthread/pthread_mutexunlock.c index f167897759..9fb71e5c6a 100644 --- a/sched/pthread/pthread_mutexunlock.c +++ b/sched/pthread/pthread_mutexunlock.c @@ -204,8 +204,9 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex) /* This is either a non-recursive mutex or is the outermost unlock of * a recursive mutex. * - * In the case where the calling thread is NOT the holder of the thread, - * the behavior is undefined per POSIX. Here we do the same as GLIBC: + * In the case where the calling thread is NOT the holder of the + * thread, the behavior is undefined per POSIX. + * Here we do the same as GLIBC: * We allow the other thread to release the mutex even though it does * not own it. */ diff --git a/sched/semaphore/sem_destroy.c b/sched/semaphore/sem_destroy.c index 216e3c0a3a..a5a33f7c18 100644 --- a/sched/semaphore/sem_destroy.c +++ b/sched/semaphore/sem_destroy.c @@ -38,10 +38,10 @@ * Description: * This function is used to destroy the un-named semaphore indicated by * 'sem'. Only a semaphore that was created using nxsem_init() may be - * destroyed using nxsem_destroy(); the effect of calling nxsem_destroy() with - * a named semaphore is undefined. The effect of subsequent use of the - * semaphore sem is undefined until sem is re-initialized by another call - * to nxsem_init(). + * destroyed using nxsem_destroy(); the effect of calling nxsem_destroy() + * with a named semaphore is undefined. The effect of subsequent use of + * the semaphore sem is undefined until sem is re-initialized by another + * call to nxsem_init(). * * The effect of destroying a semaphore upon which other processes are * currently blocked is undefined.