mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
sched/: Fix some spacing issues
This commit is contained in:
@@ -106,7 +106,7 @@ static int work_hpthread(int argc, char *argv[])
|
||||
{
|
||||
/* Loop forever */
|
||||
|
||||
for (;;)
|
||||
for (; ; )
|
||||
{
|
||||
#ifndef CONFIG_SCHED_LPWORK
|
||||
/* First, perform garbage collection. This cleans-up memory
|
||||
|
||||
@@ -127,7 +127,7 @@ static int work_lpthread(int argc, char *argv[])
|
||||
|
||||
/* Loop forever */
|
||||
|
||||
for (;;)
|
||||
for (; ; )
|
||||
{
|
||||
#if CONFIG_SCHED_LPNTHREADS > 0
|
||||
/* Thread 0 is special. Only thread 0 performs period garbage collection */
|
||||
@@ -147,14 +147,14 @@ static int work_lpthread(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
/* Perform garbage collection. This cleans-up memory de-allocations
|
||||
* that were queued because they could not be freed in that execution
|
||||
* context (for example, if the memory was freed from an interrupt handler).
|
||||
* NOTE: If the work thread is disabled, this clean-up is performed by
|
||||
* the IDLE thread (at a very, very low priority).
|
||||
*
|
||||
* In the event of multiple low priority threads, on index == 0 will do
|
||||
* the garbage collection.
|
||||
*/
|
||||
* that were queued because they could not be freed in that execution
|
||||
* context (for example, if the memory was freed from an interrupt handler).
|
||||
* NOTE: If the work thread is disabled, this clean-up is performed by
|
||||
* the IDLE thread (at a very, very low priority).
|
||||
*
|
||||
* In the event of multiple low priority threads, on index == 0 will do
|
||||
* the garbage collection.
|
||||
*/
|
||||
|
||||
sched_garbagecollection();
|
||||
|
||||
|
||||
@@ -239,20 +239,20 @@ void work_process(FAR struct kwork_wqueue_s *wqueue, uint32_t period, int wndx)
|
||||
* period will be non-zero and equal to wqueue->delay.
|
||||
*/
|
||||
|
||||
if (period == 0)
|
||||
{
|
||||
sigset_t set;
|
||||
if (period == 0)
|
||||
{
|
||||
sigset_t set;
|
||||
|
||||
/* Wait indefinitely until signalled with SIGWORK */
|
||||
/* Wait indefinitely until signalled with SIGWORK */
|
||||
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGWORK);
|
||||
sigemptyset(&set);
|
||||
sigaddset(&set, SIGWORK);
|
||||
|
||||
wqueue->worker[wndx].busy = false;
|
||||
DEBUGVERIFY(sigwaitinfo(&set, NULL));
|
||||
wqueue->worker[wndx].busy = false;
|
||||
DEBUGVERIFY(sigwaitinfo(&set, NULL));
|
||||
wqueue->worker[wndx].busy = true;
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Get the delay (in clock ticks) since we started the sampling */
|
||||
|
||||
Reference in New Issue
Block a user