From dacdda304b8a7a2a10bc03ae36b1d75b728ba149 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 24 May 2011 02:44:58 +0000 Subject: Remove white-spaces. --- cpukit/score/include/rtems/score/percpu.h | 12 +++--- cpukit/score/include/rtems/score/prioritybitmap.h | 8 ++-- cpukit/score/include/rtems/score/rbtree.h | 28 ++++++------- .../score/include/rtems/score/schedulerpriority.h | 18 ++++----- cpukit/score/include/rtems/score/schedulersimple.h | 38 +++++++++--------- .../score/include/rtems/score/schedulersimplesmp.h | 12 +++--- cpukit/score/include/rtems/score/smp.h | 2 +- cpukit/score/include/rtems/score/smplock.h | 6 +-- cpukit/score/include/rtems/score/thread.h | 2 +- cpukit/score/src/heapfree.c | 8 ++-- cpukit/score/src/objectinitializeinformation.c | 2 +- cpukit/score/src/rbtree.c | 2 +- cpukit/score/src/rbtreeextract.c | 46 +++++++++++----------- cpukit/score/src/rbtreefind.c | 6 +-- cpukit/score/src/rbtreeinsert.c | 16 ++++---- cpukit/score/src/rbtreepeek.c | 2 +- cpukit/score/src/schedulerpriorityenqueue.c | 2 +- cpukit/score/src/schedulerpriorityenqueuefirst.c | 2 +- cpukit/score/src/schedulerpriorityextract.c | 2 +- cpukit/score/src/schedulerpriorityupdate.c | 6 +-- cpukit/score/src/schedulersimple.c | 10 ++--- cpukit/score/src/schedulersimpleextract.c | 2 +- cpukit/score/src/schedulersimpleschedule.c | 4 +- cpukit/score/src/schedulersimplesmpschedule.c | 10 ++--- cpukit/score/src/schedulersimpleyield.c | 4 +- cpukit/score/src/smp.c | 4 +- cpukit/score/src/smplock.c | 10 ++--- cpukit/score/src/threadcreateidle.c | 2 +- cpukit/score/src/threadget.c | 2 +- cpukit/score/src/threadsetstate.c | 2 +- cpukit/score/src/threadsettransient.c | 2 +- 31 files changed, 136 insertions(+), 136 deletions(-) (limited to 'cpukit') diff --git a/cpukit/score/include/rtems/score/percpu.h b/cpukit/score/include/rtems/score/percpu.h index 1ba5b3d6d2..2631235f06 100644 --- a/cpukit/score/include/rtems/score/percpu.h +++ b/cpukit/score/include/rtems/score/percpu.h @@ -13,7 +13,7 @@ * found in the file LICENSE in this distribution or at * http://www.rtems.com/license/LICENSE. * - * $Id$ + * $Id$ */ #ifndef _RTEMS_PERCPU_H @@ -64,7 +64,7 @@ typedef struct Thread_Control_struct Thread_Control; #endif typedef enum { - + /** * This defines the constant used to indicate that the cpu code is in * its initial powered up start. @@ -92,17 +92,17 @@ typedef enum { typedef struct { #if defined(RTEMS_SMP) /** This element is used to lock this structure */ - SMP_lock_spinlock_simple_Control lock; + SMP_lock_spinlock_simple_Control lock; /** This indicates that the CPU is online. */ - uint32_t state; + uint32_t state; /** * This is the request for the interrupt. - * + * * @note This may become a chain protected by atomic instructions. */ - uint32_t message; + uint32_t message; #endif #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) || \ diff --git a/cpukit/score/include/rtems/score/prioritybitmap.h b/cpukit/score/include/rtems/score/prioritybitmap.h index bba5b428b6..e02992a1fe 100644 --- a/cpukit/score/include/rtems/score/prioritybitmap.h +++ b/cpukit/score/include/rtems/score/prioritybitmap.h @@ -20,8 +20,8 @@ #define _RTEMS_SCORE_PRIORITYBITMAP_H /** - * @addtogroup ScorePriority - * + * @addtogroup ScorePriority + * */ /**@{*/ @@ -38,8 +38,8 @@ extern "C" { #include -/* - * The Priority_bit_map_Control variables are instantiated only +/* + * The Priority_bit_map_Control variables are instantiated only * if using the bit map handler. */ diff --git a/cpukit/score/include/rtems/score/rbtree.h b/cpukit/score/include/rtems/score/rbtree.h index 8360c99497..623d787c48 100644 --- a/cpukit/score/include/rtems/score/rbtree.h +++ b/cpukit/score/include/rtems/score/rbtree.h @@ -83,12 +83,12 @@ extern "C" { /** * @brief macro to return the structure containing the @a node. * - * This macro returns a pointer of type @a container_type that points - * to the structure containing @a node, where @a node_field_name is the + * This macro returns a pointer of type @a container_type that points + * to the structure containing @a node, where @a node_field_name is the * field name of the RBTree_Node structure in @a container_type. * */ - + #define _RBTree_Container_of(node,container_type, node_field_name) \ ((container_type*) \ ((size_t)node - ((size_t)(&((container_type *)0)->node_field_name)))) @@ -107,12 +107,12 @@ extern "C" { * * @note This implementation does not require special checks for * manipulating the root element of the RBT. - * To accomplish this the @a RBTree_Control structure can be overlaid - * with a @ref RBTree_Node structure to act as a "dummy root", + * To accomplish this the @a RBTree_Control structure can be overlaid + * with a @ref RBTree_Node structure to act as a "dummy root", * which has a NULL parent and its left child is the root. */ - /* the RBTree_Control is actually part of the RBTree structure as an + /* the RBTree_Control is actually part of the RBTree structure as an * RBTree_Node. The mapping of fields from RBTree_Control to RBTree_Node are: * permanent_null == parent * root == left @@ -201,7 +201,7 @@ extern "C" { * @brief Check the min or max node on a rbtree * * This function returns a pointer to the min or max node of @a the_rbtree. - * If @a the_rbtree is empty, then NULL is returned. @a dir specifies + * If @a the_rbtree is empty, then NULL is returned. @a dir specifies * whether to return the min (0) or max (1). * * @return This method returns a pointer to a node. @@ -216,18 +216,18 @@ extern "C" { /** @brief Find the node with given value in the tree * - * This function returns a pointer to the node with value equal to @a value - * if it exists in the Red-Black Tree @a the_rbtree, and NULL if not. + * This function returns a pointer to the node with value equal to @a value + * if it exists in the Red-Black Tree @a the_rbtree, and NULL if not. */ RBTree_Node *_RBTree_Find( - RBTree_Control *the_rbtree, + RBTree_Control *the_rbtree, unsigned int value ); - /** @brief Find the control structure of the tree containing the given node + /** @brief Find the control structure of the tree containing the given node * - * This function returns a pointer to the control structure of the tree - * containing @a the_node, if it exists, and NULL if not. + * This function returns a pointer to the control structure of the tree + * containing @a the_node, if it exists, and NULL if not. */ RBTree_Control *_RBTree_Find_header( RBTree_Node *the_node @@ -239,7 +239,7 @@ extern "C" { * * @retval 0 Successfully inserted. * @retval -1 NULL @a the_node. - * @retval RBTree_Node* if one with equal value to @a the_node->value exists + * @retval RBTree_Node* if one with equal value to @a the_node->value exists * in @a the_rbtree. * * @note It does NOT disable interrupts to ensure the atomicity diff --git a/cpukit/score/include/rtems/score/schedulerpriority.h b/cpukit/score/include/rtems/score/schedulerpriority.h index 58ccc795e1..2cd2353204 100644 --- a/cpukit/score/include/rtems/score/schedulerpriority.h +++ b/cpukit/score/include/rtems/score/schedulerpriority.h @@ -68,19 +68,19 @@ typedef struct { void _Scheduler_priority_Initialize(void); /** - * This routine removes @a the_thread from the scheduling decision, + * This routine removes @a the_thread from the scheduling decision, * that is, removes it from the ready queue. It performs * any necessary scheduling operations including the selection of * a new heir thread. * * @param[in] the_thread is the thread to be blocked */ -void _Scheduler_priority_Block( - Thread_Control *the_thread +void _Scheduler_priority_Block( + Thread_Control *the_thread ); /** - * This kernel routine sets the heir thread to be the next ready thread + * This kernel routine sets the heir thread to be the next ready thread * by invoking the_scheduler->ready_queue->operations->first(). */ void _Scheduler_priority_Schedule(void); @@ -106,7 +106,7 @@ void _Scheduler_priority_Free( ); /** - * This routine updates @a the_thread->scheduler based on @a the_scheduler + * This routine updates @a the_thread->scheduler based on @a the_scheduler * structures and thread state. * * @param[in] the_thread will have its scheduler specific information @@ -117,14 +117,14 @@ void _Scheduler_priority_Update( ); /** - * This routine adds @a the_thread to the scheduling decision, - * that is, adds it to the ready queue and + * This routine adds @a the_thread to the scheduling decision, + * that is, adds it to the ready queue and * updates any appropriate scheduling variables, for example the heir thread. * * @param[in] the_thread will be unblocked */ void _Scheduler_priority_Unblock( - Thread_Control *the_thread + Thread_Control *the_thread ); /** @@ -150,7 +150,7 @@ void _Scheduler_priority_Enqueue( ); /** - * This routine puts @a the_thread to the head of the ready queue. + * This routine puts @a the_thread to the head of the ready queue. * For priority-based ready queues, the thread will be the first thread * at its priority level. * diff --git a/cpukit/score/include/rtems/score/schedulersimple.h b/cpukit/score/include/rtems/score/schedulersimple.h index 0e2187f10d..d81939e49c 100644 --- a/cpukit/score/include/rtems/score/schedulersimple.h +++ b/cpukit/score/include/rtems/score/schedulersimple.h @@ -53,7 +53,7 @@ extern "C" { void _Scheduler_simple_Initialize( void ); /** - * This routine sets the heir thread to be the next ready thread + * This routine sets the heir thread to be the next ready thread * on the ready queue by getting the first node in the scheduler * information. */ @@ -62,41 +62,41 @@ void _Scheduler_simple_Schedule( void ); /** * This routine is invoked when a thread wishes to voluntarily * transfer control of the processor to another thread in the queue. - * It will remove the running THREAD from the scheduler.informaiton - * (where the ready queue is stored) and place it immediately at the - * between the last entry of its priority and the next priority thread. - * Reset timeslice and yield the processor functions both use this routine, - * therefore if reset is true and this is the only thread on the queue then + * It will remove the running THREAD from the scheduler.informaiton + * (where the ready queue is stored) and place it immediately at the + * between the last entry of its priority and the next priority thread. + * Reset timeslice and yield the processor functions both use this routine, + * therefore if reset is true and this is the only thread on the queue then * the timeslice counter is reset. The heir THREAD will be updated if the * running is also the currently the heir. */ void _Scheduler_simple_Yield( void ); /** - * This routine removes @a the_thread from the scheduling decision, + * This routine removes @a the_thread from the scheduling decision, * that is, removes it from the ready queue. It performs * any necessary scheduling operations including the selection of * a new heir thread. * * @param[in] the_thread is the thread that is to be blocked */ -void _Scheduler_simple_Block( - Thread_Control *the_thread +void _Scheduler_simple_Block( + Thread_Control *the_thread ); /** - * This routine adds @a the_thread to the scheduling decision, - * that is, adds it to the ready queue and + * This routine adds @a the_thread to the scheduling decision, + * that is, adds it to the ready queue and * updates any appropriate scheduling variables, for example the heir thread. * * @param[in] the_thread is the thread that is to be unblocked */ void _Scheduler_simple_Unblock( - Thread_Control *the_thread + Thread_Control *the_thread ); /** - * This routine removes a specific thread from the specified + * This routine removes a specific thread from the specified * simple-based ready queue. * * @param[in] the_thread is the thread to be blocked @@ -115,7 +115,7 @@ void _Scheduler_simple_Enqueue( ); /** - * This routine puts @a the_thread to the head of the ready queue. + * This routine puts @a the_thread to the head of the ready queue. * The thread will be the first thread at its priority level. * * @param[in] the_thread is the thread to be blocked @@ -135,7 +135,7 @@ void _Scheduler_simple_Enqueue_first( * @return this routine returns -1 since this is just an empty placeholder * and the return value may be defined differently by each scheduler. */ -void *_Scheduler_simple_Allocate( +void *_Scheduler_simple_Allocate( Thread_Control *the_thread ); @@ -146,7 +146,7 @@ void *_Scheduler_simple_Allocate( * * @param[in] the_thread is the thread to be blocked */ -void _Scheduler_simple_Update( +void _Scheduler_simple_Update( Thread_Control *the_thread ); @@ -157,7 +157,7 @@ void _Scheduler_simple_Update( * * @param[in] the_thread is the thread to be blocked */ -void _Scheduler_simple_Free( +void _Scheduler_simple_Free( Thread_Control *the_thread ); @@ -166,7 +166,7 @@ void _Scheduler_simple_Free( * * This routine puts @a the_thread on the ready queue * at the end of its priority group. - * + * * @param[in] the_thread - pointer to a thread control block */ void _Scheduler_simple_Ready_queue_enqueue( @@ -178,7 +178,7 @@ void _Scheduler_simple_Ready_queue_enqueue( * * This routine puts @a the_thread on to the ready queue * at the beginning of its priority group. - * + * * @param[in] the_thread - pointer to a thread control block */ void _Scheduler_simple_Ready_queue_enqueue_first( diff --git a/cpukit/score/include/rtems/score/schedulersimplesmp.h b/cpukit/score/include/rtems/score/schedulersimplesmp.h index 0f57fcec9e..462eaf00e6 100644 --- a/cpukit/score/include/rtems/score/schedulersimplesmp.h +++ b/cpukit/score/include/rtems/score/schedulersimplesmp.h @@ -64,35 +64,35 @@ extern "C" { * * This routine allocates ready threads to individual cores in an SMP * system. If the allocation results in a new heir which requires - * a dispatch, then the dispatch needed flag for that core is set. + * a dispatch, then the dispatch needed flag for that core is set. */ void _Scheduler_simple_smp_Schedule( void ); /** * @brief Scheduler Simple SMP Block Method * - * This routine removes @a the_thread from the scheduling decision, + * This routine removes @a the_thread from the scheduling decision, * that is, removes it from the ready queue. It performs * any necessary scheduling operations including the selection of * a new heir thread. * * @param[in] the_thread is the thread that is to be blocked */ -void _Scheduler_simple_smp_Block( - Thread_Control *the_thread +void _Scheduler_simple_smp_Block( + Thread_Control *the_thread ); /** * @brief Scheduler Simple SMP Unblock Method * - * This routine adds @a the_thread to the scheduling decision, + * This routine adds @a the_thread to the scheduling decision, * that is, adds it to the ready queue and updates any appropriate * scheduling variables, for example the heir thread. * * @param[in] the_thread is the thread that is to be unblocked */ void _Scheduler_simple_smp_Unblock( - Thread_Control *the_thread + Thread_Control *the_thread ); #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/smp.h b/cpukit/score/include/rtems/score/smp.h index 54e4300ec4..55545b66ac 100644 --- a/cpukit/score/include/rtems/score/smp.h +++ b/cpukit/score/include/rtems/score/smp.h @@ -77,7 +77,7 @@ SCORE_EXTERN uint32_t _SMP_Processor_count; * * This method is invoked by RTEMS when it needs to make a request * of the other CPUs. It should be implemented using some type of - * interprocessor interrupt. CPUs not including the originating + * interprocessor interrupt. CPUs not including the originating * CPU should receive the message. * * @param [in] message is message to send diff --git a/cpukit/score/include/rtems/score/smplock.h b/cpukit/score/include/rtems/score/smplock.h index 279df6ecd8..53e1e31a66 100644 --- a/cpukit/score/include/rtems/score/smplock.h +++ b/cpukit/score/include/rtems/score/smplock.h @@ -35,7 +35,7 @@ extern "C" { /** * This type is used to lock elements for atomic access. * This spinlock is a simple non-nesting spinlock, and - * may be used for short non-nesting accesses. + * may be used for short non-nesting accesses. */ typedef uint32_t SMP_lock_spinlock_simple_Control; @@ -106,9 +106,9 @@ void _SMP_lock_spinlock_nested_Initialize( * This method is used to obtain the lock at @a lock. ISR's are * disabled when this routine returns and it is the callers responsibility * to either: - * 1) Do something very short and then call + * 1) Do something very short and then call * _SMP_lock_spinlock_nested_Release or - * 2) Do something very sort, call isr enable, then when ready + * 2) Do something very sort, call isr enable, then when ready * call isr_disable and _SMP_lock_spinlock_nested_Release * * @param [in] lock is the address of the lock to obtain. diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h index c3462024d9..8e469f4058 100644 --- a/cpukit/score/include/rtems/score/thread.h +++ b/cpukit/score/include/rtems/score/thread.h @@ -54,7 +54,7 @@ #if defined(RTEMS_SMP) || \ (CPU_INLINE_ENABLE_DISPATCH == FALSE) || \ - (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) + (__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) #define __THREAD_DO_NOT_INLINE_ENABLE_DISPATCH__ #endif diff --git a/cpukit/score/src/heapfree.c b/cpukit/score/src/heapfree.c index d7ed523a3c..7217f1e991 100644 --- a/cpukit/score/src/heapfree.c +++ b/cpukit/score/src/heapfree.c @@ -36,7 +36,7 @@ _Heap_Alloc_area_of_block( block ); uintptr_t *const pattern_end = (uintptr_t *) ((uintptr_t) block + _Heap_Block_size( block ) + HEAP_ALLOC_BONUS); - uintptr_t const delayed_free_block_count = + uintptr_t const delayed_free_block_count = heap->Protection.delayed_free_block_count; uintptr_t *current = NULL; @@ -45,7 +45,7 @@ if ( delayed_free_block_count > 0 ) { Heap_Block *const last = heap->Protection.last_delayed_free_block; - + last->Protection_begin.next_delayed_free_block = block; } else { heap->Protection.first_delayed_free_block = block; @@ -123,10 +123,10 @@ bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) if ( alloc_begin_ptr == NULL ) { return true; } - + alloc_begin = (uintptr_t) alloc_begin_ptr; block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); - + if ( !_Heap_Is_block_in_heap( heap, block ) ) { return false; } diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c index b59b64ae97..3942a6efa5 100644 --- a/cpukit/score/src/objectinitializeinformation.c +++ b/cpukit/score/src/objectinitializeinformation.c @@ -139,7 +139,7 @@ void _Objects_Initialize_information( name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); #endif - + information->name_length = name_length; _Chain_Initialize_empty( &information->Inactive ); diff --git a/cpukit/score/src/rbtree.c b/cpukit/score/src/rbtree.c index 2c1035b3dc..7eac52777c 100644 --- a/cpukit/score/src/rbtree.c +++ b/cpukit/score/src/rbtree.c @@ -47,7 +47,7 @@ void _RBTree_Initialize( /* could do sanity checks here */ _RBTree_Initialize_empty(the_rbtree); - + count = number_nodes; next = starting_address; while ( count-- ) { diff --git a/cpukit/score/src/rbtreeextract.c b/cpukit/score/src/rbtreeextract.c index 97328beb49..a31a82a70f 100644 --- a/cpukit/score/src/rbtreeextract.c +++ b/cpukit/score/src/rbtreeextract.c @@ -32,7 +32,7 @@ void _RBTree_Extract_validate_unprotected( RBTree_Node *parent, *sibling; RBTree_Direction dir; - parent = the_node->parent; + parent = the_node->parent; if(!parent->parent) return; sibling = _RBTree_Sibling(the_node); @@ -40,9 +40,9 @@ void _RBTree_Extract_validate_unprotected( /* continue to correct tree as long as the_node is black and not the root */ while (!_RBTree_Is_red(the_node) && parent->parent) { - /* if sibling is red, switch parent (black) and sibling colors, + /* if sibling is red, switch parent (black) and sibling colors, * then rotate parent left, making the sibling be the_node's grandparent. - * Now the_node has a black sibling and red parent. After rotation, + * Now the_node has a black sibling and red parent. After rotation, * update sibling pointer. */ if (_RBTree_Is_red(sibling)) { @@ -54,8 +54,8 @@ void _RBTree_Extract_validate_unprotected( } /* sibling is black, see if both of its children are also black. */ - if (sibling && - !_RBTree_Is_red(sibling->child[RBT_RIGHT]) && + if (sibling && + !_RBTree_Is_red(sibling->child[RBT_RIGHT]) && !_RBTree_Is_red(sibling->child[RBT_LEFT])) { sibling->color = RBT_RED; if (_RBTree_Is_red(parent)) { @@ -66,9 +66,9 @@ void _RBTree_Extract_validate_unprotected( parent = the_node->parent; sibling = _RBTree_Sibling(the_node); } else if(sibling) { - /* at least one of sibling's children is red. we now proceed in two - * cases, either the_node is to the left or the right of the parent. - * In both cases, first check if one of sibling's children is black, + /* at least one of sibling's children is red. we now proceed in two + * cases, either the_node is to the left or the right of the parent. + * In both cases, first check if one of sibling's children is black, * and if so rotate in the proper direction and update sibling pointer. * Then switch the sibling and parent colors, and rotate through parent. */ @@ -113,7 +113,7 @@ void _RBTree_Extract_unprotected( the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT]; else { the_rbtree->first[RBT_LEFT] = the_node->parent; - if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, + if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_LEFT])) the_rbtree->first[RBT_LEFT] = NULL; } @@ -124,7 +124,7 @@ void _RBTree_Extract_unprotected( the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT]; else { the_rbtree->first[RBT_RIGHT] = the_node->parent; - if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, + if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree, the_rbtree->first[RBT_RIGHT])) the_rbtree->first[RBT_RIGHT] = NULL; } @@ -132,8 +132,8 @@ void _RBTree_Extract_unprotected( /* if the_node has at most one non-null child then it is safe to proceed * check if both children are non-null, if so then we must find a target node - * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], - * and replace the_node with the target node. This maintains the binary + * either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT], + * and replace the_node with the target node. This maintains the binary * search tree property, but may violate the red-black properties. */ @@ -141,14 +141,14 @@ void _RBTree_Extract_unprotected( target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */ while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT]; - /* if the target node has a child, need to move it up the tree into - * target's position (target is the right child of target->parent) - * when target vacates it. if there is no child, then target->parent + /* if the target node has a child, need to move it up the tree into + * target's position (target is the right child of target->parent) + * when target vacates it. if there is no child, then target->parent * should become NULL. This may cause the coloring to be violated. * For now we store the color of the node being deleted in victim_color. */ leaf = target->child[RBT_LEFT]; - if(leaf) { + if(leaf) { leaf->parent = target->parent; } else { /* fix the tree here if the child is a null leaf. */ @@ -168,20 +168,20 @@ void _RBTree_Extract_unprotected( target->child[RBT_LEFT] = the_node->child[RBT_LEFT]; the_node->child[RBT_LEFT]->parent = target; - /* finally, update the parent node and recolor. target has completely + /* finally, update the parent node and recolor. target has completely * replaced the_node, and target's child has moved up the tree if needed. * the_node is no longer part of the tree, although it has valid pointers * still. */ target->parent = the_node->parent; target->color = the_node->color; - } else { - /* the_node has at most 1 non-null child. Move the child in to - * the_node's location in the tree. This may cause the coloring to be + } else { + /* the_node has at most 1 non-null child. Move the child in to + * the_node's location in the tree. This may cause the coloring to be * violated. We will fix it later. * For now we store the color of the node being deleted in victim_color. */ - leaf = the_node->child[RBT_LEFT] ? + leaf = the_node->child[RBT_LEFT] ? the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT]; if( leaf ) { leaf->parent = the_node->parent; @@ -196,9 +196,9 @@ void _RBTree_Extract_unprotected( the_node->parent->child[dir] = leaf; } - /* fix coloring. leaf has moved up the tree. The color of the deleted + /* fix coloring. leaf has moved up the tree. The color of the deleted * node is in victim_color. There are three cases: - * 1. Deleted a red node, its child must be black. Nothing must be done. + * 1. Deleted a red node, its child must be black. Nothing must be done. * 2. Deleted a black node and the child is red. Paint child black. * 3. Deleted a black node and its child is black. This requires some * care and rotations. diff --git a/cpukit/score/src/rbtreefind.c b/cpukit/score/src/rbtreefind.c index a11918ebde..1002982342 100644 --- a/cpukit/score/src/rbtreefind.c +++ b/cpukit/score/src/rbtreefind.c @@ -20,9 +20,9 @@ /* * _RBTree_Find * - * This kernel routine returns a pointer to the rbtree node containing the - * given value within the given tree, if it exists, or NULL otherwise. - * + * This kernel routine returns a pointer to the rbtree node containing the + * given value within the given tree, if it exists, or NULL otherwise. + * * Input parameters: * the_rbtree - pointer to rbtree control * the_value - value of the node to search for diff --git a/cpukit/score/src/rbtreeinsert.c b/cpukit/score/src/rbtreeinsert.c index b9a7c994d8..8a694063ff 100644 --- a/cpukit/score/src/rbtreeinsert.c +++ b/cpukit/score/src/rbtreeinsert.c @@ -19,9 +19,9 @@ /** @brief Validate and fix-up tree properties for a new insert/colored node * - * This routine checks and fixes the Red-Black Tree properties based on + * This routine checks and fixes the Red-Black Tree properties based on * @a the_node being just added to the tree. - * + * * @note It does NOT disable interrupts to ensure the atomicity of the * append operation. */ @@ -37,7 +37,7 @@ void _RBTree_Validate_insert_unprotected( while (_RBTree_Is_red(_RBTree_Parent(the_node))) { u = _RBTree_Parent_sibling(the_node); g = the_node->parent->parent; - + /* if uncle is red, repaint uncle/parent black and grandparent red */ if(_RBTree_Is_red(u)) { the_node->parent->color = RBT_BLACK; @@ -47,7 +47,7 @@ void _RBTree_Validate_insert_unprotected( } else { /* if uncle is black */ RBTree_Direction dir = the_node != the_node->parent->child[0]; RBTree_Direction pdir = the_node->parent != g->child[0]; - + /* ensure node is on the same branch direction as parent */ if (dir != pdir) { _RBTree_Rotate(the_node->parent, pdir); @@ -55,7 +55,7 @@ void _RBTree_Validate_insert_unprotected( } the_node->parent->color = RBT_BLACK; g->color = RBT_RED; - + /* now rotate grandparent in the other branch direction (toward uncle) */ _RBTree_Rotate(g, (1-pdir)); } @@ -71,7 +71,7 @@ void _RBTree_Validate_insert_unprotected( * * @retval 0 Successfully inserted. * @retval -1 NULL @a the_node. - * @retval RBTree_Node* if one with equal value to @a the_node->value exists + * @retval RBTree_Node* if one with equal value to @a the_node->value exists * in @a the_rbtree. * * @note It does NOT disable interrupts to ensure the atomicity @@ -92,7 +92,7 @@ RBTree_Node *_RBTree_Insert_unprotected( the_rbtree->first[0] = the_rbtree->first[1] = the_node; the_node->parent = (RBTree_Node *) the_rbtree; the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL; - } else { + } else { /* typical binary search tree insert, descend tree to leaf and insert */ while (iter_node) { if(the_node->value == iter_node->value) return(iter_node); @@ -112,7 +112,7 @@ RBTree_Node *_RBTree_Insert_unprotected( } } /* while(iter_node) */ - + /* verify red-black properties */ _RBTree_Validate_insert_unprotected(the_node); } diff --git a/cpukit/score/src/rbtreepeek.c b/cpukit/score/src/rbtreepeek.c index 3363197dc3..74a3409e8b 100644 --- a/cpukit/score/src/rbtreepeek.c +++ b/cpukit/score/src/rbtreepeek.c @@ -20,7 +20,7 @@ /* * _RBTree_Get * - * This kernel routine returns a pointer to the min or max node on the tree, + * This kernel routine returns a pointer to the min or max node on the tree, * without removing that node. * * Input parameters: diff --git a/cpukit/score/src/schedulerpriorityenqueue.c b/cpukit/score/src/schedulerpriorityenqueue.c index 82e192ac8c..b3708d3a7e 100644 --- a/cpukit/score/src/schedulerpriorityenqueue.c +++ b/cpukit/score/src/schedulerpriorityenqueue.c @@ -18,7 +18,7 @@ #include #include -void _Scheduler_priority_Enqueue( +void _Scheduler_priority_Enqueue( Thread_Control *the_thread ) { diff --git a/cpukit/score/src/schedulerpriorityenqueuefirst.c b/cpukit/score/src/schedulerpriorityenqueuefirst.c index 56573b7bb8..eb432c5b88 100644 --- a/cpukit/score/src/schedulerpriorityenqueuefirst.c +++ b/cpukit/score/src/schedulerpriorityenqueuefirst.c @@ -18,7 +18,7 @@ #include #include -void _Scheduler_priority_Enqueue_first( +void _Scheduler_priority_Enqueue_first( Thread_Control *the_thread ) { diff --git a/cpukit/score/src/schedulerpriorityextract.c b/cpukit/score/src/schedulerpriorityextract.c index 83f5d28f9f..10f5a5c04e 100644 --- a/cpukit/score/src/schedulerpriorityextract.c +++ b/cpukit/score/src/schedulerpriorityextract.c @@ -19,7 +19,7 @@ #include #include -void _Scheduler_priority_Extract( +void _Scheduler_priority_Extract( Thread_Control *the_thread ) { diff --git a/cpukit/score/src/schedulerpriorityupdate.c b/cpukit/score/src/schedulerpriorityupdate.c index 59b2432cf2..b66233d31a 100644 --- a/cpukit/score/src/schedulerpriorityupdate.c +++ b/cpukit/score/src/schedulerpriorityupdate.c @@ -35,8 +35,8 @@ void _Scheduler_priority_Update( sched_info->ready_chain = &rq[ the_thread->current_priority ]; - _Priority_bit_map_Initialize_information( - &sched_info->Priority_map, - the_thread->current_priority + _Priority_bit_map_Initialize_information( + &sched_info->Priority_map, + the_thread->current_priority ); } diff --git a/cpukit/score/src/schedulersimple.c b/cpukit/score/src/schedulersimple.c index 7a7ed944f4..6769a332c7 100644 --- a/cpukit/score/src/schedulersimple.c +++ b/cpukit/score/src/schedulersimple.c @@ -29,12 +29,12 @@ /** * This routine does nothing, and is used as a stub for Schedule allocate * - * Note: returns a non-zero value, or else thread initialize thinks the + * Note: returns a non-zero value, or else thread initialize thinks the * allocation failed. * * The overhead of a function call will still be imposed. */ -void * _Scheduler_simple_Allocate( +void * _Scheduler_simple_Allocate( Thread_Control *the_thread ) { @@ -47,7 +47,7 @@ void * _Scheduler_simple_Allocate( * * The overhead of a function call will still be imposed. */ -void _Scheduler_simple_Update( +void _Scheduler_simple_Update( Thread_Control *the_thread ) { @@ -58,7 +58,7 @@ void _Scheduler_simple_Update( * * The overhead of a function call will still be imposed. */ -void _Scheduler_simple_Free( +void _Scheduler_simple_Free( Thread_Control *the_thread ) { @@ -71,7 +71,7 @@ void _Scheduler_simple_Initialize ( void ) { void *f; - /* + /* * Initialize Ready Queue */ diff --git a/cpukit/score/src/schedulersimpleextract.c b/cpukit/score/src/schedulersimpleextract.c index 208fcb55bd..3d369aa14b 100644 --- a/cpukit/score/src/schedulersimpleextract.c +++ b/cpukit/score/src/schedulersimpleextract.c @@ -1,5 +1,5 @@ /* - * Schedule Simple Handler / Extract + * Schedule Simple Handler / Extract * * COPYRIGHT (c) 2011. * On-Line Applications Research Corporation (OAR). diff --git a/cpukit/score/src/schedulersimpleschedule.c b/cpukit/score/src/schedulersimpleschedule.c index 354e61f705..05dcac7c28 100644 --- a/cpukit/score/src/schedulersimpleschedule.c +++ b/cpukit/score/src/schedulersimpleschedule.c @@ -28,7 +28,7 @@ void _Scheduler_simple_Schedule(void) { - _Thread_Heir = (Thread_Control *) _Chain_First( - (Chain_Control *) _Scheduler.information + _Thread_Heir = (Thread_Control *) _Chain_First( + (Chain_Control *) _Scheduler.information ); } diff --git a/cpukit/score/src/schedulersimplesmpschedule.c b/cpukit/score/src/schedulersimplesmpschedule.c index 07d149f43b..701cadb5db 100644 --- a/cpukit/score/src/schedulersimplesmpschedule.c +++ b/cpukit/score/src/schedulersimplesmpschedule.c @@ -33,7 +33,7 @@ #if 0 #define D(format,...) printk( format, __VA_ARGS__) #else -#define D(format,...) +#define D(format,...) #endif /** @@ -144,7 +144,7 @@ bool _Scheduler_simple_smp_Assign( * for this thread to be placed. * * Check 1: heir of potential CPU is more important - * then heir of current CPU. We want to + * then heir of current CPU. We want to * replace the least important thread possible. */ if ( h->current_priority > pheir->current_priority ) { @@ -164,7 +164,7 @@ bool _Scheduler_simple_smp_Assign( * * Which CPU has had its executing thread longer? */ - if ( _Timestamp_Less_than( + if ( _Timestamp_Less_than( &_Per_CPU_Information[cpu].time_of_last_context_switch, &_Per_CPU_Information[found_cpu].time_of_last_context_switch ) ) { @@ -187,7 +187,7 @@ bool _Scheduler_simple_smp_Assign( D( "SCHED CPU=%d PHeir=0x%08x considering=0x%08x PREEMPTIBLE\n", cpu, h->Object.id, consider->Object.id ); continue; - + } } @@ -216,7 +216,7 @@ bool _Scheduler_simple_smp_Assign( * scheduling needs to examine more threads. */ return found; -} +} /* * Reschedule threads -- select heirs for all cores diff --git a/cpukit/score/src/schedulersimpleyield.c b/cpukit/score/src/schedulersimpleyield.c index 272a0f96d0..890ec84f29 100644 --- a/cpukit/score/src/schedulersimpleyield.c +++ b/cpukit/score/src/schedulersimpleyield.c @@ -28,13 +28,13 @@ void _Scheduler_simple_Yield( void ) executing = _Thread_Executing; _ISR_Disable( level ); - + _Scheduler_simple_Ready_queue_requeue(&_Scheduler, executing); _ISR_Flash( level ); _Scheduler_simple_Schedule(); - + if ( !_Thread_Is_heir( executing ) ) _Thread_Dispatch_necessary = true; diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c index 9714add5ea..704a22fd36 100644 --- a/cpukit/score/src/smp.c +++ b/cpukit/score/src/smp.c @@ -66,7 +66,7 @@ void rtems_smp_secondary_cpu_initialize(void) * HACK: Should not have to enable interrupts in real system here. * It should happen as part of switching to the first task. */ - + _Per_CPU_Information[cpu].isr_nest_level = 1; _ISR_Set_level( 0 ); while(1) ; @@ -119,7 +119,7 @@ void rtems_smp_process_interrupt(void) } } -void rtems_smp_send_message( +void rtems_smp_send_message( int cpu, uint32_t message ) diff --git a/cpukit/score/src/smplock.c b/cpukit/score/src/smplock.c index 91589b5c54..dc0836cd3a 100644 --- a/cpukit/score/src/smplock.c +++ b/cpukit/score/src/smplock.c @@ -35,7 +35,7 @@ ISR_Level _SMP_lock_spinlock_simple_Obtain( ISR_Level level; uint32_t value = 1; uint32_t previous; - + /* Note: Disable provides an implicit memory barrier. */ _ISR_Disable( level ); do { @@ -72,7 +72,7 @@ ISR_Level _SMP_lock_spinlock_nested_Obtain( int cpu_id; /* Note: Disable provides an implicit memory barrier. */ - _ISR_Disable( level ); + _ISR_Disable( level ); cpu_id = bsp_smp_processor_id(); @@ -81,7 +81,7 @@ ISR_Level _SMP_lock_spinlock_nested_Obtain( lock->count++; return level; } - + do { SMP_CPU_SWAP( lock, value, previous ); } while (previous == 1); @@ -102,6 +102,6 @@ void _SMP_lock_spinlock_nested_Release( printk ("Releasing spinlock when count is already zero?!?!\n"); #endif lock->count--; - - _ISR_Enable( level ); + + _ISR_Enable( level ); } diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c index e84c41ff4e..0e1cddf949 100644 --- a/cpukit/score/src/threadcreateidle.c +++ b/cpukit/score/src/threadcreateidle.c @@ -37,7 +37,7 @@ static inline void _Thread_Create_idle_helper( uint32_t name_u32, int cpu -) +) { Objects_Name name; Thread_Control *idle; diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c index 30574a3617..e3f0ec51c5 100644 --- a/cpukit/score/src/threadget.c +++ b/cpukit/score/src/threadget.c @@ -80,7 +80,7 @@ Thread_Control *_Thread_Get ( * is actually a test case in sp43 for this which trips it whether or * not POSIX is enabled. So in the interest of safety, this is left * on in all configurations. - */ + */ if ( !api_information ) { *location = OBJECTS_ERROR; goto done; diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c index 1dcf33344c..ff86209852 100644 --- a/cpukit/score/src/threadsetstate.c +++ b/cpukit/score/src/threadsetstate.c @@ -41,7 +41,7 @@ void _Thread_Set_state( ) { ISR_Level level; - + _ISR_Disable( level ); if ( !_States_Is_ready( the_thread->current_state ) ) { the_thread->current_state = diff --git a/cpukit/score/src/threadsettransient.c b/cpukit/score/src/threadsettransient.c index 11f91ed30e..691bcf5a2b 100644 --- a/cpukit/score/src/threadsettransient.c +++ b/cpukit/score/src/threadsettransient.c @@ -41,7 +41,7 @@ void _Thread_Set_transient( { ISR_Level level; uint32_t old_state; - + _ISR_Disable( level ); old_state = the_thread->current_state; -- cgit v1.2.3