diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 14:32:20 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-04-13 14:32:20 -0600 |
commit | 3cf6b4d6577c2f467dbb25dd0da8cdc6ad32a7b4 (patch) | |
tree | 0f3ba3c03a8e8e5e5ddd7ed6658f9aeefd233228 /nuttx/sched | |
parent | b087a6d8732ffb869f3482c62b1b74e7b1869551 (diff) | |
download | px4-nuttx-3cf6b4d6577c2f467dbb25dd0da8cdc6ad32a7b4.tar.gz px4-nuttx-3cf6b4d6577c2f467dbb25dd0da8cdc6ad32a7b4.tar.bz2 px4-nuttx-3cf6b4d6577c2f467dbb25dd0da8cdc6ad32a7b4.zip |
More trailing whilespace removal
Diffstat (limited to 'nuttx/sched')
55 files changed, 115 insertions, 115 deletions
diff --git a/nuttx/sched/atexit.c b/nuttx/sched/atexit.c index 4539aa8ff..7faa52d44 100644 --- a/nuttx/sched/atexit.c +++ b/nuttx/sched/atexit.c @@ -149,7 +149,7 @@ int atexit(void (*func)(void)) break; } } - + sched_unlock(); } diff --git a/nuttx/sched/clock_settime.c b/nuttx/sched/clock_settime.c index ce809aa11..d7048b09d 100644 --- a/nuttx/sched/clock_settime.c +++ b/nuttx/sched/clock_settime.c @@ -130,7 +130,7 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp) if (g_rtc_enabled && clock_id != CLOCK_ACTIVETIME) { up_rtc_settime(tp); - } + } #endif irqrestore(flags); @@ -138,7 +138,7 @@ int clock_settime(clockid_t clock_id, FAR const struct timespec *tp) (int)g_basetime.tv_sec, (int)g_basetime.tv_nsec, (int)g_tickbias); } - else + else { sdbg("Returning ERROR\n"); set_errno(EINVAL); diff --git a/nuttx/sched/env_getenv.c b/nuttx/sched/env_getenv.c index 0b847950a..6c4a22038 100644 --- a/nuttx/sched/env_getenv.c +++ b/nuttx/sched/env_getenv.c @@ -65,7 +65,7 @@ * matches the string pointed to by name. * * Parameters: - * name - The name of the variable to find. + * name - The name of the variable to find. * * Return Value: * The value of the valiable (read-only) or NULL on failure diff --git a/nuttx/sched/group_childstatus.c b/nuttx/sched/group_childstatus.c index 233649baf..5a5ffe4ab 100644 --- a/nuttx/sched/group_childstatus.c +++ b/nuttx/sched/group_childstatus.c @@ -399,7 +399,7 @@ FAR struct child_status_s *group_removechild(FAR struct task_group_s *group, curr->flink = NULL; group_dumpchildren(group, "group_removechild"); } - + return curr; } diff --git a/nuttx/sched/group_find.c b/nuttx/sched/group_find.c index 4c1205bea..94836e206 100644 --- a/nuttx/sched/group_find.c +++ b/nuttx/sched/group_find.c @@ -80,7 +80,7 @@ * * 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 + * 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. * diff --git a/nuttx/sched/group_join.c b/nuttx/sched/group_join.c index e760a62d2..58d08e8e3 100644 --- a/nuttx/sched/group_join.c +++ b/nuttx/sched/group_join.c @@ -74,7 +74,7 @@ * Name: group_addmember * * Description: - * Add a new member to a group. + * Add a new member to a group. * * Parameters: * group - The task group to add the new member @@ -131,7 +131,7 @@ static inline int group_addmember(FAR struct task_group_s *group, pid_t pid) irqrestore(flags); } - /* Assign this new pid to the group; group->tg_nmembers will be incremented + /* Assign this new pid to the group; group->tg_nmembers will be incremented * by the caller. */ @@ -153,7 +153,7 @@ static inline int group_addmember(FAR struct task_group_s *group, pid_t pid) * this (at the return from group_join, things are a little unstable: The * group has been bound, but tg_nmembers hs not yet been incremented). * Then, after the new thread is initialized and has a PID assigned to it, - * group_join() is called, incrementing the tg_nmembers count on the group. + * group_join() is called, incrementing the tg_nmembers count on the group. * * Parameters: * tcb - The TCB of the new "child" task that need to join the group. @@ -190,7 +190,7 @@ int group_bind(FAR struct pthread_tcb_s *tcb) * this (at the return from group_join, things are a little unstable: The * group has been bound, but tg_nmembers hs not yet been incremented). * Then, after the new thread is initialized and has a PID assigned to it, - * group_join() is called, incrementing the tg_nmembers count on the group. + * group_join() is called, incrementing the tg_nmembers count on the group. * * Parameters: * tcb - The TCB of the new "child" task that need to join the group. diff --git a/nuttx/sched/group_leave.c b/nuttx/sched/group_leave.c index ceac10c38..15bbea740 100644 --- a/nuttx/sched/group_leave.c +++ b/nuttx/sched/group_leave.c @@ -100,9 +100,9 @@ void group_remove(FAR struct task_group_s *group) /* Let's be especially careful while access the global task group list. * This is probably un-necessary. */ - + flags = irqsave(); - + /* Find the task group structure */ for (prev = NULL, curr = g_grouphead; diff --git a/nuttx/sched/group_setupidlefiles.c b/nuttx/sched/group_setupidlefiles.c index 2589dc637..67001c1fb 100644 --- a/nuttx/sched/group_setupidlefiles.c +++ b/nuttx/sched/group_setupidlefiles.c @@ -122,7 +122,7 @@ int group_setupidlefiles(FAR struct task_tcb_s *tcb) /* We failed to open /dev/console OR for some reason, we opened * it and got some file descriptor other than 0. */ - + if (fd > 0) { slldbg("Open /dev/console fd: %d\n", fd); diff --git a/nuttx/sched/group_signal.c b/nuttx/sched/group_signal.c index 663441898..e46b190fd 100644 --- a/nuttx/sched/group_signal.c +++ b/nuttx/sched/group_signal.c @@ -280,7 +280,7 @@ errout: #else return -ENOSYS; - + #endif } diff --git a/nuttx/sched/irq_attach.c b/nuttx/sched/irq_attach.c index 3f27a0530..bf272f469 100644 --- a/nuttx/sched/irq_attach.c +++ b/nuttx/sched/irq_attach.c @@ -94,7 +94,7 @@ int irq_attach(int irq, xcpt_t isr) if (isr == NULL) { /* Disable the interrupt if we can before detaching it. We might - * not be able to do this if: (1) the device does not have a + * not be able to do this if: (1) the device does not have a * centralized interrupt controller (so up_disable_irq() is not * supported). Or (2) if the device has different number for vector * numbers and IRQ numbers (in that case, we don't know the correct diff --git a/nuttx/sched/mq_notify.c b/nuttx/sched/mq_notify.c index 3cff48a2b..ee4ddcdd1 100644 --- a/nuttx/sched/mq_notify.c +++ b/nuttx/sched/mq_notify.c @@ -99,12 +99,12 @@ * On success mq_notify() returns 0; on error, -1 is returned, with * errno set to indicate the error. * - * EBADF The descriptor specified in mqdes is invalid. + * EBADF The descriptor specified in mqdes is invalid. * EBUSY Another process has already registered to receive notification - * for this message queue. + * for this message queue. * EINVAL sevp->sigev_notify is not one of the permitted values; or * sevp->sigev_notify is SIGEV_SIGNAL and sevp->sigev_signo is not a - * valid signal number. + * valid signal number. * ENOMEM * Insufficient memory. * diff --git a/nuttx/sched/mq_recover.c b/nuttx/sched/mq_recover.c index 8f908395e..4c3dbed47 100644 --- a/nuttx/sched/mq_recover.c +++ b/nuttx/sched/mq_recover.c @@ -95,7 +95,7 @@ void mq_recover(FAR struct tcb_s *tcb) * timer was canceled and deleted in task_recover() before this * function was called. */ - + /* Was the task waiting for a message queue to become non-empty? */ if (tcb->task_state == TSTATE_WAIT_MQNOTEMPTY) diff --git a/nuttx/sched/mq_send.c b/nuttx/sched/mq_send.c index 40628e924..661cbbe87 100644 --- a/nuttx/sched/mq_send.c +++ b/nuttx/sched/mq_send.c @@ -93,7 +93,7 @@ * * If the message queue is full and O_NONBLOCK is set, the message is not * queued and ERROR is returned. - * + * * Parameters: * mqdes - Message queue descriptor * msg - Message to send diff --git a/nuttx/sched/mq_sndinternal.c b/nuttx/sched/mq_sndinternal.c index 9b004ef91..21468de1c 100644 --- a/nuttx/sched/mq_sndinternal.c +++ b/nuttx/sched/mq_sndinternal.c @@ -86,7 +86,7 @@ * * Description: * This is internal, common logic shared by both mq_send and mq_timesend. - * This function verifies the input parameters that are common to both + * This function verifies the input parameters that are common to both * functions. * * Parameters: @@ -147,7 +147,7 @@ int mq_verifysend(mqd_t mqdes, const void *msg, size_t msglen, int prio) * continue. * * If the list is empty AND the message IS being allocated from the - * interrupt level. This function will attempt to get a message from + * interrupt level. This function will attempt to get a message from * the g_msgfreeirq list. If this is unsuccessful, the calling interrupt * handler will be notified. * @@ -268,7 +268,7 @@ int mq_waitsend(mqd_t mqdes) else { - /* Loop until there are fewer than max allowable messages in the + /* Loop until there are fewer than max allowable messages in the * receiving message queue */ @@ -310,7 +310,7 @@ int mq_waitsend(mqd_t mqdes) * (mqdes). Then it notifies any tasks that were waiting for message * queue notifications setup by mq_notify. And, finally, it awakens any * tasks that were waiting for the message not empty event. - * + * * Parameters: * mqdes - Message queue descriptor * msg - Message to send diff --git a/nuttx/sched/mq_timedsend.c b/nuttx/sched/mq_timedsend.c index 31de84fc4..d36daf819 100644 --- a/nuttx/sched/mq_timedsend.c +++ b/nuttx/sched/mq_timedsend.c @@ -155,7 +155,7 @@ static void mq_sndtimeout(int argc, uint32_t pid) * * If the message queue is full, and the timeout has already expired by * the time of the call, mq_timedsend() returns immediately. - * + * * Parameters: * mqdes - Message queue descriptor * msg - Message to send diff --git a/nuttx/sched/mq_unlink.c b/nuttx/sched/mq_unlink.c index 1fa25dfa8..82db5a7c1 100644 --- a/nuttx/sched/mq_unlink.c +++ b/nuttx/sched/mq_unlink.c @@ -78,7 +78,7 @@ * or more tasks have the message queue open when mq_unlink() is called, * removal of the message queue is postponed until all references to the * message queue have been closed. - * + * * Parameters: * mq_name - Name of the message queue * diff --git a/nuttx/sched/on_exit.c b/nuttx/sched/on_exit.c index ef3c31631..d5f180412 100644 --- a/nuttx/sched/on_exit.c +++ b/nuttx/sched/on_exit.c @@ -91,7 +91,7 @@ * * NOTE 1: This function comes from SunOS 4, but is also present in * libc4, libc5 and glibc. It no longer occurs in Solaris (SunOS 5). - * Avoid this function, and use the standard atexit() instead. + * Avoid this function, and use the standard atexit() instead. * * NOTE 2: CONFIG_SCHED_ONEXIT must be defined to enable this function * diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c index 6a41b4248..776c789b9 100644 --- a/nuttx/sched/os_bringup.c +++ b/nuttx/sched/os_bringup.c @@ -125,7 +125,7 @@ * symbols: * * - USER_ENTRYPOINT: This is the default user application entry point. - * + * ****************************************************************************/ int os_bringup(void) diff --git a/nuttx/sched/pause.c b/nuttx/sched/pause.c index 607c4c775..f75afa6c9 100644 --- a/nuttx/sched/pause.c +++ b/nuttx/sched/pause.c @@ -77,7 +77,7 @@ * None * * Returned Value: - * Since pause() suspends thread execution indefinitely unless interrupted + * Since pause() suspends thread execution indefinitely unless interrupted * a signal, there is no successful completion return value. A value of -1 * will always be returned and errno set to indicate the error (EINTR). * @@ -94,7 +94,7 @@ int pause(void) { sigset_t set; struct siginfo value; - + /* Set up for the sleep. Using the empty set means that we are not * waiting for any particular signal. However, any unmasked signal * can still awaken sigtimedwait(). diff --git a/nuttx/sched/pg_internal.h b/nuttx/sched/pg_internal.h index ecece8650..e2063aec6 100644 --- a/nuttx/sched/pg_internal.h +++ b/nuttx/sched/pg_internal.h @@ -39,7 +39,7 @@ /**************************************************************************** * Included Files ****************************************************************************/ - + #include <nuttx/config.h> #include <queue.h> diff --git a/nuttx/sched/pg_worker.c b/nuttx/sched/pg_worker.c index b1380111a..13f7fe1d9 100644 --- a/nuttx/sched/pg_worker.c +++ b/nuttx/sched/pg_worker.c @@ -130,7 +130,7 @@ status uint32_t g_starttime; * NOTE: pg_callback() must also be locked in memory. * * When pg_callback() is called, it will perform the following operations: - * + * * - Verify that g_pftcb is non-NULL. * - Find the higher priority between the task waiting for the fill to * complete in g_pftcb and the task waiting at the head of the @@ -176,7 +176,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) { priority = htcb->sched_priority; } - + /* If this higher priority is higher than current page fill worker * thread, then boost worker thread's priority to that level. Thus, * the page fill worker thread will always run at the priority of @@ -201,7 +201,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) } /* Signal the page fill worker thread (in any event) */ - + pglldbg("Signaling worker. PID: %d\n", g_pgworker); kill(g_pgworker, SIGWORK); } @@ -223,7 +223,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) * * The result (NULL or a TCB pointer) will be returned in the global * variable, g_pftcb. - * + * * Input parameters: * None * @@ -234,7 +234,7 @@ static void pg_callback(FAR struct tcb_s *tcb, int result) * assertions and this function will not return). * * Assumptions: - * Executing in the context of the page fill worker thread with all + * Executing in the context of the page fill worker thread with all * interrupts disabled. * ****************************************************************************/ @@ -278,7 +278,7 @@ static inline bool pg_dequeue(void) * fill (this priority can get re-boosted by pg_miss() * if a new higher priority fill is required). */ - + FAR struct tcb_s *wtcb = (FAR struct tcb_s *)g_readytorun.head; if (wtcb->sched_priority > CONFIG_PAGING_DEFPRIO && wtcb->sched_priority > g_pftcb->sched_priority) @@ -334,7 +334,7 @@ static inline bool pg_dequeue(void) * is notified that there is a new page fill TCB in the g_waitingforfill * prioritized list, or (2) when a page fill completes and there are more * pages to be filled in g_waitingforfill list. - * + * * Input parameters: * None * @@ -345,7 +345,7 @@ static inline bool pg_dequeue(void) * assertions and this function will not return). * * Assumptions: - * Executing in the context of the page fill worker thread with all + * Executing in the context of the page fill worker thread with all * interrupts disabled. * ****************************************************************************/ @@ -402,7 +402,7 @@ static inline bool pg_startfill(void) pgllvdbg("Call up_fillpage(%p)\n", g_pftcb); result = up_fillpage(g_pftcb, vpage, pg_callback); DEBUGASSERT(result == OK); - + /* Save the time that the fill was started. These will be used to check for * timeouts. */ diff --git a/nuttx/sched/prctl.c b/nuttx/sched/prctl.c index c4cc13c6c..cf40708fa 100644 --- a/nuttx/sched/prctl.c +++ b/nuttx/sched/prctl.c @@ -73,8 +73,8 @@ * EINVAL The value of 'option' is not recognized. * EFAULT optional arg1 is not a valid address. * ESRCH No task/thread can be found corresponding to that specified - * by optional arg1. - * + * by optional arg1. + * ****************************************************************************/ int prctl(int option, ...) diff --git a/nuttx/sched/pthread_condsignal.c b/nuttx/sched/pthread_condsignal.c index 48ff4cf20..c7120d104 100644 --- a/nuttx/sched/pthread_condsignal.c +++ b/nuttx/sched/pthread_condsignal.c @@ -116,7 +116,7 @@ int pthread_cond_signal(FAR pthread_cond_t *cond) * usable from interrupt handlers. However, from interrupt handlers, * you cannot take the associated mutex before signaling the condition. * As a result, I think that there could be a race condition with - * the following logic which assumes that the if sval < 0 then the + * the following logic which assumes that the if sval < 0 then the * thread is waiting. Without the mutex, there is no atomic, protected * operation that will guarantee this to be so. */ diff --git a/nuttx/sched/pthread_internal.h b/nuttx/sched/pthread_internal.h index 285cd11e6..d600e2481 100644 --- a/nuttx/sched/pthread_internal.h +++ b/nuttx/sched/pthread_internal.h @@ -65,7 +65,7 @@ * always be created in a montonically increasing fashion. */ -struct join_s +struct join_s { FAR struct join_s *next; /* Implements link list */ uint8_t crefs; /* Reference count */ diff --git a/nuttx/sched/pthread_mutexlock.c b/nuttx/sched/pthread_mutexlock.c index 7681d771a..d4e4237a5 100644 --- a/nuttx/sched/pthread_mutexlock.c +++ b/nuttx/sched/pthread_mutexlock.c @@ -145,7 +145,7 @@ int pthread_mutex_lock(FAR pthread_mutex_t *mutex) if (mutex->type == PTHREAD_MUTEX_RECURSIVE) { /* Yes... just increment the number of locks held and return success */ - + mutex->nlocks++; } else diff --git a/nuttx/sched/pthread_mutexunlock.c b/nuttx/sched/pthread_mutexunlock.c index 34846f952..0a3757e98 100644 --- a/nuttx/sched/pthread_mutexunlock.c +++ b/nuttx/sched/pthread_mutexunlock.c @@ -125,7 +125,7 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex) sdbg("Holder=%d returning EPERM\n", mutex->pid); ret = EPERM; } - + /* Yes, the caller owns the semaphore.. Is this a recursive mutex? */ diff --git a/nuttx/sched/sched_addblocked.c b/nuttx/sched/sched_addblocked.c index 66b10619b..70191797e 100644 --- a/nuttx/sched/sched_addblocked.c +++ b/nuttx/sched/sched_addblocked.c @@ -72,7 +72,7 @@ * Name: sched_addblocked * * Description: - * This function adds a TCB to one of the blocked state task lists as + * This function adds a TCB to one of the blocked state task lists as * inferred from task_state. * * Inputs: diff --git a/nuttx/sched/sched_cpuload.c b/nuttx/sched/sched_cpuload.c index 95a8b59e2..5a6bf6cc6 100644 --- a/nuttx/sched/sched_cpuload.c +++ b/nuttx/sched/sched_cpuload.c @@ -197,7 +197,7 @@ int clock_cpuload(int pid, FAR struct cpuload_s *cpuload) * on all threads during timer interrupt handling. sched_foreach() could * do this too, but this would require a little more overhead. */ - + if (g_pidhash[hash_index].tcb && g_pidhash[hash_index].pid == pid) { cpuload->total = g_cpuload_total; diff --git a/nuttx/sched/sched_garbage.c b/nuttx/sched/sched_garbage.c index d11a0df96..8609bb27d 100644 --- a/nuttx/sched/sched_garbage.c +++ b/nuttx/sched/sched_garbage.c @@ -84,7 +84,7 @@ static inline void sched_kucleanup(void) /* Test if the delayed deallocation queue is empty. No special protection * is needed because this is an atomic test. */ - + while (g_delayed_kufree.head) { /* Remove the first delayed deallocation. This is not atomic and so @@ -131,7 +131,7 @@ static inline void sched_kcleanup(void) /* Test if the delayed deallocation queue is empty. No special protection * is needed because this is an atomic test. */ - + while (g_delayed_kfree.head) { /* Remove the first delayed deallocation. This is not atomic and so diff --git a/nuttx/sched/sched_getstreams.c b/nuttx/sched/sched_getstreams.c index 9f0820a48..3d9e0e3d1 100644 --- a/nuttx/sched/sched_getstreams.c +++ b/nuttx/sched/sched_getstreams.c @@ -79,6 +79,6 @@ FAR struct streamlist *sched_getstreams(void) #else return &group->tg_streamlist; #endif -} +} #endif /* CONFIG_NFILE_DESCRIPTORS && CONFIG_NFILE_STREAMS */ diff --git a/nuttx/sched/sched_mergepending.c b/nuttx/sched/sched_mergepending.c index c400fee4d..885fec832 100644 --- a/nuttx/sched/sched_mergepending.c +++ b/nuttx/sched/sched_mergepending.c @@ -110,7 +110,7 @@ bool sched_mergepending(void) { pndnext = pndtcb->flink; - /* Search the g_readytorun list to find the location to insert the + /* Search the g_readytorun list to find the location to insert the * new pndtcb. Each is list is maintained in ascending sched_priority * order. */ diff --git a/nuttx/sched/sched_processtimer.c b/nuttx/sched/sched_processtimer.c index 6ca5981fb..60c2e6702 100644 --- a/nuttx/sched/sched_processtimer.c +++ b/nuttx/sched/sched_processtimer.c @@ -53,7 +53,7 @@ /************************************************************************ * Pre-processor Definitions ************************************************************************/ - + #ifndef CONFIG_SCHED_CPULOAD_TIMECONSTANT # define CONFIG_SCHED_CPULOAD_TIMECONSTANT 2 #endif diff --git a/nuttx/sched/sched_releasetcb.c b/nuttx/sched/sched_releasetcb.c index 21854c83d..96f9acff7 100644 --- a/nuttx/sched/sched_releasetcb.c +++ b/nuttx/sched/sched_releasetcb.c @@ -63,7 +63,7 @@ static void sched_releasepid(pid_t pid) { int hash_ndx = PIDHASH(pid); - /* Make any pid associated with this hash available. Note: + /* Make any pid associated with this hash available. Note: * no special precautions need be taken here because the * following action is atomic */ diff --git a/nuttx/sched/sched_removereadytorun.c b/nuttx/sched/sched_removereadytorun.c index 15dec43e0..b1f215a92 100644 --- a/nuttx/sched/sched_removereadytorun.c +++ b/nuttx/sched/sched_removereadytorun.c @@ -79,7 +79,7 @@ * rtcb - Points to the TCB that is ready-to-run * * Return Value: - * true if the currently active task (the head of the + * true if the currently active task (the head of the * g_readytorun list) has changed. * * Assumptions: diff --git a/nuttx/sched/sched_setpriority.c b/nuttx/sched/sched_setpriority.c index 4b5b9ccc1..13f177271 100644 --- a/nuttx/sched/sched_setpriority.c +++ b/nuttx/sched/sched_setpriority.c @@ -109,7 +109,7 @@ int sched_setpriority(FAR struct tcb_s *tcb, int sched_priority) /* Verify that the requested priority is in the valid range */ - if (sched_priority < SCHED_PRIORITY_MIN || + if (sched_priority < SCHED_PRIORITY_MIN || sched_priority > SCHED_PRIORITY_MAX) { errno = EINVAL; @@ -128,7 +128,7 @@ int sched_setpriority(FAR struct tcb_s *tcb, int sched_priority) switch (task_state) { /* CASE 1. The task is running or ready-to-run and a context switch - * may be caused by the re-prioritization + * may be caused by the re-prioritization */ case TSTATE_TASK_RUNNING: @@ -162,7 +162,7 @@ int sched_setpriority(FAR struct tcb_s *tcb, int sched_priority) case TSTATE_TASK_READYTORUN: /* A context switch will occur if the new priority of the ready-to - * run task is (strictly) greater than the current running task + * run task is (strictly) greater than the current running task */ if (sched_priority > rtcb->sched_priority) diff --git a/nuttx/sched/sched_waitid.c b/nuttx/sched/sched_waitid.c index 9bb6c200d..385dfa55a 100644 --- a/nuttx/sched/sched_waitid.c +++ b/nuttx/sched/sched_waitid.c @@ -117,21 +117,21 @@ static void exited_child(FAR struct tcb_s *rtcb, FAR struct child_status_s *chil * will will wait for. It is formed by OR-ing together one or more of the * following flags: * - * WEXITED - Wait for processes that have exited. + * WEXITED - Wait for processes that have exited. * WSTOPPED - Status will be returned for any child that has stopped - * upon receipt of a signal. + * upon receipt of a signal. * WCONTINUED - Status will be returned for any child that was stopped - * and has been continued. - * WNOHANG - Return immediately if there are no children to wait for. + * and has been continued. + * WNOHANG - Return immediately if there are no children to wait for. * WNOWAIT - Keep the process whose status is returned in 'info' in a * waitable state. This will not affect the state of the process; the - * process may be waited for again after this call completes. + * process may be waited for again after this call completes. * * The 'info' argument must point to a siginfo_t structure. If waitid() * returns because a child process was found that satisfied the conditions * indicated by the arguments idtype and options, then the structure pointed * to by 'info' will be filled in by the system with the status of the - * process. The si_signo member will always be equal to SIGCHLD. + * process. The si_signo member will always be equal to SIGCHLD. * * Input Parameters: * See description. @@ -139,15 +139,15 @@ static void exited_child(FAR struct tcb_s *rtcb, FAR struct child_status_s *chil * Returned Value: * If waitid() returns due to the change of state of one of its children, * 0 is returned. Otherwise, -1 is returned and errno is set to indicate - * the error. + * the error. * * The waitid() function will fail if: * * ECHILD - The calling process has no existing unwaited-for child - * processes. - * EINTR - The waitid() function was interrupted by a signal. + * processes. + * EINTR - The waitid() function was interrupted by a signal. * EINVAL - An invalid value was specified for options, or idtype and id - * specify an invalid set of processes. + * specify an invalid set of processes. * *****************************************************************************/ @@ -297,7 +297,7 @@ int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) child = group_findchild(rtcb->group, (pid_t)id); DEBUGASSERT(child); - + /* Did the child exit? */ if ((child->ch_flags & CHILD_FLAG_EXITED) != 0) diff --git a/nuttx/sched/sched_waitpid.c b/nuttx/sched/sched_waitpid.c index 7d1196350..fbed490c1 100644 --- a/nuttx/sched/sched_waitpid.c +++ b/nuttx/sched/sched_waitpid.c @@ -93,19 +93,19 @@ * * WCONTINUED - The waitpid() function will report the status of any * continued child process specified by pid whose status has not been - * reported since it continued from a job control stop. + * reported since it continued from a job control stop. * WNOHANG - The waitpid() function will not suspend execution of the * calling thread if status is not immediately available for one of the - * child processes specified by pid. + * child processes specified by pid. * WUNTRACED - The status of any child processes specified by pid that are * stopped, and whose status has not yet been reported since they stopped, - * will also be reported to the requesting process. + * will also be reported to the requesting process. * * If the calling process has SA_NOCLDWAIT set or has SIGCHLD set to * SIG_IGN, and the process has no unwaited-for children that were * transformed into zombie processes, the calling thread will block until all * of the children of the process containing the calling thread terminate, and - * waitpid() will fail and set errno to ECHILD. + * waitpid() will fail and set errno to ECHILD. * * If waitpid() returns because the status of a child process is available, * these functions will return a value equal to the process ID of the child @@ -125,22 +125,22 @@ * to by stat_loc. * * WIFEXITED(stat_val) - Evaluates to a non-zero value if status was - * returned for a child process that terminated normally. + * returned for a child process that terminated normally. * WEXITSTATUS(stat_val) - If the value of WIFEXITED(stat_val) is non-zero, * this macro evaluates to the low-order 8 bits of the status argument * that the child process passed to _exit() or exit(), or the value the - * child process returned from main(). + * child process returned from main(). * WIFSIGNALED(stat_val) - Evaluates to a non-zero value if status was * returned for a child process that terminated due to the receipt of a - * signal that was not caught (see <signal.h>). + * signal that was not caught (see <signal.h>). * WTERMSIG(stat_val) - If the value of WIFSIGNALED(stat_val) is non-zero, * this macro evaluates to the number of the signal that caused the - * termination of the child process. + * termination of the child process. * WIFSTOPPED(stat_val) - Evaluates to a non-zero value if status was - * returned for a child process that is currently stopped. + * returned for a child process that is currently stopped. * WSTOPSIG(stat_val) - If the value of WIFSTOPPED(stat_val) is non-zero, * this macro evaluates to the number of the signal that caused the child - * process to stop. + * process to stop. * WIFCONTINUED(stat_val) - Evaluates to a non-zero value if status was * returned for a child process that has continued from a job control stop. * @@ -165,10 +165,10 @@ * * ECHILD - The process specified by pid does not exist or is not a child of * the calling process, or the process group specified by pid does not exist - * or does not have any member process that is a child of the calling process. + * or does not have any member process that is a child of the calling process. * EINTR - The function was interrupted by a signal. The value of the location - * pointed to by stat_loc is undefined. - * EINVAL - The options argument is not valid. + * pointed to by stat_loc is undefined. + * EINVAL - The options argument is not valid. * * Assumptions: * @@ -231,7 +231,7 @@ pid_t waitpid(pid_t pid, int *stat_loc, int options) } /* Then wait for the task to exit */ - + ret = sem_wait(&group->tg_exitsem); if (ret < 0) { diff --git a/nuttx/sched/sem_holder.c b/nuttx/sched/sem_holder.c index b88bebf36..5a399f7aa 100644 --- a/nuttx/sched/sem_holder.c +++ b/nuttx/sched/sem_holder.c @@ -324,7 +324,7 @@ static int sem_boostholderprio(FAR struct semholder_s *pholder, else { sdbg("CONFIG_SEM_NNESTPRIO exceeded\n"); - } + } } /* Raise the priority of the thread holding of the semaphore. @@ -503,13 +503,13 @@ static int sem_restoreholderprio(FAR struct semholder_s *pholder, FAR sem_t *sem /* And apply that priority to the thread (while retaining the base_priority) */ sched_setpriority(htcb, rpriority); - } + } else { /* The holder thread has been boosted to a higher priority than the * waiter task. The pending priority should be in the list (unless it * was lost because of of list overflow or because the holder was - * reporioritize again unbeknownst to the priority inheritance logic). + * reprioritize again unbeknownst to the priority inheritance logic). * * Search the list for the matching priority. */ @@ -517,7 +517,7 @@ static int sem_restoreholderprio(FAR struct semholder_s *pholder, FAR sem_t *sem for (i = 0; i < htcb->npend_reprio; i++) { /* Does this pending priority match the priority of the thread - * that just received the count? + * that just received the count? */ if (htcb->pend_reprios[i] == stcb->sched_priority) @@ -723,7 +723,7 @@ static inline void sem_restorebaseprio_task(FAR struct tcb_s *stcb, FAR sem_t *s } #endif - /* In any case, the currently executing task should have an entry in the + /* In any case, the currently executing task should have an entry in the * list. Its counts were previously decremented; if it now holds no * counts, then we need to remove it from the list of holders. */ @@ -862,7 +862,7 @@ void sem_addholder(FAR sem_t *sem) * Name: void sem_boostpriority(sem_t *sem) * * Description: - * + * * * Parameters: * None @@ -1057,7 +1057,7 @@ int sem_nfreeholders(void) #if CONFIG_SEM_PREALLOCHOLDERS > 0 FAR struct semholder_s *pholder; int n; - + for (pholder = g_freeholders, n = 0; pholder; pholder = pholder->flink) n++; return n; #else diff --git a/nuttx/sched/sem_open.c b/nuttx/sched/sem_open.c index b2b76fe38..d3ebede82 100644 --- a/nuttx/sched/sem_open.c +++ b/nuttx/sched/sem_open.c @@ -142,7 +142,7 @@ FAR sem_t *sem_open (FAR const char *name, int oflag, ...) psem = sem_findnamed(name); if (psem) { - /* It does. Check if the caller wanted to created + /* It does. Check if the caller wanted to created * a new semahore with this name. */ diff --git a/nuttx/sched/sem_timedwait.c b/nuttx/sched/sem_timedwait.c index f375ac06c..572d77960 100644 --- a/nuttx/sched/sem_timedwait.c +++ b/nuttx/sched/sem_timedwait.c @@ -113,7 +113,7 @@ static void sem_timeout(int argc, uint32_t pid) if (wtcb && wtcb->task_state == TSTATE_WAIT_SEM) { /* Cancel the semaphore wait */ - + sem_waitirq(wtcb, ETIMEDOUT); } @@ -252,7 +252,7 @@ int sem_timedwait(FAR sem_t *sem, FAR const struct timespec *abstime) /* Start the watchdog */ - err = OK; + err = OK; wd_start(rtcb->waitdog, ticks, (wdentry_t)sem_timeout, 1, getpid()); /* Now perform the blocking wait */ diff --git a/nuttx/sched/sem_waitirq.c b/nuttx/sched/sem_waitirq.c index 5c28a78a0..b86daaa5d 100644 --- a/nuttx/sched/sem_waitirq.c +++ b/nuttx/sched/sem_waitirq.c @@ -121,7 +121,7 @@ void sem_waitirq(FAR struct tcb_s *wtcb, int errcode) * that was taken by sem_post(). This count decremented the semaphore * count to negative and caused the thread to be blocked in the first * place. - */ + */ sem->semcount++; diff --git a/nuttx/sched/sig_action.c b/nuttx/sched/sig_action.c index 84a7ff6b6..049a85823 100644 --- a/nuttx/sched/sig_action.c +++ b/nuttx/sched/sig_action.c @@ -204,7 +204,7 @@ int sigaction(int signo, FAR const struct sigaction *act, FAR struct sigaction * /* If the argument act is a null pointer, signal handling is unchanged; * thus, the call can be used to enquire about the current handling of - * a given signal. + * a given signal. */ if (!act) diff --git a/nuttx/sched/sig_pending.c b/nuttx/sched/sig_pending.c index 8d39f19a4..07a79f85f 100644 --- a/nuttx/sched/sig_pending.c +++ b/nuttx/sched/sig_pending.c @@ -76,7 +76,7 @@ * This function stores the returns the set of signals that are blocked * for delivery and that are pending for the calling process in the space * pointed to by set. - * + * * Parameters: * set - The location to return the pending signal set. * diff --git a/nuttx/sched/sig_procmask.c b/nuttx/sched/sig_procmask.c index ea64f4685..aa738aa9a 100644 --- a/nuttx/sched/sig_procmask.c +++ b/nuttx/sched/sig_procmask.c @@ -163,7 +163,7 @@ int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset) rtcb->sigprocmask = *set; break; - default: + default: ret = ERROR; break; } diff --git a/nuttx/sched/sig_removependingsignal.c b/nuttx/sched/sig_removependingsignal.c index 9e9711b09..656cf726a 100644 --- a/nuttx/sched/sig_removependingsignal.c +++ b/nuttx/sched/sig_removependingsignal.c @@ -100,7 +100,7 @@ FAR sigpendq_t *sig_removependingsignal(FAR struct tcb_s *stcb, int signo) (currsig && currsig->info.si_signo != signo); prevsig = currsig, currsig = currsig->flink); - if (currsig) + if (currsig) { if (prevsig) { diff --git a/nuttx/sched/sig_suspend.c b/nuttx/sched/sig_suspend.c index e57ac4396..7342d124c 100644 --- a/nuttx/sched/sig_suspend.c +++ b/nuttx/sched/sig_suspend.c @@ -148,7 +148,7 @@ int sigsuspend(FAR const sigset_t *set) else { /* Its time to wait. Save a copy of the old sigprocmask and install - * the new (temporary) sigprocmask + * the new (temporary) sigprocmask */ saved_sigprocmask = rtcb->sigprocmask; diff --git a/nuttx/sched/task_posixspawn.c b/nuttx/sched/task_posixspawn.c index 7fc90c9fa..bc6f8dccc 100644 --- a/nuttx/sched/task_posixspawn.c +++ b/nuttx/sched/task_posixspawn.c @@ -268,7 +268,7 @@ static int posix_spawn_proxy(int argc, FAR char *argv[]) * CONFIG_BINFMT_EXEPATH is defined, then only posix_spawnp() behavior * is supported; otherwise, only posix_spawn behavior is supported. * - * file_actions - If 'file_actions' is a null pointer, then file + * file_actions - If 'file_actions' is a null pointer, then file * descriptors open in the calling process will remain open in the * child process (unless CONFIG_FDCLONE_STDIO is defined). If * 'file_actions' is not NULL, then the file descriptors open in the diff --git a/nuttx/sched/task_reparent.c b/nuttx/sched/task_reparent.c index e47fbfee5..d5c03b347 100644 --- a/nuttx/sched/task_reparent.c +++ b/nuttx/sched/task_reparent.c @@ -199,10 +199,10 @@ int task_reparent(pid_t ppid, pid_t chpid) ret = OK; #endif /* CONFIG_SCHED_CHILD_STATUS */ - + errout_with_ints: irqrestore(flags); - return ret; + return ret; } #else int task_reparent(pid_t ppid, pid_t chpid) @@ -254,7 +254,7 @@ int task_reparent(pid_t ppid, pid_t chpid) { ppid = otcb->ppid; } - + /* Get the new parent task's TCB (ptcb) */ ptcb = sched_gettcb(ppid); @@ -311,10 +311,10 @@ int task_reparent(pid_t ppid, pid_t chpid) ret = OK; #endif /* CONFIG_SCHED_CHILD_STATUS */ - + errout_with_ints: irqrestore(flags); - return ret; + return ret; } #endif #endif /* CONFIG_SCHED_HAVE_PARENT */ diff --git a/nuttx/sched/task_restart.c b/nuttx/sched/task_restart.c index 27bc4fc47..e47c12822 100644 --- a/nuttx/sched/task_restart.c +++ b/nuttx/sched/task_restart.c @@ -145,7 +145,7 @@ int task_restart(pid_t pid) } /* Try to recover from any bad states */ - + task_recover((FAR struct tcb_s *)tcb); /* Kill any children of this thread */ @@ -155,7 +155,7 @@ int task_restart(pid_t pid) #endif /* Remove the TCB from whatever list it is in. At this point, the - * TCB should no longer be accessible to the system + * TCB should no longer be accessible to the system */ state = irqsave(); diff --git a/nuttx/sched/task_spawn.c b/nuttx/sched/task_spawn.c index 70f20e0b4..e14bb271d 100644 --- a/nuttx/sched/task_spawn.c +++ b/nuttx/sched/task_spawn.c @@ -288,7 +288,7 @@ static int task_spawn_proxy(int argc, FAR char *argv[]) * * entry - The child task's entry point (an address in memory) * - * file_actions - If 'file_actions' is a null pointer, then file + * file_actions - If 'file_actions' is a null pointer, then file * descriptors open in the calling process will remain open in the * child process (unless CONFIG_FDCLONE_STDIO is defined). If * 'file_actions' is not NULL, then the file descriptors open in the diff --git a/nuttx/sched/task_vfork.c b/nuttx/sched/task_vfork.c index c552f278a..09d71cd26 100644 --- a/nuttx/sched/task_vfork.c +++ b/nuttx/sched/task_vfork.c @@ -75,7 +75,7 @@ * any data other than a variable of type pid_t used to store the return * value from vfork(), or returns from the function in which vfork() was * called, or calls any other function before successfully calling _exit() - * or one of the exec family of functions. + * or one of the exec family of functions. * * This functin provides one step in the overall vfork() sequence: It * Allocates and initializes the child task's TCB. The overall sequence is: @@ -198,7 +198,7 @@ errout_with_tcb: * any data other than a variable of type pid_t used to store the return * value from vfork(), or returns from the function in which vfork() was * called, or calls any other function before successfully calling _exit() - * or one of the exec family of functions. + * or one of the exec family of functions. * * This functin provides one step in the overall vfork() sequence: It * starts execution of the previously initialized TCB. The overall @@ -228,7 +228,7 @@ errout_with_tcb: * Upon successful completion, vfork() returns 0 to the child process and * returns the process ID of the child process to the parent process. * Otherwise, -1 is returned to the parent, no child process is created, - * and errno is set to indicate the error. + * and errno is set to indicate the error. * ****************************************************************************/ diff --git a/nuttx/sched/timer_create.c b/nuttx/sched/timer_create.c index edfb01080..8b620502a 100644 --- a/nuttx/sched/timer_create.c +++ b/nuttx/sched/timer_create.c @@ -90,7 +90,7 @@ static struct posix_timer_s *timer_allocate(void) irqrestore(flags); /* Did we get one? */ - + if (ret) { pt_flags = PT_FLAGS_PREALLOCATED; diff --git a/nuttx/sched/timer_getoverrun.c b/nuttx/sched/timer_getoverrun.c index 6d5a47465..f80499259 100644 --- a/nuttx/sched/timer_getoverrun.c +++ b/nuttx/sched/timer_getoverrun.c @@ -78,7 +78,7 @@ * timer_getoverrun() function will return the timer expiration overrun count for * the specified timer. The overrun count returned contains the number of extra * timer expirations that occurred between the time the signal was generated - * (queued) and when it was delivered or accepted, up to but not including an + * (queued) and when it was delivered or accepted, up to but not including an * implementation-defined maximum of DELAYTIMER_MAX. If the number of such * extra expirations is greater than or equal to DELAYTIMER_MAX, then the * overrun count will be set to DELAYTIMER_MAX. The value returned by diff --git a/nuttx/sched/wd_create.c b/nuttx/sched/wd_create.c index 61385b71a..2f9108335 100644 --- a/nuttx/sched/wd_create.c +++ b/nuttx/sched/wd_create.c @@ -74,7 +74,7 @@ /**************************************************************************** * Name: wd_create * - * Description: + * Description: * The wd_create function will create a watchdog by allocating it from the * list of free watchdogs. * diff --git a/nuttx/sched/wd_delete.c b/nuttx/sched/wd_delete.c index 16c123e13..ff9e0a1f0 100644 --- a/nuttx/sched/wd_delete.c +++ b/nuttx/sched/wd_delete.c @@ -74,7 +74,7 @@ /**************************************************************************** * Name: wd_delete * - * Description: + * Description: * The wd_delete function will deallocate a watchdog by returning it to * the free pool of watchdogs. The watchdog will be removed from the timer * queue if has been started. |