Costmetic changes
This commit is contained in:
parent
c790450ba2
commit
8e203e09d4
@ -66,7 +66,7 @@ struct pm_global_s g_pmglobals;
|
||||
* Description:
|
||||
* This function is called by MCU-specific one-time at power on reset in
|
||||
* order to initialize the power management capabilities. This function
|
||||
* must be called *very* early in the initializeation sequence *before* any
|
||||
* must be called *very* early in the initialization sequence *before* any
|
||||
* other device drivers are initialize (since they may attempt to register
|
||||
* with the power management subsystem).
|
||||
*
|
||||
|
@ -47,7 +47,7 @@
|
||||
#ifndef __SWAP_UINT16_ISMACRO
|
||||
uint16_t __swap_uint16(uint16_t n)
|
||||
{
|
||||
return (uint16_t)(((((uint16_t)(n)) & 0x00ff) << 8) | \
|
||||
return (uint16_t)(((((uint16_t)(n)) & 0x00ff) << 8) |
|
||||
((((uint16_t)(n)) >> 8) & 0x00ff));
|
||||
}
|
||||
#endif
|
||||
|
@ -47,9 +47,9 @@
|
||||
#ifndef __SWAP_UINT32_ISMACRO
|
||||
uint32_t __swap_uint32(uint32_t n)
|
||||
{
|
||||
return (uint32_t)(((((uint32_t)(n)) & 0x000000ffUL) << 24) | \
|
||||
((((uint32_t)(n)) & 0x0000ff00UL) << 8) | \
|
||||
((((uint32_t)(n)) & 0x00ff0000UL) >> 8) | \
|
||||
return (uint32_t)(((((uint32_t)(n)) & 0x000000ffUL) << 24) |
|
||||
((((uint32_t)(n)) & 0x0000ff00UL) << 8) |
|
||||
((((uint32_t)(n)) & 0x00ff0000UL) >> 8) |
|
||||
((((uint32_t)(n)) & 0xff000000UL) >> 24));
|
||||
}
|
||||
#endif
|
||||
|
@ -49,13 +49,13 @@
|
||||
#ifdef CONFIG_HAVE_LONG_LONG
|
||||
uint64_t __swap_uint64(uint64_t n)
|
||||
{
|
||||
return (uint64_t)(((((uint64_t)(n)) & 0x00000000000000ffULL) << 56) | \
|
||||
((((uint64_t)(n)) & 0x000000000000ff00ULL) << 40) | \
|
||||
((((uint64_t)(n)) & 0x0000000000ff0000ULL) << 24) | \
|
||||
((((uint64_t)(n)) & 0x00000000ff000000ULL) << 8) | \
|
||||
((((uint64_t)(n)) & 0x000000ff00000000ULL) >> 8) | \
|
||||
((((uint64_t)(n)) & 0x0000ff0000000000ULL) >> 24) | \
|
||||
((((uint64_t)(n)) & 0x00ff000000000000ULL) >> 40) | \
|
||||
return (uint64_t)(((((uint64_t)(n)) & 0x00000000000000ffULL) << 56) |
|
||||
((((uint64_t)(n)) & 0x000000000000ff00ULL) << 40) |
|
||||
((((uint64_t)(n)) & 0x0000000000ff0000ULL) << 24) |
|
||||
((((uint64_t)(n)) & 0x00000000ff000000ULL) << 8) |
|
||||
((((uint64_t)(n)) & 0x000000ff00000000ULL) >> 8) |
|
||||
((((uint64_t)(n)) & 0x0000ff0000000000ULL) >> 24) |
|
||||
((((uint64_t)(n)) & 0x00ff000000000000ULL) >> 40) |
|
||||
((((uint64_t)(n)) & 0xff00000000000000ULL) >> 56));
|
||||
}
|
||||
#endif
|
||||
|
@ -150,7 +150,7 @@ int os_idle_task(int argc, FAR char *argv[])
|
||||
* possible because if the IDLE thread is running, no other task is!
|
||||
*
|
||||
* WARNING: This logic could have undesirable side-effects if priority
|
||||
* inheritance is enabled. Imaginee the possible issues if the
|
||||
* inheritance is enabled. Imagine the possible issues if the
|
||||
* priority of the IDLE thread were to get boosted! Moral: If you
|
||||
* use priority inheritance, then you should also enable the work
|
||||
* queue so that is done in a safer context.
|
||||
@ -173,10 +173,11 @@ int os_idle_task(int argc, FAR char *argv[])
|
||||
* Name: os_smp_start
|
||||
*
|
||||
* Description:
|
||||
* In an SMP configution, only one CPU is initially active (CPU 0). System
|
||||
* initialization occurs on that single thread. At the completion of the
|
||||
* initialization of the OS, just before beginning normal multitasking,
|
||||
* the additional CPUs would be started by calling this function.
|
||||
* In an SMP configuration, only one CPU is initially active (CPU 0).
|
||||
* System initialization occurs on that single thread. At the completion
|
||||
* of the initialization of the OS, just before beginning normal
|
||||
* multitasking, the additional CPUs would be started by calling this
|
||||
* function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* None
|
||||
|
@ -356,7 +356,7 @@ static inline bool pg_startfill(void)
|
||||
|
||||
/* Remove the TCB at the head of the g_waitfor fill list and check if there
|
||||
* is any task waiting for a page fill. pg_dequeue will handle this (plus
|
||||
* some cornercases) and will true if the next page TCB was successfully
|
||||
* some corner cases) and will true if the next page TCB was successfully
|
||||
* dequeued.
|
||||
*/
|
||||
|
||||
@ -436,7 +436,7 @@ static inline bool pg_startfill(void)
|
||||
* Called by the page fill worker thread when all pending page fill
|
||||
* operations have been completed and the g_waitingforfill list is empty.
|
||||
*
|
||||
* This functin will perform the following operations:
|
||||
* This function will perform the following operations:
|
||||
*
|
||||
* - Set g_pftcb to NULL.
|
||||
* - Restore the default priority of the page fill worker thread.
|
||||
@ -469,7 +469,7 @@ static inline void pg_alldone(void)
|
||||
* Called by the page fill worker thread when a page fill completes.
|
||||
* Either (1) in the non-blocking up_fillpage(), after the architecture-
|
||||
* specific driver call the pg_callback() to wake up the page fill worker
|
||||
* thread, or (2) after the blocking up_fillpage() returens (when
|
||||
* thread, or (2) after the blocking up_fillpage() returns (when
|
||||
* CONFIG_PAGING_BLOCKINGFILL is defined).
|
||||
*
|
||||
* This function is just a dumb wrapper around up_unblocktask(). This
|
||||
@ -500,6 +500,7 @@ static inline void pg_fillcomplete(void)
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: pg_worker
|
||||
*
|
||||
@ -510,7 +511,7 @@ static inline void pg_fillcomplete(void)
|
||||
*
|
||||
* The page fill worker thread will be awakened on one of three conditions:
|
||||
* - When signaled by pg_miss(), the page fill worker thread will be
|
||||
* awakenend, or
|
||||
* awakened, or
|
||||
* - if CONFIG_PAGING_BLOCKINGFILL is not defined, from pg_callback()
|
||||
* after completing a page fill.
|
||||
* - A configurable timeout with no activity.
|
||||
@ -541,7 +542,8 @@ int pg_worker(int argc, char *argv[])
|
||||
{
|
||||
/* Wait awhile. We will wait here until either the configurable timeout
|
||||
* elapses or until we are awakened by a signal (which terminates the
|
||||
* nxsig_usleep with an EINTR error). Note that interrupts will be re- * enabled while this task sleeps.
|
||||
* nxsig_usleep with an EINTR error). Note that interrupts will be re-
|
||||
* enabled while this task sleeps.
|
||||
*
|
||||
* The timeout is a failsafe that will handle any cases where a single
|
||||
* is lost (that would really be a bug and shouldn't happen!) and also
|
||||
@ -552,7 +554,8 @@ int pg_worker(int argc, char *argv[])
|
||||
|
||||
/* The page fill worker thread will be awakened on one of three conditions:
|
||||
*
|
||||
* - When signaled by pg_miss(), the page fill worker thread will be awakenend,
|
||||
* - When signaled by pg_miss(), the page fill worker thread will be
|
||||
* awakened,
|
||||
* - if CONFIG_PAGING_BLOCKINGFILL is not defined, from pg_callback()
|
||||
* after completing a page fill, or
|
||||
* - On a configurable timeout expires with no activity.
|
||||
@ -640,7 +643,7 @@ int pg_worker(int argc, char *argv[])
|
||||
{
|
||||
/* Yes .. Start the fill and block until the fill completes.
|
||||
* Check the return value to see a fill was actually performed.
|
||||
* (false means that no fill was perforemd).
|
||||
* (false means that no fill was performed).
|
||||
*/
|
||||
|
||||
pginfo("Calling pg_startfill\n");
|
||||
|
@ -1,7 +1,8 @@
|
||||
/****************************************************************************
|
||||
* sched/timer/timer_create.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011, 2014-2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2011, 2014-2017 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -71,7 +71,7 @@ static void timer_timeout(int argc, wdparm_t itimer);
|
||||
* Name: timer_signotify
|
||||
*
|
||||
* Description:
|
||||
* This function basically reimplements nxsig_queue() so that the si_code
|
||||
* This function basically re-implements nxsig_queue() so that the si_code
|
||||
* can be correctly set to SI_TIMER
|
||||
*
|
||||
* Input Parameters:
|
||||
@ -279,7 +279,7 @@ static void timer_timeout(int argc, wdparm_t itimer)
|
||||
* Input Parameters:
|
||||
* timerid - The pre-thread timer, previously created by the call to
|
||||
* timer_create(), to be be set.
|
||||
* flags - Specifie characteristics of the timer (see above)
|
||||
* flags - Specifies characteristics of the timer (see above)
|
||||
* value - Specifies the timer value to set
|
||||
* ovalue - A location in which to return the time remaining from the
|
||||
* previous timer setting. (ignored)
|
||||
@ -329,7 +329,7 @@ int timer_settime(timer_t timerid, int flags,
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* Setup up any repititive timer */
|
||||
/* Setup up any repetitive timer */
|
||||
|
||||
if (value->it_interval.tv_sec > 0 || value->it_interval.tv_nsec > 0)
|
||||
{
|
||||
@ -372,7 +372,7 @@ int timer_settime(timer_t timerid, int flags,
|
||||
}
|
||||
|
||||
/* If the time is in the past or now, then set up the next interval
|
||||
* instead (assuming a repititive timer).
|
||||
* instead (assuming a repetitive timer).
|
||||
*/
|
||||
|
||||
if (delay <= 0)
|
||||
|
@ -1,7 +1,8 @@
|
||||
/****************************************************************************
|
||||
* sched/wdog/wd_cancel.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2014, 2016-2017 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2007-2009, 2014, 2016-2017 Gregory Nutt. All rights
|
||||
* reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -59,7 +60,7 @@
|
||||
*
|
||||
* Description:
|
||||
* This function cancels a currently running watchdog timer. Watchdog
|
||||
* timers may be cancelled from the interrupt level.
|
||||
* timers may be canceled from the interrupt level.
|
||||
*
|
||||
* Input Parameters:
|
||||
* wdog - ID of the watchdog to cancel.
|
||||
@ -110,7 +111,7 @@ int wd_cancel(WDOG_ID wdog)
|
||||
ASSERT(curr);
|
||||
|
||||
/* If there is a watchdog in the timer queue after the one that
|
||||
* is being cancelled, then it inherits the remaining ticks.
|
||||
* is being canceled, then it inherits the remaining ticks.
|
||||
*/
|
||||
|
||||
if (curr->next)
|
||||
|
@ -189,7 +189,7 @@ static inline void wd_expiration(void)
|
||||
* Name: wd_start
|
||||
*
|
||||
* Description:
|
||||
* This function adds a watchdog timer to the actuve timer queue. The
|
||||
* This function adds a watchdog timer to the active timer queue. The
|
||||
* specified watchdog function at 'wdentry' will be called from the
|
||||
* interrupt level after the specified number of ticks has elapsed.
|
||||
* Watchdog timers may be started from the interrupt level.
|
||||
@ -428,7 +428,7 @@ unsigned int wd_timer(int ticks)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
/* We are in an interrupt handler as, as a consequence, interrupts are
|
||||
* disabled. But in the SMP case, interrupst MAY be disabled only on
|
||||
* disabled. But in the SMP case, interrupts MAY be disabled only on
|
||||
* the local CPU since most architectures do not permit disabling
|
||||
* interrupts on other CPUS.
|
||||
*
|
||||
@ -490,7 +490,7 @@ void wd_timer(void)
|
||||
irqstate_t flags;
|
||||
|
||||
/* We are in an interrupt handler as, as a consequence, interrupts are
|
||||
* disabled. But in the SMP case, interrupst MAY be disabled only on
|
||||
* disabled. But in the SMP case, interrupts MAY be disabled only on
|
||||
* the local CPU since most architectures do not permit disabling
|
||||
* interrupts on other CPUS.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user