diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-05-24 02:44:58 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2011-05-24 02:44:58 +0000 |
commit | dacdda304b8a7a2a10bc03ae36b1d75b728ba149 (patch) | |
tree | b709b10d06bb4303fcf2f08511ca096ea2d5a0aa /cpukit/score/src | |
parent | 2011-05-23 Jennifer Averett <Jennifer.Averett@OARcorp.com> (diff) | |
download | rtems-dacdda304b8a7a2a10bc03ae36b1d75b728ba149.tar.bz2 |
Remove white-spaces.
Diffstat (limited to 'cpukit/score/src')
22 files changed, 73 insertions, 73 deletions
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 <rtems/score/scheduler.h> #include <rtems/score/schedulerpriority.h> -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 <rtems/score/chain.h> #include <rtems/score/schedulerpriority.h> -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 <rtems/score/chain.h> #include <rtems/score/schedulerpriority.h> -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; |