000470e0 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
470e0: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
470e4: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 470ea: 5280 addql #1,%d0 470ec: 206e 0008 moveal %fp@(8),%a0 470f0: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
470f6: 42a7 clrl %sp@- 470f8: 2f28 0008 movel %a0@(8),%sp@- 470fc: 4868 0010 pea %a0@(16) 47100: 4eb9 0004 73e8 jsr 473e8 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47106: 4fef 000c lea %sp@(12),%sp
}
4710a: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
4710c: 4ef9 0004 888c jmp 4888c <_Thread_Enable_dispatch>
...
00046fa0 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
46fa0: 4e56 0000 linkw %fp,#0 46fa4: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
46fa6: 2479 0005 ff96 moveal 5ff96 <_API_extensions_List>,%a2 46fac: b5fc 0005 ff9a cmpal #393114,%a2
46fb2: 6710 beqs 46fc4 <_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)();
46fb4: 206a 0008 moveal %a2@(8),%a0 46fb8: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
46fba: 2452 moveal %a2@,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
46fbc: b5fc 0005 ff9a cmpal #393114,%a2
46fc2: 66f0 bnes 46fb4 <_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)();
}
}
46fc4: 246e fffc moveal %fp@(-4),%a2
46fc8: 4e5e unlk %fp <== NOT EXECUTED
00046fcc <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
46fcc: 4e56 0000 linkw %fp,#0 46fd0: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
46fd2: 2479 0005 ff96 moveal 5ff96 <_API_extensions_List>,%a2 46fd8: b5fc 0005 ff9a cmpal #393114,%a2
46fde: 6718 beqs 46ff8 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
46fe0: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 46fe6: 206a 000c moveal %a2@(12),%a0 46fea: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
46fec: 2452 moveal %a2@,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
46fee: 588f addql #4,%sp 46ff0: b5fc 0005 ff9a cmpal #393114,%a2
46ff6: 66e8 bnes 46fe0 <_API_extensions_Run_postswitch+0x14><== NEVER TAKEN
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
46ff8: 246e fffc moveal %fp@(-4),%a2
46ffc: 4e5e unlk %fp <== NOT EXECUTED
0004c970 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4c970: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4c976: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
4c97a: 2279 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4c980: 48d7 001c moveml %d2-%d4,%sp@ 4c984: 242e 000c movel %fp@(12),%d2 4c988: 262e 0014 movel %fp@(20),%d3
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4c98c: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4c990: 206e 0008 moveal %fp@(8),%a0 4c994: 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 );
4c998: 40c1 movew %sr,%d1 4c99a: 8081 orl %d1,%d0 4c99c: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4c99e: 2028 0048 movel %a0@(72),%d0 4c9a2: 5280 addql #1,%d0 4c9a4: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4c9a8: 4aa8 0040 tstl %a0@(64)
4c9ac: 6606 bnes 4c9b4 <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
4c9ae: b0a8 0044 cmpl %a0@(68),%d0
4c9b2: 672e beqs 4c9e2 <_CORE_barrier_Wait+0x72>
4c9b4: 7001 moveq #1,%d0
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
4c9b6: 2342 0020 movel %d2,%a1@(32)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
4c9ba: 2348 0044 movel %a0,%a1@(68) 4c9be: 2140 0030 movel %d0,%a0@(48)
executing->Wait.id = id; _ISR_Enable( level );
4c9c2: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4c9c4: 2d43 000c movel %d3,%fp@(12) 4c9c8: 203c 0004 90c0 movel #299200,%d0 4c9ce: 2d48 0008 movel %a0,%fp@(8) 4c9d2: 2d40 0010 movel %d0,%fp@(16)
}
4c9d6: 4cd7 001c moveml %sp@,%d2-%d4 4c9da: 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 );
4c9dc: 4ef9 0004 8d60 jmp 48d60 <_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;
4c9e2: 7001 moveq #1,%d0 4c9e4: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4c9e8: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4c9ea: 2d44 0010 movel %d4,%fp@(16) 4c9ee: 2d42 000c movel %d2,%fp@(12) 4c9f2: 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 );
}
4c9f6: 4cd7 001c moveml %sp@,%d2-%d4 4c9fa: 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 );
4c9fc: 4ef9 0004 c934 jmp 4c934 <_CORE_barrier_Release>
...
0005a930 <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
5a930: 4e56 ffe0 linkw %fp,#-32 5a934: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5a938: 266e 0008 moveal %fp@(8),%a3 5a93c: 282e 000c movel %fp@(12),%d4 5a940: 242e 0010 movel %fp@(16),%d2 5a944: 2a2e 001c movel %fp@(28),%d5
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
5a948: b4ab 004c cmpl %a3@(76),%d2
5a94c: 6262 bhis 5a9b0 <_CORE_message_queue_Broadcast+0x80><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
5a94e: 4aab 0048 tstl %a3@(72)
5a952: 664c bnes 5a9a0 <_CORE_message_queue_Broadcast+0x70>
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a954: 2f0b movel %a3,%sp@- 5a956: 49f9 0005 cf80 lea 5cf80 <_Thread_queue_Dequeue>,%a4 5a95c: 4283 clrl %d3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5a95e: 4bf9 0006 3ac0 lea 63ac0 <memcpy>,%a5 5a964: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a966: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a968: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a96a: 4a80 tstl %d0
5a96c: 6722 beqs 5a990 <_CORE_message_queue_Broadcast+0x60>
5a96e: 2f02 movel %d2,%sp@-
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
5a970: 5283 addql #1,%d3 5a972: 2f04 movel %d4,%sp@- 5a974: 2f2a 002c movel %a2@(44),%sp@- 5a978: 4e95 jsr %a5@
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5a97a: 206a 0028 moveal %a2@(40),%a0 5a97e: 4fef 000c lea %sp@(12),%sp 5a982: 2082 movel %d2,%a0@
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a984: 2f0b movel %a3,%sp@- 5a986: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a988: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a98a: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a98c: 4a80 tstl %d0
5a98e: 66de bnes 5a96e <_CORE_message_queue_Broadcast+0x3e>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
5a990: 2045 moveal %d5,%a0 5a992: 4280 clrl %d0 5a994: 2083 movel %d3,%a0@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
5a996: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a99c: 4e5e unlk %fp 5a99e: 4e75 rts
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
*count = 0;
5a9a0: 2045 moveal %d5,%a0 5a9a2: 4280 clrl %d0
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5a9a4: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
*count = 0;
5a9aa: 4290 clrl %a0@
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5a9ac: 4e5e unlk %fp 5a9ae: 4e75 rts
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
5a9b0: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5a9b2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5a9b8: 4e5e unlk %fp <== NOT EXECUTED
0005a9bc <_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
)
{
5a9bc: 4e56 0000 linkw %fp,#0 5a9c0: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
5a9c2: 2f2e 0010 movel %fp@(16),%sp@- 5a9c6: 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
)
{
5a9ca: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
5a9ce: 2f0a movel %a2,%sp@- 5a9d0: 4eb9 0005 d320 jsr 5d320 <_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 )
5a9d6: 4fef 000c lea %sp@(12),%sp 5a9da: 4aaa 0048 tstl %a2@(72)
5a9de: 6612 bnes 5a9f2 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
5a9e0: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
5a9e6: 246e fffc moveal %fp@(-4),%a2 5a9ea: 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 );
5a9ec: 4ef9 0005 e2ac jmp 5e2ac <_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 );
5a9f2: 2f0a movel %a2,%sp@- 5a9f4: 4eb9 0005 aa30 jsr 5aa30 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
5a9fa: 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 );
5aa00: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
5aa02: 246e fffc moveal %fp@(-4),%a2 5aa06: 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 );
5aa08: 4ef9 0005 e2ac jmp 5e2ac <_Workspace_Free>
...
00050570 <_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)) {
50570: 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
)
{
50572: 4e56 fff4 linkw %fp,#-12 50576: 202e 0014 movel %fp@(20),%d0 5057a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5057e: 246e 0008 moveal %fp@(8),%a2 50582: 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)) {
50586: c280 andl %d0,%d1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
50588: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
5058c: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
50590: 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)) {
50594: 4a81 tstl %d1
50596: 6620 bnes 505b8 <_CORE_message_queue_Initialize+0x48>
50598: 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));
5059a: 2601 movel %d1,%d3 5059c: 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 *
505a2: 2003 movel %d3,%d0 505a4: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
505a8: b280 cmpl %d0,%d1
505aa: 631c blss 505c8 <_CORE_message_queue_Initialize+0x58><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
505ac: 4200 clrb %d0
}
505ae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 505b4: 4e5e unlk %fp 505b6: 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)) {
allocated_message_size += sizeof(uint32_t);
505b8: 2200 movel %d0,%d1 505ba: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
505bc: 76fc moveq #-4,%d3 505be: c283 andl %d3,%d1
}
if (allocated_message_size < maximum_message_size)
505c0: b280 cmpl %d0,%d1
505c2: 64d6 bccs 5059a <_CORE_message_queue_Initialize+0x2a><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
505c4: 4200 clrb %d0
505c6: 60e6 bras 505ae <_CORE_message_queue_Initialize+0x3e><== NOT EXECUTED
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
505c8: 2f00 movel %d0,%sp@- 505ca: 4eb9 0005 32e4 jsr 532e4 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
505d0: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
505d2: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
505d6: 67d4 beqs 505ac <_CORE_message_queue_Initialize+0x3c>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
505d8: 2f03 movel %d3,%sp@- 505da: 2f02 movel %d2,%sp@- 505dc: 2f00 movel %d0,%sp@- 505de: 486a 0060 pea %a2@(96) 505e2: 4eb9 0005 5fa4 jsr 55fa4 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
505e8: 4878 0006 pea 6 <EXTENDSFDF> 505ec: 7001 moveq #1,%d0 505ee: 206e 000c moveal %fp@(12),%a0 505f2: b090 cmpl %a0@,%d0 505f4: 57c0 seq %d0 505f6: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 505fa: 49c0 extbl %d0 505fc: 4480 negl %d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
505fe: 41ea 0054 lea %a2@(84),%a0 50602: 2f00 movel %d0,%sp@- 50604: 2548 0050 movel %a0,%a2@(80)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
50608: 41ea 0050 lea %a2@(80),%a0 5060c: 2548 0058 movel %a0,%a2@(88) 50610: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
50612: 42aa 0054 clrl %a2@(84) 50616: 4eb9 0005 26bc jsr 526bc <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
5061c: 4fef 0020 lea %sp@(32),%sp
}
50620: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
50626: 7001 moveq #1,%d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
50628: 4e5e unlk %fp <== NOT EXECUTED
0005062c <_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 );
5062c: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
50632: 4e56 ffe4 linkw %fp,#-28
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
50636: 2079 0006 9d5e moveal 69d5e <_Thread_Executing>,%a0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
5063c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 50640: 2a2e 000c movel %fp@(12),%d5 50644: 282e 001c movel %fp@(28),%d4 50648: 246e 0008 moveal %fp@(8),%a2
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;
5064c: 42a8 0034 clrl %a0@(52)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
50650: 242e 0010 movel %fp@(16),%d2 50654: 226e 0014 moveal %fp@(20),%a1 50658: 262e 0018 movel %fp@(24),%d3
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 );
5065c: 40c1 movew %sr,%d1 5065e: 8081 orl %d1,%d0 50660: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
50662: 200a movel %a2,%d0 50664: 0680 0000 0054 addil #84,%d0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5066a: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5066e: b08b cmpl %a3,%d0
50670: 674e beqs 506c0 <_CORE_message_queue_Seize+0x94>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
50672: 2053 moveal %a3@,%a0
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
50674: 53aa 0048 subql #1,%a2@(72)
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
50678: 49ea 0050 lea %a2@(80),%a4
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
5067c: 2548 0050 movel %a0,%a2@(80)
new_first->previous = _Chain_Head(the_chain);
50680: 214c 0004 movel %a4,%a0@(4)
_ISR_Enable( level );
50684: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
50686: 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 );
5068a: 45ea 0060 lea %a2@(96),%a2
_Thread_Executing->Wait.count =
5068e: 2079 0006 9d5e moveal 69d5e <_Thread_Executing>,%a0 50694: 42a8 0024 clrl %a0@(36)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
50698: 2f11 movel %a1@,%sp@- 5069a: 486b 000c pea %a3@(12) 5069e: 2f02 movel %d2,%sp@- 506a0: 4eb9 0005 8e94 jsr 58e94 <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 );
506a6: 4fef 000c lea %sp@(12),%sp 506aa: 2d4a 0008 movel %a2,%fp@(8) 506ae: 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 );
}
506b2: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 506b8: 4e5e unlk %fp 506ba: 4ef9 0005 04a4 jmp 504a4 <_Chain_Append>
return;
}
#endif
}
if ( !wait ) {
506c0: 4a03 tstb %d3
506c2: 6612 bnes 506d6 <_CORE_message_queue_Seize+0xaa>
_ISR_Enable( level );
506c4: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
506c6: 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 );
}
506c8: 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;
506ce: 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 );
}
506d2: 4e5e unlk %fp 506d4: 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;
506d6: 7001 moveq #1,%d0 506d8: 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;
executing->Wait.return_argument = size_p;
506dc: 2149 0028 movel %a1,%a0@(40)
}
_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;
506e0: 2142 002c movel %d2,%a0@(44)
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
506e4: 2145 0020 movel %d5,%a0@(32)
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;
506e8: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id; 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 );
506ec: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
506ee: 49f9 0005 27a0 lea 527a0 <_Thread_queue_Timeout>,%a4 506f4: 2d44 000c movel %d4,%fp@(12) 506f8: 2d4c 0010 movel %a4,%fp@(16) 506fc: 2d4a 0008 movel %a2,%fp@(8)
}
50700: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 50706: 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 );
50708: 4ef9 0005 2440 jmp 52440 <_Thread_queue_Enqueue_with_handler>
...
00050710 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
50710: 4e56 fff4 linkw %fp,#-12 50714: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 50718: 246e 0008 moveal %fp@(8),%a2 5071c: 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 ) {
50720: b4aa 004c cmpl %a2@(76),%d2
50724: 6256 bhis 5077c <_CORE_message_queue_Submit+0x6c>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
50726: 202a 0048 movel %a2@(72),%d0
5072a: 675c beqs 50788 <_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 <
the_message_queue->maximum_pending_messages ) {
5072c: b0aa 0044 cmpl %a2@(68),%d0
50730: 650c bcss 5073e <_CORE_message_queue_Submit+0x2e>
50732: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50734: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 5073a: 4e5e unlk %fp 5073c: 4e75 rts
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
5073e: 486a 0060 pea %a2@(96) 50742: 4eb9 0005 0504 jsr 50504 <_Chain_Get> 50748: 2640 moveal %d0,%a3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5074a: 2f02 movel %d2,%sp@- 5074c: 2f2e 000c movel %fp@(12),%sp@- 50750: 486b 000c pea %a3@(12) 50754: 4eb9 0005 8e94 jsr 58e94 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
5075a: 2742 0008 movel %d2,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
5075e: 2f2e 001c movel %fp@(28),%sp@- 50762: 2f0b movel %a3,%sp@- 50764: 2f0a movel %a2,%sp@- 50766: 4eb9 0005 60f8 jsr 560f8 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
5076c: 4fef 001c lea %sp@(28),%sp
size
);
the_message->Contents.size = size;
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
50770: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50772: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50778: 4e5e unlk %fp 5077a: 4e75 rts
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
5077c: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
5077e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 50784: 4e5e unlk %fp 50786: 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 );
50788: 2f0a movel %a2,%sp@- 5078a: 4eb9 0005 22e0 jsr 522e0 <_Thread_queue_Dequeue>
if ( the_thread ) {
50790: 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 );
50792: 2640 moveal %d0,%a3
if ( the_thread ) {
50794: 4a80 tstl %d0
50796: 672e beqs 507c6 <_CORE_message_queue_Submit+0xb6>
50798: 2f02 movel %d2,%sp@- 5079a: 2f2e 000c movel %fp@(12),%sp@- 5079e: 2f2b 002c movel %a3@(44),%sp@- 507a2: 4eb9 0005 8e94 jsr 58e94 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
507a8: 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;
507ac: 4fef 000c lea %sp@(12),%sp
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
the_thread->Wait.count = (uint32_t) submit_type;
507b0: 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;
507b2: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
507b4: 222e 001c movel %fp@(28),%d1 507b8: 2741 0024 movel %d1,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
507bc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 507c2: 4e5e unlk %fp 507c4: 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 ) {
507c6: 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 <
the_message_queue->maximum_pending_messages ) {
507ca: b0aa 0044 cmpl %a2@(68),%d0 507ce: 6400 ff62 bccw 50732 <_CORE_message_queue_Submit+0x22> 507d2: 6000 ff6a braw 5073e <_CORE_message_queue_Submit+0x2e>
...
000471bc <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
471bc: 4e56 0000 linkw %fp,#0 471c0: 206e 0008 moveal %fp@(8),%a0 471c4: 2f0a movel %a2,%sp@- 471c6: 246e 000c moveal %fp@(12),%a2
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
471ca: 224a moveal %a2,%a1 471cc: 2159 0040 movel %a1@+,%a0@(64) 471d0: 2159 0044 movel %a1@+,%a0@(68) 471d4: 2159 0048 movel %a1@+,%a0@(72)
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
471d8: 202e 0010 movel %fp@(16),%d0
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
471dc: 3151 004c movew %a1@,%a0@(76)
the_mutex->lock = initial_lock;
471e0: 2140 004e movel %d0,%a0@(78)
the_mutex->blocked_count = 0;
471e4: 42a8 0056 clrl %a0@(86)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
471e8: 4a80 tstl %d0
471ea: 6654 bnes 47240 <_CORE_mutex_Initialize+0x84>
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
471ec: 2279 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a1
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
471f2: 103c 0001 moveb #1,%d0
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
471f6: 7202 moveq #2,%d1
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
471f8: 2140 0052 movel %d0,%a0@(82)
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
471fc: 2169 0008 005e movel %a1@(8),%a0@(94)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
47202: 2028 0046 movel %a0@(70),%d0
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
47206: 2149 005a movel %a1,%a0@(90)
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4720a: b280 cmpl %d0,%d1
4720c: 6762 beqs 47270 <_CORE_mutex_Initialize+0xb4> <== NEVER TAKEN
4720e: 123c 0003 moveb #3,%d1 47212: b280 cmpl %d0,%d1
47214: 675a beqs 47270 <_CORE_mutex_Initialize+0xb4>
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
47216: 4aaa 0006 tstl %a2@(6) 4721a: 56c0 sne %d0 4721c: 4878 0005 pea 5 <COMPARE> 47220: 49c0 extbl %d0 47222: 4878 0400 pea 400 <D_BIAS+0x2> 47226: 4480 negl %d0 47228: 2f00 movel %d0,%sp@- 4722a: 2f08 movel %a0,%sp@- 4722c: 4eb9 0004 8fdc jsr 48fdc <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
47232: 4fef 0010 lea %sp@(16),%sp
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
47236: 4280 clrl %d0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
47238: 246e fffc moveal %fp@(-4),%a2 4723c: 4e5e unlk %fp 4723e: 4e75 rts
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
47240: 4aaa 0006 tstl %a2@(6) 47244: 56c0 sne %d0
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
47246: 42a8 0052 clrl %a0@(82)
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
4724a: 49c0 extbl %d0 4724c: 4480 negl %d0
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
4724e: 42a8 005a clrl %a0@(90)
the_mutex->holder_id = 0;
47252: 42a8 005e clrl %a0@(94)
}
_Thread_queue_Initialize(
47256: 4878 0005 pea 5 <COMPARE> 4725a: 4878 0400 pea 400 <D_BIAS+0x2> 4725e: 2f00 movel %d0,%sp@- 47260: 2f08 movel %a0,%sp@- 47262: 4eb9 0004 8fdc jsr 48fdc <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
47268: 4fef 0010 lea %sp@(16),%sp
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
4726c: 4280 clrl %d0 4726e: 60c8 bras 47238 <_CORE_mutex_Initialize+0x7c>
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
47270: 2028 004a movel %a0@(74),%d0 47274: b0a9 0014 cmpl %a1@(20),%d0
47278: 6228 bhis 472a2 <_CORE_mutex_Initialize+0xe6>
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
4727a: 52a9 001c addql #1,%a1@(28)
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
4727e: 4aaa 0006 tstl %a2@(6) 47282: 56c0 sne %d0 47284: 4878 0005 pea 5 <COMPARE> 47288: 49c0 extbl %d0 4728a: 4878 0400 pea 400 <D_BIAS+0x2> 4728e: 4480 negl %d0 47290: 2f00 movel %d0,%sp@- 47292: 2f08 movel %a0,%sp@- 47294: 4eb9 0004 8fdc jsr 48fdc <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
4729a: 4fef 0010 lea %sp@(16),%sp
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
4729e: 4280 clrl %d0 472a0: 6096 bras 47238 <_CORE_mutex_Initialize+0x7c>
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
472a2: 246e fffc moveal %fp@(-4),%a2
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
472a6: 7006 moveq #6,%d0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
472a8: 4e5e unlk %fp <== NOT EXECUTED
00047338 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
47338: 4e56 0000 linkw %fp,#0 4733c: 202e 0010 movel %fp@(16),%d0 47340: 2f0a movel %a2,%sp@- 47342: 246e 0008 moveal %fp@(8),%a2 47346: 2f02 movel %d2,%sp@-
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
47348: 2239 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d1
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
4734e: 1400 moveb %d0,%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
47350: 4a81 tstl %d1
47352: 6704 beqs 47358 <_CORE_mutex_Seize+0x20>
47354: 4a00 tstb %d0
47356: 6634 bnes 4738c <_CORE_mutex_Seize+0x54> <== ALWAYS TAKEN
47358: 486e 0018 pea %fp@(24) 4735c: 2f0a movel %a2,%sp@- 4735e: 4eb9 0004 ca04 jsr 4ca04 <_CORE_mutex_Seize_interrupt_trylock> 47364: 508f addql #8,%sp 47366: 4a80 tstl %d0
47368: 6716 beqs 47380 <_CORE_mutex_Seize+0x48>
4736a: 4a02 tstb %d2
4736c: 6636 bnes 473a4 <_CORE_mutex_Seize+0x6c>
4736e: 202e 0018 movel %fp@(24),%d0 47372: 46c0 movew %d0,%sr 47374: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 4737a: 7001 moveq #1,%d0 4737c: 2140 0034 movel %d0,%a0@(52)
}
47380: 242e fff8 movel %fp@(-8),%d2 47384: 246e fffc moveal %fp@(-4),%a2 47388: 4e5e unlk %fp 4738a: 4e75 rts
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
4738c: 7001 moveq #1,%d0 4738e: b0b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d0
47394: 64c2 bccs 47358 <_CORE_mutex_Seize+0x20>
47396: 4878 0013 pea 13 <INVALID_OPERATION+0x3> 4739a: 42a7 clrl %sp@- 4739c: 42a7 clrl %sp@- 4739e: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> 473a4: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 473aa: 5280 addql #1,%d0 473ac: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 473b2: 216e 000c 0020 movel %fp@(12),%a0@(32) 473b8: 23c0 0005 fdfc movel %d0,5fdfc <_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;
473be: 7001 moveq #1,%d0 473c0: 214a 0044 movel %a2,%a0@(68) 473c4: 2540 0030 movel %d0,%a2@(48) 473c8: 202e 0018 movel %fp@(24),%d0 473cc: 46c0 movew %d0,%sr 473ce: 2f2e 0014 movel %fp@(20),%sp@- 473d2: 2f0a movel %a2,%sp@- 473d4: 4eb9 0004 72ac jsr 472ac <_CORE_mutex_Seize_interrupt_blocking>
}
473da: 242e fff8 movel %fp@(-8),%d2
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473de: 508f addql #8,%sp
}
473e0: 246e fffc moveal %fp@(-4),%a2
473e4: 4e5e unlk %fp <== NOT EXECUTED
0004ca04 <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
4ca04: 4e56 0000 linkw %fp,#0
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
4ca08: 2279 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a1 4ca0e: 2f0a movel %a2,%sp@- 4ca10: 206e 0008 moveal %fp@(8),%a0 4ca14: 246e 000c moveal %fp@(12),%a2 4ca18: 2f02 movel %d2,%sp@-
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
4ca1a: 42a9 0034 clrl %a1@(52)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
4ca1e: 4aa8 004e tstl %a0@(78)
4ca22: 673a beqs 4ca5e <_CORE_mutex_Seize_interrupt_trylock+0x5a>
the_mutex->lock = CORE_MUTEX_LOCKED;
4ca24: 42a8 004e clrl %a0@(78)
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
4ca28: 7201 moveq #1,%d1
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
4ca2a: 2169 0008 005e movel %a1@(8),%a0@(94)
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
4ca30: 2028 0046 movel %a0@(70),%d0
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
4ca34: 2141 0052 movel %d1,%a0@(82)
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4ca38: 123c 0002 moveb #2,%d1
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
the_mutex->lock = CORE_MUTEX_LOCKED;
the_mutex->holder = executing;
4ca3c: 2149 005a movel %a1,%a0@(90)
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4ca40: b280 cmpl %d0,%d1
4ca42: 672e beqs 4ca72 <_CORE_mutex_Seize_interrupt_trylock+0x6e>
4ca44: 123c 0003 moveb #3,%d1 4ca48: b280 cmpl %d0,%d1
4ca4a: 674e beqs 4ca9a <_CORE_mutex_Seize_interrupt_trylock+0x96>
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
4ca4c: 2012 movel %a2@,%d0 4ca4e: 46c0 movew %d0,%sr 4ca50: 4280 clrl %d0
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
4ca52: 242e fff8 movel %fp@(-8),%d2 4ca56: 246e fffc moveal %fp@(-4),%a2 4ca5a: 4e5e unlk %fp 4ca5c: 4e75 rts
/*
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
4ca5e: b3e8 005a cmpal %a0@(90),%a1
4ca62: 671a beqs 4ca7e <_CORE_mutex_Seize_interrupt_trylock+0x7a>
4ca64: 242e fff8 movel %fp@(-8),%d2
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
_ISR_Enable( *level_p );
4ca68: 7001 moveq #1,%d0 4ca6a: 246e fffc moveal %fp@(-4),%a2 4ca6e: 4e5e unlk %fp 4ca70: 4e75 rts
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4ca72: 52a9 001c addql #1,%a1@(28)
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( *level_p );
4ca76: 2012 movel %a2@,%d0 4ca78: 46c0 movew %d0,%sr 4ca7a: 4280 clrl %d0 4ca7c: 60d4 bras 4ca52 <_CORE_mutex_Seize_interrupt_trylock+0x4e>
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
4ca7e: 2028 0040 movel %a0@(64),%d0
4ca82: 6658 bnes 4cadc <_CORE_mutex_Seize_interrupt_trylock+0xd8>
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
4ca84: 52a8 0052 addql #1,%a0@(82)
_ISR_Enable( *level_p );
4ca88: 2012 movel %a2@,%d0 4ca8a: 46c0 movew %d0,%sr 4ca8c: 242e fff8 movel %fp@(-8),%d2 4ca90: 4280 clrl %d0 4ca92: 246e fffc moveal %fp@(-4),%a2 4ca96: 4e5e unlk %fp 4ca98: 4e75 rts
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
4ca9a: 2429 001c movel %a1@(28),%d2 4ca9e: 2002 movel %d2,%d0 4caa0: 5280 addql #1,%d0 4caa2: 2340 001c movel %d0,%a1@(28)
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
4caa6: 2029 0014 movel %a1@(20),%d0
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
4caaa: 2228 004a movel %a0@(74),%d1
current = executing->current_priority;
if ( current == ceiling ) {
4caae: b081 cmpl %d1,%d0 4cab0: 6700 0082 beqw 4cb34 <_CORE_mutex_Seize_interrupt_trylock+0x130>
_ISR_Enable( *level_p );
return 0;
}
if ( current > ceiling ) {
4cab4: 6244 bhis 4cafa <_CORE_mutex_Seize_interrupt_trylock+0xf6>
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4cab6: 7206 moveq #6,%d1
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4cab8: 7001 moveq #1,%d0
);
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4caba: 2341 0034 movel %d1,%a1@(52)
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
4cabe: 42a8 0052 clrl %a0@(82)
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4cac2: 2140 004e movel %d0,%a0@(78)
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
4cac6: 2342 001c movel %d2,%a1@(28)
_ISR_Enable( *level_p );
4caca: 2012 movel %a2@,%d0 4cacc: 46c0 movew %d0,%sr 4cace: 242e fff8 movel %fp@(-8),%d2 4cad2: 4280 clrl %d0 4cad4: 246e fffc moveal %fp@(-4),%a2 4cad8: 4e5e unlk %fp 4cada: 4e75 rts
* At this point, we know the mutex was not available. If this thread
* is the thread that has locked the mutex, let's see if we are allowed
* to nest access.
*/
if ( _Thread_Is_executing( the_mutex->holder ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
4cadc: 7201 moveq #1,%d1 4cade: b280 cmpl %d0,%d1
4cae0: 6682 bnes 4ca64 <_CORE_mutex_Seize_interrupt_trylock+0x60><== ALWAYS TAKEN
case CORE_MUTEX_NESTING_ACQUIRES:
the_mutex->nest_count++;
_ISR_Enable( *level_p );
return 0;
case CORE_MUTEX_NESTING_IS_ERROR:
executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED;
4cae2: 7002 moveq #2,%d0 <== NOT EXECUTED 4cae4: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED
_ISR_Enable( *level_p );
4cae8: 2012 movel %a2@,%d0 <== NOT EXECUTED 4caea: 46c0 movew %d0,%sr <== NOT EXECUTED 4caec: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4caf0: 4280 clrl %d0 <== NOT EXECUTED 4caf2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4caf6: 4e5e unlk %fp <== NOT EXECUTED 4caf8: 4e75 rts <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4cafa: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 4cb00: 5280 addql #1,%d0 4cb02: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level>
return 0;
}
if ( current > ceiling ) {
_Thread_Disable_dispatch();
_ISR_Enable( *level_p );
4cb08: 2012 movel %a2@,%d0 4cb0a: 46c0 movew %d0,%sr
_Thread_Change_priority(
4cb0c: 42a7 clrl %sp@- 4cb0e: 2f28 004a movel %a0@(74),%sp@- 4cb12: 2f28 005a movel %a0@(90),%sp@- 4cb16: 4eb9 0004 836c jsr 4836c <_Thread_Change_priority>
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
false
);
_Thread_Enable_dispatch();
4cb1c: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> 4cb22: 242e fff8 movel %fp@(-8),%d2 4cb26: 4fef 000c lea %sp@(12),%sp 4cb2a: 4280 clrl %d0 4cb2c: 246e fffc moveal %fp@(-4),%a2 4cb30: 4e5e unlk %fp 4cb32: 4e75 rts
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( *level_p );
4cb34: 2012 movel %a2@,%d0 4cb36: 46c0 movew %d0,%sr 4cb38: 242e fff8 movel %fp@(-8),%d2 4cb3c: 4280 clrl %d0 4cb3e: 246e fffc moveal %fp@(-4),%a2 4cb42: 4e5e unlk %fp
...
0004754c <_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
)
{
4754c: 4e56 0000 linkw %fp,#0 47550: 2f0a movel %a2,%sp@- 47552: 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)) ) {
47556: 2f0a movel %a2,%sp@- 47558: 4eb9 0004 8c00 jsr 48c00 <_Thread_queue_Dequeue> 4755e: 588f addql #4,%sp 47560: 4a80 tstl %d0
47562: 670a beqs 4756e <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
47564: 246e fffc moveal %fp@(-4),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
47568: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
4756a: 4e5e unlk %fp 4756c: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
4756e: 203c 0000 0700 movel #1792,%d0 47574: 40c1 movew %sr,%d1 47576: 8081 orl %d1,%d0 47578: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
4757a: 202a 0048 movel %a2@(72),%d0 4757e: b0aa 0040 cmpl %a2@(64),%d0
47582: 6412 bccs 47596 <_CORE_semaphore_Surrender+0x4a> <== NEVER TAKEN
the_semaphore->count += 1;
47584: 5280 addql #1,%d0 47586: 2540 0048 movel %d0,%a2@(72) 4758a: 4280 clrl %d0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
4758c: 46c1 movew %d1,%sr
}
return status;
}
4758e: 246e fffc moveal %fp@(-4),%a2 47592: 4e5e unlk %fp 47594: 4e75 rts
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
47596: 7004 moveq #4,%d0 <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
47598: 46c1 movew %d1,%sr <== NOT EXECUTED 4759a: 60f2 bras 4758e <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED
0004c8b0 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4c8b0: 4e56 0000 linkw %fp,#0 4c8b4: 202e 0010 movel %fp@(16),%d0 4c8b8: 2f0a movel %a2,%sp@- 4c8ba: 246e 0008 moveal %fp@(8),%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4c8be: 224a moveal %a2,%a1 4c8c0: 2f02 movel %d2,%sp@- 4c8c2: 242e 0014 movel %fp@(20),%d2
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
4c8c6: 42aa 0004 clrl %a2@(4)
next = starting_address;
while ( count-- ) {
4c8ca: 4a80 tstl %d0
4c8cc: 6718 beqs 4c8e6 <_Chain_Initialize+0x36> <== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
4c8ce: 206e 000c moveal %fp@(12),%a0
while ( count-- ) {
current->next = next;
next->previous = current;
4c8d2: 2149 0004 movel %a1,%a0@(4) 4c8d6: 2208 movel %a0,%d1 4c8d8: d282 addl %d2,%d1
current = next;
next = (Chain_Node *)
4c8da: 5380 subql #1,%d0
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
4c8dc: 2288 movel %a0,%a1@
next->previous = current;
current = next;
next = (Chain_Node *)
4c8de: 2248 moveal %a0,%a1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4c8e0: 2041 moveal %d1,%a0 4c8e2: 4a80 tstl %d0
4c8e4: 66ec bnes 4c8d2 <_Chain_Initialize+0x22>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
4c8e6: 200a movel %a2,%d0 4c8e8: 5880 addql #4,%d0 4c8ea: 2280 movel %d0,%a1@
the_chain->last = current; }
4c8ec: 241f movel %sp@+,%d2
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
the_chain->last = current;
4c8ee: 2549 0008 movel %a1,%a2@(8)
}
4c8f2: 245f moveal %sp@+,%a2
4c8f4: 4e5e unlk %fp <== NOT EXECUTED
000460a8 <_Event_Seize>:
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
460a8: 203c 0000 0700 movel #1792,%d0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460ae: 4e56 ffec linkw %fp,#-20 460b2: 222e 0008 movel %fp@(8),%d1 460b6: 48d7 043c moveml %d2-%d5/%a2,%sp@
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
460ba: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460c0: 242e 000c movel %fp@(12),%d2 460c4: 2a2e 0010 movel %fp@(16),%d5
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
460c8: 42aa 0034 clrl %a2@(52)
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460cc: 226e 0014 moveal %fp@(20),%a1
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
460d0: 206a 0108 moveal %a2@(264),%a0
_ISR_Disable( level );
460d4: 40c4 movew %sr,%d4 460d6: 8084 orl %d4,%d0 460d8: 46c0 movew %d0,%sr
pending_events = api->pending_events;
460da: 2610 movel %a0@,%d3
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 );
460dc: 2001 movel %d1,%d0 460de: c083 andl %d3,%d0
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
460e0: 670c beqs 460ee <_Event_Seize+0x46>
460e2: b081 cmpl %d1,%d0 460e4: 6700 0084 beqw 4616a <_Event_Seize+0xc2> 460e8: 0802 0001 btst #1,%d2
460ec: 667c bnes 4616a <_Event_Seize+0xc2> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
460ee: 0802 0000 btst #0,%d2
460f2: 6662 bnes 46156 <_Event_Seize+0xae> * set properly when we are marked as in the event critical section. * * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set;
460f4: 2542 0030 movel %d2,%a2@(48)
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
460f8: 7401 moveq #1,%d2
* * NOTE: Since interrupts are disabled, this isn't that much of an * issue but better safe than sorry. */ executing->Wait.option = (uint32_t) option_set; executing->Wait.count = (uint32_t) event_in;
460fa: 2541 0024 movel %d1,%a2@(36)
executing->Wait.return_argument = event_out;
460fe: 2549 0028 movel %a1,%a2@(40)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
46102: 23c2 0006 0006 movel %d2,60006 <_Event_Sync_state>
_ISR_Enable( level );
46108: 46c4 movew %d4,%sr
if ( ticks ) {
4610a: 4a85 tstl %d5
4610c: 6672 bnes 46180 <_Event_Seize+0xd8>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4610e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 46112: 2f0a movel %a2,%sp@- 46114: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state>
_ISR_Disable( level );
4611a: 203c 0000 0700 movel #1792,%d0 46120: 40c1 movew %sr,%d1 46122: 8081 orl %d1,%d0 46124: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46126: 7401 moveq #1,%d2 46128: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
4612a: 2039 0006 0006 movel 60006 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
46130: 42b9 0006 0006 clrl 60006 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46136: b480 cmpl %d0,%d2 46138: 6700 00a4 beqw 461de <_Event_Seize+0x136>
* An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level );
4613c: 2d4a 000c movel %a2,%fp@(12) 46140: 2d41 0010 movel %d1,%fp@(16)
}
46144: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
* An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level );
4614a: 2d40 0008 movel %d0,%fp@(8)
}
4614e: 4e5e unlk %fp
* An interrupt completed the thread's blocking request. * The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level );
46150: 4ef9 0004 8304 jmp 48304 <_Thread_blocking_operation_Cancel>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
46156: 46c4 movew %d4,%sr
executing->Wait.return_code = RTEMS_UNSATISFIED;
46158: 720d moveq #13,%d1 4615a: 2541 0034 movel %d1,%a2@(52)
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
4615e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
46164: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
46166: 4e5e unlk %fp 46168: 4e75 rts
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
4616a: 2200 movel %d0,%d1 4616c: 4681 notl %d1 4616e: c283 andl %d3,%d1 46170: 2081 movel %d1,%a0@
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
46172: 46c4 movew %d4,%sr
*event_out = seized_events;
46174: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
46176: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4617c: 4e5e unlk %fp 4617e: 4e75 rts
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
46180: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46184: 223c 0004 6374 movel #287604,%d1
the_watchdog->id = id;
4618a: 2540 0068 movel %d0,%a2@(104)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4618e: 2541 0064 movel %d1,%a2@(100)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46192: 2545 0054 movel %d5,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46196: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
4619a: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4619e: 486a 0048 pea %a2@(72) 461a2: 4879 0005 fed4 pea 5fed4 <_Watchdog_Ticks_chain> 461a8: 4eb9 0004 996c jsr 4996c <_Watchdog_Insert> 461ae: 508f addql #8,%sp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
461b0: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 461b4: 2f0a movel %a2,%sp@- 461b6: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state>
_ISR_Disable( level );
461bc: 203c 0000 0700 movel #1792,%d0 461c2: 40c1 movew %sr,%d1 461c4: 8081 orl %d1,%d0 461c6: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
461c8: 7401 moveq #1,%d2 461ca: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
461cc: 2039 0006 0006 movel 60006 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
461d2: 42b9 0006 0006 clrl 60006 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
461d8: b480 cmpl %d0,%d2 461da: 6600 ff60 bnew 4613c <_Event_Seize+0x94>
_ISR_Enable( level );
461de: 46c1 movew %d1,%sr
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
461e0: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 461e6: 4e5e unlk %fp
...
00046248 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
46248: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4624e: 4e56 ffec linkw %fp,#-20 46252: 48d7 043c moveml %d2-%d5/%a2,%sp@ 46256: 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 ];
4625a: 206a 0108 moveal %a2@(264),%a0
option_set = (rtems_option) the_thread->Wait.option;
4625e: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
46262: 40c3 movew %sr,%d3 46264: 8083 orl %d3,%d0 46266: 46c0 movew %d0,%sr
pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count;
46268: 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 );
4626c: 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;
4626e: 2410 movel %a0@,%d2 46270: 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 ) ) {
46272: 6778 beqs 462ec <_Event_Surrender+0xa4>
/*
* 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() &&
46274: 2279 0005 fe96 moveal 5fe96 <_ISR_Nest_level>,%a1 4627a: 4a89 tstl %a1
4627c: 670a beqs 46288 <_Event_Surrender+0x40>
4627e: b5f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a2 46284: 6700 00a0 beqw 46326 <_Event_Surrender+0xde>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
46288: 2a2a 0010 movel %a2@(16),%d5 4628c: 0285 0000 0100 andil #256,%d5
46292: 674c beqs 462e0 <_Event_Surrender+0x98>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
46294: b081 cmpl %d1,%d0
46296: 6706 beqs 4629e <_Event_Surrender+0x56>
46298: 0804 0001 btst #1,%d4
4629c: 6742 beqs 462e0 <_Event_Surrender+0x98> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
4629e: 2200 movel %d0,%d1 462a0: 4681 notl %d1 462a2: c282 andl %d2,%d1 462a4: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
462a6: 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;
462aa: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
462ae: 2080 movel %d0,%a0@
_ISR_Flash( level );
462b0: 203c 0000 0700 movel #1792,%d0 462b6: 46c3 movew %d3,%sr 462b8: 8083 orl %d3,%d0 462ba: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
462bc: 7a02 moveq #2,%d5 462be: baaa 0050 cmpl %a2@(80),%d5
462c2: 6734 beqs 462f8 <_Event_Surrender+0xb0>
_ISR_Enable( level );
462c4: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
462c6: 2f3c 1003 fff8 movel #268697592,%sp@- 462cc: 2f0a movel %a2,%sp@- 462ce: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> 462d4: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
462d6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462dc: 4e5e unlk %fp 462de: 4e75 rts
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
462e0: 46c3 movew %d3,%sr
}
462e2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462e8: 4e5e unlk %fp 462ea: 4e75 rts
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
462ec: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
462ee: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462f4: 4e5e unlk %fp 462f6: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
462f8: 7003 moveq #3,%d0 462fa: 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 );
462fe: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
46300: 486a 0048 pea %a2@(72) 46304: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4630a: 2f3c 1003 fff8 movel #268697592,%sp@- 46310: 2f0a movel %a2,%sp@- 46312: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> 46318: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
4631c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46322: 4e5e unlk %fp 46324: 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) ||
46326: 2279 0006 0006 moveal 60006 <_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() &&
4632c: 7a02 moveq #2,%d5 4632e: ba89 cmpl %a1,%d5
46330: 6710 beqs 46342 <_Event_Surrender+0xfa> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
46332: 2279 0006 0006 moveal 60006 <_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() &&
46338: 1a3c 0001 moveb #1,%d5 4633c: ba89 cmpl %a1,%d5 4633e: 6600 ff48 bnew 46288 <_Event_Surrender+0x40>
_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) ) {
46342: b081 cmpl %d1,%d0
46344: 6706 beqs 4634c <_Event_Surrender+0x104>
46346: 0804 0001 btst #1,%d4
4634a: 671a beqs 46366 <_Event_Surrender+0x11e> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
4634c: 2200 movel %d0,%d1 4634e: 4681 notl %d1 46350: c282 andl %d2,%d1 46352: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46354: 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;
46358: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4635c: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
4635e: 7003 moveq #3,%d0 46360: 23c0 0006 0006 movel %d0,60006 <_Event_Sync_state>
}
_ISR_Enable( level );
46366: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
46368: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4636e: 4e5e unlk %fp
...
00046374 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
46374: 4e56 fffc linkw %fp,#-4 46378: 2f03 movel %d3,%sp@- 4637a: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
4637c: 486e fffc pea %fp@(-4) 46380: 2f2e 0008 movel %fp@(8),%sp@- 46384: 4eb9 0004 88b4 jsr 488b4 <_Thread_Get>
switch ( location ) {
4638a: 508f addql #8,%sp 4638c: 4aae fffc tstl %fp@(-4)
46390: 6642 bnes 463d4 <_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 );
46392: 223c 0000 0700 movel #1792,%d1 46398: 40c2 movew %sr,%d2 4639a: 8282 orl %d2,%d1 4639c: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
4639e: 2040 moveal %d0,%a0 463a0: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
463a4: b0b9 0005 feb6 cmpl 5feb6 <_Thread_Executing>,%d0
463aa: 6734 beqs 463e0 <_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;
463ac: 7606 moveq #6,%d3 463ae: 2040 moveal %d0,%a0 463b0: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
463b4: 46c2 movew %d2,%sr 463b6: 2f3c 1003 fff8 movel #268697592,%sp@- 463bc: 2f00 movel %d0,%sp@- 463be: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
463c4: 508f addql #8,%sp 463c6: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 463cc: 5380 subql #1,%d0 463ce: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
463d4: 242e fff4 movel %fp@(-12),%d2 463d8: 262e fff8 movel %fp@(-8),%d3 463dc: 4e5e unlk %fp 463de: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
463e0: 2239 0006 0006 movel 60006 <_Event_Sync_state>,%d1 463e6: 7601 moveq #1,%d3 463e8: b681 cmpl %d1,%d3
463ea: 66c0 bnes 463ac <_Event_Timeout+0x38>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463ec: 7606 moveq #6,%d3 463ee: 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;
463f0: 7202 moveq #2,%d1
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463f2: 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;
463f6: 23c1 0006 0006 movel %d1,60006 <_Event_Sync_state>
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
463fc: 46c2 movew %d2,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
463fe: 2f3c 1003 fff8 movel #268697592,%sp@- 46404: 2f00 movel %d0,%sp@- 46406: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4640c: 508f addql #8,%sp 4640e: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 46414: 5380 subql #1,%d0 46416: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> 4641c: 60b6 bras 463d4 <_Event_Timeout+0x60>
...
0004cbe4 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4cbe4: 4e56 ffcc linkw %fp,#-52 4cbe8: 226e 000c moveal %fp@(12),%a1 4cbec: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cbf0: 246e 0008 moveal %fp@(8),%a2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
4cbf4: 2c09 movel %a1,%d6 4cbf6: 5886 addql #4,%d6
uintptr_t const page_size = heap->page_size;
4cbf8: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4cbfc: 222e 0010 movel %fp@(16),%d1 4cc00: 282e 0014 movel %fp@(20),%d4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4cc04: 206a 0008 moveal %a2@(8),%a0
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
4cc08: 2d40 fffc movel %d0,%fp@(-4)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4cc0c: bc89 cmpl %a1,%d6 4cc0e: 6500 0146 bcsw 4cd56 <_Heap_Allocate_aligned_with_boundary+0x172>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4cc12: 4a84 tstl %d4 4cc14: 6600 013c bnew 4cd52 <_Heap_Allocate_aligned_with_boundary+0x16e>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4cc18: b1ca cmpal %a2,%a0 4cc1a: 6700 0152 beqw 4cd6e <_Heap_Allocate_aligned_with_boundary+0x18a>
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
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4cc1e: 242e fffc movel %fp@(-4),%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4cc22: 7a04 moveq #4,%d5
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
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4cc24: 5e82 addql #7,%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4cc26: 9a89 subl %a1,%d5
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4cc28: 4283 clrl %d3
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
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4cc2a: 2d42 fff8 movel %d2,%fp@(-8)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4cc2e: 2d45 fff4 movel %d5,%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 ) {
4cc32: 2028 0004 movel %a0@(4),%d0
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
4cc36: 5283 addql #1,%d3
/*
* 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 ) {
4cc38: b086 cmpl %d6,%d0
4cc3a: 630e blss 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4cc3c: 4a81 tstl %d1
4cc3e: 6628 bnes 4cc68 <_Heap_Allocate_aligned_with_boundary+0x84>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4cc40: 2408 movel %a0,%d2 4cc42: 5082 addql #8,%d2
boundary
);
}
}
if ( alloc_begin != 0 ) {
4cc44: 4a82 tstl %d2 4cc46: 6600 00ee bnew 4cd36 <_Heap_Allocate_aligned_with_boundary+0x152>
break;
}
block = block->next;
4cc4a: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4cc4e: b1ca cmpal %a2,%a0
4cc50: 66e0 bnes 4cc32 <_Heap_Allocate_aligned_with_boundary+0x4e>
4cc52: 4280 clrl %d0
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
4cc54: b6aa 0044 cmpl %a2@(68),%d3
4cc58: 6304 blss 4cc5e <_Heap_Allocate_aligned_with_boundary+0x7a>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4cc5a: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
}
4cc5e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cc64: 4e5e unlk %fp 4cc66: 4e75 rts
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;
4cc68: 7efe moveq #-2,%d7 4cc6a: 4be8 0008 lea %a0@(8),%a5 4cc6e: c087 andl %d7,%d0
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4cc70: 286a 0014 moveal %a2@(20),%a4
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;
4cc74: 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;
4cc76: 2a2e fff8 movel %fp@(-8),%d5 4cc7a: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4cc7c: 242e fff4 movel %fp@(-12),%d2 4cc80: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4cc82: 2e02 movel %d2,%d7
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
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4cc84: d085 addl %d5,%d0 4cc86: 4c41 7005 remul %d1,%d5,%d7 4cc8a: 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 ) {
4cc8c: b480 cmpl %d0,%d2
4cc8e: 630a blss 4cc9a <_Heap_Allocate_aligned_with_boundary+0xb6>
4cc90: 2a00 movel %d0,%d5 4cc92: 4c41 5002 remul %d1,%d2,%d5 4cc96: 9082 subl %d2,%d0 4cc98: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4cc9a: 4a84 tstl %d4
4cc9c: 676c beqs 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126>
/* 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;
4cc9e: 2002 movel %d2,%d0 4cca0: d089 addl %a1,%d0 4cca2: 2e00 movel %d0,%d7 4cca4: 4c44 7005 remul %d4,%d5,%d7 4cca8: 2e00 movel %d0,%d7 4ccaa: 9e85 subl %d5,%d7 4ccac: 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 ) {
4ccae: be82 cmpl %d2,%d7
4ccb0: 6358 blss 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126>
4ccb2: be80 cmpl %d0,%d7
4ccb4: 6454 bccs 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4ccb6: 2e0d movel %a5,%d7 4ccb8: de89 addl %a1,%d7
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4ccba: ba87 cmpl %d7,%d5
4ccbc: 658c bcss 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4ccbe: 9a89 subl %a1,%d5 4ccc0: 2005 movel %d5,%d0 4ccc2: 2647 moveal %d7,%a3 4ccc4: 4c41 0002 remul %d1,%d2,%d0 4ccc8: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4ccca: 2005 movel %d5,%d0 4cccc: d089 addl %a1,%d0 4ccce: 2405 movel %d5,%d2 4ccd0: 2e00 movel %d0,%d7 4ccd2: 4c44 7005 remul %d4,%d5,%d7 4ccd6: 2e00 movel %d0,%d7 4ccd8: 9e85 subl %d5,%d7 4ccda: 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 ) {
4ccdc: be82 cmpl %d2,%d7
4ccde: 632a blss 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126>
4cce0: be80 cmpl %d0,%d7
4cce2: 6426 bccs 4cd0a <_Heap_Allocate_aligned_with_boundary+0x126>
if ( boundary_line < boundary_floor ) {
4cce4: ba8b cmpl %a3,%d5 4cce6: 6500 ff62 bcsw 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4ccea: 9a89 subl %a1,%d5 4ccec: 2005 movel %d5,%d0 4ccee: 4c41 0002 remul %d1,%d2,%d0 4ccf2: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4ccf4: 2005 movel %d5,%d0 4ccf6: d089 addl %a1,%d0 4ccf8: 2405 movel %d5,%d2 4ccfa: 2e00 movel %d0,%d7 4ccfc: 4c44 7005 remul %d4,%d5,%d7 4cd00: 2e00 movel %d0,%d7 4cd02: 9e85 subl %d5,%d7 4cd04: 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 ) {
4cd06: be82 cmpl %d2,%d7
4cd08: 62d6 bhis 4cce0 <_Heap_Allocate_aligned_with_boundary+0xfc><== 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 ) {
4cd0a: b48d cmpl %a5,%d2 4cd0c: 6500 ff3c bcsw 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66>
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;
4cd10: 70f8 moveq #-8,%d0 4cd12: 9088 subl %a0,%d0 4cd14: 2a40 moveal %d0,%a5 4cd16: 2e02 movel %d2,%d7 4cd18: dbc2 addal %d2,%a5 4cd1a: 202e fffc movel %fp@(-4),%d0 4cd1e: 4c40 7005 remul %d0,%d5,%d7 4cd22: 9bc5 subal %d5,%a5
if ( free_size >= min_block_size || free_size == 0 ) {
4cd24: bbcc cmpal %a4,%a5 4cd26: 6400 ff1c bccw 4cc44 <_Heap_Allocate_aligned_with_boundary+0x60> 4cd2a: 4a8d tstl %a5 4cd2c: 6600 ff1c bnew 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66>
boundary
);
}
}
if ( alloc_begin != 0 ) {
4cd30: 4a82 tstl %d2 4cd32: 6700 ff16 beqw 4cc4a <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4cd36: 2f09 movel %a1,%sp@-
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4cd38: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4cd3c: 2f02 movel %d2,%sp@- 4cd3e: 2f08 movel %a0,%sp@- 4cd40: 2f0a movel %a2,%sp@- 4cd42: 4eb9 0004 7910 jsr 47910 <_Heap_Block_allocate> 4cd48: 4fef 0010 lea %sp@(16),%sp 4cd4c: 2002 movel %d2,%d0 4cd4e: 6000 ff04 braw 4cc54 <_Heap_Allocate_aligned_with_boundary+0x70>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4cd52: b889 cmpl %a1,%d4
4cd54: 640c bccs 4cd62 <_Heap_Allocate_aligned_with_boundary+0x17e>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4cd56: 4280 clrl %d0
}
return (void *) alloc_begin;
}
4cd58: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cd5e: 4e5e unlk %fp 4cd60: 4e75 rts
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4cd62: 4a81 tstl %d1 4cd64: 6600 feb2 bnew 4cc18 <_Heap_Allocate_aligned_with_boundary+0x34> 4cd68: 2200 movel %d0,%d1 4cd6a: 6000 feac braw 4cc18 <_Heap_Allocate_aligned_with_boundary+0x34>
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4cd6e: 4283 clrl %d3 4cd70: 4280 clrl %d0 4cd72: 6000 fee0 braw 4cc54 <_Heap_Allocate_aligned_with_boundary+0x70>
...
00047910 <_Heap_Block_allocate>:
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47910: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
47912: 4e56 ffe0 linkw %fp,#-32 47916: 222e 0010 movel %fp@(16),%d1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4791a: 2041 moveal %d1,%a0 4791c: 5188 subql #8,%a0 4791e: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 47922: 246e 000c moveal %fp@(12),%a2
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47926: 7601 moveq #1,%d3
)
{
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;
47928: 2848 moveal %a0,%a4 4792a: 240a movel %a2,%d2 4792c: 99ca subal %a2,%a4
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4792e: c0aa 0004 andl %a2@(4),%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
47932: 266e 0008 moveal %fp@(8),%a3
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47936: c6b2 0804 andl %a2@(00000004,%d0:l),%d3
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4793a: 2a2e 0014 movel %fp@(20),%d5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4793e: 4a03 tstb %d3 47940: 6600 00aa bnew 479ec <_Heap_Block_allocate+0xdc>
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
47944: 53ab 0038 subql #1,%a3@(56)
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
47948: 76fe moveq #-2,%d3
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
4794a: 52ab 0040 addql #1,%a3@(64)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4794e: 202a 0008 movel %a2@(8),%d0
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
47952: 2a40 moveal %d0,%a5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
47954: 226a 000c moveal %a2@(12),%a1
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
47958: c6aa 0004 andl %a2@(4),%d3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4795c: 2340 0008 movel %d0,%a1@(8)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
47960: 202b 0010 movel %a3@(16),%d0
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
47964: 97ab 0030 subl %d3,%a3@(48)
next->prev = prev;
47968: 2b49 000c movel %a1,%a5@(12)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
4796c: b08c cmpl %a4,%d0 4796e: 6200 0088 bhiw 479f8 <_Heap_Block_allocate+0xe8>
- 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;
47972: 262a 0004 movel %a2@(4),%d3
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 )
47976: 4c40 1004 remul %d0,%d4,%d1
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
if ( _Heap_Is_prev_used( block ) ) {
4797a: 7201 moveq #1,%d1 4797c: 91c4 subal %d4,%a0
_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;
4797e: 2008 movel %a0,%d0 47980: 908a subl %a2,%d0
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
47982: d1ab 0030 addl %d0,%a3@(48)
if ( _Heap_Is_prev_used( block ) ) {
47986: c2aa 0004 andl %a2@(4),%d1 4798a: 6700 0082 beqw 47a0e <_Heap_Block_allocate+0xfe>
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
4798e: 78fe moveq #-2,%d4
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47990: 52ab 0038 addql #1,%a3@(56) 47994: 220a movel %a2,%d1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
47996: 2869 0008 moveal %a1@(8),%a4
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
4799a: c684 andl %d4,%d3
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4799c: 7801 moveq #1,%d4 4799e: 8880 orl %d0,%d4
new_block->next = next;
479a0: 254c 0008 movel %a4,%a2@(8)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
479a4: d483 addl %d3,%d2 479a6: 9488 subl %a0,%d2
new_block->prev = block_before;
479a8: 2549 000c movel %a1,%a2@(12)
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
479ac: 2544 0004 movel %d4,%a2@(4)
block_before->next = new_block;
479b0: 234a 0008 movel %a2,%a1@(8)
next->prev = new_block;
479b4: 294a 000c movel %a2,%a4@(12)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
479b8: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
479ba: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
479bc: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
479c0: 2f05 movel %d5,%sp@- 479c2: 2f01 movel %d1,%sp@- 479c4: 2f08 movel %a0,%sp@- 479c6: 2f0b movel %a3,%sp@- 479c8: 4eb9 0004 781c jsr 4781c <_Heap_Block_split> 479ce: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
479d2: 202b 0030 movel %a3@(48),%d0
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
479d6: b0ab 0034 cmpl %a3@(52),%d0
479da: 6404 bccs 479e0 <_Heap_Block_allocate+0xd0>
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
479dc: 2740 0034 movel %d0,%a3@(52)
}
return block;
}
479e0: 200a movel %a2,%d0 479e2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 479e8: 4e5e unlk %fp 479ea: 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 ) {
479ec: 202b 0010 movel %a3@(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 );
479f0: 224b moveal %a3,%a1
}
if ( alloc_area_offset < heap->page_size ) {
479f2: b08c cmpl %a4,%d0 479f4: 6300 ff7c blsw 47972 <_Heap_Block_allocate+0x62>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
479f8: 4874 5800 pea %a4@(00000000,%d5:l) 479fc: 2f09 movel %a1,%sp@- 479fe: 2f0a movel %a2,%sp@- 47a00: 2f0b movel %a3,%sp@- 47a02: 4eb9 0004 781c jsr 4781c <_Heap_Block_split> 47a08: 4fef 0010 lea %sp@(16),%sp 47a0c: 60c4 bras 479d2 <_Heap_Block_allocate+0xc2>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
47a0e: 95d2 subal %a2@,%a2
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
47a10: 78fe moveq #-2,%d4 47a12: 2209 movel %a1,%d1 47a14: c8aa 0004 andl %a2@(4),%d4 47a18: d084 addl %d4,%d0
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a1a: 78fe moveq #-2,%d4 47a1c: c684 andl %d4,%d3
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a1e: 7801 moveq #1,%d4 47a20: 8880 orl %d0,%d4
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a22: d483 addl %d3,%d2 47a24: 9488 subl %a0,%d2
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a26: 2544 0004 movel %d4,%a2@(4)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a2a: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
47a2c: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
47a2e: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a32: 2f05 movel %d5,%sp@- 47a34: 2f01 movel %d1,%sp@- 47a36: 2f08 movel %a0,%sp@- 47a38: 2f0b movel %a3,%sp@- 47a3a: 4eb9 0004 781c jsr 4781c <_Heap_Block_split> 47a40: 4fef 0010 lea %sp@(16),%sp 47a44: 608c bras 479d2 <_Heap_Block_allocate+0xc2>
...
00051c70 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
51c70: 4e56 fff4 linkw %fp,#-12 51c74: 206e 0008 moveal %fp@(8),%a0 51c78: 202e 000c movel %fp@(12),%d0
Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end;
51c7c: 2228 001c movel %a0@(28),%d1
uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block;
51c80: 2268 0024 moveal %a0@(36),%a1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
51c84: 48d7 040c moveml %d2-%d3/%a2,%sp@
Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin;
51c88: b0a8 0018 cmpl %a0@(24),%d0
51c8c: 6410 bccs 51c9e <_Heap_Extend+0x2e>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
51c8e: b280 cmpl %d0,%d1
51c90: 671c beqs 51cae <_Heap_Extend+0x3e>
51c92: 7002 moveq #2,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
51c94: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 51c9a: 4e5e unlk %fp 51c9c: 4e75 rts
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
51c9e: b280 cmpl %d0,%d1
51ca0: 63ec blss 51c8e <_Heap_Extend+0x1e>
51ca2: 7001 moveq #1,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
51ca4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 51caa: 4e5e unlk %fp 51cac: 4e75 rts
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
51cae: 2200 movel %d0,%d1 51cb0: d2ae 0010 addl %fp@(16),%d1
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
51cb4: 70f8 moveq #-8,%d0 51cb6: 9089 subl %a1,%d0 51cb8: d081 addl %d1,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
51cba: 2600 movel %d0,%d3 51cbc: 4c68 3002 0010 remul %a0@(16),%d2,%d3
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
51cc2: 2141 001c movel %d1,%a0@(28)
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
51cc6: 246e 0014 moveal %fp@(20),%a2 51cca: 9082 subl %d2,%d0 51ccc: 2480 movel %d0,%a2@
if( extend_size >= heap->min_block_size ) {
51cce: b0a8 0014 cmpl %a0@(20),%d0
51cd2: 640c bccs 51ce0 <_Heap_Extend+0x70> <== ALWAYS TAKEN
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
51cd4: 4280 clrl %d0 <== NOT EXECUTED
}
return HEAP_EXTEND_SUCCESSFUL;
}
51cd6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 51cdc: 4e5e unlk %fp 51cde: 4e75 rts
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
51ce0: 7401 moveq #1,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
51ce2: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
51ce6: c4a9 0004 andl %a1@(4),%d2
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
51cea: 2228 0020 movel %a0@(32),%d1 51cee: 928a subl %a2,%d1 51cf0: 8480 orl %d0,%d2
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
51cf2: 214a 0024 movel %a2,%a0@(36) 51cf6: 2342 0004 movel %d2,%a1@(4)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
51cfa: 7401 moveq #1,%d2 51cfc: 8481 orl %d1,%d2 51cfe: 2542 0004 movel %d2,%a2@(4)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
51d02: 4869 0008 pea %a1@(8)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
51d06: d1a8 002c addl %d0,%a0@(44)
++stats->used_blocks;
51d0a: 52a8 0040 addql #1,%a0@(64)
--stats->frees; /* Do not count subsequent call as actual free() */
51d0e: 53a8 0050 subql #1,%a0@(80)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
51d12: 2f08 movel %a0,%sp@- 51d14: 4eb9 0004 bd8c jsr 4bd8c <_Heap_Free> 51d1a: 508f addql #8,%sp 51d1c: 4280 clrl %d0 51d1e: 60b6 bras 51cd6 <_Heap_Extend+0x66>
0004cd78 <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4cd78: 4e56 ffe4 linkw %fp,#-28 4cd7c: 202e 000c movel %fp@(12),%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 )
4cd80: 2040 moveal %d0,%a0 4cd82: 5188 subql #8,%a0 4cd84: 226e 0008 moveal %fp@(8),%a1 4cd88: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4cd8e: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
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;
4cd92: 2029 0020 movel %a1@(32),%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 )
4cd96: 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
4cd98: b088 cmpl %a0,%d0 4cd9a: 6200 00a0 bhiw 4ce3c <_Heap_Free+0xc4>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4cd9e: 2229 0024 movel %a1@(36),%d1
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
4cda2: b288 cmpl %a0,%d1 4cda4: 6500 0096 bcsw 4ce3c <_Heap_Free+0xc4>
- 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;
4cda8: 2628 0004 movel %a0@(4),%d3 4cdac: 74fe moveq #-2,%d2 4cdae: 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);
4cdb0: 45f0 2800 lea %a0@(00000000,%d2:l),%a2
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
4cdb4: b5c0 cmpal %d0,%a2 4cdb6: 6500 0084 bcsw 4ce3c <_Heap_Free+0xc4> 4cdba: b5c1 cmpal %d1,%a2
4cdbc: 627e bhis 4ce3c <_Heap_Free+0xc4> <== 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;
4cdbe: 282a 0004 movel %a2@(4),%d4
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4cdc2: 7a01 moveq #1,%d5 4cdc4: ca84 andl %d4,%d5 4cdc6: 4a05 tstb %d5
4cdc8: 6772 beqs 4ce3c <_Heap_Free+0xc4> <== 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;
4cdca: 7afe moveq #-2,%d5 4cdcc: c885 andl %d5,%d4
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4cdce: b5c1 cmpal %d1,%a2 4cdd0: 6700 00fa beqw 4cecc <_Heap_Free+0x154>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4cdd4: 7a01 moveq #1,%d5 4cdd6: 7c01 moveq #1,%d6 4cdd8: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4cddc: bd85 eorl %d6,%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 ) ) {
4cdde: 7c01 moveq #1,%d6 4cde0: c686 andl %d6,%d3 4cde2: 4a03 tstb %d3
4cde4: 6660 bnes 4ce46 <_Heap_Free+0xce>
uintptr_t const prev_size = block->prev_size;
4cde6: 2610 movel %a0@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4cde8: 91c3 subal %d3,%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
4cdea: b1c0 cmpal %d0,%a0
4cdec: 654e bcss 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN
4cdee: b1c1 cmpal %d1,%a0
4cdf0: 624a bhis 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN
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) ) {
4cdf2: 7001 moveq #1,%d0 4cdf4: c0a8 0004 andl %a0@(4),%d0 4cdf8: 4a00 tstb %d0
4cdfa: 6740 beqs 4ce3c <_Heap_Free+0xc4> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4cdfc: 4a05 tstb %d5 4cdfe: 6700 00d2 beqw 4ced2 <_Heap_Free+0x15a>
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
4ce02: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4ce06: 53a9 0038 subql #1,%a1@(56)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4ce0a: d882 addl %d2,%d4 4ce0c: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ce0e: 7001 moveq #1,%d0
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4ce10: 246a 0008 moveal %a2@(8),%a2 4ce14: 8083 orl %d3,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4ce16: 2183 3800 movel %d3,%a0@(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;
4ce1a: 2140 0004 movel %d0,%a0@(4)
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4ce1e: 254b 000c movel %a3,%a2@(12)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4ce22: 274a 0008 movel %a2,%a3@(8)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4ce26: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4ce2a: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4ce2e: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4ce32: 7001 moveq #1,%d0
return( true );
}
4ce34: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4ce38: 4e5e unlk %fp 4ce3a: 4e75 rts 4ce3c: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4ce40: 4200 clrb %d0
}
4ce42: 4e5e unlk %fp 4ce44: 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 */
4ce46: 4a05 tstb %d5
4ce48: 6736 beqs 4ce80 <_Heap_Free+0x108>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
4ce4a: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + next_block_size;
4ce4e: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ce50: 7001 moveq #1,%d0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4ce52: 246a 0008 moveal %a2@(8),%a2 4ce56: 8084 orl %d4,%d0
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4ce58: 2184 4800 movel %d4,%a0@(00000000,%d4:l)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
4ce5c: 214b 000c movel %a3,%a0@(12)
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4ce60: 214a 0008 movel %a2,%a0@(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;
4ce64: 2140 0004 movel %d0,%a0@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4ce68: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4ce6c: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4ce70: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4ce74: 7001 moveq #1,%d0
new_block->prev = prev;
next->prev = new_block;
4ce76: 2548 000c movel %a0,%a2@(12)
prev->next = new_block;
4ce7a: 2748 0008 movel %a0,%a3@(8) 4ce7e: 60b4 bras 4ce34 <_Heap_Free+0xbc>
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;
4ce80: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ce82: 7cfe moveq #-2,%d6
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;
4ce84: 8a82 orl %d2,%d5
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4ce86: 2669 0008 moveal %a1@(8),%a3 4ce8a: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ce8e: cdaa 0004 andl %d6,%a2@(4)
next_block->prev_size = block_size;
4ce92: 2482 movel %d2,%a2@
/* Statistics */
++stats->free_blocks;
4ce94: 2029 0038 movel %a1@(56),%d0 4ce98: 5280 addql #1,%d0
new_block->next = next;
4ce9a: 214b 0008 movel %a3,%a0@(8)
new_block->prev = block_before;
4ce9e: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
4cea2: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
4cea6: 2748 000c movel %a0,%a3@(12) 4ceaa: 2340 0038 movel %d0,%a1@(56)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
4ceae: b0a9 003c cmpl %a1@(60),%d0 4ceb2: 6300 ff72 blsw 4ce26 <_Heap_Free+0xae>
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4ceb6: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4ceba: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4cebe: 52a9 0050 addql #1,%a1@(80)
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;
4cec2: 2340 003c movel %d0,%a1@(60)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4cec6: 7001 moveq #1,%d0 4cec8: 6000 ff6a braw 4ce34 <_Heap_Free+0xbc>
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4cecc: 4205 clrb %d5 4cece: 6000 ff0e braw 4cdde <_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;
4ced2: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ced4: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ced6: 7cfe moveq #-2,%d6
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;
4ced8: 8a83 orl %d3,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4ceda: 2483 movel %d3,%a2@
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4cedc: 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;
4cede: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4cee2: cdaa 0004 andl %d6,%a2@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4cee6: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4ceea: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4ceee: 52a9 0050 addql #1,%a1@(80) 4cef2: 6000 ff40 braw 4ce34 <_Heap_Free+0xbc>
...
00051d20 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
51d20: 4e56 fff4 linkw %fp,#-12 51d24: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 51d28: 266e 0008 moveal %fp@(8),%a3 51d2c: 246e 000c moveal %fp@(12),%a2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
51d30: 206b 0008 moveal %a3@(8),%a0
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
51d34: 4292 clrl %a2@
info->largest = 0;
51d36: 42aa 0004 clrl %a2@(4)
info->total = 0;
51d3a: 42aa 0008 clrl %a2@(8)
for(the_block = _Heap_Free_list_first(the_heap);
51d3e: b1cb cmpal %a3,%a0
51d40: 672e beqs 51d70 <_Heap_Get_free_information+0x50><== NEVER TAKEN
51d42: 327c 0001 moveaw #1,%a1 51d46: 4281 clrl %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;
51d48: 70fe moveq #-2,%d0
the_block != tail;
the_block = the_block->next)
51d4a: 2409 movel %a1,%d2 51d4c: 5282 addql #1,%d2 51d4e: c0a8 0004 andl %a0@(4),%d0
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
51d52: d280 addl %d0,%d1
if ( info->largest < the_size )
51d54: b0aa 0004 cmpl %a2@(4),%d0
51d58: 6304 blss 51d5e <_Heap_Get_free_information+0x3e>
info->largest = the_size;
51d5a: 2540 0004 movel %d0,%a2@(4)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
51d5e: 2068 0008 moveal %a0@(8),%a0
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
51d62: b1cb cmpal %a3,%a0
51d64: 6704 beqs 51d6a <_Heap_Get_free_information+0x4a>
51d66: 2242 moveal %d2,%a1 51d68: 60de bras 51d48 <_Heap_Get_free_information+0x28> 51d6a: 2541 0008 movel %d1,%a2@(8) 51d6e: 2489 movel %a1,%a2@
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
51d70: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
51d74: 4e5e unlk %fp <== NOT EXECUTED
00051d78 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
51d78: 4e56 fff4 linkw %fp,#-12 51d7c: 206e 0008 moveal %fp@(8),%a0 51d80: 48d7 040c moveml %d2-%d3/%a2,%sp@ 51d84: 246e 000c moveal %fp@(12),%a2
Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block;
51d88: 2428 0024 movel %a0@(36),%d2
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
51d8c: 2268 0020 moveal %a0@(32),%a1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
51d90: 4292 clrl %a2@
the_info->Free.total = 0;
51d92: 42aa 0008 clrl %a2@(8)
the_info->Free.largest = 0;
51d96: 42aa 0004 clrl %a2@(4)
the_info->Used.number = 0;
51d9a: 42aa 000c clrl %a2@(12)
the_info->Used.total = 0;
51d9e: 42aa 0014 clrl %a2@(20)
the_info->Used.largest = 0;
51da2: 42aa 0010 clrl %a2@(16)
while ( the_block != end ) {
51da6: b489 cmpl %a1,%d2
51da8: 6746 beqs 51df0 <_Heap_Get_information+0x78> <== 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;
51daa: 260a movel %a2,%d3 51dac: 0683 0000 000c addil #12,%d3
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
51db2: 2229 0004 movel %a1@(4),%d1 51db6: 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) )
51db8: 204a moveal %a2,%a0 51dba: 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);
51dbc: d3c0 addal %d0,%a1
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;
51dbe: 2229 0004 movel %a1@(4),%d1 51dc2: 0801 0000 btst #0,%d1
51dc6: 6702 beqs 51dca <_Heap_Get_information+0x52>
51dc8: 2043 moveal %d3,%a0
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
51dca: 5290 addql #1,%a0@
info->total += the_size;
51dcc: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
51dd0: b0a8 0004 cmpl %a0@(4),%d0
51dd4: 6304 blss 51dda <_Heap_Get_information+0x62>
info->largest = the_size;
51dd6: 2140 0004 movel %d0,%a0@(4)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
51dda: b3c2 cmpal %d2,%a1
51ddc: 66d8 bnes 51db6 <_Heap_Get_information+0x3e>
51dde: 202a 0014 movel %a2@(20),%d0 51de2: 5080 addql #8,%d0
/* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
51de4: 2540 0014 movel %d0,%a2@(20)
}
51de8: 4cd7 040c moveml %sp@,%d2-%d3/%a2 51dec: 4e5e unlk %fp 51dee: 4e75 rts
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
51df0: 7008 moveq #8,%d0 <== NOT EXECUTED
/* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
51df2: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
}
51df6: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 51dfa: 4e5e unlk %fp <== NOT EXECUTED
...
000476dc <_Heap_Initialize>:
Heap_Control *heap,
void *heap_area_begin_ptr,
uintptr_t heap_area_size,
uintptr_t page_size
)
{
476dc: 4e56 ffe8 linkw %fp,#-24 476e0: 206e 0008 moveal %fp@(8),%a0 476e4: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 476e8: 226e 000c moveal %fp@(12),%a1 476ec: 242e 0010 movel %fp@(16),%d2 476f0: 222e 0014 movel %fp@(20),%d1
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
476f4: 6600 00ce bnew 477c4 <_Heap_Initialize+0xe8>
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
476f8: 2009 movel %a1,%d0 476fa: 5080 addql #8,%d0
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
476fc: 123c 0004 moveb #4,%d1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47700: 2a00 movel %d0,%d5 47702: 7610 moveq #16,%d3 47704: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
47708: 4a84 tstl %d4
4770a: 6704 beqs 47710 <_Heap_Initialize+0x34> <== ALWAYS TAKEN
return value - remainder + alignment;
4770c: d081 addl %d1,%d0 4770e: 9084 subl %d4,%d0
uintptr_t page_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
47710: 2809 movel %a1,%d4 47712: d882 addl %d2,%d4
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
47714: b889 cmpl %a1,%d4 47716: 6500 00bc bcsw 477d4 <_Heap_Initialize+0xf8>
}
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
4771a: 2a00 movel %d0,%d5 4771c: 2440 moveal %d0,%a2 4771e: 9a89 subl %a1,%d5 47720: 518a subql #8,%a2
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
47722: ba82 cmpl %d2,%d5 47724: 6400 00ae bccw 477d4 <_Heap_Initialize+0xf8>
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
47728: 9485 subl %d5,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4772a: 2a02 movel %d2,%d5 4772c: 4c41 5000 remul %d1,%d0,%d5 47730: 9480 subl %d0,%d2
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
47732: b483 cmpl %d3,%d2 47734: 6500 009e bcsw 477d4 <_Heap_Initialize+0xf8>
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
47738: 7a01 moveq #1,%d5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4773a: 47f2 2800 lea %a2@(00000000,%d2:l),%a3
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
4773e: 2002 movel %d2,%d0 47740: 5180 subql #8,%d0
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
47742: 8a82 orl %d2,%d5
return 0;
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
47744: 2481 movel %d1,%a2@
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
47746: 2545 0004 movel %d5,%a2@(4)
* last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
4774a: 2a0a movel %a2,%d5 4774c: 9a8b subl %a3,%d5 4774e: 2745 0004 movel %d5,%a3@(4)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
47752: 2a39 0005 f5a0 movel 5f5a0 <instance>,%d5
* block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size;
47758: 2682 movel %d2,%a3@
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
4775a: 2141 0010 movel %d1,%a0@(16)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
4775e: 7201 moveq #1,%d1
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
first_block->next = _Heap_Free_list_tail( heap );
47760: 2548 0008 movel %a0,%a2@(8)
first_block->prev = _Heap_Free_list_head( heap );
47764: 2548 000c movel %a0,%a2@(12)
last_block->prev_size = first_block_size;
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
47768: 2143 0014 movel %d3,%a0@(20)
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end;
4776c: 2144 001c movel %d4,%a0@(28)
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
47770: 2142 0034 movel %d2,%a0@(52)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
47774: 2145 0028 movel %d5,%a0@(40) 47778: 5285 addql #1,%d5
heap->last_block = last_block;
_Heap_Free_list_head( heap )->next = first_block;
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
4777a: 2142 002c movel %d2,%a0@(44)
stats->free_size = first_block_size;
4777e: 2142 0030 movel %d2,%a0@(48)
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
heap->area_begin = heap_area_begin;
47782: 2149 0018 movel %a1,%a0@(24)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
47786: 2141 0038 movel %d1,%a0@(56)
stats->max_free_blocks = 1;
4778a: 2141 003c movel %d1,%a0@(60)
stats->used_blocks = 0;
4778e: 42a8 0040 clrl %a0@(64)
stats->max_search = 0;
47792: 42a8 0044 clrl %a0@(68)
stats->allocs = 0;
47796: 42a8 0048 clrl %a0@(72)
stats->searches = 0;
4779a: 42a8 004c clrl %a0@(76)
stats->frees = 0;
4779e: 42a8 0050 clrl %a0@(80)
stats->resizes = 0;
477a2: 42a8 0054 clrl %a0@(84)
heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block;
477a6: 214b 0024 movel %a3,%a0@(36)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
477aa: 23c5 0005 f5a0 movel %d5,5f5a0 <instance>
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block;
477b0: 214a 000c movel %a2,%a0@(12)
/* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block;
477b4: 214a 0020 movel %a2,%a0@(32)
heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block;
477b8: 214a 0008 movel %a2,%a0@(8)
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
}
477bc: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 477c0: 4e5e unlk %fp 477c2: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
477c4: 7003 moveq #3,%d0 477c6: c081 andl %d1,%d0
if ( remainder != 0 ) {
477c8: 6704 beqs 477ce <_Heap_Initialize+0xf2>
return value - remainder + alignment;
477ca: 5881 addql #4,%d1 477cc: 9280 subl %d0,%d1
if ( page_size == 0 ) {
page_size = CPU_ALIGNMENT;
} else {
page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT );
if ( page_size < CPU_ALIGNMENT ) {
477ce: 7003 moveq #3,%d0 477d0: b081 cmpl %d1,%d0
477d2: 650a bcss 477de <_Heap_Initialize+0x102>
);
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
477d4: 4280 clrl %d0
}
477d6: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 477da: 4e5e unlk %fp 477dc: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
477de: 7610 moveq #16,%d3 477e0: 4c41 3000 remul %d1,%d0,%d3
if ( remainder != 0 ) {
477e4: 4a80 tstl %d0
477e6: 671e beqs 47806 <_Heap_Initialize+0x12a>
return value - remainder + alignment;
477e8: 2601 movel %d1,%d3 477ea: 0683 0000 0010 addil #16,%d3 477f0: 9680 subl %d0,%d3
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
477f2: 2009 movel %a1,%d0 477f4: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
477f6: 2a00 movel %d0,%d5 477f8: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
477fc: 4a84 tstl %d4 477fe: 6700 ff10 beqw 47710 <_Heap_Initialize+0x34> 47802: 6000 ff08 braw 4770c <_Heap_Initialize+0x30> 47806: 2009 movel %a1,%d0 47808: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4780a: 2a00 movel %d0,%d5
if ( remainder != 0 ) {
4780c: 7610 moveq #16,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4780e: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
47812: 4a84 tstl %d4 47814: 6700 fefa beqw 47710 <_Heap_Initialize+0x34> 47818: 6000 fef2 braw 4770c <_Heap_Initialize+0x30>
0005c910 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5c910: 4e56 0000 linkw %fp,#0 5c914: 202e 000c movel %fp@(12),%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 )
5c918: 2040 moveal %d0,%a0 5c91a: 5188 subql #8,%a0 5c91c: 226e 0008 moveal %fp@(8),%a1 5c920: 2f02 movel %d2,%sp@- 5c922: 2400 movel %d0,%d2 5c924: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5c92a: 91c1 subal %d1,%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;
5c92c: 2229 0020 movel %a1@(32),%d1
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
5c930: b288 cmpl %a0,%d1
5c932: 6238 bhis 5c96c <_Heap_Size_of_alloc_area+0x5c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5c934: 2269 0024 moveal %a1@(36),%a1
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
5c938: b3c8 cmpal %a0,%a1
5c93a: 6530 bcss 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5c93c: 74fe moveq #-2,%d2 5c93e: c4a8 0004 andl %a0@(4),%d2 5c942: d1c2 addal %d2,%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
5c944: b1c1 cmpal %d1,%a0
5c946: 6524 bcss 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
5c948: b1c9 cmpal %a1,%a0
5c94a: 6220 bhis 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
5c94c: 7201 moveq #1,%d1 5c94e: c2a8 0004 andl %a0@(4),%d1 5c952: 4a01 tstb %d1
5c954: 6716 beqs 5c96c <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5c956: 7204 moveq #4,%d1 5c958: 9280 subl %d0,%d1 5c95a: 2001 movel %d1,%d0 5c95c: d088 addl %a0,%d0 5c95e: 226e 0010 moveal %fp@(16),%a1
return true;
}
5c962: 241f movel %sp@+,%d2 5c964: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5c966: 2280 movel %d0,%a1@ 5c968: 7001 moveq #1,%d0
return true;
}
5c96a: 4e75 rts 5c96c: 241f movel %sp@+,%d2 5c96e: 4e5e unlk %fp
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
5c970: 4200 clrb %d0 <== NOT EXECUTED
}
00048438 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48438: 4e56 ffc4 linkw %fp,#-60 4843c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48440: 246e 0008 moveal %fp@(8),%a2
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
48444: 4bfa 049c lea %pc@(488e2 <_Heap_Walk_print>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48448: 242e 000c movel %fp@(12),%d2
uintptr_t const page_size = heap->page_size;
4844c: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
48450: 282a 0014 movel %a2@(20),%d4
Heap_Block *const last_block = heap->last_block;
48454: 2a2a 0024 movel %a2@(36),%d5
Heap_Block *block = heap->first_block;
48458: 266a 0020 moveal %a2@(32),%a3
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
4845c: 4a2e 0013 tstb %fp@(19)
48460: 6604 bnes 48466 <_Heap_Walk+0x2e>
48462: 4bfa ffcc lea %pc@(48430 <_Heap_Walk_print_nothing>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
48466: 7003 moveq #3,%d0 48468: b0b9 0006 2486 cmpl 62486 <_System_state_Current>,%d0
4846e: 670c beqs 4847c <_Heap_Walk+0x44>
block = next_block;
}
return true;
}
48470: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
48476: 7001 moveq #1,%d0
block = next_block;
}
return true;
}
48478: 4e5e unlk %fp 4847a: 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)(
4847c: 2f2a 000c movel %a2@(12),%sp@- 48480: 2f2a 0008 movel %a2@(8),%sp@- 48484: 2f05 movel %d5,%sp@- 48486: 2f0b movel %a3,%sp@- 48488: 2f2a 001c movel %a2@(28),%sp@- 4848c: 2f2a 0018 movel %a2@(24),%sp@- 48490: 2f04 movel %d4,%sp@- 48492: 2f03 movel %d3,%sp@- 48494: 4879 0005 e66e pea 5e66e <_Status_Object_name_errors_to_status+0x14> 4849a: 42a7 clrl %sp@- 4849c: 2f02 movel %d2,%sp@- 4849e: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
484a0: 4fef 002c lea %sp@(44),%sp 484a4: 4a83 tstl %d3 484a6: 6700 0158 beqw 48600 <_Heap_Walk+0x1c8>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
484aa: 7003 moveq #3,%d0 484ac: c083 andl %d3,%d0 484ae: 6600 016e bnew 4861e <_Heap_Walk+0x1e6>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
484b2: 2204 movel %d4,%d1 484b4: 4c43 1000 remul %d3,%d0,%d1 484b8: 4a80 tstl %d0 484ba: 6600 017a bnew 48636 <_Heap_Walk+0x1fe>
);
return false;
}
if (
484be: 200b movel %a3,%d0 484c0: 5080 addql #8,%d0 484c2: 4c43 0001 remul %d3,%d1,%d0 484c6: 4a81 tstl %d1 484c8: 6600 0184 bnew 4864e <_Heap_Walk+0x216>
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;
484cc: 2c2b 0004 movel %a3@(4),%d6
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
484d0: 7201 moveq #1,%d1 484d2: c286 andl %d6,%d1 484d4: 2d46 ffec movel %d6,%fp@(-20) 484d8: 4a01 tstb %d1 484da: 6700 018a beqw 48666 <_Heap_Walk+0x22e>
);
return false;
}
if ( first_block->prev_size != page_size ) {
484de: 2053 moveal %a3@,%a0 484e0: b1c3 cmpal %d3,%a0 484e2: 6600 00e2 bnew 485c6 <_Heap_Walk+0x18e>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
484e6: 2045 moveal %d5,%a0 484e8: 7cfe moveq #-2,%d6 484ea: 7001 moveq #1,%d0 484ec: cca8 0004 andl %a0@(4),%d6 484f0: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 484f4: 4a00 tstb %d0 484f6: 6700 0184 beqw 4867c <_Heap_Walk+0x244>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
484fa: 2c2a 0010 movel %a2@(16),%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
484fe: 206a 0008 moveal %a2@(8),%a0 48502: 2d46 fffc movel %d6,%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 ) {
48506: b1ca cmpal %a2,%a0 48508: 6700 0198 beqw 486a2 <_Heap_Walk+0x26a>
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;
4850c: 286a 0020 moveal %a2@(32),%a4
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
48510: b1cc cmpal %a4,%a0 48512: 6500 00cc bcsw 485e0 <_Heap_Walk+0x1a8>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
48516: 2e2a 0024 movel %a2@(36),%d7 4851a: 2d47 fff8 movel %d7,%fp@(-8)
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
4851e: be88 cmpl %a0,%d7 48520: 6500 00be bcsw 485e0 <_Heap_Walk+0x1a8>
);
return false;
}
if (
48524: 2248 moveal %a0,%a1 48526: 5089 addql #8,%a1 48528: 2009 movel %a1,%d0 4852a: 4c46 0007 remul %d6,%d7,%d0 4852e: 2d49 fff4 movel %a1,%fp@(-12) 48532: 4a87 tstl %d7 48534: 6600 0378 bnew 488ae <_Heap_Walk+0x476>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
48538: 7cfe moveq #-2,%d6 4853a: 7001 moveq #1,%d0 4853c: cca8 0004 andl %a0@(4),%d6 48540: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 48544: 6600 0382 bnew 488c8 <_Heap_Walk+0x490>
);
return false;
}
if ( free_block->prev != prev_block ) {
48548: 2c28 000c movel %a0@(12),%d6 4854c: b5c6 cmpal %d6,%a2
4854e: 6654 bnes 485a4 <_Heap_Walk+0x16c> <== NEVER TAKEN
48550: 2e2e ffec movel %fp@(-20),%d7 48554: 2243 moveal %d3,%a1 48556: 2d47 fff4 movel %d7,%fp@(-12) 4855a: 2e0c movel %a4,%d7 4855c: 2841 moveal %d1,%a4 4855e: 2d44 fff0 movel %d4,%fp@(-16)
(*printer)(
48562: 2008 movel %a0,%d0
return false;
}
prev_block = free_block;
free_block = free_block->next;
48564: 2068 0008 moveal %a0@(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 ) {
48568: b1c6 cmpal %d6,%a0 4856a: 6700 0126 beqw 48692 <_Heap_Walk+0x25a> 4856e: b1c7 cmpal %d7,%a0
48570: 656e bcss 485e0 <_Heap_Walk+0x1a8>
);
return false;
}
if (
48572: 2208 movel %a0,%d1 48574: 5081 addql #8,%d1 48576: b1ee fff8 cmpal %fp@(-8),%a0
4857a: 6264 bhis 485e0 <_Heap_Walk+0x1a8> <== NEVER TAKEN
4857c: 282e fffc movel %fp@(-4),%d4 48580: 4c44 1003 remul %d4,%d3,%d1 48584: 4a83 tstl %d3 48586: 6600 0326 bnew 488ae <_Heap_Walk+0x476>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4858a: 72fe moveq #-2,%d1 4858c: 7601 moveq #1,%d3 4858e: c2a8 0004 andl %a0@(4),%d1 48592: c6b0 1804 andl %a0@(00000004,%d1:l),%d3 48596: 6600 0330 bnew 488c8 <_Heap_Walk+0x490>
);
return false;
}
if ( free_block->prev != prev_block ) {
4859a: 2228 000c movel %a0@(12),%d1 4859e: b081 cmpl %d1,%d0
485a0: 67c0 beqs 48562 <_Heap_Walk+0x12a>
485a2: 2c01 movel %d1,%d6
(*printer)(
485a4: 2f06 movel %d6,%sp@- 485a6: 2f08 movel %a0,%sp@- 485a8: 4879 0005 e85f pea 5e85f <_Status_Object_name_errors_to_status+0x205>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
485ae: 4878 0001 pea 1 <ADD> 485b2: 2f02 movel %d2,%sp@- 485b4: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
485b6: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
485ba: 4200 clrb %d0
block = next_block;
}
return true;
}
485bc: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 485c2: 4e5e unlk %fp 485c4: 4e75 rts
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
485c6: 2f03 movel %d3,%sp@- 485c8: 2f08 movel %a0,%sp@- 485ca: 4879 0005 e7b3 pea 5e7b3 <_Status_Object_name_errors_to_status+0x159>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
485d0: 4878 0001 pea 1 <ADD> 485d4: 2f02 movel %d2,%sp@- 485d6: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
485d8: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
485dc: 4200 clrb %d0 485de: 60dc bras 485bc <_Heap_Walk+0x184>
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)(
485e0: 2f08 movel %a0,%sp@- 485e2: 4879 0005 e7f3 pea 5e7f3 <_Status_Object_name_errors_to_status+0x199>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
485e8: 4878 0001 pea 1 <ADD> 485ec: 2f02 movel %d2,%sp@- 485ee: 4e95 jsr %a5@ 485f0: 4fef 0010 lea %sp@(16),%sp 485f4: 4200 clrb %d0
block = next_block;
}
return true;
}
485f6: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 485fc: 4e5e unlk %fp 485fe: 4e75 rts
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
48600: 4879 0005 e6ff pea 5e6ff <_Status_Object_name_errors_to_status+0xa5>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48606: 4878 0001 pea 1 <ADD> 4860a: 2f02 movel %d2,%sp@- 4860c: 4e95 jsr %a5@ 4860e: 4fef 000c lea %sp@(12),%sp 48612: 4200 clrb %d0
block = next_block;
}
return true;
}
48614: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4861a: 4e5e unlk %fp 4861c: 4e75 rts
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
4861e: 2f03 movel %d3,%sp@- 48620: 4879 0005 e712 pea 5e712 <_Status_Object_name_errors_to_status+0xb8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48626: 4878 0001 pea 1 <ADD> 4862a: 2f02 movel %d2,%sp@- 4862c: 4e95 jsr %a5@ 4862e: 4fef 0010 lea %sp@(16),%sp 48632: 4200 clrb %d0 48634: 60c0 bras 485f6 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
48636: 2f04 movel %d4,%sp@- 48638: 4879 0005 e730 pea 5e730 <_Status_Object_name_errors_to_status+0xd6>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4863e: 4878 0001 pea 1 <ADD> 48642: 2f02 movel %d2,%sp@- 48644: 4e95 jsr %a5@ 48646: 4fef 0010 lea %sp@(16),%sp 4864a: 4200 clrb %d0 4864c: 60a8 bras 485f6 <_Heap_Walk+0x1be>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
4864e: 2f0b movel %a3,%sp@- 48650: 4879 0005 e754 pea 5e754 <_Status_Object_name_errors_to_status+0xfa>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48656: 4878 0001 pea 1 <ADD> 4865a: 2f02 movel %d2,%sp@- 4865c: 4e95 jsr %a5@ 4865e: 4fef 0010 lea %sp@(16),%sp 48662: 4200 clrb %d0 48664: 6090 bras 485f6 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48666: 4879 0005 e785 pea 5e785 <_Status_Object_name_errors_to_status+0x12b> 4866c: 4878 0001 pea 1 <ADD> 48670: 2f02 movel %d2,%sp@- 48672: 4e95 jsr %a5@ 48674: 4fef 000c lea %sp@(12),%sp 48678: 4200 clrb %d0 4867a: 6098 bras 48614 <_Heap_Walk+0x1dc>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
4867c: 4879 0005 e7de pea 5e7de <_Status_Object_name_errors_to_status+0x184>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48682: 4878 0001 pea 1 <ADD> 48686: 2f02 movel %d2,%sp@- 48688: 4e95 jsr %a5@ 4868a: 4fef 000c lea %sp@(12),%sp 4868e: 4200 clrb %d0 48690: 6082 bras 48614 <_Heap_Walk+0x1dc> 48692: 202e fff4 movel %fp@(-12),%d0 48696: 2609 movel %a1,%d3 48698: 220c movel %a4,%d1 4869a: 282e fff0 movel %fp@(-16),%d4 4869e: 2d40 ffec movel %d0,%fp@(-20)
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
486a2: b7c5 cmpal %d5,%a3 486a4: 6700 fdca beqw 48470 <_Heap_Walk+0x38> 486a8: 2c2e ffec movel %fp@(-20),%d6 486ac: 2d43 fff8 movel %d3,%fp@(-8)
- 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: 76fe moveq #-2,%d3 486b2: cc83 andl %d3,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
486b4: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
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;
if ( prev_used ) {
486b8: 4a01 tstb %d1 486ba: 6700 0126 beqw 487e2 <_Heap_Walk+0x3aa>
(*printer)(
486be: 2f06 movel %d6,%sp@- 486c0: 2f0b movel %a3,%sp@- 486c2: 4879 0005 e891 pea 5e891 <_Status_Object_name_errors_to_status+0x237> 486c8: 42a7 clrl %sp@- 486ca: 2f02 movel %d2,%sp@- 486cc: 4e95 jsr %a5@ 486ce: 4fef 0014 lea %sp@(20),%sp
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
486d2: b9ea 0020 cmpal %a2@(32),%a4 486d6: 6500 00d0 bcsw 487a8 <_Heap_Walk+0x370> 486da: b9ea 0024 cmpal %a2@(36),%a4 486de: 6200 00c8 bhiw 487a8 <_Heap_Walk+0x370>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
486e2: 2e2e fff8 movel %fp@(-8),%d7 486e6: 2206 movel %d6,%d1 486e8: 4c47 1000 remul %d7,%d0,%d1 486ec: 4a80 tstl %d0 486ee: 6600 0162 bnew 48852 <_Heap_Walk+0x41a>
);
return false;
}
if ( block_size < min_block_size ) {
486f2: bc84 cmpl %d4,%d6 486f4: 6500 0178 bcsw 4886e <_Heap_Walk+0x436>
);
return false;
}
if ( next_block_begin <= block_begin ) {
486f8: b9cb cmpal %a3,%a4 486fa: 6300 0196 blsw 48892 <_Heap_Walk+0x45a>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
486fe: 7001 moveq #1,%d0 48700: c0ac 0004 andl %a4@(4),%d0 48704: 4a00 tstb %d0 48706: 6600 00bc bnew 487c4 <_Heap_Walk+0x38c>
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;
4870a: 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;
4870e: 7cfe moveq #-2,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
48710: 2e0b movel %a3,%d7
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
48712: 43f9 0005 e987 lea 5e987 <_Status_Object_name_errors_to_status+0x32d>,%a1
- 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;
48718: cc83 andl %d3,%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4871a: 206a 0008 moveal %a2@(8),%a0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4871e: de86 addl %d6,%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)(
48720: 222b 0008 movel %a3@(8),%d1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48724: 2d48 fffc movel %a0,%fp@(-4)
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
48728: b2aa 000c cmpl %a2@(12),%d1
4872c: 6710 beqs 4873e <_Heap_Walk+0x306>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
4872e: 43f9 0005 e991 lea 5e991 <_Status_Object_name_errors_to_status+0x337>,%a1 48734: b5c1 cmpal %d1,%a2
48736: 6706 beqs 4873e <_Heap_Walk+0x306>
48738: 43f9 0005 e5cc lea 5e5cc <rtems_filesystem_default_pathconf+0x40>,%a1
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)(
4873e: 202b 000c movel %a3@(12),%d0 48742: 41f9 0005 e99b lea 5e99b <_Status_Object_name_errors_to_status+0x341>,%a0 48748: b0ae fffc cmpl %fp@(-4),%d0
4874c: 6710 beqs 4875e <_Heap_Walk+0x326>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
4874e: 41f9 0005 e9a6 lea 5e9a6 <_Status_Object_name_errors_to_status+0x34c>,%a0 48754: b5c0 cmpal %d0,%a2
48756: 6706 beqs 4875e <_Heap_Walk+0x326>
48758: 41f9 0005 e5cc lea 5e5cc <rtems_filesystem_default_pathconf+0x40>,%a0
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)(
4875e: 2f09 movel %a1,%sp@- 48760: 2f01 movel %d1,%sp@- 48762: 2f08 movel %a0,%sp@- 48764: 2f00 movel %d0,%sp@- 48766: 2f0b movel %a3,%sp@- 48768: 4879 0005 e9b0 pea 5e9b0 <_Status_Object_name_errors_to_status+0x356> 4876e: 42a7 clrl %sp@- 48770: 2f02 movel %d2,%sp@- 48772: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
48774: 4fef 0020 lea %sp@(32),%sp 48778: 2247 moveal %d7,%a1 4877a: 2011 movel %a1@,%d0 4877c: b086 cmpl %d6,%d0 4877e: 6700 0082 beqw 48802 <_Heap_Walk+0x3ca>
(*printer)(
48782: 2f07 movel %d7,%sp@- 48784: 2f00 movel %d0,%sp@- 48786: 2f06 movel %d6,%sp@- 48788: 2f0b movel %a3,%sp@- 4878a: 4879 0005 e9dc pea 5e9dc <_Status_Object_name_errors_to_status+0x382> 48790: 4878 0001 pea 1 <ADD> 48794: 2f02 movel %d2,%sp@- 48796: 4e95 jsr %a5@ 48798: 4fef 001c lea %sp@(28),%sp
block = next_block;
}
return true;
}
4879c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
487a2: 4200 clrb %d0
block = next_block;
}
return true;
}
487a4: 4e5e unlk %fp 487a6: 4e75 rts
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
487a8: 2f0c movel %a4,%sp@- 487aa: 2f0b movel %a3,%sp@- 487ac: 4879 0005 e8cd pea 5e8cd <_Status_Object_name_errors_to_status+0x273>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
487b2: 4878 0001 pea 1 <ADD> 487b6: 2f02 movel %d2,%sp@- 487b8: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
487ba: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
487be: 4200 clrb %d0 487c0: 6000 fdfa braw 485bc <_Heap_Walk+0x184>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
487c4: b9c5 cmpal %d5,%a4 487c6: 6700 fca8 beqw 48470 <_Heap_Walk+0x38>
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 ) {
487ca: 2c2c 0004 movel %a4@(4),%d6 487ce: 7201 moveq #1,%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;
487d0: 76fe moveq #-2,%d3 487d2: 264c moveal %a4,%a3 487d4: c286 andl %d6,%d1 487d6: cc83 andl %d3,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
487d8: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
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;
if ( prev_used ) {
487dc: 4a01 tstb %d1 487de: 6600 fede bnew 486be <_Heap_Walk+0x286>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
487e2: 2f13 movel %a3@,%sp@- 487e4: 2f06 movel %d6,%sp@- 487e6: 2f0b movel %a3,%sp@- 487e8: 4879 0005 e8a8 pea 5e8a8 <_Status_Object_name_errors_to_status+0x24e> 487ee: 42a7 clrl %sp@- 487f0: 2f02 movel %d2,%sp@- 487f2: 4e95 jsr %a5@ 487f4: 4fef 0018 lea %sp@(24),%sp
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
487f8: b9ea 0020 cmpal %a2@(32),%a4
487fc: 65aa bcss 487a8 <_Heap_Walk+0x370> <== NEVER TAKEN
487fe: 6000 feda braw 486da <_Heap_Walk+0x2a2>
);
return false;
}
if ( !prev_used ) {
48802: 7001 moveq #1,%d0 48804: c680 andl %d0,%d3 48806: 4a03 tstb %d3
48808: 672e beqs 48838 <_Heap_Walk+0x400>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4880a: 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 ) {
4880e: b5c8 cmpal %a0,%a2
48810: 670c beqs 4881e <_Heap_Walk+0x3e6> <== NEVER TAKEN
if ( free_block == block ) {
48812: b7c8 cmpal %a0,%a3
48814: 67ae beqs 487c4 <_Heap_Walk+0x38c>
return true;
}
free_block = free_block->next;
48816: 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 ) {
4881a: b5c8 cmpal %a0,%a2
4881c: 66f4 bnes 48812 <_Heap_Walk+0x3da>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4881e: 2f0b movel %a3,%sp@- 48820: 4879 0005 ea44 pea 5ea44 <_Status_Object_name_errors_to_status+0x3ea> 48826: 4878 0001 pea 1 <ADD> 4882a: 2f02 movel %d2,%sp@- 4882c: 4e95 jsr %a5@ 4882e: 4fef 0010 lea %sp@(16),%sp 48832: 4200 clrb %d0 48834: 6000 fdc0 braw 485f6 <_Heap_Walk+0x1be>
return false;
}
if ( !prev_used ) {
(*printer)(
48838: 2f0b movel %a3,%sp@- 4883a: 4879 0005 ea15 pea 5ea15 <_Status_Object_name_errors_to_status+0x3bb>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48840: 4878 0001 pea 1 <ADD> 48844: 2f02 movel %d2,%sp@- 48846: 4e95 jsr %a5@ 48848: 4fef 0010 lea %sp@(16),%sp 4884c: 4200 clrb %d0 4884e: 6000 fda6 braw 485f6 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
48852: 2f06 movel %d6,%sp@- 48854: 2f0b movel %a3,%sp@- 48856: 4879 0005 e8fa pea 5e8fa <_Status_Object_name_errors_to_status+0x2a0>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4885c: 4878 0001 pea 1 <ADD> 48860: 2f02 movel %d2,%sp@- 48862: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48864: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48868: 4200 clrb %d0 4886a: 6000 fd50 braw 485bc <_Heap_Walk+0x184>
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
4886e: 2f04 movel %d4,%sp@- 48870: 2f06 movel %d6,%sp@- 48872: 2f0b movel %a3,%sp@- 48874: 4879 0005 e928 pea 5e928 <_Status_Object_name_errors_to_status+0x2ce> 4887a: 4878 0001 pea 1 <ADD> 4887e: 2f02 movel %d2,%sp@- 48880: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
48882: 4fef 0018 lea %sp@(24),%sp
block = next_block;
}
return true;
}
48886: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
4888c: 4200 clrb %d0
block = next_block;
}
return true;
}
4888e: 4e5e unlk %fp 48890: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48892: 2f0c movel %a4,%sp@- 48894: 2f0b movel %a3,%sp@- 48896: 4879 0005 e953 pea 5e953 <_Status_Object_name_errors_to_status+0x2f9> 4889c: 4878 0001 pea 1 <ADD> 488a0: 2f02 movel %d2,%sp@- 488a2: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
488a4: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
488a8: 4200 clrb %d0 488aa: 6000 fd10 braw 485bc <_Heap_Walk+0x184>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
488ae: 2f08 movel %a0,%sp@- 488b0: 4879 0005 e813 pea 5e813 <_Status_Object_name_errors_to_status+0x1b9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
488b6: 4878 0001 pea 1 <ADD> 488ba: 2f02 movel %d2,%sp@- 488bc: 4e95 jsr %a5@ 488be: 4fef 0010 lea %sp@(16),%sp 488c2: 4200 clrb %d0 488c4: 6000 fd30 braw 485f6 <_Heap_Walk+0x1be>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
488c8: 2f08 movel %a0,%sp@- 488ca: 4879 0005 e843 pea 5e843 <_Status_Object_name_errors_to_status+0x1e9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
488d0: 4878 0001 pea 1 <ADD> 488d4: 2f02 movel %d2,%sp@- 488d6: 4e95 jsr %a5@ 488d8: 4fef 0010 lea %sp@(16),%sp 488dc: 4200 clrb %d0 488de: 6000 fd16 braw 485f6 <_Heap_Walk+0x1be>
00046e3c <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
46e3c: 4e56 0000 linkw %fp,#0 46e40: 2f0a movel %a2,%sp@- 46e42: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e44: 4ab9 0006 0042 tstl 60042 <_IO_Number_of_drivers>
46e4a: 671e beqs 46e6a <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
46e4c: 4282 clrl %d2 46e4e: 45f9 0004 c854 lea 4c854 <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
46e54: 42a7 clrl %sp@- 46e56: 42a7 clrl %sp@- 46e58: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e5a: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
46e5c: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e5e: 4fef 000c lea %sp@(12),%sp 46e62: b4b9 0006 0042 cmpl 60042 <_IO_Number_of_drivers>,%d2
46e68: 65ea bcss 46e54 <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
46e6a: 242e fff8 movel %fp@(-8),%d2 46e6e: 246e fffc moveal %fp@(-4),%a2
46e72: 4e5e unlk %fp <== NOT EXECUTED
00046e76 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
46e76: 4e56 fff0 linkw %fp,#-16 46e7a: 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;
46e7e: 2639 0005 e6d6 movel 5e6d6 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
46e84: 2439 0005 e6d2 movel 5e6d2 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
46e8a: 2839 0005 e6ce movel 5e6ce <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 )
46e90: b882 cmpl %d2,%d4
46e92: 6216 bhis 46eaa <_IO_Manager_initialization+0x34>
* 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;
46e94: 23c3 0006 0046 movel %d3,60046 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
46e9a: 23c2 0006 0042 movel %d2,60042 <_IO_Number_of_drivers>
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
46ea0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46ea6: 4e5e unlk %fp 46ea8: 4e75 rts
/*
* 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 *)
46eaa: 2004 movel %d4,%d0 46eac: 2a04 movel %d4,%d5 46eae: e788 lsll #3,%d0 46eb0: eb8d lsll #5,%d5 46eb2: 9a80 subl %d0,%d5 46eb4: 2f05 movel %d5,%sp@- 46eb6: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46ebc: 2f05 movel %d5,%sp@- 46ebe: 42a7 clrl %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;
46ec0: 23c4 0006 0042 movel %d4,60042 <_IO_Number_of_drivers>
memset(
46ec6: 2f00 movel %d0,%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 *)
46ec8: 23c0 0006 0046 movel %d0,60046 <_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(
46ece: 4eb9 0004 fa48 jsr 4fa48 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46ed4: 4fef 0010 lea %sp@(16),%sp 46ed8: 4a82 tstl %d2
46eda: 67c4 beqs 46ea0 <_IO_Manager_initialization+0x2a><== NEVER TAKEN
46edc: 2839 0006 0046 movel 60046 <_IO_Driver_address_table>,%d4 46ee2: 4280 clrl %d0 46ee4: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
46ee6: 2243 moveal %d3,%a1 46ee8: 2044 moveal %d4,%a0 46eea: d3c0 addal %d0,%a1 46eec: 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++ )
46eee: 5281 addql #1,%d1 46ef0: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46ef6: 20d9 movel %a1@+,%a0@+ 46ef8: 20d9 movel %a1@+,%a0@+ 46efa: 20d9 movel %a1@+,%a0@+ 46efc: 20d9 movel %a1@+,%a0@+ 46efe: 20d9 movel %a1@+,%a0@+ 46f00: 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++ )
46f02: b282 cmpl %d2,%d1
46f04: 649a bccs 46ea0 <_IO_Manager_initialization+0x2a>
_IO_Driver_address_table[index] = driver_table[index];
46f06: 2243 moveal %d3,%a1 46f08: 2044 moveal %d4,%a0 46f0a: d3c0 addal %d0,%a1 46f0c: 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++ )
46f0e: 5281 addql #1,%d1 46f10: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46f16: 20d9 movel %a1@+,%a0@+ 46f18: 20d9 movel %a1@+,%a0@+ 46f1a: 20d9 movel %a1@+,%a0@+ 46f1c: 20d9 movel %a1@+,%a0@+ 46f1e: 20d9 movel %a1@+,%a0@+ 46f20: 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++ )
46f22: b282 cmpl %d2,%d1
46f24: 65c0 bcss 46ee6 <_IO_Manager_initialization+0x70><== NEVER TAKEN
46f26: 6000 ff78 braw 46ea0 <_IO_Manager_initialization+0x2a>
...
00047a48 <_Internal_error_Occurred>:
_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 );
47a48: 4280 clrl %d0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47a4a: 4e56 0000 linkw %fp,#0 47a4e: 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 );
47a52: 1001 moveb %d1,%d0 47a54: 2040 moveal %d0,%a0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47a56: 2f03 movel %d3,%sp@- 47a58: 202e 0008 movel %fp@(8),%d0 47a5c: 2f02 movel %d2,%sp@- 47a5e: 242e 0010 movel %fp@(16),%d2
_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 );
47a62: 2f02 movel %d2,%sp@-
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
47a64: 13c1 0005 fea6 moveb %d1,5fea6 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47a6a: 2f08 movel %a0,%sp@-
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
47a6c: 23c0 0005 fea2 movel %d0,5fea2 <_Internal_errors_What_happened>
_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 );
47a72: 2f00 movel %d0,%sp@-
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
47a74: 23c2 0005 fea8 movel %d2,5fea8 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
47a7a: 4eb9 0004 9802 jsr 49802 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47a80: 307c 0700 moveaw #1792,%a0 47a84: 2608 movel %a0,%d3 47a86: 40c0 movew %sr,%d0 47a88: 8083 orl %d3,%d0 47a8a: 46c0 movew %d0,%sr
47a8c: 2002 movel %d2,%d0 <== NOT EXECUTED 47a8e: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47a94: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47a96: 7005 moveq #5,%d0 47a98: 4fef 000c lea %sp@(12),%sp 47a9c: 23c0 0005 ff7e movel %d0,5ff7e <_System_state_Current> 47aa2: 60fe bras 47aa2 <_Internal_error_Occurred+0x5a>
00047b0c <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47b0c: 4e56 fff0 linkw %fp,#-16 47b10: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47b14: 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 )
47b18: 4aaa 0014 tstl %a2@(20)
47b1c: 660c bnes 47b2a <_Objects_Allocate+0x1e> <== ALWAYS TAKEN
47b1e: 4280 clrl %d0 <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
47b20: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b26: 4e5e unlk %fp 47b28: 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 );
47b2a: 240a movel %a2,%d2 47b2c: 0682 0000 001c addil #28,%d2 47b32: 47f9 0004 7174 lea 47174 <_Chain_Get>,%a3 47b38: 2f02 movel %d2,%sp@- 47b3a: 4e93 jsr %a3@
if ( information->auto_extend ) {
47b3c: 588f addql #4,%sp 47b3e: 4a2a 0010 tstb %a2@(16)
47b42: 67dc beqs 47b20 <_Objects_Allocate+0x14>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47b44: 4a80 tstl %d0
47b46: 6738 beqs 47b80 <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47b48: 2040 moveal %d0,%a0 47b4a: 4281 clrl %d1 47b4c: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47b4e: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47b50: 362a 0008 movew %a2@(8),%d3 47b54: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
47b58: 306a 0028 moveaw %a2@(40),%a0
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47b5c: 342a 0012 movew %a2@(18),%d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47b60: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
47b62: 5388 subql #1,%a0
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47b64: 4c42 1001 remul %d2,%d1,%d1
information->inactive--;
47b68: 3548 0028 movew %a0,%a2@(40)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47b6c: 206a 002a moveal %a2@(42),%a0 47b70: e589 lsll #2,%d1
information->inactive--;
}
}
return the_object;
}
47b72: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b78: 4e5e unlk %fp
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47b7a: d1c1 addal %d1,%a0 47b7c: 5390 subql #1,%a0@
information->inactive--;
}
}
return the_object;
}
47b7e: 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 );
47b80: 2f0a movel %a2,%sp@- 47b82: 4eb9 0004 7bc8 jsr 47bc8 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47b88: 2f02 movel %d2,%sp@- 47b8a: 4e93 jsr %a3@
}
if ( the_object ) {
47b8c: 508f addql #8,%sp 47b8e: 4a80 tstl %d0
47b90: 66b6 bnes 47b48 <_Objects_Allocate+0x3c>
information->inactive--;
}
}
return the_object;
}
47b92: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47b98: 4e5e unlk %fp <== NOT EXECUTED
00047b9c <_Objects_Close>:
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47b9c: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
47b9e: 4e56 0000 linkw %fp,#0 47ba2: 226e 000c moveal %fp@(12),%a1 47ba6: 206e 0008 moveal %fp@(8),%a0 47baa: 2f0a movel %a2,%sp@- 47bac: 2468 0018 moveal %a0@(24),%a2 47bb0: 3029 000a movew %a1@(10),%d0 47bb4: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47bb8: 2d49 000c movel %a1,%fp@(12)
}
47bbc: 245f moveal %sp@+,%a2 47bbe: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47bc0: 4ef9 0004 8120 jmp 48120 <_Objects_Namespace_remove>
...
00047bc8 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
47bc8: 4e56 ffcc linkw %fp,#-52 47bcc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47bd0: 246e 0008 moveal %fp@(8),%a2
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
47bd4: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47bd6: 206a 002e moveal %a2@(46),%a0
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
47bda: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47bde: 4a88 tstl %a0 47be0: 6700 022c beqw 47e0e <_Objects_Extend_information+0x246>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
47be4: 322a 000e movew %a2@(14),%d1 47be8: 302a 0012 movew %a2@(18),%d0 47bec: 3801 movew %d1,%d4 47bee: 0284 0000 ffff andil #65535,%d4 47bf4: 88c0 divuw %d0,%d4 47bf6: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47bfc: 6700 0224 beqw 47e22 <_Objects_Extend_information+0x25a>
if ( information->object_blocks[ block ] == NULL )
47c00: 4a90 tstl %a0@ 47c02: 6700 021e beqw 47e22 <_Objects_Extend_information+0x25a> 47c06: 5888 addql #4,%a0 47c08: 2605 movel %d5,%d3 47c0a: 4282 clrl %d2 47c0c: 0280 0000 ffff andil #65535,%d0
break;
else
index_base += information->allocation_size;
47c12: 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++ ) {
47c14: 5282 addql #1,%d2 47c16: b484 cmpl %d4,%d2
47c18: 6404 bccs 47c1e <_Objects_Extend_information+0x56>
if ( information->object_blocks[ block ] == NULL )
47c1a: 4a98 tstl %a0@+
47c1c: 66f4 bnes 47c12 <_Objects_Extend_information+0x4a>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
47c1e: 0281 0000 ffff andil #65535,%d1 47c24: 2641 moveal %d1,%a3 47c26: 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 ) {
47c28: b7fc 0000 ffff cmpal #65535,%a3 47c2e: 6200 0186 bhiw 47db6 <_Objects_Extend_information+0x1ee>
/*
* 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;
47c32: 41ea 0014 lea %a2@(20),%a0 47c36: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47c3a: 4a2a 0010 tstb %a2@(16) 47c3e: 6700 0180 beqw 47dc0 <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
47c42: 2f00 movel %d0,%sp@- 47c44: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate>
if ( !new_object_block )
47c4a: 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 );
47c4c: 2c00 movel %d0,%d6
if ( !new_object_block )
47c4e: 6700 0166 beqw 47db6 <_Objects_Extend_information+0x1ee>
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
47c52: 4280 clrl %d0 47c54: 302a 000e movew %a2@(14),%d0 47c58: b083 cmpl %d3,%d0 47c5a: 6200 00c4 bhiw 47d20 <_Objects_Extend_information+0x158>
*/
/*
* Up the block count and maximum
*/
block_count++;
47c5e: 2a44 moveal %d4,%a5 47c60: 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 *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47c62: 200b movel %a3,%d0 47c64: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47c68: d088 addl %a0,%d0 47c6a: d085 addl %d5,%d0 47c6c: e588 lsll #2,%d0 47c6e: 2f00 movel %d0,%sp@- 47c70: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate>
if ( !object_blocks ) {
47c76: 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 );
47c78: 2840 moveal %d0,%a4
if ( !object_blocks ) {
47c7a: 4a80 tstl %d0 47c7c: 6700 01b2 beqw 47e30 <_Objects_Extend_information+0x268>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47c80: 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 ) {
47c82: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47c84: 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 ) {
47c86: 302a 000e movew %a2@(14),%d0
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
47c8a: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47c8e: de8d addl %a5,%d7 47c90: b085 cmpl %d5,%d0 47c92: 6200 013c bhiw 47dd0 <_Objects_Extend_information+0x208>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47c96: 4a85 tstl %d5
47c98: 670c beqs 47ca6 <_Objects_Extend_information+0xde><== NEVER TAKEN
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47c9a: 2047 moveal %d7,%a0 47c9c: 4280 clrl %d0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
47c9e: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47ca0: 5280 addql #1,%d0 47ca2: b085 cmpl %d5,%d0
47ca4: 65f8 bcss 47c9e <_Objects_Extend_information+0xd6><== NEVER TAKEN
47ca6: 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 );
47ca8: 4281 clrl %d1 47caa: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
47cae: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47cb2: d283 addl %d3,%d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
47cb4: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47cb8: b283 cmpl %d3,%d1
47cba: 6310 blss 47ccc <_Objects_Extend_information+0x104><== NEVER TAKEN
47cbc: 2247 moveal %d7,%a1 47cbe: 2003 movel %d3,%d0 47cc0: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
47cc4: 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++ ) {
47cc6: 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 ;
47cc8: b081 cmpl %d1,%d0
47cca: 65f8 bcss 47cc4 <_Objects_Extend_information+0xfc>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
47ccc: 203c 0000 0700 movel #1792,%d0 47cd2: 40c4 movew %sr,%d4 47cd4: 8084 orl %d4,%d0 47cd6: 46c0 movew %d0,%sr
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(
47cd8: 2012 movel %a2@,%d0 47cda: 7218 moveq #24,%d1 47cdc: 4285 clrl %d5 47cde: e3a8 lsll %d1,%d0 47ce0: 3a0b movew %a3,%d5 47ce2: 4281 clrl %d1 47ce4: 2245 moveal %d5,%a1 47ce6: 7a1b moveq #27,%d5 47ce8: 322a 0004 movew %a2@(4),%d1 47cec: 08c0 0010 bset #16,%d0
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
47cf0: 206a 002e moveal %a2@(46),%a0
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(
47cf4: eba9 lsll %d5,%d1
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
47cf6: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
47cfa: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47cfe: 8081 orl %d1,%d0 47d00: 2209 movel %a1,%d1 47d02: 8280 orl %d0,%d1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
47d04: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d08: 2541 000a movel %d1,%a2@(10)
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
47d0c: 2547 0018 movel %d7,%a2@(24)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
47d10: 46c4 movew %d4,%sr
if ( old_tables )
47d12: 4a88 tstl %a0
47d14: 670a beqs 47d20 <_Objects_Extend_information+0x158>
_Workspace_Free( old_tables );
47d16: 2f08 movel %a0,%sp@- 47d18: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 47d1e: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d20: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d24: 4280 clrl %d0 47d26: 280e movel %fp,%d4 47d28: 0684 ffff fff4 addil #-12,%d4 47d2e: 47f9 0004 7174 lea 47174 <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47d34: 2a0a movel %a2,%d5 47d36: 0685 0000 001c addil #28,%d5 47d3c: 49f9 0004 7114 lea 47114 <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d42: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d44: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d48: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d4c: 2f2a 0014 movel %a2@(20),%sp@- 47d50: 2f00 movel %d0,%sp@- 47d52: 2f06 movel %d6,%sp@- 47d54: 2f04 movel %d4,%sp@- 47d56: 4eb9 0004 c8b0 jsr 4c8b0 <_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 ) {
47d5c: 4fef 0010 lea %sp@(16),%sp 47d60: 2f04 movel %d4,%sp@- 47d62: 4e93 jsr %a3@ 47d64: 588f addql #4,%sp 47d66: 4a80 tstl %d0
47d68: 6732 beqs 47d9c <_Objects_Extend_information+0x1d4><== NEVER TAKEN
the_object->id = _Objects_Build_id(
47d6a: 2212 movel %a2@,%d1 47d6c: 7c18 moveq #24,%d6 47d6e: 7e1b moveq #27,%d7 47d70: 2040 moveal %d0,%a0 47d72: eda9 lsll %d6,%d1 47d74: 4286 clrl %d6 47d76: 3c2a 0004 movew %a2@(4),%d6 47d7a: 08c1 0010 bset #16,%d1 47d7e: efae lsll %d7,%d6 47d80: 8286 orl %d6,%d1 47d82: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
47d84: 5283 addql #1,%d3
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
47d86: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47d8a: 2f00 movel %d0,%sp@- 47d8c: 2f05 movel %d5,%sp@- 47d8e: 4e94 jsr %a4@
index++;
47d90: 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 ) {
47d92: 2f04 movel %d4,%sp@- 47d94: 4e93 jsr %a3@ 47d96: 588f addql #4,%sp 47d98: 4a80 tstl %d0
47d9a: 66ce bnes 47d6a <_Objects_Extend_information+0x1a2>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47d9c: 4280 clrl %d0
information->inactive =
47d9e: 322a 0028 movew %a2@(40),%d1 47da2: 326a 0012 moveaw %a2@(18),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47da6: 206a 002a moveal %a2@(42),%a0
information->inactive =
47daa: d289 addl %a1,%d1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47dac: 3009 movew %a1,%d0
information->inactive =
47dae: 3541 0028 movew %d1,%a2@(40)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47db2: 2180 2800 movel %d0,%a0@(00000000,%d2:l)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47db6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47dbc: 4e5e unlk %fp 47dbe: 4e75 rts
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 );
47dc0: 2f00 movel %d0,%sp@- 47dc2: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error> 47dc8: 588f addql #4,%sp 47dca: 2c00 movel %d0,%d6 47dcc: 6000 fe84 braw 47c52 <_Objects_Extend_information+0x8a>
/*
* 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,
47dd0: e58c lsll #2,%d4 47dd2: 2f04 movel %d4,%sp@- 47dd4: 2f2a 002e movel %a2@(46),%sp@- 47dd8: 2f0c movel %a4,%sp@- 47dda: 4eb9 0004 f9d8 jsr 4f9d8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
47de0: 2f04 movel %d4,%sp@- 47de2: 2f2a 002a movel %a2@(42),%sp@- 47de6: 2f0d movel %a5,%sp@- 47de8: 4eb9 0004 f9d8 jsr 4f9d8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47dee: 4280 clrl %d0 47df0: 302a 000e movew %a2@(14),%d0 47df4: da80 addl %d0,%d5 47df6: e58d lsll #2,%d5 47df8: 2f05 movel %d5,%sp@- 47dfa: 2f2a 0018 movel %a2@(24),%sp@- 47dfe: 2f07 movel %d7,%sp@- 47e00: 4eb9 0004 f9d8 jsr 4f9d8 <memcpy> 47e06: 4fef 0024 lea %sp@(36),%sp 47e0a: 6000 fe9c braw 47ca8 <_Objects_Extend_information+0xe0>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47e0e: 4280 clrl %d0 47e10: 2605 movel %d5,%d3 47e12: 4282 clrl %d2 47e14: 4284 clrl %d4 47e16: 322a 000e movew %a2@(14),%d1 47e1a: 302a 0012 movew %a2@(18),%d0 47e1e: 6000 fdfe braw 47c1e <_Objects_Extend_information+0x56>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
47e22: 2605 movel %d5,%d3 <== NOT EXECUTED 47e24: 4282 clrl %d2 <== NOT EXECUTED 47e26: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47e2c: 6000 fdf0 braw 47c1e <_Objects_Extend_information+0x56><== 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 );
47e30: 2f06 movel %d6,%sp@- 47e32: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free>
return;
47e38: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e3a: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47e40: 4e5e unlk %fp <== NOT EXECUTED
00047ef4 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
47ef4: 4e56 0000 linkw %fp,#0 47ef8: 2f02 movel %d2,%sp@- 47efa: 242e 000c movel %fp@(12),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47efe: 660a bnes 47f0a <_Objects_Get_information+0x16>
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
47f00: 4280 clrl %d0
return NULL;
#endif
return info;
}
47f02: 242e fffc movel %fp@(-4),%d2 47f06: 4e5e unlk %fp 47f08: 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 );
47f0a: 2f2e 0008 movel %fp@(8),%sp@- 47f0e: 4eb9 0004 cef8 jsr 4cef8 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
47f14: 588f addql #4,%sp 47f16: 4a80 tstl %d0
47f18: 67e6 beqs 47f00 <_Objects_Get_information+0xc>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47f1a: b082 cmpl %d2,%d0
47f1c: 65e2 bcss 47f00 <_Objects_Get_information+0xc>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47f1e: 202e 0008 movel %fp@(8),%d0 47f22: 41f9 0005 fdb4 lea 5fdb4 <_Objects_Information_table>,%a0 47f28: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47f2c: 4a88 tstl %a0
47f2e: 67d0 beqs 47f00 <_Objects_Get_information+0xc> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47f30: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
47f34: 67cc beqs 47f02 <_Objects_Get_information+0xe> <== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
47f36: 2040 moveal %d0,%a0 47f38: 4a68 000e tstw %a0@(14)
47f3c: 67c2 beqs 47f00 <_Objects_Get_information+0xc>
return NULL;
#endif
return info;
}
47f3e: 242e fffc movel %fp@(-4),%d2 47f42: 4e5e unlk %fp
...
000499dc <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
499dc: 4e56 ffe0 linkw %fp,#-32 499e0: 48d7 043c moveml %d2-%d5/%a2,%sp@ 499e4: 262e 000c movel %fp@(12),%d3 499e8: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
499ec: 4a83 tstl %d3
499ee: 660e bnes 499fe <_Objects_Get_name_as_string+0x22>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
499f0: 4282 clrl %d2
} return NULL; /* unreachable path */ }
499f2: 2002 movel %d2,%d0 499f4: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 499fa: 4e5e unlk %fp 499fc: 4e75 rts
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
499fe: 4a82 tstl %d2
49a00: 67f0 beqs 499f2 <_Objects_Get_name_as_string+0x16>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49a02: 4aae 0008 tstl %fp@(8) 49a06: 6700 00a8 beqw 49ab0 <_Objects_Get_name_as_string+0xd4> 49a0a: 282e 0008 movel %fp@(8),%d4
information = _Objects_Get_information_id( tmpId );
49a0e: 2f04 movel %d4,%sp@- 49a10: 4eb9 0004 98fc jsr 498fc <_Objects_Get_information_id>
if ( !information )
49a16: 588f addql #4,%sp 49a18: 4a80 tstl %d0
49a1a: 67d4 beqs 499f0 <_Objects_Get_name_as_string+0x14>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
49a1c: 486e fffc pea %fp@(-4) 49a20: 2f04 movel %d4,%sp@- 49a22: 2f00 movel %d0,%sp@- 49a24: 4eb9 0004 9acc jsr 49acc <_Objects_Get>
switch ( location ) {
49a2a: 4fef 000c lea %sp@(12),%sp 49a2e: 4aae fffc tstl %fp@(-4)
49a32: 66bc bnes 499f0 <_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;
49a34: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49a36: 7818 moveq #24,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a38: 5383 subql #1,%d3
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49a3a: 2028 000c movel %a0@(12),%d0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49a3e: 2200 movel %d0,%d1 49a40: e8a9 lsrl %d4,%d1
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
49a42: 2a00 movel %d0,%d5
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49a44: 2800 movel %d0,%d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
49a46: e08d lsrl #8,%d5
lname[ 3 ] = (u32_name >> 0) & 0xff;
49a48: 1d40 fffa moveb %d0,%fp@(-6)
lname[ 4 ] = '\0';
49a4c: 4200 clrb %d0
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49a4e: 4244 clrw %d4 49a50: 4844 swap %d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
49a52: 1d45 fff9 moveb %d5,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49a56: 1d40 fffb moveb %d0,%fp@(-5)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49a5a: 1d44 fff8 moveb %d4,%fp@(-8)
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
49a5e: 1d41 fff7 moveb %d1,%fp@(-9) 49a62: 1001 moveb %d1,%d0
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a64: 4a83 tstl %d3
49a66: 6756 beqs 49abe <_Objects_Get_name_as_string+0xe2><== NEVER TAKEN
49a68: 4a01 tstb %d1
49a6a: 6752 beqs 49abe <_Objects_Get_name_as_string+0xe2>
49a6c: 2042 moveal %d2,%a0 49a6e: 4281 clrl %d1 49a70: 45ee fff7 lea %fp@(-9),%a2
*d = (isprint((unsigned char)*s)) ? *s : '*';
49a74: 4284 clrl %d4 49a76: 1800 moveb %d0,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a78: 5281 addql #1,%d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49a7a: 2279 0006 1010 moveal 61010 <__ctype_ptr__>,%a1 49a80: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 49a84: 49c4 extbl %d4 49a86: 0284 0000 0097 andil #151,%d4
49a8c: 6602 bnes 49a90 <_Objects_Get_name_as_string+0xb4>
49a8e: 702a moveq #42,%d0 49a90: 10c0 moveb %d0,%a0@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a92: b681 cmpl %d1,%d3
49a94: 6306 blss 49a9c <_Objects_Get_name_as_string+0xc0>
49a96: 1032 1800 moveb %a2@(00000000,%d1:l),%d0
49a9a: 66d8 bnes 49a74 <_Objects_Get_name_as_string+0x98>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49a9c: 4210 clrb %a0@
_Thread_Enable_dispatch();
49a9e: 4eb9 0004 a330 jsr 4a330 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
49aa4: 2002 movel %d2,%d0 49aa6: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49aac: 4e5e unlk %fp 49aae: 4e75 rts
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49ab0: 2079 0006 2ae6 moveal 62ae6 <_Thread_Executing>,%a0 49ab6: 2828 0008 movel %a0@(8),%d4 49aba: 6000 ff52 braw 49a0e <_Objects_Get_name_as_string+0x32>
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49abe: 2042 moveal %d2,%a0
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49ac0: 4210 clrb %a0@
_Thread_Enable_dispatch();
49ac2: 4eb9 0004 a330 jsr 4a330 <_Thread_Enable_dispatch> 49ac8: 60da bras 49aa4 <_Objects_Get_name_as_string+0xc8>
...
0005c238 <_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;
5c238: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5c23a: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5c23c: 4e56 0000 linkw %fp,#0 5c240: 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;
5c244: 90a8 0006 subl %a0@(6),%d0 5c248: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5c24c: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5c250: 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 ) {
5c254: b280 cmpl %d0,%d1
5c256: 6510 bcss 5c268 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5c258: 2068 0018 moveal %a0@(24),%a0 5c25c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
5c260: 6706 beqs 5c268 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
5c262: 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; }
5c264: 4e5e unlk %fp 5c266: 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;
5c268: 7001 moveq #1,%d0
return NULL; }
5c26a: 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;
5c26c: 2280 movel %d0,%a1@ 5c26e: 4280 clrl %d0
return NULL;
}
...
00049748 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
49748: 4e56 fffc linkw %fp,#-4 4974c: 222e 0008 movel %fp@(8),%d1 49750: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49752: 4a81 tstl %d1
49754: 660a bnes 49760 <_Objects_Id_to_name+0x18>
49756: 2079 0006 1bee moveal 61bee <_Thread_Executing>,%a0 4975c: 2228 0008 movel %a0@(8),%d1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
49760: 7418 moveq #24,%d2 49762: 2001 movel %d1,%d0 49764: e4a8 lsrl %d2,%d0 49766: 143c 0007 moveb #7,%d2 4976a: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
4976c: 143c 0003 moveb #3,%d2 49770: 2040 moveal %d0,%a0 49772: 5388 subql #1,%a0 49774: b488 cmpl %a0,%d2
49776: 654a bcss 497c2 <_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 ] )
49778: 41f9 0006 1aec lea 61aec <_Objects_Information_table>,%a0 4977e: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 49782: 4a88 tstl %a0
49784: 673c beqs 497c2 <_Objects_Id_to_name+0x7a>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
49786: 2001 movel %d1,%d0 49788: 741b moveq #27,%d2 4978a: e4a8 lsrl %d2,%d0 4978c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
if ( !information )
49790: 6730 beqs 497c2 <_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 );
49792: 486e fffc pea %fp@(-4) 49796: 2f01 movel %d1,%sp@- 49798: 2f00 movel %d0,%sp@- 4979a: 4eb9 0004 96dc jsr 496dc <_Objects_Get>
if ( !the_object )
497a0: 4fef 000c lea %sp@(12),%sp 497a4: 4a80 tstl %d0
497a6: 671a beqs 497c2 <_Objects_Id_to_name+0x7a>
return OBJECTS_INVALID_ID;
*name = the_object->name;
497a8: 206e 000c moveal %fp@(12),%a0 497ac: 2240 moveal %d0,%a1 497ae: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
497b2: 4eb9 0004 a044 jsr 4a044 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
497b8: 242e fff8 movel %fp@(-8),%d2
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
497bc: 4280 clrl %d0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
497be: 4e5e unlk %fp 497c0: 4e75 rts 497c2: 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;
497c6: 7003 moveq #3,%d0
}
497c8: 4e5e unlk %fp <== NOT EXECUTED
00048014 <_Objects_Initialize_information>:
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
48014: 41f9 0005 fdb4 lea 5fdb4 <_Objects_Information_table>,%a0
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
4801a: 4e56 fff0 linkw %fp,#-16 4801e: 202e 000c movel %fp@(12),%d0
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
48022: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
48026: 48d7 003c moveml %d2-%d5,%sp@ 4802a: 222e 0014 movel %fp@(20),%d1 4802e: 4285 clrl %d5
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
48030: 2601 movel %d1,%d3
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
48032: 206e 0008 moveal %fp@(8),%a0
information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0;
48036: 4244 clrw %d4
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
48038: 3a2e 001a movew %fp@(26),%d5 4803c: 242e 0010 movel %fp@(16),%d2
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
48040: d683 addl %d3,%d3 48042: 9783 subxl %d3,%d3 48044: 4483 negl %d3
information->the_class = the_class; information->size = size; information->local_table = 0; information->inactive_per_block = 0; information->object_blocks = 0; information->inactive = 0;
48046: 3144 0028 movew %d4,%a0@(40)
/*
* Set the maximum value to 0. It will be updated when objects are
* added to the inactive set from _Objects_Extend_information()
*/
information->maximum = 0;
4804a: 3144 000e movew %d4,%a0@(14)
,
bool supports_global,
Objects_Thread_queue_Extract_callout extract
#endif
)
{
4804e: 282e 0020 movel %fp@(32),%d4
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
48052: 3142 0004 movew %d2,%a0@(4)
_Objects_Information_table[ the_api ][ the_class ] = information;
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
48056: 1143 0010 moveb %d3,%a0@(16)
uint32_t index;
#endif
information->the_api = the_api;
information->the_class = the_class;
information->size = size;
4805a: 2145 0014 movel %d5,%a0@(20)
information->maximum = 0;
/*
* Register this Object Class in the Object Information Table.
*/
_Objects_Information_table[ the_api ][ the_class ] = information;
4805e: 2388 2c00 movel %a0,%a1@(00000000,%d2:l:4)
/*
* Are we operating in limited or unlimited (e.g. auto-extend) mode.
*/
information->auto_extend =
(maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
48062: 0881 001f bclr #31,%d1
uint32_t maximum_per_allocation;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t index;
#endif
information->the_api = the_api;
48066: 2080 movel %d0,%a0@
information->the_class = the_class; information->size = size; information->local_table = 0;
48068: 42a8 0018 clrl %a0@(24)
information->inactive_per_block = 0;
4806c: 42a8 002a clrl %a0@(42)
information->object_blocks = 0;
48070: 42a8 002e clrl %a0@(46)
maximum_per_allocation = maximum & ~OBJECTS_UNLIMITED_OBJECTS;
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
48074: 4a03 tstb %d3
48076: 6706 beqs 4807e <_Objects_Initialize_information+0x6a>
48078: 4a81 tstl %d1 4807a: 6700 0092 beqw 4810e <_Objects_Initialize_information+0xfa>
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
4807e: 7a18 moveq #24,%d5 48080: 4a81 tstl %d1 48082: 56c3 sne %d3 48084: eba8 lsll %d5,%d0 48086: 1a3c 001b moveb #27,%d5 4808a: 49c3 extbl %d3 4808c: 4483 negl %d3
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
4808e: 43f9 0005 f5a4 lea 5f5a4 <null_local_table.3444>,%a1
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
48094: ebaa lsll %d5,%d2 48096: 08c0 0010 bset #16,%d0
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
4809a: 1a3c 0003 moveb #3,%d5
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
4809e: 8082 orl %d2,%d0
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
480a0: ca84 andl %d4,%d5
}
/*
* The allocation unit is the maximum value
*/
information->allocation_size = maximum_per_allocation;
480a2: 3141 0012 movew %d1,%a0@(18)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
480a6: 8083 orl %d3,%d0
information->allocation_size = maximum_per_allocation;
/*
* Provide a null local table entry for the case of any empty table.
*/
information->local_table = &null_local_table;
480a8: 2149 0018 movel %a1,%a0@(24)
/*
* Calculate minimum and maximum Id's
*/
minimum_index = (maximum_per_allocation == 0) ? 0 : 1;
information->minimum_id =
480ac: 2140 0006 movel %d0,%a0@(6)
/*
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
480b0: 4a85 tstl %d5
480b2: 6626 bnes 480da <_Objects_Initialize_information+0xc6><== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
480b4: 43e8 0020 lea %a0@(32),%a1 480b8: 2149 001c movel %a1,%a0@(28)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
480bc: 43e8 001c lea %a0@(28),%a1
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
480c0: 3144 0032 movew %d4,%a0@(50)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
480c4: 42a8 0020 clrl %a0@(32)
the_chain->last = _Chain_Head(the_chain);
480c8: 2149 0024 movel %a1,%a0@(36)
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
480cc: 4a81 tstl %d1
480ce: 662c bnes 480fc <_Objects_Initialize_information+0xe8>
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
480d0: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 480d6: 4e5e unlk %fp 480d8: 4e75 rts
* Calculate the maximum name length
*/
name_length = maximum_name_length;
if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) &
480da: 5884 addql #4,%d4 <== NOT EXECUTED 480dc: 70fc moveq #-4,%d0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
480de: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 480e2: c880 andl %d0,%d4 <== NOT EXECUTED 480e4: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
480e8: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED
~(OBJECTS_NAME_ALIGNMENT-1);
information->name_length = name_length;
480ec: 3144 0032 movew %d4,%a0@(50) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
480f0: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
480f4: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED
_Chain_Initialize_empty( &information->Inactive );
/*
* Initialize objects .. if there are any
*/
if ( maximum_per_allocation ) {
480f8: 4a81 tstl %d1 <== NOT EXECUTED 480fa: 67d4 beqs 480d0 <_Objects_Initialize_information+0xbc><== NOT EXECUTED
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
480fc: 2d48 0008 movel %a0,%fp@(8)
_Chain_Initialize_empty( &information->global_table[ index ] );
}
else
information->global_table = NULL;
#endif
}
48100: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 48106: 4e5e unlk %fp
/*
* Always have the maximum size available so the current performance
* figures are create are met. If the user moves past the maximum
* number then a performance hit is taken.
*/
_Objects_Extend_information( information );
48108: 4ef9 0004 7bc8 jmp 47bc8 <_Objects_Extend_information>
/*
* Unlimited and maximum of zero is illogical.
*/
if ( information->auto_extend && maximum_per_allocation == 0) {
_Internal_error_Occurred(
4810e: 4878 0014 pea 14 <OPER2> 48112: 4878 0001 pea 1 <ADD> 48116: 42a7 clrl %sp@- 48118: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred>
...
000481b0 <_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) /
481b0: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
481b2: 4e56 ffec linkw %fp,#-20 481b6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 481ba: 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 );
481be: 4283 clrl %d3
block_count = (information->maximum - index_base) /
481c0: 4284 clrl %d4
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
481c2: 362a 0008 movew %a2@(8),%d3
block_count = (information->maximum - index_base) /
481c6: 382a 000e movew %a2@(14),%d4 481ca: 322a 0012 movew %a2@(18),%d1 481ce: 9883 subl %d3,%d4 481d0: 4c41 4004 remul %d1,%d4,%d4
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
481d4: 672c beqs 48202 <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
481d6: 226a 002a moveal %a2@(42),%a1 481da: b291 cmpl %a1@,%d1
481dc: 672e beqs 4820c <_Objects_Shrink_information+0x5c><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
481de: 7404 moveq #4,%d2 481e0: 4280 clrl %d0
}
index_base += information->allocation_size;
481e2: 2042 moveal %d2,%a0 481e4: d681 addl %d1,%d3 481e6: 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++ ) {
481e8: 5280 addql #1,%d0 481ea: b084 cmpl %d4,%d0
481ec: 6414 bccs 48202 <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
481ee: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1
481f2: 671a beqs 4820e <_Objects_Shrink_information+0x5e>
481f4: 2408 movel %a0,%d2
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
481f6: 2042 moveal %d2,%a0 481f8: d681 addl %d1,%d3 481fa: 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++ ) {
481fc: 5280 addql #1,%d0 481fe: b084 cmpl %d4,%d0
48200: 65ec bcss 481ee <_Objects_Shrink_information+0x3e>
return;
}
index_base += information->allocation_size;
}
}
48202: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48208: 4e5e unlk %fp 4820a: 4e75 rts
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 ] ==
4820c: 4282 clrl %d2 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
4820e: 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 );
48212: 47f9 0004 714c lea 4714c <_Chain_Extract>,%a3
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
48218: 4280 clrl %d0 4821a: 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;
4821e: 2810 movel %a0@,%d4
if ((index >= index_base) &&
48220: b680 cmpl %d0,%d3
48222: 620c bhis 48230 <_Objects_Shrink_information+0x80>
(index < (index_base + information->allocation_size))) {
48224: 4281 clrl %d1 48226: 322a 0012 movew %a2@(18),%d1 4822a: d283 addl %d3,%d1 4822c: b280 cmpl %d0,%d1
4822e: 623e bhis 4826e <_Objects_Shrink_information+0xbe>
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
48230: 2044 moveal %d4,%a0 48232: 4a84 tstl %d4
48234: 66e2 bnes 48218 <_Objects_Shrink_information+0x68>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
48236: 206a 002e moveal %a2@(46),%a0 4823a: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 4823e: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
48244: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
48248: 588f addql #4,%sp
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
4824a: 302a 0028 movew %a2@(40),%d0 4824e: 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;
48252: 226a 002a moveal %a2@(42),%a1
information->inactive -= information->allocation_size;
48256: 9081 subl %d1,%d0
* 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;
48258: 42b1 2800 clrl %a1@(00000000,%d2:l)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
4825c: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
48260: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
48264: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4826a: 4e5e unlk %fp 4826c: 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 );
4826e: 2f08 movel %a0,%sp@- 48270: 4e93 jsr %a3@ 48272: 588f addql #4,%sp
}
}
while ( the_object );
48274: 2044 moveal %d4,%a0 48276: 4a84 tstl %d4
48278: 669e bnes 48218 <_Objects_Shrink_information+0x68>
4827a: 60ba bras 48236 <_Objects_Shrink_information+0x86>
0004c73a <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4c73a: 4e56 0000 linkw %fp,#0 4c73e: 2f0a movel %a2,%sp@- 4c740: 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() )
4c744: 4a39 0005 e674 tstb 5e674 <Configuration_RTEMS_API+0x4>
4c74a: 665c bnes 4c7a8 <_RTEMS_tasks_Create_extension+0x6e>
4c74c: 701e moveq #30,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4c74e: 2f00 movel %d0,%sp@- 4c750: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate>
if ( !api )
4c756: 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 );
4c758: 2040 moveal %d0,%a0
if ( !api )
4c75a: 4a80 tstl %d0
4c75c: 675c beqs 4c7ba <_RTEMS_tasks_Create_extension+0x80><== NEVER TAKEN
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
4c75e: 42aa 0118 clrl %a2@(280)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4c762: 4200 clrb %d0
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4c764: 2548 0108 movel %a0,%a2@(264) 4c768: 1140 0008 moveb %d0,%a0@(8)
api->pending_events = EVENT_SETS_NONE_PENDING;
4c76c: 4290 clrl %a0@
api->event_condition = 0;
4c76e: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4c772: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4c776: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4c77a: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4c77e: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4c782: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
4c786: 4a39 0005 e674 tstb 5e674 <Configuration_RTEMS_API+0x4>
4c78c: 6710 beqs 4c79e <_RTEMS_tasks_Create_extension+0x64>
4c78e: 41e8 001e lea %a0@(30),%a0 4c792: 4280 clrl %d0
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
4c794: 4298 clrl %a0@+
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++)
4c796: 5280 addql #1,%d0 4c798: 7210 moveq #16,%d1 4c79a: b280 cmpl %d0,%d1
4c79c: 66f6 bnes 4c794 <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4c79e: 246e fffc moveal %fp@(-4),%a2 4c7a2: 4e5e unlk %fp
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++)
4c7a4: 7001 moveq #1,%d0
api->Notepads[i] = 0;
}
return true;
}
4c7a6: 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() )
4c7a8: 705e moveq #94,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4c7aa: 2f00 movel %d0,%sp@- 4c7ac: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate>
if ( !api )
4c7b2: 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 );
4c7b4: 2040 moveal %d0,%a0
if ( !api )
4c7b6: 4a80 tstl %d0
4c7b8: 66a4 bnes 4c75e <_RTEMS_tasks_Create_extension+0x24>
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4c7ba: 246e fffc moveal %fp@(-4),%a2 4c7be: 4e5e unlk %fp
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
4c7c0: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
00046b28 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46b28: 4e56 ffe4 linkw %fp,#-28 46b2c: 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;
46b30: 2479 0005 e69a moveal 5e69a <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
46b36: 2639 0005 e696 movel 5e696 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46b3c: 4a8a tstl %a2
46b3e: 6754 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46b40: 4a83 tstl %d3
46b42: 6750 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
46b44: 280e movel %fp,%d4 46b46: 4282 clrl %d2 46b48: 5984 subql #4,%d4 46b4a: 47f9 0004 68fc lea 468fc <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(
46b50: 49f9 0004 6bb0 lea 46bb0 <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(
46b56: 2f04 movel %d4,%sp@- 46b58: 2f2a 000c movel %a2@(12),%sp@- 46b5c: 2f2a 0014 movel %a2@(20),%sp@- 46b60: 2f2a 0004 movel %a2@(4),%sp@- 46b64: 2f2a 0008 movel %a2@(8),%sp@- 46b68: 2f12 movel %a2@,%sp@- 46b6a: 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 ) )
46b6c: 4fef 0018 lea %sp@(24),%sp 46b70: 4a80 tstl %d0
46b72: 662a bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46b74: 2f2a 0018 movel %a2@(24),%sp@- 46b78: 2f2a 0010 movel %a2@(16),%sp@- 46b7c: 2f2e fffc movel %fp@(-4),%sp@- 46b80: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
46b82: 4fef 000c lea %sp@(12),%sp 46b86: 4a80 tstl %d0
46b88: 6614 bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46b8a: 5282 addql #1,%d2 46b8c: 45ea 001c lea %a2@(28),%a2 46b90: b483 cmpl %d3,%d2
46b92: 65c2 bcss 46b56 <_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 );
}
}
46b94: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46b9a: 4e5e unlk %fp 46b9c: 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 );
46b9e: 2f00 movel %d0,%sp@- 46ba0: 4878 0001 pea 1 <ADD> 46ba4: 4878 0001 pea 1 <ADD> 46ba8: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred>
...
0004c676 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4c676: 4e56 ffec linkw %fp,#-20 4c67a: 206e 0008 moveal %fp@(8),%a0 4c67e: 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 ];
4c682: 2468 0108 moveal %a0@(264),%a2
if ( !api )
4c686: 4a8a tstl %a2
4c688: 671a beqs 4c6a4 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4c68a: 203c 0000 0700 movel #1792,%d0 4c690: 40c1 movew %sr,%d1 4c692: 8081 orl %d1,%d0 4c694: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4c696: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4c69a: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4c69e: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4c6a0: 4a82 tstl %d2
4c6a2: 660a bnes 4c6ae <_RTEMS_tasks_Post_switch_extension+0x38><== ALWAYS TAKEN
(*asr->handler)( signal_set );
asr->nest_level -= 1;
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
}
4c6a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4c6aa: 4e5e unlk %fp <== NOT EXECUTED 4c6ac: 4e75 rts <== NOT EXECUTED
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4c6ae: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4c6b2: 260e movel %fp,%d3 4c6b4: 5983 subql #4,%d3 4c6b6: 47f9 0004 ec68 lea 4ec68 <rtems_task_mode>,%a3 4c6bc: 2f03 movel %d3,%sp@- 4c6be: 2f3c 0000 ffff movel #65535,%sp@- 4c6c4: 2f2a 000e movel %a2@(14),%sp@- 4c6c8: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4c6ca: 2f02 movel %d2,%sp@- 4c6cc: 206a 000a moveal %a2@(10),%a0 4c6d0: 4e90 jsr %a0@
asr->nest_level -= 1;
4c6d2: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4c6d6: 2f03 movel %d3,%sp@- 4c6d8: 2f3c 0000 ffff movel #65535,%sp@- 4c6de: 2f2e fffc movel %fp@(-4),%sp@- 4c6e2: 4e93 jsr %a3@ 4c6e4: 4fef 001c lea %sp@(28),%sp
}
4c6e8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c6ee: 4e5e unlk %fp <== NOT EXECUTED
0004c5d2 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4c5d2: 4e56 0000 linkw %fp,#0 4c5d6: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4c5da: 2068 0118 moveal %a0@(280),%a0
while (tvp) {
4c5de: 4a88 tstl %a0
4c5e0: 6712 beqs 4c5f4 <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4c5e2: 2268 0004 moveal %a0@(4),%a1 4c5e6: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4c5ea: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4c5ee: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4c5f0: 4a88 tstl %a0
4c5f2: 66ee bnes 4c5e2 <_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;
4c5f4: 206e 000c moveal %fp@(12),%a0 4c5f8: 2068 0118 moveal %a0@(280),%a0
while (tvp) {
4c5fc: 4a88 tstl %a0
4c5fe: 6712 beqs 4c612 <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4c600: 2268 0004 moveal %a0@(4),%a1 4c604: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4c608: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4c60c: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4c60e: 4a88 tstl %a0
4c610: 66ee bnes 4c600 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4c612: 4e5e unlk %fp <== NOT EXECUTED
00047bfc <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47bfc: 4e56 fffc linkw %fp,#-4 47c00: 2f0a movel %a2,%sp@- 47c02: 486e fffc pea %fp@(-4) 47c06: 2f2e 0008 movel %fp@(8),%sp@- 47c0a: 4879 0006 1e48 pea 61e48 <_Rate_monotonic_Information> 47c10: 4eb9 0004 9ae0 jsr 49ae0 <_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 ) {
47c16: 4fef 000c lea %sp@(12),%sp 47c1a: 2440 moveal %d0,%a2 47c1c: 4aae fffc tstl %fp@(-4)
47c20: 6636 bnes 47c58 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
47c22: 206a 0040 moveal %a2@(64),%a0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47c26: 2028 0010 movel %a0@(16),%d0 47c2a: 0280 0000 4000 andil #16384,%d0
47c30: 670a beqs 47c3c <_Rate_monotonic_Timeout+0x40>
the_thread->Wait.id == the_period->Object.id ) {
47c32: 202a 0008 movel %a2@(8),%d0 47c36: b0a8 0020 cmpl %a0@(32),%d0
47c3a: 675e beqs 47c9a <_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 ) {
47c3c: 7001 moveq #1,%d0 47c3e: b0aa 0038 cmpl %a2@(56),%d0
47c42: 671c beqs 47c60 <_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;
47c44: 7004 moveq #4,%d0 47c46: 2540 0038 movel %d0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47c4a: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47c50: 5380 subql #1,%d0 47c52: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47c58: 246e fff8 moveal %fp@(-8),%a2 47c5c: 4e5e unlk %fp 47c5e: 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;
47c60: 103c 0003 moveb #3,%d0 47c64: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47c68: 2f0a movel %a2,%sp@- 47c6a: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47c70: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47c76: 486a 0010 pea %a2@(16) 47c7a: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 47c80: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert> 47c86: 4fef 000c lea %sp@(12),%sp 47c8a: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47c90: 5380 subql #1,%d0 47c92: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level> 47c98: 60be bras 47c58 <_Rate_monotonic_Timeout+0x5c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47c9a: 2f3c 1003 fff8 movel #268697592,%sp@- 47ca0: 2f08 movel %a0,%sp@- 47ca2: 4eb9 0004 9ff0 jsr 49ff0 <_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 );
47ca8: 2f0a movel %a2,%sp@- 47caa: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47cb0: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47cb6: 486a 0010 pea %a2@(16) 47cba: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 47cc0: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert>
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47cc6: 4fef 0014 lea %sp@(20),%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47cca: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47cd0: 5380 subql #1,%d0 47cd2: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level> 47cd8: 6000 ff7e braw 47c58 <_Rate_monotonic_Timeout+0x5c>
00048fa4 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
48fa4: 4e56 0000 linkw %fp,#0 48fa8: 2039 0006 2a2c movel 62a2c <_Thread_Dispatch_disable_level>,%d0 48fae: 5280 addql #1,%d0 48fb0: 2f0a movel %a2,%sp@- 48fb2: 246e 0008 moveal %fp@(8),%a2 48fb6: 23c0 0006 2a2c movel %d0,62a2c <_Thread_Dispatch_disable_level>
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
48fbc: 2039 0006 2abe movel 62abe <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
48fc2: 2212 movel %a2@,%d1 48fc4: b280 cmpl %d0,%d1
48fc6: 6d38 blts 49000 <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
48fc8: 9280 subl %d0,%d1 48fca: 2f01 movel %d1,%sp@- 48fcc: 42a7 clrl %sp@- 48fce: 4879 0006 2af8 pea 62af8 <_Watchdog_Seconds_chain> 48fd4: 4eb9 0004 b61c jsr 4b61c <_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 );
48fda: 23d2 0006 2abe movel %a2@,62abe <_TOD_Now> 48fe0: 588a addql #4,%a2 48fe2: 4fef 000c lea %sp@(12),%sp 48fe6: 23d2 0006 2ac2 movel %a2@,62ac2 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
48fec: 246e fffc moveal %fp@(-4),%a2 48ff0: 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;
48ff2: 7001 moveq #1,%d0 48ff4: 13c0 0006 2a40 moveb %d0,62a40 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
48ffa: 4ef9 0004 a330 jmp 4a330 <_Thread_Enable_dispatch> 49000: 9081 subl %d1,%d0 49002: 2f00 movel %d0,%sp@- 49004: 4878 0001 pea 1 <ADD> 49008: 4879 0006 2af8 pea 62af8 <_Watchdog_Seconds_chain> 4900e: 4eb9 0004 b61c jsr 4b61c <_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 );
49014: 23d2 0006 2abe movel %a2@,62abe <_TOD_Now> 4901a: 588a addql #4,%a2 4901c: 4fef 000c lea %sp@(12),%sp 49020: 23d2 0006 2ac2 movel %a2@,62ac2 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
49026: 246e fffc moveal %fp@(-4),%a2 4902a: 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;
4902c: 7001 moveq #1,%d0 4902e: 13c0 0006 2a40 moveb %d0,62a40 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
49034: 4ef9 0004 a330 jmp 4a330 <_Thread_Enable_dispatch>
...
00047668 <_TOD_Tickle_ticks>:
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
47668: 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() );
4766c: 2239 0005 e6b0 movel 5e6b0 <Configuration+0xc>,%d1
*
* Output parameters: NONE
*/
void _TOD_Tickle_ticks( void )
{
47672: 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 );
47676: 240e movel %fp,%d2 47678: 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() );
4767a: 263c 0000 03e8 movel #1000,%d3 47680: 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 );
47684: 45f9 0004 9624 lea 49624 <_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;
4768a: 2039 0005 ff3c movel 5ff3c <_Watchdog_Ticks_since_boot>,%d0 47690: 5280 addql #1,%d0
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
47692: 2f02 movel %d2,%sp@- 47694: 4879 0005 fe7a pea 5fe7a <_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() );
4769a: 2d41 fffc movel %d1,%fp@(-4)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
4769e: 23c0 0005 ff3c movel %d0,5ff3c <_Watchdog_Ticks_since_boot>
{
Timestamp_Control tick;
uint32_t seconds;
/* Convert the tick quantum to a timestamp */
_Timestamp_Set( &tick, 0, rtems_configuration_get_nanoseconds_per_tick() );
476a4: 42ae fff8 clrl %fp@(-8)
/* Update the counter of ticks since boot */
_Watchdog_Ticks_since_boot += 1;
/* Update the timespec format uptime */
_Timestamp_Add_to( &_TOD_Uptime, &tick );
476a8: 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 );
476aa: 2f02 movel %d2,%sp@- 476ac: 4879 0005 fe8e pea 5fe8e <_TOD_Now> 476b2: 4e92 jsr %a2@
while ( seconds ) {
476b4: 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 );
476b8: 2400 movel %d0,%d2
while ( seconds ) {
476ba: 6716 beqs 476d2 <_TOD_Tickle_ticks+0x6a>
476bc: 45f9 0004 9b54 lea 49b54 <_Watchdog_Tickle>,%a2
*/
RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_seconds( void )
{
_Watchdog_Tickle( &_Watchdog_Seconds_chain );
476c2: 4879 0005 fec8 pea 5fec8 <_Watchdog_Seconds_chain>
_Watchdog_Tickle_seconds();
seconds--;
476c8: 5382 subql #1,%d2 476ca: 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 ) {
476cc: 588f addql #4,%sp 476ce: 4a82 tstl %d2
476d0: 66f0 bnes 476c2 <_TOD_Tickle_ticks+0x5a> <== NEVER TAKEN
_Watchdog_Tickle_seconds();
seconds--;
}
}
476d2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
476d8: 4e5e unlk %fp <== NOT EXECUTED
00047610 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
47610: 4e56 0000 linkw %fp,#0 47614: 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();
47618: 2039 0006 0f00 movel 60f00 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
4761e: 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) ||
47620: 4a88 tstl %a0
47622: 6762 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
47624: 243c 000f 4240 movel #1000000,%d2 4762a: 4c40 2002 remul %d0,%d2,%d2
(the_tod->ticks >= ticks_per_second) ||
4762e: b4a8 0018 cmpl %a0@(24),%d2
47632: 6352 blss 47686 <_TOD_Validate+0x76>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
47634: 703b moveq #59,%d0 47636: b0a8 0014 cmpl %a0@(20),%d0
4763a: 654a bcss 47686 <_TOD_Validate+0x76>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
4763c: b0a8 0010 cmpl %a0@(16),%d0
47640: 6544 bcss 47686 <_TOD_Validate+0x76>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
47642: 7217 moveq #23,%d1 47644: b2a8 000c cmpl %a0@(12),%d1
47648: 653c bcss 47686 <_TOD_Validate+0x76>
(the_tod->month == 0) ||
4764a: 2028 0004 movel %a0@(4),%d0
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) ||
4764e: 6736 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
47650: 740c moveq #12,%d2 47652: b480 cmpl %d0,%d2
47654: 6530 bcss 47686 <_TOD_Validate+0x76>
(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) ||
47656: 2210 movel %a0@,%d1
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) ||
47658: 0c81 0000 07c3 cmpil #1987,%d1
4765e: 6326 blss 47686 <_TOD_Validate+0x76>
(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) ||
(the_tod->day == 0) )
47660: 2068 0008 moveal %a0@(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();
if ((!the_tod) ||
47664: 4a88 tstl %a0
47666: 671e beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
47668: 143c 0003 moveb #3,%d2 4766c: c282 andl %d2,%d1
4766e: 661e bnes 4768e <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
47670: 43f9 0005 fcf2 lea 5fcf2 <_TOD_Days_per_month>,%a1 47676: 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(
4767a: b1c0 cmpal %d0,%a0 4767c: 53c0 sls %d0 4767e: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
47680: 241f movel %sp@+,%d2 47682: 4e5e unlk %fp 47684: 4e75 rts 47686: 241f movel %sp@+,%d2 47688: 4e5e unlk %fp
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
4768a: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
4768c: 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 ];
4768e: 43f9 0005 fcf2 lea 5fcf2 <_TOD_Days_per_month>,%a1 47694: 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(
47698: b1c0 cmpal %d0,%a0 4769a: 53c0 sls %d0 4769c: 4480 negl %d0 4769e: 60e0 bras 47680 <_TOD_Validate+0x70>
0004836c <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4836c: 4e56 fff0 linkw %fp,#-16 48370: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48374: 246e 0008 moveal %fp@(8),%a2
/* * 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 );
48378: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4837a: 242e 000c movel %fp@(12),%d2
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
4837e: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48382: 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 );
48386: 4eb9 0004 927c jsr 4927c <_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 )
4838c: 588f addql #4,%sp 4838e: b4aa 0014 cmpl %a2@(20),%d2
48392: 670c beqs 483a0 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
48394: 2f02 movel %d2,%sp@- 48396: 2f0a movel %a2,%sp@- 48398: 4eb9 0004 90f8 jsr 490f8 <_Thread_Set_priority> 4839e: 508f addql #8,%sp
_ISR_Disable( level );
483a0: 203c 0000 0700 movel #1792,%d0 483a6: 40c1 movew %sr,%d1 483a8: 8081 orl %d1,%d0 483aa: 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;
483ac: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
483b0: 7404 moveq #4,%d2 483b2: b480 cmpl %d0,%d2
483b4: 6738 beqs 483ee <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
483b6: 44c3 movew %d3,%ccr
483b8: 6708 beqs 483c2 <_Thread_Change_priority+0x56> <== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
483ba: 74fb moveq #-5,%d2 483bc: c480 andl %d0,%d2 483be: 2542 0010 movel %d2,%a2@(16)
_ISR_Enable( level );
483c2: 46c1 movew %d1,%sr
if ( _States_Is_waiting_on_thread_queue( state ) ) {
483c4: 0280 0003 bee0 andil #245472,%d0
483ca: 660a bnes 483d6 <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
483cc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483d2: 4e5e unlk %fp 483d4: 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 );
483d6: 2d4a 000c movel %a2,%fp@(12) 483da: 2d6a 0044 0008 movel %a2@(68),%fp@(8)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
483e0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483e6: 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 );
483e8: 4ef9 0004 904c jmp 4904c <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
483ee: 44c3 movew %d3,%ccr
483f0: 673c beqs 4842e <_Thread_Change_priority+0xc2> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
483f2: 206a 008e moveal %a2@(142),%a0 483f6: 302a 0094 movew %a2@(148),%d0 483fa: 3410 movew %a0@,%d2
* 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 );
483fc: 42aa 0010 clrl %a2@(16) 48400: 8082 orl %d2,%d0 48402: 3080 movew %d0,%a0@
_Priority_Major_bit_map |= the_priority_map->ready_major;
48404: 3439 0005 feac movew 5feac <_Priority_Major_bit_map>,%d2 4840a: 302a 0092 movew %a2@(146),%d0 4840e: 8082 orl %d2,%d0 48410: 33c0 0005 feac movew %d0,5feac <_Priority_Major_bit_map>
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
48416: 4a04 tstb %d4 48418: 6700 0082 beqw 4849c <_Thread_Change_priority+0x130>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4841c: 206a 008a moveal %a2@(138),%a0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
48420: 2250 moveal %a0@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
48422: 2548 0004 movel %a0,%a2@(4)
before_node = after_node->next; after_node->next = the_node;
48426: 208a movel %a2,%a0@
the_node->next = before_node; before_node->previous = the_node;
48428: 234a 0004 movel %a2,%a1@(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;
4842c: 2489 movel %a1,%a2@
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
4842e: 203c 0000 0700 movel #1792,%d0 48434: 46c1 movew %d1,%sr 48436: 8081 orl %d1,%d0 48438: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
4843a: 3039 0005 feac movew 5feac <_Priority_Major_bit_map>,%d0 48440: 4840 swap %d0 48442: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
48444: 4282 clrl %d2 48446: 41f9 0005 ff18 lea 5ff18 <_Priority_Bit_map>,%a0 4844c: 3400 movew %d0,%d2 4844e: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 48452: 4840 swap %d0 48454: 04c0 ff1 %d0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
48456: 4283 clrl %d3 48458: e98a lsll #4,%d2 4845a: 3600 movew %d0,%d3 4845c: 2279 0005 fda8 moveal 5fda8 <_Thread_Ready_chain>,%a1 48462: 2002 movel %d2,%d0 48464: d083 addl %d3,%d0 48466: 2400 movel %d0,%d2 48468: e58a lsll #2,%d2 4846a: e988 lsll #4,%d0
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
4846c: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
48472: 93c2 subal %d2,%a1 48474: 2031 0800 movel %a1@(00000000,%d0:l),%d0 48478: 23c0 0005 fe8a movel %d0,5fe8a <_Thread_Heir>
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
4847e: b1c0 cmpal %d0,%a0
48480: 670e beqs 48490 <_Thread_Change_priority+0x124>
_Thread_Executing->is_preemptible )
48482: 4a28 0075 tstb %a0@(117)
48486: 6708 beqs 48490 <_Thread_Change_priority+0x124>
_Context_Switch_necessary = true;
48488: 7401 moveq #1,%d2 4848a: 13c2 0005 fec6 moveb %d2,5fec6 <_Context_Switch_necessary>
_ISR_Enable( level );
48490: 46c1 movew %d1,%sr
}
48492: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48498: 4e5e unlk %fp 4849a: 4e75 rts
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
4849c: 206a 008a moveal %a2@(138),%a0
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
484a0: 2008 movel %a0,%d0 484a2: 5880 addql #4,%d0 484a4: 2480 movel %d0,%a2@
old_last_node = the_chain->last;
484a6: 2268 0008 moveal %a0@(8),%a1
the_chain->last = the_node;
484aa: 214a 0008 movel %a2,%a0@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
484ae: 2549 0004 movel %a1,%a2@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
484b2: 228a movel %a2,%a1@ 484b4: 6000 ff78 braw 4842e <_Thread_Change_priority+0xc2>
000484b8 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
484b8: 327c 0700 moveaw #1792,%a1 484bc: 2009 movel %a1,%d0
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
484be: 4e56 ffec linkw %fp,#-20 484c2: 206e 0008 moveal %fp@(8),%a0 484c6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 484ca: 242e 000c movel %fp@(12),%d2
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
484ce: 40c3 movew %sr,%d3 484d0: 8083 orl %d3,%d0 484d2: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
484d4: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
484d8: 2002 movel %d2,%d0 484da: c081 andl %d1,%d0
484dc: 6776 beqs 48554 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
484de: 2002 movel %d2,%d0 484e0: 4680 notl %d0 484e2: c081 andl %d1,%d0
current_state =
484e4: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
484e8: 666a bnes 48554 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
484ea: 2868 008e moveal %a0@(142),%a4 484ee: 3028 0094 movew %a0@(148),%d0 484f2: 3214 movew %a4@,%d1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
484f4: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
484f8: 240a movel %a2,%d2 484fa: 5882 addql #4,%d2 484fc: 8081 orl %d1,%d0 484fe: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
48500: 266a 0008 moveal %a2@(8),%a3 48504: 3880 movew %d0,%a4@
the_chain->last = the_node;
48506: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4850a: 3239 0005 feac movew 5feac <_Priority_Major_bit_map>,%d1 48510: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
48514: 214b 0004 movel %a3,%a0@(4) 48518: 8081 orl %d1,%d0
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4851a: 2688 movel %a0,%a3@ 4851c: 33c0 0005 feac movew %d0,5feac <_Priority_Major_bit_map>
_ISR_Flash( level );
48522: 2009 movel %a1,%d0 48524: 46c3 movew %d3,%sr 48526: 8083 orl %d3,%d0 48528: 46c0 movew %d0,%sr
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4852a: 2028 0014 movel %a0@(20),%d0 4852e: 2279 0005 fe8a moveal 5fe8a <_Thread_Heir>,%a1 48534: b0a9 0014 cmpl %a1@(20),%d0
48538: 641a bccs 48554 <_Thread_Clear_state+0x9c>
_Thread_Heir = the_thread;
4853a: 23c8 0005 fe8a movel %a0,5fe8a <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
48540: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0 48546: 4a28 0075 tstb %a0@(117)
4854a: 6712 beqs 4855e <_Thread_Clear_state+0xa6>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4854c: 7001 moveq #1,%d0 4854e: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
48554: 46c3 movew %d3,%sr
}
48556: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4855a: 4e5e unlk %fp 4855c: 4e75 rts
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4855e: 4a80 tstl %d0
48560: 66f2 bnes 48554 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
48562: 7001 moveq #1,%d0 <== NOT EXECUTED 48564: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED 4856a: 60e8 bras 48554 <_Thread_Clear_state+0x9c> <== NOT EXECUTED
0004856c <_Thread_Close>:
4856c: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
4856e: 4e56 0000 linkw %fp,#0 48572: 2f0b movel %a3,%sp@- 48574: 266e 0008 moveal %fp@(8),%a3 48578: 2f0a movel %a2,%sp@- 4857a: 246e 000c moveal %fp@(12),%a2 4857e: 206b 0018 moveal %a3@(24),%a0 48582: 302a 000a movew %a2@(10),%d0 48586: 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;
4858a: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 48590: 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 );
48592: 2f0a movel %a2,%sp@- 48594: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> 4859a: 4eb9 0004 98a0 jsr 498a0 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
485a0: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 485a6: 5280 addql #1,%d0 485a8: 23c0 0005 fdfc movel %d0,5fdfc <_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 );
485ae: 2f0a movel %a2,%sp@- 485b0: 2f0b movel %a3,%sp@- 485b2: 4eb9 0004 7b9c jsr 47b9c <_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 );
485b8: 4878 0001 pea 1 <ADD> 485bc: 2f0a movel %a2,%sp@- 485be: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
485c4: 2f0a movel %a2,%sp@- 485c6: 4eb9 0004 8f74 jsr 48f74 <_Thread_queue_Extract_with_proxy> 485cc: 4fef 0018 lea %sp@(24),%sp 485d0: 4a00 tstb %d0
485d2: 6608 bnes 485dc <_Thread_Close+0x70>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
485d4: 7002 moveq #2,%d0 485d6: b0aa 0050 cmpl %a2@(80),%d0
485da: 6756 beqs 48632 <_Thread_Close+0xc6> /* * 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 ) )
485dc: b5f9 0005 fe82 cmpal 5fe82 <_Thread_Allocated_fp>,%a2
485e2: 6746 beqs 4862a <_Thread_Close+0xbe>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
485e4: 202a 00c4 movel %a2@(196),%d0
#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;
485e8: 42aa 0100 clrl %a2@(256)
if ( the_thread->Start.fp_context )
485ec: 4a80 tstl %d0
485ee: 670a beqs 485fa <_Thread_Close+0x8e>
(void) _Workspace_Free( the_thread->Start.fp_context );
485f0: 2f00 movel %d0,%sp@- 485f2: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 485f8: 588f addql #4,%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 );
485fa: 2f0a movel %a2,%sp@- 485fc: 4eb9 0004 9364 jsr 49364 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
48602: 202a 0114 movel %a2@(276),%d0 48606: 588f addql #4,%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;
48608: 42aa 00c8 clrl %a2@(200)
if ( the_thread->extensions )
4860c: 4a80 tstl %d0
4860e: 670a beqs 4861a <_Thread_Close+0xae>
(void) _Workspace_Free( the_thread->extensions );
48610: 2f00 movel %d0,%sp@- 48612: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48618: 588f addql #4,%sp
the_thread->extensions = NULL;
4861a: 42aa 0114 clrl %a2@(276)
}
4861e: 246e fff8 moveal %fp@(-8),%a2 48622: 266e fffc moveal %fp@(-4),%a3 48626: 4e5e unlk %fp 48628: 4e75 rts
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
4862a: 42b9 0005 fe82 clrl 5fe82 <_Thread_Allocated_fp> 48630: 60b2 bras 485e4 <_Thread_Close+0x78>
*/
_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 );
48632: 486a 0048 pea %a2@(72) 48636: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4863c: 588f addql #4,%sp
/* * 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 ) )
4863e: b5f9 0005 fe82 cmpal 5fe82 <_Thread_Allocated_fp>,%a2
48644: 669e bnes 485e4 <_Thread_Close+0x78> <== ALWAYS TAKEN
48646: 60e2 bras 4862a <_Thread_Close+0xbe> <== NOT EXECUTED
000486f8 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
486f8: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
486fc: 486e fffc pea %fp@(-4) 48700: 2f2e 0008 movel %fp@(8),%sp@- 48704: 4eb9 0004 88b4 jsr 488b4 <_Thread_Get>
switch ( location ) {
4870a: 508f addql #8,%sp 4870c: 4aae fffc tstl %fp@(-4)
48710: 661e bnes 48730 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
48712: 2f3c 1000 0018 movel #268435480,%sp@- 48718: 2f00 movel %d0,%sp@- 4871a: 4eb9 0004 84b8 jsr 484b8 <_Thread_Clear_state> 48720: 508f addql #8,%sp 48722: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 48728: 5380 subql #1,%d0 4872a: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
48730: 4e5e unlk %fp <== NOT EXECUTED
00048734 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
48734: 4e56 ffc8 linkw %fp,#-56 48738: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
4873c: 2e3c 0000 0700 movel #1792,%d7 48742: 2007 movel %d7,%d0
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
48744: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2
_ISR_Disable( level );
4874a: 40c1 movew %sr,%d1 4874c: 8081 orl %d1,%d0 4874e: 46c0 movew %d0,%sr
while ( _Context_Switch_necessary == true ) {
48750: 1039 0005 fec6 moveb 5fec6 <_Context_Switch_necessary>,%d0 48756: 6700 00fa beqw 48852 <_Thread_Dispatch+0x11e> 4875a: 260e movel %fp,%d3 4875c: 240e movel %fp,%d2 4875e: 5183 subql #8,%d3 48760: 2c3c 0004 cb48 movel #314184,%d6 48766: 0682 ffff fff0 addil #-16,%d2 4876c: 2a3c 0004 966c movel #300652,%d5 48772: 283c 0004 9624 movel #300580,%d4 48778: 4bf9 0004 992c lea 4992c <_User_extensions_Thread_switch>,%a5 4877e: 49f9 0004 9ca0 lea 49ca0 <_CPU_Context_switch>,%a4
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48784: 7001 moveq #1,%d0 48786: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
4878c: 2679 0005 fe8a moveal 5fe8a <_Thread_Heir>,%a3
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
48792: 4200 clrb %d0
_Thread_Executing = heir;
48794: 23cb 0005 feb6 movel %a3,5feb6 <_Thread_Executing>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
4879a: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary>
_Thread_Executing = heir;
#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 )
487a0: 7001 moveq #1,%d0 487a2: b0ab 007a cmpl %a3@(122),%d0 487a6: 6700 00d6 beqw 4887e <_Thread_Dispatch+0x14a>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
487aa: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
487ac: 2f03 movel %d3,%sp@- 487ae: 2046 moveal %d6,%a0 487b0: 4e90 jsr %a0@
_Timestamp_Subtract(
487b2: 2045 moveal %d5,%a0 487b4: 2f02 movel %d2,%sp@- 487b6: 2f03 movel %d3,%sp@- 487b8: 4879 0005 febe pea 5febe <_Thread_Time_of_last_context_switch> 487be: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
487c0: 2044 moveal %d4,%a0 487c2: 2f02 movel %d2,%sp@- 487c4: 486a 0082 pea %a2@(130) 487c8: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
487ca: 2079 0005 fe86 moveal 5fe86 <_Thread_libc_reent>,%a0 487d0: 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;
487d4: 202e fff8 movel %fp@(-8),%d0 487d8: 222e fffc movel %fp@(-4),%d1 487dc: 23c0 0005 febe movel %d0,5febe <_Thread_Time_of_last_context_switch> 487e2: 23c1 0005 fec2 movel %d1,5fec2 <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
487e8: 4a88 tstl %a0
487ea: 6708 beqs 487f4 <_Thread_Dispatch+0xc0> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
487ec: 2550 0104 movel %a0@,%a2@(260)
*_Thread_libc_reent = heir->libc_reent;
487f0: 20ab 0104 movel %a3@(260),%a0@
}
_User_extensions_Thread_switch( executing, heir );
487f4: 2f0b movel %a3,%sp@- 487f6: 2f0a movel %a2,%sp@- 487f8: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
487fa: 486b 00cc pea %a3@(204) 487fe: 486a 00cc pea %a2@(204) 48802: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
48804: 4fef 0010 lea %sp@(16),%sp 48808: 4aaa 0100 tstl %a2@(256)
4880c: 672c beqs 4883a <_Thread_Dispatch+0x106>
#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 );
4880e: 2079 0005 fe82 moveal 5fe82 <_Thread_Allocated_fp>,%a0 48814: b1ca cmpal %a2,%a0
48816: 6722 beqs 4883a <_Thread_Dispatch+0x106>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
48818: 4a88 tstl %a0
4881a: 670c beqs 48828 <_Thread_Dispatch+0xf4>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4881c: 4868 0100 pea %a0@(256) 48820: 4eb9 0004 9dd6 jsr 49dd6 <_CPU_Context_save_fp> 48826: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
48828: 486a 0100 pea %a2@(256) 4882c: 4eb9 0004 9e0e jsr 49e0e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
48832: 588f addql #4,%sp 48834: 23ca 0005 fe82 movel %a2,5fe82 <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
4883a: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2
_ISR_Disable( level );
48840: 2007 movel %d7,%d0 48842: 40c1 movew %sr,%d1 48844: 8081 orl %d1,%d0 48846: 46c0 movew %d0,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
48848: 1039 0005 fec6 moveb 5fec6 <_Context_Switch_necessary>,%d0 4884e: 6600 ff34 bnew 48784 <_Thread_Dispatch+0x50>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
48852: 42b9 0005 fdfc clrl 5fdfc <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
48858: 46c1 movew %d1,%sr
if ( _Thread_Do_post_task_switch_extension ||
4885a: 4ab9 0005 fe9e tstl 5fe9e <_Thread_Do_post_task_switch_extension>
48860: 6606 bnes 48868 <_Thread_Dispatch+0x134> <== NEVER TAKEN
executing->do_post_task_switch_extension ) {
48862: 4a2a 0074 tstb %a2@(116)
48866: 670c beqs 48874 <_Thread_Dispatch+0x140>
executing->do_post_task_switch_extension = false;
48868: 4201 clrb %d1 4886a: 1541 0074 moveb %d1,%a2@(116)
_API_extensions_Run_postswitch();
4886e: 4eb9 0004 6fcc jsr 46fcc <_API_extensions_Run_postswitch>
}
}
48874: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4887a: 4e5e unlk %fp 4887c: 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;
4887e: 41f9 0005 fdac lea 5fdac <_Thread_Ticks_per_timeslice>,%a0 48884: 2750 0076 movel %a0@,%a3@(118) 48888: 6000 ff20 braw 487aa <_Thread_Dispatch+0x76>
0004888c <_Thread_Enable_dispatch>:
#if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \
(CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
4888c: 4e56 0000 linkw %fp,#0
if ( --_Thread_Dispatch_disable_level )
48890: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 48896: 5380 subql #1,%d0 48898: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level> 4889e: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0
488a4: 6704 beqs 488aa <_Thread_Enable_dispatch+0x1e>
return;
_Thread_Dispatch();
}
488a6: 4e5e unlk %fp 488a8: 4e75 rts 488aa: 4e5e unlk %fp
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
return;
_Thread_Dispatch();
488ac: 4ef9 0004 8734 jmp 48734 <_Thread_Dispatch>
...
0004efac <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
4efac: 4e56 0000 linkw %fp,#0
Thread_Control *executing;
executing = _Thread_Executing;
4efb0: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0
if ( !_States_Is_ready( executing->current_state ) ||
4efb6: 4aa8 0010 tstl %a0@(16)
4efba: 660e bnes 4efca <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN
4efbc: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0
4efc2: 6712 beqs 4efd6 <_Thread_Evaluate_mode+0x2a>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
4efc4: 4a28 0075 tstb %a0@(117)
4efc8: 670c beqs 4efd6 <_Thread_Evaluate_mode+0x2a> <== NEVER TAKEN
_Context_Switch_necessary = true;
return true;
}
return false;
}
4efca: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
4efcc: 7001 moveq #1,%d0 4efce: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary>
return true;
}
return false;
}
4efd4: 4e75 rts 4efd6: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
return true;
4efd8: 4200 clrb %d0 <== NOT EXECUTED
}
return false;
}
0004efdc <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4efdc: 4e56 0000 linkw %fp,#0 4efe0: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4efe2: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4efe8: 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;
4efea: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
4efee: 40c0 movew %sr,%d0 4eff0: e189 lsll #8,%d1 4eff2: 0280 0000 f8ff andil #63743,%d0 4eff8: 8081 orl %d1,%d0 4effa: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
4effc: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4effe: 1439 0005 f5b4 moveb 5f5b4 <doneConstructors.3595>,%d2
doneConstructors = 1;
4f004: 13c0 0005 f5b4 moveb %d0,5f5b4 <doneConstructors.3595>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4f00a: 4aaa 0100 tstl %a2@(256)
4f00e: 6720 beqs 4f030 <_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 );
4f010: 2079 0005 fe82 moveal 5fe82 <_Thread_Allocated_fp>,%a0 4f016: b1ca cmpal %a2,%a0
4f018: 6716 beqs 4f030 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4f01a: 4a88 tstl %a0
4f01c: 670c beqs 4f02a <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4f01e: 4868 0100 pea %a0@(256) 4f022: 4eb9 0004 9dd6 jsr 49dd6 <_CPU_Context_save_fp> 4f028: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4f02a: 23ca 0005 fe82 movel %a2,5fe82 <_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 );
4f030: 2f0a movel %a2,%sp@- 4f032: 4eb9 0004 9784 jsr 49784 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4f038: 4eb9 0004 888c jsr 4888c <_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) */ {
4f03e: 588f addql #4,%sp 4f040: 4a02 tstb %d2
4f042: 6746 beqs 4f08a <_Thread_Handler+0xae>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4f044: 4aaa 009e tstl %a2@(158)
4f048: 6718 beqs 4f062 <_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 );
4f04a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f04c: 4eb9 0004 97c2 jsr 497c2 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4f052: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 4f056: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4f05a: 42a7 clrl %sp@- <== NOT EXECUTED 4f05c: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred> <== NOT EXECUTED
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4f062: 2f2a 00a6 movel %a2@(166),%sp@- 4f066: 206a 009a moveal %a2@(154),%a0 4f06a: 4e90 jsr %a0@
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4f06c: 588f addql #4,%sp 4f06e: 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 );
4f072: 2f0a movel %a2,%sp@- 4f074: 4eb9 0004 97c2 jsr 497c2 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4f07a: 4878 0006 pea 6 <EXTENDSFDF> 4f07e: 4878 0001 pea 1 <ADD> 4f082: 42a7 clrl %sp@- 4f084: 4eb9 0004 7a48 jsr 47a48 <_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 ();
4f08a: 4eb9 0005 ca0c jsr 5ca0c <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4f090: 4aaa 009e tstl %a2@(158)
4f094: 66b4 bnes 4f04a <_Thread_Handler+0x6e> <== NEVER TAKEN
4f096: 60ca bras 4f062 <_Thread_Handler+0x86>
00048b20 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48b20: 4e56 0000 linkw %fp,#0
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48b24: 4ab9 0005 e6c8 tstl 5e6c8 <Configuration+0x24> 48b2a: 57c0 seq %d0 48b2c: 4ab9 0005 e6c4 tstl 5e6c4 <Configuration+0x20> 48b32: 57c1 seq %d1 48b34: 4480 negl %d0 48b36: 4481 negl %d1 48b38: b380 eorl %d1,%d0
uint32_t maximum_extensions;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
48b3a: 2239 0005 e6b4 movel 5e6b4 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
48b40: 2079 0005 e6ac moveal 5e6ac <Configuration+0x8>,%a0
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48b46: 2f02 movel %d2,%sp@-
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48b48: 4a00 tstb %d0 48b4a: 6600 00a2 bnew 48bee <_Thread_Handler_initialization+0xce>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48b4e: 4280 clrl %d0 48b50: 1039 0005 e6a2 moveb 5e6a2 <rtems_maximum_priority>,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48b56: 4282 clrl %d2
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48b58: 5280 addql #1,%d0
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
48b5a: 23c1 0005 fdac movel %d1,5fdac <_Thread_Ticks_per_timeslice>
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48b60: 2200 movel %d0,%d1 48b62: e588 lsll #2,%d0 48b64: e989 lsll #4,%d1
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
48b66: 23c8 0005 fe9a movel %a0,5fe9a <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48b6c: 9280 subl %d0,%d1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
48b6e: 4200 clrb %d0
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48b70: 2f01 movel %d1,%sp@-
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
48b72: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary>
_Thread_Executing = NULL;
48b78: 42b9 0005 feb6 clrl 5feb6 <_Thread_Executing>
_Thread_Heir = NULL;
48b7e: 42b9 0005 fe8a clrl 5fe8a <_Thread_Heir>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL;
48b84: 42b9 0005 fe82 clrl 5fe82 <_Thread_Allocated_fp>
#endif
_Thread_Do_post_task_switch_extension = 0;
48b8a: 42b9 0005 fe9e clrl 5fe9e <_Thread_Do_post_task_switch_extension>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48b90: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error>
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48b96: 588f addql #4,%sp 48b98: 1439 0005 e6a2 moveb 5e6a2 <rtems_maximum_priority>,%d2 48b9e: 2040 moveal %d0,%a0 48ba0: 4281 clrl %d1
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48ba2: 23c0 0005 fda8 movel %d0,5fda8 <_Thread_Ready_chain>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48ba8: 2008 movel %a0,%d0 48baa: 5880 addql #4,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48bac: 5281 addql #1,%d1 48bae: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
48bb0: 42a8 0004 clrl %a0@(4)
the_chain->last = _Chain_Head(the_chain);
48bb4: 2148 0008 movel %a0,%a0@(8) 48bb8: 41e8 000c lea %a0@(12),%a0 48bbc: b481 cmpl %d1,%d2
48bbe: 64e8 bccs 48ba8 <_Thread_Handler_initialization+0x88>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48bc0: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 48bc4: 42a7 clrl %sp@- 48bc6: 4878 011c pea 11c <DBL_MANT_DIG+0xe7> 48bca: 4878 0001 pea 1 <ADD> 48bce: 4878 0001 pea 1 <ADD> 48bd2: 4878 0001 pea 1 <ADD> 48bd6: 4879 0005 ff46 pea 5ff46 <_Thread_Internal_information> 48bdc: 4eb9 0004 8014 jsr 48014 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48be2: 242e fffc movel %fp@(-4),%d2
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48be6: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48bea: 4e5e unlk %fp 48bec: 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(
48bee: 4878 000f pea f <FPTRAP> 48bf2: 4878 0001 pea 1 <ADD> 48bf6: 42a7 clrl %sp@- 48bf8: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred>
...
00048950 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
48950: 4e56 ffec linkw %fp,#-20 48954: 48d7 043c moveml %d2-%d5/%a2,%sp@ 48958: 242e 0014 movel %fp@(20),%d2
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
4895c: 2f02 movel %d2,%sp@-
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
4895e: 246e 000c moveal %fp@(12),%a2 48962: 282e 0018 movel %fp@(24),%d4
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
48966: 42aa 0108 clrl %a2@(264)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
4896a: 262e 001c movel %fp@(28),%d3
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
4896e: 42aa 010c clrl %a2@(268) 48972: 42aa 0110 clrl %a2@(272)
extensions_area = NULL;
the_thread->libc_reent = NULL;
48976: 42aa 0104 clrl %a2@(260)
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
4897a: 2f0a movel %a2,%sp@-
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
4897c: 1a2e 0023 moveb %fp@(35),%d5
/*
* Allocate and Initialize the stack for this thread.
*/
#if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
48980: 4eb9 0004 9300 jsr 49300 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
48986: 508f addql #8,%sp 48988: 4a80 tstl %d0 4898a: 6700 011e beqw 48aaa <_Thread_Initialize+0x15a> 4898e: b082 cmpl %d2,%d0 48990: 6500 0118 bcsw 48aaa <_Thread_Initialize+0x15a>
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
the_stack->size = size;
48994: 2540 00bc movel %d0,%a2@(188)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
48998: 256a 00c8 00c0 movel %a2@(200),%a2@(192)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
4899e: 4a04 tstb %d4 489a0: 6600 0120 bnew 48ac2 <_Thread_Initialize+0x172> 489a4: 4280 clrl %d0 489a6: 4284 clrl %d4
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
489a8: 2239 0005 fe9a movel 5fe9a <_Thread_Maximum_extensions>,%d1
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
489ae: 2540 00c4 movel %d0,%a2@(196)
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
489b2: 2540 0100 movel %d0,%a2@(256)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
489b6: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
489ba: 42aa 0064 clrl %a2@(100)
the_watchdog->id = id;
489be: 42aa 0068 clrl %a2@(104)
the_watchdog->user_data = user_data;
489c2: 42aa 006c clrl %a2@(108)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
489c6: 4a81 tstl %d1 489c8: 6600 011a bnew 48ae4 <_Thread_Initialize+0x194>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
489cc: 42aa 0114 clrl %a2@(276) 489d0: 4282 clrl %d2
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
489d2: 2f03 movel %d3,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
489d4: 256e 002c 00b4 movel %fp@(44),%a2@(180)
the_thread->current_state = STATES_DORMANT;
489da: 7001 moveq #1,%d0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
489dc: 256e 0024 00ac movel %fp@(36),%a2@(172)
the_thread->Start.budget_callout = budget_callout;
489e2: 256e 0028 00b0 movel %fp@(40),%a2@(176)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
489e8: 1545 00aa moveb %d5,%a2@(170)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
489ec: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
489ee: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
489f2: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
489f6: 42aa 001c clrl %a2@(28)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
489fa: 2543 0018 movel %d3,%a2@(24)
the_thread->Start.initial_priority = priority;
489fe: 2543 00b8 movel %d3,%a2@(184)
_Thread_Set_priority( the_thread, priority );
48a02: 4eb9 0004 90f8 jsr 490f8 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48a08: 206e 0008 moveal %fp@(8),%a0 48a0c: 4280 clrl %d0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
48a0e: 256e 0030 000c movel %fp@(48),%a2@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48a14: 2068 0018 moveal %a0@(24),%a0 48a18: 302a 000a movew %a2@(10),%d0
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
48a1c: 42aa 0082 clrl %a2@(130) 48a20: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48a24: 42aa 0086 clrl %a2@(134)
* enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread );
48a28: 2f0a movel %a2,%sp@- 48a2a: 4eb9 0004 9854 jsr 49854 <_User_extensions_Thread_create>
if ( extension_status )
48a30: 4fef 000c lea %sp@(12),%sp 48a34: 4a00 tstb %d0
48a36: 667e bnes 48ab6 <_Thread_Initialize+0x166>
return true;
failed:
if ( the_thread->libc_reent )
48a38: 202a 0104 movel %a2@(260),%d0
48a3c: 670a beqs 48a48 <_Thread_Initialize+0xf8>
_Workspace_Free( the_thread->libc_reent );
48a3e: 2f00 movel %d0,%sp@- 48a40: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a46: 588f addql #4,%sp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48a48: 202a 0108 movel %a2@(264),%d0
48a4c: 670a beqs 48a58 <_Thread_Initialize+0x108>
_Workspace_Free( the_thread->API_Extensions[i] );
48a4e: 2f00 movel %d0,%sp@- 48a50: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a56: 588f addql #4,%sp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48a58: 202a 010c movel %a2@(268),%d0
48a5c: 670a beqs 48a68 <_Thread_Initialize+0x118> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
48a5e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48a60: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> <== NOT EXECUTED 48a66: 588f addql #4,%sp <== NOT EXECUTED
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48a68: 202a 0110 movel %a2@(272),%d0
48a6c: 670a beqs 48a78 <_Thread_Initialize+0x128> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
48a6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48a70: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> <== NOT EXECUTED 48a76: 588f addql #4,%sp <== NOT EXECUTED
if ( extensions_area )
48a78: 4a82 tstl %d2
48a7a: 670a beqs 48a86 <_Thread_Initialize+0x136>
(void) _Workspace_Free( extensions_area );
48a7c: 2f02 movel %d2,%sp@- 48a7e: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a84: 588f addql #4,%sp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
48a86: 4a84 tstl %d4
48a88: 670a beqs 48a94 <_Thread_Initialize+0x144>
(void) _Workspace_Free( fp_area );
48a8a: 2f04 movel %d4,%sp@- 48a8c: 4eb9 0004 9c20 jsr 49c20 <_Workspace_Free> 48a92: 588f addql #4,%sp
#endif
_Thread_Stack_Free( the_thread );
48a94: 2f0a movel %a2,%sp@- 48a96: 4eb9 0004 9364 jsr 49364 <_Thread_Stack_Free>
return false;
48a9c: 588f addql #4,%sp
}
48a9e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
48aa4: 4200 clrb %d0
return false;
}
48aa6: 4e5e unlk %fp 48aa8: 4e75 rts 48aaa: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return false;
48ab0: 4200 clrb %d0
}
48ab2: 4e5e unlk %fp 48ab4: 4e75 rts 48ab6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
* user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status )
48abc: 7001 moveq #1,%d0
_Thread_Stack_Free( the_thread );
return false;
}
48abe: 4e5e unlk %fp 48ac0: 4e75 rts
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
48ac2: 4878 001c pea 1c <OPER2+0x8> 48ac6: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate>
if ( !fp_area )
48acc: 588f addql #4,%sp
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
48ace: 2800 movel %d0,%d4
if ( !fp_area )
48ad0: 6600 fed6 bnew 489a8 <_Thread_Initialize+0x58>
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48ad4: 202a 0104 movel %a2@(260),%d0
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
48ad8: 4282 clrl %d2
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48ada: 4a80 tstl %d0 48adc: 6600 ff60 bnew 48a3e <_Thread_Initialize+0xee> 48ae0: 6000 ff66 braw 48a48 <_Thread_Initialize+0xf8>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48ae4: e589 lsll #2,%d1 48ae6: 2041 moveal %d1,%a0 48ae8: 4868 0004 pea %a0@(4) 48aec: 4eb9 0004 9c04 jsr 49c04 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48af2: 588f addql #4,%sp
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48af4: 2400 movel %d0,%d2
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48af6: 6700 ff40 beqw 48a38 <_Thread_Initialize+0xe8>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48afa: 2040 moveal %d0,%a0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
48afc: 4281 clrl %d1 48afe: 4280 clrl %d0 48b00: 2279 0005 fe9a moveal 5fe9a <_Thread_Maximum_extensions>,%a1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48b06: 2542 0114 movel %d2,%a2@(276)
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
48b0a: 42b0 1c00 clrl %a0@(00000000,%d1:l:4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
48b0e: 5280 addql #1,%d0 48b10: 2200 movel %d0,%d1 48b12: b089 cmpl %a1,%d0 48b14: 6200 febc bhiw 489d2 <_Thread_Initialize+0x82> 48b18: 206a 0114 moveal %a2@(276),%a0 48b1c: 60ec bras 48b0a <_Thread_Initialize+0x1ba>
...
0004dfac <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4dfac: 4e56 0000 linkw %fp,#0 4dfb0: 2f0a movel %a2,%sp@- 4dfb2: 246e 0008 moveal %fp@(8),%a2
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
4dfb6: 256e 0010 00a6 movel %fp@(16),%a2@(166)
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4dfbc: 256a 00ac 007a movel %a2@(172),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4dfc2: 256a 00b0 007e movel %a2@(176),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4dfc8: 256e 000c 00a2 movel %fp@(12),%a2@(162)
{
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4dfce: 156a 00aa 0075 moveb %a2@(170),%a2@(117)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4dfd4: 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 ) ) {
4dfd8: 2f0a movel %a2,%sp@- 4dfda: 4eb9 0004 9b88 jsr 49b88 <_Thread_queue_Extract_with_proxy> 4dfe0: 588f addql #4,%sp 4dfe2: 4a00 tstb %d0
4dfe4: 6608 bnes 4dfee <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4dfe6: 7002 moveq #2,%d0 4dfe8: b0aa 0050 cmpl %a2@(80),%d0
4dfec: 672a beqs 4e018 <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4dfee: 202a 00b8 movel %a2@(184),%d0 4dff2: b0aa 0014 cmpl %a2@(20),%d0
4dff6: 6718 beqs 4e010 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4dff8: 2d4a 0008 movel %a2,%fp@(8) 4dffc: 2d40 000c movel %d0,%fp@(12)
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(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;
4e000: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
4e004: 246e fffc moveal %fp@(-4),%a2 4e008: 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 );
4e00a: 4ef9 0004 9d98 jmp 49d98 <_Thread_Set_priority>
} }
4e010: 246e fffc moveal %fp@(-4),%a2 4e014: 4e5e unlk %fp 4e016: 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 );
4e018: 486a 0048 pea %a2@(72) 4e01c: 4eb9 0004 a798 jsr 4a798 <_Watchdog_Remove> 4e022: 588f addql #4,%sp 4e024: 60c8 bras 4dfee <_Thread_Reset+0x42>
...
0004d2c8 <_Thread_Reset_timeslice>:
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
4d2c8: 223c 0000 0700 movel #1792,%d1 4d2ce: 2001 movel %d1,%d0
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
4d2d0: 4e56 fff4 linkw %fp,#-12
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
4d2d4: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
4d2da: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
4d2de: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
4d2e2: 40c2 movew %sr,%d2 4d2e4: 8082 orl %d2,%d0 4d2e6: 46c0 movew %d0,%sr
if ( _Chain_Has_only_one_node( ready ) ) {
4d2e8: 2029 0008 movel %a1@(8),%d0 4d2ec: b091 cmpl %a1@,%d0
4d2ee: 6752 beqs 4d342 <_Thread_Reset_timeslice+0x7a>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4d2f0: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4d2f2: 2009 movel %a1,%d0 4d2f4: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4d2f6: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
4d2fa: 268a movel %a2,%a3@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4d2fc: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4d300: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
4d302: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
4d306: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4d30a: 214a 0004 movel %a2,%a0@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4d30e: 2488 movel %a0,%a2@
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
4d310: 46c2 movew %d2,%sr 4d312: 8282 orl %d2,%d1 4d314: 46c1 movew %d1,%sr
if ( _Thread_Is_heir( executing ) )
4d316: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0
4d31c: 6712 beqs 4d330 <_Thread_Reset_timeslice+0x68> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
4d31e: 7001 moveq #1,%d0 <== NOT EXECUTED 4d320: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
4d326: 46c2 movew %d2,%sr <== NOT EXECUTED
}
4d328: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4d32c: 4e5e unlk %fp 4d32e: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
4d330: 23d1 0005 fe8a movel %a1@,5fe8a <_Thread_Heir>
_Context_Switch_necessary = true;
4d336: 7001 moveq #1,%d0 4d338: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary>
_ISR_Enable( level );
4d33e: 46c2 movew %d2,%sr 4d340: 60e6 bras 4d328 <_Thread_Reset_timeslice+0x60>
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
4d342: 46c2 movew %d2,%sr
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
4d344: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
4d348: 4e5e unlk %fp <== NOT EXECUTED
00049d0c <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49d0c: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
49d0e: 4e56 0000 linkw %fp,#0 49d12: 2f0a movel %a2,%sp@- 49d14: 246e 0008 moveal %fp@(8),%a2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49d18: c0aa 0010 andl %a2@(16),%d0 49d1c: 4a00 tstb %d0
49d1e: 670a beqs 49d2a <_Thread_Restart+0x1e>
return true;
}
return false;
}
49d20: 246e fffc moveal %fp@(-4),%a2 49d24: 4e5e unlk %fp
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49d26: 4200 clrb %d0
return true;
}
return false;
}
49d28: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
49d2a: 2f0a movel %a2,%sp@- 49d2c: 4eb9 0004 9f1c jsr 49f1c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
49d32: 2f2e 0010 movel %fp@(16),%sp@- 49d36: 2f2e 000c movel %fp@(12),%sp@- 49d3a: 2f0a movel %a2,%sp@- 49d3c: 4eb9 0004 dfac jsr 4dfac <_Thread_Reset>
_Thread_Load_environment( the_thread );
49d42: 2f0a movel %a2,%sp@- 49d44: 4eb9 0004 dc00 jsr 4dc00 <_Thread_Load_environment>
_Thread_Ready( the_thread );
49d4a: 2f0a movel %a2,%sp@- 49d4c: 4eb9 0004 deec jsr 4deec <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
49d52: 2f0a movel %a2,%sp@- 49d54: 4eb9 0004 a588 jsr 4a588 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
49d5a: 4fef 001c lea %sp@(28),%sp 49d5e: b5f9 0006 0e5e cmpal 60e5e <_Thread_Executing>,%a2
49d64: 670a beqs 49d70 <_Thread_Restart+0x64>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49d66: 7001 moveq #1,%d0
return true;
}
return false;
}
49d68: 246e fffc moveal %fp@(-4),%a2 49d6c: 4e5e unlk %fp 49d6e: 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 )
49d70: 4aaa 0100 tstl %a2@(256)
49d74: 6712 beqs 49d88 <_Thread_Restart+0x7c>
_Context_Restore_fp( &_Thread_Executing->fp_context );
49d76: 486a 0100 pea %a2@(256) 49d7a: 4eb9 0004 aaf2 jsr 4aaf2 <_CPU_Context_restore_fp> 49d80: 2479 0006 0e5e moveal 60e5e <_Thread_Executing>,%a2 49d86: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49d88: 486a 00cc pea %a2@(204) 49d8c: 4eb9 0004 a99a jsr 4a99a <_CPU_Context_Restart_self>
49d92: 588f addql #4,%sp <== NOT EXECUTED 49d94: 7001 moveq #1,%d0 <== NOT EXECUTED 49d96: 60d0 bras 49d68 <_Thread_Restart+0x5c> <== NOT EXECUTED
0004c79c <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c79c: 327c 0700 moveaw #1792,%a1 4c7a0: 2009 movel %a1,%d0
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4c7a2: 4e56 ffec linkw %fp,#-20 4c7a6: 206e 0008 moveal %fp@(8),%a0 4c7aa: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c7ae: 40c1 movew %sr,%d1 4c7b0: 8081 orl %d1,%d0 4c7b2: 46c0 movew %d0,%sr
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
4c7b4: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4c7b8: 0800 0001 btst #1,%d0
4c7bc: 6774 beqs 4c832 <_Thread_Resume+0x96> <== NEVER TAKEN
4c7be: 74fd moveq #-3,%d2 4c7c0: c082 andl %d2,%d0
current_state =
4c7c2: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
4c7c6: 666a bnes 4c832 <_Thread_Resume+0x96>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4c7c8: 2868 008e moveal %a0@(142),%a4 4c7cc: 3028 0094 movew %a0@(148),%d0 4c7d0: 3414 movew %a4@,%d2
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4c7d2: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4c7d6: 260a movel %a2,%d3 4c7d8: 5883 addql #4,%d3 4c7da: 8082 orl %d2,%d0 4c7dc: 2083 movel %d3,%a0@
old_last_node = the_chain->last;
4c7de: 266a 0008 moveal %a2@(8),%a3 4c7e2: 3880 movew %d0,%a4@
the_chain->last = the_node;
4c7e4: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c7e8: 3439 0006 3a04 movew 63a04 <_Priority_Major_bit_map>,%d2 4c7ee: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
4c7f2: 214b 0004 movel %a3,%a0@(4) 4c7f6: 8082 orl %d2,%d0
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4c7f8: 2688 movel %a0,%a3@ 4c7fa: 33c0 0006 3a04 movew %d0,63a04 <_Priority_Major_bit_map>
_ISR_Flash( level );
4c800: 2009 movel %a1,%d0 4c802: 46c1 movew %d1,%sr 4c804: 8081 orl %d1,%d0 4c806: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4c808: 2028 0014 movel %a0@(20),%d0 4c80c: 2279 0006 39e2 moveal 639e2 <_Thread_Heir>,%a1 4c812: b0a9 0014 cmpl %a1@(20),%d0
4c816: 641a bccs 4c832 <_Thread_Resume+0x96>
_Thread_Heir = the_thread;
4c818: 23c8 0006 39e2 movel %a0,639e2 <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
4c81e: 2079 0006 3a0e moveal 63a0e <_Thread_Executing>,%a0 4c824: 4a28 0075 tstb %a0@(117)
4c828: 6712 beqs 4c83c <_Thread_Resume+0xa0>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c82a: 7001 moveq #1,%d0 4c82c: 13c0 0006 3a1e moveb %d0,63a1e <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
4c832: 46c1 movew %d1,%sr
}
4c834: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c838: 4e5e unlk %fp 4c83a: 4e75 rts
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4c83c: 4a80 tstl %d0
4c83e: 66f2 bnes 4c832 <_Thread_Resume+0x96> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c840: 7001 moveq #1,%d0
4c842: 13c0 0006 3a1e moveb %d0,63a1e <_Context_Switch_necessary> <== NOT EXECUTED 4c848: 60e8 bras 4c832 <_Thread_Resume+0x96> <== NOT EXECUTED
...
00049364 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
49364: 4e56 0000 linkw %fp,#0 49368: 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 )
4936c: 2279 0005 e6c8 moveal 5e6c8 <Configuration+0x24>,%a1 49372: 4a89 tstl %a1
49374: 670a beqs 49380 <_Thread_Stack_Free+0x1c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
49376: 2d68 00c0 0008 movel %a0@(192),%fp@(8)
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
4937c: 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 );
4937e: 4ed1 jmp %a1@
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
49380: 2d68 00c0 0008 movel %a0@(192),%fp@(8)
}
49386: 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 );
49388: 4ef9 0004 9c20 jmp 49c20 <_Workspace_Free>
...
00049438 <_Thread_Suspend>:
{
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
49438: 203c 0000 0700 movel #1792,%d0
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
4943e: 4e56 fff4 linkw %fp,#-12 49442: 206e 0008 moveal %fp@(8),%a0 49446: 48d7 040c moveml %d2-%d3/%a2,%sp@
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
4944a: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
4944e: 40c1 movew %sr,%d1 49450: 8081 orl %d1,%d0 49452: 46c0 movew %d0,%sr
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
49454: 2028 0010 movel %a0@(16),%d0
49458: 6642 bnes 4949c <_Thread_Suspend+0x64>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
4945a: 7002 moveq #2,%d0
if ( _Chain_Has_only_one_node( ready ) ) {
4945c: 2429 0008 movel %a1@(8),%d2
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
49460: 2140 0010 movel %d0,%a0@(16)
if ( _Chain_Has_only_one_node( ready ) ) {
49464: b491 cmpl %a1@,%d2 49466: 6700 0098 beqw 49500 <_Thread_Suspend+0xc8>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4946a: 2250 moveal %a0@,%a1
previous = the_node->previous;
4946c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
49470: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
49472: 234a 0004 movel %a2,%a1@(4)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
49476: 203c 0000 0700 movel #1792,%d0 4947c: 46c1 movew %d1,%sr 4947e: 8081 orl %d1,%d0 49480: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
49482: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0
49488: 6730 beqs 494ba <_Thread_Suspend+0x82>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
4948a: b1f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a0
49490: 671c beqs 494ae <_Thread_Suspend+0x76> <== NEVER TAKEN
_Context_Switch_necessary = true;
_ISR_Enable( level );
49492: 46c1 movew %d1,%sr
}
49494: 4cd7 040c moveml %sp@,%d2-%d3/%a2 49498: 4e5e unlk %fp 4949a: 4e75 rts
_ISR_Disable( level );
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
4949c: 7402 moveq #2,%d2 4949e: 8480 orl %d0,%d2 494a0: 2142 0010 movel %d2,%a0@(16)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
494a4: 46c1 movew %d1,%sr
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
494a6: 4cd7 040c moveml %sp@,%d2-%d3/%a2 494aa: 4e5e unlk %fp 494ac: 4e75 rts
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
494ae: 7401 moveq #1,%d2 494b0: 13c2 0005 fec6 moveb %d2,5fec6 <_Context_Switch_necessary>
_ISR_Enable( level );
494b6: 46c1 movew %d1,%sr 494b8: 60da bras 49494 <_Thread_Suspend+0x5c>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
494ba: 3039 0005 feac movew 5feac <_Priority_Major_bit_map>,%d0 494c0: 4840 swap %d0 494c2: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
494c4: 4282 clrl %d2 494c6: 43f9 0005 ff18 lea 5ff18 <_Priority_Bit_map>,%a1 494cc: 3400 movew %d0,%d2 494ce: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 494d2: 4840 swap %d0 494d4: 04c0 ff1 %d0 494d6: 4283 clrl %d3 494d8: e98a lsll #4,%d2 494da: 3600 movew %d0,%d3 494dc: 2279 0005 fda8 moveal 5fda8 <_Thread_Ready_chain>,%a1 494e2: 2002 movel %d2,%d0 494e4: d083 addl %d3,%d0 494e6: 2400 movel %d0,%d2 494e8: e58a lsll #2,%d2 494ea: e988 lsll #4,%d0 494ec: 93c2 subal %d2,%a1 494ee: d3c0 addal %d0,%a1 494f0: 23d1 0005 fe8a movel %a1@,5fe8a <_Thread_Heir>
_ISR_Flash( level );
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
494f6: b1f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a0
494fc: 6694 bnes 49492 <_Thread_Suspend+0x5a> <== NEVER TAKEN
494fe: 60ae bras 494ae <_Thread_Suspend+0x76>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49500: 2009 movel %a1,%d0 49502: 5880 addql #4,%d0
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
49504: 2468 008e moveal %a0@(142),%a2 49508: 2280 movel %d0,%a1@ 4950a: 3412 movew %a2@,%d2 4950c: 3028 0098 movew %a0@(152),%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49510: 2349 0008 movel %a1,%a1@(8) 49514: c082 andl %d2,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
49516: 42a9 0004 clrl %a1@(4) 4951a: 3480 movew %d0,%a2@
the_thread->current_state = STATES_SUSPENDED;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
4951c: 6600 ff58 bnew 49476 <_Thread_Suspend+0x3e>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
49520: 3439 0005 feac movew 5feac <_Priority_Major_bit_map>,%d2 49526: 3028 0096 movew %a0@(150),%d0 4952a: c082 andl %d2,%d0 4952c: 33c0 0005 feac movew %d0,5feac <_Priority_Major_bit_map>
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
49532: 203c 0000 0700 movel #1792,%d0 49538: 46c1 movew %d1,%sr 4953a: 8081 orl %d1,%d0 4953c: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
4953e: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0 49544: 6600 ff44 bnew 4948a <_Thread_Suspend+0x52> 49548: 6000 ff70 braw 494ba <_Thread_Suspend+0x82>
00049598 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
49598: 4e56 fff4 linkw %fp,#-12
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
4959c: 2079 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a0
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
495a2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
495a6: 243c 0000 0700 movel #1792,%d2 495ac: 2002 movel %d2,%d0
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
495ae: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
495b2: 40c1 movew %sr,%d1 495b4: 8081 orl %d1,%d0 495b6: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
495b8: 2029 0008 movel %a1@(8),%d0 495bc: b091 cmpl %a1@,%d0
495be: 6750 beqs 49610 <_Thread_Yield_processor+0x78>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
495c0: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
495c2: 2009 movel %a1,%d0 495c4: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
495c6: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
495ca: 268a movel %a2,%a3@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
495cc: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
495d0: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
495d2: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
495d6: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
495da: 214a 0004 movel %a2,%a0@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
495de: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
495e0: 46c1 movew %d1,%sr 495e2: 8481 orl %d1,%d2 495e4: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
495e6: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0
495ec: 6712 beqs 49600 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
495ee: 7001 moveq #1,%d0 <== NOT EXECUTED 495f0: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
495f6: 46c1 movew %d1,%sr
}
495f8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 495fc: 4e5e unlk %fp 495fe: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
49600: 23d1 0005 fe8a movel %a1@,5fe8a <_Thread_Heir>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
49606: 7001 moveq #1,%d0 49608: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> 4960e: 60e6 bras 495f6 <_Thread_Yield_processor+0x5e>
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
49610: b1f9 0005 fe8a cmpal 5fe8a <_Thread_Heir>,%a0
49616: 67de beqs 495f6 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN
_Context_Switch_necessary = true;
49618: 7001 moveq #1,%d0 <== NOT EXECUTED 4961a: 13c0 0005 fec6 moveb %d0,5fec6 <_Context_Switch_necessary> <== NOT EXECUTED 49620: 60d4 bras 495f6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED
...
00048304 <_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 ) ) {
48304: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
48306: 4e56 0000 linkw %fp,#0 4830a: 202e 0010 movel %fp@(16),%d0 4830e: 2f0a movel %a2,%sp@- 48310: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
48314: 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 ) ) {
48318: b2aa 0050 cmpl %a2@(80),%d1
4831c: 671c beqs 4833a <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
4831e: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
48320: 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
}
48324: 246e fffc moveal %fp@(-4),%a2 48328: 203c 1003 fff8 movel #268697592,%d0 4832e: 2d40 000c movel %d0,%fp@(12) 48332: 4e5e unlk %fp 48334: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4833a: 123c 0003 moveb #3,%d1 4833e: 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 );
48342: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
48344: 486a 0048 pea %a2@(72) 48348: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4834e: 588f addql #4,%sp 48350: 203c 1003 fff8 movel #268697592,%d0 48356: 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
}
4835a: 246e fffc moveal %fp@(-4),%a2 4835e: 2d40 000c movel %d0,%fp@(12) 48362: 4e5e unlk %fp 48364: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state>
...
00048dfc <_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
)
{
48dfc: 4e56 ffe4 linkw %fp,#-28 48e00: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 48e04: 266e 000c moveal %fp@(12),%a3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48e08: 41eb 003c lea %a3@(60),%a0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
48e0c: 263c 0000 0700 movel #1792,%d3
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
48e12: 222b 0014 movel %a3@(20),%d1
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
48e16: 2401 movel %d1,%d2 48e18: ec8a lsrl #6,%d2 48e1a: 2002 movel %d2,%d0 48e1c: e58a lsll #2,%d2 48e1e: e988 lsll #4,%d0
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
48e20: 286e 0008 moveal %fp@(8),%a4
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
48e24: 9082 subl %d2,%d0 48e26: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 48e2a: 2748 0038 movel %a0,%a3@(56)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
48e2e: 41eb 0038 lea %a3@(56),%a0
block_state = the_thread_queue->state;
48e32: 242c 0038 movel %a4@(56),%d2 48e36: 2748 0040 movel %a0,%a3@(64)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
48e3a: 42ab 003c clrl %a3@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
48e3e: 0801 0005 btst #5,%d1
48e42: 6656 bnes 48e9a <_Thread_queue_Enqueue_priority+0x9e>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
48e44: 2a0a movel %a2,%d5
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
48e46: 2803 movel %d3,%d4 48e48: 5885 addql #4,%d5 48e4a: 2004 movel %d4,%d0 48e4c: 40c3 movew %sr,%d3 48e4e: 8083 orl %d3,%d0 48e50: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->first;
48e52: 2052 moveal %a2@,%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48e54: ba88 cmpl %a0,%d5 48e56: 6700 010a beqw 48f62 <_Thread_queue_Enqueue_priority+0x166>
search_priority = search_thread->current_priority;
48e5a: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
48e5e: b3c1 cmpal %d1,%a1
48e60: 6418 bccs 48e7a <_Thread_queue_Enqueue_priority+0x7e>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
48e62: 2004 movel %d4,%d0 48e64: 46c3 movew %d3,%sr 48e66: 8083 orl %d3,%d0 48e68: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48e6a: 2002 movel %d2,%d0 48e6c: c0a8 0010 andl %a0@(16),%d0 48e70: 6700 0092 beqw 48f04 <_Thread_queue_Enqueue_priority+0x108>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
48e74: 2050 moveal %a0@,%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48e76: ba88 cmpl %a0,%d5
48e78: 66e0 bnes 48e5a <_Thread_queue_Enqueue_priority+0x5e>
48e7a: 2403 movel %d3,%d2
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
48e7c: 7001 moveq #1,%d0 48e7e: b0ac 0030 cmpl %a4@(48),%d0 48e82: 6700 0094 beqw 48f18 <_Thread_queue_Enqueue_priority+0x11c>
* 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;
48e86: 206e 0010 moveal %fp@(16),%a0
return the_thread_queue->sync_state;
48e8a: 202c 0030 movel %a4@(48),%d0
* 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;
48e8e: 2082 movel %d2,%a0@
return the_thread_queue->sync_state; }
48e90: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48e94: 4e5e unlk %fp 48e96: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
48e98: 46c4 movew %d4,%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;
48e9a: 4284 clrl %d4 48e9c: 1839 0005 e6a2 moveb 5e6a2 <rtems_maximum_priority>,%d4
_ISR_Disable( level );
48ea2: 2003 movel %d3,%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;
48ea4: 2244 moveal %d4,%a1 48ea6: 5289 addql #1,%a1
_ISR_Disable( level );
48ea8: 40c4 movew %sr,%d4 48eaa: 8084 orl %d4,%d0 48eac: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->last;
48eae: 206a 0008 moveal %a2@(8),%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48eb2: b5c8 cmpal %a0,%a2
48eb4: 6720 beqs 48ed6 <_Thread_queue_Enqueue_priority+0xda>
search_priority = search_thread->current_priority;
48eb6: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
48eba: b3c1 cmpal %d1,%a1
48ebc: 6318 blss 48ed6 <_Thread_queue_Enqueue_priority+0xda>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
48ebe: 2003 movel %d3,%d0 48ec0: 46c4 movew %d4,%sr 48ec2: 8084 orl %d4,%d0 48ec4: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48ec6: 2002 movel %d2,%d0 48ec8: c0a8 0010 andl %a0@(16),%d0
48ecc: 67ca beqs 48e98 <_Thread_queue_Enqueue_priority+0x9c>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
48ece: 2068 0004 moveal %a0@(4),%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48ed2: b5c8 cmpal %a0,%a2
48ed4: 66e0 bnes 48eb6 <_Thread_queue_Enqueue_priority+0xba>
48ed6: 2404 movel %d4,%d2
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
48ed8: 7001 moveq #1,%d0 48eda: b0ac 0030 cmpl %a4@(48),%d0
48ede: 66a6 bnes 48e86 <_Thread_queue_Enqueue_priority+0x8a><== NEVER TAKEN
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48ee0: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
48ee4: b3c1 cmpal %d1,%a1
48ee6: 6756 beqs 48f3e <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
48ee8: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
48eea: 2748 0004 movel %a0,%a3@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
48eee: 2689 movel %a1,%a3@
the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
48ef0: 274c 0044 movel %a4,%a3@(68)
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;
48ef4: 208b movel %a3,%a0@
next_node->previous = the_node;
48ef6: 234b 0004 movel %a3,%a1@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
48efa: 46c4 movew %d4,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
48efc: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f00: 4e5e unlk %fp 48f02: 4e75 rts
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
48f04: 46c3 movew %d3,%sr <== NOT EXECUTED
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
48f06: 2004 movel %d4,%d0 <== NOT EXECUTED 48f08: 40c3 movew %sr,%d3 <== NOT EXECUTED 48f0a: 8083 orl %d3,%d0 <== NOT EXECUTED 48f0c: 46c0 movew %d0,%sr <== NOT EXECUTED
search_thread = (Thread_Control *) header->first;
48f0e: 2052 moveal %a2@,%a0 <== NOT EXECUTED
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48f10: ba88 cmpl %a0,%d5 <== NOT EXECUTED 48f12: 6600 ff46 bnew 48e5a <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 48f16: 604a bras 48f62 <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48f18: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
48f1c: b3c1 cmpal %d1,%a1
48f1e: 671e beqs 48f3e <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
48f20: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
48f24: 2688 movel %a0,%a3@
the_node->previous = previous_node;
48f26: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
48f2a: 274c 0044 movel %a4,%a3@(68)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
48f2e: 228b movel %a3,%a1@
search_node->previous = the_node;
48f30: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
48f34: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
48f36: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f3a: 4e5e unlk %fp 48f3c: 4e75 rts 48f3e: 41e8 003c lea %a0@(60),%a0
_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 );
previous_node = search_node->previous;
48f42: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
48f46: 2688 movel %a0,%a3@
the_node->previous = previous_node;
48f48: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
48f4c: 274c 0044 movel %a4,%a3@(68)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
48f50: 228b movel %a3,%a1@
search_node->previous = the_node;
48f52: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
48f56: 46c2 movew %d2,%sr 48f58: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
48f5a: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f5e: 4e5e unlk %fp 48f60: 4e75 rts
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48f62: 2403 movel %d3,%d2 48f64: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
48f68: 7001 moveq #1,%d0 48f6a: b0ac 0030 cmpl %a4@(48),%d0 48f6e: 6600 ff16 bnew 48e86 <_Thread_queue_Enqueue_priority+0x8a> 48f72: 60a4 bras 48f18 <_Thread_queue_Enqueue_priority+0x11c>
00048d60 <_Thread_queue_Enqueue_with_handler>:
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48d60: 4e56 fff0 linkw %fp,#-16 48d64: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48d68: 266e 0008 moveal %fp@(8),%a3
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
48d6c: 2f2b 0038 movel %a3@(56),%sp@-
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
48d70: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48d76: 242e 000c movel %fp@(12),%d2
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
48d7a: 2f0a movel %a2,%sp@- 48d7c: 4eb9 0004 9168 jsr 49168 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
48d82: 508f addql #8,%sp 48d84: 4a82 tstl %d2
48d86: 6644 bnes 48dcc <_Thread_queue_Enqueue_with_handler+0x6c>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
48d88: 41f9 0004 8dfc lea 48dfc <_Thread_queue_Enqueue_priority>,%a0 48d8e: 7001 moveq #1,%d0 48d90: b0ab 0034 cmpl %a3@(52),%d0
48d94: 6706 beqs 48d9c <_Thread_queue_Enqueue_with_handler+0x3c>
48d96: 41f9 0004 d03c lea 4d03c <_Thread_queue_Enqueue_fifo>,%a0
enqueue_p = _Thread_queue_Enqueue_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
enqueue_p = _Thread_queue_Enqueue_fifo;
sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level );
48d9c: 486e fffc pea %fp@(-4) 48da0: 2f0a movel %a2,%sp@- 48da2: 2f0b movel %a3,%sp@- 48da4: 4e90 jsr %a0@
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
48da6: 4fef 000c lea %sp@(12),%sp 48daa: 7201 moveq #1,%d1 48dac: b280 cmpl %d0,%d1
48dae: 6712 beqs 48dc2 <_Thread_queue_Enqueue_with_handler+0x62>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
48db0: 2f2e fffc movel %fp@(-4),%sp@- 48db4: 2f0a movel %a2,%sp@- 48db6: 2f00 movel %d0,%sp@- 48db8: 4eb9 0004 8304 jsr 48304 <_Thread_blocking_operation_Cancel> 48dbe: 4fef 000c lea %sp@(12),%sp
}
48dc2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48dc8: 4e5e unlk %fp 48dca: 4e75 rts
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
_Watchdog_Initialize(
48dcc: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
48dd0: 256e 0010 0064 movel %fp@(16),%a2@(100)
the_watchdog->id = id;
48dd6: 2540 0068 movel %d0,%a2@(104)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
48dda: 2542 0054 movel %d2,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
48dde: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
48de2: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
48de6: 486a 0048 pea %a2@(72) 48dea: 4879 0005 fed4 pea 5fed4 <_Watchdog_Ticks_chain> 48df0: 4eb9 0004 996c jsr 4996c <_Watchdog_Insert> 48df6: 508f addql #8,%sp 48df8: 608e bras 48d88 <_Thread_queue_Enqueue_with_handler+0x28>
...
0004f098 <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
4f098: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4f09e: 4e56 0000 linkw %fp,#0 4f0a2: 2f0a movel %a2,%sp@- 4f0a4: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
4f0a8: 40c1 movew %sr,%d1 4f0aa: 8081 orl %d1,%d0 4f0ac: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4f0ae: 202a 0010 movel %a2@(16),%d0 4f0b2: 0280 0003 bee0 andil #245472,%d0
4f0b8: 6734 beqs 4f0ee <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4f0ba: 2052 moveal %a2@,%a0
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4f0bc: 7002 moveq #2,%d0
previous = the_node->previous;
4f0be: 226a 0004 moveal %a2@(4),%a1
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
4f0c2: 42aa 0044 clrl %a2@(68)
next->previous = previous; previous->next = next;
4f0c6: 2288 movel %a0,%a1@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4f0c8: 2149 0004 movel %a1,%a0@(4)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4f0cc: b0aa 0050 cmpl %a2@(80),%d0
4f0d0: 6726 beqs 4f0f8 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4f0d2: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4f0d4: 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
}
4f0d8: 246e fffc moveal %fp@(-4),%a2 4f0dc: 203c 1003 fff8 movel #268697592,%d0 4f0e2: 2d40 000c movel %d0,%fp@(12) 4f0e6: 4e5e unlk %fp 4f0e8: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4f0ee: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4f0f0: 246e fffc moveal %fp@(-4),%a2 4f0f4: 4e5e unlk %fp 4f0f6: 4e75 rts 4f0f8: 7003 moveq #3,%d0 4f0fa: 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 );
4f0fe: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4f100: 486a 0048 pea %a2@(72) 4f104: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4f10a: 588f addql #4,%sp 4f10c: 203c 1003 fff8 movel #268697592,%d0 4f112: 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
}
4f116: 246e fffc moveal %fp@(-4),%a2 4f11a: 2d40 000c movel %d0,%fp@(12) 4f11e: 4e5e unlk %fp 4f120: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state>
...
0004d0d0 <_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 );
4d0d0: 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
)
{
4d0d6: 4e56 ffec linkw %fp,#-20 4d0da: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4d0de: 246e 000c moveal %fp@(12),%a2 4d0e2: 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 );
4d0e6: 40c1 movew %sr,%d1 4d0e8: 8081 orl %d1,%d0 4d0ea: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4d0ec: 202a 0010 movel %a2@(16),%d0 4d0f0: 0280 0003 bee0 andil #245472,%d0
4d0f6: 677e beqs 4d176 <_Thread_queue_Extract_priority_helper+0xa6>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4d0f8: 200a movel %a2,%d0 4d0fa: 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;
4d100: 2652 moveal %a2@,%a3
previous_node = the_node->previous;
4d102: 226a 0004 moveal %a2@(4),%a1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4d106: 206a 0038 moveal %a2@(56),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4d10a: b088 cmpl %a0,%d0
4d10c: 6774 beqs 4d182 <_Thread_queue_Extract_priority_helper+0xb2>
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
4d10e: 286a 0040 moveal %a2@(64),%a4
new_second_node = new_first_node->next;
4d112: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4d114: 2748 0004 movel %a0,%a3@(4)
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
4d118: 2288 movel %a0,%a1@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4d11a: 2149 0004 movel %a1,%a0@(4)
last_node = the_thread->Wait.Block2n.last;
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;
4d11e: 208b movel %a3,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4d120: 202a 0040 movel %a2@(64),%d0 4d124: b0aa 0038 cmpl %a2@(56),%d0
4d128: 6716 beqs 4d140 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */
new_second_node->previous =
4d12a: 43e8 0038 lea %a0@(56),%a1 4d12e: 2b49 0004 movel %a1,%a5@(4)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
4d132: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4d136: 214c 0040 movel %a4,%a0@(64)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
4d13a: 41e8 003c lea %a0@(60),%a0 4d13e: 2888 movel %a0,%a4@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4d140: 4a02 tstb %d2
4d142: 6626 bnes 4d16a <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d144: 7002 moveq #2,%d0 4d146: b0aa 0050 cmpl %a2@(80),%d0
4d14a: 6742 beqs 4d18e <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4d14c: 46c1 movew %d1,%sr 4d14e: 2d4a 0008 movel %a2,%fp@(8) 4d152: 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
}
4d158: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d15e: 2d49 000c movel %a1,%fp@(12) 4d162: 4e5e unlk %fp 4d164: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4d16a: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4d16c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d172: 4e5e unlk %fp 4d174: 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 );
4d176: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4d178: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d17e: 4e5e unlk %fp 4d180: 4e75 rts
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
4d182: 2749 0004 movel %a1,%a3@(4)
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
4d186: 228b movel %a3,%a1@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4d188: 4a02 tstb %d2
4d18a: 67b8 beqs 4d144 <_Thread_queue_Extract_priority_helper+0x74>
4d18c: 60dc bras 4d16a <_Thread_queue_Extract_priority_helper+0x9a> 4d18e: 7003 moveq #3,%d0 4d190: 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 );
4d194: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4d196: 486a 0048 pea %a2@(72) 4d19a: 4eb9 0004 9ab4 jsr 49ab4 <_Watchdog_Remove> 4d1a0: 588f addql #4,%sp 4d1a2: 227c 1003 fff8 moveal #268697592,%a1 4d1a8: 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
}
4d1ac: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4d1b2: 2d49 000c movel %a1,%fp@(12) 4d1b6: 4e5e unlk %fp 4d1b8: 4ef9 0004 84b8 jmp 484b8 <_Thread_Clear_state>
...
00048fdc <_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 ) {
48fdc: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
48fde: 4e56 0000 linkw %fp,#0 48fe2: 206e 0008 moveal %fp@(8),%a0
the_thread_queue->state = state;
48fe6: 216e 0010 0038 movel %fp@(16),%a0@(56)
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
48fec: 202e 000c movel %fp@(12),%d0
the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
48ff0: 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;
48ff6: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48ffa: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
48ffe: b280 cmpl %d0,%d1
49000: 6712 beqs 49014 <_Thread_queue_Initialize+0x38>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49002: 2008 movel %a0,%d0 49004: 5880 addql #4,%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49006: 2148 0008 movel %a0,%a0@(8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4900a: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
4900c: 42a8 0004 clrl %a0@(4)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
49010: 4e5e unlk %fp 49012: 4e75 rts
* timeout_status - return on a timeout
*
* Output parameters: NONE
*/
void _Thread_queue_Initialize(
49014: 2008 movel %a0,%d0 49016: 0680 0000 0030 addil #48,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4901c: 2208 movel %a0,%d1 4901e: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
49020: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49024: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49026: 2148 0008 movel %a0,%a0@(8) 4902a: 41e8 000c lea %a0@(12),%a0
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
4902e: b088 cmpl %a0,%d0
49030: 67de beqs 49010 <_Thread_queue_Initialize+0x34> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49032: 2208 movel %a0,%d1 49034: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
49036: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4903a: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4903c: 2148 0008 movel %a0,%a0@(8) 49040: 41e8 000c lea %a0@(12),%a0 49044: b088 cmpl %a0,%d0
49046: 66d4 bnes 4901c <_Thread_queue_Initialize+0x40>
49048: 60c6 bras 49010 <_Thread_queue_Initialize+0x34>
...
0004d1c0 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4d1c0: 4e56 0000 linkw %fp,#0 4d1c4: 206e 0008 moveal %fp@(8),%a0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4d1c8: 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 &&
4d1cc: 2029 0030 movel %a1@(48),%d0
4d1d0: 6708 beqs 4d1da <_Thread_queue_Process_timeout+0x1a>
4d1d2: b1f9 0005 feb6 cmpal 5feb6 <_Thread_Executing>,%a0
4d1d8: 6718 beqs 4d1f2 <_Thread_queue_Process_timeout+0x32><== 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;
4d1da: 2169 003c 0034 movel %a1@(60),%a0@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4d1e0: 2f08 movel %a0,%sp@- 4d1e2: 2f28 0044 movel %a0@(68),%sp@- 4d1e6: 4eb9 0004 d098 jsr 4d098 <_Thread_queue_Extract> 4d1ec: 508f addql #8,%sp
} }
4d1ee: 4e5e unlk %fp 4d1f0: 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 ) {
4d1f2: 7203 moveq #3,%d1 4d1f4: b280 cmpl %d0,%d1
4d1f6: 67f6 beqs 4d1ee <_Thread_queue_Process_timeout+0x2e>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4d1f8: 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 );
}
}
4d1fa: 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;
4d1fc: 2169 003c 0034 movel %a1@(60),%a0@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4d202: 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 );
}
}
0004904c <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
4904c: 4e56 fff0 linkw %fp,#-16 49050: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49054: 246e 0008 moveal %fp@(8),%a2 49058: 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 )
4905c: 4a8a tstl %a2
4905e: 6708 beqs 49068 <_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 ) {
49060: 7001 moveq #1,%d0 49062: b0aa 0034 cmpl %a2@(52),%d0
49066: 670a beqs 49072 <_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 );
}
}
49068: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4906e: 4e5e unlk %fp <== NOT EXECUTED 49070: 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 );
49072: 303c 0700 movew #1792,%d0 49076: 40c2 movew %sr,%d2 49078: 8082 orl %d2,%d0 4907a: 46c0 movew %d0,%sr
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4907c: 202b 0010 movel %a3@(16),%d0 49080: 0280 0003 bee0 andil #245472,%d0
49086: 660c bnes 49094 <_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 );
49088: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
4908a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49090: 4e5e unlk %fp 49092: 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 );
49094: 4878 0001 pea 1 <ADD> 49098: 7001 moveq #1,%d0 4909a: 2f0b movel %a3,%sp@- 4909c: 2540 0030 movel %d0,%a2@(48) 490a0: 2f0a movel %a2,%sp@- 490a2: 4eb9 0004 d0d0 jsr 4d0d0 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
490a8: 486e fffc pea %fp@(-4) 490ac: 2f0b movel %a3,%sp@- 490ae: 2f0a movel %a2,%sp@- 490b0: 4eb9 0004 8dfc jsr 48dfc <_Thread_queue_Enqueue_priority> 490b6: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
490ba: 46c2 movew %d2,%sr 490bc: 60cc bras 4908a <_Thread_queue_Requeue+0x3e>
...
000490c0 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
490c0: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
490c4: 486e fffc pea %fp@(-4) 490c8: 2f2e 0008 movel %fp@(8),%sp@- 490cc: 4eb9 0004 88b4 jsr 488b4 <_Thread_Get>
switch ( location ) {
490d2: 508f addql #8,%sp 490d4: 4aae fffc tstl %fp@(-4)
490d8: 6618 bnes 490f2 <_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 );
490da: 2f00 movel %d0,%sp@- 490dc: 4eb9 0004 d1c0 jsr 4d1c0 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
490e2: 588f addql #4,%sp 490e4: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 490ea: 5380 subql #1,%d0 490ec: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
490f2: 4e5e unlk %fp
...
00059e24 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
59e24: 4e56 ffb0 linkw %fp,#-80 59e28: 41ee ffec lea %fp@(-20),%a0 59e2c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59e30: 246e 0008 moveal %fp@(8),%a2 59e34: 2c0e movel %fp,%d6 59e36: 260e movel %fp,%d3 59e38: 5186 subql #8,%d6 59e3a: 0683 ffff ffe8 addil #-24,%d3
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59e40: 240a movel %a2,%d2
/*
* 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 );
59e42: 2a0a movel %a2,%d5 59e44: 4bf9 0005 df68 lea 5df68 <_Watchdog_Adjust_to_chain>,%a5
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59e4a: 0682 0000 0030 addil #48,%d2
/*
* 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 );
59e50: 0685 0000 0068 addil #104,%d5 59e56: 47f9 0005 a8ac lea 5a8ac <_Chain_Get>,%a3 59e5c: 49f9 0005 dff8 lea 5dff8 <_Watchdog_Insert>,%a4
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59e62: 283c 0000 0700 movel #1792,%d4 59e68: 2d48 ffd8 movel %a0,%fp@(-40)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
59e6c: 41ea 0008 lea %a2@(8),%a0 59e70: 2d48 ffe0 movel %a0,%fp@(-32)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
59e74: 41ea 0040 lea %a2@(64),%a0 59e78: 2d48 ffe4 movel %a0,%fp@(-28)
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
59e7c: 41ee fff4 lea %fp@(-12),%a0 59e80: 2d48 fffc movel %a0,%fp@(-4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59e84: 41ee ffec lea %fp@(-20),%a0 59e88: 2d46 fff4 movel %d6,%fp@(-12)
the_chain->permanent_null = NULL;
59e8c: 42ae fff8 clrl %fp@(-8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59e90: 2d48 ffe8 movel %a0,%fp@(-24)
the_chain->permanent_null = NULL;
59e94: 42ae ffec clrl %fp@(-20)
the_chain->last = _Chain_Head(the_chain);
59e98: 2d43 fff0 movel %d3,%fp@(-16)
{
/*
* 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;
59e9c: 41ee fff4 lea %fp@(-12),%a0 59ea0: 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;
59ea4: 2039 0007 f678 movel 7f678 <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59eaa: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
59eae: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59eb2: 9081 subl %d1,%d0 59eb4: 2f03 movel %d3,%sp@- 59eb6: 2f00 movel %d0,%sp@- 59eb8: 2f02 movel %d2,%sp@- 59eba: 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();
59ebc: 2039 0007 f5ca movel 7f5ca <_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 ) {
59ec2: 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;
59ec6: 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 ) {
59eca: b280 cmpl %d0,%d1 59ecc: 6500 0086 bcsw 59f54 <_Timer_server_Body+0x130>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
59ed0: b280 cmpl %d0,%d1 59ed2: 6200 00a4 bhiw 59f78 <_Timer_server_Body+0x154>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59ed6: 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 );
59eda: 202a 0078 movel %a2@(120),%d0 59ede: 2f00 movel %d0,%sp@- 59ee0: 4e93 jsr %a3@
if ( timer == NULL ) {
59ee2: 588f addql #4,%sp 59ee4: 4a80 tstl %d0
59ee6: 672e beqs 59f16 <_Timer_server_Body+0xf2> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59ee8: 2040 moveal %d0,%a0 <== NOT EXECUTED 59eea: 7e01 moveq #1,%d7 <== NOT EXECUTED 59eec: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59ef0: be81 cmpl %d1,%d7 <== NOT EXECUTED 59ef2: 6700 00a8 beqw 59f9c <_Timer_server_Body+0x178> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
59ef6: 7e03 moveq #3,%d7 <== NOT EXECUTED 59ef8: be81 cmpl %d1,%d7 <== NOT EXECUTED 59efa: 66de bnes 59eda <_Timer_server_Body+0xb6> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59efc: 2040 moveal %d0,%a0 <== NOT EXECUTED 59efe: 4868 0010 pea %a0@(16) <== NOT EXECUTED 59f02: 2f05 movel %d5,%sp@- <== NOT EXECUTED 59f04: 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 );
59f06: 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 );
59f0a: 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 );
59f0c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59f0e: 4e93 jsr %a3@ <== NOT EXECUTED
if ( timer == NULL ) {
59f10: 588f addql #4,%sp <== NOT EXECUTED 59f12: 4a80 tstl %d0 <== NOT EXECUTED 59f14: 66d2 bnes 59ee8 <_Timer_server_Body+0xc4> <== 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 );
59f16: 2004 movel %d4,%d0 59f18: 40c1 movew %sr,%d1 59f1a: 8081 orl %d1,%d0 59f1c: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
59f1e: bcae fff4 cmpl %fp@(-12),%d6 59f22: 6700 0086 beqw 59faa <_Timer_server_Body+0x186>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
59f26: 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;
59f28: 2039 0007 f678 movel 7f678 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59f2e: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
59f32: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59f36: 9081 subl %d1,%d0 <== NOT EXECUTED 59f38: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59f3a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59f3c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59f3e: 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();
59f40: 2039 0007 f5ca movel 7f5ca <_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 ) {
59f46: 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;
59f4a: 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 ) {
59f4e: b280 cmpl %d0,%d1 <== NOT EXECUTED 59f50: 6400 ff7e bccw 59ed0 <_Timer_server_Body+0xac> <== 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 );
59f54: 2f03 movel %d3,%sp@- 59f56: 2e00 movel %d0,%d7 59f58: 9e81 subl %d1,%d7 59f5a: 2f07 movel %d7,%sp@- 59f5c: 2d40 ffdc movel %d0,%fp@(-36) 59f60: 2f05 movel %d5,%sp@- 59f62: 4eb9 0005 df68 jsr 5df68 <_Watchdog_Adjust_to_chain> 59f68: 202e ffdc movel %fp@(-36),%d0 59f6c: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59f70: 2540 0074 movel %d0,%a2@(116) 59f74: 6000 ff64 braw 59eda <_Timer_server_Body+0xb6>
/*
* 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 );
59f78: 9280 subl %d0,%d1 59f7a: 2f01 movel %d1,%sp@- 59f7c: 4878 0001 pea 1 <ADD> 59f80: 2d40 ffdc movel %d0,%fp@(-36) 59f84: 2f05 movel %d5,%sp@- 59f86: 4eb9 0005 ded4 jsr 5ded4 <_Watchdog_Adjust> 59f8c: 202e ffdc movel %fp@(-36),%d0 59f90: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
59f94: 2540 0074 movel %d0,%a2@(116) 59f98: 6000 ff40 braw 59eda <_Timer_server_Body+0xb6>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
59f9c: 4868 0010 pea %a0@(16) <== NOT EXECUTED 59fa0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59fa2: 4e94 jsr %a4@ <== NOT EXECUTED 59fa4: 508f addql #8,%sp <== NOT EXECUTED 59fa6: 6000 ff32 braw 59eda <_Timer_server_Body+0xb6> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
59faa: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
59fae: 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 ) ) {
59fb0: 202e ffd8 movel %fp@(-40),%d0 59fb4: b0ae ffe8 cmpl %fp@(-24),%d0
59fb8: 6752 beqs 5a00c <_Timer_server_Body+0x1e8>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59fba: 2204 movel %d4,%d1 59fbc: 40c0 movew %sr,%d0 59fbe: 8280 orl %d0,%d1 59fc0: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59fc2: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59fc6: b1ee ffd8 cmpal %fp@(-40),%a0
59fca: 6732 beqs 59ffe <_Timer_server_Body+0x1da> <== NEVER TAKEN
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
59fcc: 2250 moveal %a0@,%a1
the_chain->first = new_first;
59fce: 2d49 ffe8 movel %a1,%fp@(-24)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
59fd2: 42a8 0008 clrl %a0@(8)
new_first->previous = _Chain_Head(the_chain);
59fd6: 2343 0004 movel %d3,%a1@(4)
_ISR_Enable( level );
59fda: 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 );
59fdc: 2f28 0024 movel %a0@(36),%sp@- 59fe0: 2f28 0020 movel %a0@(32),%sp@- 59fe4: 2068 001c moveal %a0@(28),%a0 59fe8: 4e90 jsr %a0@
}
59fea: 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 );
59fec: 2204 movel %d4,%d1 59fee: 40c0 movew %sr,%d0 59ff0: 8280 orl %d0,%d1 59ff2: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59ff4: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59ff8: b1ee ffd8 cmpal %fp@(-40),%a0
59ffc: 66ce bnes 59fcc <_Timer_server_Body+0x1a8>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
59ffe: 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;
5a000: 41ee fff4 lea %fp@(-12),%a0 5a004: 2548 0078 movel %a0,%a2@(120) 5a008: 6000 fe9a braw 59ea4 <_Timer_server_Body+0x80>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
5a00c: 4207 clrb %d7 5a00e: 1547 007c moveb %d7,%a2@(124) 5a012: 2039 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d0 5a018: 5280 addql #1,%d0 5a01a: 23c0 0007 f538 movel %d0,7f538 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
5a020: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5a024: 2f12 movel %a2@,%sp@- 5a026: 4eb9 0005 d624 jsr 5d624 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
5a02c: 2f0a movel %a2,%sp@- 5a02e: 4eba fd1c jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
5a032: 2f0a movel %a2,%sp@- 5a034: 4eba fd80 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
5a038: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
ts->active = true;
5a03e: 7001 moveq #1,%d0 5a040: 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 );
5a044: 2f2e ffe0 movel %fp@(-32),%sp@- 5a048: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
5a04e: 2f2e ffe4 movel %fp@(-28),%sp@- 5a052: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> 5a058: 4fef 0018 lea %sp@(24),%sp 5a05c: 6000 fe3e braw 59e9c <_Timer_server_Body+0x78>
0005a060 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
5a060: 4e56 fff0 linkw %fp,#-16 5a064: 206e 000c moveal %fp@(12),%a0 5a068: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5a06c: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
5a070: 202a 0078 movel %a2@(120),%d0
5a074: 671a beqs 5a090 <_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 );
5a076: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 5a07a: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED
} }
5a07e: 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 );
5a084: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} }
5a088: 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 );
5a08a: 4ef9 0005 a84c jmp 5a84c <_Chain_Append> <== NOT EXECUTED
5a090: 2039 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d0 5a096: 5280 addql #1,%d0 5a098: 23c0 0007 f538 movel %d0,7f538 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5a09e: 2028 0038 movel %a0@(56),%d0 5a0a2: 7201 moveq #1,%d1 5a0a4: b280 cmpl %d0,%d1 5a0a6: 6700 0088 beqw 5a130 <_Timer_server_Schedule_operation_method+0xd0>
_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 ) {
5a0aa: 7203 moveq #3,%d1 5a0ac: b280 cmpl %d0,%d1
5a0ae: 670e beqs 5a0be <_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 );
}
}
5a0b0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a0b6: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a0b8: 4ef9 0005 cbdc jmp 5cbdc <_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 );
5a0be: 203c 0000 0700 movel #1792,%d0 5a0c4: 40c2 movew %sr,%d2 5a0c6: 8082 orl %d2,%d0 5a0c8: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a0ca: 260a movel %a2,%d3 5a0cc: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
5a0d2: 2039 0007 f5ca movel 7f5ca <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
5a0d8: 222a 0074 movel %a2@(116),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5a0dc: 226a 0068 moveal %a2@(104),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a0e0: b689 cmpl %a1,%d3
5a0e2: 671a beqs 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5a0e4: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
5a0e8: b280 cmpl %d0,%d1 5a0ea: 6400 00b8 bccw 5a1a4 <_Timer_server_Schedule_operation_method+0x144>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
5a0ee: 2800 movel %d0,%d4 5a0f0: 9881 subl %d1,%d4
if (delta_interval > delta) {
5a0f2: b883 cmpl %d3,%d4 5a0f4: 6500 00ba bcsw 5a1b0 <_Timer_server_Schedule_operation_method+0x150>
5a0f8: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
5a0fa: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
5a0fe: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
5a102: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5a104: 4868 0010 pea %a0@(16) 5a108: 486a 0068 pea %a2@(104) 5a10c: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert>
if ( !ts->active ) {
5a112: 508f addql #8,%sp 5a114: 102a 007c moveb %a2@(124),%d0
5a118: 6696 bnes 5a0b0 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
5a11a: 2f0a movel %a2,%sp@- 5a11c: 4eba fc98 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>) 5a120: 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 );
}
}
5a122: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a128: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a12a: 4ef9 0005 cbdc jmp 5cbdc <_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 );
5a130: 203c 0000 0700 movel #1792,%d0 5a136: 40c3 movew %sr,%d3 5a138: 8083 orl %d3,%d0 5a13a: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
5a13c: 2039 0007 f678 movel 7f678 <_Watchdog_Ticks_since_boot>,%d0 5a142: 240a movel %a2,%d2 5a144: 0682 0000 0034 addil #52,%d2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
5a14a: 222a 003c movel %a2@(60),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5a14e: 226a 0030 moveal %a2@(48),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a152: b489 cmpl %a1,%d2
5a154: 6712 beqs 5a168 <_Timer_server_Schedule_operation_method+0x108>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
5a156: 2800 movel %d0,%d4 5a158: 9881 subl %d1,%d4
delta_interval = first_watchdog->delta_interval;
5a15a: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
5a15e: b484 cmpl %d4,%d2
5a160: 623a bhis 5a19c <_Timer_server_Schedule_operation_method+0x13c>
5a162: 4282 clrl %d2
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5a164: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
5a168: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
5a16c: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
5a16e: 4868 0010 pea %a0@(16) 5a172: 486a 0030 pea %a2@(48) 5a176: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert>
if ( !ts->active ) {
5a17c: 508f addql #8,%sp 5a17e: 102a 007c moveb %a2@(124),%d0 5a182: 6600 ff2c bnew 5a0b0 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
5a186: 2f0a movel %a2,%sp@- 5a188: 4eba fbc2 jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>) 5a18c: 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 );
}
}
5a18e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a194: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a196: 4ef9 0005 cbdc jmp 5cbdc <_Thread_Enable_dispatch>
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
5a19c: 9484 subl %d4,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5a19e: 2342 0010 movel %d2,%a1@(16) 5a1a2: 60c4 bras 5a168 <_Timer_server_Schedule_operation_method+0x108>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
5a1a4: d283 addl %d3,%d1
delta_interval += delta;
5a1a6: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
5a1a8: 2341 0010 movel %d1,%a1@(16) 5a1ac: 6000 ff50 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
5a1b0: 9684 subl %d4,%d3 5a1b2: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
5a1b4: 2341 0010 movel %d1,%a1@(16) 5a1b8: 6000 ff44 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
00049624 <_Timespec_Add_to>:
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
49624: 4e56 0000 linkw %fp,#0 49628: 226e 0008 moveal %fp@(8),%a1 4962c: 2f0a movel %a2,%sp@- 4962e: 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;
49632: 206a 0004 moveal %a2@(4),%a0 49636: d1e9 0004 addal %a1@(4),%a0
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
4963a: 2208 movel %a0,%d1
uint32_t _Timespec_Add_to(
struct timespec *time,
const struct timespec *add
)
{
uint32_t seconds = add->tv_sec;
4963c: 2012 movel %a2@,%d0
/* Add the basics */
time->tv_sec += add->tv_sec;
4963e: d191 addl %d0,%a1@
time->tv_nsec += add->tv_nsec;
49640: 2348 0004 movel %a0,%a1@(4)
/* Now adjust it so nanoseconds is in range */
while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
49644: b1fc 3b9a c9ff cmpal #999999999,%a0
4964a: 631a blss 49666 <_Timespec_Add_to+0x42>
4964c: 2051 moveal %a1@,%a0
*
* This routines adds two timespecs. The second argument is added
* to the first.
*/
uint32_t _Timespec_Add_to(
4964e: 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;
49650: 0681 c465 3600 addil #-1000000000,%d1
time->tv_sec++;
seconds++;
49656: 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 ) {
49658: 0c81 3b9a c9ff cmpil #999999999,%d1
4965e: 62ee bhis 4964e <_Timespec_Add_to+0x2a> <== NEVER TAKEN
49660: 2288 movel %a0,%a1@ 49662: 2341 0004 movel %d1,%a1@(4)
time->tv_sec++;
seconds++;
}
return seconds;
}
49666: 245f moveal %sp@+,%a2
49668: 4e5e unlk %fp <== NOT EXECUTED
0004b264 <_Timespec_Greater_than>:
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
4b264: 4e56 0000 linkw %fp,#0 4b268: 226e 0008 moveal %fp@(8),%a1 4b26c: 206e 000c moveal %fp@(12),%a0
if ( lhs->tv_sec > rhs->tv_sec )
4b270: 2211 movel %a1@,%d1 4b272: 2010 movel %a0@,%d0 4b274: b081 cmpl %d1,%d0
4b276: 6d18 blts 4b290 <_Timespec_Greater_than+0x2c>
return true;
if ( lhs->tv_sec < rhs->tv_sec )
4b278: 6e10 bgts 4b28a <_Timespec_Greater_than+0x26> <== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
4b27a: 2068 0004 moveal %a0@(4),%a0 4b27e: b1e9 0004 cmpal %a1@(4),%a0 4b282: 5dc0 slt %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4b284: 4e5e unlk %fp
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Greater_than(
4b286: 4480 negl %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4b288: 4e75 rts 4b28a: 4e5e unlk %fp
)
{
if ( lhs->tv_sec > rhs->tv_sec )
return true;
if ( lhs->tv_sec < rhs->tv_sec )
4b28c: 4200 clrb %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
4b28e: 4e75 rts 4b290: 4e5e unlk %fp
bool _Timespec_Greater_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec > rhs->tv_sec )
4b292: 7001 moveq #1,%d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec > rhs->tv_nsec )
return true;
return false;
}
...
00049802 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
49802: 4e56 fff0 linkw %fp,#-16 49806: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4980a: 242e 0008 movel %fp@(8),%d2 4980e: 262e 0010 movel %fp@(16),%d3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49812: 2479 0005 ff92 moveal 5ff92 <_User_extensions_List+0x8>,%a2
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
49818: 182e 000f moveb %fp@(15),%d4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
4981c: b5fc 0005 ff8a cmpal #393098,%a2
49822: 6726 beqs 4984a <_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 );
49824: 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 )
4982a: 206a 0030 moveal %a2@(48),%a0 4982e: 4a88 tstl %a0
49830: 670c beqs 4983e <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
49832: 2f03 movel %d3,%sp@- 49834: 2f04 movel %d4,%sp@- 49836: 2f02 movel %d2,%sp@- 49838: 4e90 jsr %a0@ 4983a: 4fef 000c lea %sp@(12),%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
4983e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49842: b5fc 0005 ff8a cmpal #393098,%a2
49848: 66e0 bnes 4982a <_User_extensions_Fatal+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
4984a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
49850: 4e5e unlk %fp <== NOT EXECUTED
000496c0 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
496c0: 4e56 ffec linkw %fp,#-20
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
496c4: 203c 0005 ff8e movel #393102,%d0 496ca: 23c0 0005 ff8a movel %d0,5ff8a <_User_extensions_List>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
496d0: 203c 0005 ff8a movel #393098,%d0 496d6: 23c0 0005 ff92 movel %d0,5ff92 <_User_extensions_List+0x8>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
496dc: 203c 0005 fe04 movel #392708,%d0 496e2: 23c0 0005 fe00 movel %d0,5fe00 <_User_extensions_Switches_list>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
496e8: 203c 0005 fe00 movel #392704,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
496ee: 42b9 0005 ff8e clrl 5ff8e <_User_extensions_List+0x4> 496f4: 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;
496f8: 2439 0005 e6da movel 5e6da <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
496fe: 2639 0005 e6de movel 5e6de <Configuration+0x3a>,%d3 49704: 42b9 0005 fe04 clrl 5fe04 <_User_extensions_Switches_list+0x4>
the_chain->last = _Chain_Head(the_chain);
4970a: 23c0 0005 fe08 movel %d0,5fe08 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
49710: 4a83 tstl %d3
49712: 6764 beqs 49778 <_User_extensions_Handler_initialization+0xb8>
extension = (User_extensions_Control *)
49714: 7834 moveq #52,%d4 49716: 4c02 4800 mulsl %d2,%d4 4971a: 2f04 movel %d4,%sp@- 4971c: 4eb9 0004 9bd0 jsr 49bd0 <_Workspace_Allocate_or_fatal_error> 49722: 2440 moveal %d0,%a2
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
49724: 2f04 movel %d4,%sp@- 49726: 42a7 clrl %sp@- 49728: 2f00 movel %d0,%sp@- 4972a: 4eb9 0004 fa48 jsr 4fa48 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49730: 4fef 0010 lea %sp@(16),%sp 49734: 4a82 tstl %d2
49736: 6740 beqs 49778 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
49738: 4284 clrl %d4 4973a: 47f9 0004 d34c lea 4d34c <_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;
49740: 2043 moveal %d3,%a0 49742: 5284 addql #1,%d4 49744: 0683 0000 0020 addil #32,%d3 4974a: 2558 0014 movel %a0@+,%a2@(20) 4974e: 2558 0018 movel %a0@+,%a2@(24) 49752: 2558 001c movel %a0@+,%a2@(28) 49756: 2558 0020 movel %a0@+,%a2@(32) 4975a: 2558 0024 movel %a0@+,%a2@(36) 4975e: 2558 0028 movel %a0@+,%a2@(40) 49762: 2558 002c movel %a0@+,%a2@(44) 49766: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
4976a: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
4976c: 45ea 0034 lea %a2@(52),%a2 49770: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49772: 588f addql #4,%sp 49774: b882 cmpl %d2,%d4
49776: 65c8 bcss 49740 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
49778: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 4977e: 4e5e unlk %fp
...
00049784 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
49784: 4e56 0000 linkw %fp,#0 49788: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4978a: 2479 0005 ff8a moveal 5ff8a <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
49790: 2f02 movel %d2,%sp@- 49792: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49796: b5fc 0005 ff8e cmpal #393102,%a2
4979c: 6718 beqs 497b6 <_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 )
4979e: 206a 0028 moveal %a2@(40),%a0 497a2: 4a88 tstl %a0
497a4: 6706 beqs 497ac <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
497a6: 2f02 movel %d2,%sp@- 497a8: 4e90 jsr %a0@ 497aa: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
497ac: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
497ae: b5fc 0005 ff8e cmpal #393102,%a2
497b4: 66e8 bnes 4979e <_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 );
}
}
497b6: 242e fff8 movel %fp@(-8),%d2 497ba: 246e fffc moveal %fp@(-4),%a2
497be: 4e5e unlk %fp <== NOT EXECUTED
00049854 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49854: 4e56 0000 linkw %fp,#0 49858: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
4985a: 2479 0005 ff8a moveal 5ff8a <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49860: 2f02 movel %d2,%sp@- 49862: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
49866: b5fc 0005 ff8e cmpal #393102,%a2
4986c: 6722 beqs 49890 <_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 ) {
4986e: 206a 0014 moveal %a2@(20),%a0 49872: 4a88 tstl %a0
49874: 6710 beqs 49886 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
49876: 2f02 movel %d2,%sp@- 49878: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 4987e: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
49880: 508f addql #8,%sp 49882: 4a00 tstb %d0
49884: 670c beqs 49892 <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49886: 2452 moveal %a2@,%a2
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
49888: b5fc 0005 ff8e cmpal #393102,%a2
4988e: 66de bnes 4986e <_User_extensions_Thread_create+0x1a>
49890: 7001 moveq #1,%d0
return false;
}
}
return true;
}
49892: 242e fff8 movel %fp@(-8),%d2 49896: 246e fffc moveal %fp@(-4),%a2 4989a: 4e5e unlk %fp
...
000498a0 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
498a0: 4e56 0000 linkw %fp,#0 498a4: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
498a6: 2479 0005 ff92 moveal 5ff92 <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
498ac: 2f02 movel %d2,%sp@- 498ae: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
498b2: b5fc 0005 ff8a cmpal #393098,%a2
498b8: 6720 beqs 498da <_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 )
498ba: 206a 0020 moveal %a2@(32),%a0 498be: 4a88 tstl %a0
498c0: 670c beqs 498ce <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
498c2: 2f02 movel %d2,%sp@- 498c4: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 498ca: 4e90 jsr %a0@ 498cc: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
498ce: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
498d2: b5fc 0005 ff8a cmpal #393098,%a2
498d8: 66e0 bnes 498ba <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
498da: 242e fff8 movel %fp@(-8),%d2 498de: 246e fffc moveal %fp@(-4),%a2 498e2: 4e5e unlk %fp
...
000497c2 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
497c2: 4e56 0000 linkw %fp,#0 497c6: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
497c8: 2479 0005 ff92 moveal 5ff92 <_User_extensions_List+0x8>,%a2
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
497ce: 2f02 movel %d2,%sp@- 497d0: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
497d4: b5fc 0005 ff8a cmpal #393098,%a2
497da: 671a beqs 497f6 <_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 )
497dc: 206a 002c moveal %a2@(44),%a0 497e0: 4a88 tstl %a0
497e2: 6706 beqs 497ea <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
497e4: 2f02 movel %d2,%sp@- 497e6: 4e90 jsr %a0@
497e8: 588f addql #4,%sp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
497ea: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
497ee: b5fc 0005 ff8a cmpal #393098,%a2
497f4: 66e6 bnes 497dc <_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 );
}
}
497f6: 242e fff8 movel %fp@(-8),%d2 497fa: 246e fffc moveal %fp@(-4),%a2
497fe: 4e5e unlk %fp <== NOT EXECUTED
0004a588 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a588: 4e56 0000 linkw %fp,#0 4a58c: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a58e: 2479 0006 0f32 moveal 60f32 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a594: 2f02 movel %d2,%sp@- 4a596: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a59a: b5fc 0006 0f36 cmpal #397110,%a2
4a5a0: 671e beqs 4a5c0 <_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 )
4a5a2: 206a 001c moveal %a2@(28),%a0 4a5a6: 4a88 tstl %a0
4a5a8: 670c beqs 4a5b6 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
4a5aa: 2f02 movel %d2,%sp@- 4a5ac: 2f39 0006 0e5e movel 60e5e <_Thread_Executing>,%sp@- 4a5b2: 4e90 jsr %a0@ 4a5b4: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
4a5b6: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a5b8: b5fc 0006 0f36 cmpal #397110,%a2
4a5be: 66e2 bnes 4a5a2 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a5c0: 242e fff8 movel %fp@(-8),%d2 4a5c4: 246e fffc moveal %fp@(-4),%a2
4a5c8: 4e5e unlk %fp <== NOT EXECUTED
000498e8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
498e8: 4e56 0000 linkw %fp,#0 498ec: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498ee: 2479 0005 ff8a moveal 5ff8a <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
498f4: 2f02 movel %d2,%sp@- 498f6: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498fa: b5fc 0005 ff8e cmpal #393102,%a2
49900: 671e beqs 49920 <_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 )
49902: 206a 0018 moveal %a2@(24),%a0 49906: 4a88 tstl %a0
49908: 670c beqs 49916 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
4990a: 2f02 movel %d2,%sp@- 4990c: 2f39 0005 feb6 movel 5feb6 <_Thread_Executing>,%sp@- 49912: 4e90 jsr %a0@ 49914: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49916: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49918: b5fc 0005 ff8e cmpal #393102,%a2
4991e: 66e2 bnes 49902 <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49920: 242e fff8 movel %fp@(-8),%d2 49924: 246e fffc moveal %fp@(-4),%a2
49928: 4e5e unlk %fp <== NOT EXECUTED
0004992c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
4992c: 4e56 fff4 linkw %fp,#-12 49930: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49934: 262e 0008 movel %fp@(8),%d3 49938: 242e 000c movel %fp@(12),%d2
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
4993c: 2479 0005 fe00 moveal 5fe00 <_User_extensions_Switches_list>,%a2 49942: b5fc 0005 fe04 cmpal #392708,%a2
49948: 6716 beqs 49960 <_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 );
4994a: 2f02 movel %d2,%sp@- 4994c: 2f03 movel %d3,%sp@- 4994e: 206a 0008 moveal %a2@(8),%a0 49952: 4e90 jsr %a0@
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
49954: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
49956: 508f addql #8,%sp 49958: b5fc 0005 fe04 cmpal #392708,%a2
4995e: 66ea bnes 4994a <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49960: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49966: 4e5e unlk %fp
...
0004b61c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b61c: 4e56 ffe8 linkw %fp,#-24 4b620: 226e 000c moveal %fp@(12),%a1 4b624: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4b628: 283c 0000 0700 movel #1792,%d4 4b62e: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b630: 266e 0008 moveal %fp@(8),%a3 4b634: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4b638: 40c1 movew %sr,%d1 4b63a: 8081 orl %d1,%d0 4b63c: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b63e: 244b moveal %a3,%a2 4b640: 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 ) ) {
4b642: b5c8 cmpal %a0,%a2
4b644: 6748 beqs 4b68e <_Watchdog_Adjust+0x72>
switch ( direction ) {
4b646: 4a89 tstl %a1
4b648: 6650 bnes 4b69a <_Watchdog_Adjust+0x7e>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b64a: 4a82 tstl %d2
4b64c: 6740 beqs 4b68e <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b64e: 2628 0010 movel %a0@(16),%d3 4b652: 49f9 0004 b898 lea 4b898 <_Watchdog_Tickle>,%a4 4b658: b682 cmpl %d2,%d3
4b65a: 622c bhis 4b688 <_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;
4b65c: 7001 moveq #1,%d0 4b65e: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4b662: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4b664: 2f0b movel %a3,%sp@- 4b666: 4e94 jsr %a4@
_ISR_Disable( level );
4b668: 2004 movel %d4,%d0 4b66a: 40c1 movew %sr,%d1 4b66c: 8081 orl %d1,%d0 4b66e: 46c0 movew %d0,%sr
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
4b670: 9483 subl %d3,%d2
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4b672: 588f addql #4,%sp 4b674: 2013 movel %a3@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
4b676: 2040 moveal %d0,%a0 4b678: b08a cmpl %a2,%d0
4b67a: 6712 beqs 4b68e <_Watchdog_Adjust+0x72>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b67c: 4a82 tstl %d2
4b67e: 670e beqs 4b68e <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b680: 2628 0010 movel %a0@(16),%d3 4b684: b483 cmpl %d3,%d2
4b686: 64d4 bccs 4b65c <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4b688: 9682 subl %d2,%d3 4b68a: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b68e: 46c1 movew %d1,%sr
}
4b690: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b696: 4e5e unlk %fp 4b698: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4b69a: 7001 moveq #1,%d0 4b69c: b089 cmpl %a1,%d0
4b69e: 66ee bnes 4b68e <_Watchdog_Adjust+0x72> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4b6a0: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b6a4: 46c1 movew %d1,%sr
}
4b6a6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b6ac: 4e5e unlk %fp <== NOT EXECUTED
0005df68 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
5df68: 4e56 ffe4 linkw %fp,#-28 5df6c: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5df70: 2a6e 0008 moveal %fp@(8),%a5 5df74: 282e 000c movel %fp@(12),%d4 5df78: 266e 0010 moveal %fp@(16),%a3
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
5df7c: 675e beqs 5dfdc <_Watchdog_Adjust_to_chain+0x74>
return;
}
_ISR_Disable( level );
5df7e: 263c 0000 0700 movel #1792,%d3 5df84: 2003 movel %d3,%d0 5df86: 40c1 movew %sr,%d1 5df88: 8081 orl %d1,%d0 5df8a: 46c0 movew %d0,%sr 5df8c: 284d moveal %a5,%a4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5df8e: 240b movel %a3,%d2 5df90: 5882 addql #4,%d2 5df92: 205c moveal %a4@+,%a0
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
5df94: b1cc cmpal %a4,%a0
5df96: 6742 beqs 5dfda <_Watchdog_Adjust_to_chain+0x72>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
5df98: 2028 0010 movel %a0@(16),%d0 5df9c: b880 cmpl %d0,%d4
5df9e: 654c bcss 5dfec <_Watchdog_Adjust_to_chain+0x84>
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
5dfa0: 9880 subl %d0,%d4
first->delta_interval = 0;
5dfa2: 42a8 0010 clrl %a0@(16)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
5dfa6: 2250 moveal %a0@,%a1
previous = the_node->previous;
5dfa8: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
5dfac: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
5dfae: 234a 0004 movel %a2,%a1@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
5dfb2: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
5dfb4: 226b 0008 moveal %a3@(8),%a1
the_chain->last = the_node;
5dfb8: 2748 0008 movel %a0,%a3@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
5dfbc: 2149 0004 movel %a1,%a0@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
5dfc0: 2288 movel %a0,%a1@
while ( 1 ) {
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
5dfc2: 2003 movel %d3,%d0 5dfc4: 46c1 movew %d1,%sr 5dfc6: 8081 orl %d1,%d0 5dfc8: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5dfca: 2055 moveal %a5@,%a0
if ( _Chain_Is_empty( header ) )
5dfcc: b1cc cmpal %a4,%a0
5dfce: 6714 beqs 5dfe4 <_Watchdog_Adjust_to_chain+0x7c>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
5dfd0: 4aa8 0010 tstl %a0@(16)
5dfd4: 67d0 beqs 5dfa6 <_Watchdog_Adjust_to_chain+0x3e>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5dfd6: 4a84 tstl %d4
5dfd8: 66ba bnes 5df94 <_Watchdog_Adjust_to_chain+0x2c>
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5dfda: 46c1 movew %d1,%sr
}
5dfdc: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5dfe0: 4e5e unlk %fp 5dfe2: 4e75 rts
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5dfe4: 204c moveal %a4,%a0
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5dfe6: 4a84 tstl %d4
5dfe8: 66aa bnes 5df94 <_Watchdog_Adjust_to_chain+0x2c>
5dfea: 60ee bras 5dfda <_Watchdog_Adjust_to_chain+0x72>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
first->delta_interval -= units;
5dfec: 9084 subl %d4,%d0 5dfee: 2140 0010 movel %d0,%a0@(16)
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5dff2: 46c1 movew %d1,%sr 5dff4: 60e6 bras 5dfdc <_Watchdog_Adjust_to_chain+0x74>
...
0004996c <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
4996c: 4e56 ffec linkw %fp,#-20 49970: 226e 000c moveal %fp@(12),%a1 49974: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49978: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
4997c: 2a3c 0000 0700 movel #1792,%d5 49982: 2005 movel %d5,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
49984: 2839 0005 fe96 movel 5fe96 <_ISR_Nest_level>,%d4
_ISR_Disable( level );
4998a: 40c3 movew %sr,%d3 4998c: 8083 orl %d3,%d0 4998e: 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 ) {
49990: 4aa9 0008 tstl %a1@(8) 49994: 6600 00c6 bnew 49a5c <_Watchdog_Insert+0xf0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
49998: 2039 0005 ff38 movel 5ff38 <_Watchdog_Sync_count>,%d0 4999e: 5280 addql #1,%d0 499a0: 23c0 0005 ff38 movel %d0,5ff38 <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
499a6: 7001 moveq #1,%d0 499a8: 2340 0008 movel %d0,%a1@(8)
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
499ac: 2029 000c movel %a1@(12),%d0
* cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
499b0: 2052 moveal %a2@,%a0
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
499b2: 6764 beqs 49a18 <_Watchdog_Insert+0xac>
499b4: 4a90 tstl %a0@
499b6: 6760 beqs 49a18 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
499b8: 2228 0010 movel %a0@(16),%d1 499bc: b280 cmpl %d0,%d1
499be: 6252 bhis 49a12 <_Watchdog_Insert+0xa6>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
499c0: 2405 movel %d5,%d2 499c2: 46c3 movew %d3,%sr 499c4: 8483 orl %d3,%d2 499c6: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
499c8: 7401 moveq #1,%d2 499ca: b4a9 0008 cmpl %a1@(8),%d2
499ce: 666e bnes 49a3e <_Watchdog_Insert+0xd2>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
499d0: 2439 0005 feb2 movel 5feb2 <_Watchdog_Sync_level>,%d2 499d6: b484 cmpl %d4,%d2
499d8: 6230 bhis 49a0a <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
499da: 9081 subl %d1,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
499dc: 2050 moveal %a0@,%a0
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
499de: 4a80 tstl %d0
499e0: 6736 beqs 49a18 <_Watchdog_Insert+0xac>
499e2: 4a90 tstl %a0@
499e4: 6732 beqs 49a18 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
499e6: 2228 0010 movel %a0@(16),%d1 499ea: b081 cmpl %d1,%d0
499ec: 6524 bcss 49a12 <_Watchdog_Insert+0xa6>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
499ee: 2405 movel %d5,%d2 499f0: 46c3 movew %d3,%sr 499f2: 8483 orl %d3,%d2 499f4: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
499f6: 9081 subl %d1,%d0
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
499f8: 7201 moveq #1,%d1 499fa: b2a9 0008 cmpl %a1@(8),%d1
499fe: 663e bnes 49a3e <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49a00: 2239 0005 feb2 movel 5feb2 <_Watchdog_Sync_level>,%d1 49a06: b284 cmpl %d4,%d1
49a08: 63d2 blss 499dc <_Watchdog_Insert+0x70>
_Watchdog_Sync_level = insert_isr_nest_level;
49a0a: 23c4 0005 feb2 movel %d4,5feb2 <_Watchdog_Sync_level>
goto restart;
49a10: 609a bras 499ac <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
49a12: 9280 subl %d0,%d1 49a14: 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 );
49a18: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
49a1c: 7402 moveq #2,%d2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
49a1e: 2450 moveal %a0@,%a2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
49a20: 2239 0005 ff3c movel 5ff3c <_Watchdog_Ticks_since_boot>,%d1
after_node->next = the_node;
49a26: 2089 movel %a1,%a0@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
49a28: 2348 0004 movel %a0,%a1@(4) 49a2c: 2341 0014 movel %d1,%a1@(20)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
49a30: 2340 0010 movel %d0,%a1@(16)
before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node;
49a34: 2549 0004 movel %a1,%a2@(4) 49a38: 2342 0008 movel %d2,%a1@(8)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
49a3c: 228a movel %a2,%a1@
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
49a3e: 23c4 0005 feb2 movel %d4,5feb2 <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
49a44: 2039 0005 ff38 movel 5ff38 <_Watchdog_Sync_count>,%d0 49a4a: 5380 subql #1,%d0 49a4c: 23c0 0005 ff38 movel %d0,5ff38 <_Watchdog_Sync_count>
_ISR_Enable( level );
49a52: 46c3 movew %d3,%sr
}
49a54: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49a58: 4e5e unlk %fp 49a5a: 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 );
49a5c: 46c3 movew %d3,%sr
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49a5e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49a62: 4e5e unlk %fp
...
00049ab4 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49ab4: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
49aba: 4e56 0000 linkw %fp,#0 49abe: 206e 0008 moveal %fp@(8),%a0 49ac2: 2f0a movel %a2,%sp@- 49ac4: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49ac6: 40c1 movew %sr,%d1 49ac8: 8081 orl %d1,%d0 49aca: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49acc: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49ad0: 7401 moveq #1,%d2 49ad2: b480 cmpl %d0,%d2
49ad4: 6764 beqs 49b3a <_Watchdog_Remove+0x86>
49ad6: 6314 blss 49aec <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49ad8: 2279 0005 ff3c moveal 5ff3c <_Watchdog_Ticks_since_boot>,%a1 49ade: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49ae2: 46c1 movew %d1,%sr
return( previous_state ); }
49ae4: 241f movel %sp@+,%d2 49ae6: 245f moveal %sp@+,%a2 49ae8: 4e5e unlk %fp 49aea: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
49aec: 143c 0003 moveb #3,%d2 49af0: b480 cmpl %d0,%d2
49af2: 65e4 bcss 49ad8 <_Watchdog_Remove+0x24> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
49af4: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
49af6: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49afa: 4a91 tstl %a1@
49afc: 6708 beqs 49b06 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
49afe: 2428 0010 movel %a0@(16),%d2 49b02: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
49b06: 2479 0005 ff38 moveal 5ff38 <_Watchdog_Sync_count>,%a2 49b0c: 4a8a tstl %a2
49b0e: 670c beqs 49b1c <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
49b10: 2479 0005 fe96 moveal 5fe96 <_ISR_Nest_level>,%a2 49b16: 23ca 0005 feb2 movel %a2,5feb2 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49b1c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
49b20: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
49b22: 234a 0004 movel %a2,%a1@(4)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49b26: 2279 0005 ff3c moveal 5ff3c <_Watchdog_Ticks_since_boot>,%a1 49b2c: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49b30: 46c1 movew %d1,%sr
return( previous_state ); }
49b32: 241f movel %sp@+,%d2 49b34: 245f moveal %sp@+,%a2 49b36: 4e5e unlk %fp 49b38: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49b3a: 2279 0005 ff3c moveal 5ff3c <_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;
49b40: 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;
49b44: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49b48: 46c1 movew %d1,%sr
return( previous_state ); }
49b4a: 241f movel %sp@+,%d2 49b4c: 245f moveal %sp@+,%a2 49b4e: 4e5e unlk %fp
...
0004afc0 <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4afc0: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4afc6: 4e56 ffe8 linkw %fp,#-24 4afca: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4afce: 242e 0008 movel %fp@(8),%d2 4afd2: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4afd6: 40c3 movew %sr,%d3 4afd8: 8083 orl %d3,%d0 4afda: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4afdc: 2f0b movel %a3,%sp@- 4afde: 4bf9 0004 49c0 lea 449c0 <printk>,%a5 4afe4: 2f02 movel %d2,%sp@- 4afe6: 4879 0005 f6a8 pea 5f6a8 <_Status_Object_name_errors_to_status+0x14> 4afec: 4e95 jsr %a5@
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4afee: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
4aff0: 4fef 000c lea %sp@(12),%sp 4aff4: b7ca cmpal %a2,%a3
4aff6: 672c beqs 4b024 <_Watchdog_Report_chain+0x64> <== NEVER TAKEN
4aff8: 49f9 0004 b03c lea 4b03c <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4affe: 2f0a movel %a2,%sp@- 4b000: 42a7 clrl %sp@- 4b002: 4e94 jsr %a4@
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
4b004: 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 = header->first ;
4b006: 508f addql #8,%sp 4b008: b7ca cmpal %a2,%a3
4b00a: 66f2 bnes 4affe <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4b00c: 2f02 movel %d2,%sp@- 4b00e: 4879 0005 f6bf pea 5f6bf <_Status_Object_name_errors_to_status+0x2b> 4b014: 4e95 jsr %a5@ 4b016: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4b018: 46c3 movew %d3,%sr
}
4b01a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b020: 4e5e unlk %fp 4b022: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4b024: 4879 0005 f6ce pea 5f6ce <_Status_Object_name_errors_to_status+0x3a> 4b02a: 4e95 jsr %a5@ 4b02c: 588f addql #4,%sp
}
_ISR_Enable( level );
4b02e: 46c3 movew %d3,%sr
}
4b030: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b036: 4e5e unlk %fp
...
00049b54 <_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 );
49b54: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
49b5a: 4e56 ffe8 linkw %fp,#-24 49b5e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49b62: 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 );
49b66: 40c2 movew %sr,%d2 49b68: 8082 orl %d2,%d0 49b6a: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
49b6c: 264c moveal %a4,%a3 49b6e: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
49b70: b7ca cmpal %a2,%a3
49b72: 673e beqs 49bb2 <_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) {
49b74: 202a 0010 movel %a2@(16),%d0 49b78: 4bf9 0004 9ab4 lea 49ab4 <_Watchdog_Remove>,%a5
49b7e: 6708 beqs 49b88 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
49b80: 5380 subql #1,%d0 49b82: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
49b86: 662a bnes 49bb2 <_Watchdog_Tickle+0x5e>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49b88: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
49b8e: 2f0a movel %a2,%sp@- 49b90: 4e95 jsr %a5@
_ISR_Enable( level );
49b92: 46c2 movew %d2,%sr
switch( watchdog_state ) {
49b94: 7202 moveq #2,%d1 49b96: 588f addql #4,%sp 49b98: b280 cmpl %d0,%d1
49b9a: 6722 beqs 49bbe <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49b9c: 2003 movel %d3,%d0 49b9e: 40c2 movew %sr,%d2 49ba0: 8082 orl %d2,%d0 49ba2: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
49ba4: 2014 movel %a4@,%d0 49ba6: 2440 moveal %d0,%a2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
49ba8: b08b cmpl %a3,%d0
49baa: 6706 beqs 49bb2 <_Watchdog_Tickle+0x5e>
49bac: 4aaa 0010 tstl %a2@(16)
49bb0: 67dc beqs 49b8e <_Watchdog_Tickle+0x3a>
leave:
_ISR_Enable(level);
49bb2: 46c2 movew %d2,%sr
}
49bb4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49bba: 4e5e unlk %fp 49bbc: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
49bbe: 2f2a 0024 movel %a2@(36),%sp@- 49bc2: 2f2a 0020 movel %a2@(32),%sp@- 49bc6: 206a 001c moveal %a2@(28),%a0 49bca: 4e90 jsr %a0@ 49bcc: 508f addql #8,%sp 49bce: 60cc bras 49b9c <_Watchdog_Tickle+0x48>
00049c38 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
49c38: 4e56 0000 linkw %fp,#0 49c3c: 2f03 movel %d3,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size;
49c3e: 2639 0005 e6a8 movel 5e6a8 <Configuration+0x4>,%d3
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
49c44: 2f02 movel %d2,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start;
49c46: 2439 0005 e6a4 movel 5e6a4 <Configuration>,%d2
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
49c4c: 4a39 0005 e6cc tstb 5e6cc <Configuration+0x28>
49c52: 6628 bnes 49c7c <_Workspace_Handler_initialization+0x44>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
49c54: 4878 0004 pea 4 <CONTEXT_ARG> 49c58: 2f03 movel %d3,%sp@- 49c5a: 2f02 movel %d2,%sp@- 49c5c: 4879 0005 fe1e pea 5fe1e <_Workspace_Area> 49c62: 4eb9 0004 76dc jsr 476dc <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
49c68: 4fef 0010 lea %sp@(16),%sp 49c6c: 4a80 tstl %d0
49c6e: 671e beqs 49c8e <_Workspace_Handler_initialization+0x56>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
49c70: 242e fff8 movel %fp@(-8),%d2 49c74: 262e fffc movel %fp@(-4),%d3 49c78: 4e5e unlk %fp 49c7a: 4e75 rts
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
memset( starting_address, 0, size );
49c7c: 2f03 movel %d3,%sp@- 49c7e: 42a7 clrl %sp@- 49c80: 2f02 movel %d2,%sp@- 49c82: 4eb9 0004 fa48 jsr 4fa48 <memset> 49c88: 4fef 000c lea %sp@(12),%sp 49c8c: 60c6 bras 49c54 <_Workspace_Handler_initialization+0x1c>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
49c8e: 4878 0003 pea 3 <DIVIDE> 49c92: 4878 0001 pea 1 <ADD> 49c96: 42a7 clrl %sp@- 49c98: 4eb9 0004 7a48 jsr 47a48 <_Internal_error_Occurred>
...
0004c1d0 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4c1d0: 4e56 ffe8 linkw %fp,#-24 4c1d4: 202e 0010 movel %fp@(16),%d0 4c1d8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4c1dc: 242e 0008 movel %fp@(8),%d2 4c1e0: 262e 000c movel %fp@(12),%d3 4c1e4: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4c1e8: 4a82 tstl %d2
4c1ea: 677a beqs 4c266 <rtems_barrier_create+0x96>
return RTEMS_INVALID_NAME;
if ( !id )
4c1ec: 4a8a tstl %a2 4c1ee: 6700 00ce beqw 4c2be <rtems_barrier_create+0xee>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4c1f2: 0803 0004 btst #4,%d3
4c1f6: 677a beqs 4c272 <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4c1f8: 4a80 tstl %d0 4c1fa: 6700 00b4 beqw 4c2b0 <rtems_barrier_create+0xe0> 4c1fe: 2239 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d1 4c204: 5281 addql #1,%d1
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4c206: 42ae fff8 clrl %fp@(-8)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4c20a: 2d40 fffc movel %d0,%fp@(-4) 4c20e: 23c1 0005 fdfc movel %d1,5fdfc <_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 );
4c214: 4879 0005 ffce pea 5ffce <_Barrier_Information> 4c21a: 4eb9 0004 7b0c jsr 47b0c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4c220: 588f addql #4,%sp 4c222: 2640 moveal %d0,%a3 4c224: 4a80 tstl %d0
4c226: 6776 beqs 4c29e <rtems_barrier_create+0xce> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
4c228: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4c22c: 486e fff8 pea %fp@(-8) 4c230: 486b 0014 pea %a3@(20) 4c234: 4eb9 0004 c8f8 jsr 4c8f8 <_CORE_barrier_Initialize> 4c23a: 202b 0008 movel %a3@(8),%d0 4c23e: 4281 clrl %d1 4c240: 2079 0005 ffe6 moveal 5ffe6 <_Barrier_Information+0x18>,%a0 4c246: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4c248: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4c24c: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4c250: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4c252: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4c258: 508f addql #8,%sp
(Objects_Name) name
);
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
4c25a: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
4c25c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c262: 4e5e unlk %fp 4c264: 4e75 rts
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4c266: 7003 moveq #3,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4c268: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c26e: 4e5e unlk %fp 4c270: 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;
4c272: 7201 moveq #1,%d1 4c274: 2d41 fff8 movel %d1,%fp@(-8) 4c278: 2239 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d1 4c27e: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4c280: 2d40 fffc movel %d0,%fp@(-4) 4c284: 23c1 0005 fdfc movel %d1,5fdfc <_Thread_Dispatch_disable_level> 4c28a: 4879 0005 ffce pea 5ffce <_Barrier_Information> 4c290: 4eb9 0004 7b0c jsr 47b0c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4c296: 588f addql #4,%sp 4c298: 2640 moveal %d0,%a3 4c29a: 4a80 tstl %d0
4c29c: 668a bnes 4c228 <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4c29e: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> 4c2a4: 7005 moveq #5,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4c2a6: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c2ac: 4e5e unlk %fp 4c2ae: 4e75 rts
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4c2b0: 103c 000a moveb #10,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4c2b4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c2ba: 4e5e unlk %fp 4c2bc: 4e75 rts
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
4c2be: 7009 moveq #9,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4c2c0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4c2c6: 4e5e unlk %fp
...
0004838c <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
)
{
4838c: 4e56 fff4 linkw %fp,#-12 48390: 226e 000c moveal %fp@(12),%a1 48394: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48398: 242e 0008 movel %fp@(8),%d2 4839c: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
483a0: 2039 0006 406a movel 6406a <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
483a6: 2239 0006 3ebe movel 63ebe <_ISR_Nest_level>,%d1 483ac: 6600 009c bnew 4844a <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
483b0: 4a8a tstl %a2 483b2: 6700 00ea beqw 4849e <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
483b6: 2480 movel %d0,%a2@
if ( driver_table == NULL )
483b8: 4a89 tstl %a1 483ba: 6700 00e2 beqw 4849e <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;
483be: 4a91 tstl %a1@ 483c0: 6700 00d4 beqw 48496 <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 )
483c4: b480 cmpl %d0,%d2
483c6: 6476 bccs 4843e <rtems_io_register_driver+0xb2> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
483c8: 2039 0006 3e24 movel 63e24 <_Thread_Dispatch_disable_level>,%d0 483ce: 5280 addql #1,%d0 483d0: 23c0 0006 3e24 movel %d0,63e24 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
483d6: 4a82 tstl %d2
483d8: 667c bnes 48456 <rtems_io_register_driver+0xca> <== NEVER TAKEN
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
483da: 2039 0006 406a movel 6406a <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483e0: 6700 00fc beqw 484de <rtems_io_register_driver+0x152> 483e4: 2239 0006 406e movel 6406e <_IO_Driver_address_table>,%d1 483ea: 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;
483ec: 4a90 tstl %a0@ 483ee: 6700 008e beqw 4847e <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 ) {
483f2: 5282 addql #1,%d2 483f4: 41e8 0018 lea %a0@(24),%a0 483f8: b480 cmpl %d0,%d2
483fa: 65f0 bcss 483ec <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
483fc: 2482 movel %d2,%a2@
if ( m != n )
483fe: b480 cmpl %d0,%d2 48400: 6700 00de beqw 484e0 <rtems_io_register_driver+0x154> 48404: 2602 movel %d2,%d3 48406: 2002 movel %d2,%d0 48408: 2041 moveal %d1,%a0 4840a: e78b lsll #3,%d3 4840c: eb88 lsll #5,%d0 4840e: 9083 subl %d3,%d0 48410: d1c0 addal %d0,%a0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
48412: 20d9 movel %a1@+,%a0@+ 48414: 20d9 movel %a1@+,%a0@+ 48416: 20d9 movel %a1@+,%a0@+ 48418: 20d9 movel %a1@+,%a0@+ 4841a: 20d9 movel %a1@+,%a0@+ 4841c: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
4841e: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
48424: 2d42 0008 movel %d2,%fp@(8)
}
48428: 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 );
4842e: 42ae 0010 clrl %fp@(16) 48432: 42ae 000c clrl %fp@(12)
}
48436: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48438: 4ef9 0005 0bdc jmp 50bdc <rtems_io_initialize>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
4843e: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48440: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48446: 4e5e unlk %fp 48448: 4e75 rts
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
4844a: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4844c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48452: 4e5e unlk %fp 48454: 4e75 rts
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
48456: 2202 movel %d2,%d1 48458: 2002 movel %d2,%d0 4845a: e789 lsll #3,%d1 4845c: eb88 lsll #5,%d0 4845e: 2079 0006 406e moveal 6406e <_IO_Driver_address_table>,%a0 48464: 9081 subl %d1,%d0 48466: 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;
48468: 4a90 tstl %a0@
4846a: 673e beqs 484aa <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();
4846c: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 48472: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48474: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4847a: 4e5e unlk %fp 4847c: 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;
4847e: 4aa8 0004 tstl %a0@(4) 48482: 6700 ff78 beqw 483fc <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 ) {
48486: 5282 addql #1,%d2 48488: 41e8 0018 lea %a0@(24),%a0 4848c: b480 cmpl %d0,%d2 4848e: 6500 ff5c bcsw 483ec <rtems_io_register_driver+0x60> 48492: 6000 ff68 braw 483fc <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;
48496: 4aa9 0004 tstl %a1@(4) 4849a: 6600 ff28 bnew 483c4 <rtems_io_register_driver+0x38>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
4849e: 7009 moveq #9,%d0
}
484a0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484a6: 4e5e unlk %fp 484a8: 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;
484aa: 4aa8 0004 tstl %a0@(4)
484ae: 66bc bnes 4846c <rtems_io_register_driver+0xe0>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
484b0: 20d9 movel %a1@+,%a0@+ 484b2: 20d9 movel %a1@+,%a0@+ 484b4: 20d9 movel %a1@+,%a0@+ 484b6: 20d9 movel %a1@+,%a0@+ 484b8: 20d9 movel %a1@+,%a0@+ 484ba: 2091 movel %a1@,%a0@
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
484bc: 2482 movel %d2,%a2@
}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
484be: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
484c4: 2d42 0008 movel %d2,%fp@(8)
}
484c8: 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 );
484ce: 42ae 0010 clrl %fp@(16) 484d2: 42ae 000c clrl %fp@(12)
}
484d6: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484d8: 4ef9 0005 0bdc jmp 50bdc <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
484de: 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();
484e0: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 484e6: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
484e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484ee: 4e5e unlk %fp
...
000494e0 <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)
{
494e0: 4e56 fff0 linkw %fp,#-16 494e4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 494e8: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
494ec: 4a8b tstl %a3
494ee: 6744 beqs 49534 <rtems_iterate_over_all_threads+0x54><== NEVER TAKEN
494f0: 49f9 0006 29e8 lea 629e8 <_Objects_Information_table+0x4>,%a4
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
494f6: 2054 moveal %a4@,%a0 494f8: 4a88 tstl %a0
494fa: 672e beqs 4952a <rtems_iterate_over_all_threads+0x4a>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
494fc: 2468 0004 moveal %a0@(4),%a2
if ( !information )
49500: 4a8a tstl %a2
49502: 6726 beqs 4952a <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
49504: 4a6a 000e tstw %a2@(14)
49508: 6720 beqs 4952a <rtems_iterate_over_all_threads+0x4a><== NEVER TAKEN
4950a: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
4950c: 206a 0018 moveal %a2@(24),%a0 49510: 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++ ) {
49514: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
49516: 4a80 tstl %d0
49518: 6706 beqs 49520 <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
continue;
(*routine)(the_thread);
4951a: 2f00 movel %d0,%sp@- 4951c: 4e93 jsr %a3@ 4951e: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
49520: 4280 clrl %d0 49522: 302a 000e movew %a2@(14),%d0 49526: b480 cmpl %d0,%d2
49528: 63e2 blss 4950c <rtems_iterate_over_all_threads+0x2c>
4952a: 588c addql #4,%a4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
4952c: b9fc 0006 29f8 cmpal #403960,%a4
49532: 66c2 bnes 494f6 <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
49534: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4953a: 4e5e unlk %fp
...
0004813c <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
)
{
4813c: 4e56 0000 linkw %fp,#0 48140: 2f0a movel %a2,%sp@- 48142: 246e 0010 moveal %fp@(16),%a2 48146: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
48148: 4a8a tstl %a2
4814a: 6766 beqs 481b2 <rtems_object_get_class_information+0x76>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
4814c: 2f2e 000c movel %fp@(12),%sp@- 48150: 2f2e 0008 movel %fp@(8),%sp@- 48154: 4eb9 0004 9dec jsr 49dec <_Objects_Get_information>
if ( !obj_info )
4815a: 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 );
4815c: 2040 moveal %d0,%a0
if ( !obj_info )
4815e: 4a80 tstl %d0
48160: 675e beqs 481c0 <rtems_object_get_class_information+0x84>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
48162: 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;
48166: 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;
48168: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
4816e: 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;
48172: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
48178: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
4817c: 6750 beqs 481ce <rtems_object_get_class_information+0x92><== NEVER TAKEN
4817e: 2068 0018 moveal %a0@(24),%a0 48182: 7201 moveq #1,%d1 48184: 7001 moveq #1,%d0 48186: 93c9 subal %a1,%a1 48188: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
4818a: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
4818e: 6718 beqs 481a8 <rtems_object_get_class_information+0x6c>
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++ )
48190: 2200 movel %d0,%d1 48192: b082 cmpl %d2,%d0
48194: 63f2 blss 48188 <rtems_object_get_class_information+0x4c><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
48196: 2549 000e movel %a1,%a2@(14) 4819a: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4819c: 242e fff8 movel %fp@(-8),%d2 481a0: 246e fffc moveal %fp@(-4),%a2 481a4: 4e5e unlk %fp 481a6: 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++;
481a8: 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++ )
481aa: 2200 movel %d0,%d1 481ac: b082 cmpl %d2,%d0
481ae: 63d8 blss 48188 <rtems_object_get_class_information+0x4c><== NEVER TAKEN
481b0: 60e4 bras 48196 <rtems_object_get_class_information+0x5a>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481b2: 242e fff8 movel %fp@(-8),%d2
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
481b6: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481b8: 246e fffc moveal %fp@(-4),%a2 481bc: 4e5e unlk %fp 481be: 4e75 rts 481c0: 242e fff8 movel %fp@(-8),%d2
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
481c4: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481c6: 246e fffc moveal %fp@(-4),%a2 481ca: 4e5e unlk %fp 481cc: 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++ )
481ce: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
481d0: 4280 clrl %d0 <== NOT EXECUTED 481d2: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 481d6: 60c4 bras 4819c <rtems_object_get_class_information+0x60><== NOT EXECUTED
00057304 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
57304: 4e56 ffe8 linkw %fp,#-24 57308: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 5730c: 242e 0008 movel %fp@(8),%d2 57310: 2a2e 000c movel %fp@(12),%d5 57314: 282e 0010 movel %fp@(16),%d4 57318: 262e 0014 movel %fp@(20),%d3 5731c: 246e 001c moveal %fp@(28),%a2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
57320: 4a82 tstl %d2
57322: 673a beqs 5735e <rtems_partition_create+0x5a>
return RTEMS_INVALID_NAME;
if ( !starting_address )
57324: 4a85 tstl %d5
57326: 671e beqs 57346 <rtems_partition_create+0x42>
return RTEMS_INVALID_ADDRESS;
if ( !id )
57328: 4a8a tstl %a2
5732a: 671a beqs 57346 <rtems_partition_create+0x42> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
5732c: 4a84 tstl %d4
5732e: 6722 beqs 57352 <rtems_partition_create+0x4e>
57330: 4a83 tstl %d3
57332: 671e beqs 57352 <rtems_partition_create+0x4e>
57334: b684 cmpl %d4,%d3
57336: 621a bhis 57352 <rtems_partition_create+0x4e>
57338: 7003 moveq #3,%d0 5733a: c083 andl %d3,%d0
5733c: 6614 bnes 57352 <rtems_partition_create+0x4e>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
5733e: 103c 0003 moveb #3,%d0 57342: c085 andl %d5,%d0
57344: 6724 beqs 5736a <rtems_partition_create+0x66>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
57346: 7009 moveq #9,%d0
}
57348: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5734e: 4e5e unlk %fp 57350: 4e75 rts
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
57352: 7008 moveq #8,%d0
}
57354: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5735a: 4e5e unlk %fp 5735c: 4e75 rts
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
5735e: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
57360: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 57366: 4e5e unlk %fp 57368: 4e75 rts 5736a: 2039 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d0 57370: 5280 addql #1,%d0 57372: 23c0 0007 f538 movel %d0,7f538 <_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 );
57378: 4879 0007 f3cc pea 7f3cc <_Partition_Information> 5737e: 4eb9 0005 bd9c jsr 5bd9c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
57384: 588f addql #4,%sp 57386: 2640 moveal %d0,%a3 57388: 4a80 tstl %d0
5738a: 675a beqs 573e6 <rtems_partition_create+0xe2>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
5738c: 2745 0010 movel %d5,%a3@(16)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
57390: 2004 movel %d4,%d0
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
57392: 276e 0018 001c movel %fp@(24),%a3@(28)
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
57398: 4c43 0000 remul %d3,%d0,%d0
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
5739c: 2744 0014 movel %d4,%a3@(20)
the_partition->buffer_size = buffer_size;
573a0: 2743 0018 movel %d3,%a3@(24)
the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0;
573a4: 42ab 0020 clrl %a3@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
573a8: 2f03 movel %d3,%sp@- 573aa: 2f00 movel %d0,%sp@- 573ac: 2f05 movel %d5,%sp@- 573ae: 486b 0024 pea %a3@(36) 573b2: 4eb9 0005 a8e8 jsr 5a8e8 <_Chain_Initialize> 573b8: 202b 0008 movel %a3@(8),%d0 573bc: 4281 clrl %d1 573be: 2079 0007 f3e4 moveal 7f3e4 <_Partition_Information+0x18>,%a0 573c4: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
573c6: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
573ca: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
573ce: 2480 movel %d0,%a2@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
573d0: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
573d6: 4fef 0010 lea %sp@(16),%sp
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
573da: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
573dc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 573e2: 4e5e unlk %fp 573e4: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
573e6: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 573ec: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
573ee: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
573f4: 4e5e unlk %fp <== NOT EXECUTED
00057518 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
57518: 4e56 fffc linkw %fp,#-4 5751c: 2f0a movel %a2,%sp@- 5751e: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
57520: 486e fffc pea %fp@(-4) 57524: 2f2e 0008 movel %fp@(8),%sp@- 57528: 4879 0007 f3cc pea 7f3cc <_Partition_Information> 5752e: 242e 000c movel %fp@(12),%d2 57532: 4eb9 0005 c274 jsr 5c274 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
57538: 4fef 000c lea %sp@(12),%sp 5753c: 2440 moveal %d0,%a2 5753e: 4aae fffc tstl %fp@(-4)
57542: 670e beqs 57552 <rtems_partition_return_buffer+0x3a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57544: 242e fff4 movel %fp@(-12),%d2
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
57548: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5754a: 246e fff8 moveal %fp@(-8),%a2 5754e: 4e5e unlk %fp 57550: 4e75 rts
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
57552: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
57556: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
5755a: b082 cmpl %d2,%d0
5755c: 623c bhis 5759a <rtems_partition_return_buffer+0x82>
5755e: d280 addl %d0,%d1 57560: b282 cmpl %d2,%d1
57562: 6536 bcss 5759a <rtems_partition_return_buffer+0x82><== NEVER TAKEN
return (
57564: 2202 movel %d2,%d1 57566: 9280 subl %d0,%d1 57568: 2001 movel %d1,%d0 5756a: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 57570: 4a81 tstl %d1
57572: 6626 bnes 5759a <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 );
57574: 2f02 movel %d2,%sp@- 57576: 486a 0024 pea %a2@(36) 5757a: 4eb9 0005 a84c jsr 5a84c <_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;
57580: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
57584: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5758a: 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;
5758e: 508f addql #8,%sp
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();
57590: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57592: 246e fff8 moveal %fp@(-8),%a2 57596: 4e5e unlk %fp 57598: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
5759a: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
575a0: 242e fff4 movel %fp@(-12),%d2
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
575a4: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
575a6: 246e fff8 moveal %fp@(-8),%a2 575aa: 4e5e unlk %fp
...
00047798 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
47798: 4e56 ffec linkw %fp,#-20 4779c: 48d7 040c moveml %d2-%d3/%a2,%sp@
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
477a0: 486e fffc pea %fp@(-4) 477a4: 242e 0008 movel %fp@(8),%d2 477a8: 2f02 movel %d2,%sp@- 477aa: 4879 0006 1e48 pea 61e48 <_Rate_monotonic_Information> 477b0: 4eb9 0004 9ae0 jsr 49ae0 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
477b6: 4fef 000c lea %sp@(12),%sp 477ba: 2440 moveal %d0,%a2 477bc: 4aae fffc tstl %fp@(-4)
477c0: 661e bnes 477e0 <rtems_rate_monotonic_period+0x48>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
477c2: 2039 0006 1ffe movel 61ffe <_Thread_Executing>,%d0 477c8: b0aa 0040 cmpl %a2@(64),%d0
477cc: 671e beqs 477ec <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
477ce: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> 477d4: 7017 moveq #23,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477d6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477dc: 4e5e unlk %fp 477de: 4e75 rts
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
477e0: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477e2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477e8: 4e5e unlk %fp 477ea: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
477ec: 4aae 000c tstl %fp@(12) 477f0: 6700 00ce beqw 478c0 <rtems_rate_monotonic_period+0x128>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
477f4: 203c 0000 0700 movel #1792,%d0 477fa: 40c3 movew %sr,%d3 477fc: 8083 orl %d3,%d0 477fe: 46c0 movew %d0,%sr
switch ( the_period->state ) {
47800: 202a 0038 movel %a2@(56),%d0 47804: 7202 moveq #2,%d1 47806: b280 cmpl %d0,%d1 47808: 6700 00dc beqw 478e6 <rtems_rate_monotonic_period+0x14e> 4780c: 123c 0004 moveb #4,%d1 47810: b280 cmpl %d0,%d1
47812: 6762 beqs 47876 <rtems_rate_monotonic_period+0xde>
47814: 4a80 tstl %d0
47816: 66c8 bnes 477e0 <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
47818: 46c3 movew %d3,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
4781a: 2f0a movel %a2,%sp@- 4781c: 2d40 fff8 movel %d0,%fp@(-8) 47820: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47826: 223c 0004 7bfc movel #293884,%d1
the_watchdog->id = id;
4782c: 2542 0030 movel %d2,%a2@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47830: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47834: 2541 002c movel %d1,%a2@(44)
the_period->state = RATE_MONOTONIC_ACTIVE;
47838: 7202 moveq #2,%d1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4783a: 2542 001c movel %d2,%a2@(28) 4783e: 2541 0038 movel %d1,%a2@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47842: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
47846: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
4784a: 2542 003c movel %d2,%a2@(60)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4784e: 486a 0010 pea %a2@(16) 47852: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 47858: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
4785e: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47864: 202e fff8 movel %fp@(-8),%d0 47868: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4786c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47872: 4e5e unlk %fp 47874: 4e75 rts
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
47876: 2f0a movel %a2,%sp@- 47878: 4eb9 0004 767e jsr 4767e <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
4787e: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
47880: 7202 moveq #2,%d1
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
47882: 7006 moveq #6,%d0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47884: 242e 000c movel %fp@(12),%d2
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
47888: 2541 0038 movel %d1,%a2@(56) 4788c: 2542 001c movel %d2,%a2@(28)
the_period->next_length = length;
47890: 2542 003c movel %d2,%a2@(60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47894: 486a 0010 pea %a2@(16) 47898: 4879 0006 201c pea 6201c <_Watchdog_Ticks_chain> 4789e: 2d40 fff8 movel %d0,%fp@(-8) 478a2: 4eb9 0004 b5cc jsr 4b5cc <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
478a8: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
478ae: 202e fff8 movel %fp@(-8),%d0 478b2: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478b6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478bc: 4e5e unlk %fp 478be: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
478c0: 202a 0038 movel %a2@(56),%d0 478c4: 7204 moveq #4,%d1 478c6: b280 cmpl %d0,%d1 478c8: 6400 009c bccw 47966 <rtems_rate_monotonic_period+0x1ce>
478cc: 4280 clrl %d0 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
478ce: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 478d2: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
478d8: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478dc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478e2: 4e5e unlk %fp 478e4: 4e75 rts
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
478e6: 2f0a movel %a2,%sp@- 478e8: 4eb9 0004 767e jsr 4767e <_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;
the_period->next_length = length;
478ee: 242e 000c movel %fp@(12),%d2
/*
* 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;
478f2: 7001 moveq #1,%d0
the_period->next_length = length;
478f4: 2542 003c movel %d2,%a2@(60)
/*
* 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;
478f8: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
478fc: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
478fe: 2079 0006 1ffe moveal 61ffe <_Thread_Executing>,%a0 47904: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
4790a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4790e: 2f08 movel %a0,%sp@- 47910: 4eb9 0004 acd0 jsr 4acd0 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
47916: 203c 0000 0700 movel #1792,%d0 4791c: 40c1 movew %sr,%d1 4791e: 8081 orl %d1,%d0 47920: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
47922: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
47924: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
47928: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
4792c: 46c1 movew %d1,%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 )
4792e: 7203 moveq #3,%d1 47930: 4fef 000c lea %sp@(12),%sp 47934: b280 cmpl %d0,%d1
47936: 6712 beqs 4794a <rtems_rate_monotonic_period+0x1b2>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
47938: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> 4793e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47940: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47946: 4e5e unlk %fp 47948: 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 );
4794a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4794e: 2f39 0006 1ffe movel 61ffe <_Thread_Executing>,%sp@- 47954: 4eb9 0004 9ff0 jsr 49ff0 <_Thread_Clear_state> 4795a: 508f addql #8,%sp
_Thread_Enable_dispatch();
4795c: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch> 47962: 4280 clrl %d0 47964: 60da bras 47940 <rtems_rate_monotonic_period+0x1a8>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
47966: 41f9 0005 f482 lea 5f482 <CSWTCH.43>,%a0 4796c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47970: 2d40 fff8 movel %d0,%fp@(-8) 47974: 4eb9 0004 a3c4 jsr 4a3c4 <_Thread_Enable_dispatch>
return( return_value );
4797a: 202e fff8 movel %fp@(-8),%d0 4797e: 6000 ff5c braw 478dc <rtems_rate_monotonic_period+0x144>
...
00047984 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
47984: 4e56 ff78 linkw %fp,#-136 47988: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4798c: 262e 0008 movel %fp@(8),%d3 47990: 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 )
47994: 4a8a tstl %a2 47996: 6700 0082 beqw 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return;
(*print)( context, "Period information by period\n" );
4799a: 4879 0005 f496 pea 5f496 <CSWTCH.43+0x14> 479a0: 2f03 movel %d3,%sp@- 479a2: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
479a4: 4879 0005 f4b4 pea 5f4b4 <CSWTCH.43+0x32> 479aa: 2f03 movel %d3,%sp@- 479ac: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
479ae: 4879 0005 f4d6 pea 5f4d6 <CSWTCH.43+0x54> 479b4: 2f03 movel %d3,%sp@- 479b6: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
479b8: 4879 0005 f4f9 pea 5f4f9 <CSWTCH.43+0x77> 479be: 2f03 movel %d3,%sp@- 479c0: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
479c2: 4fef 001c lea %sp@(28),%sp 479c6: 2ebc 0005 f544 movel #390468,%sp@ 479cc: 2f03 movel %d3,%sp@- 479ce: 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 ;
479d0: 2439 0006 1e4e movel 61e4e <_Rate_monotonic_Information+0x6>,%d2 479d6: 508f addql #8,%sp 479d8: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2
479de: 623a bhis 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NEVER TAKEN
479e0: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
479e2: 2a0e movel %fp,%d5 479e4: 0684 ffff ffa2 addil #-94,%d4 479ea: 47f9 0004 e168 lea 4e168 <rtems_rate_monotonic_get_statistics>,%a3
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
479f0: 4bf9 0004 e228 lea 4e228 <rtems_rate_monotonic_get_status>,%a5
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
479f6: 5b85 subql #5,%d5 479f8: 49f9 0004 7cdc lea 47cdc <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 );
479fe: 2e3c 0004 b1d4 movel #307668,%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 );
47a04: 2f04 movel %d4,%sp@- 47a06: 2f02 movel %d2,%sp@- 47a08: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47a0a: 508f addql #8,%sp 47a0c: 4a80 tstl %d0
47a0e: 6714 beqs 47a24 <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++ ) {
47a10: 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 ;
47a12: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2
47a18: 63ea blss 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47a1a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47a20: 4e5e unlk %fp 47a22: 4e75 rts
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
47a24: 486e ffda pea %fp@(-38) 47a28: 2f02 movel %d2,%sp@- 47a2a: 4e95 jsr %a5@
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47a2c: 2f05 movel %d5,%sp@- 47a2e: 4878 0005 pea 5 <COMPARE> 47a32: 2f2e ffda movel %fp@(-38),%sp@- 47a36: 4e94 jsr %a4@
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47a38: 2f2e ffa6 movel %fp@(-90),%sp@- 47a3c: 2f2e ffa2 movel %fp@(-94),%sp@- 47a40: 2f05 movel %d5,%sp@- 47a42: 2f02 movel %d2,%sp@- 47a44: 4879 0005 f590 pea 5f590 <CSWTCH.43+0x10e> 47a4a: 2f03 movel %d3,%sp@- 47a4c: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47a4e: 202e ffa2 movel %fp@(-94),%d0 47a52: 4fef 002c lea %sp@(44),%sp
47a56: 6618 bnes 47a70 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
47a58: 4879 0005 f42e pea 5f42e <rtems_status_assoc+0x19e>
* 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++ ) {
47a5e: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
47a60: 2f03 movel %d3,%sp@- 47a62: 4e92 jsr %a2@
continue;
47a64: 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 ;
47a66: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2
47a6c: 6396 blss 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80><== ALWAYS TAKEN
47a6e: 60aa bras 47a1a <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 );
47a70: 486e fff2 pea %fp@(-14) 47a74: 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++ ) {
47a76: 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 );
47a78: 2f00 movel %d0,%sp@- 47a7a: 486e ffba pea %fp@(-70) 47a7e: 4e90 jsr %a0@
(*print)( context,
47a80: 202e fff6 movel %fp@(-10),%d0 47a84: 223c 0000 03e8 movel #1000,%d1 47a8a: 4c41 0800 remsl %d1,%d0,%d0 47a8e: 2c2e ffb6 movel %fp@(-74),%d6 47a92: 2f00 movel %d0,%sp@- 47a94: 2001 movel %d1,%d0 47a96: 2f2e fff2 movel %fp@(-14),%sp@- 47a9a: 4c40 6806 remsl %d0,%d6,%d6 47a9e: 202e ffae movel %fp@(-82),%d0 47aa2: 2246 moveal %d6,%a1 47aa4: 223c 0000 03e8 movel #1000,%d1 47aaa: 2f09 movel %a1,%sp@- 47aac: 2f2e ffb2 movel %fp@(-78),%sp@- 47ab0: 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,
47ab4: 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,
47aba: 2f00 movel %d0,%sp@- 47abc: 2f2e ffaa movel %fp@(-86),%sp@- 47ac0: 4879 0005 f5a7 pea 5f5a7 <CSWTCH.43+0x125> 47ac6: 2f03 movel %d3,%sp@- 47ac8: 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);
47aca: 4fef 002c lea %sp@(44),%sp 47ace: 2047 moveal %d7,%a0 47ad0: 486e fff2 pea %fp@(-14) 47ad4: 2f2e ffa2 movel %fp@(-94),%sp@- 47ad8: 486e ffd2 pea %fp@(-46) 47adc: 4e90 jsr %a0@
(*print)( context,
47ade: 202e fff6 movel %fp@(-10),%d0 47ae2: 4c46 0800 remsl %d6,%d0,%d0 47ae6: 222e ffce movel %fp@(-50),%d1 47aea: 2f00 movel %d0,%sp@- 47aec: 2f2e fff2 movel %fp@(-14),%sp@- 47af0: 4c46 1801 remsl %d6,%d1,%d1 47af4: 202e ffc6 movel %fp@(-58),%d0 47af8: 2241 moveal %d1,%a1 47afa: 2f09 movel %a1,%sp@- 47afc: 2f2e ffca movel %fp@(-54),%sp@- 47b00: 4c46 0800 remsl %d6,%d0,%d0 47b04: 2f00 movel %d0,%sp@- 47b06: 2f2e ffc2 movel %fp@(-62),%sp@- 47b0a: 4879 0005 f5c6 pea 5f5c6 <CSWTCH.43+0x144> 47b10: 2f03 movel %d3,%sp@- 47b12: 4e92 jsr %a2@ 47b14: 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 ;
47b18: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2 47b1e: 6300 fee4 blsw 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
47b22: 6000 fef6 braw 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
00047b40 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47b40: 4e56 0000 linkw %fp,#0 47b44: 2039 0006 1f44 movel 61f44 <_Thread_Dispatch_disable_level>,%d0 47b4a: 5280 addql #1,%d0 47b4c: 2f0a movel %a2,%sp@- 47b4e: 23c0 0006 1f44 movel %d0,61f44 <_Thread_Dispatch_disable_level> 47b54: 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 ;
47b56: 2439 0006 1e4e movel 61e4e <_Rate_monotonic_Information+0x6>,%d2 47b5c: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2
47b62: 6216 bhis 47b7a <rtems_rate_monotonic_reset_all_statistics+0x3a><== NEVER TAKEN
47b64: 45f9 0004 7b8c lea 47b8c <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
47b6a: 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++ ) {
47b6c: 5282 addql #1,%d2
status = rtems_rate_monotonic_reset_statistics( id );
47b6e: 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 ;
47b70: 588f addql #4,%sp 47b72: b4b9 0006 1e52 cmpl 61e52 <_Rate_monotonic_Information+0xa>,%d2
47b78: 63f0 blss 47b6a <rtems_rate_monotonic_reset_all_statistics+0x2a>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
47b7a: 242e fff8 movel %fp@(-8),%d2 47b7e: 246e fffc moveal %fp@(-4),%a2 47b82: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
47b84: 4ef9 0004 a3c4 jmp 4a3c4 <_Thread_Enable_dispatch>
...
00057e40 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
57e40: 4e56 ffec linkw %fp,#-20 57e44: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57e48: 262e 0008 movel %fp@(8),%d3 57e4c: 242e 000c movel %fp@(12),%d2 57e50: 246e 001c moveal %fp@(28),%a2
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
57e54: 4a83 tstl %d3 57e56: 6700 0096 beqw 57eee <rtems_region_create+0xae>
return RTEMS_INVALID_NAME;
if ( !starting_address )
57e5a: 4a82 tstl %d2
57e5c: 670a beqs 57e68 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !id )
57e5e: 4a8a tstl %a2
57e60: 6706 beqs 57e68 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
57e62: 7003 moveq #3,%d0 57e64: c082 andl %d2,%d0
57e66: 670c beqs 57e74 <rtems_region_create+0x34>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
57e68: 7009 moveq #9,%d0
}
57e6a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57e70: 4e5e unlk %fp 57e72: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
57e74: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 57e7a: 4eb9 0005 a7b8 jsr 5a7b8 <_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 );
57e80: 4879 0007 f43c pea 7f43c <_Region_Information> 57e86: 4eb9 0005 bd9c jsr 5bd9c <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
57e8c: 508f addql #8,%sp 57e8e: 2640 moveal %d0,%a3 57e90: 4a80 tstl %d0
57e92: 6766 beqs 57efa <rtems_region_create+0xba>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
57e94: 2f2e 0014 movel %fp@(20),%sp@- 57e98: 2f2e 0010 movel %fp@(16),%sp@- 57e9c: 2f02 movel %d2,%sp@- 57e9e: 486b 0068 pea %a3@(104) 57ea2: 4eb9 0005 b820 jsr 5b820 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57ea8: 4fef 0010 lea %sp@(16),%sp
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
57eac: 2740 005c movel %d0,%a3@(92)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57eb0: 6662 bnes 57f14 <rtems_region_create+0xd4>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
57eb2: 2f0b movel %a3,%sp@- 57eb4: 4879 0007 f43c pea 7f43c <_Region_Information> 57eba: 103c 0008 moveb #8,%d0 57ebe: 2d40 fffc movel %d0,%fp@(-4) 57ec2: 4eb9 0005 c0d4 jsr 5c0d4 <_Objects_Free> 57ec8: 202e fffc movel %fp@(-4),%d0 57ecc: 508f addql #8,%sp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57ece: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 57ed4: 2d40 fffc movel %d0,%fp@(-4) 57ed8: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
57ede: 202e fffc movel %fp@(-4),%d0 57ee2: 588f addql #4,%sp
}
57ee4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57eea: 4e5e unlk %fp 57eec: 4e75 rts
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
57eee: 7003 moveq #3,%d0
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
57ef0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57ef6: 4e5e unlk %fp 57ef8: 4e75 rts
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57efa: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@-
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
57f00: 7005 moveq #5,%d0
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57f02: 2d40 fffc movel %d0,%fp@(-4) 57f06: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
57f0c: 202e fffc movel %fp@(-4),%d0 57f10: 588f addql #4,%sp 57f12: 60d0 bras 57ee4 <rtems_region_create+0xa4>
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
57f14: 2742 0050 movel %d2,%a3@(80)
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f18: 222e 0018 movel %fp@(24),%d1
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57f1c: 202e 0010 movel %fp@(16),%d0
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f20: e489 lsrl #2,%d1
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57f22: 242e 0014 movel %fp@(20),%d2
the_region->attribute_set = attribute_set;
57f26: 206e 0018 moveal %fp@(24),%a0
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57f2a: 2740 0054 movel %d0,%a3@(84)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57f2e: 4280 clrl %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57f30: 2742 0058 movel %d2,%a3@(88)
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f34: 7401 moveq #1,%d2
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
57f36: 2748 0060 movel %a0,%a3@(96)
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f3a: c481 andl %d1,%d2
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
57f3c: 42ab 0064 clrl %a3@(100)
_Thread_queue_Initialize(
57f40: 4878 0006 pea 6 <EXTENDSFDF> 57f44: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 57f48: 2f02 movel %d2,%sp@- 57f4a: 486b 0010 pea %a3@(16)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57f4e: 4282 clrl %d2 57f50: 2d40 fffc movel %d0,%fp@(-4) 57f54: 4eb9 0005 d35c jsr 5d35c <_Thread_queue_Initialize> 57f5a: 222b 0008 movel %a3@(8),%d1
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57f5e: 4fef 0010 lea %sp@(16),%sp 57f62: 2079 0007 f454 moveal 7f454 <_Region_Information+0x18>,%a0 57f68: 3401 movew %d1,%d2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
57f6a: 2743 000c movel %d3,%a3@(12) 57f6e: 202e fffc movel %fp@(-4),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57f72: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 57f76: 2481 movel %d1,%a2@
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57f78: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 57f7e: 2d40 fffc movel %d0,%fp@(-4) 57f82: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
57f88: 202e fffc movel %fp@(-4),%d0 57f8c: 588f addql #4,%sp 57f8e: 6000 ff54 braw 57ee4 <rtems_region_create+0xa4>
...
00058044 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
58044: 4e56 fff8 linkw %fp,#-8 58048: 2f0a movel %a2,%sp@- 5804a: 2f02 movel %d2,%sp@- 5804c: 242e 000c movel %fp@(12),%d2
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
58050: 677e beqs 580d0 <rtems_region_extend+0x8c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
58052: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 58058: 4eb9 0005 a7b8 jsr 5a7b8 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
5805e: 486e fff8 pea %fp@(-8) 58062: 2f2e 0008 movel %fp@(8),%sp@- 58066: 4879 0007 f43c pea 7f43c <_Region_Information> 5806c: 4eb9 0005 c238 jsr 5c238 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
58072: 4fef 0010 lea %sp@(16),%sp 58076: 2440 moveal %d0,%a2 58078: 4aae fff8 tstl %fp@(-8)
5807c: 6640 bnes 580be <rtems_region_extend+0x7a>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
5807e: 486e fffc pea %fp@(-4) 58082: 2f2e 0010 movel %fp@(16),%sp@- 58086: 2f02 movel %d2,%sp@- 58088: 486a 0068 pea %a2@(104) 5808c: 4eb9 0005 b510 jsr 5b510 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
58092: 4fef 0010 lea %sp@(16),%sp 58096: 4a80 tstl %d0
58098: 6748 beqs 580e2 <rtems_region_extend+0x9e>
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
5809a: 7201 moveq #1,%d1 5809c: b280 cmpl %d0,%d1
5809e: 6760 beqs 58100 <rtems_region_extend+0xbc>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580a0: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
580a6: 7418 moveq #24,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580a8: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
580ae: 588f addql #4,%sp
}
580b0: 2002 movel %d2,%d0 580b2: 242e fff0 movel %fp@(-16),%d2 580b6: 246e fff4 moveal %fp@(-12),%a2 580ba: 4e5e unlk %fp 580bc: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580be: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
580c4: 7404 moveq #4,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580c6: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
580cc: 588f addql #4,%sp 580ce: 60e0 bras 580b0 <rtems_region_extend+0x6c>
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
580d0: 143c 0009 moveb #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
580d4: 2002 movel %d2,%d0 580d6: 242e fff0 movel %fp@(-16),%d2 580da: 246e fff4 moveal %fp@(-12),%a2 580de: 4e5e unlk %fp 580e0: 4e75 rts
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
580e2: 202e fffc movel %fp@(-4),%d0
the_region->maximum_segment_size += amount_extended;
580e6: d1aa 005c addl %d0,%a2@(92) 580ea: 4282 clrl %d2
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
580ec: d1aa 0054 addl %d0,%a2@(84)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580f0: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 580f6: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
580fc: 588f addql #4,%sp 580fe: 60b0 bras 580b0 <rtems_region_extend+0x6c>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58100: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
58106: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58108: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
5810e: 588f addql #4,%sp 58110: 609e bras 580b0 <rtems_region_extend+0x6c>
...
00058398 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
58398: 4e56 fffc linkw %fp,#-4 5839c: 2f03 movel %d3,%sp@- 5839e: 262e 0010 movel %fp@(16),%d3 583a2: 2f02 movel %d2,%sp@- 583a4: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
583a8: 6700 0092 beqw 5843c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !size )
583ac: 4a83 tstl %d3 583ae: 6700 008c beqw 5843c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
583b2: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@- 583b8: 4eb9 0005 a7b8 jsr 5a7b8 <_API_Mutex_Lock> 583be: 486e fffc pea %fp@(-4) 583c2: 2f2e 0008 movel %fp@(8),%sp@- 583c6: 4879 0007 f43c pea 7f43c <_Region_Information> 583cc: 4eb9 0005 c238 jsr 5c238 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
583d2: 222e fffc movel %fp@(-4),%d1 583d6: 4fef 0010 lea %sp@(16),%sp
583da: 6636 bnes 58412 <rtems_region_get_segment_size+0x7a><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
583dc: 2f03 movel %d3,%sp@- 583de: 2040 moveal %d0,%a0 583e0: 2f02 movel %d2,%sp@- 583e2: 4868 0068 pea %a0@(104) 583e6: 4eb9 0005 bc74 jsr 5bc74 <_Heap_Size_of_alloc_area> 583ec: 4fef 000c lea %sp@(12),%sp 583f0: 4a00 tstb %d0
583f2: 6624 bnes 58418 <rtems_region_get_segment_size+0x80><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
583f4: 2f39 0007 f5ea movel 7f5ea <_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 ) )
583fa: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
583fc: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
58402: 588f addql #4,%sp <== NOT EXECUTED
}
58404: 2002 movel %d2,%d0 58406: 242e fff4 movel %fp@(-12),%d2 5840a: 262e fff8 movel %fp@(-8),%d3 5840e: 4e5e unlk %fp 58410: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
58412: 7001 moveq #1,%d0 58414: b081 cmpl %d1,%d0
58416: 6712 beqs 5842a <rtems_region_get_segment_size+0x92><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58418: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@-
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
5841e: 4282 clrl %d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58420: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
58426: 588f addql #4,%sp 58428: 60da bras 58404 <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
5842a: 2f39 0007 f5ea movel 7f5ea <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
58430: 7404 moveq #4,%d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58432: 4eb9 0005 a818 jsr 5a818 <_API_Mutex_Unlock>
return return_status;
58438: 588f addql #4,%sp 5843a: 60c8 bras 58404 <rtems_region_get_segment_size+0x6c> 5843c: 7409 moveq #9,%d2
}
5843e: 2002 movel %d2,%d0 58440: 242e fff4 movel %fp@(-12),%d2 58444: 262e fff8 movel %fp@(-8),%d3
58448: 4e5e unlk %fp <== NOT EXECUTED
00046464 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
46464: 4e56 ffd4 linkw %fp,#-44 46468: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4646c: 262e 0008 movel %fp@(8),%d3 46470: 242e 0010 movel %fp@(16),%d2 46474: 246e 0018 moveal %fp@(24),%a2
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
46478: 4a83 tstl %d3
4647a: 6748 beqs 464c4 <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
4647c: 4a8a tstl %a2 4647e: 6700 00ea beqw 4656a <rtems_semaphore_create+0x106>
* id - semaphore id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_semaphore_create(
46482: 2002 movel %d2,%d0 46484: 0280 0000 00c0 andil #192,%d0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
4648a: 6744 beqs 464d0 <rtems_semaphore_create+0x6c>
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
4648c: 7230 moveq #48,%d1 4648e: 7810 moveq #16,%d4 46490: c282 andl %d2,%d1 46492: b881 cmpl %d1,%d4
46494: 670c beqs 464a2 <rtems_semaphore_create+0x3e>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46496: 700b moveq #11,%d0
}
46498: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 4649e: 4e5e unlk %fp 464a0: 4e75 rts
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
464a2: 44c2 movew %d2,%ccr
464a4: 66f0 bnes 46496 <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
464a6: 0c80 0000 00c0 cmpil #192,%d0
464ac: 67e8 beqs 46496 <rtems_semaphore_create+0x32>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
464ae: 7001 moveq #1,%d0 464b0: b0ae 000c cmpl %fp@(12),%d0
464b4: 6420 bccs 464d6 <rtems_semaphore_create+0x72>
464b6: 103c 000a moveb #10,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
464ba: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464c0: 4e5e unlk %fp 464c2: 4e75 rts
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
464c4: 7003 moveq #3,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
464c6: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464cc: 4e5e unlk %fp 464ce: 4e75 rts
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
464d0: 7830 moveq #48,%d4 464d2: c882 andl %d2,%d4
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
464d4: 66d8 bnes 464ae <rtems_semaphore_create+0x4a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
464d6: 2039 0005 fdfc movel 5fdfc <_Thread_Dispatch_disable_level>,%d0 464dc: 5280 addql #1,%d0 464de: 23c0 0005 fdfc movel %d0,5fdfc <_Thread_Dispatch_disable_level>
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
464e4: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 464ea: 4eb9 0004 7b0c jsr 47b0c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
464f0: 588f addql #4,%sp 464f2: 2640 moveal %d0,%a3 464f4: 4a80 tstl %d0 464f6: 6700 00d8 beqw 465d0 <rtems_semaphore_create+0x16c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
464fa: 2742 0010 movel %d2,%a3@(16)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
464fe: 4a84 tstl %d4
46500: 6774 beqs 46576 <rtems_semaphore_create+0x112>
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
46502: 44c2 movew %d2,%ccr 46504: 56c0 sne %d0 46506: 49c0 extbl %d0 46508: 5280 addql #1,%d0 4650a: 2d40 fff0 movel %d0,%fp@(-16)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
4650e: 7010 moveq #16,%d0 46510: b084 cmpl %d4,%d0 46512: 6700 00ce beqw 465e2 <rtems_semaphore_create+0x17e>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
46516: 7202 moveq #2,%d1
the_mutex_attr.only_owner_release = false;
46518: 4204 clrb %d4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
4651a: 2d41 ffea movel %d1,%fp@(-22)
the_mutex_attr.only_owner_release = false;
4651e: 1d44 ffee moveb %d4,%fp@(-18)
}
mutex_status = _CORE_mutex_Initialize(
46522: 7001 moveq #1,%d0 46524: b0ae 000c cmpl %fp@(12),%d0 46528: 57c0 seq %d0 4652a: 49c0 extbl %d0 4652c: 4480 negl %d0 4652e: 2f00 movel %d0,%sp@- 46530: 486e ffea pea %fp@(-22) 46534: 486b 0014 pea %a3@(20) 46538: 4eb9 0004 71bc jsr 471bc <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
4653e: 4fef 000c lea %sp@(12),%sp 46542: 7206 moveq #6,%d1 46544: b280 cmpl %d0,%d1
46546: 665e bnes 465a6 <rtems_semaphore_create+0x142>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
46548: 2f0b movel %a3,%sp@- 4654a: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 46550: 4eb9 0004 7e44 jsr 47e44 <_Objects_Free>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
46556: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
4655c: 508f addql #8,%sp
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4655e: 7013 moveq #19,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
46560: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46566: 4e5e unlk %fp 46568: 4e75 rts
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
4656a: 7009 moveq #9,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4656c: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46572: 4e5e unlk %fp 46574: 4e75 rts
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46576: 2f2e 000c movel %fp@(12),%sp@-
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
4657a: 72ff moveq #-1,%d1
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
4657c: 486e fff8 pea %fp@(-8) 46580: 486b 0014 pea %a3@(20)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46584: 44c2 movew %d2,%ccr 46586: 56c0 sne %d0
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
46588: 2d41 fff8 movel %d1,%fp@(-8)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
4658c: 49c0 extbl %d0 4658e: 5280 addql #1,%d0
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46590: 42ae ffea clrl %fp@(-22)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46594: 2d40 fffc movel %d0,%fp@(-4)
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
46598: 42ae fff4 clrl %fp@(-12)
_CORE_semaphore_Initialize(
4659c: 4eb9 0004 7504 jsr 47504 <_CORE_semaphore_Initialize> 465a2: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
465a6: 202b 0008 movel %a3@(8),%d0 465aa: 4281 clrl %d1 465ac: 2079 0005 fd50 moveal 5fd50 <_Semaphore_Information+0x18>,%a0 465b2: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
465b4: 2743 000c movel %d3,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
465b8: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
465bc: 2480 movel %d0,%a2@
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
465be: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
465c4: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
465ca: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
465cc: 4e5e unlk %fp 465ce: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
465d0: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch> 465d6: 7005 moveq #5,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
465d8: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 465de: 4e5e unlk %fp 465e0: 4e75 rts
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
465e2: 42ae ffea clrl %fp@(-22)
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
465e6: 7801 moveq #1,%d4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
465e8: 4201 clrb %d1
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
465ea: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
465f0: 1d41 ffee moveb %d1,%fp@(-18)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
465f4: b8ae fff0 cmpl %fp@(-16),%d4 465f8: 6600 ff28 bnew 46522 <rtems_semaphore_create+0xbe>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
465fc: 0802 0006 btst #6,%d2
46600: 6712 beqs 46614 <rtems_semaphore_create+0x1b0>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
46602: 103c 0002 moveb #2,%d0
the_mutex_attr.only_owner_release = true;
46606: 7201 moveq #1,%d1
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
46608: 2d40 fff0 movel %d0,%fp@(-16)
the_mutex_attr.only_owner_release = true;
4660c: 1d41 ffee moveb %d1,%fp@(-18) 46610: 6000 ff10 braw 46522 <rtems_semaphore_create+0xbe>
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
46614: 4a02 tstb %d2 46616: 6c00 ff0a bgew 46522 <rtems_semaphore_create+0xbe>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4661a: 7803 moveq #3,%d4
the_mutex_attr.only_owner_release = true;
4661c: 7001 moveq #1,%d0
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4661e: 2d44 fff0 movel %d4,%fp@(-16)
the_mutex_attr.only_owner_release = true;
46622: 1d40 ffee moveb %d0,%fp@(-18) 46626: 6000 fefa braw 46522 <rtems_semaphore_create+0xbe>
...
0004662c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
4662c: 4e56 fffc linkw %fp,#-4 46630: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
46632: 486e fffc pea %fp@(-4) 46636: 2f2e 0008 movel %fp@(8),%sp@- 4663a: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 46640: 4eb9 0004 7fa8 jsr 47fa8 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
46646: 4fef 000c lea %sp@(12),%sp 4664a: 2440 moveal %d0,%a2 4664c: 4aae fffc tstl %fp@(-4)
46650: 670a beqs 4665c <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46652: 246e fff8 moveal %fp@(-8),%a2
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
46656: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46658: 4e5e unlk %fp 4665a: 4e75 rts 4665c: 7030 moveq #48,%d0 4665e: 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) ) {
46662: 6760 beqs 466c4 <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
46664: 4aaa 0062 tstl %a2@(98)
46668: 6616 bnes 46680 <rtems_semaphore_delete+0x54>
4666a: 7220 moveq #32,%d1 4666c: b280 cmpl %d0,%d1
4666e: 6710 beqs 46680 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
46670: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46676: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL:
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();
4667a: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4667c: 4e5e unlk %fp 4667e: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
46680: 4878 0004 pea 4 <CONTEXT_ARG> 46684: 42a7 clrl %sp@- 46686: 486a 0014 pea %a2@(20) 4668a: 4eb9 0004 71b0 jsr 471b0 <_CORE_mutex_Flush> 46690: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
46694: 2f0a movel %a2,%sp@- 46696: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 4669c: 4eb9 0004 7b9c jsr 47b9c <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
466a2: 2f0a movel %a2,%sp@- 466a4: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 466aa: 4eb9 0004 7e44 jsr 47e44 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466b0: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
466b6: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466ba: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466bc: 246e fff8 moveal %fp@(-8),%a2 466c0: 4e5e unlk %fp 466c2: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
466c4: 4878 0002 pea 2 <DOUBLE_FLOAT> 466c8: 42a7 clrl %sp@- 466ca: 486a 0014 pea %a2@(20) 466ce: 4eb9 0004 74f8 jsr 474f8 <_CORE_semaphore_Flush> 466d4: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
466d8: 2f0a movel %a2,%sp@- 466da: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 466e0: 4eb9 0004 7b9c jsr 47b9c <_Objects_Close> 466e6: 2f0a movel %a2,%sp@- 466e8: 4879 0005 fd38 pea 5fd38 <_Semaphore_Information> 466ee: 4eb9 0004 7e44 jsr 47e44 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466f4: 4eb9 0004 888c jsr 4888c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
466fa: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466fe: 4280 clrl %d0 46700: 60ba bras 466bc <rtems_semaphore_delete+0x90>
...
00050710 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
50710: 4e56 fffc linkw %fp,#-4 50714: 486e fffc pea %fp@(-4) 50718: 2f2e 0008 movel %fp@(8),%sp@- 5071c: 4879 0006 3d60 pea 63d60 <_Semaphore_Information> 50722: 4eb9 0004 95cc jsr 495cc <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
50728: 4fef 000c lea %sp@(12),%sp 5072c: 4aae fffc tstl %fp@(-4)
50730: 6706 beqs 50738 <rtems_semaphore_flush+0x28>
50732: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
50734: 4e5e unlk %fp 50736: 4e75 rts
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
50738: 7230 moveq #48,%d1 5073a: 2040 moveal %d0,%a0 5073c: c2a8 0010 andl %a0@(16),%d1
50740: 6720 beqs 50762 <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
50742: 4878 0001 pea 1 <ADD> 50746: 42a7 clrl %sp@- 50748: 4868 0014 pea %a0@(20) 5074c: 4eb9 0004 87d4 jsr 487d4 <_CORE_mutex_Flush> 50752: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
50756: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 5075c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5075e: 4e5e unlk %fp 50760: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
50762: 4878 0001 pea 1 <ADD> 50766: 2040 moveal %d0,%a0 50768: 42a7 clrl %sp@- 5076a: 4868 0014 pea %a0@(20) 5076e: 4eb9 0004 8b1c jsr 48b1c <_CORE_semaphore_Flush> 50774: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
50778: 4eb9 0004 9eb8 jsr 49eb8 <_Thread_Enable_dispatch> 5077e: 4280 clrl %d0 50780: 60dc bras 5075e <rtems_semaphore_flush+0x4e>
...
00058b58 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
58b58: 4e56 fffc linkw %fp,#-4 58b5c: 2f03 movel %d3,%sp@- 58b5e: 2f02 movel %d2,%sp@- 58b60: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58b64: 660e bnes 58b74 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b66: 242e fff4 movel %fp@(-12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58b6a: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b6c: 262e fff8 movel %fp@(-8),%d3 58b70: 4e5e unlk %fp 58b72: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4eb9 0005 cc34 jsr 5cc34 <_Thread_Get>
switch ( location ) {
58b82: 508f addql #8,%sp 58b84: 4aae fffc tstl %fp@(-4)
58b88: 670e beqs 58b98 <rtems_signal_send+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b8a: 242e fff4 movel %fp@(-12),%d2
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
58b8e: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b90: 262e fff8 movel %fp@(-8),%d3 58b94: 4e5e unlk %fp 58b96: 4e75 rts
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
58b98: 2240 moveal %d0,%a1 58b9a: 2069 0108 moveal %a1@(264),%a0
asr = &api->Signal;
58b9e: 4aa8 000a tstl %a0@(10)
58ba2: 6770 beqs 58c14 <rtems_signal_send+0xbc> <== NEVER TAKEN
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
58ba4: 4a28 0008 tstb %a0@(8)
58ba8: 673e beqs 58be8 <rtems_signal_send+0x90>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58baa: 223c 0000 0700 movel #1792,%d1 58bb0: 40c3 movew %sr,%d3 58bb2: 8283 orl %d3,%d1 58bb4: 46c1 movew %d1,%sr
*signal_set |= signals;
58bb6: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
58bba: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
58bbc: 2239 0007 f5d2 movel 7f5d2 <_ISR_Nest_level>,%d1
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
58bc2: 7401 moveq #1,%d2 58bc4: 1342 0074 moveb %d2,%a1@(116)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
58bc8: 4a81 tstl %d1
58bca: 6708 beqs 58bd4 <rtems_signal_send+0x7c>
58bcc: b0b9 0007 f5f2 cmpl 7f5f2 <_Thread_Executing>,%d0
58bd2: 6730 beqs 58c04 <rtems_signal_send+0xac> <== ALWAYS TAKEN
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58bd4: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 58bda: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58bdc: 242e fff4 movel %fp@(-12),%d2 58be0: 262e fff8 movel %fp@(-8),%d3 58be4: 4e5e unlk %fp 58be6: 4e75 rts
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58be8: 203c 0000 0700 movel #1792,%d0 58bee: 40c1 movew %sr,%d1 58bf0: 8081 orl %d1,%d0 58bf2: 46c0 movew %d0,%sr
*signal_set |= signals;
58bf4: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
58bf8: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58bfa: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 58c00: 4280 clrl %d0 58c02: 60d8 bras 58bdc <rtems_signal_send+0x84>
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
58c04: 13c2 0007 f67c moveb %d2,7f67c <_ISR_Signals_to_thread_executing>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58c0a: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 58c10: 4280 clrl %d0 58c12: 60c8 bras 58bdc <rtems_signal_send+0x84>
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
58c14: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58c1a: 242e fff4 movel %fp@(-12),%d2
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
58c1e: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58c20: 262e fff8 movel %fp@(-8),%d3
58c24: 4e5e unlk %fp <== NOT EXECUTED
0004ec68 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4ec68: 4e56 ffe4 linkw %fp,#-28 4ec6c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ec70: 2a2e 0008 movel %fp@(8),%d5 4ec74: 242e 000c movel %fp@(12),%d2 4ec78: 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 )
4ec7c: 4a8c tstl %a4 4ec7e: 6700 0154 beqw 4edd4 <rtems_task_mode+0x16c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4ec82: 2479 0005 feb6 moveal 5feb6 <_Thread_Executing>,%a2
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4ec88: 4a2a 0075 tstb %a2@(117) 4ec8c: 57c0 seq %d0 4ec8e: 263c 0000 0100 movel #256,%d3 4ec94: 49c0 extbl %d0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4ec96: 266a 0108 moveal %a2@(264),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4ec9a: c680 andl %d0,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4ec9c: 4aaa 007a tstl %a2@(122) 4eca0: 6600 00d4 bnew 4ed76 <rtems_task_mode+0x10e>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4eca4: 4a2b 0008 tstb %a3@(8) 4eca8: 57c0 seq %d0 4ecaa: 283c 0000 0400 movel #1024,%d4 4ecb0: 49c0 extbl %d0 4ecb2: c880 andl %d0,%d4
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
4ecb4: 4eb9 0004 9d6c jsr 49d6c <_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;
4ecba: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
4ecbc: 8083 orl %d3,%d0 4ecbe: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4ecc0: 0802 0008 btst #8,%d2
4ecc4: 670e beqs 4ecd4 <rtems_task_mode+0x6c>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4ecc6: 2005 movel %d5,%d0 4ecc8: 7201 moveq #1,%d1 4ecca: e088 lsrl #8,%d0 4eccc: b380 eorl %d1,%d0 4ecce: c081 andl %d1,%d0 4ecd0: 1540 0075 moveb %d0,%a2@(117)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4ecd4: 0802 0009 btst #9,%d2
4ecd8: 6718 beqs 4ecf2 <rtems_task_mode+0x8a>
if ( _Modes_Is_timeslice(mode_set) ) {
4ecda: 0805 0009 btst #9,%d5 4ecde: 6700 00c2 beqw 4eda2 <rtems_task_mode+0x13a>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4ece2: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ece4: 41f9 0005 fdac lea 5fdac <_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;
4ecea: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4ecee: 2550 0076 movel %a0@,%a2@(118)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4ecf2: 7007 moveq #7,%d0 4ecf4: c082 andl %d2,%d0
4ecf6: 6712 beqs 4ed0a <rtems_task_mode+0xa2>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4ecf8: 40c0 movew %sr,%d0 4ecfa: 7207 moveq #7,%d1 4ecfc: c285 andl %d5,%d1 4ecfe: 0280 0000 f8ff andil #63743,%d0 4ed04: e189 lsll #8,%d1 4ed06: 8081 orl %d1,%d0 4ed08: 46c0 movew %d0,%sr
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4ed0a: 0802 000a btst #10,%d2
4ed0e: 6758 beqs 4ed68 <rtems_task_mode+0x100>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4ed10: 700a moveq #10,%d0 4ed12: e0ad lsrl %d0,%d5 4ed14: 7201 moveq #1,%d1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4ed16: 4280 clrl %d0 4ed18: 102b 0008 moveb %a3@(8),%d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4ed1c: b385 eorl %d1,%d5 4ed1e: ca81 andl %d1,%d5
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4ed20: ba80 cmpl %d0,%d5
4ed22: 6744 beqs 4ed68 <rtems_task_mode+0x100>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4ed24: 203c 0000 0700 movel #1792,%d0
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 ) {
asr->is_enabled = is_asr_enabled;
4ed2a: 1745 0008 moveb %d5,%a3@(8) 4ed2e: 40c1 movew %sr,%d1 4ed30: 8081 orl %d1,%d0 4ed32: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4ed34: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
4ed38: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
4ed3e: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
4ed42: 46c1 movew %d1,%sr
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4ed44: 4aab 0012 tstl %a3@(18)
4ed48: 671e beqs 4ed68 <rtems_task_mode+0x100>
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ed4a: 7203 moveq #3,%d1
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
4ed4c: 7001 moveq #1,%d0 4ed4e: 7401 moveq #1,%d2 4ed50: 1540 0074 moveb %d0,%a2@(116)
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ed54: b2b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d1
4ed5a: 6758 beqs 4edb4 <rtems_task_mode+0x14c> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
4ed5c: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4ed5e: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ed64: 4e5e unlk %fp 4ed66: 4e75 rts
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ed68: 7203 moveq #3,%d1
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
4ed6a: 4202 clrb %d2
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4ed6c: b2b9 0005 ff7e cmpl 5ff7e <_System_state_Current>,%d1
4ed72: 66e8 bnes 4ed5c <rtems_task_mode+0xf4> <== NEVER TAKEN
4ed74: 603e bras 4edb4 <rtems_task_mode+0x14c>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4ed76: 4a2b 0008 tstb %a3@(8) 4ed7a: 57c0 seq %d0 4ed7c: 283c 0000 0400 movel #1024,%d4 4ed82: 49c0 extbl %d0 4ed84: c880 andl %d0,%d4
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
4ed86: 4eb9 0004 9d6c jsr 49d6c <_CPU_ISR_Get_level>
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;
4ed8c: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4ed90: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
4ed92: 8083 orl %d3,%d0 4ed94: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4ed96: 0802 0008 btst #8,%d2 4ed9a: 6700 ff38 beqw 4ecd4 <rtems_task_mode+0x6c> 4ed9e: 6000 ff26 braw 4ecc6 <rtems_task_mode+0x5e>
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4eda2: 7007 moveq #7,%d0 4eda4: 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;
4eda6: 42aa 007a clrl %a2@(122)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4edaa: 4a80 tstl %d0 4edac: 6700 ff5c beqw 4ed0a <rtems_task_mode+0xa2> 4edb0: 6000 ff46 braw 4ecf8 <rtems_task_mode+0x90>
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
4edb4: 4eb9 0004 efac jsr 4efac <_Thread_Evaluate_mode> 4edba: 4a00 tstb %d0
4edbc: 6604 bnes 4edc2 <rtems_task_mode+0x15a>
4edbe: 4a02 tstb %d2
4edc0: 679a beqs 4ed5c <rtems_task_mode+0xf4>
_Thread_Dispatch();
4edc2: 4eb9 0004 8734 jsr 48734 <_Thread_Dispatch> 4edc8: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4edca: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4edd0: 4e5e unlk %fp 4edd2: 4e75 rts
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4edd4: 7009 moveq #9,%d0
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
4edd6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4eddc: 4e5e unlk %fp <== NOT EXECUTED
0004af5c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4af5c: 4e56 fffc linkw %fp,#-4 4af60: 2f0a movel %a2,%sp@- 4af62: 246e 0010 moveal %fp@(16),%a2 4af66: 2f02 movel %d2,%sp@- 4af68: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4af6c: 670c beqs 4af7a <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 ) &&
4af6e: 4280 clrl %d0 4af70: 1039 0006 2912 moveb 62912 <rtems_maximum_priority>,%d0 4af76: b082 cmpl %d2,%d0
4af78: 6566 bcss 4afe0 <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4af7a: 4a8a tstl %a2
4af7c: 6770 beqs 4afee <rtems_task_set_priority+0x92>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4af7e: 486e fffc pea %fp@(-4) 4af82: 2f2e 0008 movel %fp@(8),%sp@- 4af86: 4eb9 0004 ced0 jsr 4ced0 <_Thread_Get>
switch ( location ) {
4af8c: 508f addql #8,%sp 4af8e: 4aae fffc tstl %fp@(-4)
4af92: 663e bnes 4afd2 <rtems_task_set_priority+0x76>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4af94: 2040 moveal %d0,%a0 4af96: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4af9a: 4a82 tstl %d2
4af9c: 6720 beqs 4afbe <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4af9e: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4afa2: 4aa8 001c tstl %a0@(28)
4afa6: 6706 beqs 4afae <rtems_task_set_priority+0x52>
the_thread->current_priority > new_priority )
4afa8: b4a8 0014 cmpl %a0@(20),%d2
4afac: 6410 bccs 4afbe <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
4afae: 42a7 clrl %sp@- 4afb0: 2f02 movel %d2,%sp@- 4afb2: 2f00 movel %d0,%sp@- 4afb4: 4eb9 0004 c958 jsr 4c958 <_Thread_Change_priority> 4afba: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4afbe: 4eb9 0004 ce78 jsr 4ce78 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afc4: 242e fff4 movel %fp@(-12),%d2
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}
_Thread_Enable_dispatch();
4afc8: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afca: 246e fff8 moveal %fp@(-8),%a2 4afce: 4e5e unlk %fp 4afd0: 4e75 rts 4afd2: 242e fff4 movel %fp@(-12),%d2
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
4afd6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afd8: 246e fff8 moveal %fp@(-8),%a2 4afdc: 4e5e unlk %fp 4afde: 4e75 rts 4afe0: 242e fff4 movel %fp@(-12),%d2 4afe4: 7013 moveq #19,%d0 4afe6: 246e fff8 moveal %fp@(-8),%a2 4afea: 4e5e unlk %fp 4afec: 4e75 rts 4afee: 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 )
4aff2: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4aff4: 246e fff8 moveal %fp@(-8),%a2
4aff8: 4e5e unlk %fp <== NOT EXECUTED
00047888 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
47888: 4e56 fffc linkw %fp,#-4 4788c: 2f02 movel %d2,%sp@- 4788e: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47892: 6762 beqs 478f6 <rtems_task_variable_delete+0x6e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47894: 486e fffc pea %fp@(-4) 47898: 2f2e 0008 movel %fp@(8),%sp@- 4789c: 4eb9 0004 9634 jsr 49634 <_Thread_Get>
switch (location) {
478a2: 508f addql #8,%sp 478a4: 4aae fffc tstl %fp@(-4)
478a8: 663c bnes 478e6 <rtems_task_variable_delete+0x5e>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
478aa: 2240 moveal %d0,%a1 478ac: 2069 0118 moveal %a1@(280),%a0
while (tvp) {
478b0: 4a88 tstl %a0
478b2: 673c beqs 478f0 <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
478b4: b4a8 0004 cmpl %a0@(4),%d2
478b8: 6746 beqs 47900 <rtems_task_variable_delete+0x78>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
478ba: 2248 moveal %a0,%a1
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
478bc: 2050 moveal %a0@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
478be: 4a88 tstl %a0
478c0: 672e beqs 478f0 <rtems_task_variable_delete+0x68><== NEVER TAKEN
if (tvp->ptr == ptr) {
478c2: b4a8 0004 cmpl %a0@(4),%d2
478c6: 66f2 bnes 478ba <rtems_task_variable_delete+0x32>
if (prev)
prev->next = tvp->next;
478c8: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
478ca: 2f08 movel %a0,%sp@- 478cc: 2f00 movel %d0,%sp@- 478ce: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
478d4: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
478da: 508f addql #8,%sp
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
478dc: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478de: 242e fff8 movel %fp@(-8),%d2 478e2: 4e5e unlk %fp 478e4: 4e75 rts 478e6: 242e fff8 movel %fp@(-8),%d2
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
478ea: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478ec: 4e5e unlk %fp 478ee: 4e75 rts
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478f0: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478f6: 242e fff8 movel %fp@(-8),%d2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478fa: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478fc: 4e5e unlk %fp 478fe: 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;
47900: 2240 moveal %d0,%a1 47902: 2350 0118 movel %a0@,%a1@(280)
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47906: 2f08 movel %a0,%sp@- 47908: 2f00 movel %d0,%sp@- 4790a: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47910: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47916: 508f addql #8,%sp
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
47918: 4280 clrl %d0 4791a: 60c2 bras 478de <rtems_task_variable_delete+0x56>
0004791c <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
4791c: 4e56 fffc linkw %fp,#-4 47920: 2f0a movel %a2,%sp@- 47922: 246e 0010 moveal %fp@(16),%a2 47926: 2f02 movel %d2,%sp@- 47928: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
4792c: 6752 beqs 47980 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
4792e: 4a8a tstl %a2
47930: 674e beqs 47980 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
47932: 486e fffc pea %fp@(-4) 47936: 2f2e 0008 movel %fp@(8),%sp@- 4793a: 4eb9 0004 9634 jsr 49634 <_Thread_Get>
switch (location) {
47940: 508f addql #8,%sp 47942: 4aae fffc tstl %fp@(-4)
47946: 662a bnes 47972 <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
47948: 2240 moveal %d0,%a1 4794a: 2069 0118 moveal %a1@(280),%a0
while (tvp) {
4794e: 4a88 tstl %a0
47950: 670c beqs 4795e <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
47952: b4a8 0004 cmpl %a0@(4),%d2
47956: 6736 beqs 4798e <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
47958: 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) {
4795a: 4a88 tstl %a0
4795c: 66f4 bnes 47952 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
4795e: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47964: 242e fff4 movel %fp@(-12),%d2
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47968: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4796a: 246e fff8 moveal %fp@(-8),%a2 4796e: 4e5e unlk %fp 47970: 4e75 rts 47972: 242e fff4 movel %fp@(-12),%d2
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
47976: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47978: 246e fff8 moveal %fp@(-8),%a2 4797c: 4e5e unlk %fp 4797e: 4e75 rts 47980: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47984: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47986: 246e fff8 moveal %fp@(-8),%a2 4798a: 4e5e unlk %fp 4798c: 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;
4798e: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
47992: 4eb9 0004 960c jsr 4960c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47998: 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();
4799c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4799e: 246e fff8 moveal %fp@(-8),%a2 479a2: 4e5e unlk %fp
...
00059548 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
59548: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
5954c: 486e fffc pea %fp@(-4) 59550: 2f2e 0008 movel %fp@(8),%sp@- 59554: 4879 0007 f786 pea 7f786 <_Timer_Information> 5955a: 4eb9 0005 c274 jsr 5c274 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59560: 4fef 000c lea %sp@(12),%sp 59564: 4aae fffc tstl %fp@(-4)
59568: 6706 beqs 59570 <rtems_timer_cancel+0x28>
5956a: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5956c: 4e5e unlk %fp 5956e: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
59570: 7204 moveq #4,%d1 59572: 2040 moveal %d0,%a0 59574: b2a8 0038 cmpl %a0@(56),%d1
59578: 670c beqs 59586 <rtems_timer_cancel+0x3e> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
5957a: 4868 0010 pea %a0@(16) 5957e: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove> 59584: 588f addql #4,%sp
_Thread_Enable_dispatch();
59586: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 5958c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5958e: 4e5e unlk %fp
...
00059784 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59784: 4e56 ffec linkw %fp,#-20 59788: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5978c: 242e 000c movel %fp@(12),%d2 59790: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
59794: 4a39 0007 f54c tstb 7f54c <_TOD_Is_set>
5979a: 660c bnes 597a8 <rtems_timer_fire_when+0x24>
5979c: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5979e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597a4: 4e5e unlk %fp 597a6: 4e75 rts
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
597a8: 2f02 movel %d2,%sp@- 597aa: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 597b0: 588f addql #4,%sp 597b2: 4a00 tstb %d0
597b4: 671a beqs 597d0 <rtems_timer_fire_when+0x4c>
return RTEMS_INVALID_CLOCK;
if ( !routine )
597b6: 4a83 tstl %d3 597b8: 6700 00a8 beqw 59862 <rtems_timer_fire_when+0xde>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
597bc: 2f02 movel %d2,%sp@- 597be: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
597c4: 588f addql #4,%sp
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
597c6: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
597c8: b0b9 0007 f5ca cmpl 7f5ca <_TOD_Now>,%d0
597ce: 620c bhis 597dc <rtems_timer_fire_when+0x58>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
597d0: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
597d2: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597d8: 4e5e unlk %fp 597da: 4e75 rts 597dc: 486e fffc pea %fp@(-4) 597e0: 2f2e 0008 movel %fp@(8),%sp@- 597e4: 4879 0007 f786 pea 7f786 <_Timer_Information> 597ea: 4eb9 0005 c274 jsr 5c274 <_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 ) {
597f0: 4fef 000c lea %sp@(12),%sp 597f4: 2440 moveal %d0,%a2 597f6: 4aae fffc tstl %fp@(-4)
597fa: 665a bnes 59856 <rtems_timer_fire_when+0xd2> <== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
597fc: 2800 movel %d0,%d4 597fe: 0684 0000 0010 addil #16,%d4 59804: 2f04 movel %d4,%sp@- 59806: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
5980c: 202e 0008 movel %fp@(8),%d0 59810: 2540 0030 movel %d0,%a2@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
59814: 94b9 0007 f5ca subl 7f5ca <_TOD_Now>,%d2
the_timer->the_class = TIMER_TIME_OF_DAY;
5981a: 7002 moveq #2,%d0
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
5981c: 256e 0014 0034 movel %fp@(20),%a2@(52) 59822: 2540 0038 movel %d0,%a2@(56)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
59826: 2542 001c movel %d2,%a2@(28)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
5982a: 2543 002c movel %d3,%a2@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5982e: 42aa 0018 clrl %a2@(24)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
59832: 2f04 movel %d4,%sp@- 59834: 4879 0007 f604 pea 7f604 <_Watchdog_Seconds_chain> 5983a: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
59840: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59846: 4fef 000c lea %sp@(12),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
5984a: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5984c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 59852: 4e5e unlk %fp 59854: 4e75 rts
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59856: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59858: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5985e: 4e5e unlk %fp 59860: 4e75 rts
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
59862: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59864: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5986a: 4e5e unlk %fp
...
00059b94 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
59b94: 4e56 fffc linkw %fp,#-4 59b98: 202e 0008 movel %fp@(8),%d0 59b9c: 2f03 movel %d3,%sp@- 59b9e: 2f02 movel %d2,%sp@- 59ba0: 4a80 tstl %d0
59ba2: 6748 beqs 59bec <rtems_timer_initiate_server+0x58>
59ba4: 4281 clrl %d1 59ba6: 1239 0007 9a32 moveb 79a32 <rtems_maximum_priority>,%d1 59bac: b280 cmpl %d0,%d1
59bae: 644a bccs 59bfa <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 )
59bb0: 72ff moveq #-1,%d1 59bb2: b280 cmpl %d0,%d1
59bb4: 6636 bnes 59bec <rtems_timer_initiate_server+0x58>
59bb6: 2239 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d1 59bbc: 5281 addql #1,%d1 59bbe: 4283 clrl %d3 59bc0: 23c1 0007 f538 movel %d1,7f538 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59bc6: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59bc8: 1439 0007 a990 moveb 7a990 <initialized.4084>,%d2
initialized = true;
59bce: 13c0 0007 a990 moveb %d0,7a990 <initialized.4084>
_Thread_Enable_dispatch();
59bd4: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
if ( tmpInitialized )
59bda: 4a02 tstb %d2
59bdc: 6744 beqs 59c22 <rtems_timer_initiate_server+0x8e>
initialized = false;
}
#endif
return status;
}
59bde: 242e fff4 movel %fp@(-12),%d2
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
59be2: 700e moveq #14,%d0
initialized = false;
}
#endif
return status;
}
59be4: 262e fff8 movel %fp@(-8),%d3 59be8: 4e5e unlk %fp 59bea: 4e75 rts 59bec: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59bf0: 7013 moveq #19,%d0
}
59bf2: 262e fff8 movel %fp@(-8),%d3 59bf6: 4e5e unlk %fp 59bf8: 4e75 rts 59bfa: 2239 0007 f538 movel 7f538 <_Thread_Dispatch_disable_level>,%d1 59c00: 5281 addql #1,%d1 59c02: 2600 movel %d0,%d3 59c04: 23c1 0007 f538 movel %d1,7f538 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59c0a: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59c0c: 1439 0007 a990 moveb 7a990 <initialized.4084>,%d2
initialized = true;
59c12: 13c0 0007 a990 moveb %d0,7a990 <initialized.4084>
_Thread_Enable_dispatch();
59c18: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
if ( tmpInitialized )
59c1e: 4a02 tstb %d2
59c20: 66bc bnes 59bde <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(
59c22: 486e fffc pea %fp@(-4) 59c26: 222e 0010 movel %fp@(16),%d1 59c2a: 08c1 000f bset #15,%d1 59c2e: 2f01 movel %d1,%sp@- 59c30: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 59c34: 2f2e 000c movel %fp@(12),%sp@- 59c38: 2f03 movel %d3,%sp@- 59c3a: 2f3c 5449 4d45 movel #1414090053,%sp@- 59c40: 4eb9 0005 8c28 jsr 58c28 <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) {
59c46: 4fef 0018 lea %sp@(24),%sp 59c4a: 4a80 tstl %d0
59c4c: 6714 beqs 59c62 <rtems_timer_initiate_server+0xce>
initialized = false;
}
#endif
return status;
}
59c4e: 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;
59c52: 4201 clrb %d1
initialized = false;
}
#endif
return status;
}
59c54: 262e fff8 movel %fp@(-8),%d3 59c58: 4e5e unlk %fp
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
59c5a: 13c1 0007 a990 moveb %d1,7a990 <initialized.4084>
initialized = false;
}
#endif
return status;
}
59c60: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59c62: 41f9 0007 a9c6 lea 7a9c6 <_Timer_server_Default+0x34>,%a0
/*
* 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(
59c68: 4282 clrl %d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59c6a: 223c 0007 a9c2 movel #502210,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59c70: 23c8 0007 a9c2 movel %a0,7a9c2 <_Timer_server_Default+0x30>
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
59c76: 202e fffc movel %fp@(-4),%d0 59c7a: 41f9 0007 a9fe lea 7a9fe <_Timer_server_Default+0x6c>,%a0 59c80: 23c8 0007 a9fa movel %a0,7a9fa <_Timer_server_Default+0x68>
/*
* 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(
59c86: 2079 0007 f4c4 moveal 7f4c4 <_RTEMS_tasks_Information+0x18>,%a0 59c8c: 3400 movew %d0,%d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59c8e: 23c1 0007 a9ca movel %d1,7a9ca <_Timer_server_Default+0x38>
* 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;
59c94: 2239 0007 f678 movel 7f678 <_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(
59c9a: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 59c9e: 23d0 0007 a992 movel %a0@,7a992 <_Timer_server_Default> 59ca4: 41f9 0007 a9fa lea 7a9fa <_Timer_server_Default+0x68>,%a0 59caa: 23c8 0007 aa02 movel %a0,7aa02 <_Timer_server_Default+0x70>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
59cb0: 4879 0007 a992 pea 7a992 <_Timer_server_Default>
the_watchdog->routine = routine;
59cb6: 41f9 0005 ca48 lea 5ca48 <_Thread_Delay_ended>,%a0 59cbc: 23c8 0007 a9b6 movel %a0,7a9b6 <_Timer_server_Default+0x24> 59cc2: 487a 0160 pea %pc@(59e24 <_Timer_server_Body>) 59cc6: 23c8 0007 a9ee movel %a0,7a9ee <_Timer_server_Default+0x5c>
* 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;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59ccc: 41f9 0007 f5ca lea 7f5ca <_TOD_Now>,%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;
59cd2: 23c1 0007 a9ce movel %d1,7a9ce <_Timer_server_Default+0x3c>
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59cd8: 23d0 0007 aa06 movel %a0@,7aa06 <_Timer_server_Default+0x74>
/*
* 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;
59cde: 223c 0005 a060 movel #368736,%d1
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59ce4: 41f9 0007 a992 lea 7a992 <_Timer_server_Default>,%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;
59cea: 23c1 0007 a996 movel %d1,7a996 <_Timer_server_Default+0x4>
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
ts->active = false;
59cf0: 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;
59cf2: 42b9 0007 aa0a clrl 7aa0a <_Timer_server_Default+0x78>
ts->active = false;
59cf8: 13c1 0007 aa0e moveb %d1,7aa0e <_Timer_server_Default+0x7c>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
59cfe: 2f00 movel %d0,%sp@-
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59d00: 23c8 0007 f7be movel %a0,7f7be <_Timer_server>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
59d06: 42b9 0007 a9c6 clrl 7a9c6 <_Timer_server_Default+0x34> 59d0c: 42b9 0007 a9fe clrl 7a9fe <_Timer_server_Default+0x6c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59d12: 42b9 0007 a9a2 clrl 7a9a2 <_Timer_server_Default+0x10>
the_watchdog->routine = routine; the_watchdog->id = id;
59d18: 23c0 0007 a9ba movel %d0,7a9ba <_Timer_server_Default+0x28>
the_watchdog->user_data = user_data;
59d1e: 42b9 0007 a9be clrl 7a9be <_Timer_server_Default+0x2c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59d24: 42b9 0007 a9da clrl 7a9da <_Timer_server_Default+0x48>
the_watchdog->routine = routine; the_watchdog->id = id;
59d2a: 23c0 0007 a9f2 movel %d0,7a9f2 <_Timer_server_Default+0x60>
the_watchdog->user_data = user_data;
59d30: 42b9 0007 a9f6 clrl 7a9f6 <_Timer_server_Default+0x64>
/*
* Start the timer server
*/
status = rtems_task_start(
59d36: 4eb9 0005 9330 jsr 59330 <rtems_task_start>
initialized = false;
}
#endif
return status;
}
59d3c: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59d40: 4fef 000c lea %sp@(12),%sp
}
59d44: 262e fff8 movel %fp@(-8),%d3
59d48: 4e5e unlk %fp <== NOT EXECUTED
00059908 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
59908: 4e56 fff0 linkw %fp,#-16 5990c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59910: 486e fffc pea %fp@(-4) 59914: 2f2e 0008 movel %fp@(8),%sp@- 59918: 4879 0007 f786 pea 7f786 <_Timer_Information> 5991e: 4eb9 0005 c274 jsr 5c274 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59924: 4fef 000c lea %sp@(12),%sp 59928: 2440 moveal %d0,%a2 5992a: 4aae fffc tstl %fp@(-4)
5992e: 670e beqs 5993e <rtems_timer_reset+0x36>
59930: 7404 moveq #4,%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59932: 2002 movel %d2,%d0 59934: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5993a: 4e5e unlk %fp 5993c: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
5993e: 202a 0038 movel %a2@(56),%d0
59942: 671a beqs 5995e <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 ) {
59944: 7201 moveq #1,%d1 59946: b280 cmpl %d0,%d1
59948: 673c beqs 59986 <rtems_timer_reset+0x7e>
5994a: 740b moveq #11,%d2
* 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();
5994c: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59952: 2002 movel %d2,%d0 59954: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5995a: 4e5e unlk %fp 5995c: 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 );
5995e: 45ea 0010 lea %a2@(16),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
59962: 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 );
59964: 2f0a movel %a2,%sp@- 59966: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
5996c: 2f0a movel %a2,%sp@- 5996e: 4879 0007 f610 pea 7f610 <_Watchdog_Ticks_chain> 59974: 4eb9 0005 dff8 jsr 5dff8 <_Watchdog_Insert> 5997a: 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();
5997e: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 59984: 60cc bras 59952 <rtems_timer_reset+0x4a>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59986: 486a 0010 pea %a2@(16)
(*timer_server->schedule_operation)( timer_server, the_timer );
5998a: 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;
5998c: 2679 0007 f7be moveal 7f7be <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59992: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
59998: 2f0a movel %a2,%sp@- 5999a: 2f0b movel %a3,%sp@- 5999c: 206b 0004 moveal %a3@(4),%a0 599a0: 4e90 jsr %a0@ 599a2: 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();
599a6: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch> 599ac: 60a4 bras 59952 <rtems_timer_reset+0x4a>
...
00059a98 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59a98: 4e56 ffec linkw %fp,#-20 59a9c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 59aa0: 242e 000c movel %fp@(12),%d2 59aa4: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
59aa8: 2479 0007 f7be moveal 7f7be <_Timer_server>,%a2
if ( !timer_server )
59aae: 4a8a tstl %a2 59ab0: 6700 00c8 beqw 59b7a <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59ab4: 4a39 0007 f54c tstb 7f54c <_TOD_Is_set> 59aba: 6700 00a6 beqw 59b62 <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED;
if ( !routine )
59abe: 4a83 tstl %d3 59ac0: 6700 00ac beqw 59b6e <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
59ac4: 2f02 movel %d2,%sp@- 59ac6: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 59acc: 588f addql #4,%sp 59ace: 4a00 tstb %d0
59ad0: 660c bnes 59ade <rtems_timer_server_fire_when+0x46>
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
59ad2: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59ad4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59ada: 4e5e unlk %fp 59adc: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59ade: 2f02 movel %d2,%sp@- 59ae0: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
59ae6: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59ae8: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
59aea: b0b9 0007 f5ca cmpl 7f5ca <_TOD_Now>,%d0
59af0: 63e0 blss 59ad2 <rtems_timer_server_fire_when+0x3a>
59af2: 486e fffc pea %fp@(-4) 59af6: 2f2e 0008 movel %fp@(8),%sp@- 59afa: 4879 0007 f786 pea 7f786 <_Timer_Information> 59b00: 4eb9 0005 c274 jsr 5c274 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59b06: 4fef 000c lea %sp@(12),%sp 59b0a: 2640 moveal %d0,%a3 59b0c: 4aae fffc tstl %fp@(-4)
59b10: 6674 bnes 59b86 <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
59b12: 486b 0010 pea %a3@(16) 59b16: 4eb9 0005 e140 jsr 5e140 <_Watchdog_Remove>
the_watchdog->routine = routine; the_watchdog->id = id;
59b1c: 202e 0008 movel %fp@(8),%d0 59b20: 2740 0030 movel %d0,%a3@(48)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59b24: 94b9 0007 f5ca subl 7f5ca <_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;
59b2a: 7003 moveq #3,%d0
the_watchdog->user_data = user_data;
59b2c: 276e 0014 0034 movel %fp@(20),%a3@(52) 59b32: 2740 0038 movel %d0,%a3@(56)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59b36: 2742 001c movel %d2,%a3@(28)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
59b3a: 2743 002c movel %d3,%a3@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59b3e: 42ab 0018 clrl %a3@(24)
(*timer_server->schedule_operation)( timer_server, the_timer );
59b42: 2f0b movel %a3,%sp@- 59b44: 2f0a movel %a2,%sp@- 59b46: 206a 0004 moveal %a2@(4),%a0 59b4a: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59b4c: 4eb9 0005 cbdc jsr 5cbdc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59b52: 4fef 000c lea %sp@(12),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
59b56: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b58: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b5e: 4e5e unlk %fp 59b60: 4e75 rts
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59b62: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b64: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59b6a: 4e5e unlk %fp <== NOT EXECUTED 59b6c: 4e75 rts <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
59b6e: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b70: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b76: 4e5e unlk %fp 59b78: 4e75 rts
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
59b7a: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b7c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b82: 4e5e unlk %fp 59b84: 4e75 rts
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59b86: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b88: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b8e: 4e5e unlk %fp
...