summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2010-11-25 09:27:06 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2010-11-25 09:27:06 +0000
commitce002b161d89c912c7f22da4dba86955251c3afd (patch)
tree947eb3c9a147e82733232d2c3f23ad21650aee58
parent2010-11-24 Gedare Bloom <giddyup44@yahoo.com> (diff)
downloadrtems-ce002b161d89c912c7f22da4dba86955251c3afd.tar.bz2
2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libfs/src/dosfs/fat_file.c, libfs/src/imfs/imfs_debug.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_getchild.c, posix/src/killinfo.c, score/inline/rtems/score/schedulerpriority.inl, score/inline/rtems/score/watchdog.inl, score/src/apiext.c, score/src/chain.c, score/src/coremsgflushsupp.c, score/src/coremsginsert.c, score/src/objectshrinkinformation.c, score/src/schedulerpriorityyield.c, score/src/threadqdequeuepriority.c, score/src/threadqenqueuepriority.c, score/src/threadqextractpriority.c, score/src/threadqfirstfifo.c, score/src/threadqfirstpriority.c, score/src/threadyieldprocessor.c, score/src/userextthreadbegin.c, score/src/userextthreadcreate.c, score/src/userextthreaddelete.c, score/src/userextthreadrestart.c, score/src/userextthreadstart.c, score/src/userextthreadswitch.c, score/src/watchdogreportchain.c: Avoid chain API violations.
Diffstat (limited to '')
-rw-r--r--cpukit/ChangeLog18
-rw-r--r--cpukit/libfs/src/dosfs/fat_file.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_debug.c2
-rw-r--r--cpukit/libfs/src/imfs/imfs_directory.c4
-rw-r--r--cpukit/libfs/src/imfs/imfs_getchild.c2
-rw-r--r--cpukit/posix/src/killinfo.c2
-rw-r--r--cpukit/score/inline/rtems/score/schedulerpriority.inl4
-rw-r--r--cpukit/score/inline/rtems/score/watchdog.inl4
-rw-r--r--cpukit/score/src/apiext.c6
-rw-r--r--cpukit/score/src/chain.c19
-rw-r--r--cpukit/score/src/coremsgflushsupp.c13
-rw-r--r--cpukit/score/src/coremsginsert.c2
-rw-r--r--cpukit/score/src/objectshrinkinformation.c2
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c2
-rw-r--r--cpukit/score/src/threadqdequeuepriority.c23
-rw-r--r--cpukit/score/src/threadqenqueuepriority.c4
-rw-r--r--cpukit/score/src/threadqextractpriority.c17
-rw-r--r--cpukit/score/src/threadqfirstfifo.c2
-rw-r--r--cpukit/score/src/threadqfirstpriority.c5
-rw-r--r--cpukit/score/src/threadyieldprocessor.c2
-rw-r--r--cpukit/score/src/userextthreadbegin.c6
-rw-r--r--cpukit/score/src/userextthreadcreate.c2
-rw-r--r--cpukit/score/src/userextthreaddelete.c2
-rw-r--r--cpukit/score/src/userextthreadrestart.c2
-rw-r--r--cpukit/score/src/userextthreadstart.c2
-rw-r--r--cpukit/score/src/userextthreadswitch.c2
-rw-r--r--cpukit/score/src/watchdogreportchain.c2
27 files changed, 90 insertions, 63 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 9a1cfcb872..6f85871de3 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,21 @@
+2010-11-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * libfs/src/dosfs/fat_file.c, libfs/src/imfs/imfs_debug.c,
+ libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_getchild.c,
+ posix/src/killinfo.c, score/inline/rtems/score/schedulerpriority.inl,
+ score/inline/rtems/score/watchdog.inl, score/src/apiext.c,
+ score/src/chain.c, score/src/coremsgflushsupp.c,
+ score/src/coremsginsert.c, score/src/objectshrinkinformation.c,
+ score/src/schedulerpriorityyield.c,
+ score/src/threadqdequeuepriority.c,
+ score/src/threadqenqueuepriority.c,
+ score/src/threadqextractpriority.c, score/src/threadqfirstfifo.c,
+ score/src/threadqfirstpriority.c, score/src/threadyieldprocessor.c,
+ score/src/userextthreadbegin.c, score/src/userextthreadcreate.c,
+ score/src/userextthreaddelete.c, score/src/userextthreadrestart.c,
+ score/src/userextthreadstart.c, score/src/userextthreadswitch.c,
+ score/src/watchdogreportchain.c: Avoid chain API violations.
+
2010-11-24 Gedare Bloom <giddyup44@yahoo.com>
PR 1647/cpukit
diff --git a/cpukit/libfs/src/dosfs/fat_file.c b/cpukit/libfs/src/dosfs/fat_file.c
index 7ca662232b..9a3ad6677e 100644
--- a/cpukit/libfs/src/dosfs/fat_file.c
+++ b/cpukit/libfs/src/dosfs/fat_file.c
@@ -926,7 +926,7 @@ _hash_search(
)
{
uint32_t mod = (key1) % FAT_HASH_MODULE;
- rtems_chain_node *the_node = ((rtems_chain_control *)((hash) + mod))->first;
+ rtems_chain_node *the_node = rtems_chain_first(hash + mod);
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{
diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c
index 5b95a17c6a..0a4e3a9bba 100644
--- a/cpukit/libfs/src/imfs/imfs_debug.c
+++ b/cpukit/libfs/src/imfs/imfs_debug.c
@@ -114,7 +114,7 @@ void IMFS_dump_directory(
the_chain = &the_directory->info.directory.Entries;
- for ( the_node = the_chain->first;
+ for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
diff --git a/cpukit/libfs/src/imfs/imfs_directory.c b/cpukit/libfs/src/imfs/imfs_directory.c
index 6381c7b18a..46ff335e59 100644
--- a/cpukit/libfs/src/imfs/imfs_directory.c
+++ b/cpukit/libfs/src/imfs/imfs_directory.c
@@ -97,7 +97,7 @@ ssize_t imfs_dir_read(
return 0;
/* Move to the first of the desired directory entries */
- the_node = the_chain->first;
+ the_node = rtems_chain_first( the_chain );
bytes_transferred = 0;
first_entry = iop->offset;
@@ -263,7 +263,7 @@ int imfs_dir_fstat(
/* Run through the chain and count the number of directory entries */
/* that are subordinate to this directory node */
- for ( the_node = the_chain->first ;
+ for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
diff --git a/cpukit/libfs/src/imfs/imfs_getchild.c b/cpukit/libfs/src/imfs/imfs_getchild.c
index dfec017643..1cfeb2a537 100644
--- a/cpukit/libfs/src/imfs/imfs_getchild.c
+++ b/cpukit/libfs/src/imfs/imfs_getchild.c
@@ -52,7 +52,7 @@ IMFS_jnode_t *IMFS_find_match_in_dir(
the_chain = &directory->info.directory.Entries;
- for ( the_node = the_chain->first;
+ for ( the_node = rtems_chain_first( the_chain );
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index 7f4f8d34ed..b1569e791b 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -137,7 +137,7 @@ int killinfo(
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
- for ( the_node = the_chain->first ;
+ for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
diff --git a/cpukit/score/inline/rtems/score/schedulerpriority.inl b/cpukit/score/inline/rtems/score/schedulerpriority.inl
index da6de2802d..11ef2ea9f5 100644
--- a/cpukit/score/inline/rtems/score/schedulerpriority.inl
+++ b/cpukit/score/inline/rtems/score/schedulerpriority.inl
@@ -138,10 +138,10 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_priority_Ready_queue_first(
Chain_Control *the_ready_queue
)
{
- uint32_t index = _Priority_bit_map_Get_highest();
+ Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
- return (Thread_Control *) the_ready_queue[ index ].first;
+ return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
}
diff --git a/cpukit/score/inline/rtems/score/watchdog.inl b/cpukit/score/inline/rtems/score/watchdog.inl
index 3ec52d48ca..14f7759f79 100644
--- a/cpukit/score/inline/rtems/score/watchdog.inl
+++ b/cpukit/score/inline/rtems/score/watchdog.inl
@@ -238,7 +238,7 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
)
{
- return ( (Watchdog_Control *) header->first );
+ return ( (Watchdog_Control *) _Chain_First( header ) );
}
@@ -252,7 +252,7 @@ RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Last(
)
{
- return ( (Watchdog_Control *) header->last );
+ return ( (Watchdog_Control *) _Chain_Last( header ) );
}
diff --git a/cpukit/score/src/apiext.c b/cpukit/score/src/apiext.c
index 4531a2d695..a08977113e 100644
--- a/cpukit/score/src/apiext.c
+++ b/cpukit/score/src/apiext.c
@@ -52,7 +52,7 @@ void _API_extensions_Add(
Chain_Node *the_node;
API_extensions_Control *the_extension;
- for ( the_node = _API_extensions_List.first ;
+ for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
@@ -74,7 +74,7 @@ void _API_extensions_Run_postdriver( void )
Chain_Node *the_node;
API_extensions_Control *the_extension;
- for ( the_node = _API_extensions_List.first ;
+ for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
@@ -100,7 +100,7 @@ void _API_extensions_Run_postswitch( void )
Chain_Node *the_node;
API_extensions_Control *the_extension;
- for ( the_node = _API_extensions_List.first ;
+ for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
diff --git a/cpukit/score/src/chain.c b/cpukit/score/src/chain.c
index c44d6201a3..85821d4d71 100644
--- a/cpukit/score/src/chain.c
+++ b/cpukit/score/src/chain.c
@@ -40,14 +40,14 @@ void _Chain_Initialize(
size_t node_size
)
{
- size_t count;
- Chain_Node *current;
- Chain_Node *next;
+ size_t count = number_nodes;
+ Chain_Node *head = _Chain_Head( the_chain );
+ Chain_Node *tail = _Chain_Tail( the_chain );
+ Chain_Node *current = head;
+ Chain_Node *next = starting_address;
+
+ head->previous = NULL;
- count = number_nodes;
- current = _Chain_Head( the_chain );
- the_chain->permanent_null = NULL;
- next = starting_address;
while ( count-- ) {
current->next = next;
next->previous = current;
@@ -55,6 +55,7 @@ void _Chain_Initialize(
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
- current->next = _Chain_Tail( the_chain );
- the_chain->last = current;
+
+ current->next = tail;
+ tail->previous = current;
}
diff --git a/cpukit/score/src/coremsgflushsupp.c b/cpukit/score/src/coremsgflushsupp.c
index 5a6f00474c..4e15e1a495 100644
--- a/cpukit/score/src/coremsgflushsupp.c
+++ b/cpukit/score/src/coremsgflushsupp.c
@@ -53,6 +53,7 @@ uint32_t _CORE_message_queue_Flush_support(
)
{
ISR_Level level;
+ Chain_Node *inactive_head;
Chain_Node *inactive_first;
Chain_Node *message_queue_first;
Chain_Node *message_queue_last;
@@ -86,15 +87,15 @@ uint32_t _CORE_message_queue_Flush_support(
*/
_ISR_Disable( level );
- inactive_first = the_message_queue->Inactive_messages.first;
- message_queue_first = the_message_queue->Pending_messages.first;
- message_queue_last = the_message_queue->Pending_messages.last;
+ inactive_head = _Chain_Head( &the_message_queue->Inactive_messages );
+ inactive_first = inactive_head->next;;
+ message_queue_first = _Chain_First( &the_message_queue->Pending_messages );
+ message_queue_last = _Chain_Last( &the_message_queue->Pending_messages );
- the_message_queue->Inactive_messages.first = message_queue_first;
+ inactive_head->next = message_queue_first;
message_queue_last->next = inactive_first;
inactive_first->previous = message_queue_last;
- message_queue_first->previous =
- _Chain_Head( &the_message_queue->Inactive_messages );
+ message_queue_first->previous = inactive_head;
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
diff --git a/cpukit/score/src/coremsginsert.c b/cpukit/score/src/coremsginsert.c
index eaccdc0d1b..d333a5fb55 100644
--- a/cpukit/score/src/coremsginsert.c
+++ b/cpukit/score/src/coremsginsert.c
@@ -99,7 +99,7 @@ void _CORE_message_queue_Insert_message(
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
- the_node = the_header->first;
+ the_node = _Chain_First( the_header );
while ( !_Chain_Is_tail( the_header, the_node ) ) {
int this_priority;
diff --git a/cpukit/score/src/objectshrinkinformation.c b/cpukit/score/src/objectshrinkinformation.c
index 914fe2ac5d..18123fab68 100644
--- a/cpukit/score/src/objectshrinkinformation.c
+++ b/cpukit/score/src/objectshrinkinformation.c
@@ -69,7 +69,7 @@ void _Objects_Shrink_information(
/*
* Assume the Inactive chain is never empty at this point
*/
- the_object = (Objects_Control *) information->Inactive.first;
+ the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index 1a13a4e318..a8740d9065 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -67,7 +67,7 @@ void _Scheduler_priority_Yield(
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
- _Thread_Heir = (Thread_Control *) ready->first;
+ _Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
diff --git a/cpukit/score/src/threadqdequeuepriority.c b/cpukit/score/src/threadqdequeuepriority.c
index 1010d58a58..1a7bc7037a 100644
--- a/cpukit/score/src/threadqdequeuepriority.c
+++ b/cpukit/score/src/threadqdequeuepriority.c
@@ -50,6 +50,8 @@ Thread_Control *_Thread_queue_Dequeue_priority(
ISR_Level level;
Thread_Control *the_thread = NULL; /* just to remove warnings */
Thread_Control *new_first_thread;
+ Chain_Node *head;
+ Chain_Node *tail;
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
@@ -61,8 +63,9 @@ Thread_Control *_Thread_queue_Dequeue_priority(
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
- the_thread = (Thread_Control *)
- the_thread_queue->Queues.Priority[ index ].first;
+ the_thread = (Thread_Control *) _Chain_First(
+ &the_thread_queue->Queues.Priority[ index ]
+ );
goto dequeue;
}
}
@@ -75,13 +78,13 @@ Thread_Control *_Thread_queue_Dequeue_priority(
dequeue:
the_thread->Wait.queue = NULL;
- new_first_node = the_thread->Wait.Block2n.first;
+ new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
- last_node = the_thread->Wait.Block2n.last;
+ last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
@@ -91,13 +94,13 @@ dequeue:
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
- new_second_node->previous =
- _Chain_Head( &new_first_thread->Wait.Block2n );
+ head = _Chain_Head( &new_first_thread->Wait.Block2n );
+ tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
- new_first_thread->Wait.Block2n.first = new_second_node;
- new_first_thread->Wait.Block2n.last = last_node;
-
- last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
+ new_second_node->previous = head;
+ head->next = new_second_node;
+ tail->previous = last_node;
+ last_node->next = tail;
}
} else {
previous_node->next = next_node;
diff --git a/cpukit/score/src/threadqenqueuepriority.c b/cpukit/score/src/threadqenqueuepriority.c
index f2652ea4b0..0d30529e0f 100644
--- a/cpukit/score/src/threadqenqueuepriority.c
+++ b/cpukit/score/src/threadqenqueuepriority.c
@@ -80,7 +80,7 @@ Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
- search_thread = (Thread_Control *) header->first;
+ search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
@@ -128,7 +128,7 @@ restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
- search_thread = (Thread_Control *) header->last;
+ search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
diff --git a/cpukit/score/src/threadqextractpriority.c b/cpukit/score/src/threadqextractpriority.c
index 706f51e828..d4ddc2aa84 100644
--- a/cpukit/score/src/threadqextractpriority.c
+++ b/cpukit/score/src/threadqextractpriority.c
@@ -50,6 +50,8 @@ void _Thread_queue_Extract_priority_helper(
)
{
ISR_Level level;
+ Chain_Node *head;
+ Chain_Node *tail;
Chain_Node *the_node;
Chain_Node *next_node;
Chain_Node *previous_node;
@@ -73,9 +75,9 @@ void _Thread_queue_Extract_priority_helper(
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
- new_first_node = the_thread->Wait.Block2n.first;
+ new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
- last_node = the_thread->Wait.Block2n.last;
+ last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
@@ -85,12 +87,13 @@ void _Thread_queue_Extract_priority_helper(
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
- new_second_node->previous =
- _Chain_Head( &new_first_thread->Wait.Block2n );
- new_first_thread->Wait.Block2n.first = new_second_node;
+ head = _Chain_Head( &new_first_thread->Wait.Block2n );
+ tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
- new_first_thread->Wait.Block2n.last = last_node;
- last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
+ new_second_node->previous = head;
+ head->next = new_second_node;
+ tail->previous = last_node;
+ last_node->next = tail;
}
} else {
previous_node->next = next_node;
diff --git a/cpukit/score/src/threadqfirstfifo.c b/cpukit/score/src/threadqfirstfifo.c
index 9163780c76..bde7b45054 100644
--- a/cpukit/score/src/threadqfirstfifo.c
+++ b/cpukit/score/src/threadqfirstfifo.c
@@ -44,7 +44,7 @@ Thread_Control *_Thread_queue_First_fifo(
)
{
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) )
- return (Thread_Control *) the_thread_queue->Queues.Fifo.first;
+ return (Thread_Control *) _Chain_First( &the_thread_queue->Queues.Fifo );
return NULL;
}
diff --git a/cpukit/score/src/threadqfirstpriority.c b/cpukit/score/src/threadqfirstpriority.c
index 442a4323b3..e5f4bccfe4 100644
--- a/cpukit/score/src/threadqfirstpriority.c
+++ b/cpukit/score/src/threadqfirstpriority.c
@@ -49,8 +49,9 @@ Thread_Control *_Thread_queue_First_priority (
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) )
- return (Thread_Control *)
- the_thread_queue->Queues.Priority[ index ].first;
+ return (Thread_Control *) _Chain_First(
+ &the_thread_queue->Queues.Priority[ index ]
+ );
}
return NULL;
}
diff --git a/cpukit/score/src/threadyieldprocessor.c b/cpukit/score/src/threadyieldprocessor.c
index 633292d3f6..1d3f26e212 100644
--- a/cpukit/score/src/threadyieldprocessor.c
+++ b/cpukit/score/src/threadyieldprocessor.c
@@ -66,7 +66,7 @@ void _Thread_Yield_processor( void )
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
- _Thread_Heir = (Thread_Control *) ready->first;
+ _Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
diff --git a/cpukit/score/src/userextthreadbegin.c b/cpukit/score/src/userextthreadbegin.c
index f71aedf518..9fed82ac4a 100644
--- a/cpukit/score/src/userextthreadbegin.c
+++ b/cpukit/score/src/userextthreadbegin.c
@@ -31,7 +31,7 @@ void _User_extensions_Thread_begin (
Chain_Node *the_node;
User_extensions_Control *the_extension;
- for ( the_node = _User_extensions_List.first ;
+ for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
@@ -49,7 +49,7 @@ void _User_extensions_Thread_exitted (
Chain_Node *the_node;
User_extensions_Control *the_extension;
- for ( the_node = _User_extensions_List.last ;
+ for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
@@ -69,7 +69,7 @@ void _User_extensions_Fatal (
Chain_Node *the_node;
User_extensions_Control *the_extension;
- for ( the_node = _User_extensions_List.last ;
+ for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
diff --git a/cpukit/score/src/userextthreadcreate.c b/cpukit/score/src/userextthreadcreate.c
index b7e7e6e855..a2950ee37e 100644
--- a/cpukit/score/src/userextthreadcreate.c
+++ b/cpukit/score/src/userextthreadcreate.c
@@ -32,7 +32,7 @@ bool _User_extensions_Thread_create (
User_extensions_Control *the_extension;
bool status;
- for ( the_node = _User_extensions_List.first ;
+ for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
diff --git a/cpukit/score/src/userextthreaddelete.c b/cpukit/score/src/userextthreaddelete.c
index 393580f3ab..39397fea84 100644
--- a/cpukit/score/src/userextthreaddelete.c
+++ b/cpukit/score/src/userextthreaddelete.c
@@ -31,7 +31,7 @@ void _User_extensions_Thread_delete (
Chain_Node *the_node;
User_extensions_Control *the_extension;
- for ( the_node = _User_extensions_List.last ;
+ for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
diff --git a/cpukit/score/src/userextthreadrestart.c b/cpukit/score/src/userextthreadrestart.c
index f159c8bb0e..c2a4d69e6a 100644
--- a/cpukit/score/src/userextthreadrestart.c
+++ b/cpukit/score/src/userextthreadrestart.c
@@ -31,7 +31,7 @@ void _User_extensions_Thread_restart (
Chain_Node *the_node;
User_extensions_Control *the_extension;
- for ( the_node = _User_extensions_List.first ;
+ for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
diff --git a/cpukit/score/src/userextthreadstart.c b/cpukit/score/src/userextthreadstart.c
index e6364e158a..0fbe6ab755 100644
--- a/cpukit/score/src/userextthreadstart.c
+++ b/cpukit/score/src/userextthreadstart.c
@@ -31,7 +31,7 @@ void _User_extensions_Thread_start (
Chain_Node *the_node;
User_extensions_Control *the_extension;
- for ( the_node = _User_extensions_List.first ;
+ for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
diff --git a/cpukit/score/src/userextthreadswitch.c b/cpukit/score/src/userextthreadswitch.c
index 10ab6b6583..026b56d9de 100644
--- a/cpukit/score/src/userextthreadswitch.c
+++ b/cpukit/score/src/userextthreadswitch.c
@@ -32,7 +32,7 @@ void _User_extensions_Thread_switch (
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
- for ( the_node = _User_extensions_Switches_list.first ;
+ for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
diff --git a/cpukit/score/src/watchdogreportchain.c b/cpukit/score/src/watchdogreportchain.c
index 20a5827f97..8b616914c6 100644
--- a/cpukit/score/src/watchdogreportchain.c
+++ b/cpukit/score/src/watchdogreportchain.c
@@ -34,7 +34,7 @@ void _Watchdog_Report_chain(
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
- for ( node = header->first ;
+ for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
{