RTEMS 4.11Annotated Report
Sat Mar 19 23:23:57 2011
00047150 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
47150: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47154: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
4715a: 5280 addql #1,%d0
4715c: 206e 0008 moveal %fp@(8),%a0
47160: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
47166: 42a7 clrl %sp@-
47168: 2f28 0008 movel %a0@(8),%sp@-
4716c: 4868 0010 pea %a0@(16)
47170: 4eb9 0004 7458 jsr 47458 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47176: 4fef 000c lea %sp@(12),%sp
}
4717a: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
4717c: 4ef9 0004 8cd6 jmp 48cd6 <_Thread_Enable_dispatch>
...
0004702a <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
4702a: 4e56 0000 linkw %fp,#0
4702e: 2f0a movel %a2,%sp@-
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
47030: 2479 0005 f5a0 moveal 5f5a0 <_API_extensions_List>,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47036: b5fc 0005 f5a4 cmpal #390564,%a2
4703c: 6710 beqs 4704e <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
4703e: 206a 0008 moveal %a2@(8),%a0
47042: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47044: 2452 moveal %a2@,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47046: b5fc 0005 f5a4 cmpal #390564,%a2
4704c: 66f0 bnes 4703e <_API_extensions_Run_postdriver+0x14><== NEVER TAKEN
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
4704e: 246e fffc moveal %fp@(-4),%a2
47052: 4e5e unlk %fp <== NOT EXECUTED
00047056 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
47056: 4e56 0000 linkw %fp,#0
4705a: 2f0a movel %a2,%sp@-
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
4705c: 2479 0005 f5a0 moveal 5f5a0 <_API_extensions_List>,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47062: b5fc 0005 f5a4 cmpal #390564,%a2
47068: 6718 beqs 47082 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
4706a: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
47070: 206a 000c moveal %a2@(12),%a0
47074: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47076: 2452 moveal %a2@,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
47078: 588f addql #4,%sp
4707a: b5fc 0005 f5a4 cmpal #390564,%a2
47080: 66e8 bnes 4706a <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
47082: 246e fffc moveal %fp@(-4),%a2
47086: 4e5e unlk %fp
...
0004edd8 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4edd8: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4edde: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
4ede2: 2279 0006 1e98 moveal 61e98 <_Per_CPU_Information+0xc>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4ede8: 48d7 001c moveml %d2-%d4,%sp@
4edec: 206e 0008 moveal %fp@(8),%a0
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4edf0: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4edf4: 242e 000c movel %fp@(12),%d2
4edf8: 262e 0014 movel %fp@(20),%d3
4edfc: 282e 0018 movel %fp@(24),%d4
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4ee00: 40c1 movew %sr,%d1
4ee02: 8081 orl %d1,%d0
4ee04: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4ee06: 2028 0048 movel %a0@(72),%d0
4ee0a: 5280 addql #1,%d0
4ee0c: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4ee10: 4aa8 0040 tstl %a0@(64)
4ee14: 6606 bnes 4ee1c <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
4ee16: b0a8 0044 cmpl %a0@(68),%d0
4ee1a: 672e beqs 4ee4a <_CORE_barrier_Wait+0x72>
4ee1c: 7001 moveq #1,%d0
4ee1e: 2140 0030 movel %d0,%a0@(48)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
4ee22: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
4ee26: 2342 0020 movel %d2,%a1@(32)
_ISR_Enable( level );
4ee2a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4ee2c: 2d43 000c movel %d3,%fp@(12)
4ee30: 203c 0004 b700 movel #308992,%d0
4ee36: 2d48 0008 movel %a0,%fp@(8)
}
4ee3a: 4cd7 001c moveml %sp@,%d2-%d4
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4ee3e: 2d40 0010 movel %d0,%fp@(16)
}
4ee42: 4e5e unlk %fp
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4ee44: 4ef9 0004 b33c jmp 4b33c <_Thread_queue_Enqueue_with_handler>
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
4ee4a: 7001 moveq #1,%d0
4ee4c: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4ee50: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4ee52: 2d44 0010 movel %d4,%fp@(16)
4ee56: 2d42 000c movel %d2,%fp@(12)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4ee5a: 4cd7 001c moveml %sp@,%d2-%d4
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4ee5e: 2d48 0008 movel %a0,%fp@(8)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4ee62: 4e5e unlk %fp
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4ee64: 4ef9 0004 ed9c jmp 4ed9c <_CORE_barrier_Release>
...
0004cfbc <_CORE_message_queue_Close>:
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4cfbc: 4e56 0000 linkw %fp,#0
4cfc0: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4cfc2: 2f2e 0010 movel %fp@(16),%sp@-
4cfc6: 2f2e 000c movel %fp@(12),%sp@-
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4cfca: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4cfce: 2f0a movel %a2,%sp@-
4cfd0: 4eb9 0004 a06c jsr 4a06c <_Thread_queue_Flush>
* This removes all messages from the pending message queue. Since
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
4cfd6: 4fef 000c lea %sp@(12),%sp
4cfda: 4aaa 0048 tstl %a2@(72)
4cfde: 6612 bnes 4cff2 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4cfe0: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
4cfe6: 246e fffc moveal %fp@(-4),%a2
4cfea: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4cfec: 4ef9 0004 aa66 jmp 4aa66 <_Workspace_Free>
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4cff2: 2f0a movel %a2,%sp@-
4cff4: 4eb9 0004 d010 jsr 4d010 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
4cffa: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4d000: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
4d002: 246e fffc moveal %fp@(-4),%a2
4d006: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4d008: 4ef9 0004 aa66 jmp 4aa66 <_Workspace_Free>
...
00050408 <_CORE_message_queue_Initialize>:
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
50408: 7203 moveq #3,%d1
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
5040a: 4e56 fff4 linkw %fp,#-12
5040e: 202e 0014 movel %fp@(20),%d0
50412: 48d7 040c moveml %d2-%d3/%a2,%sp@
50416: 246e 0008 moveal %fp@(8),%a2
5041a: 242e 0010 movel %fp@(16),%d2
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
5041e: c280 andl %d0,%d1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
50420: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
50424: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
50428: 2540 004c movel %d0,%a2@(76)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
5042c: 4a81 tstl %d1
5042e: 6718 beqs 50448 <_CORE_message_queue_Initialize+0x40>
allocated_message_size += sizeof(uint32_t);
50430: 2200 movel %d0,%d1
50432: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
50434: 76fc moveq #-4,%d3
50436: c283 andl %d3,%d1
}
if (allocated_message_size < maximum_message_size)
50438: b280 cmpl %d0,%d1
5043a: 640e bccs 5044a <_CORE_message_queue_Initialize+0x42><== ALWAYS TAKEN
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
5043c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
50442: 4200 clrb %d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
50444: 4e5e unlk %fp
50446: 4e75 rts
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
50448: 2200 movel %d0,%d1
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
5044a: 2601 movel %d1,%d3
5044c: 0683 0000 0010 addil #16,%d3
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
50452: 2003 movel %d3,%d0
50454: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
50458: b280 cmpl %d0,%d1
5045a: 62e0 bhis 5043c <_CORE_message_queue_Initialize+0x34><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
5045c: 2f00 movel %d0,%sp@-
5045e: 4eb9 0005 32d6 jsr 532d6 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
50464: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
50466: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
5046a: 67d0 beqs 5043c <_CORE_message_queue_Initialize+0x34>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
5046c: 2f03 movel %d3,%sp@-
5046e: 2f02 movel %d2,%sp@-
50470: 2f00 movel %d0,%sp@-
50472: 486a 0060 pea %a2@(96)
50476: 4eb9 0005 5148 jsr 55148 <_Chain_Initialize>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
5047c: 41ea 0054 lea %a2@(84),%a0
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
50480: 7001 moveq #1,%d0
50482: 2548 0050 movel %a0,%a2@(80)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50486: 41ea 0050 lea %a2@(80),%a0
5048a: 2548 0058 movel %a0,%a2@(88)
5048e: 4878 0006 pea 6 <EXTENDSFDF>
50492: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
50496: 206e 000c moveal %fp@(12),%a0
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5049a: 42aa 0054 clrl %a2@(84)
5049e: b090 cmpl %a0@,%d0
504a0: 57c0 seq %d0
504a2: 49c0 extbl %d0
504a4: 4480 negl %d0
504a6: 2f00 movel %d0,%sp@-
504a8: 2f0a movel %a2,%sp@-
504aa: 4eb9 0005 2934 jsr 52934 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
504b0: 4fef 0020 lea %sp@(32),%sp
}
504b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
504ba: 7001 moveq #1,%d0
}
504bc: 4e5e unlk %fp <== NOT EXECUTED
000504c0 <_CORE_message_queue_Seize>:
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
504c0: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
504c6: 4e56 ffe4 linkw %fp,#-28
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
504ca: 2079 0006 941c moveal 6941c <_Per_CPU_Information+0xc>,%a0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
504d0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
504d4: 246e 0008 moveal %fp@(8),%a2
504d8: 2a2e 000c movel %fp@(12),%d5
504dc: 242e 0010 movel %fp@(16),%d2
504e0: 226e 0014 moveal %fp@(20),%a1
504e4: 282e 001c movel %fp@(28),%d4
504e8: 162e 001b moveb %fp@(27),%d3
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
504ec: 42a8 0034 clrl %a0@(52)
_ISR_Disable( level );
504f0: 40c1 movew %sr,%d1
504f2: 8081 orl %d1,%d0
504f4: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
504f6: 200a movel %a2,%d0
504f8: 0680 0000 0054 addil #84,%d0
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
504fe: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
50502: b08b cmpl %a3,%d0
50504: 674e beqs 50554 <_CORE_message_queue_Seize+0x94>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
50506: 2053 moveal %a3@,%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
50508: 49ea 0050 lea %a2@(80),%a4
5050c: 214c 0004 movel %a4,%a0@(4)
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
50510: 53aa 0048 subql #1,%a2@(72)
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
50514: 2548 0050 movel %a0,%a2@(80)
_ISR_Enable( level );
50518: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
5051a: 22ab 0008 movel %a3@(8),%a1@
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
5051e: 45ea 0060 lea %a2@(96),%a2
_Thread_Executing->Wait.count =
50522: 2079 0006 941c moveal 6941c <_Per_CPU_Information+0xc>,%a0
50528: 42a8 0024 clrl %a0@(36)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5052c: 2f11 movel %a1@,%sp@-
5052e: 486b 000c pea %a3@(12)
50532: 2f02 movel %d2,%sp@-
50534: 4eb9 0005 7868 jsr 57868 <memcpy>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
5053a: 4fef 000c lea %sp@(12),%sp
5053e: 2d4a 0008 movel %a2,%fp@(8)
50542: 2d4b 000c movel %a3,%fp@(12)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
50546: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5054c: 4e5e unlk %fp
5054e: 4ef9 0005 033c jmp 5033c <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
50554: 4a03 tstb %d3
50556: 6612 bnes 5056a <_CORE_message_queue_Seize+0xaa>
_ISR_Enable( level );
50558: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
5055a: 7004 moveq #4,%d0
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
5055c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
#endif
}
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
50562: 2140 0034 movel %d0,%a0@(52)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
50566: 4e5e unlk %fp
50568: 4e75 rts
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
5056a: 7001 moveq #1,%d0
5056c: 2540 0030 movel %d0,%a2@(48)
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
50570: 2142 002c movel %d2,%a0@(44)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
50574: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id;
50578: 2145 0020 movel %d5,%a0@(32)
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
5057c: 2149 0028 movel %a1,%a0@(40)
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
50580: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
50582: 49f9 0005 2a40 lea 52a40 <_Thread_queue_Timeout>,%a4
50588: 2d44 000c movel %d4,%fp@(12)
5058c: 2d4c 0010 movel %a4,%fp@(16)
50590: 2d4a 0008 movel %a2,%fp@(8)
}
50594: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5059a: 4e5e unlk %fp
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
5059c: 4ef9 0005 267c jmp 5267c <_Thread_queue_Enqueue_with_handler>
...
000505a4 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
505a4: 4e56 fff4 linkw %fp,#-12
505a8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
505ac: 246e 0008 moveal %fp@(8),%a2
505b0: 242e 0010 movel %fp@(16),%d2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
505b4: b4aa 004c cmpl %a2@(76),%d2
505b8: 6256 bhis 50610 <_CORE_message_queue_Submit+0x6c>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
505ba: 202a 0048 movel %a2@(72),%d0
505be: 675c beqs 5061c <_CORE_message_queue_Submit+0x78>
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
505c0: b0aa 0044 cmpl %a2@(68),%d0
505c4: 650c bcss 505d2 <_CORE_message_queue_Submit+0x2e>
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
#if !defined(RTEMS_SCORE_COREMSG_ENABLE_BLOCKING_SEND)
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
505c6: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
505c8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
505ce: 4e5e unlk %fp
505d0: 4e75 rts
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
505d2: 486a 0060 pea %a2@(96)
505d6: 4eb9 0005 039c jsr 5039c <_Chain_Get>
505dc: 2640 moveal %d0,%a3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
505de: 2f02 movel %d2,%sp@-
505e0: 2f2e 000c movel %fp@(12),%sp@-
505e4: 486b 000c pea %a3@(12)
505e8: 4eb9 0005 7868 jsr 57868 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
505ee: 2742 0008 movel %d2,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
505f2: 2f2e 001c movel %fp@(28),%sp@-
505f6: 2f0b movel %a3,%sp@-
505f8: 2f0a movel %a2,%sp@-
505fa: 4eb9 0005 51bc jsr 551bc <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50600: 4fef 001c lea %sp@(28),%sp
50604: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50606: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
5060c: 4e5e unlk %fp
5060e: 4e75 rts
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
50610: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50612: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
50618: 4e5e unlk %fp
5061a: 4e75 rts
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
5061c: 2f0a movel %a2,%sp@-
5061e: 4eb9 0005 2504 jsr 52504 <_Thread_queue_Dequeue>
if ( the_thread ) {
50624: 588f addql #4,%sp
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
50626: 2640 moveal %d0,%a3
if ( the_thread ) {
50628: 4a80 tstl %d0
5062a: 672e beqs 5065a <_CORE_message_queue_Submit+0xb6>
5062c: 2f02 movel %d2,%sp@-
5062e: 2f2e 000c movel %fp@(12),%sp@-
50632: 2f2b 002c movel %a3@(44),%sp@-
50636: 4eb9 0005 7868 jsr 57868 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5063c: 206b 0028 moveal %a3@(40),%a0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50640: 4fef 000c lea %sp@(12),%sp
50644: 4280 clrl %d0
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
50646: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
50648: 222e 001c movel %fp@(28),%d1
5064c: 2741 0024 movel %d1,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50650: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
50656: 4e5e unlk %fp
50658: 4e75 rts
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) {
5065a: 202a 0048 movel %a2@(72),%d0
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
5065e: b0aa 0044 cmpl %a2@(68),%d0
50662: 6400 ff62 bccw 505c6 <_CORE_message_queue_Submit+0x22>
50666: 6000 ff6a braw 505d2 <_CORE_message_queue_Submit+0x2e>
...
000473a8 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
473a8: 4e56 0000 linkw %fp,#0
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473ac: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
473b2: 2f0a movel %a2,%sp@-
473b4: 246e 0008 moveal %fp@(8),%a2
473b8: 2f02 movel %d2,%sp@-
473ba: 142e 0013 moveb %fp@(19),%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473be: 4a80 tstl %d0
473c0: 6704 beqs 473c6 <_CORE_mutex_Seize+0x1e>
473c2: 4a02 tstb %d2
473c4: 6634 bnes 473fa <_CORE_mutex_Seize+0x52> <== ALWAYS TAKEN
473c6: 486e 0018 pea %fp@(24)
473ca: 2f0a movel %a2,%sp@-
473cc: 4eb9 0004 bcd4 jsr 4bcd4 <_CORE_mutex_Seize_interrupt_trylock>
473d2: 508f addql #8,%sp
473d4: 4a80 tstl %d0
473d6: 6716 beqs 473ee <_CORE_mutex_Seize+0x46>
473d8: 4a02 tstb %d2
473da: 6636 bnes 47412 <_CORE_mutex_Seize+0x6a>
473dc: 202e 0018 movel %fp@(24),%d0
473e0: 46c0 movew %d0,%sr
473e2: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
473e8: 7001 moveq #1,%d0
473ea: 2140 0034 movel %d0,%a0@(52)
}
473ee: 242e fff8 movel %fp@(-8),%d2
473f2: 246e fffc moveal %fp@(-4),%a2
473f6: 4e5e unlk %fp
473f8: 4e75 rts
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473fa: 7001 moveq #1,%d0
473fc: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
47402: 64c2 bccs 473c6 <_CORE_mutex_Seize+0x1e>
47404: 4878 0012 pea 12 <INVALID_OPERATION+0x2>
47408: 42a7 clrl %sp@-
4740a: 42a7 clrl %sp@-
4740c: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
47412: 7001 moveq #1,%d0
47414: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
4741a: 2540 0030 movel %d0,%a2@(48)
4741e: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
47424: 5280 addql #1,%d0
47426: 216e 000c 0020 movel %fp@(12),%a0@(32)
4742c: 214a 0044 movel %a2,%a0@(68)
47430: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
47436: 202e 0018 movel %fp@(24),%d0
4743a: 46c0 movew %d0,%sr
4743c: 2f2e 0014 movel %fp@(20),%sp@-
47440: 2f0a movel %a2,%sp@-
47442: 4eb9 0004 731c jsr 4731c <_CORE_mutex_Seize_interrupt_blocking>
}
47448: 242e fff8 movel %fp@(-8),%d2
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
4744c: 508f addql #8,%sp
}
4744e: 246e fffc moveal %fp@(-4),%a2
47452: 4e5e unlk %fp
...
000475ac <_CORE_semaphore_Surrender>:
CORE_semaphore_Status _CORE_semaphore_Surrender(
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
CORE_semaphore_API_mp_support_callout api_semaphore_mp_support
)
{
475ac: 4e56 0000 linkw %fp,#0
475b0: 2f0a movel %a2,%sp@-
475b2: 246e 0008 moveal %fp@(8),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
475b6: 2f0a movel %a2,%sp@-
475b8: 4eb9 0004 9030 jsr 49030 <_Thread_queue_Dequeue>
475be: 588f addql #4,%sp
475c0: 4a80 tstl %d0
475c2: 670a beqs 475ce <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475c4: 246e fffc moveal %fp@(-4),%a2
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
475c8: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475ca: 4e5e unlk %fp
475cc: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
475ce: 303c 0700 movew #1792,%d0
475d2: 40c1 movew %sr,%d1
475d4: 8081 orl %d1,%d0
475d6: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
475d8: 202a 0048 movel %a2@(72),%d0
475dc: b0aa 0040 cmpl %a2@(64),%d0
475e0: 6412 bccs 475f4 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN
the_semaphore->count += 1;
475e2: 5280 addql #1,%d0
475e4: 2540 0048 movel %d0,%a2@(72)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
475e8: 4280 clrl %d0
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
475ea: 46c1 movew %d1,%sr
}
return status;
}
475ec: 246e fffc moveal %fp@(-4),%a2
475f0: 4e5e unlk %fp
475f2: 4e75 rts
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
475f4: 7004 moveq #4,%d0 <== NOT EXECUTED
_ISR_Enable( level );
475f6: 46c1 movew %d1,%sr <== NOT EXECUTED
475f8: 60f2 bras 475ec <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED
...
0004bc60 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4bc60: 4e56 ffec linkw %fp,#-20
4bc64: 202e 0010 movel %fp@(16),%d0
4bc68: 48d7 043c moveml %d2-%d5/%a2,%sp@
4bc6c: 246e 0008 moveal %fp@(8),%a2
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4bc70: 280a movel %a2,%d4
4bc72: 5884 addql #4,%d4
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4bc74: 262e 000c movel %fp@(12),%d3
4bc78: 242e 0014 movel %fp@(20),%d2
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;
4bc7c: 42aa 0004 clrl %a2@(4)
while ( count-- ) {
4bc80: 4a80 tstl %d0
4bc82: 6740 beqs 4bcc4 <_Chain_Initialize+0x64> <== NEVER TAKEN
{
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;
4bc84: 2043 moveal %d3,%a0
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
4bc86: 224a moveal %a2,%a1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bc88: 5380 subql #1,%d0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bc8a: 2208 movel %a0,%d1
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bc8c: 2a00 movel %d0,%d5
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bc8e: d282 addl %d2,%d1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
4bc90: 2288 movel %a0,%a1@
next->previous = current;
4bc92: 2149 0004 movel %a1,%a0@(4)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bc96: 4a80 tstl %d0
4bc98: 6714 beqs 4bcae <_Chain_Initialize+0x4e>
4bc9a: 2248 moveal %a0,%a1
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
4bc9c: 2041 moveal %d1,%a0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bc9e: 2208 movel %a0,%d1
4bca0: 5380 subql #1,%d0
4bca2: d282 addl %d2,%d1
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
4bca4: 2288 movel %a0,%a1@
next->previous = current;
4bca6: 2149 0004 movel %a1,%a0@(4)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bcaa: 4a80 tstl %d0
4bcac: 66ec bnes 4bc9a <_Chain_Initialize+0x3a>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4bcae: 4c05 2800 mulsl %d5,%d2
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
4bcb2: 2043 moveal %d3,%a0
4bcb4: d1c2 addal %d2,%a0
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
tail->previous = current;
4bcb6: 2548 0008 movel %a0,%a2@(8)
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
4bcba: 2084 movel %d4,%a0@
tail->previous = current;
}
4bcbc: 4cd7 043c moveml %sp@,%d2-%d5/%a2
4bcc0: 4e5e unlk %fp
4bcc2: 4e75 rts
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
4bcc4: 204a moveal %a2,%a0 <== NOT EXECUTED
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
tail->previous = current;
4bcc6: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
4bcca: 2084 movel %d4,%a0@ <== NOT EXECUTED
tail->previous = current;
}
4bccc: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED
4bcd0: 4e5e unlk %fp <== NOT EXECUTED
000462b4 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
462b4: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
462ba: 4e56 ffec linkw %fp,#-20
462be: 48d7 043c moveml %d2-%d5/%a2,%sp@
462c2: 246e 0008 moveal %fp@(8),%a2
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
462c6: 206a 00fc moveal %a2@(252),%a0
option_set = (rtems_option) the_thread->Wait.option;
462ca: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
462ce: 40c3 movew %sr,%d3
462d0: 8083 orl %d3,%d0
462d2: 46c0 movew %d0,%sr
pending_events = api->pending_events;
event_condition = (rtems_event_set) the_thread->Wait.count;
462d4: 222a 0024 movel %a2@(36),%d1
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
462d8: 2001 movel %d1,%d0
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
pending_events = api->pending_events;
462da: 2410 movel %a0@,%d2
462dc: c082 andl %d2,%d0
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
462de: 6776 beqs 46356 <_Event_Surrender+0xa2>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
462e0: 4ab9 0005 f5e0 tstl 5f5e0 <_Per_CPU_Information+0x8>
462e6: 670a beqs 462f2 <_Event_Surrender+0x3e>
462e8: b5f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a2
462ee: 6700 00a0 beqw 46390 <_Event_Surrender+0xdc>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
462f2: 2a2a 0010 movel %a2@(16),%d5
462f6: 0285 0000 0100 andil #256,%d5
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
462fc: 674c beqs 4634a <_Event_Surrender+0x96>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
462fe: b081 cmpl %d1,%d0
46300: 6706 beqs 46308 <_Event_Surrender+0x54>
46302: 0804 0001 btst #1,%d4
46306: 6742 beqs 4634a <_Event_Surrender+0x96> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
46308: 2200 movel %d0,%d1
4630a: 4681 notl %d1
4630c: c282 andl %d2,%d1
4630e: 2081 movel %d1,%a0@
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46310: 206a 0028 moveal %a2@(40),%a0
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
46314: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46318: 2080 movel %d0,%a0@
_ISR_Flash( level );
4631a: 203c 0000 0700 movel #1792,%d0
46320: 46c3 movew %d3,%sr
46322: 8083 orl %d3,%d0
46324: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
46326: 7a02 moveq #2,%d5
46328: baaa 0050 cmpl %a2@(80),%d5
4632c: 6734 beqs 46362 <_Event_Surrender+0xae>
_ISR_Enable( level );
4632e: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
46330: 2f3c 1003 fff8 movel #268697592,%sp@-
46336: 2f0a movel %a2,%sp@-
46338: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
4633e: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
46340: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
46346: 4e5e unlk %fp
46348: 4e75 rts
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4634a: 46c3 movew %d3,%sr
}
4634c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
46352: 4e5e unlk %fp
46354: 4e75 rts
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
46356: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
46358: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
4635e: 4e5e unlk %fp
46360: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
46362: 7003 moveq #3,%d0
46364: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
46368: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4636a: 486a 0048 pea %a2@(72)
4636e: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
46374: 2f3c 1003 fff8 movel #268697592,%sp@-
4637a: 2f0a movel %a2,%sp@-
4637c: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
46382: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
46386: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
4638c: 4e5e unlk %fp
4638e: 4e75 rts
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
46390: 2279 0005 f618 moveal 5f618 <_Event_Sync_state>,%a1
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
46396: 7a02 moveq #2,%d5
46398: ba89 cmpl %a1,%d5
4639a: 6710 beqs 463ac <_Event_Surrender+0xf8> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
4639c: 2279 0005 f618 moveal 5f618 <_Event_Sync_state>,%a1
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
463a2: 1a3c 0001 moveb #1,%d5
463a6: ba89 cmpl %a1,%d5
463a8: 6600 ff48 bnew 462f2 <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
463ac: b081 cmpl %d1,%d0
463ae: 6706 beqs 463b6 <_Event_Surrender+0x102>
463b0: 0804 0001 btst #1,%d4
463b4: 671a beqs 463d0 <_Event_Surrender+0x11c> <== NEVER TAKEN
463b6: 2200 movel %d0,%d1
463b8: 4681 notl %d1
463ba: c282 andl %d2,%d1
463bc: 2081 movel %d1,%a0@
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
463be: 206a 0028 moveal %a2@(40),%a0
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
463c2: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
463c6: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
463c8: 7003 moveq #3,%d0
463ca: 23c0 0005 f618 movel %d0,5f618 <_Event_Sync_state>
}
_ISR_Enable( level );
463d0: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
463d2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
463d8: 4e5e unlk %fp <== NOT EXECUTED
000463dc <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
463dc: 4e56 fffc linkw %fp,#-4
463e0: 2f03 movel %d3,%sp@-
463e2: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
463e4: 486e fffc pea %fp@(-4)
463e8: 2f2e 0008 movel %fp@(8),%sp@-
463ec: 4eb9 0004 8cfc jsr 48cfc <_Thread_Get>
switch ( location ) {
463f2: 508f addql #8,%sp
463f4: 4aae fffc tstl %fp@(-4)
463f8: 6642 bnes 4643c <_Event_Timeout+0x60> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
463fa: 223c 0000 0700 movel #1792,%d1
46400: 40c2 movew %sr,%d2
46402: 8282 orl %d2,%d1
46404: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
46406: 2040 moveal %d0,%a0
46408: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
4640c: b0b9 0005 f5e4 cmpl 5f5e4 <_Per_CPU_Information+0xc>,%d0
46412: 6734 beqs 46448 <_Event_Timeout+0x6c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
46414: 7606 moveq #6,%d3
46416: 2040 moveal %d0,%a0
46418: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
4641c: 46c2 movew %d2,%sr
4641e: 2f3c 1003 fff8 movel #268697592,%sp@-
46424: 2f00 movel %d0,%sp@-
46426: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
4642c: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4642e: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
46434: 5380 subql #1,%d0
46436: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
4643c: 242e fff4 movel %fp@(-12),%d2
46440: 262e fff8 movel %fp@(-8),%d3
46444: 4e5e unlk %fp
46446: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
46448: 2239 0005 f618 movel 5f618 <_Event_Sync_state>,%d1
4644e: 7601 moveq #1,%d3
46450: b681 cmpl %d1,%d3
46452: 66c0 bnes 46414 <_Event_Timeout+0x38>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
46454: 7606 moveq #6,%d3
46456: 2040 moveal %d0,%a0
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
46458: 7202 moveq #2,%d1
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
4645a: 2143 0034 movel %d3,%a0@(52)
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4645e: 23c1 0005 f618 movel %d1,5f618 <_Event_Sync_state>
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
46464: 46c2 movew %d2,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
46466: 2f3c 1003 fff8 movel #268697592,%sp@-
4646c: 2f00 movel %d0,%sp@-
4646e: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
46474: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
46476: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
4647c: 5380 subql #1,%d0
4647e: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
46484: 60b6 bras 4643c <_Event_Timeout+0x60>
...
0004be5c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4be5c: 4e56 ffcc linkw %fp,#-52
4be60: 226e 000c moveal %fp@(12),%a1
4be64: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4be68: 246e 0008 moveal %fp@(8),%a2
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
4be6c: 2e09 movel %a1,%d7
4be6e: 5887 addql #4,%d7
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
4be70: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4be74: 222e 0010 movel %fp@(16),%d1
4be78: 282e 0014 movel %fp@(20),%d4
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
4be7c: 2d40 fffc movel %d0,%fp@(-4)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
4be80: be89 cmpl %a1,%d7
4be82: 6500 014e bcsw 4bfd2 <_Heap_Allocate_aligned_with_boundary+0x176>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4be86: 4a84 tstl %d4
4be88: 6600 0144 bnew 4bfce <_Heap_Allocate_aligned_with_boundary+0x172>
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4be8c: 206a 0008 moveal %a2@(8),%a0
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4be90: b1ca cmpal %a2,%a0
4be92: 6700 013e beqw 4bfd2 <_Heap_Allocate_aligned_with_boundary+0x176>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4be96: 242e fffc movel %fp@(-4),%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4be9a: 7c04 moveq #4,%d6
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4be9c: 5e82 addql #7,%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4be9e: 9c89 subl %a1,%d6
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4bea0: 7601 moveq #1,%d3
4bea2: 2647 moveal %d7,%a3
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4bea4: 2d42 fff8 movel %d2,%fp@(-8)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
4bea8: 2d46 fff4 movel %d6,%fp@(-12)
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4beac: 2028 0004 movel %a0@(4),%d0
4beb0: b08b cmpl %a3,%d0
4beb2: 630e blss 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4beb4: 4a81 tstl %d1
4beb6: 661c bnes 4bed4 <_Heap_Allocate_aligned_with_boundary+0x78>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4beb8: 2408 movel %a0,%d2
4beba: 5082 addql #8,%d2
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
4bebc: 4a82 tstl %d2
4bebe: 6600 00de bnew 4bf9e <_Heap_Allocate_aligned_with_boundary+0x142>
break;
}
block = block->next;
4bec2: 2003 movel %d3,%d0
4bec4: 5280 addql #1,%d0
4bec6: 2068 0008 moveal %a0@(8),%a0
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4beca: b1ca cmpal %a2,%a0
4becc: 6700 0110 beqw 4bfde <_Heap_Allocate_aligned_with_boundary+0x182>
4bed0: 2600 movel %d0,%d3
4bed2: 60d8 bras 4beac <_Heap_Allocate_aligned_with_boundary+0x50>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4bed4: 7efe moveq #-2,%d7
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4bed6: 4be8 0008 lea %a0@(8),%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4beda: c087 andl %d7,%d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4bedc: 286a 0014 moveal %a2@(20),%a4
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4bee0: d088 addl %a0,%d0
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4bee2: 2a2e fff8 movel %fp@(-8),%d5
4bee6: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
4bee8: 242e fff4 movel %fp@(-12),%d2
4beec: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4beee: 2c02 movel %d2,%d6
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4bef0: d085 addl %d5,%d0
4bef2: 4c41 6005 remul %d1,%d5,%d6
4bef6: 9485 subl %d5,%d2
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
4bef8: b480 cmpl %d0,%d2
4befa: 630a blss 4bf06 <_Heap_Allocate_aligned_with_boundary+0xaa>
4befc: 2a00 movel %d0,%d5
4befe: 4c41 5002 remul %d1,%d2,%d5
4bf02: 9082 subl %d2,%d0
4bf04: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4bf06: 4a84 tstl %d4
4bf08: 676a beqs 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
4bf0a: 2002 movel %d2,%d0
4bf0c: d089 addl %a1,%d0
4bf0e: 2c00 movel %d0,%d6
4bf10: 4c44 6005 remul %d4,%d5,%d6
4bf14: 2c00 movel %d0,%d6
4bf16: 9c85 subl %d5,%d6
4bf18: 2a06 movel %d6,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4bf1a: bc82 cmpl %d2,%d6
4bf1c: 6356 blss 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
4bf1e: bc80 cmpl %d0,%d6
4bf20: 6452 bccs 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4bf22: 2c0d movel %a5,%d6
4bf24: dc89 addl %a1,%d6
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4bf26: ba86 cmpl %d6,%d5
4bf28: 6598 bcss 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4bf2a: 2405 movel %d5,%d2
4bf2c: 9489 subl %a1,%d2
4bf2e: 2a02 movel %d2,%d5
4bf30: 4c41 5000 remul %d1,%d0,%d5
4bf34: 9480 subl %d0,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4bf36: 2002 movel %d2,%d0
4bf38: d089 addl %a1,%d0
4bf3a: 2e00 movel %d0,%d7
4bf3c: 4c44 7005 remul %d4,%d5,%d7
4bf40: 2e00 movel %d0,%d7
4bf42: 9e85 subl %d5,%d7
4bf44: 2a07 movel %d7,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4bf46: be82 cmpl %d2,%d7
4bf48: 632a blss 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
4bf4a: be80 cmpl %d0,%d7
4bf4c: 6426 bccs 4bf74 <_Heap_Allocate_aligned_with_boundary+0x118>
if ( boundary_line < boundary_floor ) {
4bf4e: ba86 cmpl %d6,%d5
4bf50: 6500 ff70 bcsw 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4bf54: 2405 movel %d5,%d2
4bf56: 9489 subl %a1,%d2
4bf58: 2a02 movel %d2,%d5
4bf5a: 4c41 5000 remul %d1,%d0,%d5
4bf5e: 9480 subl %d0,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4bf60: 2002 movel %d2,%d0
4bf62: d089 addl %a1,%d0
4bf64: 2e00 movel %d0,%d7
4bf66: 4c44 7005 remul %d4,%d5,%d7
4bf6a: 2e00 movel %d0,%d7
4bf6c: 9e85 subl %d5,%d7
4bf6e: 2a07 movel %d7,%d5
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4bf70: be82 cmpl %d2,%d7
4bf72: 62d6 bhis 4bf4a <_Heap_Allocate_aligned_with_boundary+0xee><== ALWAYS TAKEN
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
4bf74: b48d cmpl %a5,%d2
4bf76: 6500 ff4a bcsw 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
4bf7a: 2e2e fffc movel %fp@(-4),%d7
4bf7e: 2c02 movel %d2,%d6
4bf80: 70f8 moveq #-8,%d0
4bf82: 9088 subl %a0,%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4bf84: d082 addl %d2,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4bf86: 4c47 6005 remul %d7,%d5,%d6
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
4bf8a: 9085 subl %d5,%d0
if ( free_size >= min_block_size || free_size == 0 ) {
4bf8c: b08c cmpl %a4,%d0
4bf8e: 6400 ff2c bccw 4bebc <_Heap_Allocate_aligned_with_boundary+0x60>
4bf92: 4a80 tstl %d0
4bf94: 6600 ff2c bnew 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
4bf98: 4a82 tstl %d2
4bf9a: 6700 ff26 beqw 4bec2 <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4bf9e: 2f09 movel %a1,%sp@-
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
4bfa0: 52aa 0048 addql #1,%a2@(72)
stats->searches += search_count;
4bfa4: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4bfa8: 2f02 movel %d2,%sp@-
4bfaa: 2f08 movel %a0,%sp@-
4bfac: 2f0a movel %a2,%sp@-
4bfae: 4eb9 0004 79ae jsr 479ae <_Heap_Block_allocate>
4bfb4: 4fef 0010 lea %sp@(16),%sp
4bfb8: 2002 movel %d2,%d0
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
4bfba: b6aa 0044 cmpl %a2@(68),%d3
4bfbe: 6304 blss 4bfc4 <_Heap_Allocate_aligned_with_boundary+0x168>
stats->max_search = search_count;
4bfc0: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
}
4bfc4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4bfca: 4e5e unlk %fp
4bfcc: 4e75 rts
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4bfce: b889 cmpl %a1,%d4
4bfd0: 6410 bccs 4bfe2 <_Heap_Allocate_aligned_with_boundary+0x186>
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4bfd2: 4280 clrl %d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4bfd4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4bfda: 4e5e unlk %fp
4bfdc: 4e75 rts
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
4bfde: 4280 clrl %d0
4bfe0: 60d8 bras 4bfba <_Heap_Allocate_aligned_with_boundary+0x15e>
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4bfe2: 4a81 tstl %d1
4bfe4: 6600 fea6 bnew 4be8c <_Heap_Allocate_aligned_with_boundary+0x30>
alignment = page_size;
4bfe8: 2200 movel %d0,%d1
4bfea: 6000 fea0 braw 4be8c <_Heap_Allocate_aligned_with_boundary+0x30>
...
000479ae <_Heap_Block_allocate>:
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
479ae: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
479b0: 4e56 ffe0 linkw %fp,#-32
479b4: 206e 000c moveal %fp@(12),%a0
479b8: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
479bc: 2428 0004 movel %a0@(4),%d2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
479c0: 7801 moveq #1,%d4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
479c2: c082 andl %d2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
479c4: 222e 0010 movel %fp@(16),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
479c8: 49f0 0800 lea %a0@(00000000,%d0:l),%a4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
479cc: 2641 moveal %d1,%a3
479ce: 518b subql #8,%a3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
479d0: 2a0b movel %a3,%d5
479d2: 9a88 subl %a0,%d5
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
479d4: c8ac 0004 andl %a4@(4),%d4
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
479d8: 246e 0008 moveal %fp@(8),%a2
479dc: 262e 0014 movel %fp@(20),%d3
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
479e0: 4a84 tstl %d4
479e2: 6600 0090 bnew 47a74 <_Heap_Block_allocate+0xc6>
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
479e6: 2828 0008 movel %a0@(8),%d4
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
479ea: 2a44 moveal %d4,%a5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
479ec: 2268 000c moveal %a0@(12),%a1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
479f0: 2344 0008 movel %d4,%a1@(8)
next->prev = prev;
479f4: 2b49 000c movel %a1,%a5@(12)
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479f8: 91aa 0030 subl %d0,%a2@(48)
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
479fc: 53aa 0038 subql #1,%a2@(56)
++stats->used_blocks;
47a00: 52aa 0040 addql #1,%a2@(64)
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
47a04: 202a 0010 movel %a2@(16),%d0
47a08: b085 cmpl %d5,%d0
47a0a: 6272 bhis 47a7e <_Heap_Block_allocate+0xd0>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
47a0c: 4c40 1004 remul %d0,%d4,%d1
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
47a10: 97c4 subal %d4,%a3
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
47a12: 200b movel %a3,%d0
47a14: 9088 subl %a0,%d0
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
47a16: d1aa 0030 addl %d0,%a2@(48)
uintptr_t block_end = block_begin + block_size;
Heap_Block *const new_block =
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
47a1a: 99cb subal %a3,%a4
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
if ( _Heap_Is_prev_used( block ) ) {
47a1c: 0802 0000 btst #0,%d2
47a20: 6774 beqs 47a96 <_Heap_Block_allocate+0xe8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
47a22: 2a69 0008 moveal %a1@(8),%a5
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a26: 7401 moveq #1,%d2
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47a28: 2208 movel %a0,%d1
new_block->next = next;
47a2a: 214d 0008 movel %a5,%a0@(8)
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a2e: 8480 orl %d0,%d2
new_block->prev = block_before;
47a30: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
47a34: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
47a38: 2b48 000c movel %a0,%a5@(12)
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47a3c: 52aa 0038 addql #1,%a2@(56)
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a40: 2142 0004 movel %d2,%a0@(4)
new_block->prev_size = block_size;
47a44: 2680 movel %d0,%a3@
new_block->size_and_flag = new_block_size;
47a46: 274c 0004 movel %a4,%a3@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a4a: 2f03 movel %d3,%sp@-
47a4c: 2f01 movel %d1,%sp@-
47a4e: 2f0b movel %a3,%sp@-
47a50: 2f0a movel %a2,%sp@-
47a52: 4eba fcb0 jsr %pc@(47704 <_Heap_Block_split>)
47a56: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
47a5a: 202a 0030 movel %a2@(48),%d0
47a5e: b0aa 0034 cmpl %a2@(52),%d0
47a62: 6404 bccs 47a68 <_Heap_Block_allocate+0xba>
stats->min_free_size = stats->free_size;
47a64: 2540 0034 movel %d0,%a2@(52)
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
47a68: 200b movel %a3,%d0
47a6a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
47a70: 4e5e unlk %fp
47a72: 4e75 rts
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
47a74: 202a 0010 movel %a2@(16),%d0
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
47a78: 224a moveal %a2,%a1
}
if ( alloc_area_offset < heap->page_size ) {
47a7a: b085 cmpl %d5,%d0
47a7c: 638e blss 47a0c <_Heap_Block_allocate+0x5e>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
47a7e: 2645 moveal %d5,%a3
47a80: 4873 3800 pea %a3@(00000000,%d3:l)
47a84: 2648 moveal %a0,%a3
47a86: 2f09 movel %a1,%sp@-
47a88: 2f08 movel %a0,%sp@-
47a8a: 2f0a movel %a2,%sp@-
47a8c: 4eba fc76 jsr %pc@(47704 <_Heap_Block_split>)
47a90: 4fef 0010 lea %sp@(16),%sp
47a94: 60c4 bras 47a5a <_Heap_Block_allocate+0xac>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
47a96: 91d0 subal %a0@,%a0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47a98: 74fe moveq #-2,%d2
} else {
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_size += prev_block_size;
47a9a: 2209 movel %a1,%d1
47a9c: c4a8 0004 andl %a0@(4),%d2
47aa0: d082 addl %d2,%d0
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47aa2: 7401 moveq #1,%d2
47aa4: 8480 orl %d0,%d2
new_block->prev_size = block_size;
47aa6: 2680 movel %d0,%a3@
block = prev_block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47aa8: 2142 0004 movel %d2,%a0@(4)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47aac: 274c 0004 movel %a4,%a3@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47ab0: 2f03 movel %d3,%sp@-
47ab2: 2f01 movel %d1,%sp@-
47ab4: 2f0b movel %a3,%sp@-
47ab6: 2f0a movel %a2,%sp@-
47ab8: 4eba fc4a jsr %pc@(47704 <_Heap_Block_split>)
47abc: 4fef 0010 lea %sp@(16),%sp
47ac0: 6098 bras 47a5a <_Heap_Block_allocate+0xac>
...
00047704 <_Heap_Block_split>:
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
47704: 4e56 ffe4 linkw %fp,#-28
47708: 226e 0008 moveal %fp@(8),%a1
4770c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
47710: 246e 000c moveal %fp@(12),%a2
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47714: 76fe moveq #-2,%d3
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
47716: 282a 0004 movel %a2@(4),%d4
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4771a: 2669 0014 moveal %a1@(20),%a3
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
4771e: 220b movel %a3,%d1
47720: 5181 subql #8,%d1
Heap_Control *heap,
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
47722: 286e 0010 moveal %fp@(16),%a4
Heap_Statistics *const stats = &heap->stats;
uintptr_t const page_size = heap->page_size;
47726: 2429 0010 movel %a1@(16),%d2
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
4772a: 202e 0014 movel %fp@(20),%d0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4772e: c684 andl %d4,%d3
return heap->stats.size;
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Max( uintptr_t a, uintptr_t b )
{
return a > b ? a : b;
47730: b280 cmpl %d0,%d1
47732: 6302 blss 47736 <_Heap_Block_split+0x32>
47734: 2001 movel %d1,%d0
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const min_alloc_size = min_block_size - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const used_size =
47736: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47738: 2a00 movel %d0,%d5
4773a: 4c42 5001 remul %d2,%d1,%d5
if ( remainder != 0 ) {
4773e: 4a81 tstl %d1
47740: 6766 beqs 477a8 <_Heap_Block_split+0xa4>
return value - remainder + alignment;
47742: d480 addl %d0,%d2
47744: 9481 subl %d1,%d2
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
47746: 2203 movel %d3,%d1
47748: 5881 addql #4,%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4774a: 41f2 3800 lea %a2@(00000000,%d3:l),%a0
4774e: 9280 subl %d0,%d1
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
47750: 588b addql #4,%a3
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
47752: b7c1 cmpal %d1,%a3
47754: 6264 bhis 477ba <_Heap_Block_split+0xb6>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
47756: 7001 moveq #1,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47758: 47f2 2800 lea %a2@(00000000,%d2:l),%a3
Heap_Block *const free_block = _Heap_Block_at( block, used_block_size );
uintptr_t free_block_size = block_size - used_block_size;
4775c: 9682 subl %d2,%d3
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4775e: 7201 moveq #1,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
47760: c880 andl %d0,%d4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47762: 70fe moveq #-2,%d0
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
47764: 8484 orl %d4,%d2
47766: 2542 0004 movel %d2,%a2@(4)
_HAssert( used_block_size + free_block_size == block_size );
_Heap_Block_set_size( block, used_block_size );
/* Statistics */
stats->free_size += free_block_size;
4776a: d7a9 0030 addl %d3,%a1@(48)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4776e: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
47772: c2b0 0804 andl %a0@(00000004,%d0:l),%d1
if ( _Heap_Is_used( next_block ) ) {
47776: 6750 beqs 477c8 <_Heap_Block_split+0xc4> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
47778: 246c 0008 moveal %a4@(8),%a2
free_block_size += next_block_size;
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
4777c: 7001 moveq #1,%d0
new_block->next = next;
new_block->prev = block_before;
4777e: 274c 000c movel %a4,%a3@(12)
47782: 8083 orl %d3,%d0
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
47784: 274a 0008 movel %a2,%a3@(8)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
47788: 254b 000c movel %a3,%a2@(12)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4778c: 294b 0008 movel %a3,%a4@(8)
if ( _Heap_Is_used( next_block ) ) {
_Heap_Free_list_insert_after( free_list_anchor, free_block );
/* Statistics */
++stats->free_blocks;
47790: 52a9 0038 addql #1,%a1@(56)
free_block_size += next_block_size;
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
47794: 2740 0004 movel %d0,%a3@(4)
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
47798: 70fe moveq #-2,%d0
4779a: c1a8 0004 andl %d0,%a0@(4)
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
4779e: 2083 movel %d3,%a0@
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
}
}
477a0: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4
477a4: 4e5e unlk %fp
477a6: 4e75 rts
uintptr_t const used_size =
_Heap_Max( alloc_size, min_alloc_size ) + HEAP_BLOCK_HEADER_SIZE;
uintptr_t const used_block_size = _Heap_Align_up( used_size, page_size );
uintptr_t const free_size = block_size + HEAP_ALLOC_BONUS - used_size;
477a8: 2203 movel %d3,%d1
477aa: 5881 addql #4,%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
477ac: 41f2 3800 lea %a2@(00000000,%d3:l),%a0
uintptr_t remainder = value % alignment;
if ( remainder != 0 ) {
return value - remainder + alignment;
} else {
return value;
477b0: 2400 movel %d0,%d2
477b2: 9280 subl %d0,%d1
uintptr_t const free_size_limit = min_block_size + HEAP_ALLOC_BONUS;
477b4: 588b addql #4,%a3
Heap_Block *next_block = _Heap_Block_at( block, block_size );
_HAssert( used_size <= block_size + HEAP_ALLOC_BONUS );
_HAssert( used_size + free_size == block_size + HEAP_ALLOC_BONUS );
if ( free_size >= free_size_limit ) {
477b6: b7c1 cmpal %d1,%a3
477b8: 639c blss 47756 <_Heap_Block_split+0x52>
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
477ba: 7001 moveq #1,%d0
}
}
477bc: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, free_block );
} else {
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
477c0: 81a8 0004 orl %d0,%a0@(4)
}
}
477c4: 4e5e unlk %fp
477c6: 4e75 rts
} else {
uintptr_t const next_block_size = _Heap_Block_size( next_block );
_Heap_Free_list_replace( next_block, free_block );
free_block_size += next_block_size;
477c8: d680 addl %d0,%d3
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
477ca: 7001 moveq #1,%d0
}
_Heap_Protection_block_initialize( heap, block );
return block;
}
477cc: 2268 0008 moveal %a0@(8),%a1
477d0: 2468 000c moveal %a0@(12),%a2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
477d4: 41f3 3800 lea %a3@(00000000,%d3:l),%a0
free_block_size += next_block_size;
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
477d8: 8083 orl %d3,%d0
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
477da: 2749 0008 movel %a1,%a3@(8)
new_block->prev = prev;
477de: 274a 000c movel %a2,%a3@(12)
477e2: 2740 0004 movel %d0,%a3@(4)
next_block->prev_size = free_block_size;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
477e6: 70fe moveq #-2,%d0
next->prev = new_block;
prev->next = new_block;
477e8: 254b 0008 movel %a3,%a2@(8)
477ec: c1a8 0004 andl %d0,%a0@(4)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
477f0: 234b 000c movel %a3,%a1@(12)
next_block = _Heap_Block_at( free_block, free_block_size );
}
free_block->size_and_flag = free_block_size | HEAP_PREV_BLOCK_USED;
next_block->prev_size = free_block_size;
477f4: 2083 movel %d3,%a0@
477f6: 60a8 bras 477a0 <_Heap_Block_split+0x9c>
0004c318 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
4c318: 4e56 ffcc linkw %fp,#-52
4c31c: 202e 0010 movel %fp@(16),%d0
4c320: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4c324: 246e 0008 moveal %fp@(8),%a2
4c328: 242e 000c movel %fp@(12),%d2
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
4c32c: 2602 movel %d2,%d3
4c32e: d680 addl %d0,%d3
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
4c330: 2a2a 0020 movel %a2@(32),%d5
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
4c334: 282a 0010 movel %a2@(16),%d4
uintptr_t const min_block_size = heap->min_block_size;
4c338: 222a 0014 movel %a2@(20),%d1
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
4c33c: 2c2a 0030 movel %a2@(48),%d6
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
4c340: 42ae fffc clrl %fp@(-4)
Heap_Block *extend_last_block = NULL;
4c344: 42ae fff8 clrl %fp@(-8)
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
4c348: b682 cmpl %d2,%d3
4c34a: 640c bccs 4c358 <_Heap_Extend+0x40>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c34c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
4c352: 4200 clrb %d0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c354: 4e5e unlk %fp
4c356: 4e75 rts
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
4c358: 486e fff8 pea %fp@(-8)
4c35c: 486e fffc pea %fp@(-4)
4c360: 2f01 movel %d1,%sp@-
4c362: 2f04 movel %d4,%sp@-
4c364: 2f00 movel %d0,%sp@-
4c366: 2f02 movel %d2,%sp@-
4c368: 4eb9 0004 7b44 jsr 47b44 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
4c36e: 4fef 0018 lea %sp@(24),%sp
4c372: 4a00 tstb %d0
4c374: 67d6 beqs 4c34c <_Heap_Extend+0x34>
4c376: 2045 moveal %d5,%a0
4c378: 9bcd subal %a5,%a5
4c37a: 97cb subal %a3,%a3
4c37c: 99cc subal %a4,%a4
4c37e: 42ae fff4 clrl %fp@(-12)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4c382: ba88 cmpl %a0,%d5
4c384: 6700 014a beqw 4c4d0 <_Heap_Extend+0x1b8>
4c388: 2208 movel %a0,%d1
uintptr_t const sub_area_end = start_block->prev_size;
4c38a: 2010 movel %a0@,%d0
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
4c38c: b082 cmpl %d2,%d0
4c38e: 6304 blss 4c394 <_Heap_Extend+0x7c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
4c390: b681 cmpl %d1,%d3
4c392: 62b8 bhis 4c34c <_Heap_Extend+0x34>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4c394: b681 cmpl %d1,%d3
4c396: 6700 0132 beqw 4c4ca <_Heap_Extend+0x1b2>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
4c39a: b083 cmpl %d3,%d0
4c39c: 6304 blss 4c3a2 <_Heap_Extend+0x8a>
4c39e: 2d48 fff4 movel %a0,%fp@(-12)
4c3a2: 2e00 movel %d0,%d7
4c3a4: 2240 moveal %d0,%a1
4c3a6: 5189 subql #8,%a1
4c3a8: 4c44 7001 remul %d4,%d1,%d7
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4c3ac: 93c1 subal %d1,%a1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
4c3ae: b480 cmpl %d0,%d2
4c3b0: 6700 0100 beqw 4c4b2 <_Heap_Extend+0x19a>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
4c3b4: b082 cmpl %d2,%d0
4c3b6: 6402 bccs 4c3ba <_Heap_Extend+0xa2>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4c3b8: 2a49 moveal %a1,%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c3ba: 70fe moveq #-2,%d0
4c3bc: c0a9 0004 andl %a1@(4),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c3c0: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
4c3c4: b1c5 cmpal %d5,%a0
4c3c6: 66ba bnes 4c382 <_Heap_Extend+0x6a> <== NEVER TAKEN
if ( extend_area_begin < heap->area_begin ) {
4c3c8: b4aa 0018 cmpl %a2@(24),%d2
4c3cc: 6500 010a bcsw 4c4d8 <_Heap_Extend+0x1c0>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
4c3d0: b6aa 001c cmpl %a2@(28),%d3
4c3d4: 6304 blss 4c3da <_Heap_Extend+0xc2>
heap->area_end = extend_area_end;
4c3d6: 2543 001c movel %d3,%a2@(28)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c3da: 226e fff8 moveal %fp@(-8),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c3de: 2009 movel %a1,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c3e0: 7201 moveq #1,%d1
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c3e2: 206e fffc moveal %fp@(-4),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c3e6: 9088 subl %a0,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c3e8: 8280 orl %d0,%d1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
4c3ea: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c3ec: 2141 0004 movel %d1,%a0@(4)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
4c3f0: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4c3f2: 42a9 0004 clrl %a1@(4)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4c3f6: b1ea 0020 cmpal %a2@(32),%a0
4c3fa: 6400 0104 bccw 4c500 <_Heap_Extend+0x1e8>
heap->first_block = extend_first_block;
4c3fe: 2548 0020 movel %a0,%a2@(32)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
4c402: 4a8c tstl %a4
4c404: 6700 0148 beqw 4c54e <_Heap_Extend+0x236>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
4c408: 202a 0010 movel %a2@(16),%d0
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
4c40c: 5082 addql #8,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4c40e: 2802 movel %d2,%d4
4c410: 4c40 4001 remul %d0,%d1,%d4
if ( remainder != 0 ) {
4c414: 4a81 tstl %d1
4c416: 6704 beqs 4c41c <_Heap_Extend+0x104>
return value - remainder + alignment;
4c418: d480 addl %d0,%d2
4c41a: 9481 subl %d1,%d2
uintptr_t const new_first_block_begin =
4c41c: 2042 moveal %d2,%a0
4c41e: 5188 subql #8,%a0
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
4c420: 200c movel %a4,%d0
4c422: 9088 subl %a0,%d0
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4c424: 7201 moveq #1,%d1
4c426: 8280 orl %d0,%d1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
4c428: 2094 movel %a4@,%a0@
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4c42a: 2141 0004 movel %d1,%a0@(4)
_Heap_Free_block( heap, new_first_block );
4c42e: 2f08 movel %a0,%sp@-
4c430: 2f0a movel %a2,%sp@-
4c432: 4eba fec8 jsr %pc@(4c2fc <_Heap_Free_block>)
4c436: 508f addql #8,%sp
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
4c438: 4a8b tstl %a3
4c43a: 6700 00d4 beqw 4c510 <_Heap_Extend+0x1f8>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
4c43e: 5183 subql #8,%d3
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
4c440: 968b subl %a3,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4c442: 2203 movel %d3,%d1
4c444: 4c6a 1000 0010 remul %a2@(16),%d0,%d1
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
4c44a: 7201 moveq #1,%d1
4c44c: 9680 subl %d0,%d3
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
4c44e: 202b 0004 movel %a3@(4),%d0
4c452: 9083 subl %d3,%d0
| HEAP_PREV_BLOCK_USED;
4c454: 8280 orl %d0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c456: 7001 moveq #1,%d0
4c458: 2781 3804 movel %d1,%a3@(00000004,%d3:l)
4c45c: c0ab 0004 andl %a3@(4),%d0
block->size_and_flag = size | flag;
4c460: 8680 orl %d0,%d3
4c462: 2743 0004 movel %d3,%a3@(4)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
4c466: 2f0b movel %a3,%sp@-
4c468: 2f0a movel %a2,%sp@-
4c46a: 4eba fe90 jsr %pc@(4c2fc <_Heap_Free_block>)
4c46e: 508f addql #8,%sp
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4c470: 4a8c tstl %a4
4c472: 6700 00c4 beqw 4c538 <_Heap_Extend+0x220>
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
4c476: 202a 0030 movel %a2@(48),%d0
4c47a: 9086 subl %d6,%d0
4c47c: 2c00 movel %d0,%d6
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c47e: 7001 moveq #1,%d0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c480: 206a 0024 moveal %a2@(36),%a0
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
4c484: 222a 0020 movel %a2@(32),%d1
4c488: 9288 subl %a0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c48a: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
4c48e: 8280 orl %d0,%d1
4c490: 2141 0004 movel %d1,%a0@(4)
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
4c494: ddaa 002c addl %d6,%a2@(44)
if ( extended_size_ptr != NULL )
4c498: 4aae 0014 tstl %fp@(20)
4c49c: 6700 00ca beqw 4c568 <_Heap_Extend+0x250>
*extended_size_ptr = extended_size;
4c4a0: 206e 0014 moveal %fp@(20),%a0
4c4a4: 2086 movel %d6,%a0@
return true;
}
4c4a6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
4c4ac: 7001 moveq #1,%d0
}
4c4ae: 4e5e unlk %fp
4c4b0: 4e75 rts
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c4b2: 70fe moveq #-2,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4c4b4: 2649 moveal %a1,%a3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c4b6: c0a9 0004 andl %a1@(4),%d0
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
start_block->prev_size = extend_area_end;
4c4ba: 2083 movel %d3,%a0@
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c4bc: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
4c4c0: b1c5 cmpal %d5,%a0
4c4c2: 6600 febe bnew 4c382 <_Heap_Extend+0x6a>
4c4c6: 6000 ff00 braw 4c3c8 <_Heap_Extend+0xb0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4c4ca: 2848 moveal %a0,%a4
4c4cc: 6000 fed4 braw 4c3a2 <_Heap_Extend+0x8a>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4c4d0: 222a 0018 movel %a2@(24),%d1
4c4d4: 6000 feb4 braw 4c38a <_Heap_Extend+0x72>
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c4d8: 226e fff8 moveal %fp@(-8),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c4dc: 2009 movel %a1,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c4de: 7201 moveq #1,%d1
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4c4e0: 206e fffc moveal %fp@(-4),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4c4e4: 9088 subl %a0,%d0
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
4c4e6: 2542 0018 movel %d2,%a2@(24)
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c4ea: 8280 orl %d0,%d1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
4c4ec: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4c4ee: 2141 0004 movel %d1,%a0@(4)
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
4c4f2: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4c4f4: 42a9 0004 clrl %a1@(4)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4c4f8: b1ea 0020 cmpal %a2@(32),%a0
4c4fc: 6500 ff00 bcsw 4c3fe <_Heap_Extend+0xe6>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
4c500: b3ea 0024 cmpal %a2@(36),%a1
4c504: 6300 fefc blsw 4c402 <_Heap_Extend+0xea>
heap->last_block = extend_last_block;
4c508: 2549 0024 movel %a1,%a2@(36)
4c50c: 6000 fef4 braw 4c402 <_Heap_Extend+0xea>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
4c510: 4a8d tstl %a5
4c512: 6700 ff5c beqw 4c470 <_Heap_Extend+0x158>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c516: 7001 moveq #1,%d0
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
4c518: 222e fffc movel %fp@(-4),%d1
4c51c: 928d subl %a5,%d1
4c51e: c0ad 0004 andl %a5@(4),%d0
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
4c522: 206e fff8 moveal %fp@(-8),%a0
block->size_and_flag = size | flag;
4c526: 8280 orl %d0,%d1
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
4c528: 7001 moveq #1,%d0
4c52a: 2b41 0004 movel %d1,%a5@(4)
4c52e: 81a8 0004 orl %d0,%a0@(4)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4c532: 4a8c tstl %a4
4c534: 6600 ff40 bnew 4c476 <_Heap_Extend+0x15e>
4c538: 4a8b tstl %a3
4c53a: 6600 ff3a bnew 4c476 <_Heap_Extend+0x15e>
_Heap_Free_block( heap, extend_first_block );
4c53e: 2f2e fffc movel %fp@(-4),%sp@-
4c542: 2f0a movel %a2,%sp@-
4c544: 4eba fdb6 jsr %pc@(4c2fc <_Heap_Free_block>)
4c548: 508f addql #8,%sp
4c54a: 6000 ff2a braw 4c476 <_Heap_Extend+0x15e>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
4c54e: 4aae fff4 tstl %fp@(-12)
4c552: 6700 fee4 beqw 4c438 <_Heap_Extend+0x120>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
4c556: 202e fff4 movel %fp@(-12),%d0
4c55a: 7201 moveq #1,%d1
4c55c: 9089 subl %a1,%d0
4c55e: 8280 orl %d0,%d1
4c560: 2341 0004 movel %d1,%a1@(4)
4c564: 6000 fed2 braw 4c438 <_Heap_Extend+0x120>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4c568: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
4c56e: 7001 moveq #1,%d0 <== NOT EXECUTED
}
4c570: 4e5e unlk %fp <== NOT EXECUTED
0004bff0 <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4bff0: 4e56 ffe8 linkw %fp,#-24
4bff4: 206e 0008 moveal %fp@(8),%a0
4bff8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4bffc: 202e 000c movel %fp@(12),%d0
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
4c000: 6700 00f2 beqw 4c0f4 <_Heap_Free+0x104>
4c004: 2240 moveal %d0,%a1
4c006: 5189 subql #8,%a1
4c008: 4c68 0001 0010 remul %a0@(16),%d1,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4c00e: 2028 0020 movel %a0@(32),%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4c012: 93c1 subal %d1,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4c014: b089 cmpl %a1,%d0
4c016: 6200 0098 bhiw 4c0b0 <_Heap_Free+0xc0>
4c01a: 2228 0024 movel %a0@(36),%d1
4c01e: b289 cmpl %a1,%d1
4c020: 6500 008e bcsw 4c0b0 <_Heap_Free+0xc0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c024: 2629 0004 movel %a1@(4),%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c028: 74fe moveq #-2,%d2
4c02a: c483 andl %d3,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c02c: 45f1 2800 lea %a1@(00000000,%d2:l),%a2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4c030: b5c0 cmpal %d0,%a2
4c032: 657c bcss 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
4c034: b5c1 cmpal %d1,%a2
4c036: 6278 bhis 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
4c038: 282a 0004 movel %a2@(4),%d4
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
4c03c: 0804 0000 btst #0,%d4
4c040: 676e beqs 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c042: 7afe moveq #-2,%d5
4c044: c885 andl %d5,%d4
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4c046: b5c1 cmpal %d1,%a2
4c048: 6700 00fa beqw 4c144 <_Heap_Free+0x154>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c04c: 7a01 moveq #1,%d5
4c04e: cab2 4804 andl %a2@(00000004,%d4:l),%d5
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4c052: 57c5 seq %d5
4c054: 4485 negl %d5
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4c056: 0803 0000 btst #0,%d3
4c05a: 665e bnes 4c0ba <_Heap_Free+0xca>
uintptr_t const prev_size = block->prev_size;
4c05c: 2611 movel %a1@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4c05e: 93c3 subal %d3,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4c060: b3c0 cmpal %d0,%a1
4c062: 654c bcss 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
4c064: b3c1 cmpal %d1,%a1
4c066: 6248 bhis 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4c068: 7001 moveq #1,%d0
4c06a: c0a9 0004 andl %a1@(4),%d0
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
4c06e: 6740 beqs 4c0b0 <_Heap_Free+0xc0> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4c070: 4a05 tstb %d5
4c072: 6700 00d6 beqw 4c14a <_Heap_Free+0x15a>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c076: 266a 0008 moveal %a2@(8),%a3
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4c07a: d882 addl %d2,%d4
4c07c: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c07e: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c080: 246a 000c moveal %a2@(12),%a2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4c084: 254b 0008 movel %a3,%a2@(8)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c088: 8083 orl %d3,%d0
next->prev = prev;
4c08a: 274a 000c movel %a2,%a3@(12)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4c08e: 53a8 0038 subql #1,%a0@(56)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4c092: 2383 3800 movel %d3,%a1@(00000000,%d3:l)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c096: 2340 0004 movel %d0,%a1@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c09a: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c09e: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c0a2: d5a8 0030 addl %d2,%a0@(48)
return( true );
4c0a6: 7001 moveq #1,%d0
}
4c0a8: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
4c0ac: 4e5e unlk %fp
4c0ae: 4e75 rts
4c0b0: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
4c0b4: 4200 clrb %d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c0b6: 4e5e unlk %fp
4c0b8: 4e75 rts
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4c0ba: 4a05 tstb %d5
4c0bc: 673a beqs 4c0f8 <_Heap_Free+0x108>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c0be: 266a 0008 moveal %a2@(8),%a3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
4c0c2: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c0c4: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c0c6: 246a 000c moveal %a2@(12),%a2
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4c0ca: 234b 0008 movel %a3,%a1@(8)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c0ce: 8084 orl %d4,%d0
new_block->prev = prev;
4c0d0: 234a 000c movel %a2,%a1@(12)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4c0d4: 2384 4800 movel %d4,%a1@(00000000,%d4:l)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c0d8: 2340 0004 movel %d0,%a1@(4)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4c0dc: 7001 moveq #1,%d0
next->prev = new_block;
prev->next = new_block;
4c0de: 2549 0008 movel %a1,%a2@(8)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
4c0e2: 2749 000c movel %a1,%a3@(12)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c0e6: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c0ea: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c0ee: d5a8 0030 addl %d2,%a0@(48)
4c0f2: 60b4 bras 4c0a8 <_Heap_Free+0xb8>
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
4c0f4: 7001 moveq #1,%d0
4c0f6: 60b0 bras 4c0a8 <_Heap_Free+0xb8>
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4c0f8: 2028 0038 movel %a0@(56),%d0
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4c0fc: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c0fe: 7afe moveq #-2,%d5
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4c100: 5280 addql #1,%d0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4c102: 2668 0008 moveal %a0@(8),%a3
new_block->next = next;
new_block->prev = block_before;
4c106: 2348 000c movel %a0,%a1@(12)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4c10a: 8282 orl %d2,%d1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4c10c: 234b 0008 movel %a3,%a1@(8)
4c110: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c114: cbaa 0004 andl %d5,%a2@(4)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
4c118: 2749 000c movel %a1,%a3@(12)
next_block->prev_size = block_size;
4c11c: 2482 movel %d2,%a2@
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4c11e: 2149 0008 movel %a1,%a0@(8)
/* Statistics */
++stats->free_blocks;
4c122: 2140 0038 movel %d0,%a0@(56)
if ( stats->max_free_blocks < stats->free_blocks ) {
4c126: b0a8 003c cmpl %a0@(60),%d0
4c12a: 6300 ff6e blsw 4c09a <_Heap_Free+0xaa>
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c12e: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c132: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c136: d5a8 0030 addl %d2,%a0@(48)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
4c13a: 2140 003c movel %d0,%a0@(60)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4c13e: 7001 moveq #1,%d0
4c140: 6000 ff66 braw 4c0a8 <_Heap_Free+0xb8>
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4c144: 4205 clrb %d5
4c146: 6000 ff0e braw 4c056 <_Heap_Free+0x66>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
4c14a: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c14c: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c14e: 7afe moveq #-2,%d5
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c150: 8283 orl %d3,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4c152: 2483 movel %d3,%a2@
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4c154: 7001 moveq #1,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c156: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4c15a: cbaa 0004 andl %d5,%a2@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c15e: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4c162: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
4c166: d5a8 0030 addl %d2,%a0@(48)
4c16a: 6000 ff3c braw 4c0a8 <_Heap_Free+0xb8>
...
0004cc68 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
4cc68: 4e56 fff0 linkw %fp,#-16
4cc6c: 48d7 041c moveml %d2-%d4/%a2,%sp@
4cc70: 246e 0008 moveal %fp@(8),%a2
4cc74: 282e 000c movel %fp@(12),%d4
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
4cc78: 2044 moveal %d4,%a0
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
4cc7a: 226a 0020 moveal %a2@(32),%a1
Heap_Block *const end = the_heap->last_block;
4cc7e: 242a 0024 movel %a2@(36),%d2
memset(the_info, 0, sizeof(*the_info));
4cc82: 4298 clrl %a0@+
4cc84: 4298 clrl %a0@+
4cc86: 4298 clrl %a0@+
4cc88: 4298 clrl %a0@+
4cc8a: 4298 clrl %a0@+
4cc8c: 4290 clrl %a0@
while ( the_block != end ) {
4cc8e: b489 cmpl %a1,%d2
4cc90: 6734 beqs 4ccc6 <_Heap_Get_information+0x5e> <== NEVER TAKEN
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
4cc92: 2604 movel %d4,%d3
4cc94: 0683 0000 000c addil #12,%d3
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
4cc9a: 2229 0004 movel %a1@(4),%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4cc9e: 70fe moveq #-2,%d0
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
4cca0: 2043 moveal %d3,%a0
4cca2: c081 andl %d1,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4cca4: d3c0 addal %d0,%a1
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
4cca6: 2229 0004 movel %a1@(4),%d1
while ( the_block != end ) {
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
4ccaa: 0801 0000 btst #0,%d1
4ccae: 6602 bnes 4ccb2 <_Heap_Get_information+0x4a>
info = &the_info->Used;
else
info = &the_info->Free;
4ccb0: 2044 moveal %d4,%a0
info->number++;
4ccb2: 5290 addql #1,%a0@
info->total += the_size;
4ccb4: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
4ccb8: b0a8 0004 cmpl %a0@(4),%d0
4ccbc: 6304 blss 4ccc2 <_Heap_Get_information+0x5a>
info->largest = the_size;
4ccbe: 2140 0004 movel %d0,%a0@(4)
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
4ccc2: b3c2 cmpal %d2,%a1
4ccc4: 66d8 bnes 4cc9e <_Heap_Get_information+0x36>
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
4ccc6: 4cd7 041c moveml %sp@,%d2-%d4/%a2
4ccca: 4e5e unlk %fp
...
0005bd7c <_Heap_Resize_block>:
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
5bd7c: 4e56 ffe4 linkw %fp,#-28
5bd80: 226e 0014 moveal %fp@(20),%a1
5bd84: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
5bd88: 242e 000c movel %fp@(12),%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5bd8c: 2202 movel %d2,%d1
5bd8e: 2042 moveal %d2,%a0
5bd90: 5188 subql #8,%a0
5bd92: 246e 0008 moveal %fp@(8),%a2
5bd96: 4c6a 1000 0010 remul %a2@(16),%d0,%d1
5bd9c: 266e 0018 moveal %fp@(24),%a3
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
5bda0: 91c0 subal %d0,%a0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
5bda2: 4291 clrl %a1@
void *alloc_begin_ptr,
uintptr_t new_alloc_size,
uintptr_t *old_size,
uintptr_t *new_size
)
{
5bda4: 202e 0010 movel %fp@(16),%d0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *const block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
*old_size = 0;
*new_size = 0;
5bda8: 4293 clrl %a3@
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5bdaa: b1ea 0020 cmpal %a2@(32),%a0
5bdae: 6500 0098 bcsw 5be48 <_Heap_Resize_block+0xcc>
5bdb2: b1ea 0024 cmpal %a2@(36),%a0
5bdb6: 6200 0090 bhiw 5be48 <_Heap_Resize_block+0xcc>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5bdba: 76fe moveq #-2,%d3
5bdbc: 78fe moveq #-2,%d4
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bdbe: 7a01 moveq #1,%d5
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
5bdc0: 7204 moveq #4,%d1
5bdc2: 9282 subl %d2,%d1
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5bdc4: c6a8 0004 andl %a0@(4),%d3
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t block_size = _Heap_Block_size( block );
uintptr_t block_end = block_begin + block_size;
5bdc8: 49f0 3800 lea %a0@(00000000,%d3:l),%a4
uintptr_t alloc_size = block_end - alloc_begin + HEAP_ALLOC_BONUS;
5bdcc: d28c addl %a4,%d1
5bdce: c8ac 0004 andl %a4@(4),%d4
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bdd2: cab4 4804 andl %a4@(00000004,%d4:l),%d5
bool next_block_is_free = _Heap_Is_free( next_block );;
_HAssert( _Heap_Is_block_in_heap( heap, next_block ) );
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
5bdd6: 2281 movel %d1,%a1@
RTEMS_INLINE_ROUTINE bool _Heap_Is_free(
const Heap_Block *block
)
{
return !_Heap_Is_used( block );
5bdd8: 4a85 tstl %d5
5bdda: 57c5 seq %d5
5bddc: 4485 negl %d5
if ( next_block_is_free ) {
5bdde: 4a05 tstb %d5
5bde0: 6672 bnes 5be54 <_Heap_Resize_block+0xd8> <== NEVER TAKEN
block_size += next_block_size;
alloc_size += next_block_size;
}
if ( new_alloc_size > alloc_size ) {
5bde2: b280 cmpl %d0,%d1
5bde4: 6576 bcss 5be5c <_Heap_Resize_block+0xe0>
return HEAP_RESIZE_UNSATISFIED;
}
if ( next_block_is_free ) {
5bde6: 4a05 tstb %d5
5bde8: 672a beqs 5be14 <_Heap_Resize_block+0x98>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bdea: 7201 moveq #1,%d1
5bdec: c2a8 0004 andl %a0@(4),%d1
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
5bdf0: 226c 0008 moveal %a4@(8),%a1
block->size_and_flag = size | flag;
5bdf4: 8283 orl %d3,%d1
5bdf6: 286c 000c moveal %a4@(12),%a4
5bdfa: 2141 0004 movel %d1,%a0@(4)
_Heap_Block_set_size( block, block_size );
_Heap_Free_list_remove( next_block );
next_block = _Heap_Block_at( block, block_size );
next_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
5bdfe: 7201 moveq #1,%d1
5be00: 83b0 3804 orl %d1,%a0@(00000004,%d3:l)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
5be04: 2949 0008 movel %a1,%a4@(8)
next->prev = prev;
5be08: 234c 000c movel %a4,%a1@(12)
/* Statistics */
--stats->free_blocks;
5be0c: 53aa 0038 subql #1,%a2@(56)
stats->free_size -= next_block_size;
5be10: 99aa 0030 subl %d4,%a2@(48)
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
5be14: 2f00 movel %d0,%sp@-
5be16: 2f02 movel %d2,%sp@-
5be18: 2f08 movel %a0,%sp@-
5be1a: 2f0a movel %a2,%sp@-
5be1c: 4eb9 0004 79ae jsr 479ae <_Heap_Block_allocate>
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
/* Statistics */
++stats->resizes;
5be22: 4fef 0010 lea %sp@(16),%sp
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5be26: 72fe moveq #-2,%d1
/* Statistics */
--stats->free_blocks;
stats->free_size -= next_block_size;
}
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
5be28: 2040 moveal %d0,%a0
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
5be2a: 2240 moveal %d0,%a1
5be2c: 93c2 subal %d2,%a1
/* Statistics */
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
5be2e: 4280 clrl %d0
5be30: c2a8 0004 andl %a0@(4),%d1
block = _Heap_Block_allocate( heap, block, alloc_begin, new_alloc_size );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
*new_size = (uintptr_t) next_block - alloc_begin + HEAP_ALLOC_BONUS;
5be34: 43f1 1804 lea %a1@(00000004,%d1:l),%a1
5be38: 2689 movel %a1,%a3@
/* Statistics */
++stats->resizes;
5be3a: 52aa 0054 addql #1,%a2@(84)
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
5be3e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5be44: 4e5e unlk %fp
5be46: 4e75 rts
new_alloc_size,
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
5be48: 7002 moveq #2,%d0
}
5be4a: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5be50: 4e5e unlk %fp
5be52: 4e75 rts
_HAssert( _Heap_Is_prev_used( next_block ) );
*old_size = alloc_size;
if ( next_block_is_free ) {
block_size += next_block_size;
5be54: d684 addl %d4,%d3
alloc_size += next_block_size;
5be56: d284 addl %d4,%d1
}
if ( new_alloc_size > alloc_size ) {
5be58: b280 cmpl %d0,%d1
5be5a: 648a bccs 5bde6 <_Heap_Resize_block+0x6a> <== NEVER TAKEN
return HEAP_RESIZE_UNSATISFIED;
5be5c: 7001 moveq #1,%d0
old_size,
new_size
);
}
return HEAP_RESIZE_FATAL_ERROR;
}
5be5e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
5be64: 4e5e unlk %fp <== NOT EXECUTED
0005be68 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5be68: 4e56 0000 linkw %fp,#0
5be6c: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5be70: 2040 moveal %d0,%a0
5be72: 5188 subql #8,%a0
5be74: 226e 0008 moveal %fp@(8),%a1
5be78: 2f02 movel %d2,%sp@-
5be7a: 2400 movel %d0,%d2
5be7c: 4c69 2001 0010 remul %a1@(16),%d1,%d2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
5be82: 91c1 subal %d1,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
5be84: 2229 0020 movel %a1@(32),%d1
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5be88: b288 cmpl %a0,%d1
5be8a: 6236 bhis 5bec2 <_Heap_Size_of_alloc_area+0x5a>
5be8c: 2269 0024 moveal %a1@(36),%a1
5be90: b3c8 cmpal %a0,%a1
5be92: 652e bcss 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5be94: 74fe moveq #-2,%d2
5be96: c4a8 0004 andl %a0@(4),%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5be9a: d1c2 addal %d2,%a0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5be9c: b1c1 cmpal %d1,%a0
5be9e: 6522 bcss 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
5bea0: b1c9 cmpal %a1,%a0
5bea2: 621e bhis 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5bea4: 7201 moveq #1,%d1
5bea6: c2a8 0004 andl %a0@(4),%d1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
5beaa: 6716 beqs 5bec2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5beac: 7204 moveq #4,%d1
5beae: 9280 subl %d0,%d1
5beb0: 2001 movel %d1,%d0
5beb2: d088 addl %a0,%d0
5beb4: 226e 0010 moveal %fp@(16),%a1
return true;
}
5beb8: 241f movel %sp@+,%d2
5beba: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
5bebc: 2280 movel %d0,%a1@
return true;
5bebe: 7001 moveq #1,%d0
}
5bec0: 4e75 rts
5bec2: 241f movel %sp@+,%d2
5bec4: 4e5e unlk %fp
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
5bec6: 4200 clrb %d0
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
return true;
}
...
00048516 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48516: 4e56 ffc4 linkw %fp,#-60
4851a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4851e: 246e 0008 moveal %fp@(8),%a2
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
48522: 4bfa ff94 lea %pc@(484b8 <_Heap_Walk_print_nothing>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48526: 2a2e 000c movel %fp@(12),%d5
uintptr_t const page_size = heap->page_size;
4852a: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
4852e: 2c2a 0014 movel %a2@(20),%d6
Heap_Block *const first_block = heap->first_block;
48532: 282a 0020 movel %a2@(32),%d4
Heap_Block *const last_block = heap->last_block;
48536: 2e2a 0024 movel %a2@(36),%d7
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
4853a: 4a2e 0013 tstb %fp@(19)
4853e: 6704 beqs 48544 <_Heap_Walk+0x2e>
48540: 4bfa ff7e lea %pc@(484c0 <_Heap_Walk_print>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
48544: 7003 moveq #3,%d0
48546: b0b9 0006 1ab8 cmpl 61ab8 <_System_state_Current>,%d0
4854c: 670c beqs 4855a <_Heap_Walk+0x44>
block = next_block;
} while ( block != first_block );
return true;
}
4854e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
}
block = next_block;
} while ( block != first_block );
return true;
48554: 7001 moveq #1,%d0
}
48556: 4e5e unlk %fp
48558: 4e75 rts
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
4855a: 2f2a 000c movel %a2@(12),%sp@-
4855e: 2f2a 0008 movel %a2@(8),%sp@-
48562: 2f07 movel %d7,%sp@-
48564: 2f04 movel %d4,%sp@-
48566: 2f2a 001c movel %a2@(28),%sp@-
4856a: 2f2a 0018 movel %a2@(24),%sp@-
4856e: 2f06 movel %d6,%sp@-
48570: 2f03 movel %d3,%sp@-
48572: 4879 0005 df85 pea 5df85 <_Status_Object_name_errors_to_status+0x5d>
48578: 42a7 clrl %sp@-
4857a: 2f05 movel %d5,%sp@-
4857c: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
4857e: 4fef 002c lea %sp@(44),%sp
48582: 4a83 tstl %d3
48584: 6700 0082 beqw 48608 <_Heap_Walk+0xf2>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
48588: 7003 moveq #3,%d0
4858a: c083 andl %d3,%d0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
4858c: 6600 0090 bnew 4861e <_Heap_Walk+0x108>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
48590: 2206 movel %d6,%d1
48592: 4c43 1000 remul %d3,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
48596: 4a80 tstl %d0
48598: 6600 00a4 bnew 4863e <_Heap_Walk+0x128>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4859c: 2004 movel %d4,%d0
4859e: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
485a0: 4c43 0001 remul %d3,%d1,%d0
);
return false;
}
if (
485a4: 4a81 tstl %d1
485a6: 6600 00ae bnew 48656 <_Heap_Walk+0x140>
block = next_block;
} while ( block != first_block );
return true;
}
485aa: 2044 moveal %d4,%a0
485ac: 2228 0004 movel %a0@(4),%d1
485b0: 2d41 ffec movel %d1,%fp@(-20)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
485b4: 0801 0000 btst #0,%d1
485b8: 6700 0188 beqw 48742 <_Heap_Walk+0x22c>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
485bc: 2047 moveal %d7,%a0
485be: 72fe moveq #-2,%d1
485c0: c2a8 0004 andl %a0@(4),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
485c4: d1c1 addal %d1,%a0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
485c6: 7201 moveq #1,%d1
485c8: c2a8 0004 andl %a0@(4),%d1
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
485cc: 6724 beqs 485f2 <_Heap_Walk+0xdc>
);
return false;
}
if (
485ce: b1c4 cmpal %d4,%a0
485d0: 6700 009c beqw 4866e <_Heap_Walk+0x158>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
485d4: 4879 0005 e0df pea 5e0df <_Status_Object_name_errors_to_status+0x1b7>
485da: 4878 0001 pea 1 <ADD>
485de: 2f05 movel %d5,%sp@-
485e0: 4e95 jsr %a5@
485e2: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
485e6: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
485e8: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
485ee: 4e5e unlk %fp
485f0: 4e75 rts
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
485f2: 4879 0005 e0ca pea 5e0ca <_Status_Object_name_errors_to_status+0x1a2>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
485f8: 4878 0001 pea 1 <ADD>
485fc: 2f05 movel %d5,%sp@-
485fe: 4e95 jsr %a5@
48600: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48604: 4200 clrb %d0
48606: 60e0 bras 485e8 <_Heap_Walk+0xd2>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
48608: 4879 0005 e016 pea 5e016 <_Status_Object_name_errors_to_status+0xee>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
4860e: 4878 0001 pea 1 <ADD>
48612: 2f05 movel %d5,%sp@-
48614: 4e95 jsr %a5@
48616: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
4861a: 4200 clrb %d0
4861c: 60ca bras 485e8 <_Heap_Walk+0xd2>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
4861e: 2f03 movel %d3,%sp@-
48620: 4879 0005 e029 pea 5e029 <_Status_Object_name_errors_to_status+0x101>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48626: 4878 0001 pea 1 <ADD>
4862a: 2f05 movel %d5,%sp@-
4862c: 4e95 jsr %a5@
4862e: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48632: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48634: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
4863a: 4e5e unlk %fp
4863c: 4e75 rts
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
4863e: 2f06 movel %d6,%sp@-
48640: 4879 0005 e047 pea 5e047 <_Status_Object_name_errors_to_status+0x11f>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48646: 4878 0001 pea 1 <ADD>
4864a: 2f05 movel %d5,%sp@-
4864c: 4e95 jsr %a5@
4864e: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48652: 4200 clrb %d0
48654: 60de bras 48634 <_Heap_Walk+0x11e>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
48656: 2f04 movel %d4,%sp@-
48658: 4879 0005 e06b pea 5e06b <_Status_Object_name_errors_to_status+0x143>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4865e: 4878 0001 pea 1 <ADD>
48662: 2f05 movel %d5,%sp@-
48664: 4e95 jsr %a5@
48666: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4866a: 4200 clrb %d0
4866c: 60c6 bras 48634 <_Heap_Walk+0x11e>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
4866e: 202a 0010 movel %a2@(16),%d0
block = next_block;
} while ( block != first_block );
return true;
}
48672: 226a 0008 moveal %a2@(8),%a1
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
48676: 2d40 fffc movel %d0,%fp@(-4)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
4867a: b3ca cmpal %a2,%a1
4867c: 6700 034e beqw 489cc <_Heap_Walk+0x4b6>
block = next_block;
} while ( block != first_block );
return true;
}
48680: 242a 0020 movel %a2@(32),%d2
48684: 2d42 fff4 movel %d2,%fp@(-12)
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
48688: b3c2 cmpal %d2,%a1
4868a: 6500 009a bcsw 48726 <_Heap_Walk+0x210>
4868e: 286a 0024 moveal %a2@(36),%a4
48692: b3cc cmpal %a4,%a1
48694: 6200 0090 bhiw 48726 <_Heap_Walk+0x210>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
48698: 47e9 0008 lea %a1@(8),%a3
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
4869c: 200b movel %a3,%d0
4869e: 222e fffc movel %fp@(-4),%d1
486a2: 4c41 0002 remul %d1,%d2,%d0
);
return false;
}
if (
486a6: 4a82 tstl %d2
486a8: 6600 00b0 bnew 4875a <_Heap_Walk+0x244>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
486ac: 74fe moveq #-2,%d2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
486ae: 7001 moveq #1,%d0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
486b0: c4a9 0004 andl %a1@(4),%d2
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
486b4: c0b1 2804 andl %a1@(00000004,%d2:l),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
486b8: 6600 0304 bnew 489be <_Heap_Walk+0x4a8>
486bc: 222e fff4 movel %fp@(-12),%d1
486c0: 240a movel %a2,%d2
486c2: 266e ffec moveal %fp@(-20),%a3
486c6: 2d43 fff8 movel %d3,%fp@(-8)
486ca: 2d44 fff0 movel %d4,%fp@(-16)
);
return false;
}
if ( free_block->prev != prev_block ) {
486ce: 2069 000c moveal %a1@(12),%a0
486d2: b488 cmpl %a0,%d2
486d4: 6600 02cc bnew 489a2 <_Heap_Walk+0x48c>
return false;
}
prev_block = free_block;
free_block = free_block->next;
486d8: 2069 0008 moveal %a1@(8),%a0
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
486dc: b1ca cmpal %a2,%a0
486de: 6700 0096 beqw 48776 <_Heap_Walk+0x260>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
486e2: b1c1 cmpal %d1,%a0
486e4: 6542 bcss 48728 <_Heap_Walk+0x212>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
486e6: 2608 movel %a0,%d3
486e8: 5083 addql #8,%d3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
486ea: b9c8 cmpal %a0,%a4
486ec: 653a bcss 48728 <_Heap_Walk+0x212> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
486ee: 282e fffc movel %fp@(-4),%d4
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
486f2: 2409 movel %a1,%d2
486f4: 2248 moveal %a0,%a1
486f6: 4c44 3000 remul %d4,%d0,%d3
);
return false;
}
if (
486fa: 4a80 tstl %d0
486fc: 665e bnes 4875c <_Heap_Walk+0x246>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
486fe: 70fe moveq #-2,%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
48700: 7601 moveq #1,%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48702: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
48706: c6b0 0804 andl %a0@(00000004,%d0:l),%d3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4870a: 67c2 beqs 486ce <_Heap_Walk+0x1b8>
(*printer)(
4870c: 2f08 movel %a0,%sp@-
4870e: 4879 0005 e15e pea 5e15e <_Status_Object_name_errors_to_status+0x236>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48714: 4878 0001 pea 1 <ADD>
48718: 2f05 movel %d5,%sp@-
4871a: 4e95 jsr %a5@
4871c: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48720: 4200 clrb %d0
48722: 6000 ff10 braw 48634 <_Heap_Walk+0x11e>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
48726: 2049 moveal %a1,%a0 <== NOT EXECUTED
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
48728: 2f08 movel %a0,%sp@-
4872a: 4879 0005 e10e pea 5e10e <_Status_Object_name_errors_to_status+0x1e6>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48730: 4878 0001 pea 1 <ADD>
48734: 2f05 movel %d5,%sp@-
48736: 4e95 jsr %a5@
48738: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4873c: 4200 clrb %d0
4873e: 6000 fef4 braw 48634 <_Heap_Walk+0x11e>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48742: 4879 0005 e09c pea 5e09c <_Status_Object_name_errors_to_status+0x174>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
48748: 4878 0001 pea 1 <ADD>
4874c: 2f05 movel %d5,%sp@-
4874e: 4e95 jsr %a5@
48750: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48754: 4200 clrb %d0
48756: 6000 fe90 braw 485e8 <_Heap_Walk+0xd2>
);
return false;
}
if (
4875a: 2049 moveal %a1,%a0 <== NOT EXECUTED
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
4875c: 2f08 movel %a0,%sp@-
4875e: 4879 0005 e12e pea 5e12e <_Status_Object_name_errors_to_status+0x206>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48764: 4878 0001 pea 1 <ADD>
48768: 2f05 movel %d5,%sp@-
4876a: 4e95 jsr %a5@
4876c: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48770: 4200 clrb %d0
48772: 6000 fec0 braw 48634 <_Heap_Walk+0x11e>
48776: 262e fff8 movel %fp@(-8),%d3
4877a: 282e fff0 movel %fp@(-16),%d4
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4877e: 2844 moveal %d4,%a4
48780: 2d41 fff4 movel %d1,%fp@(-12)
48784: 222e fff4 movel %fp@(-12),%d1
48788: 2d4b ffec movel %a3,%fp@(-20)
4878c: 2d43 fffc movel %d3,%fp@(-4)
48790: 262e ffec movel %fp@(-20),%d3
48794: 2d47 fff0 movel %d7,%fp@(-16)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48798: 74fe moveq #-2,%d2
4879a: c483 andl %d3,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4879c: 47f4 2800 lea %a4@(00000000,%d2:l),%a3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
487a0: b7c1 cmpal %d1,%a3
487a2: 657e bcss 48822 <_Heap_Walk+0x30c> <== NEVER TAKEN
487a4: b7ea 0024 cmpal %a2@(36),%a3
487a8: 6278 bhis 48822 <_Heap_Walk+0x30c> <== NEVER TAKEN
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
487aa: b9ee fff0 cmpal %fp@(-16),%a4
487ae: 56c7 sne %d7
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
487b0: 222e fffc movel %fp@(-4),%d1
487b4: 2002 movel %d2,%d0
487b6: 3247 moveaw %d7,%a1
487b8: 4c41 0007 remul %d1,%d7,%d0
487bc: 2009 movel %a1,%d0
487be: 4480 negl %d0
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
487c0: 4a87 tstl %d7
487c2: 6704 beqs 487c8 <_Heap_Walk+0x2b2>
487c4: 4a00 tstb %d0
487c6: 667c bnes 48844 <_Heap_Walk+0x32e> <== NEVER TAKEN
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
487c8: b486 cmpl %d6,%d2
487ca: 6406 bccs 487d2 <_Heap_Walk+0x2bc>
487cc: 4a00 tstb %d0
487ce: 6600 008e bnew 4885e <_Heap_Walk+0x348>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
487d2: b7cc cmpal %a4,%a3
487d4: 6206 bhis 487dc <_Heap_Walk+0x2c6>
487d6: 4a00 tstb %d0
487d8: 6600 00a8 bnew 48882 <_Heap_Walk+0x36c>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
487dc: 7001 moveq #1,%d0
487de: 7201 moveq #1,%d1
487e0: c0ab 0004 andl %a3@(4),%d0
487e4: c681 andl %d1,%d3
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
487e6: 4a80 tstl %d0
487e8: 6700 00cc beqw 488b6 <_Heap_Walk+0x3a0>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
487ec: 4a83 tstl %d3
487ee: 6700 00ac beqw 4889c <_Heap_Walk+0x386>
(*printer)(
487f2: 2f02 movel %d2,%sp@-
487f4: 2f0c movel %a4,%sp@-
487f6: 4879 0005 e303 pea 5e303 <_Status_Object_name_errors_to_status+0x3db>
487fc: 42a7 clrl %sp@-
487fe: 2f05 movel %d5,%sp@-
48800: 4e95 jsr %a5@
48802: 4fef 0014 lea %sp@(20),%sp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
48806: b7c4 cmpal %d4,%a3
48808: 6700 fd44 beqw 4854e <_Heap_Walk+0x38>
4880c: 262b 0004 movel %a3@(4),%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48810: 74fe moveq #-2,%d2
48812: 284b moveal %a3,%a4
48814: c483 andl %d3,%d2
48816: 222a 0020 movel %a2@(32),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4881a: 47f4 2800 lea %a4@(00000000,%d2:l),%a3
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4881e: b7c1 cmpal %d1,%a3
48820: 6482 bccs 487a4 <_Heap_Walk+0x28e> <== ALWAYS TAKEN
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
48822: 2f0b movel %a3,%sp@-
48824: 2f0c movel %a4,%sp@-
48826: 4879 0005 e1ac pea 5e1ac <_Status_Object_name_errors_to_status+0x284>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
4882c: 4878 0001 pea 1 <ADD>
48830: 2f05 movel %d5,%sp@-
48832: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48834: 4fef 0014 lea %sp@(20),%sp
48838: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4883a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
48840: 4e5e unlk %fp
48842: 4e75 rts
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
48844: 2f02 movel %d2,%sp@-
48846: 2f0c movel %a4,%sp@-
48848: 4879 0005 e1d9 pea 5e1d9 <_Status_Object_name_errors_to_status+0x2b1>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
4884e: 4878 0001 pea 1 <ADD>
48852: 2f05 movel %d5,%sp@-
48854: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48856: 4fef 0014 lea %sp@(20),%sp
4885a: 4200 clrb %d0
4885c: 60dc bras 4883a <_Heap_Walk+0x324>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
4885e: 2f06 movel %d6,%sp@-
48860: 2f02 movel %d2,%sp@-
48862: 2f0c movel %a4,%sp@-
48864: 4879 0005 e207 pea 5e207 <_Status_Object_name_errors_to_status+0x2df>
4886a: 4878 0001 pea 1 <ADD>
4886e: 2f05 movel %d5,%sp@-
48870: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
48872: 4fef 0018 lea %sp@(24),%sp
block = next_block;
} while ( block != first_block );
return true;
}
48876: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
block,
block_size,
min_block_size
);
return false;
4887c: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4887e: 4e5e unlk %fp
48880: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
48882: 2f0b movel %a3,%sp@-
48884: 2f0c movel %a4,%sp@-
48886: 4879 0005 e232 pea 5e232 <_Status_Object_name_errors_to_status+0x30a>
4888c: 4878 0001 pea 1 <ADD>
48890: 2f05 movel %d5,%sp@-
48892: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48894: 4fef 0014 lea %sp@(20),%sp
48898: 4200 clrb %d0
4889a: 609e bras 4883a <_Heap_Walk+0x324>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
4889c: 2f14 movel %a4@,%sp@-
4889e: 2f02 movel %d2,%sp@-
488a0: 2f0c movel %a4,%sp@-
488a2: 4879 0005 e31a pea 5e31a <_Status_Object_name_errors_to_status+0x3f2>
488a8: 42a7 clrl %sp@-
488aa: 2f05 movel %d5,%sp@-
488ac: 4e95 jsr %a5@
488ae: 4fef 0018 lea %sp@(24),%sp
488b2: 6000 ff52 braw 48806 <_Heap_Walk+0x2f0>
block = next_block;
} while ( block != first_block );
return true;
}
488b6: 2e2a 0008 movel %a2@(8),%d7
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488ba: 43f9 0005 df52 lea 5df52 <_Status_Object_name_errors_to_status+0x2a>,%a1
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
488c0: 222c 0008 movel %a4@(8),%d1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488c4: b2aa 000c cmpl %a2@(12),%d1
488c8: 670a beqs 488d4 <_Heap_Walk+0x3be>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
488ca: 43f9 0005 de9e lea 5de9e <rtems_filesystem_default_pathconf+0xb4>,%a1
488d0: b28a cmpl %a2,%d1
488d2: 6764 beqs 48938 <_Heap_Walk+0x422>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
488d4: 202c 000c movel %a4@(12),%d0
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488d8: 41f9 0005 df6b lea 5df6b <_Status_Object_name_errors_to_status+0x43>,%a0
488de: b087 cmpl %d7,%d0
488e0: 670a beqs 488ec <_Heap_Walk+0x3d6>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
488e2: 41f9 0005 de9e lea 5de9e <rtems_filesystem_default_pathconf+0xb4>,%a0
488e8: b08a cmpl %a2,%d0
488ea: 6754 beqs 48940 <_Heap_Walk+0x42a>
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
488ec: 2f09 movel %a1,%sp@-
488ee: 2f01 movel %d1,%sp@-
488f0: 2f08 movel %a0,%sp@-
488f2: 2f00 movel %d0,%sp@-
488f4: 2f02 movel %d2,%sp@-
488f6: 2f0c movel %a4,%sp@-
488f8: 4879 0005 e266 pea 5e266 <_Status_Object_name_errors_to_status+0x33e>
488fe: 42a7 clrl %sp@-
48900: 2f05 movel %d5,%sp@-
48902: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
48904: 2213 movel %a3@,%d1
48906: 4fef 0024 lea %sp@(36),%sp
4890a: b282 cmpl %d2,%d1
4890c: 663a bnes 48948 <_Heap_Walk+0x432>
);
return false;
}
if ( !prev_used ) {
4890e: 4a83 tstl %d3
48910: 6776 beqs 48988 <_Heap_Walk+0x472>
block = next_block;
} while ( block != first_block );
return true;
}
48912: 206a 0008 moveal %a2@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
48916: b1ca cmpal %a2,%a0
48918: 6754 beqs 4896e <_Heap_Walk+0x458> <== NEVER TAKEN
if ( free_block == block ) {
4891a: b1cc cmpal %a4,%a0
4891c: 6700 fee8 beqw 48806 <_Heap_Walk+0x2f0>
48920: 2e2e fff0 movel %fp@(-16),%d7
return true;
}
free_block = free_block->next;
48924: 2068 0008 moveal %a0@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
48928: b1ca cmpal %a2,%a0
4892a: 6742 beqs 4896e <_Heap_Walk+0x458>
if ( free_block == block ) {
4892c: b1cc cmpal %a4,%a0
4892e: 66f4 bnes 48924 <_Heap_Walk+0x40e>
48930: 2d47 fff0 movel %d7,%fp@(-16)
48934: 6000 fed0 braw 48806 <_Heap_Walk+0x2f0>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
48938: 43f9 0005 df61 lea 5df61 <_Status_Object_name_errors_to_status+0x39>,%a1
4893e: 6094 bras 488d4 <_Heap_Walk+0x3be>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
48940: 41f9 0005 df7b lea 5df7b <_Status_Object_name_errors_to_status+0x53>,%a0
48946: 60a4 bras 488ec <_Heap_Walk+0x3d6>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
48948: 2f0b movel %a3,%sp@-
4894a: 2f01 movel %d1,%sp@-
4894c: 2f02 movel %d2,%sp@-
4894e: 2f0c movel %a4,%sp@-
48950: 4879 0005 e29b pea 5e29b <_Status_Object_name_errors_to_status+0x373>
48956: 4878 0001 pea 1 <ADD>
4895a: 2f05 movel %d5,%sp@-
4895c: 4e95 jsr %a5@
4895e: 4fef 001c lea %sp@(28),%sp
block = next_block;
} while ( block != first_block );
return true;
}
48962: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48968: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
4896a: 4e5e unlk %fp
4896c: 4e75 rts
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4896e: 2f0c movel %a4,%sp@-
48970: 4879 0005 e33f pea 5e33f <_Status_Object_name_errors_to_status+0x417>
48976: 4878 0001 pea 1 <ADD>
4897a: 2f05 movel %d5,%sp@-
4897c: 4e95 jsr %a5@
4897e: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48982: 4200 clrb %d0
48984: 6000 fcae braw 48634 <_Heap_Walk+0x11e>
return false;
}
if ( !prev_used ) {
(*printer)(
48988: 2f0c movel %a4,%sp@-
4898a: 4879 0005 e2d4 pea 5e2d4 <_Status_Object_name_errors_to_status+0x3ac>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48990: 4878 0001 pea 1 <ADD>
48994: 2f05 movel %d5,%sp@-
48996: 4e95 jsr %a5@
48998: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4899c: 4200 clrb %d0
4899e: 6000 fc94 braw 48634 <_Heap_Walk+0x11e>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
489a2: 2f08 movel %a0,%sp@-
489a4: 2f09 movel %a1,%sp@-
489a6: 4879 0005 e17a pea 5e17a <_Status_Object_name_errors_to_status+0x252>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
489ac: 4878 0001 pea 1 <ADD>
489b0: 2f05 movel %d5,%sp@-
489b2: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
489b4: 4fef 0014 lea %sp@(20),%sp
489b8: 4200 clrb %d0
489ba: 6000 fe7e braw 4883a <_Heap_Walk+0x324>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
489be: 2049 moveal %a1,%a0 <== NOT EXECUTED
(*printer)(
489c0: 2f08 movel %a0,%sp@- <== NOT EXECUTED
489c2: 4879 0005 e15e pea 5e15e <_Status_Object_name_errors_to_status+0x236><== NOT EXECUTED
489c8: 6000 fd4a braw 48714 <_Heap_Walk+0x1fe> <== NOT EXECUTED
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
489cc: 222a 0020 movel %a2@(32),%d1
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
489d0: 2844 moveal %d4,%a4
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
489d2: 2d41 fff4 movel %d1,%fp@(-12)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
489d6: 222e fff4 movel %fp@(-12),%d1
489da: 2d43 fffc movel %d3,%fp@(-4)
489de: 262e ffec movel %fp@(-20),%d3
489e2: 2d47 fff0 movel %d7,%fp@(-16)
489e6: 6000 fdb0 braw 48798 <_Heap_Walk+0x282>
...
00046f62 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
46f62: 4e56 0000 linkw %fp,#0
46f66: 2f0a movel %a2,%sp@-
46f68: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46f6a: 4ab9 0005 f654 tstl 5f654 <_IO_Number_of_drivers>
46f70: 671e beqs 46f90 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
46f72: 4282 clrl %d2
46f74: 45f9 0004 bc18 lea 4bc18 <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
46f7a: 42a7 clrl %sp@-
46f7c: 42a7 clrl %sp@-
46f7e: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46f80: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
46f82: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46f84: 4fef 000c lea %sp@(12),%sp
46f88: b4b9 0005 f654 cmpl 5f654 <_IO_Number_of_drivers>,%d2
46f8e: 65ea bcss 46f7a <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
46f90: 242e fff8 movel %fp@(-8),%d2
46f94: 246e fffc moveal %fp@(-4),%a2
46f98: 4e5e unlk %fp <== NOT EXECUTED
00046ec8 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
46ec8: 4e56 fff0 linkw %fp,#-16
46ecc: 48d7 003c moveml %d2-%d5,%sp@
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
46ed0: 2639 0005 dc16 movel 5dc16 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
46ed6: 2439 0005 dc12 movel 5dc12 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
46edc: 2839 0005 dc0e movel 5dc0e <Configuration+0x2a>,%d4
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
46ee2: b882 cmpl %d2,%d4
46ee4: 6366 blss 46f4c <_IO_Manager_initialization+0x84>
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
46ee6: 2004 movel %d4,%d0
46ee8: 2a04 movel %d4,%d5
46eea: e788 lsll #3,%d0
46eec: eb8d lsll #5,%d5
46eee: 9a80 subl %d0,%d5
46ef0: 2f05 movel %d5,%sp@-
46ef2: 4eb9 0004 9e38 jsr 49e38 <_Workspace_Allocate_or_fatal_error>
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46ef8: 2f05 movel %d5,%sp@-
46efa: 42a7 clrl %sp@-
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
46efc: 23c0 0005 f658 movel %d0,5f658 <_IO_Driver_address_table>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46f02: 2f00 movel %d0,%sp@-
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
46f04: 23c4 0005 f654 movel %d4,5f654 <_IO_Number_of_drivers>
memset(
46f0a: 4eb9 0004 e3f4 jsr 4e3f4 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f10: 4fef 0010 lea %sp@(16),%sp
46f14: 4a82 tstl %d2
46f16: 672a beqs 46f42 <_IO_Manager_initialization+0x7a><== NEVER TAKEN
46f18: 2839 0005 f658 movel 5f658 <_IO_Driver_address_table>,%d4
46f1e: 4280 clrl %d0
46f20: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
46f22: 2243 moveal %d3,%a1
46f24: 2044 moveal %d4,%a0
46f26: d3c0 addal %d0,%a1
46f28: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f2a: 5281 addql #1,%d1
46f2c: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46f32: 20d9 movel %a1@+,%a0@+
46f34: 20d9 movel %a1@+,%a0@+
46f36: 20d9 movel %a1@+,%a0@+
46f38: 20d9 movel %a1@+,%a0@+
46f3a: 20d9 movel %a1@+,%a0@+
46f3c: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f3e: b282 cmpl %d2,%d1
46f40: 65e0 bcss 46f22 <_IO_Manager_initialization+0x5a>
_IO_Driver_address_table[index] = driver_table[index];
}
46f42: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
46f48: 4e5e unlk %fp
46f4a: 4e75 rts
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
46f4c: 23c3 0005 f658 movel %d3,5f658 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
46f52: 23c2 0005 f654 movel %d2,5f654 <_IO_Number_of_drivers>
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
46f58: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
46f5e: 4e5e unlk %fp <== NOT EXECUTED
00047ac4 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ac4: 4e56 fffc linkw %fp,#-4
47ac8: 206e 0010 moveal %fp@(16),%a0
47acc: 2f02 movel %d2,%sp@-
47ace: 222e 000c movel %fp@(12),%d1
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ad2: 4282 clrl %d2
47ad4: 1401 moveb %d1,%d2
47ad6: 2242 moveal %d2,%a1
47ad8: 2f08 movel %a0,%sp@-
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ada: 202e 0008 movel %fp@(8),%d0
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ade: 2f09 movel %a1,%sp@-
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
47ae0: 13c1 0005 f4e2 moveb %d1,5f4e2 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ae6: 2d48 fffc movel %a0,%fp@(-4)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
47aea: 23c0 0005 f4de movel %d0,5f4de <_Internal_errors_What_happened>
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
47af0: 23c8 0005 f4e4 movel %a0,5f4e4 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
47af6: 2f00 movel %d0,%sp@-
47af8: 4eb9 0004 99b6 jsr 499b6 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47afe: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED
47b02: 327c 0700 moveaw #1792,%a1 <== NOT EXECUTED
47b06: 2409 movel %a1,%d2 <== NOT EXECUTED
47b08: 40c0 movew %sr,%d0 <== NOT EXECUTED
47b0a: 8082 orl %d2,%d0 <== NOT EXECUTED
47b0c: 46c0 movew %d0,%sr <== NOT EXECUTED
47b0e: 2008 movel %a0,%d0 <== NOT EXECUTED
47b10: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED
47b16: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47b18: 7005 moveq #5,%d0 <== NOT EXECUTED
47b1a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
47b1e: 23c0 0005 f590 movel %d0,5f590 <_System_state_Current> <== NOT EXECUTED
47b24: 60fe bras 47b24 <_Internal_error_Occurred+0x60> <== NOT EXECUTED
...
00047b88 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47b88: 4e56 fff0 linkw %fp,#-16
47b8c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
47b90: 246e 0008 moveal %fp@(8),%a2
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
47b94: 4aaa 0014 tstl %a2@(20)
47b98: 660c bnes 47ba6 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN
return NULL;
47b9a: 4280 clrl %d0 <== NOT EXECUTED
);
}
#endif
return the_object;
}
47b9c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47ba2: 4e5e unlk %fp
47ba4: 4e75 rts
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47ba6: 240a movel %a2,%d2
47ba8: 0682 0000 001c addil #28,%d2
47bae: 47f9 0004 71e4 lea 471e4 <_Chain_Get>,%a3
47bb4: 2f02 movel %d2,%sp@-
47bb6: 4e93 jsr %a3@
if ( information->auto_extend ) {
47bb8: 588f addql #4,%sp
47bba: 4a2a 0010 tstb %a2@(16)
47bbe: 67dc beqs 47b9c <_Objects_Allocate+0x14>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47bc0: 4a80 tstl %d0
47bc2: 6738 beqs 47bfc <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bc4: 2040 moveal %d0,%a0
47bc6: 4281 clrl %d1
47bc8: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47bca: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bcc: 362a 0008 movew %a2@(8),%d3
47bd0: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47bd4: 342a 0012 movew %a2@(18),%d2
information->inactive_per_block[ block ]--;
47bd8: 206a 002a moveal %a2@(42),%a0
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bdc: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47bde: 4c42 1001 remul %d2,%d1,%d1
information->inactive_per_block[ block ]--;
information->inactive--;
47be2: 326a 0028 moveaw %a2@(40),%a1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47be6: e589 lsll #2,%d1
information->inactive--;
47be8: 5389 subql #1,%a1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bea: d1c1 addal %d1,%a0
47bec: 5390 subql #1,%a0@
information->inactive--;
47bee: 3549 0028 movew %a1,%a2@(40)
);
}
#endif
return the_object;
}
47bf2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47bf8: 4e5e unlk %fp
47bfa: 4e75 rts
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
47bfc: 2f0a movel %a2,%sp@-
47bfe: 4eb9 0004 7c44 jsr 47c44 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47c04: 2f02 movel %d2,%sp@-
47c06: 4e93 jsr %a3@
}
if ( the_object ) {
47c08: 508f addql #8,%sp
47c0a: 4a80 tstl %d0
47c0c: 66b6 bnes 47bc4 <_Objects_Allocate+0x3c>
);
}
#endif
return the_object;
}
47c0e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47c14: 4e5e unlk %fp <== NOT EXECUTED
00047c18 <_Objects_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
47c18: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
47c1a: 4e56 0000 linkw %fp,#0
47c1e: 226e 000c moveal %fp@(12),%a1
47c22: 206e 0008 moveal %fp@(8),%a0
47c26: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47c28: 2468 0018 moveal %a0@(24),%a2
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
47c2c: 3029 000a movew %a1@(10),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47c30: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
}
47c34: 245f moveal %sp@+,%a2
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c36: 2d49 000c movel %a1,%fp@(12)
}
47c3a: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c3c: 4ef9 0004 818c jmp 4818c <_Objects_Namespace_remove>
...
00047c44 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
47c44: 4e56 ffcc linkw %fp,#-52
47c48: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
47c4c: 246e 0008 moveal %fp@(8),%a2
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47c50: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c52: 206a 002e moveal %a2@(46),%a0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47c56: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c5a: 4a88 tstl %a0
47c5c: 6700 022c beqw 47e8a <_Objects_Extend_information+0x246>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
47c60: 322a 000e movew %a2@(14),%d1
47c64: 302a 0012 movew %a2@(18),%d0
47c68: 3801 movew %d1,%d4
47c6a: 0284 0000 ffff andil #65535,%d4
47c70: 88c0 divuw %d0,%d4
47c72: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47c78: 6700 0226 beqw 47ea0 <_Objects_Extend_information+0x25c>
if ( information->object_blocks[ block ] == NULL ) {
47c7c: 4a90 tstl %a0@
47c7e: 6700 0230 beqw 47eb0 <_Objects_Extend_information+0x26c>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
47c82: 5888 addql #4,%a0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47c84: 2605 movel %d5,%d3
index_base = minimum_index;
block = 0;
47c86: 4282 clrl %d2
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
47c88: 0280 0000 ffff andil #65535,%d0
do_extend = false;
break;
} else
index_base += information->allocation_size;
47c8e: d680 addl %d0,%d3
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
47c90: 5282 addql #1,%d2
47c92: b484 cmpl %d4,%d2
47c94: 6400 01a0 bccw 47e36 <_Objects_Extend_information+0x1f2>
if ( information->object_blocks[ block ] == NULL ) {
47c98: 4a98 tstl %a0@+
47c9a: 66f2 bnes 47c8e <_Objects_Extend_information+0x4a>
do_extend = false;
47c9c: 4207 clrb %d7
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
47c9e: 0281 0000 ffff andil #65535,%d1
47ca4: 2641 moveal %d1,%a3
47ca6: d7c0 addal %d0,%a3
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
47ca8: b7fc 0000 ffff cmpal #65535,%a3
47cae: 6200 017c bhiw 47e2c <_Objects_Extend_information+0x1e8>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
47cb2: 41ea 0014 lea %a2@(20),%a0
47cb6: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47cba: 4a2a 0010 tstb %a2@(16)
47cbe: 6700 017c beqw 47e3c <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
47cc2: 2f00 movel %d0,%sp@-
47cc4: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !new_object_block )
47cca: 588f addql #4,%sp
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
47ccc: 2c00 movel %d0,%d6
if ( !new_object_block )
47cce: 6700 015c beqw 47e2c <_Objects_Extend_information+0x1e8>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
47cd2: 4a07 tstb %d7
47cd4: 6700 00be beqw 47d94 <_Objects_Extend_information+0x150>
*/
/*
* Up the block count and maximum
*/
block_count++;
47cd8: 2a44 moveal %d4,%a5
47cda: 528d addql #1,%a5
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
47cdc: 200b movel %a3,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
47cde: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0
((maximum + minimum_index) * sizeof(Objects_Control *));
47ce2: d088 addl %a0,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
47ce4: d085 addl %d5,%d0
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
47ce6: e588 lsll #2,%d0
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47ce8: 2f00 movel %d0,%sp@-
47cea: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !object_blocks ) {
47cf0: 588f addql #4,%sp
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47cf2: 2840 moveal %d0,%a4
if ( !object_blocks ) {
47cf4: 4a80 tstl %d0
47cf6: 6700 01c8 beqw 47ec0 <_Objects_Extend_information+0x27c>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47cfa: 2e0d movel %a5,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47cfc: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47cfe: e58f lsll #2,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47d00: 302a 000e movew %a2@(14),%d0
47d04: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5
47d08: de8d addl %a5,%d7
47d0a: b085 cmpl %d5,%d0
47d0c: 6200 013e bhiw 47e4c <_Objects_Extend_information+0x208>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47d10: 4a85 tstl %d5
47d12: 670c beqs 47d20 <_Objects_Extend_information+0xdc><== NEVER TAKEN
47d14: 2047 moveal %d7,%a0
47d16: 4280 clrl %d0
local_table[ index ] = NULL;
47d18: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47d1a: 5280 addql #1,%d0
47d1c: b085 cmpl %d5,%d0
47d1e: 65f8 bcss 47d18 <_Objects_Extend_information+0xd4><== NEVER TAKEN
47d20: e58c lsll #2,%d4
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d22: 4281 clrl %d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
47d24: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d28: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
47d2c: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d30: d283 addl %d3,%d1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d32: b283 cmpl %d3,%d1
47d34: 6310 blss 47d46 <_Objects_Extend_information+0x102><== NEVER TAKEN
47d36: 2247 moveal %d7,%a1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
47d38: 2003 movel %d3,%d0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d3a: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
47d3e: 4298 clrl %a0@+
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
47d40: 5280 addql #1,%d0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d42: b280 cmpl %d0,%d1
47d44: 62f8 bhis 47d3e <_Objects_Extend_information+0xfa>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
47d46: 203c 0000 0700 movel #1792,%d0
47d4c: 40c4 movew %sr,%d4
47d4e: 8084 orl %d4,%d0
47d50: 46c0 movew %d0,%sr
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d52: 2012 movel %a2@,%d0
47d54: 7a18 moveq #24,%d5
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d56: 4281 clrl %d1
47d58: eba8 lsll %d5,%d0
47d5a: 322a 0004 movew %a2@(4),%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47d5e: 1a3c 001b moveb #27,%d5
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d62: 08c0 0010 bset #16,%d0
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47d66: eba9 lsll %d5,%d1
47d68: 4285 clrl %d5
47d6a: 8081 orl %d1,%d0
47d6c: 3a0b movew %a3,%d5
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
47d6e: 206a 002e moveal %a2@(46),%a0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d72: 8085 orl %d5,%d0
information->object_blocks = object_blocks;
47d74: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
47d78: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
47d7c: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table;
47d80: 2547 0018 movel %d7,%a2@(24)
47d84: 2540 000a movel %d0,%a2@(10)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
47d88: 46c4 movew %d4,%sr
_Workspace_Free( old_tables );
47d8a: 2f08 movel %a0,%sp@-
47d8c: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
47d92: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d94: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d98: 4280 clrl %d0
47d9a: 280e movel %fp,%d4
47d9c: 0684 ffff fff4 addil #-12,%d4
47da2: 47f9 0004 71e4 lea 471e4 <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47da8: 2a0a movel %a2,%d5
47daa: 0685 0000 001c addil #28,%d5
47db0: 49f9 0004 7184 lea 47184 <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47db6: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47db8: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47dbc: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47dc0: 2f2a 0014 movel %a2@(20),%sp@-
47dc4: 2f00 movel %d0,%sp@-
47dc6: 2f06 movel %d6,%sp@-
47dc8: 2f04 movel %d4,%sp@-
47dca: 4eb9 0004 bc60 jsr 4bc60 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47dd0: 4fef 0010 lea %sp@(16),%sp
47dd4: 2f04 movel %d4,%sp@-
47dd6: 4e93 jsr %a3@
47dd8: 588f addql #4,%sp
47dda: 4a80 tstl %d0
47ddc: 6734 beqs 47e12 <_Objects_Extend_information+0x1ce><== NEVER TAKEN
47dde: 2212 movel %a2@,%d1
47de0: 7e18 moveq #24,%d7
the_object->id = _Objects_Build_id(
47de2: 4286 clrl %d6
47de4: 2040 moveal %d0,%a0
47de6: 3c2a 0004 movew %a2@(4),%d6
47dea: efa9 lsll %d7,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47dec: 1e3c 001b moveb #27,%d7
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47df0: 08c1 0010 bset #16,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47df4: efae lsll %d7,%d6
47df6: 8286 orl %d6,%d1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47df8: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
47dfa: 5283 addql #1,%d3
47dfc: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47e00: 2f00 movel %d0,%sp@-
47e02: 2f05 movel %d5,%sp@-
47e04: 4e94 jsr %a4@
index++;
47e06: 508f addql #8,%sp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47e08: 2f04 movel %d4,%sp@-
47e0a: 4e93 jsr %a3@
47e0c: 588f addql #4,%sp
47e0e: 4a80 tstl %d0
47e10: 66cc bnes 47dde <_Objects_Extend_information+0x19a>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e12: 4281 clrl %d1
47e14: 302a 0012 movew %a2@(18),%d0
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
47e18: 326a 0028 moveaw %a2@(40),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e1c: 206a 002a moveal %a2@(42),%a0
47e20: 3200 movew %d0,%d1
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
47e22: d089 addl %a1,%d0
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e24: 2181 2800 movel %d1,%a0@(00000000,%d2:l)
information->inactive =
47e28: 3540 0028 movew %d0,%a2@(40)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e2c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47e32: 4e5e unlk %fp
47e34: 4e75 rts
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47e36: 7e01 moveq #1,%d7
47e38: 6000 fe64 braw 47c9e <_Objects_Extend_information+0x5a>
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
47e3c: 2f00 movel %d0,%sp@-
47e3e: 4eb9 0004 9e38 jsr 49e38 <_Workspace_Allocate_or_fatal_error>
47e44: 588f addql #4,%sp
47e46: 2c00 movel %d0,%d6
47e48: 6000 fe88 braw 47cd2 <_Objects_Extend_information+0x8e>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
47e4c: e58c lsll #2,%d4
47e4e: 2f04 movel %d4,%sp@-
47e50: 2f2a 002e movel %a2@(46),%sp@-
47e54: 2f0c movel %a4,%sp@-
47e56: 4eb9 0004 e384 jsr 4e384 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
47e5c: 2f04 movel %d4,%sp@-
47e5e: 2f2a 002a movel %a2@(42),%sp@-
47e62: 2f0d movel %a5,%sp@-
47e64: 4eb9 0004 e384 jsr 4e384 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
47e6a: 4280 clrl %d0
47e6c: 302a 000e movew %a2@(14),%d0
47e70: da80 addl %d0,%d5
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47e72: e58d lsll #2,%d5
47e74: 2f05 movel %d5,%sp@-
47e76: 2f2a 0018 movel %a2@(24),%sp@-
47e7a: 2f07 movel %d7,%sp@-
47e7c: 4eb9 0004 e384 jsr 4e384 <memcpy>
47e82: 4fef 0024 lea %sp@(36),%sp
47e86: 6000 fe9a braw 47d22 <_Objects_Extend_information+0xde>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47e8a: 4280 clrl %d0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
47e8c: 2605 movel %d5,%d3
index_base = minimum_index;
block = 0;
47e8e: 4282 clrl %d2
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
47e90: 4284 clrl %d4
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47e92: 322a 000e movew %a2@(14),%d1
47e96: 302a 0012 movew %a2@(18),%d0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47e9a: 7e01 moveq #1,%d7
47e9c: 6000 fe00 braw 47c9e <_Objects_Extend_information+0x5a>
minimum_index = _Objects_Get_index( information->minimum_id );
47ea0: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index;
block = 0;
47ea2: 4282 clrl %d2 <== NOT EXECUTED
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
47ea4: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47eaa: 7e01 moveq #1,%d7 <== NOT EXECUTED
47eac: 6000 fdf0 braw 47c9e <_Objects_Extend_information+0x5a><== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
47eb0: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index;
block = 0;
47eb2: 4282 clrl %d2 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
47eb4: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
do_extend = false;
47eba: 4207 clrb %d7 <== NOT EXECUTED
47ebc: 6000 fde0 braw 47c9e <_Objects_Extend_information+0x5a><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
47ec0: 2f06 movel %d6,%sp@-
47ec2: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
return;
47ec8: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47eca: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47ed0: 4e5e unlk %fp <== NOT EXECUTED
00047f84 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
47f84: 4e56 0000 linkw %fp,#0
47f88: 2f02 movel %d2,%sp@-
47f8a: 342e 000e movew %fp@(14),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47f8e: 660a bnes 47f9a <_Objects_Get_information+0x16>
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
return NULL;
47f90: 4280 clrl %d0
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
47f92: 242e fffc movel %fp@(-4),%d2
47f96: 4e5e unlk %fp
47f98: 4e75 rts
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
47f9a: 2f2e 0008 movel %fp@(8),%sp@-
47f9e: 4eb9 0004 c170 jsr 4c170 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
47fa4: 588f addql #4,%sp
47fa6: 4a80 tstl %d0
47fa8: 67e6 beqs 47f90 <_Objects_Get_information+0xc>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47faa: 0282 0000 ffff andil #65535,%d2
47fb0: b480 cmpl %d0,%d2
47fb2: 62dc bhis 47f90 <_Objects_Get_information+0xc>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47fb4: 202e 0008 movel %fp@(8),%d0
47fb8: 41f9 0005 f404 lea 5f404 <_Objects_Information_table>,%a0
47fbe: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
47fc2: 4a88 tstl %a0
47fc4: 67ca beqs 47f90 <_Objects_Get_information+0xc> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47fc6: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
47fca: 67c6 beqs 47f92 <_Objects_Get_information+0xe> <== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47fcc: 2040 moveal %d0,%a0
47fce: 4a68 000e tstw %a0@(14)
47fd2: 56c1 sne %d1
#endif
return info;
}
47fd4: 242e fffc movel %fp@(-4),%d2
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47fd8: 49c1 extbl %d1
#endif
return info;
}
47fda: 4e5e unlk %fp
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47fdc: c081 andl %d1,%d0 <== NOT EXECUTED
#endif
return info;
}
00049a7c <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
49a7c: 4e56 ffe0 linkw %fp,#-32
49a80: 48d7 043c moveml %d2-%d5/%a2,%sp@
49a84: 262e 000c movel %fp@(12),%d3
49a88: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
49a8c: 4a83 tstl %d3
49a8e: 660e bnes 49a9e <_Objects_Get_name_as_string+0x22>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
49a90: 4282 clrl %d2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
49a92: 2002 movel %d2,%d0
49a94: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
49a9a: 4e5e unlk %fp
49a9c: 4e75 rts
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
49a9e: 4a82 tstl %d2
49aa0: 67f0 beqs 49a92 <_Objects_Get_name_as_string+0x16>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49aa2: 4aae 0008 tstl %fp@(8)
49aa6: 6600 00b0 bnew 49b58 <_Objects_Get_name_as_string+0xdc>
49aaa: 2079 0006 214c moveal 6214c <_Per_CPU_Information+0xc>,%a0
49ab0: 2828 0008 movel %a0@(8),%d4
information = _Objects_Get_information_id( tmpId );
49ab4: 2f04 movel %d4,%sp@-
49ab6: 4eb9 0004 9994 jsr 49994 <_Objects_Get_information_id>
if ( !information )
49abc: 588f addql #4,%sp
49abe: 4a80 tstl %d0
49ac0: 67ce beqs 49a90 <_Objects_Get_name_as_string+0x14>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
49ac2: 486e fffc pea %fp@(-4)
49ac6: 2f04 movel %d4,%sp@-
49ac8: 2f00 movel %d0,%sp@-
49aca: 4eb9 0004 9b6c jsr 49b6c <_Objects_Get>
switch ( location ) {
49ad0: 4fef 000c lea %sp@(12),%sp
49ad4: 4aae fffc tstl %fp@(-4)
49ad8: 66b6 bnes 49a90 <_Objects_Get_name_as_string+0x14>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49ada: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49adc: 7818 moveq #24,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49ade: 2a03 movel %d3,%d5
49ae0: 5385 subql #1,%d5
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49ae2: 2228 000c movel %a0@(12),%d1
lname[ 0 ] = (u32_name >> 24) & 0xff;
49ae6: 2001 movel %d1,%d0
49ae8: e8a8 lsrl %d4,%d0
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
49aea: 2801 movel %d1,%d4
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49aec: 2601 movel %d1,%d3
lname[ 2 ] = (u32_name >> 8) & 0xff;
49aee: e08c lsrl #8,%d4
lname[ 3 ] = (u32_name >> 0) & 0xff;
49af0: 1d41 fffa moveb %d1,%fp@(-6)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49af4: 4243 clrw %d3
49af6: 4843 swap %d3
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49af8: 4201 clrb %d1
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
49afa: 1d40 fff7 moveb %d0,%fp@(-9)
lname[ 1 ] = (u32_name >> 16) & 0xff;
49afe: 1d43 fff8 moveb %d3,%fp@(-8)
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b02: 1d44 fff9 moveb %d4,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b06: 1d41 fffb moveb %d1,%fp@(-5)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b0a: 4a85 tstl %d5
49b0c: 6752 beqs 49b60 <_Objects_Get_name_as_string+0xe4><== NEVER TAKEN
49b0e: 4a00 tstb %d0
49b10: 674e beqs 49b60 <_Objects_Get_name_as_string+0xe4>
49b12: 45ee fff8 lea %fp@(-8),%a2
49b16: 2042 moveal %d2,%a0
49b18: 4281 clrl %d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49b1a: 4283 clrl %d3
49b1c: 1600 moveb %d0,%d3
49b1e: 2279 0006 0534 moveal 60534 <__ctype_ptr__>,%a1
49b24: 1800 moveb %d0,%d4
49b26: 1031 3801 moveb %a1@(00000001,%d3:l),%d0
49b2a: 49c0 extbl %d0
49b2c: 0280 0000 0097 andil #151,%d0
49b32: 6602 bnes 49b36 <_Objects_Get_name_as_string+0xba>
49b34: 782a moveq #42,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b36: 5281 addql #1,%d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49b38: 10c4 moveb %d4,%a0@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b3a: 2248 moveal %a0,%a1
49b3c: ba81 cmpl %d1,%d5
49b3e: 6304 blss 49b44 <_Objects_Get_name_as_string+0xc8>
49b40: 101a moveb %a2@+,%d0
49b42: 66d6 bnes 49b1a <_Objects_Get_name_as_string+0x9e>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49b44: 4211 clrb %a1@
_Thread_Enable_dispatch();
49b46: 4eb9 0004 a782 jsr 4a782 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
49b4c: 2002 movel %d2,%d0
49b4e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
49b54: 4e5e unlk %fp
49b56: 4e75 rts
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49b58: 282e 0008 movel %fp@(8),%d4
49b5c: 6000 ff56 braw 49ab4 <_Objects_Get_name_as_string+0x38>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49b60: 2242 moveal %d2,%a1
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49b62: 4211 clrb %a1@
_Thread_Enable_dispatch();
49b64: 4eb9 0004 a782 jsr 4a782 <_Thread_Enable_dispatch>
49b6a: 60e0 bras 49b4c <_Objects_Get_name_as_string+0xd0>
0005bb74 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
5bb74: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5bb76: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5bb78: 4e56 0000 linkw %fp,#0
5bb7c: 206e 0008 moveal %fp@(8),%a0
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
5bb80: 90a8 0006 subl %a0@(6),%d0
5bb84: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5bb88: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5bb8c: 226e 0010 moveal %fp@(16),%a1
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
if ( information->maximum >= index ) {
5bb90: b280 cmpl %d0,%d1
5bb92: 6510 bcss 5bba4 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5bb94: 2068 0018 moveal %a0@(24),%a0
5bb98: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
5bb9c: 6706 beqs 5bba4 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
5bb9e: 4291 clrl %a1@
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
return NULL;
}
5bba0: 4e5e unlk %fp
5bba2: 4e75 rts
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5bba4: 7001 moveq #1,%d0
return NULL;
}
5bba6: 4e5e unlk %fp
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5bba8: 2280 movel %d0,%a1@
return NULL;
5bbaa: 4280 clrl %d0
}
...
0004979c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
4979c: 4e56 fffc linkw %fp,#-4
497a0: 222e 0008 movel %fp@(8),%d1
497a4: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
497a6: 4a81 tstl %d1
497a8: 660a bnes 497b4 <_Objects_Id_to_name+0x18>
497aa: 2079 0006 12bc moveal 612bc <_Per_CPU_Information+0xc>,%a0
497b0: 2228 0008 movel %a0@(8),%d1
497b4: 7418 moveq #24,%d2
497b6: 2001 movel %d1,%d0
497b8: e4a8 lsrl %d2,%d0
497ba: 143c 0007 moveb #7,%d2
497be: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
497c0: 143c 0002 moveb #2,%d2
497c4: 2040 moveal %d0,%a0
497c6: 5388 subql #1,%a0
497c8: b488 cmpl %a0,%d2
497ca: 654a bcss 49816 <_Objects_Id_to_name+0x7a>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
497cc: 41f9 0006 10dc lea 610dc <_Objects_Information_table>,%a0
497d2: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
497d6: 4a88 tstl %a0
497d8: 673c beqs 49816 <_Objects_Id_to_name+0x7a>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
497da: 2001 movel %d1,%d0
497dc: 741b moveq #27,%d2
497de: e4a8 lsrl %d2,%d0
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
497e0: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
if ( !information )
497e4: 6730 beqs 49816 <_Objects_Id_to_name+0x7a> <== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
497e6: 486e fffc pea %fp@(-4)
497ea: 2f01 movel %d1,%sp@-
497ec: 2f00 movel %d0,%sp@-
497ee: 4eb9 0004 9730 jsr 49730 <_Objects_Get>
if ( !the_object )
497f4: 4fef 000c lea %sp@(12),%sp
497f8: 4a80 tstl %d0
497fa: 671a beqs 49816 <_Objects_Id_to_name+0x7a>
return OBJECTS_INVALID_ID;
*name = the_object->name;
497fc: 206e 000c moveal %fp@(12),%a0
49800: 2240 moveal %d0,%a1
49802: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
49806: 4eb9 0004 a44a jsr 4a44a <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
4980c: 242e fff8 movel %fp@(-8),%d2
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
49810: 4280 clrl %d0
}
49812: 4e5e unlk %fp
49814: 4e75 rts
49816: 242e fff8 movel %fp@(-8),%d2
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
4981a: 7003 moveq #3,%d0
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
4981c: 4e5e unlk %fp <== NOT EXECUTED
0004821c <_Objects_Shrink_information>:
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
4821c: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
4821e: 4e56 ffec linkw %fp,#-20
48222: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
48226: 246e 0008 moveal %fp@(8),%a2
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
4822a: 4282 clrl %d2
block_count = (information->maximum - index_base) /
4822c: 4283 clrl %d3
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
4822e: 342a 0008 movew %a2@(8),%d2
block_count = (information->maximum - index_base) /
48232: 362a 000e movew %a2@(14),%d3
48236: 322a 0012 movew %a2@(18),%d1
4823a: 9682 subl %d2,%d3
4823c: 4c41 3003 remul %d1,%d3,%d3
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48240: 6774 beqs 482b6 <_Objects_Shrink_information+0x9a><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
48242: 206a 002a moveal %a2@(42),%a0
48246: b290 cmpl %a0@,%d1
48248: 677e beqs 482c8 <_Objects_Shrink_information+0xac><== NEVER TAKEN
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
4824a: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
4824c: 4280 clrl %d0
4824e: 5280 addql #1,%d0
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
48250: d481 addl %d1,%d2
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48252: b083 cmpl %d3,%d0
48254: 6460 bccs 482b6 <_Objects_Shrink_information+0x9a>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
48256: 2800 movel %d0,%d4
48258: e58c lsll #2,%d4
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
4825a: b298 cmpl %a0@+,%d1
4825c: 66f0 bnes 4824e <_Objects_Shrink_information+0x32>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
4825e: 206a 001c moveal %a2@(28),%a0
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
48262: 47f9 0004 71bc lea 471bc <_Chain_Extract>,%a3
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
48268: 4280 clrl %d0
4826a: 3028 000a movew %a0@(10),%d0
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
4826e: 2610 movel %a0@,%d3
if ((index >= index_base) &&
48270: b480 cmpl %d0,%d2
48272: 620c bhis 48280 <_Objects_Shrink_information+0x64>
(index < (index_base + information->allocation_size))) {
48274: 4281 clrl %d1
48276: 322a 0012 movew %a2@(18),%d1
4827a: d282 addl %d2,%d1
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
4827c: b280 cmpl %d0,%d1
4827e: 6240 bhis 482c0 <_Objects_Shrink_information+0xa4>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
48280: 4a83 tstl %d3
48282: 6704 beqs 48288 <_Objects_Shrink_information+0x6c>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
48284: 2043 moveal %d3,%a0
48286: 60e0 bras 48268 <_Objects_Shrink_information+0x4c>
while ( the_object );
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
48288: 206a 002e moveal %a2@(46),%a0
4828c: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@-
48290: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
information->object_blocks[ block ] = NULL;
48296: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
4829a: 588f addql #4,%sp
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
4829c: 42b0 4800 clrl %a0@(00000000,%d4:l)
information->inactive_per_block[ block ] = 0;
482a0: 206a 002a moveal %a2@(42),%a0
information->inactive -= information->allocation_size;
482a4: 302a 0028 movew %a2@(40),%d0
482a8: 322a 0012 movew %a2@(18),%d1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
482ac: 42b0 4800 clrl %a0@(00000000,%d4:l)
information->inactive -= information->allocation_size;
482b0: 9081 subl %d1,%d0
482b2: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
482b6: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
482bc: 4e5e unlk %fp
482be: 4e75 rts
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
482c0: 2f08 movel %a0,%sp@-
482c2: 4e93 jsr %a3@
482c4: 588f addql #4,%sp
482c6: 60b8 bras 48280 <_Objects_Shrink_information+0x64>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
482c8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
482cc: 4284 clrl %d4 <== NOT EXECUTED
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
482ce: 47f9 0004 71bc lea 471bc <_Chain_Extract>,%a3 <== NOT EXECUTED
482d4: 6092 bras 48268 <_Objects_Shrink_information+0x4c><== NOT EXECUTED
...
0004bab6 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4bab6: 4e56 0000 linkw %fp,#0
4baba: 2f0a movel %a2,%sp@-
4babc: 246e 000c moveal %fp@(12),%a2
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
4bac0: 4a39 0005 dbb4 tstb 5dbb4 <Configuration_RTEMS_API+0x4>
4bac6: 6758 beqs 4bb20 <_RTEMS_tasks_Create_extension+0x6a>
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
4bac8: 705e moveq #94,%d0
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4baca: 2f00 movel %d0,%sp@-
4bacc: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !api )
4bad2: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4bad4: 2040 moveal %d0,%a0
if ( !api )
4bad6: 4a80 tstl %d0
4bad8: 6758 beqs 4bb32 <_RTEMS_tasks_Create_extension+0x7c>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4bada: 2540 00fc movel %d0,%a2@(252)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4bade: 4200 clrb %d0
api->pending_events = EVENT_SETS_NONE_PENDING;
4bae0: 4290 clrl %a0@
4bae2: 1140 0008 moveb %d0,%a0@(8)
api->event_condition = 0;
4bae6: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4baea: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4baee: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4baf2: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4baf6: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4bafa: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
4bafe: 42aa 0108 clrl %a2@(264)
if ( rtems_configuration_get_notepads_enabled() ) {
4bb02: 4a39 0005 dbb4 tstb 5dbb4 <Configuration_RTEMS_API+0x4>
4bb08: 670c beqs 4bb16 <_RTEMS_tasks_Create_extension+0x60>
* task is created via another API, then this routine is invoked
* and this API given the opportunity to initialize its extension
* area.
*/
bool _RTEMS_tasks_Create_extension(
4bb0a: 41e8 001e lea %a0@(30),%a0
4bb0e: 7010 moveq #16,%d0
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
4bb10: 4298 clrl %a0@+
4bb12: 5380 subql #1,%d0
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4bb14: 66fa bnes 4bb10 <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4bb16: 246e fffc moveal %fp@(-4),%a2
4bb1a: 4e5e unlk %fp
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
4bb1c: 7001 moveq #1,%d0
}
4bb1e: 4e75 rts
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
4bb20: 701e moveq #30,%d0
api = _Workspace_Allocate( to_allocate );
4bb22: 2f00 movel %d0,%sp@-
4bb24: 4eb9 0004 9e02 jsr 49e02 <_Workspace_Allocate>
if ( !api )
4bb2a: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4bb2c: 2040 moveal %d0,%a0
if ( !api )
4bb2e: 4a80 tstl %d0
4bb30: 66a8 bnes 4bada <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4bb32: 246e fffc moveal %fp@(-4),%a2
4bb36: 4e5e unlk %fp
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
4bb38: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
0004ba60 <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
4ba60: 4e56 fff4 linkw %fp,#-12
4ba64: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4ba68: 246e 000c moveal %fp@(12),%a2
4ba6c: 47f9 0004 bb88 lea 4bb88 <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
4ba72: 206a 0108 moveal %a2@(264),%a0
deleted->task_variables = NULL;
4ba76: 42aa 0108 clrl %a2@(264)
while (tvp) {
4ba7a: 4a88 tstl %a0
4ba7c: 671e beqs 4ba9c <_RTEMS_tasks_Delete_extension+0x3c>
next = (rtems_task_variable_t *)tvp->next;
4ba7e: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4ba80: 2f08 movel %a0,%sp@-
4ba82: 2f0a movel %a2,%sp@-
4ba84: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4ba86: 508f addql #8,%sp
4ba88: 4a82 tstl %d2
4ba8a: 6710 beqs 4ba9c <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
4ba8c: 2042 moveal %d2,%a0
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
4ba8e: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4ba90: 2f08 movel %a0,%sp@-
4ba92: 2f0a movel %a2,%sp@-
4ba94: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4ba96: 508f addql #8,%sp
4ba98: 4a82 tstl %d2
4ba9a: 66f0 bnes 4ba8c <_RTEMS_tasks_Delete_extension+0x2c>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
4ba9c: 2f2a 00fc movel %a2@(252),%sp@-
4baa0: 4eb9 0004 9e1e jsr 49e1e <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
4baa6: 588f addql #4,%sp
4baa8: 42aa 00fc clrl %a2@(252)
}
4baac: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4bab2: 4e5e unlk %fp <== NOT EXECUTED
00046b8c <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46b8c: 4e56 ffe4 linkw %fp,#-28
46b90: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
46b94: 2479 0005 dbda moveal 5dbda <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
46b9a: 2639 0005 dbd6 movel 5dbd6 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46ba0: 4a8a tstl %a2
46ba2: 6754 beqs 46bf8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46ba4: 4a83 tstl %d3
46ba6: 6750 beqs 46bf8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
46ba8: 280e movel %fp,%d4
46baa: 4282 clrl %d2
46bac: 5984 subql #4,%d4
46bae: 47f9 0004 6964 lea 46964 <rtems_task_create>,%a3
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46bb4: 49f9 0004 6c14 lea 46c14 <rtems_task_start>,%a4
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
46bba: 2f04 movel %d4,%sp@-
46bbc: 2f2a 000c movel %a2@(12),%sp@-
46bc0: 2f2a 0014 movel %a2@(20),%sp@-
46bc4: 2f2a 0004 movel %a2@(4),%sp@-
46bc8: 2f2a 0008 movel %a2@(8),%sp@-
46bcc: 2f12 movel %a2@,%sp@-
46bce: 4e93 jsr %a3@
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
46bd0: 4fef 0018 lea %sp@(24),%sp
46bd4: 4a80 tstl %d0
46bd6: 662a bnes 46c02 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46bd8: 2f2a 0018 movel %a2@(24),%sp@-
46bdc: 2f2a 0010 movel %a2@(16),%sp@-
46be0: 2f2e fffc movel %fp@(-4),%sp@-
46be4: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
46be6: 4fef 000c lea %sp@(12),%sp
46bea: 4a80 tstl %d0
46bec: 6614 bnes 46c02 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46bee: 5282 addql #1,%d2
46bf0: 45ea 001c lea %a2@(28),%a2
46bf4: b483 cmpl %d3,%d2
46bf6: 65c2 bcss 46bba <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
46bf8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
46bfe: 4e5e unlk %fp
46c00: 4e75 rts
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
46c02: 2f00 movel %d0,%sp@-
46c04: 4878 0001 pea 1 <ADD>
46c08: 4878 0001 pea 1 <ADD>
46c0c: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
...
0004b9e4 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4b9e4: 4e56 ffec linkw %fp,#-20
4b9e8: 206e 0008 moveal %fp@(8),%a0
4b9ec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4b9f0: 2468 00fc moveal %a0@(252),%a2
if ( !api )
4b9f4: 4a8a tstl %a2
4b9f6: 671a beqs 4ba12 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4b9f8: 203c 0000 0700 movel #1792,%d0
4b9fe: 40c1 movew %sr,%d1
4ba00: 8081 orl %d1,%d0
4ba02: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4ba04: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4ba08: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4ba0c: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4ba0e: 4a82 tstl %d2
4ba10: 660a bnes 4ba1c <_RTEMS_tasks_Post_switch_extension+0x38>
(*asr->handler)( signal_set );
asr->nest_level -= 1;
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
}
4ba12: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4ba18: 4e5e unlk %fp
4ba1a: 4e75 rts
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4ba1c: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ba20: 260e movel %fp,%d3
4ba22: 5983 subql #4,%d3
4ba24: 47f9 0004 d628 lea 4d628 <rtems_task_mode>,%a3
4ba2a: 2f03 movel %d3,%sp@-
4ba2c: 2f3c 0000 ffff movel #65535,%sp@-
4ba32: 2f2a 000e movel %a2@(14),%sp@-
4ba36: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4ba38: 2f02 movel %d2,%sp@-
4ba3a: 206a 000a moveal %a2@(10),%a0
4ba3e: 4e90 jsr %a0@
asr->nest_level -= 1;
4ba40: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ba44: 2f03 movel %d3,%sp@-
4ba46: 2f3c 0000 ffff movel #65535,%sp@-
4ba4c: 2f2e fffc movel %fp@(-4),%sp@-
4ba50: 4e93 jsr %a3@
4ba52: 4fef 001c lea %sp@(28),%sp
}
4ba56: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4ba5c: 4e5e unlk %fp <== NOT EXECUTED
0004b98a <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4b98a: 4e56 0000 linkw %fp,#0
4b98e: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4b992: 2068 0108 moveal %a0@(264),%a0
while (tvp) {
4b996: 4a88 tstl %a0
4b998: 6712 beqs 4b9ac <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4b99a: 2268 0004 moveal %a0@(4),%a1
4b99e: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4b9a2: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4b9a6: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4b9a8: 4a88 tstl %a0
4b9aa: 66ee bnes 4b99a <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
4b9ac: 206e 000c moveal %fp@(12),%a0
4b9b0: 2068 0108 moveal %a0@(264),%a0
while (tvp) {
4b9b4: 4a88 tstl %a0
4b9b6: 6712 beqs 4b9ca <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4b9b8: 2268 0004 moveal %a0@(4),%a1
4b9bc: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4b9c0: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4b9c4: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4b9c6: 4a88 tstl %a0
4b9c8: 66ee bnes 4b9b8 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4b9ca: 4e5e unlk %fp <== NOT EXECUTED
00047c84 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47c84: 4e56 fffc linkw %fp,#-4
47c88: 2f0a movel %a2,%sp@-
47c8a: 486e fffc pea %fp@(-4)
47c8e: 2f2e 0008 movel %fp@(8),%sp@-
47c92: 4879 0006 1440 pea 61440 <_Rate_monotonic_Information>
47c98: 4eb9 0004 9b68 jsr 49b68 <_Objects_Get>
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
47c9e: 4fef 000c lea %sp@(12),%sp
47ca2: 2440 moveal %d0,%a2
47ca4: 4aae fffc tstl %fp@(-4)
47ca8: 6636 bnes 47ce0 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
47caa: 206a 0040 moveal %a2@(64),%a0
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
47cae: 2028 0010 movel %a0@(16),%d0
47cb2: 0280 0000 4000 andil #16384,%d0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47cb8: 670a beqs 47cc4 <_Rate_monotonic_Timeout+0x40>
47cba: 202a 0008 movel %a2@(8),%d0
47cbe: b0a8 0020 cmpl %a0@(32),%d0
47cc2: 675e beqs 47d22 <_Rate_monotonic_Timeout+0x9e>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
47cc4: 7001 moveq #1,%d0
47cc6: b0aa 0038 cmpl %a2@(56),%d0
47cca: 671c beqs 47ce8 <_Rate_monotonic_Timeout+0x64>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
47ccc: 7004 moveq #4,%d0
47cce: 2540 0038 movel %d0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47cd2: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47cd8: 5380 subql #1,%d0
47cda: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47ce0: 246e fff8 moveal %fp@(-8),%a2
47ce4: 4e5e unlk %fp
47ce6: 4e75 rts
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
47ce8: 103c 0003 moveb #3,%d0
47cec: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47cf0: 2f0a movel %a2,%sp@-
47cf2: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47cf8: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47cfe: 486a 0010 pea %a2@(16)
47d02: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
47d08: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
47d0e: 4fef 000c lea %sp@(12),%sp
47d12: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47d18: 5380 subql #1,%d0
47d1a: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
47d20: 60be bras 47ce0 <_Rate_monotonic_Timeout+0x5c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47d22: 2f3c 1003 fff8 movel #268697592,%sp@-
47d28: 2f08 movel %a0,%sp@-
47d2a: 4eb9 0004 a430 jsr 4a430 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
47d30: 2f0a movel %a2,%sp@-
47d32: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47d38: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47d3e: 486a 0010 pea %a2@(16)
47d42: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
47d48: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
47d4e: 4fef 0014 lea %sp@(20),%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47d52: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47d58: 5380 subql #1,%d0
47d5a: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
47d60: 6000 ff7e braw 47ce0 <_Rate_monotonic_Timeout+0x5c>
00048360 <_Scheduler_Handler_initialization>:
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
48360: 4e56 0000 linkw %fp,#0
(*_Scheduler.Operations.initialize)();
}
48364: 4e5e unlk %fp
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
void _Scheduler_Handler_initialization(void)
{
(*_Scheduler.Operations.initialize)();
48366: 2279 0005 db14 moveal 5db14 <_Scheduler+0x4>,%a1
4836c: 4ed1 jmp %a1@
...
0004838c <_Scheduler_priority_Block>:
#include <rtems/score/thread.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
)
{
4838c: 4e56 0000 linkw %fp,#0
48390: 206e 0008 moveal %fp@(8),%a0
48394: 2f0b movel %a3,%sp@-
48396: 2f0a movel %a2,%sp@-
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
48398: 2468 008a moveal %a0@(138),%a2
ready = sched_info->ready_chain;
4839c: 2252 moveal %a2@,%a1
if ( _Chain_Has_only_one_node( ready ) ) {
4839e: 2029 0008 movel %a1@(8),%d0
483a2: b091 cmpl %a1@,%d0
483a4: 6700 0084 beqw 4842a <_Scheduler_priority_Block+0x9e>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
483a8: 2450 moveal %a0@,%a2
previous = the_node->previous;
483aa: 2268 0004 moveal %a0@(4),%a1
next->previous = previous;
483ae: 2549 0004 movel %a1,%a2@(4)
previous->next = next;
483b2: 228a movel %a2,%a1@
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
483b4: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
483ba: 6720 beqs 483dc <_Scheduler_priority_Block+0x50>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
483bc: b1f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a0
483c2: 6708 beqs 483cc <_Scheduler_priority_Block+0x40>
_Thread_Dispatch_necessary = true;
}
483c4: 245f moveal %sp@+,%a2
483c6: 265f moveal %sp@+,%a3
483c8: 4e5e unlk %fp
483ca: 4e75 rts
483cc: 245f moveal %sp@+,%a2
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
483ce: 7001 moveq #1,%d0
}
483d0: 265f moveal %sp@+,%a3
483d2: 4e5e unlk %fp
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
483d4: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
}
483da: 4e75 rts
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
483dc: 3039 0005 f5f4 movew 5f5f4 <_Priority_Major_bit_map>,%d0
483e2: 4840 swap %d0
483e4: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
483e6: 43f9 0005 f5f8 lea 5f5f8 <_Priority_Bit_map>,%a1
483ec: 0280 0000 ffff andil #65535,%d0
483f2: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1
483f6: 4841 swap %d1
483f8: 04c1 ff1 %d1
483fa: 2279 0005 db10 moveal 5db10 <_Scheduler>,%a1
return (_Priority_Bits_index( major ) << 4) +
48400: 0281 0000 ffff andil #65535,%d1
48406: e988 lsll #4,%d0
48408: d081 addl %d1,%d0
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
4840a: 2200 movel %d0,%d1
4840c: e988 lsll #4,%d0
4840e: e589 lsll #2,%d1
48410: 9081 subl %d1,%d0
48412: d3c0 addal %d0,%a1
48414: 2019 movel %a1@+,%d0
48416: b3c0 cmpal %d0,%a1
48418: 6750 beqs 4846a <_Scheduler_priority_Block+0xde> <== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
4841a: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10>
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
48420: b1f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a0
48426: 669c bnes 483c4 <_Scheduler_priority_Block+0x38>
48428: 60a2 bras 483cc <_Scheduler_priority_Block+0x40>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4842a: 2009 movel %a1,%d0
4842c: 5880 addql #4,%d0
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
4842e: 266a 0004 moveal %a2@(4),%a3
48432: 2280 movel %d0,%a1@
48434: 302a 000e movew %a2@(14),%d0
head->next = tail;
head->previous = NULL;
48438: 42a9 0004 clrl %a1@(4)
tail->previous = head;
4843c: 2349 0008 movel %a1,%a1@(8)
48440: 3213 movew %a3@,%d1
48442: c081 andl %d1,%d0
48444: 3680 movew %d0,%a3@
if ( *the_priority_map->minor == 0 )
48446: 6600 ff6c bnew 483b4 <_Scheduler_priority_Block+0x28>
_Priority_Major_bit_map &= the_priority_map->block_major;
4844a: 3239 0005 f5f4 movew 5f5f4 <_Priority_Major_bit_map>,%d1
48450: 302a 000c movew %a2@(12),%d0
48454: c081 andl %d1,%d0
48456: 33c0 0005 f5f4 movew %d0,5f5f4 <_Priority_Major_bit_map>
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
4845c: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
48462: 6600 ff58 bnew 483bc <_Scheduler_priority_Block+0x30>
48466: 6000 ff74 braw 483dc <_Scheduler_priority_Block+0x50>
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
4846a: 4280 clrl %d0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
4846c: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10> <== NOT EXECUTED
48472: 60ac bras 48420 <_Scheduler_priority_Block+0x94> <== NOT EXECUTED
00048568 <_Scheduler_priority_Free>:
#include <rtems/score/wkspace.h>
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
48568: 4e56 0000 linkw %fp,#0
4856c: 206e 0008 moveal %fp@(8),%a0
_Workspace_Free( the_thread->scheduler_info );
48570: 2d68 008a 0008 movel %a0@(138),%fp@(8)
}
48576: 4e5e unlk %fp
void _Scheduler_priority_Free (
Thread_Control *the_thread
)
{
_Workspace_Free( the_thread->scheduler_info );
48578: 4ef9 0004 9e1e jmp 49e1e <_Workspace_Free>
...
000485e8 <_Scheduler_priority_Schedule>:
#include <rtems/system.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
485e8: 4e56 0000 linkw %fp,#0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
485ec: 3039 0005 f5f4 movew 5f5f4 <_Priority_Major_bit_map>,%d0
485f2: 4840 swap %d0
485f4: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
485f6: 41f9 0005 f5f8 lea 5f5f8 <_Priority_Bit_map>,%a0
485fc: 0280 0000 ffff andil #65535,%d0
48602: 3230 0a00 movew %a0@(00000000,%d0:l:2),%d1
48606: 4841 swap %d1
48608: 04c1 ff1 %d1
_Scheduler_priority_Schedule_body();
}
4860a: 2079 0005 db10 moveal 5db10 <_Scheduler>,%a0
return (_Priority_Bits_index( major ) << 4) +
48610: 0281 0000 ffff andil #65535,%d1
48616: e988 lsll #4,%d0
48618: d081 addl %d1,%d0
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
4861a: 2200 movel %d0,%d1
4861c: e988 lsll #4,%d0
4861e: e589 lsll #2,%d1
48620: 9081 subl %d1,%d0
48622: d1c0 addal %d0,%a0
48624: 2018 movel %a0@+,%d0
48626: b1c0 cmpal %d0,%a0
48628: 670a beqs 48634 <_Scheduler_priority_Schedule+0x4c><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
4862a: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10>
48630: 4e5e unlk %fp
48632: 4e75 rts
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
48634: 4280 clrl %d0 <== NOT EXECUTED
48636: 4e5e unlk %fp <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
48638: 23c0 0005 f5e8 movel %d0,5f5e8 <_Per_CPU_Information+0x10> <== NOT EXECUTED
00048730 <_Scheduler_priority_Yield>:
* ready chain
* select heir
*/
void _Scheduler_priority_Yield(void)
{
48730: 4e56 fff0 linkw %fp,#-16
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
48734: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
* ready chain
* select heir
*/
void _Scheduler_priority_Yield(void)
{
4873a: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
4873e: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
48742: 243c 0000 0700 movel #1792,%d2
48748: 2002 movel %d2,%d0
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
4874a: 2251 moveal %a1@,%a1
_ISR_Disable( level );
4874c: 40c1 movew %sr,%d1
4874e: 8081 orl %d1,%d0
48750: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
48752: 2029 0008 movel %a1@(8),%d0
48756: b091 cmpl %a1@,%d0
48758: 6750 beqs 487aa <_Scheduler_priority_Yield+0x7a>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4875a: 2850 moveal %a0@,%a4
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
4875c: 2009 movel %a1,%d0
4875e: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
48760: 2668 0004 moveal %a0@(4),%a3
next->previous = previous;
48764: 294b 0004 movel %a3,%a4@(4)
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
48768: 2469 0008 moveal %a1@(8),%a2
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
previous->next = next;
4876c: 268c movel %a4,%a3@
{
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
4876e: 2348 0008 movel %a0,%a1@(8)
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
48772: 2080 movel %d0,%a0@
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
the_node->previous = old_last;
48774: 214a 0004 movel %a2,%a0@(4)
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *old_last = tail->previous;
the_node->next = tail;
tail->previous = the_node;
old_last->next = the_node;
48778: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
4877a: 46c1 movew %d1,%sr
4877c: 8481 orl %d1,%d2
4877e: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
48780: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
48786: 6712 beqs 4879a <_Scheduler_priority_Yield+0x6a> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
48788: 7001 moveq #1,%d0 <== NOT EXECUTED
4878a: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18> <== NOT EXECUTED
_ISR_Enable( level );
48790: 46c1 movew %d1,%sr
}
48792: 4cd7 1c04 moveml %sp@,%d2/%a2-%a4
48796: 4e5e unlk %fp
48798: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
4879a: 23d1 0005 f5e8 movel %a1@,5f5e8 <_Per_CPU_Information+0x10>
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
487a0: 7001 moveq #1,%d0
487a2: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
487a8: 60e6 bras 48790 <_Scheduler_priority_Yield+0x60>
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
487aa: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
487b0: 67de beqs 48790 <_Scheduler_priority_Yield+0x60> <== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
487b2: 7001 moveq #1,%d0 <== NOT EXECUTED
487b4: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18> <== NOT EXECUTED
487ba: 60d4 bras 48790 <_Scheduler_priority_Yield+0x60> <== NOT EXECUTED
00048974 <_Scheduler_simple_Block>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Block(
Thread_Control *the_thread
)
{
48974: 4e56 0000 linkw %fp,#0
48978: 2f02 movel %d2,%sp@-
4897a: 242e 0008 movel %fp@(8),%d2
_Scheduler_simple_Extract(the_thread);
4897e: 2f02 movel %d2,%sp@-
48980: 4eb9 0004 89d8 jsr 489d8 <_Scheduler_simple_Extract>
if ( _Thread_Is_heir( the_thread ) )
48986: 588f addql #4,%sp
48988: b4b9 0006 0140 cmpl 60140 <_Per_CPU_Information+0x10>,%d2
4898e: 6720 beqs 489b0 <_Scheduler_simple_Block+0x3c>
_Scheduler_simple_Schedule();
if ( _Thread_Is_executing( the_thread ) )
48990: b4b9 0006 013c cmpl 6013c <_Per_CPU_Information+0xc>,%d2
48996: 6708 beqs 489a0 <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
}
48998: 242e fffc movel %fp@(-4),%d2
4899c: 4e5e unlk %fp
4899e: 4e75 rts
489a0: 242e fffc movel %fp@(-4),%d2
489a4: 4e5e unlk %fp
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_simple_Schedule();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
489a6: 7001 moveq #1,%d0
489a8: 13c0 0006 0148 moveb %d0,60148 <_Per_CPU_Information+0x18>
}
489ae: 4e75 rts
)
{
_Scheduler_simple_Extract(the_thread);
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_simple_Schedule();
489b0: 4eb9 0004 8ac0 jsr 48ac0 <_Scheduler_simple_Schedule>
if ( _Thread_Is_executing( the_thread ) )
489b6: b4b9 0006 013c cmpl 6013c <_Per_CPU_Information+0xc>,%d2
489bc: 66da bnes 48998 <_Scheduler_simple_Block+0x24> <== NEVER TAKEN
489be: 60e0 bras 489a0 <_Scheduler_simple_Block+0x2c>
00048a34 <_Scheduler_simple_Ready_queue_Enqueue_first>:
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Ready_queue_Enqueue_first(
Thread_Control *the_thread
)
{
48a34: 4e56 0000 linkw %fp,#0
48a38: 226e 0008 moveal %fp@(8),%a1
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
48a3c: 2079 0005 e5f0 moveal 5e5f0 <_Scheduler>,%a0
#include <rtems/score/schedulersimple.h>
void _Scheduler_simple_Ready_queue_Enqueue_first(
Thread_Control *the_thread
)
{
48a42: 2f0a movel %a2,%sp@-
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
48a44: 2029 0014 movel %a1@(20),%d0
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
48a48: 2050 moveal %a0@,%a0
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
48a4a: b0a8 0014 cmpl %a0@(20),%d0
48a4e: 6308 blss 48a58 <_Scheduler_simple_Ready_queue_Enqueue_first+0x24>
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
48a50: 2050 moveal %a0@,%a0
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
48a52: b0a8 0014 cmpl %a0@(20),%d0
48a56: 62f8 bhis 48a50 <_Scheduler_simple_Ready_queue_Enqueue_first+0x1c><== NEVER TAKEN
current = (Thread_Control *)current->Object.Node.previous;
48a58: 2068 0004 moveal %a0@(4),%a0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
48a5c: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
48a5e: 2348 0004 movel %a0,%a1@(4)
before_node = after_node->next;
after_node->next = the_node;
48a62: 2089 movel %a1,%a0@
the_node->next = before_node;
before_node->previous = the_node;
48a64: 2549 0004 movel %a1,%a2@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
48a68: 228a movel %a2,%a1@
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
48a6a: 245f moveal %sp@+,%a2
48a6c: 4e5e unlk %fp <== NOT EXECUTED
00048fd8 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
48fd8: 4e56 0000 linkw %fp,#0
48fdc: 2039 0006 1f78 movel 61f78 <_Thread_Dispatch_disable_level>,%d0
48fe2: 5280 addql #1,%d0
48fe4: 2f0a movel %a2,%sp@-
48fe6: 246e 0008 moveal %fp@(8),%a2
48fea: 23c0 0006 1f78 movel %d0,61f78 <_Thread_Dispatch_disable_level>
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
48ff0: 2039 0006 2002 movel 62002 <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
48ff6: 2212 movel %a2@,%d1
48ff8: b280 cmpl %d0,%d1
48ffa: 6d38 blts 49034 <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
48ffc: 9280 subl %d0,%d1
48ffe: 2f01 movel %d1,%sp@-
49000: 42a7 clrl %sp@-
49002: 4879 0006 202c pea 6202c <_Watchdog_Seconds_chain>
49008: 4eb9 0004 b700 jsr 4b700 <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
4900e: 23d2 0006 2002 movel %a2@,62002 <_TOD_Now>
49014: 588a addql #4,%a2
49016: 4fef 000c lea %sp@(12),%sp
4901a: 23d2 0006 2006 movel %a2@,62006 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
49020: 246e fffc moveal %fp@(-4),%a2
49024: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
49026: 7001 moveq #1,%d0
49028: 13c0 0006 1f88 moveb %d0,61f88 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
4902e: 4ef9 0004 a782 jmp 4a782 <_Thread_Enable_dispatch>
49034: 9081 subl %d1,%d0
49036: 2f00 movel %d0,%sp@-
49038: 4878 0001 pea 1 <ADD>
4903c: 4879 0006 202c pea 6202c <_Watchdog_Seconds_chain>
49042: 4eb9 0004 b700 jsr 4b700 <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
49048: 23d2 0006 2002 movel %a2@,62002 <_TOD_Now>
4904e: 588a addql #4,%a2
49050: 4fef 000c lea %sp@(12),%sp
49054: 23d2 0006 2006 movel %a2@,62006 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
4905a: 246e fffc moveal %fp@(-4),%a2
4905e: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
49060: 7001 moveq #1,%d0
49062: 13c0 0006 1f88 moveb %d0,61f88 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
49068: 4ef9 0004 a782 jmp 4a782 <_Thread_Enable_dispatch>
...
00047690 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
47690: 4e56 ffec linkw %fp,#-20
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
47694: 2239 0005 dbf0 movel 5dbf0 <Configuration+0xc>,%d1
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
4769a: 48d7 040c moveml %d2-%d3/%a2,%sp@
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
4769e: 240e movel %fp,%d2
476a0: 5182 subql #8,%d2
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
476a2: 263c 0000 03e8 movel #1000,%d3
476a8: 4c03 1800 mulsl %d3,%d1
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
476ac: 45f9 0004 97dc lea 497dc <_Timespec_Add_to>,%a2
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
476b2: 2039 0005 f550 movel 5f550 <_Watchdog_Ticks_since_boot>,%d0
476b8: 5280 addql #1,%d0
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
476ba: 2f02 movel %d2,%sp@-
476bc: 4879 0005 f4c2 pea 5f4c2 <_TOD_Uptime>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
476c2: 2d41 fffc movel %d1,%fp@(-4)
476c6: 42ae fff8 clrl %fp@(-8)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
476ca: 23c0 0005 f550 movel %d0,5f550 <_Watchdog_Ticks_since_boot>
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
476d0: 4e92 jsr %a2@
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
476d2: 2f02 movel %d2,%sp@-
476d4: 4879 0005 f4d2 pea 5f4d2 <_TOD_Now>
476da: 4e92 jsr %a2@
while ( seconds ) {
476dc: 4fef 0010 lea %sp@(16),%sp
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
476e0: 2400 movel %d0,%d2
while ( seconds ) {
476e2: 6716 beqs 476fa <_TOD_Tickle_ticks+0x6a>
476e4: 45f9 0004 9d20 lea 49d20 <_Watchdog_Tickle>,%a2
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
476ea: 4879 0005 f4fc pea 5f4fc <_Watchdog_Seconds_chain>
_Watchdog_Tickle_seconds();
seconds--;
476f0: 5382 subql #1,%d2
476f2: 4e92 jsr %a2@
_Timestamp_Add_to( &_TOD_Uptime, &tick );
/* we do not care how much the uptime changed */
/* Update the timespec format TOD */
seconds = _Timestamp_Add_to_at_tick( &_TOD_Now, &tick );
while ( seconds ) {
476f4: 588f addql #4,%sp
476f6: 4a82 tstl %d2
476f8: 66f0 bnes 476ea <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
476fa: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
47700: 4e5e unlk %fp <== NOT EXECUTED
000476b8 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
476b8: 4e56 0000 linkw %fp,#0
476bc: 206e 0008 moveal %fp@(8),%a0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
476c0: 2039 0006 0330 movel 60330 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
476c6: 2f02 movel %d2,%sp@-
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
476c8: 4a88 tstl %a0
476ca: 6762 beqs 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
476cc: 243c 000f 4240 movel #1000000,%d2
476d2: 4c40 2002 remul %d0,%d2,%d2
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
476d6: b4a8 0018 cmpl %a0@(24),%d2
476da: 6352 blss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
476dc: 703b moveq #59,%d0
476de: b0a8 0014 cmpl %a0@(20),%d0
476e2: 654a bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
476e4: b0a8 0010 cmpl %a0@(16),%d0
476e8: 6544 bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
476ea: 7217 moveq #23,%d1
476ec: b2a8 000c cmpl %a0@(12),%d1
476f0: 653c bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
476f2: 2028 0004 movel %a0@(4),%d0
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
476f6: 6736 beqs 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month == 0) ||
476f8: 740c moveq #12,%d2
476fa: b480 cmpl %d0,%d2
476fc: 6530 bcss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
476fe: 2210 movel %a0@,%d1
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
47700: 0c81 0000 07c3 cmpil #1987,%d1
47706: 6326 blss 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
47708: 2068 0008 moveal %a0@(8),%a0
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
4770c: 4a88 tstl %a0
4770e: 671e beqs 4772e <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
47710: 143c 0003 moveb #3,%d2
47714: c282 andl %d2,%d1
47716: 661e bnes 47736 <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
47718: 43f9 0005 f4b6 lea 5f4b6 <_TOD_Days_per_month>,%a1
4771e: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
47722: b1c0 cmpal %d0,%a0
47724: 53c0 sls %d0
47726: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
47728: 241f movel %sp@+,%d2
4772a: 4e5e unlk %fp
4772c: 4e75 rts
4772e: 241f movel %sp@+,%d2
47730: 4e5e unlk %fp
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
47732: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
47734: 4e75 rts
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
47736: 43f9 0005 f4b6 lea 5f4b6 <_TOD_Days_per_month>,%a1
4773c: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
47740: b1c0 cmpal %d0,%a0
47742: 53c0 sls %d0
47744: 4480 negl %d0
47746: 60e0 bras 47728 <_TOD_Validate+0x70>
00048824 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48824: 4e56 fff0 linkw %fp,#-16
48828: 48d7 041c moveml %d2-%d4/%a2,%sp@
4882c: 246e 0008 moveal %fp@(8),%a2
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
48830: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48834: 242e 000c movel %fp@(12),%d2
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
48838: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4883a: 182e 0013 moveb %fp@(19),%d4
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
4883e: 4eb9 0004 9608 jsr 49608 <_Thread_Set_transient>
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
48844: 588f addql #4,%sp
48846: b4aa 0014 cmpl %a2@(20),%d2
4884a: 670c beqs 48858 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
4884c: 2f02 movel %d2,%sp@-
4884e: 2f0a movel %a2,%sp@-
48850: 4eb9 0004 95a4 jsr 495a4 <_Thread_Set_priority>
48856: 508f addql #8,%sp
_ISR_Disable( level );
48858: 203c 0000 0700 movel #1792,%d0
4885e: 40c2 movew %sr,%d2
48860: 8082 orl %d2,%d0
48862: 46c0 movew %d0,%sr
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
48864: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
48868: 7204 moveq #4,%d1
4886a: b280 cmpl %d0,%d1
4886c: 6738 beqs 488a6 <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
4886e: 44c3 movew %d3,%ccr
48870: 6708 beqs 4887a <_Thread_Change_priority+0x56> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
48872: 72fb moveq #-5,%d1
48874: c280 andl %d0,%d1
48876: 2541 0010 movel %d1,%a2@(16)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
4887a: 46c2 movew %d2,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
4887c: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
48882: 660a bnes 4888e <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
48884: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4888a: 4e5e unlk %fp
4888c: 4e75 rts
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
4888e: 2d4a 000c movel %a2,%fp@(12)
48892: 2d6a 0044 0008 movel %a2@(68),%fp@(8)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
48898: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4889e: 4e5e unlk %fp
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
488a0: 4ef9 0004 94f8 jmp 494f8 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
488a6: 44c3 movew %d3,%ccr
488a8: 6714 beqs 488be <_Thread_Change_priority+0x9a> <== NEVER TAKEN
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
488aa: 42aa 0010 clrl %a2@(16)
if ( prepend_it )
488ae: 4a04 tstb %d4
488b0: 6748 beqs 488fa <_Thread_Change_priority+0xd6>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
488b2: 2f0a movel %a2,%sp@-
488b4: 2079 0005 db38 moveal 5db38 <_Scheduler+0x28>,%a0
488ba: 4e90 jsr %a0@
488bc: 588f addql #4,%sp
_Scheduler_Enqueue_first( the_thread );
else
_Scheduler_Enqueue( the_thread );
}
_ISR_Flash( level );
488be: 203c 0000 0700 movel #1792,%d0
488c4: 46c2 movew %d2,%sr
488c6: 8082 orl %d2,%d0
488c8: 46c0 movew %d0,%sr
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
488ca: 2079 0005 db18 moveal 5db18 <_Scheduler+0x8>,%a0
488d0: 4e90 jsr %a0@
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
488d2: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
488d8: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
488de: 670e beqs 488ee <_Thread_Change_priority+0xca>
488e0: 4a28 0074 tstb %a0@(116)
488e4: 6708 beqs 488ee <_Thread_Change_priority+0xca>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
488e6: 7001 moveq #1,%d0
488e8: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
_ISR_Enable( level );
488ee: 46c2 movew %d2,%sr
}
488f0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
488f6: 4e5e unlk %fp
488f8: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
488fa: 2f0a movel %a2,%sp@-
488fc: 2079 0005 db34 moveal 5db34 <_Scheduler+0x24>,%a0
48902: 4e90 jsr %a0@
48904: 588f addql #4,%sp
48906: 60b6 bras 488be <_Thread_Change_priority+0x9a>
00048964 <_Thread_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
48964: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
48966: 4e56 0000 linkw %fp,#0
4896a: 2f0b movel %a3,%sp@-
4896c: 266e 0008 moveal %fp@(8),%a3
48970: 2f0a movel %a2,%sp@-
48972: 246e 000c moveal %fp@(12),%a2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48976: 206b 0018 moveal %a3@(24),%a0
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
4897a: 302a 000a movew %a2@(10),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4897e: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
48982: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
48988: 5380 subql #1,%d0
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
4898a: 2f0a movel %a2,%sp@-
4898c: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
48992: 4eb9 0004 9a60 jsr 49a60 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
48998: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
4899e: 5280 addql #1,%d0
489a0: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
489a6: 2f0a movel %a2,%sp@-
489a8: 2f0b movel %a3,%sp@-
489aa: 4eb9 0004 7c18 jsr 47c18 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
489b0: 4878 0001 pea 1 <ADD>
489b4: 2f0a movel %a2,%sp@-
489b6: 4eb9 0004 95bc jsr 495bc <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
489bc: 2f0a movel %a2,%sp@-
489be: 4eb9 0004 93f4 jsr 493f4 <_Thread_queue_Extract_with_proxy>
489c4: 4fef 0018 lea %sp@(24),%sp
489c8: 4a00 tstb %d0
489ca: 660a bnes 489d6 <_Thread_Close+0x72>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
489cc: 7002 moveq #2,%d0
489ce: b0aa 0050 cmpl %a2@(80),%d0
489d2: 6700 0088 beqw 48a5c <_Thread_Close+0xf8>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Free(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.free( the_thread );
489d6: 2f0a movel %a2,%sp@-
489d8: 2079 0005 db2c moveal 5db2c <_Scheduler+0x1c>,%a0
489de: 4e90 jsr %a0@
/*
* The thread might have been FP. So deal with that.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
489e0: 588f addql #4,%sp
489e2: b5f9 0005 f4ca cmpal 5f4ca <_Thread_Allocated_fp>,%a2
489e8: 6736 beqs 48a20 <_Thread_Close+0xbc>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
_Workspace_Free( the_thread->Start.fp_context );
489ea: 2f2a 00b8 movel %a2@(184),%sp@-
489ee: 47f9 0004 9e1e lea 49e1e <_Workspace_Free>,%a3
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
489f4: 42aa 00f4 clrl %a2@(244)
_Workspace_Free( the_thread->Start.fp_context );
489f8: 4e93 jsr %a3@
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
489fa: 2f0a movel %a2,%sp@-
489fc: 4eb9 0004 96b4 jsr 496b4 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
48a02: 2f2a 0104 movel %a2@(260),%sp@-
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
48a06: 42aa 00bc clrl %a2@(188)
_Workspace_Free( the_thread->extensions );
48a0a: 4e93 jsr %a3@
the_thread->extensions = NULL;
}
48a0c: 266e fffc moveal %fp@(-4),%a3
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
48a10: 4fef 000c lea %sp@(12),%sp
48a14: 42aa 0104 clrl %a2@(260)
}
48a18: 246e fff8 moveal %fp@(-8),%a2
48a1c: 4e5e unlk %fp
48a1e: 4e75 rts
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
_Workspace_Free( the_thread->Start.fp_context );
48a20: 2f2a 00b8 movel %a2@(184),%sp@-
48a24: 47f9 0004 9e1e lea 49e1e <_Workspace_Free>,%a3
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
48a2a: 42aa 00f4 clrl %a2@(244)
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
48a2e: 42b9 0005 f4ca clrl 5f4ca <_Thread_Allocated_fp>
_Workspace_Free( the_thread->Start.fp_context );
48a34: 4e93 jsr %a3@
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
48a36: 2f0a movel %a2,%sp@-
48a38: 4eb9 0004 96b4 jsr 496b4 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
48a3e: 2f2a 0104 movel %a2@(260),%sp@-
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
48a42: 42aa 00bc clrl %a2@(188)
_Workspace_Free( the_thread->extensions );
48a46: 4e93 jsr %a3@
the_thread->extensions = NULL;
}
48a48: 266e fffc moveal %fp@(-4),%a3
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
_Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
48a4c: 4fef 000c lea %sp@(12),%sp
48a50: 42aa 0104 clrl %a2@(260)
}
48a54: 246e fff8 moveal %fp@(-8),%a2
48a58: 4e5e unlk %fp
48a5a: 4e75 rts
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
48a5c: 486a 0048 pea %a2@(72)
48a60: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
48a66: 588f addql #4,%sp
48a68: 2079 0005 db2c moveal 5db2c <_Scheduler+0x1c>,%a0
48a6e: 2f0a movel %a2,%sp@-
48a70: 4e90 jsr %a0@
/*
* The thread might have been FP. So deal with that.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
48a72: 588f addql #4,%sp
48a74: b5f9 0005 f4ca cmpal 5f4ca <_Thread_Allocated_fp>,%a2
48a7a: 6600 ff6e bnew 489ea <_Thread_Close+0x86>
48a7e: 60a0 bras 48a20 <_Thread_Close+0xbc> <== NOT EXECUTED
00048b30 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48b30: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
48b34: 486e fffc pea %fp@(-4)
48b38: 2f2e 0008 movel %fp@(8),%sp@-
48b3c: 4eb9 0004 8cfc jsr 48cfc <_Thread_Get>
switch ( location ) {
48b42: 508f addql #8,%sp
48b44: 4aae fffc tstl %fp@(-4)
48b48: 661e bnes 48b68 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
48b4a: 2f3c 1000 0018 movel #268435480,%sp@-
48b50: 2f00 movel %d0,%sp@-
48b52: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
48b58: 508f addql #8,%sp
48b5a: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
48b60: 5380 subql #1,%d0
48b62: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
48b68: 4e5e unlk %fp <== NOT EXECUTED
00048b6c <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
48b6c: 4e56 ffc8 linkw %fp,#-56
48b70: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
48b74: 283c 0000 0700 movel #1792,%d4
48b7a: 2004 movel %d4,%d0
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
48b7c: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
48b82: 40c1 movew %sr,%d1
48b84: 8081 orl %d1,%d0
48b86: 46c0 movew %d0,%sr
while ( _Thread_Dispatch_necessary == true ) {
48b88: 1039 0005 f5f0 moveb 5f5f0 <_Per_CPU_Information+0x18>,%d0
48b8e: 6700 0120 beqw 48cb0 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48b92: 7001 moveq #1,%d0
48b94: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
48b9a: 2679 0005 f5e8 moveal 5f5e8 <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48ba0: 4200 clrb %d0
_Thread_Executing = heir;
48ba2: 23cb 0005 f5e4 movel %a3,5f5e4 <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48ba8: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
48bae: b7ca cmpal %a2,%a3
48bb0: 6700 00fe beqw 48cb0 <_Thread_Dispatch+0x144>
48bb4: 260e movel %fp,%d3
48bb6: 240e movel %fp,%d2
48bb8: 5183 subql #8,%d3
48bba: 2e3c 0004 bdf8 movel #310776,%d7
48bc0: 0682 ffff fff0 addil #-16,%d2
48bc6: 2c3c 0004 9824 movel #301092,%d6
48bcc: 2a3c 0004 97dc movel #301020,%d5
48bd2: 4bf9 0004 9aec lea 49aec <_User_extensions_Thread_switch>,%a5
48bd8: 49f9 0004 9e6c lea 49e6c <_CPU_Context_switch>,%a4
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
48bde: 7001 moveq #1,%d0
48be0: b0ab 007a cmpl %a3@(122),%d0
48be4: 6700 00e2 beqw 48cc8 <_Thread_Dispatch+0x15c>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
48be8: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
48bea: 2f03 movel %d3,%sp@-
48bec: 2047 moveal %d7,%a0
48bee: 4e90 jsr %a0@
_Timestamp_Subtract(
48bf0: 2046 moveal %d6,%a0
48bf2: 2f02 movel %d2,%sp@-
48bf4: 2f03 movel %d3,%sp@-
48bf6: 4879 0005 f4f4 pea 5f4f4 <_Thread_Time_of_last_context_switch>
48bfc: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
48bfe: 2045 moveal %d5,%a0
48c00: 2f02 movel %d2,%sp@-
48c02: 486a 0082 pea %a2@(130)
48c06: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
48c08: 2079 0005 f4ce moveal 5f4ce <_Thread_libc_reent>,%a0
48c0e: 4fef 0018 lea %sp@(24),%sp
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
48c12: 202e fff8 movel %fp@(-8),%d0
48c16: 222e fffc movel %fp@(-4),%d1
48c1a: 23c0 0005 f4f4 movel %d0,5f4f4 <_Thread_Time_of_last_context_switch>
48c20: 23c1 0005 f4f8 movel %d1,5f4f8 <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
48c26: 4a88 tstl %a0
48c28: 6708 beqs 48c32 <_Thread_Dispatch+0xc6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
48c2a: 2550 00f8 movel %a0@,%a2@(248)
*_Thread_libc_reent = heir->libc_reent;
48c2e: 20ab 00f8 movel %a3@(248),%a0@
}
_User_extensions_Thread_switch( executing, heir );
48c32: 2f0b movel %a3,%sp@-
48c34: 2f0a movel %a2,%sp@-
48c36: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
48c38: 486b 00c0 pea %a3@(192)
48c3c: 486a 00c0 pea %a2@(192)
48c40: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
48c42: 4fef 0010 lea %sp@(16),%sp
48c46: 4aaa 00f4 tstl %a2@(244)
48c4a: 672c beqs 48c78 <_Thread_Dispatch+0x10c>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
48c4c: 2079 0005 f4ca moveal 5f4ca <_Thread_Allocated_fp>,%a0
48c52: b1ca cmpal %a2,%a0
48c54: 6722 beqs 48c78 <_Thread_Dispatch+0x10c>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
48c56: 4a88 tstl %a0
48c58: 670c beqs 48c66 <_Thread_Dispatch+0xfa>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
48c5a: 4868 00f4 pea %a0@(244)
48c5e: 4eb9 0004 9f92 jsr 49f92 <_CPU_Context_save_fp>
48c64: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
48c66: 486a 00f4 pea %a2@(244)
48c6a: 4eb9 0004 9fca jsr 49fca <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
48c70: 588f addql #4,%sp
48c72: 23ca 0005 f4ca movel %a2,5f4ca <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
48c78: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
48c7e: 2004 movel %d4,%d0
48c80: 40c1 movew %sr,%d1
48c82: 8081 orl %d1,%d0
48c84: 46c0 movew %d0,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
48c86: 1039 0005 f5f0 moveb 5f5f0 <_Per_CPU_Information+0x18>,%d0
48c8c: 6722 beqs 48cb0 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48c8e: 7001 moveq #1,%d0
48c90: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
48c96: 2679 0005 f5e8 moveal 5f5e8 <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48c9c: 4200 clrb %d0
_Thread_Executing = heir;
48c9e: 23cb 0005 f5e4 movel %a3,5f5e4 <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Thread_Dispatch_necessary = false;
48ca4: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
48caa: b5cb cmpal %a3,%a2
48cac: 6600 ff30 bnew 48bde <_Thread_Dispatch+0x72>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
48cb0: 42b9 0005 f448 clrl 5f448 <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
48cb6: 46c1 movew %d1,%sr
_API_extensions_Run_postswitch();
48cb8: 4eb9 0004 7056 jsr 47056 <_API_extensions_Run_postswitch>
}
48cbe: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
48cc4: 4e5e unlk %fp
48cc6: 4e75 rts
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
48cc8: 41f9 0005 f400 lea 5f400 <_Thread_Ticks_per_timeslice>,%a0
48cce: 2750 0076 movel %a0@,%a3@(118)
48cd2: 6000 ff14 braw 48be8 <_Thread_Dispatch+0x7c>
0004d910 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4d910: 4e56 0000 linkw %fp,#0
4d914: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4d916: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4d91c: 2f02 movel %d2,%sp@-
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4d91e: 222a 00a8 movel %a2@(168),%d1
_ISR_Set_level(level);
4d922: 40c0 movew %sr,%d0
4d924: e189 lsll #8,%d1
4d926: 0280 0000 f8ff andil #63743,%d0
4d92c: 8081 orl %d1,%d0
4d92e: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
4d930: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4d932: 1439 0005 ec0c moveb 5ec0c <doneConstructors.3351>,%d2
doneConstructors = 1;
4d938: 13c0 0005 ec0c moveb %d0,5ec0c <doneConstructors.3351>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4d93e: 4aaa 00f4 tstl %a2@(244)
4d942: 6720 beqs 4d964 <_Thread_Handler+0x54>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
4d944: 2079 0005 f4ca moveal 5f4ca <_Thread_Allocated_fp>,%a0
4d94a: b1ca cmpal %a2,%a0
4d94c: 6716 beqs 4d964 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4d94e: 4a88 tstl %a0
4d950: 670c beqs 4d95e <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4d952: 4868 00f4 pea %a0@(244)
4d956: 4eb9 0004 9f92 jsr 49f92 <_CPU_Context_save_fp>
4d95c: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4d95e: 23ca 0005 f4ca movel %a2,5f4ca <_Thread_Allocated_fp>
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
4d964: 2f0a movel %a2,%sp@-
4d966: 4eb9 0004 9938 jsr 49938 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4d96c: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
4d972: 588f addql #4,%sp
4d974: 4a02 tstb %d2
4d976: 6746 beqs 4d9be <_Thread_Handler+0xae>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d978: 4aaa 0092 tstl %a2@(146)
4d97c: 6718 beqs 4d996 <_Thread_Handler+0x86> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
4d97e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4d980: 4eb9 0004 9976 jsr 49976 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4d986: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
4d98a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4d98e: 42a7 clrl %sp@- <== NOT EXECUTED
4d990: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred> <== NOT EXECUTED
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4d996: 2f2a 009a movel %a2@(154),%sp@-
4d99a: 206a 008e moveal %a2@(142),%a0
4d99e: 4e90 jsr %a0@
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4d9a0: 588f addql #4,%sp
4d9a2: 2540 0028 movel %d0,%a2@(40)
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
4d9a6: 2f0a movel %a2,%sp@-
4d9a8: 4eb9 0004 9976 jsr 49976 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4d9ae: 4878 0005 pea 5 <COMPARE>
4d9b2: 4878 0001 pea 1 <ADD>
4d9b6: 42a7 clrl %sp@-
4d9b8: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
4d9be: 4eb9 0005 bf60 jsr 5bf60 <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d9c4: 4aaa 0092 tstl %a2@(146)
4d9c8: 66b4 bnes 4d97e <_Thread_Handler+0x6e> <== NEVER TAKEN
4d9ca: 60ca bras 4d996 <_Thread_Handler+0x86>
00048fa4 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48fa4: 4e56 0000 linkw %fp,#0
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
48fa8: 4ab9 0005 dc08 tstl 5dc08 <Configuration+0x24>
48fae: 57c1 seq %d1
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48fb0: 4ab9 0005 dc04 tstl 5dc04 <Configuration+0x20>
48fb6: 57c0 seq %d0
== (!Configuration.stack_free_hook) ) )
48fb8: 4481 negl %d1
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48fba: 4480 negl %d0
48fbc: b380 eorl %d1,%d0
uint32_t maximum_internal_threads;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
48fbe: 2239 0005 dbf4 movel 5dbf4 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
48fc4: 2079 0005 dbec moveal 5dbec <Configuration+0x8>,%a0
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48fca: 4a00 tstb %d0
48fcc: 6650 bnes 4901e <_Thread_Handler_initialization+0x7a>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
48fce: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Thread_Dispatch_necessary = false;
48fd2: 4200 clrb %d0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
48fd4: 42a7 clrl %sp@-
48fd6: 4878 010c pea 10c <DBL_MANT_DIG+0xd7>
48fda: 4878 0001 pea 1 <ADD>
48fde: 4878 0001 pea 1 <ADD>
48fe2: 4878 0001 pea 1 <ADD>
48fe6: 4879 0005 f558 pea 5f558 <_Thread_Internal_information>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Thread_Dispatch_necessary = false;
48fec: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
_Thread_Executing = NULL;
48ff2: 42b9 0005 f5e4 clrl 5f5e4 <_Per_CPU_Information+0xc>
_Thread_Heir = NULL;
48ff8: 42b9 0005 f5e8 clrl 5f5e8 <_Per_CPU_Information+0x10>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
48ffe: 42b9 0005 f4ca clrl 5f4ca <_Thread_Allocated_fp>
#endif
_Thread_Maximum_extensions = maximum_extensions;
49004: 23c8 0005 f4da movel %a0,5f4da <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
4900a: 23c1 0005 f400 movel %d1,5f400 <_Thread_Ticks_per_timeslice>
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
49010: 4eb9 0004 80ac jsr 480ac <_Objects_Initialize_information>
49016: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
4901a: 4e5e unlk %fp
4901c: 4e75 rts
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
4901e: 4878 000e pea e <OPER1+0x2>
49022: 4878 0001 pea 1 <ADD>
49026: 42a7 clrl %sp@-
49028: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
...
0004d190 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4d190: 4e56 0000 linkw %fp,#0
4d194: 2f0a movel %a2,%sp@-
4d196: 246e 0008 moveal %fp@(8),%a2
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4d19a: 256a 00a0 007a movel %a2@(160),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4d1a0: 256a 00a4 007e movel %a2@(164),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4d1a6: 256e 000c 0096 movel %fp@(12),%a2@(150)
the_thread->Start.numeric_argument = numeric_argument;
4d1ac: 256e 0010 009a movel %fp@(16),%a2@(154)
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4d1b2: 156a 009e 0074 moveb %a2@(158),%a2@(116)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4d1b8: 42aa 001c clrl %a2@(28)
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
4d1bc: 2f0a movel %a2,%sp@-
4d1be: 4eb9 0004 a008 jsr 4a008 <_Thread_queue_Extract_with_proxy>
4d1c4: 588f addql #4,%sp
4d1c6: 4a00 tstb %d0
4d1c8: 6608 bnes 4d1d2 <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4d1ca: 7002 moveq #2,%d0
4d1cc: b0aa 0050 cmpl %a2@(80),%d0
4d1d0: 672a beqs 4d1fc <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4d1d2: 202a 00ac movel %a2@(172),%d0
4d1d6: b0aa 0014 cmpl %a2@(20),%d0
4d1da: 6718 beqs 4d1f4 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
4d1dc: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4d1e0: 2d4a 0008 movel %a2,%fp@(8)
}
}
4d1e4: 246e fffc moveal %fp@(-4),%a2
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4d1e8: 2d40 000c movel %d0,%fp@(12)
}
}
4d1ec: 4e5e unlk %fp
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4d1ee: 4ef9 0004 a248 jmp 4a248 <_Thread_Set_priority>
}
}
4d1f4: 246e fffc moveal %fp@(-4),%a2
4d1f8: 4e5e unlk %fp
4d1fa: 4e75 rts
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
4d1fc: 486a 0048 pea %a2@(72)
4d200: 4eb9 0004 a968 jsr 4a968 <_Watchdog_Remove>
4d206: 588f addql #4,%sp
4d208: 60c8 bras 4d1d2 <_Thread_Reset+0x42>
...
0004a1b8 <_Thread_Restart>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
4a1b8: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4a1ba: 4e56 0000 linkw %fp,#0
4a1be: 2f0a movel %a2,%sp@-
4a1c0: 246e 0008 moveal %fp@(8),%a2
4a1c4: c0aa 0010 andl %a2@(16),%d0
if ( !_States_Is_dormant( the_thread->current_state ) ) {
4a1c8: 670a beqs 4a1d4 <_Thread_Restart+0x1c>
return true;
}
return false;
}
4a1ca: 246e fffc moveal %fp@(-4),%a2
4a1ce: 4e5e unlk %fp
_Thread_Restart_self();
return true;
}
return false;
4a1d0: 4200 clrb %d0
}
4a1d2: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
4a1d4: 2f0a movel %a2,%sp@-
4a1d6: 4eb9 0004 a2ac jsr 4a2ac <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
4a1dc: 2f2e 0010 movel %fp@(16),%sp@-
4a1e0: 2f2e 000c movel %fp@(12),%sp@-
4a1e4: 2f0a movel %a2,%sp@-
4a1e6: 4eb9 0004 d190 jsr 4d190 <_Thread_Reset>
_Thread_Load_environment( the_thread );
4a1ec: 2f0a movel %a2,%sp@-
4a1ee: 4eb9 0004 ce7c jsr 4ce7c <_Thread_Load_environment>
_Thread_Ready( the_thread );
4a1f4: 2f0a movel %a2,%sp@-
4a1f6: 4eb9 0004 d160 jsr 4d160 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
4a1fc: 2f0a movel %a2,%sp@-
4a1fe: 4eb9 0004 a74c jsr 4a74c <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
4a204: 4fef 001c lea %sp@(28),%sp
4a208: b5f9 0006 057c cmpal 6057c <_Per_CPU_Information+0xc>,%a2
4a20e: 670a beqs 4a21a <_Thread_Restart+0x62>
return true;
}
return false;
}
4a210: 246e fffc moveal %fp@(-4),%a2
4a214: 4e5e unlk %fp
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
4a216: 7001 moveq #1,%d0
}
return false;
}
4a218: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
4a21a: 4aaa 00f4 tstl %a2@(244)
4a21e: 6712 beqs 4a232 <_Thread_Restart+0x7a>
_Context_Restore_fp( &_Thread_Executing->fp_context );
4a220: 486a 00f4 pea %a2@(244)
4a224: 4eb9 0004 acb2 jsr 4acb2 <_CPU_Context_restore_fp>
4a22a: 2479 0006 057c moveal 6057c <_Per_CPU_Information+0xc>,%a2
4a230: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
4a232: 486a 00c0 pea %a2@(192)
4a236: 4eb9 0004 ab6a jsr 4ab6a <_CPU_Context_Restart_self>
4a23c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
4a240: 588f addql #4,%sp <== NOT EXECUTED
4a242: 4e5e unlk %fp <== NOT EXECUTED
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
4a244: 7001 moveq #1,%d0 <== NOT EXECUTED
}
return false;
}
000496b4 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
496b4: 4e56 0000 linkw %fp,#0
496b8: 206e 0008 moveal %fp@(8),%a0
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
496bc: 2279 0005 dc08 moveal 5dc08 <Configuration+0x24>,%a1
496c2: 4a89 tstl %a1
496c4: 670a beqs 496d0 <_Thread_Stack_Free+0x1c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
496c6: 2d68 00b4 0008 movel %a0@(180),%fp@(8)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
496cc: 4e5e unlk %fp
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
496ce: 4ed1 jmp %a1@
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
496d0: 2d68 00b4 0008 movel %a0@(180),%fp@(8)
}
496d6: 4e5e unlk %fp
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
496d8: 4ef9 0004 9e1e jmp 49e1e <_Workspace_Free>
...
000487bc <_Thread_blocking_operation_Cancel>:
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
487bc: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
487be: 4e56 0000 linkw %fp,#0
487c2: 202e 0010 movel %fp@(16),%d0
487c6: 2f0a movel %a2,%sp@-
487c8: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
487cc: 42aa 0044 clrl %a2@(68)
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
487d0: b2aa 0050 cmpl %a2@(80),%d1
487d4: 671c beqs 487f2 <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
487d6: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
487d8: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
487dc: 246e fffc moveal %fp@(-4),%a2
487e0: 203c 1003 fff8 movel #268697592,%d0
487e6: 2d40 000c movel %d0,%fp@(12)
487ea: 4e5e unlk %fp
487ec: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
487f2: 123c 0003 moveb #3,%d1
487f6: 2541 0050 movel %d1,%a2@(80)
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
487fa: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
487fc: 486a 0048 pea %a2@(72)
48800: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
48806: 588f addql #4,%sp
48808: 203c 1003 fff8 movel #268697592,%d0
4880e: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
48812: 246e fffc moveal %fp@(-4),%a2
48816: 2d40 000c movel %d0,%fp@(12)
4881a: 4e5e unlk %fp
4881c: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
...
000490ac <_Thread_queue_Dequeue_priority>:
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
490ac: 203c 0000 0700 movel #1792,%d0
*/
Thread_Control *_Thread_queue_Dequeue_priority(
Thread_queue_Control *the_thread_queue
)
{
490b2: 4e56 ffe8 linkw %fp,#-24
490b6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
490ba: 266e 0008 moveal %fp@(8),%a3
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
490be: 40c3 movew %sr,%d3
490c0: 8083 orl %d3,%d0
490c2: 46c0 movew %d0,%sr
for( index=0 ;
490c4: 4280 clrl %d0
Chain_Node *new_second_node;
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
490c6: 204b moveal %a3,%a0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
490c8: 2400 movel %d0,%d2
490ca: 2200 movel %d0,%d1
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
490cc: 5280 addql #1,%d0
490ce: e58a lsll #2,%d2
490d0: e989 lsll #4,%d1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
490d2: 2450 moveal %a0@,%a2
490d4: 9282 subl %d2,%d1
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
490d6: 41e8 000c lea %a0@(12),%a0
490da: 43f3 1804 lea %a3@(00000004,%d1:l),%a1
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
490de: b3ca cmpal %a2,%a1
490e0: 6616 bnes 490f8 <_Thread_queue_Dequeue_priority+0x4c>
Chain_Node *last_node;
Chain_Node *next_node;
Chain_Node *previous_node;
_ISR_Disable( level );
for( index=0 ;
490e2: 7204 moveq #4,%d1
490e4: b280 cmpl %d0,%d1
490e6: 66e0 bnes 490c8 <_Thread_queue_Dequeue_priority+0x1c>
}
/*
* We did not find a thread to unblock.
*/
_ISR_Enable( level );
490e8: 46c3 movew %d3,%sr
return NULL;
490ea: 4282 clrl %d2
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
490ec: 2002 movel %d2,%d0
490ee: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
490f4: 4e5e unlk %fp
490f6: 4e75 rts
490f8: 200a movel %a2,%d0
_ISR_Disable( level );
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++ ) {
if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) {
the_thread = (Thread_Control *) _Chain_First(
490fa: 240a movel %a2,%d2
490fc: 0680 0000 003c addil #60,%d0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49102: 206a 0038 moveal %a2@(56),%a0
dequeue:
the_thread->Wait.queue = NULL;
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
next_node = the_thread->Object.Node.next;
49106: 2252 moveal %a2@,%a1
previous_node = the_thread->Object.Node.previous;
49108: 266a 0004 moveal %a2@(4),%a3
*/
_ISR_Enable( level );
return NULL;
dequeue:
the_thread->Wait.queue = NULL;
4910c: 42aa 0044 clrl %a2@(68)
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 ) ) {
49110: b088 cmpl %a0,%d0
49112: 6700 008a beqw 4919e <_Thread_queue_Dequeue_priority+0xf2>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49116: 286a 0040 moveal %a2@(64),%a4
next_node = the_thread->Object.Node.next;
previous_node = the_thread->Object.Node.previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
4911a: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4911c: 2348 0004 movel %a0,%a1@(4)
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
49120: 2688 movel %a0,%a3@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
49122: 214b 0004 movel %a3,%a0@(4)
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
49126: 2089 movel %a1,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
49128: 226a 0040 moveal %a2@(64),%a1
4912c: b3ea 0038 cmpal %a2@(56),%a1
49130: 6716 beqs 49148 <_Thread_queue_Dequeue_priority+0x9c>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
49132: 214d 0038 movel %a5,%a0@(56)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
49136: 43e8 003c lea %a0@(60),%a1
4913a: 2889 movel %a1,%a4@
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
4913c: 43e8 0038 lea %a0@(56),%a1
49140: 2b49 0004 movel %a1,%a5@(4)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
49144: 214c 0040 movel %a4,%a0@(64)
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
49148: 7002 moveq #2,%d0
4914a: b0aa 0050 cmpl %a2@(80),%d0
4914e: 671e beqs 4916e <_Thread_queue_Dequeue_priority+0xc2>
_ISR_Enable( level );
49150: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
49152: 2f3c 1003 fff8 movel #268697592,%sp@-
49158: 2f0a movel %a2,%sp@-
4915a: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
49160: 508f addql #8,%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49162: 2002 movel %d2,%d0
49164: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4916a: 4e5e unlk %fp
4916c: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4916e: 7203 moveq #3,%d1
49170: 2541 0050 movel %d1,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
49174: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
49176: 486a 0048 pea %a2@(72)
4917a: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
49180: 2f3c 1003 fff8 movel #268697592,%sp@-
49186: 2f0a movel %a2,%sp@-
49188: 4eb9 0004 8908 jsr 48908 <_Thread_Clear_state>
4918e: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
return( the_thread );
}
49192: 2002 movel %d2,%d0
49194: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4919a: 4e5e unlk %fp
4919c: 4e75 rts
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
4919e: 2689 movel %a1,%a3@
next_node->previous = previous_node;
491a0: 234b 0004 movel %a3,%a1@(4)
491a4: 60a2 bras 49148 <_Thread_queue_Dequeue_priority+0x9c>
...
00049250 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
49250: 4e56 ffe0 linkw %fp,#-32
49254: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
49258: 246e 000c moveal %fp@(12),%a2
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4925c: 41ea 003c lea %a2@(60),%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
49260: 49ea 0038 lea %a2@(56),%a4
49264: 266e 0008 moveal %fp@(8),%a3
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
49268: 222a 0014 movel %a2@(20),%d1
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
4926c: 2a01 movel %d1,%d5
4926e: ec8d lsrl #6,%d5
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
49270: 242b 0038 movel %a3@(56),%d2
Chain_Node *tail = _Chain_Tail( the_chain );
49274: 2548 0038 movel %a0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
49278: 254c 0040 movel %a4,%a2@(64)
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
4927c: 42aa 003c clrl %a2@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
49280: 0801 0005 btst #5,%d1
49284: 665e bnes 492e4 <_Thread_queue_Enqueue_priority+0x94>
49286: 700c moveq #12,%d0
49288: 4c00 5800 mulsl %d0,%d5
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
4928c: 2c3c 0000 0700 movel #1792,%d6
49292: 2006 movel %d6,%d0
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
49294: 49f3 5804 lea %a3@(00000004,%d5:l),%a4
49298: 40c3 movew %sr,%d3
4929a: 8083 orl %d3,%d0
4929c: 46c0 movew %d0,%sr
4929e: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
492a0: 2073 5800 moveal %a3@(00000000,%d5:l),%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
492a4: b9c8 cmpal %a0,%a4
492a6: 6700 013a beqw 493e2 <_Thread_queue_Enqueue_priority+0x192>
search_priority = search_thread->current_priority;
492aa: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
492ae: b3c1 cmpal %d1,%a1
492b0: 6418 bccs 492ca <_Thread_queue_Enqueue_priority+0x7a>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
492b2: 2006 movel %d6,%d0
492b4: 46c3 movew %d3,%sr
492b6: 8083 orl %d3,%d0
492b8: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
492ba: 2002 movel %d2,%d0
492bc: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
492c0: 6700 00be beqw 49380 <_Thread_queue_Enqueue_priority+0x130>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
492c4: 2050 moveal %a0@,%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
492c6: b9c8 cmpal %a0,%a4
492c8: 66e0 bnes 492aa <_Thread_queue_Enqueue_priority+0x5a>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
492ca: 202b 0030 movel %a3@(48),%d0
492ce: 7401 moveq #1,%d2
492d0: b480 cmpl %d0,%d2
492d2: 6700 00c4 beqw 49398 <_Thread_queue_Enqueue_priority+0x148>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
492d6: 206e 0010 moveal %fp@(16),%a0
492da: 2084 movel %d4,%a0@
return the_thread_queue->sync_state;
}
492dc: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
492e0: 4e5e unlk %fp
492e2: 4e75 rts
492e4: 700c moveq #12,%d0
492e6: 4c00 5800 mulsl %d0,%d5
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
492ea: 4283 clrl %d3
492ec: 1639 0005 dbe2 moveb 5dbe2 <rtems_maximum_priority>,%d3
_ISR_Disable( level );
492f2: 2c3c 0000 0700 movel #1792,%d6
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
492f8: da8b addl %a3,%d5
492fa: 2845 moveal %d5,%a4
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
492fc: 2243 moveal %d3,%a1
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
492fe: 508c addql #8,%a4
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
49300: 2006 movel %d6,%d0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
49302: 5289 addql #1,%a1
_ISR_Disable( level );
49304: 40c3 movew %sr,%d3
49306: 8083 orl %d3,%d0
49308: 46c0 movew %d0,%sr
4930a: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
4930c: 2054 moveal %a4@,%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4930e: ba88 cmpl %a0,%d5
49310: 6720 beqs 49332 <_Thread_queue_Enqueue_priority+0xe2>
search_priority = search_thread->current_priority;
49312: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
49316: b3c1 cmpal %d1,%a1
49318: 6318 blss 49332 <_Thread_queue_Enqueue_priority+0xe2>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
4931a: 2006 movel %d6,%d0
4931c: 46c3 movew %d3,%sr
4931e: 8083 orl %d3,%d0
49320: 46c0 movew %d0,%sr
49322: 2002 movel %d2,%d0
49324: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
49328: 6736 beqs 49360 <_Thread_queue_Enqueue_priority+0x110>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
4932a: 2068 0004 moveal %a0@(4),%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4932e: ba88 cmpl %a0,%d5
49330: 66e0 bnes 49312 <_Thread_queue_Enqueue_priority+0xc2>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
49332: 202b 0030 movel %a3@(48),%d0
49336: 7401 moveq #1,%d2
49338: b480 cmpl %d0,%d2
4933a: 669a bnes 492d6 <_Thread_queue_Enqueue_priority+0x86>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4933c: 42ab 0030 clrl %a3@(48)
if ( priority == search_priority )
49340: b3c1 cmpal %d1,%a1
49342: 677a beqs 493be <_Thread_queue_Enqueue_priority+0x16e>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
49344: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
49346: 2548 0004 movel %a0,%a2@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
4934a: 2489 movel %a1,%a2@
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
4934c: 234a 0004 movel %a2,%a1@(4)
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
49350: 208a movel %a2,%a0@
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
49352: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
49356: 46c3 movew %d3,%sr
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
49358: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
4935c: 4e5e unlk %fp
4935e: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
49360: 46c3 movew %d3,%sr
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
49362: 4283 clrl %d3
49364: 1639 0005 dbe2 moveb 5dbe2 <rtems_maximum_priority>,%d3
_ISR_Disable( level );
4936a: 2006 movel %d6,%d0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
4936c: 2243 moveal %d3,%a1
4936e: 5289 addql #1,%a1
_ISR_Disable( level );
49370: 40c3 movew %sr,%d3
49372: 8083 orl %d3,%d0
49374: 46c0 movew %d0,%sr
49376: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
49378: 2054 moveal %a4@,%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_Last( header );
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
4937a: ba88 cmpl %a0,%d5
4937c: 6694 bnes 49312 <_Thread_queue_Enqueue_priority+0xc2><== NEVER TAKEN
4937e: 60b2 bras 49332 <_Thread_queue_Enqueue_priority+0xe2>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
49380: 46c3 movew %d3,%sr
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
49382: 2006 movel %d6,%d0
49384: 40c3 movew %sr,%d3
49386: 8083 orl %d3,%d0
49388: 46c0 movew %d0,%sr
4938a: 2803 movel %d3,%d4
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
4938c: 2073 5800 moveal %a3@(00000000,%d5:l),%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) _Chain_First( header );
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
49390: b9c8 cmpal %a0,%a4
49392: 6600 ff16 bnew 492aa <_Thread_queue_Enqueue_priority+0x5a>
49396: 604a bras 493e2 <_Thread_queue_Enqueue_priority+0x192>
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49398: 42ab 0030 clrl %a3@(48)
if ( priority == search_priority )
4939c: b3c1 cmpal %d1,%a1
4939e: 671e beqs 493be <_Thread_queue_Enqueue_priority+0x16e>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
493a0: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
493a4: 2488 movel %a0,%a2@
the_node->previous = previous_node;
493a6: 2549 0004 movel %a1,%a2@(4)
previous_node->next = the_node;
493aa: 228a movel %a2,%a1@
search_node->previous = the_node;
493ac: 214a 0004 movel %a2,%a0@(4)
the_thread->Wait.queue = the_thread_queue;
493b0: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
493b4: 46c3 movew %d3,%sr
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
493b6: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
493ba: 4e5e unlk %fp
493bc: 4e75 rts
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
493be: 49e8 003c lea %a0@(60),%a4
previous_node = search_node->previous;
493c2: 2268 0040 moveal %a0@(64),%a1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
493c6: 248c movel %a4,%a2@
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
493c8: 2549 0004 movel %a1,%a2@(4)
previous_node->next = the_node;
493cc: 228a movel %a2,%a1@
search_node->previous = the_node;
493ce: 214a 0040 movel %a2,%a0@(64)
the_thread->Wait.queue = the_thread_queue;
493d2: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
493d6: 46c4 movew %d4,%sr
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
493d8: 7001 moveq #1,%d0
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
return the_thread_queue->sync_state;
}
493da: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4
493de: 4e5e unlk %fp
493e0: 4e75 rts
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
493e2: 202b 0030 movel %a3@(48),%d0
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
493e6: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
493ea: 7401 moveq #1,%d2
493ec: b480 cmpl %d0,%d2
493ee: 6600 fee6 bnew 492d6 <_Thread_queue_Enqueue_priority+0x86>
493f2: 60a4 bras 49398 <_Thread_queue_Enqueue_priority+0x148>
0004d9cc <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
4d9cc: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4d9d2: 4e56 0000 linkw %fp,#0
4d9d6: 2f0a movel %a2,%sp@-
4d9d8: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
4d9dc: 40c1 movew %sr,%d1
4d9de: 8081 orl %d1,%d0
4d9e0: 46c0 movew %d0,%sr
4d9e2: 202a 0010 movel %a2@(16),%d0
4d9e6: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4d9ec: 6734 beqs 4da22 <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4d9ee: 2252 moveal %a2@,%a1
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d9f0: 7002 moveq #2,%d0
previous = the_node->previous;
4d9f2: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4d9f6: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4d9fa: 2089 movel %a1,%a0@
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
4d9fc: 42aa 0044 clrl %a2@(68)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4da00: b0aa 0050 cmpl %a2@(80),%d0
4da04: 6726 beqs 4da2c <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4da06: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4da08: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4da0c: 246e fffc moveal %fp@(-4),%a2
4da10: 203c 1003 fff8 movel #268697592,%d0
4da16: 2d40 000c movel %d0,%fp@(12)
4da1a: 4e5e unlk %fp
4da1c: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4da22: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4da24: 246e fffc moveal %fp@(-4),%a2
4da28: 4e5e unlk %fp
4da2a: 4e75 rts
4da2c: 7003 moveq #3,%d0
4da2e: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4da32: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4da34: 486a 0048 pea %a2@(72)
4da38: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
4da3e: 588f addql #4,%sp
4da40: 203c 1003 fff8 movel #268697592,%d0
4da46: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4da4a: 246e fffc moveal %fp@(-4),%a2
4da4e: 2d40 000c movel %d0,%fp@(12)
4da52: 4e5e unlk %fp
4da54: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
...
0004c340 <_Thread_queue_Extract_priority_helper>:
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4c340: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
4c346: 4e56 ffec linkw %fp,#-20
4c34a: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4c34e: 246e 000c moveal %fp@(12),%a2
4c352: 142e 0013 moveb %fp@(19),%d2
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4c356: 40c1 movew %sr,%d1
4c358: 8081 orl %d1,%d0
4c35a: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
4c35c: 202a 0010 movel %a2@(16),%d0
4c360: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4c366: 677e beqs 4c3e6 <_Thread_queue_Extract_priority_helper+0xa6><== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
4c368: 200a movel %a2,%d0
4c36a: 0680 0000 003c addil #60,%d0
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
4c370: 2252 moveal %a2@,%a1
previous_node = the_node->previous;
4c372: 266a 0004 moveal %a2@(4),%a3
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c376: 206a 0038 moveal %a2@(56),%a0
*/
next_node = the_node->next;
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
4c37a: b088 cmpl %a0,%d0
4c37c: 6774 beqs 4c3f2 <_Thread_queue_Extract_priority_helper+0xb2>
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c37e: 286a 0040 moveal %a2@(64),%a4
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
4c382: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4c384: 2348 0004 movel %a0,%a1@(4)
new_first_node = _Chain_First( &the_thread->Wait.Block2n );
new_first_thread = (Thread_Control *) new_first_node;
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
4c388: 2688 movel %a0,%a3@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4c38a: 214b 0004 movel %a3,%a0@(4)
last_node = _Chain_Last( &the_thread->Wait.Block2n );
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
4c38e: 2089 movel %a1,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4c390: 202a 0040 movel %a2@(64),%d0
4c394: b0aa 0038 cmpl %a2@(56),%d0
4c398: 6716 beqs 4c3b0 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
4c39a: 214d 0038 movel %a5,%a0@(56)
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
4c39e: 43e8 003c lea %a0@(60),%a1
4c3a2: 2889 movel %a1,%a4@
new_first_node->next = next_node;
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
/* > two threads on 2-n */
head = _Chain_Head( &new_first_thread->Wait.Block2n );
4c3a4: 43e8 0038 lea %a0@(56),%a1
4c3a8: 2b49 0004 movel %a1,%a5@(4)
tail = _Chain_Tail( &new_first_thread->Wait.Block2n );
new_second_node->previous = head;
head->next = new_second_node;
tail->previous = last_node;
4c3ac: 214c 0040 movel %a4,%a0@(64)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4c3b0: 4a02 tstb %d2
4c3b2: 6626 bnes 4c3da <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4c3b4: 7002 moveq #2,%d0
4c3b6: b0aa 0050 cmpl %a2@(80),%d0
4c3ba: 6742 beqs 4c3fe <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4c3bc: 46c1 movew %d1,%sr
4c3be: 2d4a 0008 movel %a2,%fp@(8)
4c3c2: 227c 1003 fff8 moveal #268697592,%a1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c3c8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c3ce: 2d49 000c movel %a1,%fp@(12)
4c3d2: 4e5e unlk %fp
4c3d4: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4c3da: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c3dc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c3e2: 4e5e unlk %fp
4c3e4: 4e75 rts
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4c3e6: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c3e8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c3ee: 4e5e unlk %fp
4c3f0: 4e75 rts
head->next = new_second_node;
tail->previous = last_node;
last_node->next = tail;
}
} else {
previous_node->next = next_node;
4c3f2: 2689 movel %a1,%a3@
next_node->previous = previous_node;
4c3f4: 234b 0004 movel %a3,%a1@(4)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4c3f8: 4a02 tstb %d2
4c3fa: 67b8 beqs 4c3b4 <_Thread_queue_Extract_priority_helper+0x74>
4c3fc: 60dc bras 4c3da <_Thread_queue_Extract_priority_helper+0x9a>
4c3fe: 7003 moveq #3,%d0
4c400: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4c404: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4c406: 486a 0048 pea %a2@(72)
4c40a: 4eb9 0004 9c80 jsr 49c80 <_Watchdog_Remove>
4c410: 588f addql #4,%sp
4c412: 227c 1003 fff8 moveal #268697592,%a1
4c418: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c41c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4c422: 2d49 000c movel %a1,%fp@(12)
4c426: 4e5e unlk %fp
4c428: 4ef9 0004 8908 jmp 48908 <_Thread_Clear_state>
...
00049460 <_Thread_queue_Initialize>:
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
49460: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
49462: 4e56 0000 linkw %fp,#0
49466: 206e 0008 moveal %fp@(8),%a0
4946a: 2f0a movel %a2,%sp@-
4946c: 202e 000c movel %fp@(12),%d0
49470: 2f02 movel %d2,%sp@-
the_thread_queue->state = state;
49472: 216e 0010 0038 movel %fp@(16),%a0@(56)
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
49478: 216e 0014 003c movel %fp@(20),%a0@(60)
States_Control state,
uint32_t timeout_status
)
{
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
4947e: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49482: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
49486: b280 cmpl %d0,%d1
49488: 6716 beqs 494a0 <_Thread_queue_Initialize+0x40>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
4948a: 2448 moveal %a0,%a2
4948c: 588a addql #4,%a2
head->next = tail;
head->previous = NULL;
4948e: 42a8 0004 clrl %a0@(4)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
49492: 208a movel %a2,%a0@
head->next = tail;
head->previous = NULL;
tail->previous = head;
49494: 2148 0008 movel %a0,%a0@(8)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
49498: 241f movel %sp@+,%d2
4949a: 245f moveal %sp@+,%a2
4949c: 4e5e unlk %fp
4949e: 4e75 rts
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
494a0: 2248 moveal %a0,%a1
494a2: 4280 clrl %d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
494a4: 2400 movel %d0,%d2
494a6: 2200 movel %d0,%d1
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494a8: 5280 addql #1,%d0
494aa: e58a lsll #2,%d2
494ac: e989 lsll #4,%d1
head->next = tail;
head->previous = NULL;
494ae: 42a9 0004 clrl %a1@(4)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
494b2: 9282 subl %d2,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
494b4: 45f0 1800 lea %a0@(00000000,%d1:l),%a2
494b8: 234a 0008 movel %a2,%a1@(8)
Chain_Node *tail = _Chain_Tail( the_chain );
494bc: 45f0 1804 lea %a0@(00000004,%d1:l),%a2
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494c0: 7204 moveq #4,%d1
494c2: 228a movel %a2,%a1@
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494c4: 43e9 000c lea %a1@(12),%a1
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494c8: b280 cmpl %d0,%d1
494ca: 67cc beqs 49498 <_Thread_queue_Initialize+0x38> <== NEVER TAKEN
494cc: 2400 movel %d0,%d2
494ce: 2200 movel %d0,%d1
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494d0: 5280 addql #1,%d0
494d2: e58a lsll #2,%d2
494d4: e989 lsll #4,%d1
head->next = tail;
head->previous = NULL;
494d6: 42a9 0004 clrl %a1@(4)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
494da: 9282 subl %d2,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
494dc: 45f0 1800 lea %a0@(00000000,%d1:l),%a2
494e0: 234a 0008 movel %a2,%a1@(8)
Chain_Node *tail = _Chain_Tail( the_chain );
494e4: 45f0 1804 lea %a0@(00000004,%d1:l),%a2
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494e8: 7204 moveq #4,%d1
494ea: 228a movel %a2,%a1@
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
494ec: 43e9 000c lea %a1@(12),%a1
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
494f0: b280 cmpl %d0,%d1
494f2: 66b0 bnes 494a4 <_Thread_queue_Initialize+0x44>
494f4: 60a2 bras 49498 <_Thread_queue_Initialize+0x38>
...
0004c430 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4c430: 4e56 0000 linkw %fp,#0
4c434: 206e 0008 moveal %fp@(8),%a0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4c438: 2268 0044 moveal %a0@(68),%a1
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
4c43c: 2029 0030 movel %a1@(48),%d0
4c440: 6708 beqs 4c44a <_Thread_queue_Process_timeout+0x1a>
4c442: b1f9 0005 f5e4 cmpal 5f5e4 <_Per_CPU_Information+0xc>,%a0
4c448: 6716 beqs 4c460 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4c44a: 2169 003c 0034 movel %a1@(60),%a0@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4c450: 2f08 movel %a0,%sp@-
4c452: 2f09 movel %a1,%sp@-
4c454: 4eb9 0004 c308 jsr 4c308 <_Thread_queue_Extract>
4c45a: 508f addql #8,%sp
}
}
4c45c: 4e5e unlk %fp
4c45e: 4e75 rts
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
4c460: 7203 moveq #3,%d1
4c462: b280 cmpl %d0,%d1
4c464: 67f6 beqs 4c45c <_Thread_queue_Process_timeout+0x2c>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4c466: 7002 moveq #2,%d0
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
4c468: 4e5e unlk %fp
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4c46a: 2169 003c 0034 movel %a1@(60),%a0@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4c470: 2340 0030 movel %d0,%a1@(48)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
...
000494f8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
494f8: 4e56 fff0 linkw %fp,#-16
494fc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
49500: 246e 0008 moveal %fp@(8),%a2
49504: 266e 000c moveal %fp@(12),%a3
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
49508: 4a8a tstl %a2
4950a: 6708 beqs 49514 <_Thread_queue_Requeue+0x1c> <== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
4950c: 7001 moveq #1,%d0
4950e: b0aa 0034 cmpl %a2@(52),%d0
49512: 670a beqs 4951e <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
49514: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED
4951a: 4e5e unlk %fp <== NOT EXECUTED
4951c: 4e75 rts <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
4951e: 303c 0700 movew #1792,%d0
49522: 40c2 movew %sr,%d2
49524: 8082 orl %d2,%d0
49526: 46c0 movew %d0,%sr
49528: 202b 0010 movel %a3@(16),%d0
4952c: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
49532: 660c bnes 49540 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
49534: 46c2 movew %d2,%sr <== NOT EXECUTED
}
}
49536: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
4953c: 4e5e unlk %fp
4953e: 4e75 rts
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
49540: 4878 0001 pea 1 <ADD>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
49544: 7001 moveq #1,%d0
49546: 2f0b movel %a3,%sp@-
49548: 2540 0030 movel %d0,%a2@(48)
4954c: 2f0a movel %a2,%sp@-
4954e: 4eb9 0004 c340 jsr 4c340 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
49554: 486e fffc pea %fp@(-4)
49558: 2f0b movel %a3,%sp@-
4955a: 2f0a movel %a2,%sp@-
4955c: 4eb9 0004 9250 jsr 49250 <_Thread_queue_Enqueue_priority>
49562: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
49566: 46c2 movew %d2,%sr
49568: 60cc bras 49536 <_Thread_queue_Requeue+0x3e>
...
0004956c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
4956c: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
49570: 486e fffc pea %fp@(-4)
49574: 2f2e 0008 movel %fp@(8),%sp@-
49578: 4eb9 0004 8cfc jsr 48cfc <_Thread_Get>
switch ( location ) {
4957e: 508f addql #8,%sp
49580: 4aae fffc tstl %fp@(-4)
49584: 6618 bnes 4959e <_Thread_queue_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
49586: 2f00 movel %d0,%sp@-
49588: 4eb9 0004 c430 jsr 4c430 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4958e: 588f addql #4,%sp
49590: 2039 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d0
49596: 5380 subql #1,%d0
49598: 23c0 0005 f448 movel %d0,5f448 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
4959e: 4e5e unlk %fp
...
00059448 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
59448: 4e56 ffb0 linkw %fp,#-80
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
tail->previous = head;
5944c: 41ee fff4 lea %fp@(-12),%a0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
59450: 200e movel %fp,%d0
59452: 5180 subql #8,%d0
head->previous = NULL;
tail->previous = head;
59454: 2d48 fffc movel %a0,%fp@(-4)
59458: 41ee ffec lea %fp@(-20),%a0
5945c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
59460: 246e 0008 moveal %fp@(8),%a2
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
59464: 260e movel %fp,%d3
59466: 0683 ffff ffe8 addil #-24,%d3
5946c: 240a movel %a2,%d2
5946e: 2a0a movel %a2,%d5
59470: 4bf9 0005 d86c lea 5d86c <_Watchdog_Adjust_to_chain>,%a5
59476: 0682 0000 0030 addil #48,%d2
5947c: 0685 0000 0068 addil #104,%d5
59482: 47f9 0005 a020 lea 5a020 <_Chain_Get>,%a3
59488: 49f9 0005 d8f4 lea 5d8f4 <_Watchdog_Insert>,%a4
5948e: 2c00 movel %d0,%d6
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59490: 283c 0000 0700 movel #1792,%d4
59496: 2d48 ffd8 movel %a0,%fp@(-40)
5949a: 41ea 0008 lea %a2@(8),%a0
5949e: 2d48 ffe4 movel %a0,%fp@(-28)
594a2: 41ea 0040 lea %a2@(64),%a0
594a6: 2d48 ffe0 movel %a0,%fp@(-32)
594aa: 41ee ffec lea %fp@(-20),%a0
594ae: 2d40 fff4 movel %d0,%fp@(-12)
head->previous = NULL;
594b2: 42ae fff8 clrl %fp@(-8)
594b6: 42ae ffec clrl %fp@(-20)
tail->previous = head;
594ba: 2d43 fff0 movel %d3,%fp@(-16)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
594be: 2d48 ffe8 movel %a0,%fp@(-24)
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
594c2: 41ee fff4 lea %fp@(-12),%a0
594c6: 2548 0078 movel %a0,%a2@(120)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
594ca: 2039 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
594d0: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
594d4: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
594d8: 9081 subl %d1,%d0
594da: 2f03 movel %d3,%sp@-
594dc: 2f00 movel %d0,%sp@-
594de: 2f02 movel %d2,%sp@-
594e0: 4e95 jsr %a5@
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
594e2: 2039 0007 e2ce movel 7e2ce <_TOD_Now>,%d0
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
594e8: 4fef 000c lea %sp@(12),%sp
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
594ec: 222a 0074 movel %a2@(116),%d1
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
594f0: b280 cmpl %d0,%d1
594f2: 6500 0086 bcsw 5957a <_Timer_server_Body+0x132>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
594f6: b280 cmpl %d0,%d1
594f8: 6200 00a4 bhiw 5959e <_Timer_server_Body+0x156>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
594fc: 2540 0074 movel %d0,%a2@(116)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59500: 202a 0078 movel %a2@(120),%d0
59504: 2f00 movel %d0,%sp@-
59506: 4e93 jsr %a3@
if ( timer == NULL ) {
59508: 588f addql #4,%sp
5950a: 4a80 tstl %d0
5950c: 672e beqs 5953c <_Timer_server_Body+0xf4> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5950e: 2040 moveal %d0,%a0 <== NOT EXECUTED
59510: 7e01 moveq #1,%d7 <== NOT EXECUTED
59512: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED
59516: be81 cmpl %d1,%d7 <== NOT EXECUTED
59518: 6700 00a8 beqw 595c2 <_Timer_server_Body+0x17a> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
5951c: 7e03 moveq #3,%d7 <== NOT EXECUTED
5951e: be81 cmpl %d1,%d7 <== NOT EXECUTED
59520: 66de bnes 59500 <_Timer_server_Body+0xb8> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59522: 2040 moveal %d0,%a0 <== NOT EXECUTED
59524: 4868 0010 pea %a0@(16) <== NOT EXECUTED
59528: 2f05 movel %d5,%sp@- <== NOT EXECUTED
5952a: 4e94 jsr %a4@ <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
5952c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59530: 508f addql #8,%sp <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59532: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59534: 4e93 jsr %a3@ <== NOT EXECUTED
if ( timer == NULL ) {
59536: 588f addql #4,%sp <== NOT EXECUTED
59538: 4a80 tstl %d0 <== NOT EXECUTED
5953a: 66d2 bnes 5950e <_Timer_server_Body+0xc6> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
5953c: 2004 movel %d4,%d0
5953e: 40c1 movew %sr,%d1
59540: 8081 orl %d1,%d0
59542: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
59544: bcae fff4 cmpl %fp@(-12),%d6
59548: 6700 0086 beqw 595d0 <_Timer_server_Body+0x188>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
5954c: 46c1 movew %d1,%sr <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
5954e: 2039 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59554: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
59558: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5955c: 9081 subl %d1,%d0 <== NOT EXECUTED
5955e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
59560: 2f00 movel %d0,%sp@- <== NOT EXECUTED
59562: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59564: 4e95 jsr %a5@ <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59566: 2039 0007 e2ce movel 7e2ce <_TOD_Now>,%d0 <== NOT EXECUTED
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
5956c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
59570: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
59574: b280 cmpl %d0,%d1 <== NOT EXECUTED
59576: 6400 ff7e bccw 594f6 <_Timer_server_Body+0xae> <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5957a: 2f03 movel %d3,%sp@-
5957c: 2e00 movel %d0,%d7
5957e: 9e81 subl %d1,%d7
59580: 2f07 movel %d7,%sp@-
59582: 2d40 ffdc movel %d0,%fp@(-36)
59586: 2f05 movel %d5,%sp@-
59588: 4eb9 0005 d86c jsr 5d86c <_Watchdog_Adjust_to_chain>
5958e: 202e ffdc movel %fp@(-36),%d0
59592: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59596: 2540 0074 movel %d0,%a2@(116)
5959a: 6000 ff64 braw 59500 <_Timer_server_Body+0xb8>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
5959e: 9280 subl %d0,%d1
595a0: 2f01 movel %d1,%sp@-
595a2: 4878 0001 pea 1 <ADD>
595a6: 2d40 ffdc movel %d0,%fp@(-36)
595aa: 2f05 movel %d5,%sp@-
595ac: 4eb9 0005 d7d8 jsr 5d7d8 <_Watchdog_Adjust>
595b2: 202e ffdc movel %fp@(-36),%d0
595b6: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
595ba: 2540 0074 movel %d0,%a2@(116)
595be: 6000 ff40 braw 59500 <_Timer_server_Body+0xb8>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
595c2: 4868 0010 pea %a0@(16) <== NOT EXECUTED
595c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
595c8: 4e94 jsr %a4@ <== NOT EXECUTED
595ca: 508f addql #8,%sp <== NOT EXECUTED
595cc: 6000 ff32 braw 59500 <_Timer_server_Body+0xb8> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
595d0: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
595d4: 46c1 movew %d1,%sr
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
595d6: 202e ffd8 movel %fp@(-40),%d0
595da: b0ae ffe8 cmpl %fp@(-24),%d0
595de: 6752 beqs 59632 <_Timer_server_Body+0x1ea>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
595e0: 2204 movel %d4,%d1
595e2: 40c0 movew %sr,%d0
595e4: 8280 orl %d0,%d1
595e6: 46c1 movew %d1,%sr
initialized = false;
}
#endif
return status;
}
595e8: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
595ec: b1ee ffd8 cmpal %fp@(-40),%a0
595f0: 6732 beqs 59624 <_Timer_server_Body+0x1dc> <== NEVER TAKEN
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
595f2: 2250 moveal %a0@,%a1
head->next = new_first;
new_first->previous = head;
595f4: 2343 0004 movel %d3,%a1@(4)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
595f8: 42a8 0008 clrl %a0@(8)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
595fc: 2d49 ffe8 movel %a1,%fp@(-24)
_ISR_Enable( level );
59600: 46c0 movew %d0,%sr
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
59602: 2f28 0024 movel %a0@(36),%sp@-
59606: 2f28 0020 movel %a0@(32),%sp@-
5960a: 2068 001c moveal %a0@(28),%a0
5960e: 4e90 jsr %a0@
}
59610: 508f addql #8,%sp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59612: 2204 movel %d4,%d1
59614: 40c0 movew %sr,%d0
59616: 8280 orl %d0,%d1
59618: 46c1 movew %d1,%sr
initialized = false;
}
#endif
return status;
}
5961a: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
5961e: b1ee ffd8 cmpal %fp@(-40),%a0
59622: 66ce bnes 595f2 <_Timer_server_Body+0x1aa>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
59624: 46c0 movew %d0,%sr
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
59626: 41ee fff4 lea %fp@(-12),%a0
5962a: 2548 0078 movel %a0,%a2@(120)
5962e: 6000 fe9a braw 594ca <_Timer_server_Body+0x82>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
59632: 4207 clrb %d7
59634: 1547 007c moveb %d7,%a2@(124)
59638: 2039 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d0
5963e: 5280 addql #1,%d0
59640: 23c0 0007 e244 movel %d0,7e244 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
59646: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
5964a: 2f12 movel %a2@,%sp@-
5964c: 4eb9 0005 d1bc jsr 5d1bc <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
59652: 2f0a movel %a2,%sp@-
59654: 4eba fd1a jsr %pc@(59370 <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
59658: 2f0a movel %a2,%sp@-
5965a: 4eba fd7e jsr %pc@(593da <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
5965e: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
ts->active = true;
59664: 7001 moveq #1,%d0
59666: 1540 007c moveb %d0,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
5966a: 2f2e ffe4 movel %fp@(-28),%sp@-
5966e: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
59674: 2f2e ffe0 movel %fp@(-32),%sp@-
59678: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
5967e: 4fef 0018 lea %sp@(24),%sp
59682: 6000 fe3e braw 594c2 <_Timer_server_Body+0x7a>
00059686 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
59686: 4e56 fff0 linkw %fp,#-16
5968a: 206e 000c moveal %fp@(12),%a0
5968e: 48d7 041c moveml %d2-%d4/%a2,%sp@
59692: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
59696: 202a 0078 movel %a2@(120),%d0
5969a: 671a beqs 596b6 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
5969c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED
596a0: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED
}
}
596a4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
596aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
596ae: 4e5e unlk %fp <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
596b0: 4ef9 0005 9fc0 jmp 59fc0 <_Chain_Append> <== NOT EXECUTED
596b6: 2039 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d0
596bc: 5280 addql #1,%d0
596be: 23c0 0007 e244 movel %d0,7e244 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
596c4: 2028 0038 movel %a0@(56),%d0
596c8: 7201 moveq #1,%d1
596ca: b280 cmpl %d0,%d1
596cc: 6700 008a beqw 59758 <_Timer_server_Schedule_operation_method+0xd2>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
596d0: 7803 moveq #3,%d4
596d2: b880 cmpl %d0,%d4
596d4: 670e beqs 596e4 <_Timer_server_Schedule_operation_method+0x5e>
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
596d6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
596dc: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
596de: 4ef9 0005 c846 jmp 5c846 <_Thread_Enable_dispatch>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
596e4: 203c 0000 0700 movel #1792,%d0
596ea: 40c2 movew %sr,%d2
596ec: 8082 orl %d2,%d0
596ee: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
596f0: 260a movel %a2,%d3
596f2: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
596f8: 2039 0007 e2ce movel 7e2ce <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
596fe: 222a 0074 movel %a2@(116),%d1
initialized = false;
}
#endif
return status;
}
59702: 226a 0068 moveal %a2@(104),%a1
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
59706: b689 cmpl %a1,%d3
59708: 671c beqs 59726 <_Timer_server_Schedule_operation_method+0xa0>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5970a: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
5970e: b280 cmpl %d0,%d1
59710: 6400 00ba bccw 597cc <_Timer_server_Schedule_operation_method+0x146>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
59714: 2800 movel %d0,%d4
59716: 9881 subl %d1,%d4
if (delta_interval > delta) {
59718: b883 cmpl %d3,%d4
5971a: 6400 00bc bccw 597d8 <_Timer_server_Schedule_operation_method+0x152>
delta_interval -= delta;
5971e: 9684 subl %d4,%d3
59720: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
59722: 2341 0010 movel %d1,%a1@(16)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
59726: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
5972a: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5972c: 4868 0010 pea %a0@(16)
59730: 486a 0068 pea %a2@(104)
59734: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
if ( !ts->active ) {
5973a: 508f addql #8,%sp
5973c: 102a 007c moveb %a2@(124),%d0
59740: 6694 bnes 596d6 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
59742: 2f0a movel %a2,%sp@-
59744: 4eba fc94 jsr %pc@(593da <_Timer_server_Reset_tod_system_watchdog>)
59748: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
59750: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
59752: 4ef9 0005 c846 jmp 5c846 <_Thread_Enable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
59758: 203c 0000 0700 movel #1792,%d0
5975e: 40c3 movew %sr,%d3
59760: 8083 orl %d3,%d0
59762: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
59764: 2039 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d0
5976a: 220a movel %a2,%d1
5976c: 0681 0000 0034 addil #52,%d1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
59772: 282a 003c movel %a2@(60),%d4
initialized = false;
}
#endif
return status;
}
59776: 226a 0030 moveal %a2@(48),%a1
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
5977a: b289 cmpl %a1,%d1
5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x10a>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
5977e: 2200 movel %d0,%d1
59780: 9284 subl %d4,%d1
delta_interval = first_watchdog->delta_interval;
59782: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
59786: b481 cmpl %d1,%d2
59788: 633a blss 597c4 <_Timer_server_Schedule_operation_method+0x13e><== NEVER TAKEN
delta_interval -= delta;
5978a: 9481 subl %d1,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5978c: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
59790: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
59794: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
59796: 4868 0010 pea %a0@(16)
5979a: 486a 0030 pea %a2@(48)
5979e: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
if ( !ts->active ) {
597a4: 508f addql #8,%sp
597a6: 102a 007c moveb %a2@(124),%d0
597aa: 6600 ff2a bnew 596d6 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
597ae: 2f0a movel %a2,%sp@-
597b0: 4eba fbbe jsr %pc@(59370 <_Timer_server_Reset_interval_system_watchdog>)
597b4: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
597bc: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
597be: 4ef9 0005 c846 jmp 5c846 <_Thread_Enable_dispatch>
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
597c4: 4282 clrl %d2
}
first_watchdog->delta_interval = delta_interval;
597c6: 2342 0010 movel %d2,%a1@(16)
597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x10a>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
597cc: d283 addl %d3,%d1
delta_interval += delta;
597ce: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
597d0: 2341 0010 movel %d1,%a1@(16)
597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0xa0>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
597d8: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
597da: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED
597de: 6000 ff46 braw 59726 <_Timer_server_Schedule_operation_method+0xa0><== NOT EXECUTED
000497dc <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
497dc: 4e56 0000 linkw %fp,#0
497e0: 226e 0008 moveal %fp@(8),%a1
497e4: 2f0a movel %a2,%sp@-
497e6: 246e 000c moveal %fp@(12),%a2
uint32_t seconds = add->tv_sec;
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
497ea: 206a 0004 moveal %a2@(4),%a0
497ee: d1e9 0004 addal %a1@(4),%a0
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
497f2: 2208 movel %a0,%d1
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
497f4: 2012 movel %a2@,%d0
/* Add the basics */
time->tv_sec += add->tv_sec;
497f6: d191 addl %d0,%a1@
time->tv_nsec += add->tv_nsec;
497f8: 2348 0004 movel %a0,%a1@(4)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
497fc: b1fc 3b9a c9ff cmpal #999999999,%a0
49802: 631a blss 4981e <_Timespec_Add_to+0x42>
49804: 2051 moveal %a1@,%a0
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
49806: 5288 addql #1,%a0
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
49808: 0681 c465 3600 addil #-1000000000,%d1
time->tv_sec++;
seconds++;
4980e: 5280 addql #1,%d0
/* Add the basics */
time->tv_sec += add->tv_sec;
time->tv_nsec += add->tv_nsec;
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
49810: 0c81 3b9a c9ff cmpil #999999999,%d1
49816: 62ee bhis 49806 <_Timespec_Add_to+0x2a> <== NEVER TAKEN
49818: 2341 0004 movel %d1,%a1@(4)
4981c: 2288 movel %a0,%a1@
time->tv_sec++;
seconds++;
}
return seconds;
}
4981e: 245f moveal %sp@+,%a2
49820: 4e5e unlk %fp <== NOT EXECUTED
000499b6 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
499b6: 4e56 fff0 linkw %fp,#-16
499ba: 48d7 041c moveml %d2-%d4/%a2,%sp@
499be: 242e 0008 movel %fp@(8),%d2
499c2: 262e 0010 movel %fp@(16),%d3
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
499c6: 2479 0005 f59c moveal 5f59c <_User_extensions_List+0x8>,%a2
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
499cc: 182e 000f moveb %fp@(15),%d4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
499d0: b5fc 0005 f594 cmpal #390548,%a2
499d6: 6726 beqs 499fe <_User_extensions_Fatal+0x48> <== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
499d8: 0284 0000 00ff andil #255,%d4
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
499de: 206a 0030 moveal %a2@(48),%a0
499e2: 4a88 tstl %a0
499e4: 670c beqs 499f2 <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
499e6: 2f03 movel %d3,%sp@-
499e8: 2f04 movel %d4,%sp@-
499ea: 2f02 movel %d2,%sp@-
499ec: 4e90 jsr %a0@
499ee: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
499f2: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
499f6: b5fc 0005 f594 cmpal #390548,%a2
499fc: 66e0 bnes 499de <_User_extensions_Fatal+0x28> <== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
499fe: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
49a04: 4e5e unlk %fp <== NOT EXECUTED
00049874 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
49874: 4e56 ffec linkw %fp,#-20
head->next = tail;
49878: 203c 0005 f598 movel #390552,%d0
4987e: 23c0 0005 f594 movel %d0,5f594 <_User_extensions_List>
head->previous = NULL;
tail->previous = head;
49884: 203c 0005 f594 movel #390548,%d0
4988a: 23c0 0005 f59c movel %d0,5f59c <_User_extensions_List+0x8>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
49890: 203c 0005 f450 movel #390224,%d0
49896: 23c0 0005 f44c movel %d0,5f44c <_User_extensions_Switches_list>
head->previous = NULL;
tail->previous = head;
4989c: 203c 0005 f44c movel #390220,%d0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
498a2: 42b9 0005 f598 clrl 5f598 <_User_extensions_List+0x4>
498a8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
498ac: 2439 0005 dc1a movel 5dc1a <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
498b2: 2639 0005 dc1e movel 5dc1e <Configuration+0x3a>,%d3
498b8: 42b9 0005 f450 clrl 5f450 <_User_extensions_Switches_list+0x4>
tail->previous = head;
498be: 23c0 0005 f454 movel %d0,5f454 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
498c4: 4a83 tstl %d3
498c6: 6764 beqs 4992c <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
498c8: 7834 moveq #52,%d4
498ca: 4c02 4800 mulsl %d2,%d4
498ce: 2f04 movel %d4,%sp@-
498d0: 4eb9 0004 9e38 jsr 49e38 <_Workspace_Allocate_or_fatal_error>
498d6: 2440 moveal %d0,%a2
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
498d8: 2f04 movel %d4,%sp@-
498da: 42a7 clrl %sp@-
498dc: 2f00 movel %d0,%sp@-
498de: 4eb9 0004 e3f4 jsr 4e3f4 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
498e4: 4fef 0010 lea %sp@(16),%sp
498e8: 4a82 tstl %d2
498ea: 6740 beqs 4992c <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
498ec: 4284 clrl %d4
498ee: 47f9 0004 c4a8 lea 4c4a8 <_User_extensions_Add_set>,%a3
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
498f4: 2043 moveal %d3,%a0
498f6: 5284 addql #1,%d4
498f8: 0683 0000 0020 addil #32,%d3
498fe: 2558 0014 movel %a0@+,%a2@(20)
49902: 2558 0018 movel %a0@+,%a2@(24)
49906: 2558 001c movel %a0@+,%a2@(28)
4990a: 2558 0020 movel %a0@+,%a2@(32)
4990e: 2558 0024 movel %a0@+,%a2@(36)
49912: 2558 0028 movel %a0@+,%a2@(40)
49916: 2558 002c movel %a0@+,%a2@(44)
4991a: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
4991e: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
49920: 45ea 0034 lea %a2@(52),%a2
49924: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49926: 588f addql #4,%sp
49928: b882 cmpl %d2,%d4
4992a: 65c8 bcss 498f4 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
4992c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
49932: 4e5e unlk %fp
...
00049938 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
49938: 4e56 0000 linkw %fp,#0
4993c: 2f0a movel %a2,%sp@-
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
4993e: 2479 0005 f594 moveal 5f594 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
49944: 2f02 movel %d2,%sp@-
49946: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4994a: b5fc 0005 f598 cmpal #390552,%a2
49950: 6718 beqs 4996a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
49952: 206a 0028 moveal %a2@(40),%a0
49956: 4a88 tstl %a0
49958: 6706 beqs 49960 <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
4995a: 2f02 movel %d2,%sp@-
4995c: 4e90 jsr %a0@
4995e: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49960: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49962: b5fc 0005 f598 cmpal #390552,%a2
49968: 66e8 bnes 49952 <_User_extensions_Thread_begin+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
4996a: 242e fff8 movel %fp@(-8),%d2
4996e: 246e fffc moveal %fp@(-4),%a2
49972: 4e5e unlk %fp <== NOT EXECUTED
00049a08 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49a08: 4e56 0000 linkw %fp,#0
49a0c: 2f0a movel %a2,%sp@-
return false;
}
}
return true;
}
49a0e: 2479 0005 f594 moveal 5f594 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49a14: 2f02 movel %d2,%sp@-
49a16: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
49a1a: b5fc 0005 f598 cmpal #390552,%a2
49a20: 6722 beqs 49a44 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
49a22: 206a 0014 moveal %a2@(20),%a0
49a26: 4a88 tstl %a0
49a28: 6710 beqs 49a3a <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
49a2a: 2f02 movel %d2,%sp@-
49a2c: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
49a32: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
49a34: 508f addql #8,%sp
49a36: 4a00 tstb %d0
49a38: 6718 beqs 49a52 <_User_extensions_Thread_create+0x4a>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49a3a: 2452 moveal %a2@,%a2
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
49a3c: b5fc 0005 f598 cmpal #390552,%a2
49a42: 66de bnes 49a22 <_User_extensions_Thread_create+0x1a>
return false;
}
}
return true;
}
49a44: 242e fff8 movel %fp@(-8),%d2
49a48: 246e fffc moveal %fp@(-4),%a2
49a4c: 4e5e unlk %fp
if ( !status )
return false;
}
}
return true;
49a4e: 7001 moveq #1,%d0
}
49a50: 4e75 rts
49a52: 242e fff8 movel %fp@(-8),%d2
49a56: 246e fffc moveal %fp@(-4),%a2
49a5a: 4e5e unlk %fp
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
49a5c: 4200 clrb %d0 <== NOT EXECUTED
}
}
return true;
}
00049a60 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
49a60: 4e56 0000 linkw %fp,#0
49a64: 2f0a movel %a2,%sp@-
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49a66: 2479 0005 f59c moveal 5f59c <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
49a6c: 2f02 movel %d2,%sp@-
49a6e: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49a72: b5fc 0005 f594 cmpal #390548,%a2
49a78: 6720 beqs 49a9a <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
49a7a: 206a 0020 moveal %a2@(32),%a0
49a7e: 4a88 tstl %a0
49a80: 670c beqs 49a8e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
49a82: 2f02 movel %d2,%sp@-
49a84: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
49a8a: 4e90 jsr %a0@
49a8c: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
49a8e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49a92: b5fc 0005 f594 cmpal #390548,%a2
49a98: 66e0 bnes 49a7a <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49a9a: 242e fff8 movel %fp@(-8),%d2
49a9e: 246e fffc moveal %fp@(-4),%a2
49aa2: 4e5e unlk %fp
...
00049976 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
49976: 4e56 0000 linkw %fp,#0
4997a: 2f0a movel %a2,%sp@-
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
4997c: 2479 0005 f59c moveal 5f59c <_User_extensions_List+0x8>,%a2
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
49982: 2f02 movel %d2,%sp@-
49984: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
49988: b5fc 0005 f594 cmpal #390548,%a2
4998e: 671a beqs 499aa <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
49990: 206a 002c moveal %a2@(44),%a0
49994: 4a88 tstl %a0
49996: 6706 beqs 4999e <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
49998: 2f02 movel %d2,%sp@-
4999a: 4e90 jsr %a0@
4999c: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
4999e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
499a2: b5fc 0005 f594 cmpal #390548,%a2
499a8: 66e6 bnes 49990 <_User_extensions_Thread_exitted+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
499aa: 242e fff8 movel %fp@(-8),%d2
499ae: 246e fffc moveal %fp@(-4),%a2
499b2: 4e5e unlk %fp <== NOT EXECUTED
0004a74c <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a74c: 4e56 0000 linkw %fp,#0
4a750: 2f0a movel %a2,%sp@-
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a752: 2479 0006 052c moveal 6052c <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a758: 2f02 movel %d2,%sp@-
4a75a: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4a75e: b5fc 0006 0530 cmpal #394544,%a2
4a764: 671e beqs 4a784 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
4a766: 206a 001c moveal %a2@(28),%a0
4a76a: 4a88 tstl %a0
4a76c: 670c beqs 4a77a <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
4a76e: 2f02 movel %d2,%sp@-
4a770: 2f39 0006 057c movel 6057c <_Per_CPU_Information+0xc>,%sp@-
4a776: 4e90 jsr %a0@
4a778: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
4a77a: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
4a77c: b5fc 0006 0530 cmpal #394544,%a2
4a782: 66e2 bnes 4a766 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a784: 242e fff8 movel %fp@(-8),%d2
4a788: 246e fffc moveal %fp@(-4),%a2
4a78c: 4e5e unlk %fp <== NOT EXECUTED
00049aa8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49aa8: 4e56 0000 linkw %fp,#0
49aac: 2f0a movel %a2,%sp@-
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49aae: 2479 0005 f594 moveal 5f594 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49ab4: 2f02 movel %d2,%sp@-
49ab6: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49aba: b5fc 0005 f598 cmpal #390552,%a2
49ac0: 671e beqs 49ae0 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
49ac2: 206a 0018 moveal %a2@(24),%a0
49ac6: 4a88 tstl %a0
49ac8: 670c beqs 49ad6 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
49aca: 2f02 movel %d2,%sp@-
49acc: 2f39 0005 f5e4 movel 5f5e4 <_Per_CPU_Information+0xc>,%sp@-
49ad2: 4e90 jsr %a0@
49ad4: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49ad6: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
49ad8: b5fc 0005 f598 cmpal #390552,%a2
49ade: 66e2 bnes 49ac2 <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49ae0: 242e fff8 movel %fp@(-8),%d2
49ae4: 246e fffc moveal %fp@(-4),%a2
49ae8: 4e5e unlk %fp <== NOT EXECUTED
00049aec <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
49aec: 4e56 fff4 linkw %fp,#-12
49af0: 48d7 040c moveml %d2-%d3/%a2,%sp@
49af4: 262e 0008 movel %fp@(8),%d3
49af8: 242e 000c movel %fp@(12),%d2
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49afc: 2479 0005 f44c moveal 5f44c <_User_extensions_Switches_list>,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
49b02: b5fc 0005 f450 cmpal #390224,%a2
49b08: 6716 beqs 49b20 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
49b0a: 2f02 movel %d2,%sp@-
49b0c: 2f03 movel %d3,%sp@-
49b0e: 206a 0008 moveal %a2@(8),%a0
49b12: 4e90 jsr %a0@
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
49b14: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
49b16: 508f addql #8,%sp
49b18: b5fc 0005 f450 cmpal #390224,%a2
49b1e: 66ea bnes 49b0a <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49b20: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
49b26: 4e5e unlk %fp
...
0004b700 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b700: 4e56 ffe8 linkw %fp,#-24
4b704: 226e 000c moveal %fp@(12),%a1
4b708: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4b70c: 283c 0000 0700 movel #1792,%d4
4b712: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b714: 266e 0008 moveal %fp@(8),%a3
4b718: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4b71c: 40c1 movew %sr,%d1
4b71e: 8081 orl %d1,%d0
4b720: 46c0 movew %d0,%sr
}
}
_ISR_Enable( level );
}
4b722: 244b moveal %a3,%a2
4b724: 205a moveal %a2@+,%a0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
4b726: b5c8 cmpal %a0,%a2
4b728: 6748 beqs 4b772 <_Watchdog_Adjust+0x72>
switch ( direction ) {
4b72a: 4a89 tstl %a1
4b72c: 6650 bnes 4b77e <_Watchdog_Adjust+0x7e>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b72e: 4a82 tstl %d2
4b730: 6740 beqs 4b772 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b732: 2628 0010 movel %a0@(16),%d3
4b736: 49f9 0004 b988 lea 4b988 <_Watchdog_Tickle>,%a4
4b73c: b682 cmpl %d2,%d3
4b73e: 622c bhis 4b76c <_Watchdog_Adjust+0x6c> <== NEVER TAKEN
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
4b740: 7001 moveq #1,%d0
4b742: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4b746: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4b748: 2f0b movel %a3,%sp@-
4b74a: 4e94 jsr %a4@
_ISR_Disable( level );
4b74c: 2004 movel %d4,%d0
4b74e: 40c1 movew %sr,%d1
4b750: 8081 orl %d1,%d0
4b752: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( header ) )
4b754: 588f addql #4,%sp
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
4b756: 9483 subl %d3,%d2
}
}
_ISR_Enable( level );
}
4b758: 2013 movel %a3@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
4b75a: 2040 moveal %d0,%a0
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4b75c: b08a cmpl %a2,%d0
4b75e: 6712 beqs 4b772 <_Watchdog_Adjust+0x72>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b760: 4a82 tstl %d2
4b762: 670e beqs 4b772 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b764: 2628 0010 movel %a0@(16),%d3
4b768: b483 cmpl %d3,%d2
4b76a: 64d4 bccs 4b740 <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4b76c: 9682 subl %d2,%d3
4b76e: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b772: 46c1 movew %d1,%sr
}
4b774: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b77a: 4e5e unlk %fp
4b77c: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4b77e: 7001 moveq #1,%d0
4b780: b089 cmpl %a1,%d0
4b782: 66ee bnes 4b772 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4b784: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b788: 46c1 movew %d1,%sr
}
4b78a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b790: 4e5e unlk %fp <== NOT EXECUTED
00049b2c <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
49b2c: 4e56 ffec linkw %fp,#-20
49b30: 226e 000c moveal %fp@(12),%a1
49b34: 48d7 043c moveml %d2-%d5/%a2,%sp@
49b38: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
49b3c: 2a3c 0000 0700 movel #1792,%d5
49b42: 2005 movel %d5,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
49b44: 2839 0005 f5e0 movel 5f5e0 <_Per_CPU_Information+0x8>,%d4
_ISR_Disable( level );
49b4a: 40c3 movew %sr,%d3
49b4c: 8083 orl %d3,%d0
49b4e: 46c0 movew %d0,%sr
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
49b50: 4aa9 0008 tstl %a1@(8)
49b54: 6600 00c6 bnew 49c1c <_Watchdog_Insert+0xf0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
49b58: 2039 0005 f54c movel 5f54c <_Watchdog_Sync_count>,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49b5e: 7201 moveq #1,%d1
_Watchdog_Sync_count++;
49b60: 5280 addql #1,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49b62: 2341 0008 movel %d1,%a1@(8)
_Watchdog_Sync_count++;
49b66: 23c0 0005 f54c movel %d0,5f54c <_Watchdog_Sync_count>
restart:
delta_interval = the_watchdog->initial;
49b6c: 2029 000c movel %a1@(12),%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
49b70: 2052 moveal %a2@,%a0
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49b72: 6764 beqs 49bd8 <_Watchdog_Insert+0xac>
49b74: 4a90 tstl %a0@
49b76: 6760 beqs 49bd8 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49b78: 2228 0010 movel %a0@(16),%d1
49b7c: b280 cmpl %d0,%d1
49b7e: 6252 bhis 49bd2 <_Watchdog_Insert+0xa6>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
49b80: 2405 movel %d5,%d2
49b82: 46c3 movew %d3,%sr
49b84: 8483 orl %d3,%d2
49b86: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b88: 7401 moveq #1,%d2
49b8a: b4a9 0008 cmpl %a1@(8),%d2
49b8e: 666e bnes 49bfe <_Watchdog_Insert+0xd2>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b90: 2439 0005 f4ec movel 5f4ec <_Watchdog_Sync_level>,%d2
49b96: b484 cmpl %d4,%d2
49b98: 6230 bhis 49bca <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b9a: 9081 subl %d1,%d0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49b9c: 2050 moveal %a0@,%a0
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49b9e: 4a80 tstl %d0
49ba0: 6736 beqs 49bd8 <_Watchdog_Insert+0xac>
49ba2: 4a90 tstl %a0@
49ba4: 6732 beqs 49bd8 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49ba6: 2228 0010 movel %a0@(16),%d1
49baa: b081 cmpl %d1,%d0
49bac: 6524 bcss 49bd2 <_Watchdog_Insert+0xa6>
break;
}
delta_interval -= after->delta_interval;
_ISR_Flash( level );
49bae: 2405 movel %d5,%d2
49bb0: 46c3 movew %d3,%sr
49bb2: 8483 orl %d3,%d2
49bb4: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49bb6: 9081 subl %d1,%d0
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49bb8: 7201 moveq #1,%d1
49bba: b2a9 0008 cmpl %a1@(8),%d1
49bbe: 663e bnes 49bfe <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49bc0: 2239 0005 f4ec movel 5f4ec <_Watchdog_Sync_level>,%d1
49bc6: b284 cmpl %d4,%d1
49bc8: 63d2 blss 49b9c <_Watchdog_Insert+0x70> <== ALWAYS TAKEN
_Watchdog_Sync_level = insert_isr_nest_level;
49bca: 23c4 0005 f4ec movel %d4,5f4ec <_Watchdog_Sync_level>
goto restart;
49bd0: 609a bras 49b6c <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
49bd2: 9280 subl %d0,%d1
49bd4: 2141 0010 movel %d1,%a0@(16)
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
49bd8: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
49bdc: 7402 moveq #2,%d2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
49bde: 2450 moveal %a0@,%a2
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
49be0: 2340 0010 movel %d0,%a1@(16)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
49be4: 2039 0005 f550 movel 5f550 <_Watchdog_Ticks_since_boot>,%d0
49bea: 2342 0008 movel %d2,%a1@(8)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
49bee: 2348 0004 movel %a0,%a1@(4)
before_node = after_node->next;
after_node->next = the_node;
49bf2: 2089 movel %a1,%a0@
the_node->next = before_node;
before_node->previous = the_node;
49bf4: 2549 0004 movel %a1,%a2@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
49bf8: 228a movel %a2,%a1@
49bfa: 2340 0014 movel %d0,%a1@(20)
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
49bfe: 23c4 0005 f4ec movel %d4,5f4ec <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
49c04: 2039 0005 f54c movel 5f54c <_Watchdog_Sync_count>,%d0
49c0a: 5380 subql #1,%d0
49c0c: 23c0 0005 f54c movel %d0,5f54c <_Watchdog_Sync_count>
_ISR_Enable( level );
49c12: 46c3 movew %d3,%sr
}
49c14: 4cd7 043c moveml %sp@,%d2-%d5/%a2
49c18: 4e5e unlk %fp
49c1a: 4e75 rts
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
49c1c: 46c3 movew %d3,%sr
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49c1e: 4cd7 043c moveml %sp@,%d2-%d5/%a2
49c22: 4e5e unlk %fp
...
00049c80 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c80: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
49c86: 4e56 0000 linkw %fp,#0
49c8a: 206e 0008 moveal %fp@(8),%a0
49c8e: 2f0a movel %a2,%sp@-
49c90: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c92: 40c1 movew %sr,%d1
49c94: 8081 orl %d1,%d0
49c96: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49c98: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49c9c: 7401 moveq #1,%d2
49c9e: b480 cmpl %d0,%d2
49ca0: 6764 beqs 49d06 <_Watchdog_Remove+0x86>
49ca2: 6314 blss 49cb8 <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49ca4: 2279 0005 f550 moveal 5f550 <_Watchdog_Ticks_since_boot>,%a1
49caa: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49cae: 46c1 movew %d1,%sr
return( previous_state );
}
49cb0: 241f movel %sp@+,%d2
49cb2: 245f moveal %sp@+,%a2
49cb4: 4e5e unlk %fp
49cb6: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
49cb8: 143c 0003 moveb #3,%d2
49cbc: b480 cmpl %d0,%d2
49cbe: 65e4 bcss 49ca4 <_Watchdog_Remove+0x24> <== NEVER TAKEN
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
49cc0: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
49cc2: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49cc6: 4a91 tstl %a1@
49cc8: 6708 beqs 49cd2 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
49cca: 2428 0010 movel %a0@(16),%d2
49cce: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
49cd2: 2479 0005 f54c moveal 5f54c <_Watchdog_Sync_count>,%a2
49cd8: 4a8a tstl %a2
49cda: 670c beqs 49ce8 <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
49cdc: 45f9 0005 f5e0 lea 5f5e0 <_Per_CPU_Information+0x8>,%a2
49ce2: 23d2 0005 f4ec movel %a2@,5f4ec <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49ce8: 2468 0004 moveal %a0@(4),%a2
next->previous = previous;
49cec: 234a 0004 movel %a2,%a1@(4)
previous->next = next;
49cf0: 2489 movel %a1,%a2@
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49cf2: 2279 0005 f550 moveal 5f550 <_Watchdog_Ticks_since_boot>,%a1
49cf8: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49cfc: 46c1 movew %d1,%sr
return( previous_state );
}
49cfe: 241f movel %sp@+,%d2
49d00: 245f moveal %sp@+,%a2
49d02: 4e5e unlk %fp
49d04: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49d06: 2279 0005 f550 moveal 5f550 <_Watchdog_Ticks_since_boot>,%a1
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
49d0c: 42a8 0008 clrl %a0@(8)
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49d10: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49d14: 46c1 movew %d1,%sr
return( previous_state );
}
49d16: 241f movel %sp@+,%d2
49d18: 245f moveal %sp@+,%a2
49d1a: 4e5e unlk %fp
...
0004b0cc <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b0cc: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4b0d2: 4e56 ffe8 linkw %fp,#-24
4b0d6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
4b0da: 242e 0008 movel %fp@(8),%d2
4b0de: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b0e2: 40c3 movew %sr,%d3
4b0e4: 8083 orl %d3,%d0
4b0e6: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4b0e8: 2f0b movel %a3,%sp@-
4b0ea: 4bf9 0004 4b88 lea 44b88 <printk>,%a5
4b0f0: 2f02 movel %d2,%sp@-
4b0f2: 4879 0005 ee86 pea 5ee86 <_Status_Object_name_errors_to_status+0x14>
4b0f8: 4e95 jsr %a5@
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
4b0fa: 245b moveal %a3@+,%a2
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
4b0fc: 4fef 000c lea %sp@(12),%sp
4b100: b7ca cmpal %a2,%a3
4b102: 672c beqs 4b130 <_Watchdog_Report_chain+0x64>
4b104: 49f9 0004 b148 lea 4b148 <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4b10a: 2f0a movel %a2,%sp@-
4b10c: 42a7 clrl %sp@-
4b10e: 4e94 jsr %a4@
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
4b110: 2452 moveal %a2@,%a2
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
4b112: 508f addql #8,%sp
4b114: b7ca cmpal %a2,%a3
4b116: 66f2 bnes 4b10a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4b118: 2f02 movel %d2,%sp@-
4b11a: 4879 0005 ee9d pea 5ee9d <_Status_Object_name_errors_to_status+0x2b>
4b120: 4e95 jsr %a5@
4b122: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4b124: 46c3 movew %d3,%sr
}
4b126: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4b12c: 4e5e unlk %fp
4b12e: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4b130: 4879 0005 eeac pea 5eeac <_Status_Object_name_errors_to_status+0x3a>
4b136: 4e95 jsr %a5@
4b138: 588f addql #4,%sp
}
_ISR_Enable( level );
4b13a: 46c3 movew %d3,%sr
}
4b13c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
4b142: 4e5e unlk %fp
...
00049d20 <_Watchdog_Tickle>:
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
49d20: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
49d26: 4e56 ffe8 linkw %fp,#-24
49d2a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
49d2e: 286e 0008 moveal %fp@(8),%a4
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
49d32: 40c2 movew %sr,%d2
49d34: 8082 orl %d2,%d0
49d36: 46c0 movew %d0,%sr
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
49d38: 264c moveal %a4,%a3
49d3a: 245b moveal %a3@+,%a2
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
49d3c: b7ca cmpal %a2,%a3
49d3e: 673e beqs 49d7e <_Watchdog_Tickle+0x5e>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
49d40: 202a 0010 movel %a2@(16),%d0
49d44: 4bf9 0004 9c80 lea 49c80 <_Watchdog_Remove>,%a5
49d4a: 6708 beqs 49d54 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
49d4c: 5380 subql #1,%d0
49d4e: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
49d52: 662a bnes 49d7e <_Watchdog_Tickle+0x5e>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49d54: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
49d5a: 2f0a movel %a2,%sp@-
49d5c: 4e95 jsr %a5@
_ISR_Enable( level );
49d5e: 46c2 movew %d2,%sr
switch( watchdog_state ) {
49d60: 7202 moveq #2,%d1
49d62: 588f addql #4,%sp
49d64: b280 cmpl %d0,%d1
49d66: 6722 beqs 49d8a <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49d68: 2003 movel %d3,%d0
49d6a: 40c2 movew %sr,%d2
49d6c: 8082 orl %d2,%d0
49d6e: 46c0 movew %d0,%sr
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
49d70: 2014 movel %a4@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) _Chain_First( header ) );
49d72: 2440 moveal %d0,%a2
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
49d74: b7c0 cmpal %d0,%a3
49d76: 6706 beqs 49d7e <_Watchdog_Tickle+0x5e>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
49d78: 4aaa 0010 tstl %a2@(16)
49d7c: 67dc beqs 49d5a <_Watchdog_Tickle+0x3a>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
49d7e: 46c2 movew %d2,%sr
}
49d80: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
49d86: 4e5e unlk %fp
49d88: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
49d8a: 2f2a 0024 movel %a2@(36),%sp@-
49d8e: 2f2a 0020 movel %a2@(32),%sp@-
49d92: 206a 001c moveal %a2@(28),%a0
49d96: 4e90 jsr %a0@
the_watchdog->id,
the_watchdog->user_data
);
break;
49d98: 508f addql #8,%sp
49d9a: 60cc bras 49d68 <_Watchdog_Tickle+0x48>
0004e4b0 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4e4b0: 4e56 ffe8 linkw %fp,#-24
4e4b4: 202e 0010 movel %fp@(16),%d0
4e4b8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4e4bc: 242e 0008 movel %fp@(8),%d2
4e4c0: 262e 000c movel %fp@(12),%d3
4e4c4: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4e4c8: 4a82 tstl %d2
4e4ca: 677a beqs 4e546 <rtems_barrier_create+0x96>
return RTEMS_INVALID_NAME;
if ( !id )
4e4cc: 4a8a tstl %a2
4e4ce: 6700 00cc beqw 4e59c <rtems_barrier_create+0xec>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4e4d2: 0803 0004 btst #4,%d3
4e4d6: 677a beqs 4e552 <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4e4d8: 42ae fff8 clrl %fp@(-8)
if ( maximum_waiters == 0 )
4e4dc: 4a80 tstl %d0
4e4de: 6700 00b0 beqw 4e590 <rtems_barrier_create+0xe0>
4e4e2: 2239 0006 1cfc movel 61cfc <_Thread_Dispatch_disable_level>,%d1
4e4e8: 5281 addql #1,%d1
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4e4ea: 2d40 fffc movel %d0,%fp@(-4)
4e4ee: 23c1 0006 1cfc movel %d1,61cfc <_Thread_Dispatch_disable_level>
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
4e4f4: 4879 0006 1ecc pea 61ecc <_Barrier_Information>
4e4fa: 4eb9 0004 9d6c jsr 49d6c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4e500: 588f addql #4,%sp
4e502: 2640 moveal %d0,%a3
4e504: 4a80 tstl %d0
4e506: 6776 beqs 4e57e <rtems_barrier_create+0xce> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
4e508: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4e50c: 486e fff8 pea %fp@(-8)
4e510: 486b 0014 pea %a3@(20)
4e514: 4eb9 0004 ed60 jsr 4ed60 <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
4e51a: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
4e51e: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e520: 2079 0006 1ee4 moveal 61ee4 <_Barrier_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
4e526: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e528: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4e52c: 2742 000c movel %d2,%a3@(12)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4e530: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4e532: 4eb9 0004 ae6a jsr 4ae6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4e538: 508f addql #8,%sp
4e53a: 4280 clrl %d0
}
4e53c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e542: 4e5e unlk %fp
4e544: 4e75 rts
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
4e546: 7003 moveq #3,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e548: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e54e: 4e5e unlk %fp
4e550: 4e75 rts
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
4e552: 7201 moveq #1,%d1
4e554: 2d41 fff8 movel %d1,%fp@(-8)
4e558: 2239 0006 1cfc movel 61cfc <_Thread_Dispatch_disable_level>,%d1
4e55e: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4e560: 2d40 fffc movel %d0,%fp@(-4)
4e564: 23c1 0006 1cfc movel %d1,61cfc <_Thread_Dispatch_disable_level>
4e56a: 4879 0006 1ecc pea 61ecc <_Barrier_Information>
4e570: 4eb9 0004 9d6c jsr 49d6c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4e576: 588f addql #4,%sp
4e578: 2640 moveal %d0,%a3
4e57a: 4a80 tstl %d0
4e57c: 668a bnes 4e508 <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4e57e: 4eb9 0004 ae6a jsr 4ae6a <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
4e584: 7005 moveq #5,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e586: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e58c: 4e5e unlk %fp
4e58e: 4e75 rts
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
4e590: 700a moveq #10,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e592: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e598: 4e5e unlk %fp
4e59a: 4e75 rts
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
4e59c: 7009 moveq #9,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e59e: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4e5a4: 4e5e unlk %fp <== NOT EXECUTED
00047490 <rtems_chain_append_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
47490: 4e56 0000 linkw %fp,#0
47494: 2f03 movel %d3,%sp@-
47496: 262e 0014 movel %fp@(20),%d3
4749a: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Append_with_empty_check( chain, node );
4749c: 2f2e 000c movel %fp@(12),%sp@-
474a0: 2f2e 0008 movel %fp@(8),%sp@-
474a4: 242e 0010 movel %fp@(16),%d2
474a8: 4eb9 0004 79fc jsr 479fc <_Chain_Append_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
474ae: 508f addql #8,%sp
474b0: 4a00 tstb %d0
474b2: 660e bnes 474c2 <rtems_chain_append_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
474b4: 242e fff8 movel %fp@(-8),%d2
474b8: 4280 clrl %d0
474ba: 262e fffc movel %fp@(-4),%d3
474be: 4e5e unlk %fp
474c0: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
474c2: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
474c6: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
474ca: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
474ce: 242e fff8 movel %fp@(-8),%d2
474d2: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_append_with_empty_check( chain, node );
if ( was_empty ) {
sc = rtems_event_send( task, events );
474d4: 4ef9 0004 69c4 jmp 469c4 <rtems_event_send>
...
000474dc <rtems_chain_get_with_notification>:
rtems_chain_control *chain,
rtems_id task,
rtems_event_set events,
rtems_chain_node **node
)
{
474dc: 4e56 0000 linkw %fp,#0
474e0: 2f03 movel %d3,%sp@-
474e2: 262e 0010 movel %fp@(16),%d3
474e6: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node **node
)
{
return _Chain_Get_with_empty_check( chain, node );
474e8: 2f2e 0014 movel %fp@(20),%sp@-
474ec: 2f2e 0008 movel %fp@(8),%sp@-
474f0: 242e 000c movel %fp@(12),%d2
474f4: 4eb9 0004 7a9c jsr 47a9c <_Chain_Get_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
474fa: 508f addql #8,%sp
474fc: 4a00 tstb %d0
474fe: 660e bnes 4750e <rtems_chain_get_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
47500: 242e fff8 movel %fp@(-8),%d2
47504: 4280 clrl %d0
47506: 262e fffc movel %fp@(-4),%d3
4750a: 4e5e unlk %fp
4750c: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
4750e: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
47512: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
47516: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
4751a: 242e fff8 movel %fp@(-8),%d2
4751e: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool is_empty = rtems_chain_get_with_empty_check( chain, node );
if ( is_empty ) {
sc = rtems_event_send( task, events );
47520: 4ef9 0004 69c4 jmp 469c4 <rtems_event_send>
...
00047528 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
47528: 4e56 ffe0 linkw %fp,#-32
4752c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
47530: 2c0e movel %fp,%d6
47532: 45f9 0004 7aec lea 47aec <_Chain_Get>,%a2
47538: 5986 subql #4,%d6
4753a: 47f9 0004 681c lea 4681c <rtems_event_receive>,%a3
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
47540: 262e 0008 movel %fp@(8),%d3
47544: 2a2e 000c movel %fp@(12),%d5
47548: 282e 0010 movel %fp@(16),%d4
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
4754c: 2f03 movel %d3,%sp@-
4754e: 4e92 jsr %a2@
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
47550: 588f addql #4,%sp
47552: 2400 movel %d0,%d2
47554: 6622 bnes 47578 <rtems_chain_get_with_wait+0x50>
) {
rtems_event_set out;
sc = rtems_event_receive(
47556: 2f06 movel %d6,%sp@-
47558: 2f04 movel %d4,%sp@-
4755a: 42a7 clrl %sp@-
4755c: 2f05 movel %d5,%sp@-
4755e: 4e93 jsr %a3@
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
47560: 4fef 0010 lea %sp@(16),%sp
47564: 4a80 tstl %d0
47566: 67e4 beqs 4754c <rtems_chain_get_with_wait+0x24> <== NEVER TAKEN
timeout,
&out
);
}
*node_ptr = node;
47568: 206e 0014 moveal %fp@(20),%a0
4756c: 2082 movel %d2,%a0@
return sc;
}
4756e: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3
47574: 4e5e unlk %fp
47576: 4e75 rts
timeout,
&out
);
}
*node_ptr = node;
47578: 206e 0014 moveal %fp@(20),%a0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
4757c: 4280 clrl %d0
timeout,
&out
);
}
*node_ptr = node;
4757e: 2082 movel %d2,%a0@
return sc;
}
47580: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3
47586: 4e5e unlk %fp
...
0004758c <rtems_chain_prepend_with_notification>:
rtems_chain_control *chain,
rtems_chain_node *node,
rtems_id task,
rtems_event_set events
)
{
4758c: 4e56 0000 linkw %fp,#0
47590: 2f03 movel %d3,%sp@-
47592: 262e 0014 movel %fp@(20),%d3
47596: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check(
rtems_chain_control *chain,
rtems_chain_node *node
)
{
return _Chain_Prepend_with_empty_check( chain, node );
47598: 2f2e 000c movel %fp@(12),%sp@-
4759c: 2f2e 0008 movel %fp@(8),%sp@-
475a0: 242e 0010 movel %fp@(16),%d2
475a4: 4eb9 0004 7b58 jsr 47b58 <_Chain_Prepend_with_empty_check>
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
475aa: 508f addql #8,%sp
475ac: 4a00 tstb %d0
475ae: 660e bnes 475be <rtems_chain_prepend_with_notification+0x32>
sc = rtems_event_send( task, events );
}
return sc;
}
475b0: 242e fff8 movel %fp@(-8),%d2
475b4: 4280 clrl %d0
475b6: 262e fffc movel %fp@(-4),%d3
475ba: 4e5e unlk %fp
475bc: 4e75 rts
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
475be: 2d43 000c movel %d3,%fp@(12)
}
return sc;
}
475c2: 262e fffc movel %fp@(-4),%d3
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
475c6: 2d42 0008 movel %d2,%fp@(8)
}
return sc;
}
475ca: 242e fff8 movel %fp@(-8),%d2
475ce: 4e5e unlk %fp
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool was_empty = rtems_chain_prepend_with_empty_check( chain, node );
if (was_empty) {
sc = rtems_event_send( task, events );
475d0: 4ef9 0004 69c4 jmp 469c4 <rtems_event_send>
...
00046e26 <rtems_initialize_start_multitasking>:
46e26: 7002 moveq #2,%d0
}
void rtems_initialize_start_multitasking(void)
{
46e28: 4e56 0000 linkw %fp,#0
****** APPLICATION RUNS HERE ******
****** RETURNS WHEN SYSTEM IS SHUT DOWN ******
*******************************************************************
*******************************************************************
*******************************************************************/
}
46e2c: 4e5e unlk %fp
46e2e: 23c0 0005 f590 movel %d0,5f590 <_System_state_Current>
void rtems_initialize_start_multitasking(void)
{
_System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
_Thread_Start_multitasking();
46e34: 4ef9 0004 96e0 jmp 496e0 <_Thread_Start_multitasking>
...
00048388 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
48388: 4e56 fff4 linkw %fp,#-12
4838c: 226e 000c moveal %fp@(12),%a1
48390: 48d7 040c moveml %d2-%d3/%a2,%sp@
48394: 242e 0008 movel %fp@(8),%d2
48398: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
4839c: 2039 0006 382c movel 6382c <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
483a2: 4ab9 0006 37b8 tstl 637b8 <_Per_CPU_Information+0x8>
483a8: 6600 009c bnew 48446 <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
483ac: 4a8a tstl %a2
483ae: 6700 00ea beqw 4849a <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
483b2: 2480 movel %d0,%a2@
if ( driver_table == NULL )
483b4: 4a89 tstl %a1
483b6: 6700 00e2 beqw 4849a <rtems_io_register_driver+0x112>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483ba: 4a91 tstl %a1@
483bc: 6700 00d4 beqw 48492 <rtems_io_register_driver+0x10a>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
483c0: b480 cmpl %d0,%d2
483c2: 6476 bccs 4843a <rtems_io_register_driver+0xb2>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
483c4: 2039 0006 3620 movel 63620 <_Thread_Dispatch_disable_level>,%d0
483ca: 5280 addql #1,%d0
483cc: 23c0 0006 3620 movel %d0,63620 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
483d2: 4a82 tstl %d2
483d4: 667c bnes 48452 <rtems_io_register_driver+0xca>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
483d6: 2039 0006 382c movel 6382c <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483dc: 6700 0106 beqw 484e4 <rtems_io_register_driver+0x15c>
483e0: 2239 0006 3830 movel 63830 <_IO_Driver_address_table>,%d1
483e6: 2041 moveal %d1,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483e8: 4a90 tstl %a0@
483ea: 6700 008e beqw 4847a <rtems_io_register_driver+0xf2>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483ee: 5282 addql #1,%d2
483f0: 41e8 0018 lea %a0@(24),%a0
483f4: b480 cmpl %d0,%d2
483f6: 65f0 bcss 483e8 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
483f8: 2482 movel %d2,%a2@
if ( m != n )
483fa: b480 cmpl %d0,%d2
483fc: 6700 00e8 beqw 484e6 <rtems_io_register_driver+0x15e>
48400: 2602 movel %d2,%d3
48402: 2002 movel %d2,%d0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
48404: 2041 moveal %d1,%a0
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
48406: e78b lsll #3,%d3
48408: eb88 lsll #5,%d0
4840a: 9083 subl %d3,%d0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
4840c: d1c0 addal %d0,%a0
4840e: 20d9 movel %a1@+,%a0@+
48410: 20d9 movel %a1@+,%a0@+
48412: 20d9 movel %a1@+,%a0@+
48414: 20d9 movel %a1@+,%a0@+
48416: 20d9 movel %a1@+,%a0@+
48418: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
4841a: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
48420: 2d42 0008 movel %d2,%fp@(8)
}
48424: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
4842a: 42ae 0010 clrl %fp@(16)
4842e: 42ae 000c clrl %fp@(12)
}
48432: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48434: 4ef9 0004 ffc8 jmp 4ffc8 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
4843a: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4843c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
48442: 4e5e unlk %fp
48444: 4e75 rts
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
48446: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48448: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4844e: 4e5e unlk %fp
48450: 4e75 rts
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
48452: 2202 movel %d2,%d1
48454: 2002 movel %d2,%d0
48456: e789 lsll #3,%d1
48458: eb88 lsll #5,%d0
4845a: 2079 0006 3830 moveal 63830 <_IO_Driver_address_table>,%a0
48460: 9081 subl %d1,%d0
48462: d1c0 addal %d0,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48464: 4a90 tstl %a0@
48466: 673e beqs 484a6 <rtems_io_register_driver+0x11e>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
48468: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
4846e: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48470: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
48476: 4e5e unlk %fp
48478: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
4847a: 4aa8 0004 tstl %a0@(4)
4847e: 6700 ff78 beqw 483f8 <rtems_io_register_driver+0x70>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
48482: 5282 addql #1,%d2
48484: 41e8 0018 lea %a0@(24),%a0
48488: b480 cmpl %d0,%d2
4848a: 6500 ff5c bcsw 483e8 <rtems_io_register_driver+0x60>
4848e: 6000 ff68 braw 483f8 <rtems_io_register_driver+0x70>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48492: 4aa9 0004 tstl %a1@(4)
48496: 6600 ff28 bnew 483c0 <rtems_io_register_driver+0x38>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
4849a: 7009 moveq #9,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4849c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
484a2: 4e5e unlk %fp
484a4: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
484a6: 4aa8 0004 tstl %a0@(4)
484aa: 66bc bnes 48468 <rtems_io_register_driver+0xe0>
484ac: 2239 0006 3830 movel 63830 <_IO_Driver_address_table>,%d1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
484b2: 2041 moveal %d1,%a0
484b4: d1c0 addal %d0,%a0
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
484b6: 2482 movel %d2,%a2@
}
_IO_Driver_address_table [major] = *driver_table;
484b8: 20d9 movel %a1@+,%a0@+
484ba: 20d9 movel %a1@+,%a0@+
484bc: 20d9 movel %a1@+,%a0@+
484be: 20d9 movel %a1@+,%a0@+
484c0: 20d9 movel %a1@+,%a0@+
484c2: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
484c4: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
484ca: 2d42 0008 movel %d2,%fp@(8)
}
484ce: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484d4: 42ae 0010 clrl %fp@(16)
484d8: 42ae 000c clrl %fp@(12)
}
484dc: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484de: 4ef9 0004 ffc8 jmp 4ffc8 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
484e4: 4292 clrl %a2@ <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
484e6: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
484ec: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
484ee: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
484f4: 4e5e unlk %fp <== NOT EXECUTED
00049568 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
49568: 4e56 fff0 linkw %fp,#-16
4956c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
49570: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
49574: 4a8b tstl %a3
49576: 6742 beqs 495ba <rtems_iterate_over_all_threads+0x52><== NEVER TAKEN
49578: 49f9 0006 1f38 lea 61f38 <_Objects_Information_table+0x4>,%a4
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
4957e: 205c moveal %a4@+,%a0
49580: 4a88 tstl %a0
49582: 672e beqs 495b2 <rtems_iterate_over_all_threads+0x4a>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
49584: 2468 0004 moveal %a0@(4),%a2
if ( !information )
49588: 4a8a tstl %a2
4958a: 6726 beqs 495b2 <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4958c: 4a6a 000e tstw %a2@(14)
49590: 6720 beqs 495b2 <rtems_iterate_over_all_threads+0x4a><== NEVER TAKEN
49592: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
49594: 206a 0018 moveal %a2@(24),%a0
49598: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4959c: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
4959e: 4a80 tstl %d0
495a0: 6706 beqs 495a8 <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
continue;
(*routine)(the_thread);
495a2: 2f00 movel %d0,%sp@-
495a4: 4e93 jsr %a3@
495a6: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
495a8: 4280 clrl %d0
495aa: 302a 000e movew %a2@(14),%d0
495ae: b480 cmpl %d0,%d2
495b0: 63e2 blss 49594 <rtems_iterate_over_all_threads+0x2c>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
495b2: b9fc 0006 1f44 cmpal #401220,%a4
495b8: 66c4 bnes 4957e <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
495ba: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
495c0: 4e5e unlk %fp <== NOT EXECUTED
000482b0 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
482b0: 7001 moveq #1,%d0
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
482b2: 4e56 0000 linkw %fp,#0
482b6: 222e 0008 movel %fp@(8),%d1
482ba: 2f02 movel %d2,%sp@-
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
482bc: b081 cmpl %d1,%d0
482be: 673e beqs 482fe <rtems_object_get_api_class_name+0x4e>
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
482c0: 7402 moveq #2,%d2
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
482c2: 203c 0005 febc movel #392892,%d0
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
482c8: b481 cmpl %d1,%d2
482ca: 6708 beqs 482d4 <rtems_object_get_api_class_name+0x24>
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
}
482cc: 242e fffc movel %fp@(-4),%d2
482d0: 4e5e unlk %fp
482d2: 4e75 rts
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
482d4: 203c 0006 0ea0 movel #396960,%d0
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
482da: 2f2e 000c movel %fp@(12),%sp@-
482de: 2f00 movel %d0,%sp@-
482e0: 4eb9 0004 d23c jsr 4d23c <rtems_assoc_ptr_by_local>
if ( class_assoc )
482e6: 508f addql #8,%sp
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
482e8: 2040 moveal %d0,%a0
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
482ea: 203c 0005 fec4 movel #392900,%d0
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
482f0: 4a88 tstl %a0
482f2: 67d8 beqs 482cc <rtems_object_get_api_class_name+0x1c>
return class_assoc->name;
return "BAD CLASS";
}
482f4: 242e fffc movel %fp@(-4),%d2
482f8: 4e5e unlk %fp
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
482fa: 2010 movel %a0@,%d0
return "BAD CLASS";
}
482fc: 4e75 rts
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
482fe: 203c 0006 0e88 movel #396936,%d0
48304: 60d4 bras 482da <rtems_object_get_api_class_name+0x2a>
...
00048370 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
48370: 4e56 0000 linkw %fp,#0
48374: 2f0a movel %a2,%sp@-
48376: 246e 0010 moveal %fp@(16),%a2
4837a: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
4837c: 4a8a tstl %a2
4837e: 6768 beqs 483e8 <rtems_object_get_class_information+0x78>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48380: 3f2e 000e movew %fp@(14),%sp@-
48384: 4267 clrw %sp@-
48386: 2f2e 0008 movel %fp@(8),%sp@-
4838a: 4eb9 0004 a04c jsr 4a04c <_Objects_Get_information>
if ( !obj_info )
48390: 508f addql #8,%sp
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48392: 2040 moveal %d0,%a0
if ( !obj_info )
48394: 4a80 tstl %d0
48396: 675e beqs 483f6 <rtems_object_get_class_information+0x86>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
48398: 24a8 0006 movel %a0@(6),%a2@
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
4839c: 4282 clrl %d2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
4839e: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
483a4: 3428 000e movew %a0@(14),%d2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
483a8: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
483ae: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
483b2: 6750 beqs 48404 <rtems_object_get_class_information+0x94><== NEVER TAKEN
483b4: 2068 0018 moveal %a0@(24),%a0
483b8: 7201 moveq #1,%d1
483ba: 7001 moveq #1,%d0
483bc: 93c9 subal %a1,%a1
483be: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
483c0: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
483c4: 6718 beqs 483de <rtems_object_get_class_information+0x6e>
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
483c6: 2200 movel %d0,%d1
483c8: b082 cmpl %d2,%d0
483ca: 63f2 blss 483be <rtems_object_get_class_information+0x4e><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
483cc: 2549 000e movel %a1,%a2@(14)
return RTEMS_SUCCESSFUL;
483d0: 4280 clrl %d0
}
483d2: 242e fff8 movel %fp@(-8),%d2
483d6: 246e fffc moveal %fp@(-4),%a2
483da: 4e5e unlk %fp
483dc: 4e75 rts
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
483de: 5289 addql #1,%a1
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
483e0: 2200 movel %d0,%d1
483e2: b082 cmpl %d2,%d0
483e4: 63d8 blss 483be <rtems_object_get_class_information+0x4e><== NEVER TAKEN
483e6: 60e4 bras 483cc <rtems_object_get_class_information+0x5c>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
483e8: 242e fff8 movel %fp@(-8),%d2
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
483ec: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
483ee: 246e fffc moveal %fp@(-4),%a2
483f2: 4e5e unlk %fp
483f4: 4e75 rts
483f6: 242e fff8 movel %fp@(-8),%d2
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
483fa: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
483fc: 246e fffc moveal %fp@(-4),%a2
48400: 4e5e unlk %fp
48402: 4e75 rts
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
48404: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
48406: 4280 clrl %d0 <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
48408: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED
4840c: 60c4 bras 483d2 <rtems_object_get_class_information+0x62><== NOT EXECUTED
...
00056b40 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
56b40: 4e56 ffe8 linkw %fp,#-24
56b44: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
56b48: 242e 0008 movel %fp@(8),%d2
56b4c: 2a2e 000c movel %fp@(12),%d5
56b50: 282e 0010 movel %fp@(16),%d4
56b54: 262e 0014 movel %fp@(20),%d3
56b58: 246e 001c moveal %fp@(28),%a2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
56b5c: 4a82 tstl %d2
56b5e: 673a beqs 56b9a <rtems_partition_create+0x5a>
return RTEMS_INVALID_NAME;
if ( !starting_address )
56b60: 4a85 tstl %d5
56b62: 671e beqs 56b82 <rtems_partition_create+0x42>
return RTEMS_INVALID_ADDRESS;
if ( !id )
56b64: 4a8a tstl %a2
56b66: 671a beqs 56b82 <rtems_partition_create+0x42> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
56b68: 4a84 tstl %d4
56b6a: 6722 beqs 56b8e <rtems_partition_create+0x4e>
56b6c: 4a83 tstl %d3
56b6e: 671e beqs 56b8e <rtems_partition_create+0x4e>
56b70: b684 cmpl %d4,%d3
56b72: 621a bhis 56b8e <rtems_partition_create+0x4e>
*/
RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned (
uint32_t buffer_size
)
{
return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0);
56b74: 7003 moveq #3,%d0
56b76: c083 andl %d3,%d0
56b78: 6614 bnes 56b8e <rtems_partition_create+0x4e>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
56b7a: 103c 0003 moveb #3,%d0
56b7e: c085 andl %d5,%d0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
56b80: 6724 beqs 56ba6 <rtems_partition_create+0x66>
return RTEMS_INVALID_ADDRESS;
56b82: 7009 moveq #9,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56b84: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56b8a: 4e5e unlk %fp
56b8c: 4e75 rts
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
56b8e: 7008 moveq #8,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56b90: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56b96: 4e5e unlk %fp
56b98: 4e75 rts
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
56b9a: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56b9c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56ba2: 4e5e unlk %fp
56ba4: 4e75 rts
56ba6: 2039 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d0
56bac: 5280 addql #1,%d0
56bae: 23c0 0007 e244 movel %d0,7e244 <_Thread_Dispatch_disable_level>
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
56bb4: 4879 0007 e0e4 pea 7e0e4 <_Partition_Information>
56bba: 4eb9 0005 b6bc jsr 5b6bc <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
56bc0: 588f addql #4,%sp
56bc2: 2640 moveal %d0,%a3
56bc4: 4a80 tstl %d0
56bc6: 6758 beqs 56c20 <rtems_partition_create+0xe0> <== NEVER TAKEN
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
56bc8: 2744 0014 movel %d4,%a3@(20)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
56bcc: 276e 0018 001c movel %fp@(24),%a3@(28)
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
56bd2: 4c43 4004 remul %d3,%d4,%d4
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
56bd6: 2745 0010 movel %d5,%a3@(16)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
56bda: 2743 0018 movel %d3,%a3@(24)
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
56bde: 42ab 0020 clrl %a3@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
56be2: 2f03 movel %d3,%sp@-
56be4: 2f04 movel %d4,%sp@-
56be6: 2f05 movel %d5,%sp@-
56be8: 486b 0024 pea %a3@(36)
56bec: 4eb9 0005 a05c jsr 5a05c <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
56bf2: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
56bf6: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
56bf8: 2079 0007 e0fc moveal 7e0fc <_Partition_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
56bfe: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
56c00: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
56c04: 2742 000c movel %d2,%a3@(12)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
56c08: 2480 movel %d0,%a2@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
56c0a: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
56c10: 4fef 0010 lea %sp@(16),%sp
56c14: 4280 clrl %d0
}
56c16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56c1c: 4e5e unlk %fp
56c1e: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
56c20: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
56c26: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56c28: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
56c2e: 4e5e unlk %fp
...
00056d54 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
56d54: 4e56 fffc linkw %fp,#-4
56d58: 2f0a movel %a2,%sp@-
56d5a: 2f02 movel %d2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
56d5c: 486e fffc pea %fp@(-4)
56d60: 2f2e 0008 movel %fp@(8),%sp@-
56d64: 4879 0007 e0e4 pea 7e0e4 <_Partition_Information>
56d6a: 242e 000c movel %fp@(12),%d2
56d6e: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
56d74: 4fef 000c lea %sp@(12),%sp
56d78: 2440 moveal %d0,%a2
56d7a: 4aae fffc tstl %fp@(-4)
56d7e: 670e beqs 56d8e <rtems_partition_return_buffer+0x3a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56d80: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
56d84: 7004 moveq #4,%d0
}
56d86: 246e fff8 moveal %fp@(-8),%a2
56d8a: 4e5e unlk %fp
56d8c: 4e75 rts
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
56d8e: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
56d92: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
56d96: b082 cmpl %d2,%d0
56d98: 623c bhis 56dd6 <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
56d9a: d280 addl %d0,%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
56d9c: b282 cmpl %d2,%d1
56d9e: 6536 bcss 56dd6 <rtems_partition_return_buffer+0x82><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
56da0: 2202 movel %d2,%d1
56da2: 9280 subl %d0,%d1
56da4: 2001 movel %d1,%d0
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
56da6: 4c6a 0001 0018 remul %a2@(24),%d1,%d0
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
56dac: 4a81 tstl %d1
56dae: 6626 bnes 56dd6 <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
56db0: 2f02 movel %d2,%sp@-
56db2: 486a 0024 pea %a2@(36)
56db6: 4eb9 0005 9fc0 jsr 59fc0 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
56dbc: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
56dc0: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56dc6: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
56dca: 508f addql #8,%sp
56dcc: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56dce: 246e fff8 moveal %fp@(-8),%a2
56dd2: 4e5e unlk %fp
56dd4: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
56dd6: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56ddc: 242e fff4 movel %fp@(-12),%d2
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
56de0: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56de2: 246e fff8 moveal %fp@(-8),%a2
56de6: 4e5e unlk %fp
...
00047800 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
47800: 4e56 fff8 linkw %fp,#-8
47804: 2f03 movel %d3,%sp@-
47806: 2f02 movel %d2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
47808: 486e fffc pea %fp@(-4)
4780c: 242e 0008 movel %fp@(8),%d2
47810: 2f02 movel %d2,%sp@-
47812: 4879 0006 1440 pea 61440 <_Rate_monotonic_Information>
47818: 4eb9 0004 9b68 jsr 49b68 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
4781e: 4fef 000c lea %sp@(12),%sp
47822: 4aae fffc tstl %fp@(-4)
47826: 6624 bnes 4784c <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
47828: 2279 0006 16cc moveal 616cc <_Per_CPU_Information+0xc>,%a1
4782e: 2040 moveal %d0,%a0
47830: b3e8 0040 cmpal %a0@(64),%a1
47834: 6726 beqs 4785c <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
47836: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
4783c: 7617 moveq #23,%d3
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4783e: 2003 movel %d3,%d0
47840: 242e fff0 movel %fp@(-16),%d2
47844: 262e fff4 movel %fp@(-12),%d3
47848: 4e5e unlk %fp
4784a: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4784c: 7604 moveq #4,%d3
}
4784e: 2003 movel %d3,%d0
47850: 242e fff0 movel %fp@(-16),%d2
47854: 262e fff4 movel %fp@(-12),%d3
47858: 4e5e unlk %fp
4785a: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
4785c: 4aae 000c tstl %fp@(12)
47860: 6624 bnes 47886 <rtems_rate_monotonic_period+0x86>
switch ( the_period->state ) {
47862: 2040 moveal %d0,%a0
47864: 7204 moveq #4,%d1
47866: 2028 0038 movel %a0@(56),%d0
4786a: b280 cmpl %d0,%d1
4786c: 6400 008a bccw 478f8 <rtems_rate_monotonic_period+0xf8>
47870: 4283 clrl %d3 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47872: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch> <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47878: 2003 movel %d3,%d0
4787a: 242e fff0 movel %fp@(-16),%d2
4787e: 262e fff4 movel %fp@(-12),%d3
47882: 4e5e unlk %fp
47884: 4e75 rts
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
47886: 223c 0000 0700 movel #1792,%d1
4788c: 40c3 movew %sr,%d3
4788e: 8283 orl %d3,%d1
47890: 46c1 movew %d1,%sr
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
47892: 2040 moveal %d0,%a0
47894: 2228 0038 movel %a0@(56),%d1
47898: 6772 beqs 4790c <rtems_rate_monotonic_period+0x10c>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
4789a: 7402 moveq #2,%d2
4789c: b481 cmpl %d1,%d2
4789e: 6700 00d2 beqw 47972 <rtems_rate_monotonic_period+0x172>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
478a2: 7404 moveq #4,%d2
478a4: b481 cmpl %d1,%d2
478a6: 66a4 bnes 4784c <rtems_rate_monotonic_period+0x4c><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
478a8: 2f00 movel %d0,%sp@-
478aa: 2d40 fff8 movel %d0,%fp@(-8)
478ae: 4eb9 0004 76e6 jsr 476e6 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
478b4: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
478b6: 7202 moveq #2,%d1
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
478b8: 7606 moveq #6,%d3
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
478ba: 202e fff8 movel %fp@(-8),%d0
478be: 2040 moveal %d0,%a0
the_period->next_length = length;
478c0: 226e 000c moveal %fp@(12),%a1
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
478c4: 2141 0038 movel %d1,%a0@(56)
the_period->next_length = length;
478c8: 2149 003c movel %a1,%a0@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
478cc: 2149 001c movel %a1,%a0@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
478d0: 4868 0010 pea %a0@(16)
478d4: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
478da: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
478e0: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478e6: 242e fff0 movel %fp@(-16),%d2
478ea: 2003 movel %d3,%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
478ec: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478f0: 262e fff4 movel %fp@(-12),%d3
478f4: 4e5e unlk %fp
478f6: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
478f8: 41f9 0005 ece6 lea 5ece6 <CSWTCH.2>,%a0
478fe: 2630 0c00 movel %a0@(00000000,%d0:l:4),%d3
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47902: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
47908: 6000 ff6e braw 47878 <rtems_rate_monotonic_period+0x78>
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
4790c: 46c3 movew %d3,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
4790e: 2f00 movel %d0,%sp@-
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47910: 4283 clrl %d3
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
47912: 2d40 fff8 movel %d0,%fp@(-8)
47916: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4791c: 202e fff8 movel %fp@(-8),%d0
47920: 2240 moveal %d0,%a1
47922: 223c 0004 7c84 movel #294020,%d1
the_watchdog->id = id;
47928: 2342 0030 movel %d2,%a1@(48)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
4792c: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47930: 2341 002c movel %d1,%a1@(44)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
the_period->state = RATE_MONOTONIC_ACTIVE;
47934: 7202 moveq #2,%d1
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
47936: 2342 003c movel %d2,%a1@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4793a: 2342 001c movel %d2,%a1@(28)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
the_period->state = RATE_MONOTONIC_ACTIVE;
4793e: 2341 0038 movel %d1,%a1@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47942: 42a9 0018 clrl %a1@(24)
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
47946: 42a9 0034 clrl %a1@(52)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4794a: 4869 0010 pea %a1@(16)
4794e: 4879 0006 15f0 pea 615f0 <_Watchdog_Ticks_chain>
47954: 4eb9 0004 b74c jsr 4b74c <_Watchdog_Insert>
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
4795a: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47960: 242e fff0 movel %fp@(-16),%d2
47964: 2003 movel %d3,%d0
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47966: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4796a: 262e fff4 movel %fp@(-12),%d3
4796e: 4e5e unlk %fp
47970: 4e75 rts
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
47972: 2f00 movel %d0,%sp@-
47974: 2d40 fff8 movel %d0,%fp@(-8)
47978: 4eb9 0004 76e6 jsr 476e6 <_Rate_monotonic_Update_statistics>
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
4797e: 202e fff8 movel %fp@(-8),%d0
47982: 7201 moveq #1,%d1
47984: 2040 moveal %d0,%a0
the_period->next_length = length;
47986: 226e 000c moveal %fp@(12),%a1
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
4798a: 2141 0038 movel %d1,%a0@(56)
the_period->next_length = length;
4798e: 2149 003c movel %a1,%a0@(60)
_ISR_Enable( level );
47992: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
47994: 2079 0006 16cc moveal 616cc <_Per_CPU_Information+0xc>,%a0
4799a: 2240 moveal %d0,%a1
4799c: 5089 addql #8,%a1
4799e: 2151 0020 movel %a1@,%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
479a2: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
479a6: 2d40 fff8 movel %d0,%fp@(-8)
479aa: 2f08 movel %a0,%sp@-
479ac: 4eb9 0004 b0e4 jsr 4b0e4 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
479b2: 223c 0000 0700 movel #1792,%d1
479b8: 40c2 movew %sr,%d2
479ba: 8282 orl %d2,%d1
479bc: 46c1 movew %d1,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
479be: 7602 moveq #2,%d3
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
479c0: 202e fff8 movel %fp@(-8),%d0
479c4: 2040 moveal %d0,%a0
479c6: 2228 0038 movel %a0@(56),%d1
the_period->state = RATE_MONOTONIC_ACTIVE;
479ca: 2143 0038 movel %d3,%a0@(56)
_ISR_Enable( level );
479ce: 46c2 movew %d2,%sr
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
479d0: 7003 moveq #3,%d0
479d2: 4fef 000c lea %sp@(12),%sp
479d6: b081 cmpl %d1,%d0
479d8: 6716 beqs 479f0 <rtems_rate_monotonic_period+0x1f0>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
479da: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
479e0: 4283 clrl %d3
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
479e2: 2003 movel %d3,%d0
479e4: 242e fff0 movel %fp@(-16),%d2
479e8: 262e fff4 movel %fp@(-12),%d3
479ec: 4e5e unlk %fp
479ee: 4e75 rts
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
479f0: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
479f4: 4283 clrl %d3
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
479f6: 2f39 0006 16cc movel 616cc <_Per_CPU_Information+0xc>,%sp@-
479fc: 4eb9 0004 a430 jsr 4a430 <_Thread_Clear_state>
47a02: 508f addql #8,%sp
_Thread_Enable_dispatch();
47a04: 4eb9 0004 a7fe jsr 4a7fe <_Thread_Enable_dispatch>
47a0a: 60d6 bras 479e2 <rtems_rate_monotonic_period+0x1e2>
00047a0c <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
47a0c: 4e56 ff78 linkw %fp,#-136
47a10: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
47a14: 262e 0008 movel %fp@(8),%d3
47a18: 246e 000c moveal %fp@(12),%a2
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
47a1c: 4a8a tstl %a2
47a1e: 6700 0082 beqw 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return;
(*print)( context, "Period information by period\n" );
47a22: 4879 0005 ecfa pea 5ecfa <CSWTCH.2+0x14>
47a28: 2f03 movel %d3,%sp@-
47a2a: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
47a2c: 4879 0005 ed18 pea 5ed18 <CSWTCH.2+0x32>
47a32: 2f03 movel %d3,%sp@-
47a34: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
47a36: 4879 0005 ed3a pea 5ed3a <CSWTCH.2+0x54>
47a3c: 2f03 movel %d3,%sp@-
47a3e: 4e92 jsr %a2@
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
47a40: 4879 0005 ed5d pea 5ed5d <CSWTCH.2+0x77>
47a46: 2f03 movel %d3,%sp@-
47a48: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
47a4a: 4fef 001c lea %sp@(28),%sp
47a4e: 2ebc 0005 eda8 movel #388520,%sp@
47a54: 2f03 movel %d3,%sp@-
47a56: 4e92 jsr %a2@
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47a58: 2439 0006 1446 movel 61446 <_Rate_monotonic_Information+0x6>,%d2
47a5e: 508f addql #8,%sp
47a60: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47a66: 623a bhis 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NEVER TAKEN
47a68: 280e movel %fp,%d4
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47a6a: 2a0e movel %fp,%d5
47a6c: 0684 ffff ffa2 addil #-94,%d4
47a72: 47f9 0004 d4e0 lea 4d4e0 <rtems_rate_monotonic_get_statistics>,%a3
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47a78: 4bf9 0004 d5a0 lea 4d5a0 <rtems_rate_monotonic_get_status>,%a5
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47a7e: 5b85 subql #5,%d5
47a80: 49f9 0004 7d64 lea 47d64 <rtems_object_get_name>,%a4
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47a86: 2e3c 0004 b34c movel #308044,%d7
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
47a8c: 2f04 movel %d4,%sp@-
47a8e: 2f02 movel %d2,%sp@-
47a90: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47a92: 508f addql #8,%sp
47a94: 4a80 tstl %d0
47a96: 6714 beqs 47aac <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47a98: 5282 addql #1,%d2
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47a9a: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47aa0: 63ea blss 47a8c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47aa2: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5
47aa8: 4e5e unlk %fp
47aaa: 4e75 rts
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
47aac: 486e ffda pea %fp@(-38)
47ab0: 2f02 movel %d2,%sp@-
47ab2: 4e95 jsr %a5@
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47ab4: 2f05 movel %d5,%sp@-
47ab6: 4878 0005 pea 5 <COMPARE>
47aba: 2f2e ffda movel %fp@(-38),%sp@-
47abe: 4e94 jsr %a4@
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47ac0: 2f2e ffa6 movel %fp@(-90),%sp@-
47ac4: 2f2e ffa2 movel %fp@(-94),%sp@-
47ac8: 2f05 movel %d5,%sp@-
47aca: 2f02 movel %d2,%sp@-
47acc: 4879 0005 edf4 pea 5edf4 <CSWTCH.2+0x10e>
47ad2: 2f03 movel %d3,%sp@-
47ad4: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47ad6: 202e ffa2 movel %fp@(-94),%d0
47ada: 4fef 002c lea %sp@(44),%sp
47ade: 6618 bnes 47af8 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
47ae0: 4879 0005 e3b6 pea 5e3b6 <rtems_filesystem_mount_table_size+0x542>
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47ae6: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
47ae8: 2f03 movel %d3,%sp@-
47aea: 4e92 jsr %a2@
continue;
47aec: 508f addql #8,%sp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47aee: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47af4: 6396 blss 47a8c <rtems_rate_monotonic_report_statistics_with_plugin+0x80><== ALWAYS TAKEN
47af6: 60aa bras 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47af8: 486e fff2 pea %fp@(-14)
47afc: 2047 moveal %d7,%a0
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47afe: 5282 addql #1,%d2
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47b00: 2f00 movel %d0,%sp@-
47b02: 486e ffba pea %fp@(-70)
47b06: 4e90 jsr %a0@
(*print)( context,
47b08: 202e fff6 movel %fp@(-10),%d0
47b0c: 223c 0000 03e8 movel #1000,%d1
47b12: 4c41 0800 remsl %d1,%d0,%d0
47b16: 2c2e ffb6 movel %fp@(-74),%d6
47b1a: 2f00 movel %d0,%sp@-
47b1c: 2001 movel %d1,%d0
47b1e: 2f2e fff2 movel %fp@(-14),%sp@-
47b22: 4c40 6806 remsl %d0,%d6,%d6
47b26: 202e ffae movel %fp@(-82),%d0
47b2a: 2246 moveal %d6,%a1
47b2c: 223c 0000 03e8 movel #1000,%d1
47b32: 2f09 movel %a1,%sp@-
47b34: 2f2e ffb2 movel %fp@(-78),%sp@-
47b38: 4c41 0800 remsl %d1,%d0,%d0
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
47b3c: 2c3c 0000 03e8 movel #1000,%d6
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
47b42: 2f00 movel %d0,%sp@-
47b44: 2f2e ffaa movel %fp@(-86),%sp@-
47b48: 4879 0005 ee0b pea 5ee0b <CSWTCH.2+0x125>
47b4e: 2f03 movel %d3,%sp@-
47b50: 4e92 jsr %a2@
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
47b52: 4fef 002c lea %sp@(44),%sp
47b56: 2047 moveal %d7,%a0
47b58: 486e fff2 pea %fp@(-14)
47b5c: 2f2e ffa2 movel %fp@(-94),%sp@-
47b60: 486e ffd2 pea %fp@(-46)
47b64: 4e90 jsr %a0@
(*print)( context,
47b66: 202e fff6 movel %fp@(-10),%d0
47b6a: 4c46 0800 remsl %d6,%d0,%d0
47b6e: 222e ffce movel %fp@(-50),%d1
47b72: 2f00 movel %d0,%sp@-
47b74: 2f2e fff2 movel %fp@(-14),%sp@-
47b78: 4c46 1801 remsl %d6,%d1,%d1
47b7c: 202e ffc6 movel %fp@(-58),%d0
47b80: 2241 moveal %d1,%a1
47b82: 2f09 movel %a1,%sp@-
47b84: 2f2e ffca movel %fp@(-54),%sp@-
47b88: 4c46 0800 remsl %d6,%d0,%d0
47b8c: 2f00 movel %d0,%sp@-
47b8e: 2f2e ffc2 movel %fp@(-62),%sp@-
47b92: 4879 0005 ee2a pea 5ee2a <CSWTCH.2+0x144>
47b98: 2f03 movel %d3,%sp@-
47b9a: 4e92 jsr %a2@
47b9c: 4fef 002c lea %sp@(44),%sp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47ba0: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47ba6: 6300 fee4 blsw 47a8c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
47baa: 6000 fef6 braw 47aa2 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
00047bc8 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47bc8: 4e56 0000 linkw %fp,#0
47bcc: 2039 0006 1530 movel 61530 <_Thread_Dispatch_disable_level>,%d0
47bd2: 5280 addql #1,%d0
47bd4: 2f0a movel %a2,%sp@-
47bd6: 23c0 0006 1530 movel %d0,61530 <_Thread_Dispatch_disable_level>
47bdc: 2f02 movel %d2,%sp@-
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47bde: 2439 0006 1446 movel 61446 <_Rate_monotonic_Information+0x6>,%d2
47be4: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47bea: 6216 bhis 47c02 <rtems_rate_monotonic_reset_all_statistics+0x3a><== NEVER TAKEN
47bec: 45f9 0004 7c14 lea 47c14 <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
47bf2: 2f02 movel %d2,%sp@-
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47bf4: 5282 addql #1,%d2
(void) rtems_rate_monotonic_reset_statistics( id );
47bf6: 4e92 jsr %a2@
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47bf8: 588f addql #4,%sp
47bfa: b4b9 0006 144a cmpl 6144a <_Rate_monotonic_Information+0xa>,%d2
47c00: 63f0 blss 47bf2 <rtems_rate_monotonic_reset_all_statistics+0x2a>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
47c02: 242e fff8 movel %fp@(-8),%d2
47c06: 246e fffc moveal %fp@(-4),%a2
47c0a: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
47c0c: 4ef9 0004 a7fe jmp 4a7fe <_Thread_Enable_dispatch>
...
000576a4 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
576a4: 4e56 ffe4 linkw %fp,#-28
576a8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
576ac: 262e 0008 movel %fp@(8),%d3
576b0: 242e 000c movel %fp@(12),%d2
576b4: 2a2e 0010 movel %fp@(16),%d5
576b8: 282e 0014 movel %fp@(20),%d4
576bc: 2c2e 0018 movel %fp@(24),%d6
576c0: 266e 001c moveal %fp@(28),%a3
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
576c4: 4a83 tstl %d3
576c6: 6774 beqs 5773c <rtems_region_create+0x98>
return RTEMS_INVALID_NAME;
if ( !starting_address )
576c8: 4a82 tstl %d2
576ca: 6700 00dc beqw 577a8 <rtems_region_create+0x104>
return RTEMS_INVALID_ADDRESS;
if ( !id )
576ce: 4a8b tstl %a3
576d0: 6700 00d6 beqw 577a8 <rtems_region_create+0x104>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
576d4: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
576da: 4eb9 0005 9f2c jsr 59f2c <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
576e0: 4879 0007 e154 pea 7e154 <_Region_Information>
576e6: 4eb9 0005 b6bc jsr 5b6bc <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
576ec: 508f addql #8,%sp
576ee: 2440 moveal %d0,%a2
576f0: 4a80 tstl %d0
576f2: 6700 00c2 beqw 577b6 <rtems_region_create+0x112>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
576f6: 2f04 movel %d4,%sp@-
576f8: 2f05 movel %d5,%sp@-
576fa: 2f02 movel %d2,%sp@-
576fc: 486a 0068 pea %a2@(104)
57700: 4eb9 0005 b246 jsr 5b246 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57706: 4fef 0010 lea %sp@(16),%sp
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
5770a: 2540 005c movel %d0,%a2@(92)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
5770e: 663a bnes 5774a <rtems_region_create+0xa6>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
57710: 2f0a movel %a2,%sp@-
57712: 4879 0007 e154 pea 7e154 <_Region_Information>
_Region_Free( the_region );
return_status = RTEMS_INVALID_SIZE;
57718: 7408 moveq #8,%d2
5771a: 4eb9 0005 ba08 jsr 5ba08 <_Objects_Free>
57720: 508f addql #8,%sp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57722: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
57728: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
5772e: 588f addql #4,%sp
}
57730: 2002 movel %d2,%d0
57732: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
57738: 4e5e unlk %fp
5773a: 4e75 rts
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
5773c: 7403 moveq #3,%d2
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
5773e: 2002 movel %d2,%d0
57740: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
57746: 4e5e unlk %fp
57748: 4e75 rts
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
5774a: 2542 0050 movel %d2,%a2@(80)
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
5774e: 4282 clrl %d2
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57750: 2545 0054 movel %d5,%a2@(84)
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57754: 44c6 movew %d6,%ccr
57756: 57c0 seq %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57758: 2544 0058 movel %d4,%a2@(88)
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
5775c: 49c0 extbl %d0
5775e: 4480 negl %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
57760: 2546 0060 movel %d6,%a2@(96)
the_region->number_of_used_blocks = 0;
57764: 42aa 0064 clrl %a2@(100)
_Thread_queue_Initialize(
57768: 4878 0006 pea 6 <EXTENDSFDF>
5776c: 4878 0040 pea 40 <DBL_MANT_DIG+0xb>
57770: 2f00 movel %d0,%sp@-
57772: 486a 0010 pea %a2@(16)
57776: 4eb9 0005 cfd0 jsr 5cfd0 <_Thread_queue_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
5777c: 202a 0008 movel %a2@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
57780: 4281 clrl %d1
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57782: 4fef 0010 lea %sp@(16),%sp
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57786: 2079 0007 e16c moveal 7e16c <_Region_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
5778c: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
5778e: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
57792: 2543 000c movel %d3,%a2@(12)
57796: 2680 movel %d0,%a3@
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57798: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
5779e: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
577a4: 588f addql #4,%sp
577a6: 6088 bras 57730 <rtems_region_create+0x8c>
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
577a8: 7409 moveq #9,%d2
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
577aa: 2002 movel %d2,%d0
577ac: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
577b2: 4e5e unlk %fp
577b4: 4e75 rts
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
577b6: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
return_status = RTEMS_TOO_MANY;
577bc: 7405 moveq #5,%d2
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
577be: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
577c4: 588f addql #4,%sp
577c6: 6000 ff68 braw 57730 <rtems_region_create+0x8c>
...
0005787c <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
5787c: 4e56 fff8 linkw %fp,#-8
57880: 2f0a movel %a2,%sp@-
57882: 2f02 movel %d2,%sp@-
57884: 242e 000c movel %fp@(12),%d2
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
57888: 6700 0086 beqw 57910 <rtems_region_extend+0x94>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
5788c: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
57892: 4eb9 0005 9f2c jsr 59f2c <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
57898: 486e fff8 pea %fp@(-8)
5789c: 2f2e 0008 movel %fp@(8),%sp@-
578a0: 4879 0007 e154 pea 7e154 <_Region_Information>
578a6: 4eb9 0005 bb74 jsr 5bb74 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
578ac: 4fef 0010 lea %sp@(16),%sp
578b0: 2440 moveal %d0,%a2
578b2: 4aae fff8 tstl %fp@(-8)
578b6: 6646 bnes 578fe <rtems_region_extend+0x82>
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
578b8: 486e fffc pea %fp@(-4)
578bc: 2f2e 0010 movel %fp@(16),%sp@-
578c0: 2f02 movel %d2,%sp@-
578c2: 486a 0068 pea %a2@(104)
578c6: 4eb9 0005 ac44 jsr 5ac44 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
578cc: 4fef 0010 lea %sp@(16),%sp
578d0: 4a00 tstb %d0
578d2: 674c beqs 57920 <rtems_region_extend+0xa4>
the_region->length += amount_extended;
578d4: 202e fffc movel %fp@(-4),%d0
578d8: d1aa 0054 addl %d0,%a2@(84)
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
578dc: 4282 clrl %d2
&amount_extended
);
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
578de: d1aa 005c addl %d0,%a2@(92)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
578e2: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
578e8: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
578ee: 588f addql #4,%sp
}
578f0: 2002 movel %d2,%d0
578f2: 242e fff0 movel %fp@(-16),%d2
578f6: 246e fff4 moveal %fp@(-12),%a2
578fa: 4e5e unlk %fp
578fc: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
578fe: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
57904: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
57906: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
5790c: 588f addql #4,%sp
5790e: 60e0 bras 578f0 <rtems_region_extend+0x74>
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
57910: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57912: 2002 movel %d2,%d0
57914: 242e fff0 movel %fp@(-16),%d2
57918: 246e fff4 moveal %fp@(-12),%a2
5791c: 4e5e unlk %fp
5791e: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57920: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
57926: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57928: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
5792e: 588f addql #4,%sp
57930: 60be bras 578f0 <rtems_region_extend+0x74>
...
00057bb8 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
57bb8: 4e56 fffc linkw %fp,#-4
57bbc: 2f03 movel %d3,%sp@-
57bbe: 262e 0010 movel %fp@(16),%d3
57bc2: 2f02 movel %d2,%sp@-
57bc4: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
57bc8: 6700 0092 beqw 57c5c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !size )
57bcc: 4a83 tstl %d3
57bce: 6700 008c beqw 57c5c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
57bd2: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
57bd8: 4eb9 0005 9f2c jsr 59f2c <_API_Mutex_Lock>
57bde: 486e fffc pea %fp@(-4)
57be2: 2f2e 0008 movel %fp@(8),%sp@-
57be6: 4879 0007 e154 pea 7e154 <_Region_Information>
57bec: 4eb9 0005 bb74 jsr 5bb74 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
57bf2: 222e fffc movel %fp@(-4),%d1
57bf6: 4fef 0010 lea %sp@(16),%sp
57bfa: 6636 bnes 57c32 <rtems_region_get_segment_size+0x7a><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
57bfc: 2f03 movel %d3,%sp@-
57bfe: 2040 moveal %d0,%a0
57c00: 2f02 movel %d2,%sp@-
57c02: 4868 0068 pea %a0@(104)
57c06: 4eb9 0005 b594 jsr 5b594 <_Heap_Size_of_alloc_area>
57c0c: 4fef 000c lea %sp@(12),%sp
57c10: 4a00 tstb %d0
57c12: 6624 bnes 57c38 <rtems_region_get_segment_size+0x80><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c14: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
return_status = RTEMS_INVALID_ADDRESS;
57c1a: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c1c: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
57c22: 588f addql #4,%sp <== NOT EXECUTED
}
57c24: 2002 movel %d2,%d0
57c26: 242e fff4 movel %fp@(-12),%d2
57c2a: 262e fff8 movel %fp@(-8),%d3
57c2e: 4e5e unlk %fp
57c30: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
57c32: 7001 moveq #1,%d0
57c34: b081 cmpl %d1,%d0
57c36: 6712 beqs 57c4a <rtems_region_get_segment_size+0x92><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c38: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
57c3e: 4282 clrl %d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c40: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
57c46: 588f addql #4,%sp
57c48: 60da bras 57c24 <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c4a: 2f39 0007 e2e4 movel 7e2e4 <_RTEMS_Allocator_Mutex>,%sp@-
case OBJECTS_REMOTE: /* this error cannot be returned */
break;
#endif
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
57c50: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
57c52: 4eb9 0005 9f8c jsr 59f8c <_API_Mutex_Unlock>
return return_status;
57c58: 588f addql #4,%sp
57c5a: 60c8 bras 57c24 <rtems_region_get_segment_size+0x6c>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
57c5c: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57c5e: 2002 movel %d2,%d0
57c60: 242e fff4 movel %fp@(-12),%d2
57c64: 262e fff8 movel %fp@(-8),%d3
57c68: 4e5e unlk %fp <== NOT EXECUTED
00046690 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
46690: 4e56 fffc linkw %fp,#-4
46694: 2f0a movel %a2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
46696: 486e fffc pea %fp@(-4)
4669a: 2f2e 0008 movel %fp@(8),%sp@-
4669e: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
466a4: 4eb9 0004 8040 jsr 48040 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
466aa: 4fef 000c lea %sp@(12),%sp
466ae: 2440 moveal %d0,%a2
466b0: 4aae fffc tstl %fp@(-4)
466b4: 670a beqs 466c0 <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466b6: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
466ba: 7004 moveq #4,%d0
}
466bc: 4e5e unlk %fp
466be: 4e75 rts
466c0: 7030 moveq #48,%d0
466c2: c0aa 0010 andl %a2@(16),%d0
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
466c6: 6760 beqs 46728 <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
466c8: 4aaa 0062 tstl %a2@(98)
466cc: 6616 bnes 466e4 <rtems_semaphore_delete+0x54>
466ce: 7220 moveq #32,%d1
466d0: b280 cmpl %d0,%d1
466d2: 6710 beqs 466e4 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
466d4: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466da: 246e fff8 moveal %fp@(-8),%a2
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
466de: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466e0: 4e5e unlk %fp
466e2: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
466e4: 4878 0003 pea 3 <DIVIDE>
466e8: 42a7 clrl %sp@-
466ea: 486a 0014 pea %a2@(20)
466ee: 4eb9 0004 7220 jsr 47220 <_CORE_mutex_Flush>
466f4: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
466f8: 2f0a movel %a2,%sp@-
466fa: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46700: 4eb9 0004 7c18 jsr 47c18 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
46706: 2f0a movel %a2,%sp@-
46708: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
4670e: 4eb9 0004 7ed4 jsr 47ed4 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
46714: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4671a: 4fef 0010 lea %sp@(16),%sp
4671e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46720: 246e fff8 moveal %fp@(-8),%a2
46724: 4e5e unlk %fp
46726: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
46728: 4878 0002 pea 2 <DOUBLE_FLOAT>
4672c: 42a7 clrl %sp@-
4672e: 486a 0014 pea %a2@(20)
46732: 4eb9 0004 7558 jsr 47558 <_CORE_semaphore_Flush>
46738: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
4673c: 2f0a movel %a2,%sp@-
4673e: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46744: 4eb9 0004 7c18 jsr 47c18 <_Objects_Close>
4674a: 2f0a movel %a2,%sp@-
4674c: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46752: 4eb9 0004 7ed4 jsr 47ed4 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
46758: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4675e: 4fef 0010 lea %sp@(16),%sp
46762: 4280 clrl %d0
46764: 60ba bras 46720 <rtems_semaphore_delete+0x90>
...
0004fae8 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
4fae8: 4e56 fffc linkw %fp,#-4
4faec: 486e fffc pea %fp@(-4)
4faf0: 2f2e 0008 movel %fp@(8),%sp@-
4faf4: 4879 0006 3568 pea 63568 <_Semaphore_Information>
4fafa: 4eb9 0004 95f8 jsr 495f8 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
4fb00: 4fef 000c lea %sp@(12),%sp
4fb04: 4aae fffc tstl %fp@(-4)
4fb08: 6706 beqs 4fb10 <rtems_semaphore_flush+0x28>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4fb0a: 7004 moveq #4,%d0
}
4fb0c: 4e5e unlk %fp
4fb0e: 4e75 rts
4fb10: 7230 moveq #48,%d1
4fb12: 2040 moveal %d0,%a0
4fb14: c2a8 0010 andl %a0@(16),%d1
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
4fb18: 6720 beqs 4fb3a <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
4fb1a: 4878 0001 pea 1 <ADD>
4fb1e: 42a7 clrl %sp@-
4fb20: 4868 0014 pea %a0@(20)
4fb24: 4eb9 0004 87d8 jsr 487d8 <_CORE_mutex_Flush>
4fb2a: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
4fb2e: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4fb34: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4fb36: 4e5e unlk %fp
4fb38: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
4fb3a: 4878 0001 pea 1 <ADD>
4fb3e: 2040 moveal %d0,%a0
4fb40: 42a7 clrl %sp@-
4fb42: 4868 0014 pea %a0@(20)
4fb46: 4eb9 0004 8b10 jsr 48b10 <_CORE_semaphore_Flush>
4fb4c: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
4fb50: 4eb9 0004 a296 jsr 4a296 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4fb56: 4280 clrl %d0
4fb58: 60dc bras 4fb36 <rtems_semaphore_flush+0x4e>
...
00046768 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
46768: 4e56 ffec linkw %fp,#-20
4676c: 48d7 001c moveml %d2-%d4,%sp@
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
46770: 486e fff8 pea %fp@(-8)
46774: 486e fffc pea %fp@(-4)
46778: 242e 0008 movel %fp@(8),%d2
4677c: 2f02 movel %d2,%sp@-
4677e: 4879 0005 f390 pea 5f390 <_Semaphore_Information>
46784: 262e 000c movel %fp@(12),%d3
46788: 282e 0010 movel %fp@(16),%d4
4678c: 4eb9 0004 7fe0 jsr 47fe0 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
46792: 4fef 0010 lea %sp@(16),%sp
46796: 4aae fffc tstl %fp@(-4)
4679a: 670c beqs 467a8 <rtems_semaphore_obtain+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4679c: 7004 moveq #4,%d0
}
4679e: 4cee 001c ffec moveml %fp@(-20),%d2-%d4
467a4: 4e5e unlk %fp
467a6: 4e75 rts
467a8: 7230 moveq #48,%d1
467aa: 2040 moveal %d0,%a0
467ac: c2a8 0010 andl %a0@(16),%d1
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
467b0: 6738 beqs 467ea <rtems_semaphore_obtain+0x82>
_CORE_mutex_Seize(
467b2: 2f2e fff8 movel %fp@(-8),%sp@-
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
467b6: 7201 moveq #1,%d1
467b8: c681 andl %d1,%d3
467ba: 2f04 movel %d4,%sp@-
467bc: b781 eorl %d3,%d1
467be: 2f01 movel %d1,%sp@-
467c0: 2f02 movel %d2,%sp@-
467c2: 4868 0014 pea %a0@(20)
467c6: 4eb9 0004 73a8 jsr 473a8 <_CORE_mutex_Seize>
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
_Thread_Executing->Wait.return_code );
467cc: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
467d2: 2f28 0034 movel %a0@(52),%sp@-
467d6: 4eb9 0004 6938 jsr 46938 <_Semaphore_Translate_core_mutex_return_code>
467dc: 4fef 0018 lea %sp@(24),%sp
break;
}
return RTEMS_INVALID_ID;
}
467e0: 4cee 001c ffec moveml %fp@(-20),%d2-%d4
467e6: 4e5e unlk %fp
467e8: 4e75 rts
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
467ea: 2240 moveal %d0,%a1
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
467ec: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
467f2: 2229 005c movel %a1@(92),%d1
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
467f6: 42a8 0034 clrl %a0@(52)
if ( the_semaphore->count != 0 ) {
467fa: 4a81 tstl %d1
467fc: 662e bnes 4682c <rtems_semaphore_obtain+0xc4>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
467fe: 0803 0000 btst #0,%d3
46802: 6748 beqs 4684c <rtems_semaphore_obtain+0xe4>
_ISR_Enable( *level_p );
46804: 202e fff8 movel %fp@(-8),%d0
46808: 46c0 movew %d0,%sr
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
4680a: 7001 moveq #1,%d0
4680c: 2140 0034 movel %d0,%a0@(52)
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
46810: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
46816: 2f28 0034 movel %a0@(52),%sp@-
4681a: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code>
46820: 588f addql #4,%sp
break;
}
return RTEMS_INVALID_ID;
}
46822: 4cee 001c ffec moveml %fp@(-20),%d2-%d4
46828: 4e5e unlk %fp
4682a: 4e75 rts
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
4682c: 5381 subql #1,%d1
4682e: 2341 005c movel %d1,%a1@(92)
_ISR_Enable( *level_p );
46832: 202e fff8 movel %fp@(-8),%d0
46836: 46c0 movew %d0,%sr
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
46838: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
4683e: 2f28 0034 movel %a0@(52),%sp@-
46842: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code>
46848: 588f addql #4,%sp
4684a: 60d6 bras 46822 <rtems_semaphore_obtain+0xba>
4684c: 2239 0005 f448 movel 5f448 <_Thread_Dispatch_disable_level>,%d1
46852: 5281 addql #1,%d1
46854: 23c1 0005 f448 movel %d1,5f448 <_Thread_Dispatch_disable_level>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4685a: 7201 moveq #1,%d1
4685c: 2240 moveal %d0,%a1
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
4685e: 0680 0000 0014 addil #20,%d0
46864: 2341 0044 movel %d1,%a1@(68)
executing->Wait.id = id;
46868: 2142 0020 movel %d2,%a0@(32)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
4686c: 2140 0044 movel %d0,%a0@(68)
executing->Wait.id = id;
_ISR_Enable( *level_p );
46870: 222e fff8 movel %fp@(-8),%d1
46874: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
46876: 4879 0004 956c pea 4956c <_Thread_queue_Timeout>
4687c: 2f04 movel %d4,%sp@-
4687e: 2f00 movel %d0,%sp@-
46880: 4eb9 0004 91a8 jsr 491a8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
46886: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
_Thread_Executing->Wait.return_code );
4688c: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
46892: 4fef 000c lea %sp@(12),%sp
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
46896: 2f28 0034 movel %a0@(52),%sp@-
4689a: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code>
468a0: 588f addql #4,%sp
468a2: 6000 ff7e braw 46822 <rtems_semaphore_obtain+0xba>
...
00046e3c <rtems_shutdown_executive>:
void rtems_shutdown_executive(
uint32_t result
)
{
if ( _System_state_Is_up( _System_state_Get() ) ) {
46e3c: 7003 moveq #3,%d0
*/
void rtems_shutdown_executive(
uint32_t result
)
{
46e3e: 4e56 0000 linkw %fp,#0
if ( _System_state_Is_up( _System_state_Get() ) ) {
46e42: b0b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d0
46e48: 6710 beqs 46e5a <rtems_shutdown_executive+0x1e>
_System_state_Set( SYSTEM_STATE_SHUTDOWN );
_Thread_Stop_multitasking();
}
_Internal_error_Occurred(
46e4a: 4878 0014 pea 14 <OPER2>
46e4e: 4878 0001 pea 1 <ADD>
46e52: 42a7 clrl %sp@-
46e54: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred>
* if we were running within the same context, it would work.
*
* And we will not return to this thread, so there is no point of
* saving the context.
*/
_Context_Restart_self( &_Thread_BSP_context );
46e5a: 4879 0005 f414 pea 5f414 <_Thread_BSP_context>
46e60: 103c 0004 moveb #4,%d0
46e64: 23c0 0005 f590 movel %d0,5f590 <_System_state_Current>
46e6a: 4eb9 0004 9e82 jsr 49e82 <_CPU_Context_Restart_self>
46e70: 588f addql #4,%sp <== NOT EXECUTED
46e72: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
46e76: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
46e7a: 42a7 clrl %sp@- <== NOT EXECUTED
46e7c: 4eb9 0004 7ac4 jsr 47ac4 <_Internal_error_Occurred> <== NOT EXECUTED
...
00058338 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
58338: 4e56 fffc linkw %fp,#-4
5833c: 2f03 movel %d3,%sp@-
5833e: 2f02 movel %d2,%sp@-
58340: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58344: 660e bnes 58354 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58346: 242e fff4 movel %fp@(-12),%d2
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
5834a: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5834c: 262e fff8 movel %fp@(-8),%d3
58350: 4e5e unlk %fp
58352: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
58354: 486e fffc pea %fp@(-4)
58358: 2f2e 0008 movel %fp@(8),%sp@-
5835c: 4eb9 0005 c86c jsr 5c86c <_Thread_Get>
switch ( location ) {
58362: 508f addql #8,%sp
58364: 4aae fffc tstl %fp@(-4)
58368: 670e beqs 58378 <rtems_signal_send+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5836a: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5836e: 7004 moveq #4,%d0
}
58370: 262e fff8 movel %fp@(-8),%d3
58374: 4e5e unlk %fp
58376: 4e75 rts
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
58378: 2240 moveal %d0,%a1
5837a: 2069 00fc moveal %a1@(252),%a0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
5837e: 4aa8 000a tstl %a0@(10)
58382: 676a beqs 583ee <rtems_signal_send+0xb6>
if ( asr->is_enabled ) {
58384: 4a28 0008 tstb %a0@(8)
58388: 6736 beqs 583c0 <rtems_signal_send+0x88>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
5838a: 223c 0000 0700 movel #1792,%d1
58390: 40c3 movew %sr,%d3
58392: 8283 orl %d3,%d1
58394: 46c1 movew %d1,%sr
*signal_set |= signals;
58396: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
5839a: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5839c: 4ab9 0007 e3e4 tstl 7e3e4 <_Per_CPU_Information+0x8>
583a2: 6708 beqs 583ac <rtems_signal_send+0x74>
583a4: b0b9 0007 e3e8 cmpl 7e3e8 <_Per_CPU_Information+0xc>,%d0
583aa: 6730 beqs 583dc <rtems_signal_send+0xa4> <== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
583ac: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
583b2: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
583b4: 242e fff4 movel %fp@(-12),%d2
583b8: 262e fff8 movel %fp@(-8),%d3
583bc: 4e5e unlk %fp
583be: 4e75 rts
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
583c0: 203c 0000 0700 movel #1792,%d0
583c6: 40c1 movew %sr,%d1
583c8: 8081 orl %d1,%d0
583ca: 46c0 movew %d0,%sr
*signal_set |= signals;
583cc: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
583d0: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
583d2: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
583d8: 4280 clrl %d0
583da: 60d8 bras 583b4 <rtems_signal_send+0x7c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
583dc: 7001 moveq #1,%d0
583de: 13c0 0007 e3f4 moveb %d0,7e3f4 <_Per_CPU_Information+0x18>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
583e4: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
583ea: 4280 clrl %d0
583ec: 60c6 bras 583b4 <rtems_signal_send+0x7c>
}
_Thread_Enable_dispatch();
583ee: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
583f4: 242e fff4 movel %fp@(-12),%d2
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
583f8: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
583fa: 262e fff8 movel %fp@(-8),%d3
583fe: 4e5e unlk %fp
...
0004d628 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4d628: 4e56 ffe4 linkw %fp,#-28
4d62c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4d630: 2a2e 0008 movel %fp@(8),%d5
4d634: 242e 000c movel %fp@(12),%d2
4d638: 286e 0010 moveal %fp@(16),%a4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4d63c: 4a8c tstl %a4
4d63e: 6700 015a beqw 4d79a <rtems_task_mode+0x172>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4d642: 2479 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a2
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4d648: 4a2a 0074 tstb %a2@(116)
4d64c: 57c3 seq %d3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4d64e: 266a 00fc moveal %a2@(252),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4d652: 49c3 extbl %d3
4d654: 0283 0000 0100 andil #256,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4d65a: 4aaa 007a tstl %a2@(122)
4d65e: 6600 00cc bnew 4d72c <rtems_task_mode+0x104>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4d662: 4a2b 0008 tstb %a3@(8)
4d666: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4d668: 4eb9 0004 9f28 jsr 49f28 <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4d66e: 49c4 extbl %d4
4d670: 0284 0000 0400 andil #1024,%d4
4d676: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4d678: 8083 orl %d3,%d0
4d67a: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4d67c: 0802 0008 btst #8,%d2
4d680: 670c beqs 4d68e <rtems_task_mode+0x66>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4d682: 0805 0008 btst #8,%d5
4d686: 57c0 seq %d0
4d688: 4480 negl %d0
4d68a: 1540 0074 moveb %d0,%a2@(116)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4d68e: 0802 0009 btst #9,%d2
4d692: 6718 beqs 4d6ac <rtems_task_mode+0x84>
if ( _Modes_Is_timeslice(mode_set) ) {
4d694: 0805 0009 btst #9,%d5
4d698: 6700 00ee beqw 4d788 <rtems_task_mode+0x160>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4d69c: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4d69e: 41f9 0005 f400 lea 5f400 <_Thread_Ticks_per_timeslice>,%a0
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4d6a4: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4d6a8: 2550 0076 movel %a0@,%a2@(118)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4d6ac: 7007 moveq #7,%d0
4d6ae: c082 andl %d2,%d0
4d6b0: 6712 beqs 4d6c4 <rtems_task_mode+0x9c>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4d6b2: 40c0 movew %sr,%d0
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4d6b4: 7207 moveq #7,%d1
4d6b6: c285 andl %d5,%d1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4d6b8: 0280 0000 f8ff andil #63743,%d0
4d6be: e189 lsll #8,%d1
4d6c0: 8081 orl %d1,%d0
4d6c2: 46c0 movew %d0,%sr
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4d6c4: 0802 000a btst #10,%d2
4d6c8: 6754 beqs 4d71e <rtems_task_mode+0xf6>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4d6ca: 4282 clrl %d2
4d6cc: 142b 0008 moveb %a3@(8),%d2
4d6d0: 4280 clrl %d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4d6d2: 0805 000a btst #10,%d5
4d6d6: 57c1 seq %d1
4d6d8: 4481 negl %d1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4d6da: 1001 moveb %d1,%d0
4d6dc: b082 cmpl %d2,%d0
4d6de: 673e beqs 4d71e <rtems_task_mode+0xf6>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4d6e0: 203c 0000 0700 movel #1792,%d0
asr->is_enabled = is_asr_enabled;
4d6e6: 1741 0008 moveb %d1,%a3@(8)
4d6ea: 40c1 movew %sr,%d1
4d6ec: 8081 orl %d1,%d0
4d6ee: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4d6f0: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
4d6f4: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
4d6fa: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
4d6fe: 46c1 movew %d1,%sr
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4d700: 4aab 0012 tstl %a3@(18)
4d704: 56c0 sne %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d706: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4d708: 4480 negl %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d70a: b2b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d1
4d710: 6744 beqs 4d756 <rtems_task_mode+0x12e> <== ALWAYS TAKEN
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
4d712: 4280 clrl %d0
}
4d714: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4d71a: 4e5e unlk %fp
4d71c: 4e75 rts
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d71e: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4d720: 4200 clrb %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
4d722: b2b9 0005 f590 cmpl 5f590 <_System_state_Current>,%d1
4d728: 66e8 bnes 4d712 <rtems_task_mode+0xea>
4d72a: 602a bras 4d756 <rtems_task_mode+0x12e>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4d72c: 4a2b 0008 tstb %a3@(8)
4d730: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4d732: 4eb9 0004 9f28 jsr 49f28 <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4d738: 49c4 extbl %d4
4d73a: 0284 0000 0400 andil #1024,%d4
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4d740: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4d744: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4d746: 8083 orl %d3,%d0
4d748: 2880 movel %d0,%a4@
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4d74a: 0802 0008 btst #8,%d2
4d74e: 6700 ff3e beqw 4d68e <rtems_task_mode+0x66>
4d752: 6000 ff2e braw 4d682 <rtems_task_mode+0x5a>
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
4d756: 2079 0005 f5e4 moveal 5f5e4 <_Per_CPU_Information+0xc>,%a0
if ( are_signals_pending ||
4d75c: 4a00 tstb %d0
4d75e: 660e bnes 4d76e <rtems_task_mode+0x146>
4d760: b1f9 0005 f5e8 cmpal 5f5e8 <_Per_CPU_Information+0x10>,%a0
4d766: 67aa beqs 4d712 <rtems_task_mode+0xea>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
4d768: 4a28 0074 tstb %a0@(116)
4d76c: 67a4 beqs 4d712 <rtems_task_mode+0xea> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
4d76e: 7001 moveq #1,%d0
4d770: 13c0 0005 f5f0 moveb %d0,5f5f0 <_Per_CPU_Information+0x18>
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
4d776: 4eb9 0004 8b6c jsr 48b6c <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
}
4d77c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
4d782: 4280 clrl %d0
}
4d784: 4e5e unlk %fp
4d786: 4e75 rts
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4d788: 7007 moveq #7,%d0
4d78a: c082 andl %d2,%d0
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4d78c: 42aa 007a clrl %a2@(122)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4d790: 4a80 tstl %d0
4d792: 6700 ff30 beqw 4d6c4 <rtems_task_mode+0x9c>
4d796: 6000 ff1a braw 4d6b2 <rtems_task_mode+0x8a>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
4d79a: 7009 moveq #9,%d0
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
4d79c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4d7a2: 4e5e unlk %fp
...
0004b00c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4b00c: 4e56 fffc linkw %fp,#-4
4b010: 2f0a movel %a2,%sp@-
4b012: 246e 0010 moveal %fp@(16),%a2
4b016: 2f02 movel %d2,%sp@-
4b018: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4b01c: 670c beqs 4b02a <rtems_task_set_priority+0x1e>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
4b01e: 4280 clrl %d0
4b020: 1039 0006 1f72 moveb 61f72 <rtems_maximum_priority>,%d0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4b026: b082 cmpl %d2,%d0
4b028: 6566 bcss 4b090 <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4b02a: 4a8a tstl %a2
4b02c: 6770 beqs 4b09e <rtems_task_set_priority+0x92>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4b02e: 486e fffc pea %fp@(-4)
4b032: 2f2e 0008 movel %fp@(8),%sp@-
4b036: 4eb9 0004 d33c jsr 4d33c <_Thread_Get>
switch ( location ) {
4b03c: 508f addql #8,%sp
4b03e: 4aae fffc tstl %fp@(-4)
4b042: 663e bnes 4b082 <rtems_task_set_priority+0x76>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4b044: 2040 moveal %d0,%a0
4b046: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4b04a: 4a82 tstl %d2
4b04c: 6720 beqs 4b06e <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4b04e: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4b052: 4aa8 001c tstl %a0@(28)
4b056: 6706 beqs 4b05e <rtems_task_set_priority+0x52>
4b058: b4a8 0014 cmpl %a0@(20),%d2
4b05c: 6410 bccs 4b06e <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
4b05e: 42a7 clrl %sp@-
4b060: 2f02 movel %d2,%sp@-
4b062: 2f00 movel %d0,%sp@-
4b064: 4eb9 0004 ce64 jsr 4ce64 <_Thread_Change_priority>
4b06a: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4b06e: 4eb9 0004 d316 jsr 4d316 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b074: 242e fff4 movel %fp@(-12),%d2
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
4b078: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b07a: 246e fff8 moveal %fp@(-8),%a2
4b07e: 4e5e unlk %fp
4b080: 4e75 rts
4b082: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4b086: 7004 moveq #4,%d0
}
4b088: 246e fff8 moveal %fp@(-8),%a2
4b08c: 4e5e unlk %fp
4b08e: 4e75 rts
4b090: 242e fff4 movel %fp@(-12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
4b094: 7013 moveq #19,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b096: 246e fff8 moveal %fp@(-8),%a2
4b09a: 4e5e unlk %fp
4b09c: 4e75 rts
4b09e: 242e fff4 movel %fp@(-12),%d2
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
4b0a2: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4b0a4: 246e fff8 moveal %fp@(-8),%a2
4b0a8: 4e5e unlk %fp <== NOT EXECUTED
00047b78 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
47b78: 4e56 fffc linkw %fp,#-4
47b7c: 2f02 movel %d2,%sp@-
47b7e: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47b82: 6772 beqs 47bf6 <rtems_task_variable_delete+0x7e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47b84: 486e fffc pea %fp@(-4)
47b88: 2f2e 0008 movel %fp@(8),%sp@-
47b8c: 4eb9 0004 9c98 jsr 49c98 <_Thread_Get>
switch (location) {
47b92: 508f addql #8,%sp
47b94: 4aae fffc tstl %fp@(-4)
47b98: 6634 bnes 47bce <rtems_task_variable_delete+0x56>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
47b9a: 2040 moveal %d0,%a0
47b9c: 2268 0108 moveal %a0@(264),%a1
while (tvp) {
47ba0: 4a89 tstl %a1
47ba2: 671a beqs 47bbe <rtems_task_variable_delete+0x46>
if (tvp->ptr == ptr) {
47ba4: b4a9 0004 cmpl %a1@(4),%d2
47ba8: 6756 beqs 47c00 <rtems_task_variable_delete+0x88>
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
47baa: 2051 moveal %a1@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
47bac: 4a88 tstl %a0
47bae: 670e beqs 47bbe <rtems_task_variable_delete+0x46><== NEVER TAKEN
if (tvp->ptr == ptr) {
47bb0: b4a8 0004 cmpl %a0@(4),%d2
47bb4: 6722 beqs 47bd8 <rtems_task_variable_delete+0x60>
47bb6: 2248 moveal %a0,%a1
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
47bb8: 2051 moveal %a1@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
47bba: 4a88 tstl %a0
47bbc: 66f2 bnes 47bb0 <rtems_task_variable_delete+0x38><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47bbe: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bc4: 242e fff8 movel %fp@(-8),%d2
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47bc8: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bca: 4e5e unlk %fp
47bcc: 4e75 rts
47bce: 242e fff8 movel %fp@(-8),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
47bd2: 7004 moveq #4,%d0
}
47bd4: 4e5e unlk %fp
47bd6: 4e75 rts
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
47bd8: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47bda: 2f08 movel %a0,%sp@-
47bdc: 2f00 movel %d0,%sp@-
47bde: 4eb9 0004 7cac jsr 47cac <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47be4: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47bea: 508f addql #8,%sp
47bec: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bee: 242e fff8 movel %fp@(-8),%d2
47bf2: 4e5e unlk %fp
47bf4: 4e75 rts
47bf6: 242e fff8 movel %fp@(-8),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
47bfa: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47bfc: 4e5e unlk %fp
47bfe: 4e75 rts
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
47c00: 2040 moveal %d0,%a0
47c02: 2151 0108 movel %a1@,%a0@(264)
47c06: 2049 moveal %a1,%a0
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47c08: 2f08 movel %a0,%sp@-
47c0a: 2f00 movel %d0,%sp@-
47c0c: 4eb9 0004 7cac jsr 47cac <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47c12: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47c18: 508f addql #8,%sp
47c1a: 4280 clrl %d0
47c1c: 60d0 bras 47bee <rtems_task_variable_delete+0x76>
...
00047c20 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
47c20: 4e56 fffc linkw %fp,#-4
47c24: 2f0a movel %a2,%sp@-
47c26: 246e 0010 moveal %fp@(16),%a2
47c2a: 2f02 movel %d2,%sp@-
47c2c: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
47c30: 6752 beqs 47c84 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
47c32: 4a8a tstl %a2
47c34: 674e beqs 47c84 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
47c36: 486e fffc pea %fp@(-4)
47c3a: 2f2e 0008 movel %fp@(8),%sp@-
47c3e: 4eb9 0004 9c98 jsr 49c98 <_Thread_Get>
switch (location) {
47c44: 508f addql #8,%sp
47c46: 4aae fffc tstl %fp@(-4)
47c4a: 662a bnes 47c76 <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
47c4c: 2240 moveal %d0,%a1
47c4e: 2069 0108 moveal %a1@(264),%a0
while (tvp) {
47c52: 4a88 tstl %a0
47c54: 670c beqs 47c62 <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
47c56: b4a8 0004 cmpl %a0@(4),%d2
47c5a: 6736 beqs 47c92 <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
47c5c: 2050 moveal %a0@,%a0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
47c5e: 4a88 tstl %a0
47c60: 66f4 bnes 47c56 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47c62: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c68: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47c6c: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c6e: 246e fff8 moveal %fp@(-8),%a2
47c72: 4e5e unlk %fp
47c74: 4e75 rts
47c76: 242e fff4 movel %fp@(-12),%d2
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
47c7a: 7004 moveq #4,%d0
}
47c7c: 246e fff8 moveal %fp@(-8),%a2
47c80: 4e5e unlk %fp
47c82: 4e75 rts
47c84: 242e fff4 movel %fp@(-12),%d2
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
47c88: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c8a: 246e fff8 moveal %fp@(-8),%a2
47c8e: 4e5e unlk %fp
47c90: 4e75 rts
if (tvp->ptr == ptr) {
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
47c92: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
47c96: 4eb9 0004 9c72 jsr 49c72 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47c9c: 242e fff4 movel %fp@(-12),%d2
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
47ca0: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47ca2: 246e fff8 moveal %fp@(-8),%a2
47ca6: 4e5e unlk %fp
...
00058d2c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
58d2c: 4e56 fffc linkw %fp,#-4
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
58d30: 486e fffc pea %fp@(-4)
58d34: 2f2e 0008 movel %fp@(8),%sp@-
58d38: 4879 0007 e458 pea 7e458 <_Timer_Information>
58d3e: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58d44: 4fef 000c lea %sp@(12),%sp
58d48: 4aae fffc tstl %fp@(-4)
58d4c: 6706 beqs 58d54 <rtems_timer_cancel+0x28>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
58d4e: 7004 moveq #4,%d0
}
58d50: 4e5e unlk %fp
58d52: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
58d54: 7204 moveq #4,%d1
58d56: 2040 moveal %d0,%a0
58d58: b2a8 0038 cmpl %a0@(56),%d1
58d5c: 670c beqs 58d6a <rtems_timer_cancel+0x3e> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
58d5e: 4868 0010 pea %a0@(16)
58d62: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
58d68: 588f addql #4,%sp
_Thread_Enable_dispatch();
58d6a: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
58d70: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58d72: 4e5e unlk %fp
...
00058f60 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
58f60: 4e56 ffec linkw %fp,#-20
58f64: 48d7 041c moveml %d2-%d4/%a2,%sp@
58f68: 242e 000c movel %fp@(12),%d2
58f6c: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
58f70: 4a39 0007 e254 tstb 7e254 <_TOD_Is_set>
58f76: 660c bnes 58f84 <rtems_timer_fire_when+0x24>
return RTEMS_NOT_DEFINED;
58f78: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58f7a: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
58f80: 4e5e unlk %fp
58f82: 4e75 rts
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
58f84: 2f02 movel %d2,%sp@-
58f86: 4eb9 0005 5fac jsr 55fac <_TOD_Validate>
58f8c: 588f addql #4,%sp
58f8e: 4a00 tstb %d0
58f90: 671a beqs 58fac <rtems_timer_fire_when+0x4c>
return RTEMS_INVALID_CLOCK;
if ( !routine )
58f92: 4a83 tstl %d3
58f94: 6700 00a8 beqw 5903e <rtems_timer_fire_when+0xde>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
58f98: 2f02 movel %d2,%sp@-
58f9a: 4eb9 0005 5ea4 jsr 55ea4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
58fa0: 588f addql #4,%sp
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
58fa2: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
58fa4: b0b9 0007 e2ce cmpl 7e2ce <_TOD_Now>,%d0
58faa: 620c bhis 58fb8 <rtems_timer_fire_when+0x58>
return RTEMS_INVALID_CLOCK;
58fac: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58fae: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
58fb4: 4e5e unlk %fp
58fb6: 4e75 rts
58fb8: 486e fffc pea %fp@(-4)
58fbc: 2f2e 0008 movel %fp@(8),%sp@-
58fc0: 4879 0007 e458 pea 7e458 <_Timer_Information>
58fc6: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58fcc: 4fef 000c lea %sp@(12),%sp
58fd0: 2440 moveal %d0,%a2
58fd2: 4aae fffc tstl %fp@(-4)
58fd6: 665a bnes 59032 <rtems_timer_fire_when+0xd2> <== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
58fd8: 2800 movel %d0,%d4
58fda: 0684 0000 0010 addil #16,%d4
58fe0: 2f04 movel %d4,%sp@-
58fe2: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
58fe8: 256e 0014 0034 movel %fp@(20),%a2@(52)
the_timer->the_class = TIMER_TIME_OF_DAY;
58fee: 7002 moveq #2,%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
58ff0: 94b9 0007 e2ce subl 7e2ce <_TOD_Now>,%d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY;
58ff6: 2540 0038 movel %d0,%a2@(56)
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
58ffa: 202e 0008 movel %fp@(8),%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
58ffe: 2542 001c movel %d2,%a2@(28)
59002: 2540 0030 movel %d0,%a2@(48)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59006: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine;
5900a: 2543 002c movel %d3,%a2@(44)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
5900e: 2f04 movel %d4,%sp@-
59010: 4879 0007 e2f8 pea 7e2f8 <_Watchdog_Seconds_chain>
59016: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
5901c: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59022: 4fef 000c lea %sp@(12),%sp
59026: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59028: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
5902e: 4e5e unlk %fp
59030: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
59032: 7004 moveq #4,%d0
}
59034: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
5903a: 4e5e unlk %fp
5903c: 4e75 rts
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
5903e: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59040: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
59046: 4e5e unlk %fp
...
000597e2 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
597e2: 4e56 fffc linkw %fp,#-4
597e6: 202e 0008 movel %fp@(8),%d0
597ea: 2f03 movel %d3,%sp@-
597ec: 2f02 movel %d2,%sp@-
597ee: 4a80 tstl %d0
597f0: 6748 beqs 5983a <rtems_timer_initiate_server+0x58><== NEVER TAKEN
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
597f2: 4281 clrl %d1
597f4: 1239 0007 8632 moveb 78632 <rtems_maximum_priority>,%d1
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
597fa: b280 cmpl %d0,%d1
597fc: 644a bccs 59848 <rtems_timer_initiate_server+0x66>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
597fe: 72ff moveq #-1,%d1
59800: b280 cmpl %d0,%d1
59802: 6636 bnes 5983a <rtems_timer_initiate_server+0x58>
59804: 2239 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d1
5980a: 5281 addql #1,%d1
return RTEMS_INVALID_PRIORITY;
_priority = 0;
5980c: 4283 clrl %d3
5980e: 23c1 0007 e244 movel %d1,7e244 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59814: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59816: 1439 0007 972e moveb 7972e <initialized.3657>,%d2
initialized = true;
5981c: 13c0 0007 972e moveb %d0,7972e <initialized.3657>
_Thread_Enable_dispatch();
59822: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59828: 4a02 tstb %d2
5982a: 6744 beqs 59870 <rtems_timer_initiate_server+0x8e>
initialized = false;
}
#endif
return status;
}
5982c: 242e fff4 movel %fp@(-12),%d2
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
return RTEMS_INCORRECT_STATE;
59830: 700e moveq #14,%d0
initialized = false;
}
#endif
return status;
}
59832: 262e fff8 movel %fp@(-8),%d3
59836: 4e5e unlk %fp
59838: 4e75 rts
5983a: 242e fff4 movel %fp@(-12),%d2
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
5983e: 7013 moveq #19,%d0
initialized = false;
}
#endif
return status;
}
59840: 262e fff8 movel %fp@(-8),%d3
59844: 4e5e unlk %fp
59846: 4e75 rts
59848: 2239 0007 e244 movel 7e244 <_Thread_Dispatch_disable_level>,%d1
5984e: 5281 addql #1,%d1
59850: 2600 movel %d0,%d3
59852: 23c1 0007 e244 movel %d1,7e244 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59858: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
5985a: 1439 0007 972e moveb 7972e <initialized.3657>,%d2
initialized = true;
59860: 13c0 0007 972e moveb %d0,7972e <initialized.3657>
_Thread_Enable_dispatch();
59866: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
if ( tmpInitialized )
5986c: 4a02 tstb %d2
5986e: 66bc bnes 5982c <rtems_timer_initiate_server+0x4a><== NEVER TAKEN
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
59870: 222e 0010 movel %fp@(16),%d1
59874: 486e fffc pea %fp@(-4)
59878: 08c1 000f bset #15,%d1
5987c: 2f01 movel %d1,%sp@-
5987e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
59882: 2f2e 000c movel %fp@(12),%sp@-
59886: 2f03 movel %d3,%sp@-
59888: 2f3c 5449 4d45 movel #1414090053,%sp@-
5988e: 4eb9 0005 8404 jsr 58404 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
59894: 4fef 0018 lea %sp@(24),%sp
59898: 4a80 tstl %d0
5989a: 6714 beqs 598b0 <rtems_timer_initiate_server+0xce>
initialized = false;
}
#endif
return status;
}
5989c: 242e fff4 movel %fp@(-12),%d2
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
598a0: 4201 clrb %d1
initialized = false;
}
#endif
return status;
}
598a2: 262e fff8 movel %fp@(-8),%d3
598a6: 4e5e unlk %fp
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
598a8: 13c1 0007 972e moveb %d1,7972e <initialized.3657>
initialized = false;
}
#endif
return status;
}
598ae: 4e75 rts
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
598b0: 202e fffc movel %fp@(-4),%d0
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
598b4: 4282 clrl %d2
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
598b6: 2079 0007 e1dc moveal 7e1dc <_RTEMS_tasks_Information+0x18>,%a0
598bc: 3400 movew %d0,%d2
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
598be: 2239 0007 e34c movel 7e34c <_Watchdog_Ticks_since_boot>,%d1
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
598c4: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0
598c8: 23d0 0007 96b0 movel %a0@,796b0 <_Timer_server_Default>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
598ce: 41f9 0007 96e4 lea 796e4 <_Timer_server_Default+0x34>,%a0
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
598d4: 4879 0007 96b0 pea 796b0 <_Timer_server_Default>
598da: 487a fb6c pea %pc@(59448 <_Timer_server_Body>)
598de: 23c8 0007 96e0 movel %a0,796e0 <_Timer_server_Default+0x30>
head->previous = NULL;
tail->previous = head;
598e4: 41f9 0007 96e0 lea 796e0 <_Timer_server_Default+0x30>,%a0
598ea: 23c8 0007 96e8 movel %a0,796e8 <_Timer_server_Default+0x38>
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
598f0: 41f9 0007 971c lea 7971c <_Timer_server_Default+0x6c>,%a0
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
598f6: 23c1 0007 96ec movel %d1,796ec <_Timer_server_Default+0x3c>
head->previous = NULL;
tail->previous = head;
598fc: 223c 0007 9718 movel #497432,%d1
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
59902: 23c8 0007 9718 movel %a0,79718 <_Timer_server_Default+0x68>
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59908: 41f9 0007 e2ce lea 7e2ce <_TOD_Now>,%a0
head->previous = NULL;
tail->previous = head;
5990e: 23c1 0007 9720 movel %d1,79720 <_Timer_server_Default+0x70>
59914: 23d0 0007 9724 movel %a0@,79724 <_Timer_server_Default+0x74>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
5991a: 223c 0005 c6a0 movel #378528,%d1
59920: 41f9 0005 c6a0 lea 5c6a0 <_Thread_Delay_ended>,%a0
59926: 23c1 0007 96d4 movel %d1,796d4 <_Timer_server_Default+0x24>
ts->insert_chain = NULL;
ts->active = false;
5992c: 4201 clrb %d1
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
5992e: 42b9 0007 9728 clrl 79728 <_Timer_server_Default+0x78>
ts->active = false;
59934: 13c1 0007 972c moveb %d1,7972c <_Timer_server_Default+0x7c>
5993a: 23c8 0007 970c movel %a0,7970c <_Timer_server_Default+0x5c>
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59940: 41f9 0007 96b0 lea 796b0 <_Timer_server_Default>,%a0
/*
* Start the timer server
*/
status = rtems_task_start(
59946: 2f00 movel %d0,%sp@-
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
59948: 223c 0005 9686 movel #366214,%d1
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
5994e: 42b9 0007 96e4 clrl 796e4 <_Timer_server_Default+0x34>
59954: 42b9 0007 971c clrl 7971c <_Timer_server_Default+0x6c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5995a: 42b9 0007 96c0 clrl 796c0 <_Timer_server_Default+0x10>
59960: 23c1 0007 96b4 movel %d1,796b4 <_Timer_server_Default+0x4>
the_watchdog->routine = routine;
the_watchdog->id = id;
59966: 23c0 0007 96d8 movel %d0,796d8 <_Timer_server_Default+0x28>
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
5996c: 23c8 0007 e490 movel %a0,7e490 <_Timer_server>
the_watchdog->user_data = user_data;
59972: 42b9 0007 96dc clrl 796dc <_Timer_server_Default+0x2c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59978: 42b9 0007 96f8 clrl 796f8 <_Timer_server_Default+0x48>
the_watchdog->routine = routine;
the_watchdog->id = id;
5997e: 23c0 0007 9710 movel %d0,79710 <_Timer_server_Default+0x60>
the_watchdog->user_data = user_data;
59984: 42b9 0007 9714 clrl 79714 <_Timer_server_Default+0x64>
/*
* Start the timer server
*/
status = rtems_task_start(
5998a: 4eb9 0005 8b10 jsr 58b10 <rtems_task_start>
initialized = false;
}
#endif
return status;
}
59990: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59994: 4fef 000c lea %sp@(12),%sp
}
59998: 262e fff8 movel %fp@(-8),%d3
5999c: 4e5e unlk %fp <== NOT EXECUTED
000590e4 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
590e4: 4e56 fff0 linkw %fp,#-16
590e8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
590ec: 486e fffc pea %fp@(-4)
590f0: 2f2e 0008 movel %fp@(8),%sp@-
590f4: 4879 0007 e458 pea 7e458 <_Timer_Information>
590fa: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59100: 4fef 000c lea %sp@(12),%sp
59104: 2440 moveal %d0,%a2
59106: 4aae fffc tstl %fp@(-4)
5910a: 670e beqs 5911a <rtems_timer_reset+0x36>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5910c: 7404 moveq #4,%d2
}
5910e: 2002 movel %d2,%d0
59110: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
59116: 4e5e unlk %fp
59118: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
5911a: 202a 0038 movel %a2@(56),%d0
5911e: 671a beqs 5913a <rtems_timer_reset+0x56>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59120: 7201 moveq #1,%d1
59122: b280 cmpl %d0,%d1
59124: 673c beqs 59162 <rtems_timer_reset+0x7e>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
59126: 740b moveq #11,%d2
}
_Thread_Enable_dispatch();
59128: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5912e: 2002 movel %d2,%d0
59130: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
59136: 4e5e unlk %fp
59138: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
5913a: 45ea 0010 lea %a2@(16),%a2
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
5913e: 4282 clrl %d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
59140: 2f0a movel %a2,%sp@-
59142: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
59148: 2f0a movel %a2,%sp@-
5914a: 4879 0007 e304 pea 7e304 <_Watchdog_Ticks_chain>
59150: 4eb9 0005 d8f4 jsr 5d8f4 <_Watchdog_Insert>
59156: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
5915a: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
59160: 60cc bras 5912e <rtems_timer_reset+0x4a>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59162: 486a 0010 pea %a2@(16)
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
59166: 4282 clrl %d2
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
59168: 2679 0007 e490 moveal 7e490 <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
5916e: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
59174: 2f0a movel %a2,%sp@-
59176: 2f0b movel %a3,%sp@-
59178: 206b 0004 moveal %a3@(4),%a0
5917c: 4e90 jsr %a0@
5917e: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
59182: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
59188: 60a4 bras 5912e <rtems_timer_reset+0x4a>
...
0005918c <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
5918c: 4e56 ffe8 linkw %fp,#-24
59190: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
59194: 282e 0008 movel %fp@(8),%d4
59198: 262e 000c movel %fp@(12),%d3
5919c: 242e 0010 movel %fp@(16),%d2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
591a0: 2479 0007 e490 moveal 7e490 <_Timer_server>,%a2
if ( !timer_server )
591a6: 4a8a tstl %a2
591a8: 6700 009c beqw 59246 <rtems_timer_server_fire_after+0xba>
return RTEMS_INCORRECT_STATE;
if ( !routine )
591ac: 4a82 tstl %d2
591ae: 6700 00a2 beqw 59252 <rtems_timer_server_fire_after+0xc6>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
591b2: 4a83 tstl %d3
591b4: 660c bnes 591c2 <rtems_timer_server_fire_after+0x36>
return RTEMS_INVALID_NUMBER;
591b6: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
591b8: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
591be: 4e5e unlk %fp
591c0: 4e75 rts
591c2: 486e fffc pea %fp@(-4)
591c6: 2f04 movel %d4,%sp@-
591c8: 4879 0007 e458 pea 7e458 <_Timer_Information>
591ce: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
591d4: 4fef 000c lea %sp@(12),%sp
591d8: 2640 moveal %d0,%a3
591da: 4aae fffc tstl %fp@(-4)
591de: 665a bnes 5923a <rtems_timer_server_fire_after+0xae>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
591e0: 486b 0010 pea %a3@(16)
591e4: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
_ISR_Disable( level );
591ea: 203c 0000 0700 movel #1792,%d0
591f0: 40c1 movew %sr,%d1
591f2: 8081 orl %d1,%d0
591f4: 46c0 movew %d0,%sr
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
591f6: 588f addql #4,%sp
591f8: 4aab 0018 tstl %a3@(24)
591fc: 6660 bnes 5925e <rtems_timer_server_fire_after+0xd2><== NEVER TAKEN
/*
* OK. Now we now the timer was not rescheduled by an interrupt
* so we can atomically initialize it as in use.
*/
the_timer->the_class = TIMER_INTERVAL_ON_TASK;
591fe: 7001 moveq #1,%d0
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
59200: 276e 0014 0034 movel %fp@(20),%a3@(52)
59206: 2740 0038 movel %d0,%a3@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5920a: 42ab 0018 clrl %a3@(24)
the_watchdog->routine = routine;
5920e: 2742 002c movel %d2,%a3@(44)
the_watchdog->id = id;
59212: 2744 0030 movel %d4,%a3@(48)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
59216: 2743 001c movel %d3,%a3@(28)
_ISR_Enable( level );
5921a: 46c1 movew %d1,%sr
(*timer_server->schedule_operation)( timer_server, the_timer );
5921c: 2f0b movel %a3,%sp@-
5921e: 2f0a movel %a2,%sp@-
59220: 206a 0004 moveal %a2@(4),%a0
59224: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59226: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5922c: 508f addql #8,%sp
5922e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59230: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
59236: 4e5e unlk %fp
59238: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5923a: 7004 moveq #4,%d0
}
5923c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
59242: 4e5e unlk %fp
59244: 4e75 rts
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
59246: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59248: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
5924e: 4e5e unlk %fp
59250: 4e75 rts
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
59252: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59254: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
5925a: 4e5e unlk %fp
5925c: 4e75 rts
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
5925e: 46c1 movew %d1,%sr
_Thread_Enable_dispatch();
59260: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59266: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59268: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
5926e: 4e5e unlk %fp
...
00059274 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59274: 4e56 ffec linkw %fp,#-20
59278: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
5927c: 242e 000c movel %fp@(12),%d2
59280: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
59284: 2479 0007 e490 moveal 7e490 <_Timer_server>,%a2
if ( !timer_server )
5928a: 4a8a tstl %a2
5928c: 6700 00c8 beqw 59356 <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59290: 4a39 0007 e254 tstb 7e254 <_TOD_Is_set>
59296: 6700 00a6 beqw 5933e <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED;
if ( !routine )
5929a: 4a83 tstl %d3
5929c: 6700 00ac beqw 5934a <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
592a0: 2f02 movel %d2,%sp@-
592a2: 4eb9 0005 5fac jsr 55fac <_TOD_Validate>
592a8: 588f addql #4,%sp
592aa: 4a00 tstb %d0
592ac: 660c bnes 592ba <rtems_timer_server_fire_when+0x46>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
592ae: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
592b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
592b6: 4e5e unlk %fp
592b8: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
592ba: 2f02 movel %d2,%sp@-
592bc: 4eb9 0005 5ea4 jsr 55ea4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
592c2: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
592c4: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
592c6: b0b9 0007 e2ce cmpl 7e2ce <_TOD_Now>,%d0
592cc: 63e0 blss 592ae <rtems_timer_server_fire_when+0x3a>
592ce: 486e fffc pea %fp@(-4)
592d2: 2f2e 0008 movel %fp@(8),%sp@-
592d6: 4879 0007 e458 pea 7e458 <_Timer_Information>
592dc: 4eb9 0005 bbb0 jsr 5bbb0 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
592e2: 4fef 000c lea %sp@(12),%sp
592e6: 2640 moveal %d0,%a3
592e8: 4aae fffc tstl %fp@(-4)
592ec: 6674 bnes 59362 <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
592ee: 486b 0010 pea %a3@(16)
592f2: 4eb9 0005 da48 jsr 5da48 <_Watchdog_Remove>
the_watchdog->user_data = user_data;
592f8: 276e 0014 0034 movel %fp@(20),%a3@(52)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
592fe: 7003 moveq #3,%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59300: 94b9 0007 e2ce subl 7e2ce <_TOD_Now>,%d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
59306: 2740 0038 movel %d0,%a3@(56)
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
5930a: 202e 0008 movel %fp@(8),%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
5930e: 2742 001c movel %d2,%a3@(28)
59312: 2740 0030 movel %d0,%a3@(48)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59316: 42ab 0018 clrl %a3@(24)
the_watchdog->routine = routine;
5931a: 2743 002c movel %d3,%a3@(44)
(*timer_server->schedule_operation)( timer_server, the_timer );
5931e: 2f0b movel %a3,%sp@-
59320: 2f0a movel %a2,%sp@-
59322: 206a 0004 moveal %a2@(4),%a0
59326: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59328: 4eb9 0005 c846 jsr 5c846 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5932e: 4fef 000c lea %sp@(12),%sp
59332: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59334: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
5933a: 4e5e unlk %fp
5933c: 4e75 rts
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
5933e: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59340: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED
59346: 4e5e unlk %fp <== NOT EXECUTED
59348: 4e75 rts <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
5934a: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5934c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
59352: 4e5e unlk %fp
59354: 4e75 rts
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
59356: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59358: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
5935e: 4e5e unlk %fp
59360: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
59362: 7004 moveq #4,%d0
}
59364: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
5936a: 4e5e unlk %fp
...