Annotated Report
00046708 <_API_Mutex_Unlock>: #include <rtems/score/apimutex.h> void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) {
46708: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4670c: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 46712: 5280 addql #1,%d0 46714: 206e 0008 moveal %fp@(8),%a0 46718: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch(); _CORE_mutex_Surrender(
4671e: 42a7 clrl %sp@- 46720: 2f28 0008 movel %a0@(8),%sp@- 46724: 4868 0010 pea %a0@(16) 46728: 4eb9 0004 69ac jsr 469ac <_CORE_mutex_Surrender>
&the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch();
4672e: 4fef 000c lea %sp@(12),%sp
}
46732: 4e5e unlk %fp
_CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch();
46734: 4ef9 0004 7d3c jmp 47d3c <_Thread_Enable_dispatch>
... 0004d144 <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level );
4d144: 203c 0000 0700 movel #1792,%d0
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) {
4d14a: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing; ISR_Level level; executing = _Thread_Executing;
4d14e: 2279 0005 da82 moveal 5da82 <_Thread_Executing>,%a1
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) {
4d154: 48d7 001c moveml %d2-%d4,%sp@ 4d158: 242e 000c movel %fp@(12),%d2 4d15c: 262e 0014 movel %fp@(20),%d3
Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4d160: 42a9 0034 clrl %a1@(52)
Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) {
4d164: 206e 0008 moveal %fp@(8),%a0 4d168: 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 );
4d16c: 40c1 movew %sr,%d1 4d16e: 8081 orl %d1,%d0 4d170: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4d172: 2028 0048 movel %a0@(72),%d0 4d176: 5280 addql #1,%d0 4d178: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4d17c: 4aa8 0040 tstl %a0@(64) 4d180: 6606 bnes 4d188 <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) {
4d182: b0a8 0044 cmpl %a0@(68),%d0 4d186: 672e beqs 4d1b6 <_CORE_barrier_Wait+0x72> 4d188: 7001 moveq #1,%d0
} } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id;
4d18a: 2342 0020 movel %d2,%a1@(32)
return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue;
4d18e: 2348 0044 movel %a0,%a1@(68) 4d192: 2140 0030 movel %d0,%a0@(48)
executing->Wait.id = id; _ISR_Enable( level );
4d196: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d198: 2d43 000c movel %d3,%fp@(12) 4d19c: 203c 0004 8570 movel #296304,%d0 4d1a2: 2d48 0008 movel %a0,%fp@(8) 4d1a6: 2d40 0010 movel %d0,%fp@(16)
}
4d1aa: 4cd7 001c moveml %sp@,%d2-%d4 4d1ae: 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 );
4d1b0: 4ef9 0004 8210 jmp 48210 <_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;
4d1b6: 7001 moveq #1,%d0 4d1b8: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4d1bc: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d1be: 2d44 0010 movel %d4,%fp@(16) 4d1c2: 2d42 000c movel %d2,%fp@(12) 4d1c6: 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 ); }
4d1ca: 4cd7 001c moveml %sp@,%d2-%d4 4d1ce: 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 );
4d1d0: 4ef9 0004 d108 jmp 4d108 <_CORE_barrier_Release>
... 00059f30 <_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 ) {
59f30: 4e56 ffe0 linkw %fp,#-32 59f34: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 59f38: 266e 0008 moveal %fp@(8),%a3 59f3c: 282e 000c movel %fp@(12),%d4 59f40: 242e 0010 movel %fp@(16),%d2 59f44: 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 ) {
59f48: b4ab 004c cmpl %a3@(76),%d2 59f4c: 6262 bhis 59fb0 <_CORE_message_queue_Broadcast+0x80>
* 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 ) {
59f4e: 4aab 0048 tstl %a3@(72) 59f52: 664c bnes 59fa0 <_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))) {
59f54: 2f0b movel %a3,%sp@- 59f56: 49f9 0005 c508 lea 5c508 <_Thread_queue_Dequeue>,%a4 59f5c: 4283 clrl %d3
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
59f5e: 4bf9 0006 2170 lea 62170 <memcpy>,%a5 59f64: 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 =
59f66: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
59f68: 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 =
59f6a: 4a80 tstl %d0 59f6c: 6722 beqs 59f90 <_CORE_message_queue_Broadcast+0x60> 59f6e: 2f02 movel %d2,%sp@-
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1;
59f70: 5283 addql #1,%d3 59f72: 2f04 movel %d4,%sp@- 59f74: 2f2a 002c movel %a2@(44),%sp@- 59f78: 4e95 jsr %a5@
buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size;
59f7a: 206a 0028 moveal %a2@(40),%a0 59f7e: 4fef 000c lea %sp@(12),%sp 59f82: 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))) {
59f84: 2f0b movel %a3,%sp@- 59f86: 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 =
59f88: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
59f8a: 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 =
59f8c: 4a80 tstl %d0 59f8e: 66de bnes 59f6e <_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;
59f90: 2045 moveal %d5,%a0 59f92: 4280 clrl %d0 59f94: 2083 movel %d3,%a0@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
59f96: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 59f9c: 4e5e unlk %fp 59f9e: 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;
59fa0: 2045 moveal %d5,%a0 59fa2: 4280 clrl %d0
#endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
59fa4: 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;
59faa: 4290 clrl %a0@
#endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
59fac: 4e5e unlk %fp 59fae: 4e75 rts
{ Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) {
59fb0: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
59fb2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 59fb8: 4e5e unlk %fp <== NOT EXECUTED
000533dc <_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 ) {
533dc: 4e56 0000 linkw %fp,#0 533e0: 2f0a movel %a2,%sp@-
/* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush(
533e2: 2f2e 0010 movel %fp@(16),%sp@- 533e6: 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 ) {
533ea: 246e 0008 moveal %fp@(8),%a2
/* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush(
533ee: 2f0a movel %a2,%sp@- 533f0: 4eb9 0004 da3c jsr 4da3c <_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 )
533f6: 4fef 000c lea %sp@(12),%sp 533fa: 4aaa 0048 tstl %a2@(72) 533fe: 6612 bnes 53412 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers );
53400: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
53406: 246e fffc moveal %fp@(-4),%a2 5340a: 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 );
5340c: 4ef9 0004 e734 jmp 4e734 <_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 );
53412: 2f0a movel %a2,%sp@- 53414: 4eb9 0005 3430 jsr 53430 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
5341a: 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 );
53420: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers ); }
53422: 246e fffc moveal %fp@(-4),%a2 53426: 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 );
53428: 4ef9 0004 e734 jmp 4e734 <_Workspace_Free>
... 0004fd88 <_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)) {
4fd88: 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 ) {
4fd8a: 4e56 fff4 linkw %fp,#-12 4fd8e: 202e 0014 movel %fp@(20),%d0 4fd92: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fd96: 246e 0008 moveal %fp@(8),%a2 4fd9a: 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)) {
4fd9e: c280 andl %d0,%d1
) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages;
4fda0: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
4fda4: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
4fda8: 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)) {
4fdac: 4a81 tstl %d1 4fdae: 6620 bnes 4fdd0 <_CORE_message_queue_Initialize+0x48> 4fdb0: 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));
4fdb2: 2601 movel %d1,%d3 4fdb4: 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 *
4fdba: 2003 movel %d3,%d0 4fdbc: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size)
4fdc0: b280 cmpl %d0,%d1 4fdc2: 631c blss 4fde0 <_CORE_message_queue_Initialize+0x58>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
4fdc4: 4200 clrb %d0
}
4fdc6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fdcc: 4e5e unlk %fp 4fdce: 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);
4fdd0: 2200 movel %d0,%d1 4fdd2: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
4fdd4: 76fc moveq #-4,%d3 4fdd6: c283 andl %d3,%d1
} if (allocated_message_size < maximum_message_size)
4fdd8: b280 cmpl %d0,%d1 4fdda: 64d6 bccs 4fdb2 <_CORE_message_queue_Initialize+0x2a>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
4fddc: 4200 clrb %d0 <== NOT EXECUTED 4fdde: 60e6 bras 4fdc6 <_CORE_message_queue_Initialize+0x3e><== NOT EXECUTED
return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4fde0: 2f00 movel %d0,%sp@- 4fde2: 4eb9 0005 2a60 jsr 52a60 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0)
4fde8: 588f addql #4,%sp
return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4fdea: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0)
4fdee: 67d4 beqs 4fdc4 <_CORE_message_queue_Initialize+0x3c>
/* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize (
4fdf0: 2f03 movel %d3,%sp@- 4fdf2: 2f02 movel %d2,%sp@- 4fdf4: 2f00 movel %d0,%sp@- 4fdf6: 486a 0060 pea %a2@(96) 4fdfa: 4eb9 0005 47cc jsr 547cc <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize(
4fe00: 4878 0006 pea 6 <EXTENDSFDF> 4fe04: 7001 moveq #1,%d0 4fe06: 206e 000c moveal %fp@(12),%a0 4fe0a: b090 cmpl %a0@,%d0 4fe0c: 57c0 seq %d0 4fe0e: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 4fe12: 49c0 extbl %d0 4fe14: 4480 negl %d0
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
4fe16: 41ea 0054 lea %a2@(84),%a0 4fe1a: 2f00 movel %d0,%sp@- 4fe1c: 2548 0050 movel %a0,%a2@(80)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4fe20: 41ea 0050 lea %a2@(80),%a0 4fe24: 2548 0058 movel %a0,%a2@(88) 4fe28: 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;
4fe2a: 42aa 0054 clrl %a2@(84) 4fe2e: 4eb9 0005 1e38 jsr 51e38 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true;
4fe34: 4fef 0020 lea %sp@(32),%sp
}
4fe38: 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(
4fe3e: 7001 moveq #1,%d0
STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; }
4fe40: 4e5e unlk %fp <== NOT EXECUTED
0004fe44 <_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 );
4fe44: 203c 0000 0700 movel #1792,%d0
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
4fe4a: 4e56 ffe4 linkw %fp,#-28
ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing;
4fe4e: 2079 0006 80b6 moveal 680b6 <_Thread_Executing>,%a0
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
4fe54: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4fe58: 2a2e 000c movel %fp@(12),%d5 4fe5c: 282e 001c movel %fp@(28),%d4 4fe60: 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;
4fe64: 42a8 0034 clrl %a0@(52)
void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) {
4fe68: 242e 0010 movel %fp@(16),%d2 4fe6c: 226e 0014 moveal %fp@(20),%a1 4fe70: 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 );
4fe74: 40c1 movew %sr,%d1 4fe76: 8081 orl %d1,%d0 4fe78: 46c0 movew %d0,%sr
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4fe7a: 200a movel %a2,%d0 4fe7c: 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));
4fe82: 266a 0050 moveal %a2@(80),%a3
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4fe86: b08b cmpl %a3,%d0 4fe88: 674e beqs 4fed8 <_CORE_message_queue_Seize+0x94>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
4fe8a: 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;
4fe8c: 53aa 0048 subql #1,%a2@(72)
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
4fe90: 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;
4fe94: 2548 0050 movel %a0,%a2@(80)
new_first->previous = _Chain_Head(the_chain);
4fe98: 214c 0004 movel %a4,%a0@(4)
_ISR_Enable( level );
4fe9c: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
4fe9e: 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 );
4fea2: 45ea 0060 lea %a2@(96),%a2
_Thread_Executing->Wait.count =
4fea6: 2079 0006 80b6 moveal 680b6 <_Thread_Executing>,%a0 4feac: 42a8 0024 clrl %a0@(36)
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
4feb0: 2f11 movel %a1@,%sp@- 4feb2: 486b 000c pea %a3@(12) 4feb6: 2f02 movel %d2,%sp@- 4feb8: 4eb9 0005 746c jsr 5746c <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 );
4febe: 4fef 000c lea %sp@(12),%sp 4fec2: 2d4a 0008 movel %a2,%fp@(8) 4fec6: 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 ); }
4feca: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4fed0: 4e5e unlk %fp 4fed2: 4ef9 0004 fcbc jmp 4fcbc <_Chain_Append>
return; } #endif } if ( !wait ) {
4fed8: 4a03 tstb %d3 4feda: 6612 bnes 4feee <_CORE_message_queue_Seize+0xaa>
_ISR_Enable( level );
4fedc: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
4fede: 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 ); }
4fee0: 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;
4fee6: 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 ); }
4feea: 4e5e unlk %fp 4feec: 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;
4feee: 7001 moveq #1,%d0 4fef0: 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;
4fef4: 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;
4fef8: 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;
4fefc: 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;
4ff00: 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 );
4ff04: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
4ff06: 49f9 0005 1f1c lea 51f1c <_Thread_queue_Timeout>,%a4 4ff0c: 2d44 000c movel %d4,%fp@(12) 4ff10: 2d4c 0010 movel %a4,%fp@(16) 4ff14: 2d4a 0008 movel %a2,%fp@(8)
}
4ff18: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4ff1e: 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 );
4ff20: 4ef9 0005 1bbc jmp 51bbc <_Thread_queue_Enqueue_with_handler>
... 0004ff28 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) {
4ff28: 4e56 fff4 linkw %fp,#-12 4ff2c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4ff30: 246e 0008 moveal %fp@(8),%a2 4ff34: 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 ) {
4ff38: b4aa 004c cmpl %a2@(76),%d2 4ff3c: 6256 bhis 4ff94 <_CORE_message_queue_Submit+0x6c>
} /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) {
4ff3e: 202a 0048 movel %a2@(72),%d0 4ff42: 675c beqs 4ffa0 <_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 ) {
4ff44: b0aa 0044 cmpl %a2@(68),%d0 4ff48: 650c bcss 4ff56 <_CORE_message_queue_Submit+0x2e> 4ff4a: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
4ff4c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ff52: 4e5e unlk %fp 4ff54: 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 *)
4ff56: 486a 0060 pea %a2@(96) 4ff5a: 4eb9 0004 fd1c jsr 4fd1c <_Chain_Get> 4ff60: 2640 moveal %d0,%a3
const void *source, void *destination, size_t size ) { memcpy(destination, source, size);
4ff62: 2f02 movel %d2,%sp@- 4ff64: 2f2e 000c movel %fp@(12),%sp@- 4ff68: 486b 000c pea %a3@(12) 4ff6c: 4eb9 0005 746c jsr 5746c <memcpy>
_CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size;
4ff72: 2742 0008 movel %d2,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message(
4ff76: 2f2e 001c movel %fp@(28),%sp@- 4ff7a: 2f0b movel %a3,%sp@- 4ff7c: 2f0a movel %a2,%sp@- 4ff7e: 4eb9 0005 4814 jsr 54814 <_CORE_message_queue_Insert_message>
the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
4ff84: 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(
4ff88: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
4ff8a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ff90: 4e5e unlk %fp 4ff92: 4e75 rts
) { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) {
4ff94: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
4ff96: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ff9c: 4e5e unlk %fp 4ff9e: 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 );
4ffa0: 2f0a movel %a2,%sp@- 4ffa2: 4eb9 0005 1a5c jsr 51a5c <_Thread_queue_Dequeue>
if ( the_thread ) {
4ffa8: 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 );
4ffaa: 2640 moveal %d0,%a3
if ( the_thread ) {
4ffac: 4a80 tstl %d0 4ffae: 672e beqs 4ffde <_CORE_message_queue_Submit+0xb6> 4ffb0: 2f02 movel %d2,%sp@- 4ffb2: 2f2e 000c movel %fp@(12),%sp@- 4ffb6: 2f2b 002c movel %a3@(44),%sp@- 4ffba: 4eb9 0005 746c jsr 5746c <memcpy>
_CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size;
4ffc0: 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;
4ffc4: 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;
4ffc8: 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;
4ffca: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
4ffcc: 222e 001c movel %fp@(28),%d1 4ffd0: 2741 0024 movel %d1,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif }
4ffd4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4ffda: 4e5e unlk %fp 4ffdc: 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 ) {
4ffde: 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 ) {
4ffe2: b0aa 0044 cmpl %a2@(68),%d0 4ffe6: 6400 ff62 bccw 4ff4a <_CORE_message_queue_Submit+0x22> 4ffea: 6000 ff6a braw 4ff56 <_CORE_message_queue_Submit+0x2e>
... 0004b100 <_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 ) {
4b100: 4e56 0000 linkw %fp,#0
{ Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing;
4b104: 2279 0005 da82 moveal 5da82 <_Thread_Executing>,%a1 4b10a: 2f0a movel %a2,%sp@- 4b10c: 206e 0008 moveal %fp@(8),%a0 4b110: 246e 000c moveal %fp@(12),%a2 4b114: 2f02 movel %d2,%sp@-
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
4b116: 42a9 0034 clrl %a1@(52)
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
4b11a: 4aa8 004e tstl %a0@(78) 4b11e: 673a beqs 4b15a <_CORE_mutex_Seize_interrupt_trylock+0x5a>
the_mutex->lock = CORE_MUTEX_LOCKED;
4b120: 42a8 004e clrl %a0@(78)
the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1;
4b124: 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;
4b126: 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;
4b12c: 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;
4b130: 2141 0052 movel %d1,%a0@(82)
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4b134: 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;
4b138: 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 ) ||
4b13c: b280 cmpl %d0,%d1 4b13e: 672e beqs 4b16e <_CORE_mutex_Seize_interrupt_trylock+0x6e> 4b140: 123c 0003 moveb #3,%d1 4b144: b280 cmpl %d0,%d1 4b146: 674e beqs 4b196 <_CORE_mutex_Seize_interrupt_trylock+0x96>
executing->resource_count++; } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p );
4b148: 2012 movel %a2@,%d0 4b14a: 46c0 movew %d0,%sr 4b14c: 4280 clrl %d0
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); }
4b14e: 242e fff8 movel %fp@(-8),%d2 4b152: 246e fffc moveal %fp@(-4),%a2 4b156: 4e5e unlk %fp 4b158: 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 ) ) {
4b15a: b3e8 005a cmpal %a0@(90),%a1 4b15e: 671a beqs 4b17a <_CORE_mutex_Seize_interrupt_trylock+0x7a> 4b160: 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 );
4b164: 7001 moveq #1,%d0 4b166: 246e fffc moveal %fp@(-4),%a2 4b16a: 4e5e unlk %fp 4b16c: 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++;
4b16e: 52a9 001c addql #1,%a1@(28)
} if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( *level_p );
4b172: 2012 movel %a2@,%d0 4b174: 46c0 movew %d0,%sr 4b176: 4280 clrl %d0 4b178: 60d4 bras 4b14e <_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 ) {
4b17a: 2028 0040 movel %a0@(64),%d0 4b17e: 6658 bnes 4b1d8 <_CORE_mutex_Seize_interrupt_trylock+0xd8>
case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++;
4b180: 52a8 0052 addql #1,%a0@(82)
_ISR_Enable( *level_p );
4b184: 2012 movel %a2@,%d0 4b186: 46c0 movew %d0,%sr 4b188: 242e fff8 movel %fp@(-8),%d2 4b18c: 4280 clrl %d0 4b18e: 246e fffc moveal %fp@(-4),%a2 4b192: 4e5e unlk %fp 4b194: 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++;
4b196: 2429 001c movel %a1@(28),%d2 4b19a: 2002 movel %d2,%d0 4b19c: 5280 addql #1,%d0 4b19e: 2340 001c movel %d0,%a1@(28)
{ Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority;
4b1a2: 2029 0014 movel %a1@(20),%d0
*/ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling;
4b1a6: 2228 004a movel %a0@(74),%d1
current = executing->current_priority; if ( current == ceiling ) {
4b1aa: b081 cmpl %d1,%d0 4b1ac: 6700 0082 beqw 4b230 <_CORE_mutex_Seize_interrupt_trylock+0x130>
_ISR_Enable( *level_p ); return 0; } if ( current > ceiling ) {
4b1b0: 6244 bhis 4b1f6 <_CORE_mutex_Seize_interrupt_trylock+0xf6>
); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4b1b2: 7206 moveq #6,%d1
the_mutex->lock = CORE_MUTEX_UNLOCKED;
4b1b4: 7001 moveq #1,%d0
); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
4b1b6: 2341 0034 movel %d1,%a1@(52)
the_mutex->lock = CORE_MUTEX_UNLOCKED; the_mutex->nest_count = 0; /* undo locking above */
4b1ba: 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;
4b1be: 2140 004e movel %d0,%a0@(78)
the_mutex->nest_count = 0; /* undo locking above */ executing->resource_count--; /* undo locking above */
4b1c2: 2342 001c movel %d2,%a1@(28)
_ISR_Enable( *level_p );
4b1c6: 2012 movel %a2@,%d0 4b1c8: 46c0 movew %d0,%sr 4b1ca: 242e fff8 movel %fp@(-8),%d2 4b1ce: 4280 clrl %d0 4b1d0: 246e fffc moveal %fp@(-4),%a2 4b1d4: 4e5e unlk %fp 4b1d6: 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 ) {
4b1d8: 7201 moveq #1,%d1 4b1da: b280 cmpl %d0,%d1 4b1dc: 6682 bnes 4b160 <_CORE_mutex_Seize_interrupt_trylock+0x60>
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;
4b1de: 7002 moveq #2,%d0 <== NOT EXECUTED 4b1e0: 2340 0034 movel %d0,%a1@(52) <== NOT EXECUTED
_ISR_Enable( *level_p );
4b1e4: 2012 movel %a2@,%d0 <== NOT EXECUTED 4b1e6: 46c0 movew %d0,%sr <== NOT EXECUTED 4b1e8: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4b1ec: 4280 clrl %d0 <== NOT EXECUTED 4b1ee: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b1f2: 4e5e unlk %fp <== NOT EXECUTED 4b1f4: 4e75 rts <== NOT EXECUTED
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4b1f6: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 4b1fc: 5280 addql #1,%d0 4b1fe: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
return 0; } if ( current > ceiling ) { _Thread_Disable_dispatch(); _ISR_Enable( *level_p );
4b204: 2012 movel %a2@,%d0 4b206: 46c0 movew %d0,%sr
_Thread_Change_priority(
4b208: 42a7 clrl %sp@- 4b20a: 2f28 004a movel %a0@(74),%sp@- 4b20e: 2f28 005a movel %a0@(90),%sp@- 4b212: 4eb9 0004 781c jsr 4781c <_Thread_Change_priority>
the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch();
4b218: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 4b21e: 242e fff8 movel %fp@(-8),%d2 4b222: 4fef 000c lea %sp@(12),%sp 4b226: 4280 clrl %d0 4b228: 246e fffc moveal %fp@(-4),%a2 4b22c: 4e5e unlk %fp 4b22e: 4e75 rts
Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( *level_p );
4b230: 2012 movel %a2@,%d0 4b232: 46c0 movew %d0,%sr 4b234: 242e fff8 movel %fp@(-8),%d2 4b238: 4280 clrl %d0 4b23a: 246e fffc moveal %fp@(-4),%a2 4b23e: 4e5e unlk %fp
... 00046b10 <_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 ) {
46b10: 4e56 0000 linkw %fp,#0 46b14: 2f0a movel %a2,%sp@- 46b16: 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)) ) {
46b1a: 2f0a movel %a2,%sp@- 46b1c: 4eb9 0004 80b0 jsr 480b0 <_Thread_queue_Dequeue> 46b22: 588f addql #4,%sp 46b24: 4a80 tstl %d0 46b26: 670a beqs 46b32 <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; }
46b28: 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)) ) {
46b2c: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; }
46b2e: 4e5e unlk %fp 46b30: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level );
46b32: 203c 0000 0700 movel #1792,%d0 46b38: 40c1 movew %sr,%d1 46b3a: 8081 orl %d1,%d0 46b3c: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
46b3e: 202a 0048 movel %a2@(72),%d0 46b42: b0aa 0040 cmpl %a2@(64),%d0 46b46: 6412 bccs 46b5a <_CORE_semaphore_Surrender+0x4a>
the_semaphore->count += 1;
46b48: 5280 addql #1,%d0 46b4a: 2540 0048 movel %d0,%a2@(72) 46b4e: 4280 clrl %d0
else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level );
46b50: 46c1 movew %d1,%sr
} return status; }
46b52: 246e fffc moveal %fp@(-4),%a2 46b56: 4e5e unlk %fp 46b58: 4e75 rts
(*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
46b5a: 7004 moveq #4,%d0 <== NOT EXECUTED
the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level );
46b5c: 46c1 movew %d1,%sr <== NOT EXECUTED 46b5e: 60f2 bras 46b52 <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED
0004599c <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) {
4599c: 4e56 fffc linkw %fp,#-4 459a0: 2f03 movel %d3,%sp@- 459a2: 2f02 movel %d2,%sp@-
Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location );
459a4: 486e fffc pea %fp@(-4) 459a8: 2f2e 0008 movel %fp@(8),%sp@- 459ac: 4eb9 0004 7d64 jsr 47d64 <_Thread_Get>
switch ( location ) {
459b2: 508f addql #8,%sp 459b4: 4aae fffc tstl %fp@(-4) 459b8: 6642 bnes 459fc <_Event_Timeout+0x60>
* * 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 );
459ba: 223c 0000 0700 movel #1792,%d1 459c0: 40c2 movew %sr,%d2 459c2: 8282 orl %d2,%d1 459c4: 46c1 movew %d1,%sr
_ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0;
459c6: 2040 moveal %d0,%a0 459c8: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
459cc: b0b9 0005 da82 cmpl 5da82 <_Thread_Executing>,%d0 459d2: 6734 beqs 45a08 <_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;
459d4: 7606 moveq #6,%d3 459d6: 2040 moveal %d0,%a0 459d8: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
459dc: 46c2 movew %d2,%sr 459de: 2f3c 1003 fff8 movel #268697592,%sp@- 459e4: 2f00 movel %d0,%sp@- 459e6: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
459ec: 508f addql #8,%sp 459ee: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 459f4: 5380 subql #1,%d0 459f6: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } }
459fc: 242e fff4 movel %fp@(-12),%d2 45a00: 262e fff8 movel %fp@(-8),%d3 45a04: 4e5e unlk %fp 45a06: 4e75 rts
} #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
45a08: 2239 0005 dba6 movel 5dba6 <_Event_Sync_state>,%d1 45a0e: 7601 moveq #1,%d3 45a10: b681 cmpl %d1,%d3 45a12: 66c0 bnes 459d4 <_Event_Timeout+0x38>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT;
45a14: 7606 moveq #6,%d3 45a16: 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;
45a18: 7202 moveq #2,%d1
} the_thread->Wait.return_code = RTEMS_TIMEOUT;
45a1a: 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;
45a1e: 23c1 0005 dba6 movel %d1,5dba6 <_Event_Sync_state>
} the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level );
45a24: 46c2 movew %d2,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
45a26: 2f3c 1003 fff8 movel #268697592,%sp@- 45a2c: 2f00 movel %d0,%sp@- 45a2e: 4eb9 0004 7968 jsr 47968 <_Thread_Clear_state>
*/ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
45a34: 508f addql #8,%sp 45a36: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 45a3c: 5380 subql #1,%d0 45a3e: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 45a44: 60b6 bras 459fc <_Event_Timeout+0x60>
... 0004b37c <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
4b37c: 4e56 ffcc linkw %fp,#-52 4b380: 226e 000c moveal %fp@(12),%a1 4b384: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b388: 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;
4b38c: 2c09 movel %a1,%d6 4b38e: 5886 addql #4,%d6
uintptr_t const page_size = heap->page_size;
4b390: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) {
4b394: 222e 0010 movel %fp@(16),%d1 4b398: 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;
4b39c: 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;
4b3a0: 2d40 fffc movel %d0,%fp@(-4)
uintptr_t alloc_begin = 0; uint32_t search_count = 0; if ( block_size_floor < alloc_size ) {
4b3a4: bc89 cmpl %a1,%d6 4b3a6: 6500 0146 bcsw 4b4ee <_Heap_Allocate_aligned_with_boundary+0x172>
/* Integer overflow occured */ return NULL; } if ( boundary != 0 ) {
4b3aa: 4a84 tstl %d4 4b3ac: 6600 013c bnew 4b4ea <_Heap_Allocate_aligned_with_boundary+0x16e>
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
4b3b0: b1ca cmpal %a2,%a0 4b3b2: 6700 0152 beqw 4b506 <_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;
4b3b6: 242e fffc movel %fp@(-4),%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4b3ba: 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;
4b3bc: 5e82 addql #7,%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4b3be: 9a89 subl %a1,%d5
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
4b3c0: 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;
4b3c2: 2d42 fff8 movel %d2,%fp@(-8)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4b3c6: 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 ) {
4b3ca: 2028 0004 movel %a0@(4),%d0
while ( block != free_list_tail ) { _HAssert( _Heap_Is_prev_used( block ) ); /* Statistics */ ++search_count;
4b3ce: 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 ) {
4b3d0: b086 cmpl %d6,%d0 4b3d2: 630e blss 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4b3d4: 4a81 tstl %d1 4b3d6: 6628 bnes 4b400 <_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;
4b3d8: 2408 movel %a0,%d2 4b3da: 5082 addql #8,%d2
boundary ); } } if ( alloc_begin != 0 ) {
4b3dc: 4a82 tstl %d2 4b3de: 6600 00ee bnew 4b4ce <_Heap_Allocate_aligned_with_boundary+0x152>
break; } block = block->next;
4b3e2: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) { alignment = page_size; } } while ( block != free_list_tail ) {
4b3e6: b1ca cmpal %a2,%a0 4b3e8: 66e0 bnes 4b3ca <_Heap_Allocate_aligned_with_boundary+0x4e> 4b3ea: 4280 clrl %d0
uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { Heap_Statistics *const stats = &heap->stats;
4b3ec: b6aa 0044 cmpl %a2@(68),%d3 4b3f0: 6304 blss 4b3f6 <_Heap_Allocate_aligned_with_boundary+0x7a>
); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
4b3f2: 2543 0044 movel %d3,%a2@(68)
} return (void *) alloc_begin; }
4b3f6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b3fc: 4e5e unlk %fp 4b3fe: 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;
4b400: 7efe moveq #-2,%d7 4b402: 4be8 0008 lea %a0@(8),%a5 4b406: 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;
4b408: 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;
4b40c: 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;
4b40e: 2a2e fff8 movel %fp@(-8),%d5 4b412: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET; uintptr_t alloc_begin = alloc_end - alloc_size;
4b414: 242e fff4 movel %fp@(-12),%d2 4b418: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
4b41a: 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;
4b41c: d085 addl %d5,%d0 4b41e: 4c41 7005 remul %d1,%d5,%d7 4b422: 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 ) {
4b424: b480 cmpl %d0,%d2 4b426: 630a blss 4b432 <_Heap_Allocate_aligned_with_boundary+0xb6> 4b428: 2a00 movel %d0,%d5 4b42a: 4c41 5002 remul %d1,%d2,%d5 4b42e: 9082 subl %d2,%d0 4b430: 2400 movel %d0,%d2
} alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) {
4b432: 4a84 tstl %d4 4b434: 676c beqs 4b4a2 <_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;
4b436: 2002 movel %d2,%d0 4b438: d089 addl %a1,%d0 4b43a: 2e00 movel %d0,%d7 4b43c: 4c44 7005 remul %d4,%d5,%d7 4b440: 2e00 movel %d0,%d7 4b442: 9e85 subl %d5,%d7 4b444: 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 ) {
4b446: be82 cmpl %d2,%d7 4b448: 6358 blss 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126> 4b44a: be80 cmpl %d0,%d7 4b44c: 6454 bccs 4b4a2 <_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;
4b44e: 2e0d movel %a5,%d7 4b450: 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 ) {
4b452: ba87 cmpl %d7,%d5 4b454: 658c bcss 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0; } alloc_begin = boundary_line - alloc_size;
4b456: 9a89 subl %a1,%d5 4b458: 2005 movel %d5,%d0 4b45a: 2647 moveal %d7,%a3 4b45c: 4c41 0002 remul %d1,%d2,%d0 4b460: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size;
4b462: 2005 movel %d5,%d0 4b464: d089 addl %a1,%d0 4b466: 2405 movel %d5,%d2 4b468: 2e00 movel %d0,%d7 4b46a: 4c44 7005 remul %d4,%d5,%d7 4b46e: 2e00 movel %d0,%d7 4b470: 9e85 subl %d5,%d7 4b472: 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 ) {
4b474: be82 cmpl %d2,%d7 4b476: 632a blss 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126> 4b478: be80 cmpl %d0,%d7 4b47a: 6426 bccs 4b4a2 <_Heap_Allocate_aligned_with_boundary+0x126>
if ( boundary_line < boundary_floor ) {
4b47c: ba8b cmpl %a3,%d5 4b47e: 6500 ff62 bcsw 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
return 0; } alloc_begin = boundary_line - alloc_size;
4b482: 9a89 subl %a1,%d5 4b484: 2005 movel %d5,%d0 4b486: 4c41 0002 remul %d1,%d2,%d0 4b48a: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size;
4b48c: 2005 movel %d5,%d0 4b48e: d089 addl %a1,%d0 4b490: 2405 movel %d5,%d2 4b492: 2e00 movel %d0,%d7 4b494: 4c44 7005 remul %d4,%d5,%d7 4b498: 2e00 movel %d0,%d7 4b49a: 9e85 subl %d5,%d7 4b49c: 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 ) {
4b49e: be82 cmpl %d2,%d7 4b4a0: 62d6 bhis 4b478 <_Heap_Allocate_aligned_with_boundary+0xfc>
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 ) {
4b4a2: b48d cmpl %a5,%d2 4b4a4: 6500 ff3c bcsw 4b3e2 <_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;
4b4a8: 70f8 moveq #-8,%d0 4b4aa: 9088 subl %a0,%d0 4b4ac: 2a40 moveal %d0,%a5 4b4ae: 2e02 movel %d2,%d7 4b4b0: dbc2 addal %d2,%a5 4b4b2: 202e fffc movel %fp@(-4),%d0 4b4b6: 4c40 7005 remul %d0,%d5,%d7 4b4ba: 9bc5 subal %d5,%a5
if ( free_size >= min_block_size || free_size == 0 ) {
4b4bc: bbcc cmpal %a4,%a5 4b4be: 6400 ff1c bccw 4b3dc <_Heap_Allocate_aligned_with_boundary+0x60> 4b4c2: 4a8d tstl %a5 4b4c4: 6600 ff1c bnew 4b3e2 <_Heap_Allocate_aligned_with_boundary+0x66>
boundary ); } } if ( alloc_begin != 0 ) {
4b4c8: 4a82 tstl %d2 4b4ca: 6700 ff16 beqw 4b3e2 <_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 );
4b4ce: 2f09 movel %a1,%sp@-
block = block->next; } if ( alloc_begin != 0 ) { /* Statistics */ stats->searches += search_count;
4b4d0: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4b4d4: 2f02 movel %d2,%sp@- 4b4d6: 2f08 movel %a0,%sp@- 4b4d8: 2f0a movel %a2,%sp@- 4b4da: 4eb9 0004 6e38 jsr 46e38 <_Heap_Block_allocate> 4b4e0: 4fef 0010 lea %sp@(16),%sp 4b4e4: 2002 movel %d2,%d0 4b4e6: 6000 ff04 braw 4b3ec <_Heap_Allocate_aligned_with_boundary+0x70>
/* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) {
4b4ea: b889 cmpl %a1,%d4 4b4ec: 640c bccs 4b4fa <_Heap_Allocate_aligned_with_boundary+0x17e>
); } /* Statistics */ if ( stats->max_search < search_count ) { stats->max_search = search_count;
4b4ee: 4280 clrl %d0
} return (void *) alloc_begin; }
4b4f0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4b4f6: 4e5e unlk %fp 4b4f8: 4e75 rts
if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) {
4b4fa: 4a81 tstl %d1 4b4fc: 6600 feb2 bnew 4b3b0 <_Heap_Allocate_aligned_with_boundary+0x34> 4b500: 2200 movel %d0,%d1 4b502: 6000 feac braw 4b3b0 <_Heap_Allocate_aligned_with_boundary+0x34>
alignment = page_size; } } while ( block != free_list_tail ) {
4b506: 4283 clrl %d3 4b508: 4280 clrl %d0 4b50a: 6000 fee0 braw 4b3ec <_Heap_Allocate_aligned_with_boundary+0x70>
... 00046e38 <_Heap_Block_allocate>: Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46e38: 70fe moveq #-2,%d0
Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) {
46e3a: 4e56 ffe0 linkw %fp,#-32 46e3e: 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;
46e42: 2041 moveal %d1,%a0 46e44: 5188 subql #8,%a0 46e46: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 46e4a: 246e 000c moveal %fp@(12),%a2
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46e4e: 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;
46e50: 2848 moveal %a0,%a4 46e52: 240a movel %a2,%d2 46e54: 99ca subal %a2,%a4
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46e56: c0aa 0004 andl %a2@(4),%d0
Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) {
46e5a: 266e 0008 moveal %fp@(8),%a3
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46e5e: c6b2 0804 andl %a2@(00000004,%d0:l),%d3
Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) {
46e62: 2a2e 0014 movel %fp@(20),%d5
Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) {
46e66: 4a03 tstb %d3 46e68: 6600 00aa bnew 46f14 <_Heap_Block_allocate+0xdc>
free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks;
46e6c: 53ab 0038 subql #1,%a3@(56)
++stats->used_blocks; stats->free_size -= _Heap_Block_size( block );
46e70: 76fe moveq #-2,%d3
_Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks;
46e72: 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;
46e76: 202a 0008 movel %a2@(8),%d0
Heap_Block *prev = block->prev; prev->next = next; next->prev = prev;
46e7a: 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;
46e7c: 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 );
46e80: 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;
46e84: 2340 0008 movel %d0,%a1@(8)
} else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) {
46e88: 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 );
46e8c: 97ab 0030 subl %d3,%a3@(48)
next->prev = prev;
46e90: 2b49 000c movel %a1,%a5@(12)
} else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) {
46e94: b08c cmpl %a4,%d0 46e96: 6200 0088 bhiw 46f20 <_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;
46e9a: 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 )
46e9e: 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 ) ) {
46ea2: 7201 moveq #1,%d1 46ea4: 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;
46ea6: 2008 movel %a0,%d0 46ea8: 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;
46eaa: d1ab 0030 addl %d0,%a3@(48)
if ( _Heap_Is_prev_used( block ) ) {
46eae: c2aa 0004 andl %a2@(4),%d1 46eb2: 6700 0082 beqw 46f36 <_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;
46eb6: 78fe moveq #-2,%d4
_Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks;
46eb8: 52ab 0038 addql #1,%a3@(56) 46ebc: 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;
46ebe: 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;
46ec2: 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;
46ec4: 7801 moveq #1,%d4 46ec6: 8880 orl %d0,%d4
new_block->next = next;
46ec8: 254c 0008 movel %a4,%a2@(8)
new_block->prev_size = block_size; new_block->size_and_flag = new_block_size;
46ecc: d483 addl %d3,%d2 46ece: 9488 subl %a0,%d2
new_block->prev = block_before;
46ed0: 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;
46ed4: 2544 0004 movel %d4,%a2@(4)
block_before->next = new_block;
46ed8: 234a 0008 movel %a2,%a1@(8)
next->prev = new_block;
46edc: 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 );
46ee0: 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;
46ee2: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
46ee4: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
46ee8: 2f05 movel %d5,%sp@- 46eea: 2f01 movel %d1,%sp@- 46eec: 2f08 movel %a0,%sp@- 46eee: 2f0b movel %a3,%sp@- 46ef0: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46ef6: 4fef 0010 lea %sp@(16),%sp
alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) {
46efa: 202b 0030 movel %a3@(48),%d0
Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { Heap_Statistics *const stats = &heap->stats;
46efe: b0ab 0034 cmpl %a3@(52),%d0 46f02: 6404 bccs 46f08 <_Heap_Block_allocate+0xd0>
); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { stats->min_free_size = stats->free_size;
46f04: 2740 0034 movel %d0,%a3@(52)
} return block; }
46f08: 200a movel %a2,%d0 46f0a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 46f10: 4e5e unlk %fp 46f12: 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 ) {
46f14: 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 );
46f18: 224b moveal %a3,%a1
} if ( alloc_area_offset < heap->page_size ) {
46f1a: b08c cmpl %a4,%d0 46f1c: 6300 ff7c blsw 46e9a <_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 );
46f20: 4874 5800 pea %a4@(00000000,%d5:l) 46f24: 2f09 movel %a1,%sp@- 46f26: 2f0a movel %a2,%sp@- 46f28: 2f0b movel %a3,%sp@- 46f2a: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f30: 4fef 0010 lea %sp@(16),%sp 46f34: 60c4 bras 46efa <_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);
46f36: 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;
46f38: 78fe moveq #-2,%d4 46f3a: 2209 movel %a1,%d1 46f3c: c8aa 0004 andl %a2@(4),%d4 46f40: 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;
46f42: 78fe moveq #-2,%d4 46f44: 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;
46f46: 7801 moveq #1,%d4 46f48: 8880 orl %d0,%d4
new_block->prev_size = block_size; new_block->size_and_flag = new_block_size;
46f4a: d483 addl %d3,%d2 46f4c: 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;
46f4e: 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 );
46f52: 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;
46f54: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
46f56: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
46f5a: 2f05 movel %d5,%sp@- 46f5c: 2f01 movel %d1,%sp@- 46f5e: 2f08 movel %a0,%sp@- 46f60: 2f0b movel %a3,%sp@- 46f62: 4eb9 0004 6d44 jsr 46d44 <_Heap_Block_split> 46f68: 4fef 0010 lea %sp@(16),%sp 46f6c: 608c bras 46efa <_Heap_Block_allocate+0xc2>
... 00050480 <_Heap_Extend>: Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
50480: 4e56 fff4 linkw %fp,#-12 50484: 206e 0008 moveal %fp@(8),%a0 50488: 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;
5048c: 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;
50490: 2268 0024 moveal %a0@(36),%a1
Heap_Control *heap, void *area_begin_ptr, uintptr_t area_size, uintptr_t *amount_extended ) {
50494: 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;
50498: b0a8 0018 cmpl %a0@(24),%d0 5049c: 6410 bccs 504ae <_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 ) {
5049e: b280 cmpl %d0,%d1 504a0: 671c beqs 504be <_Heap_Extend+0x3e> 504a2: 7002 moveq #2,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; }
504a4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504aa: 4e5e unlk %fp 504ac: 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 ) {
504ae: b280 cmpl %d0,%d1 504b0: 63ec blss 5049e <_Heap_Extend+0x1e> 504b2: 7001 moveq #1,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block )); } return HEAP_EXTEND_SUCCESSFUL; }
504b4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504ba: 4e5e unlk %fp 504bc: 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;
504be: 2200 movel %d0,%d1 504c0: d2ae 0010 addl %fp@(16),%d1
* block and free it. */ heap->area_end = new_heap_area_end; extend_size = new_heap_area_end
504c4: 70f8 moveq #-8,%d0 504c6: 9089 subl %a1,%d0 504c8: d081 addl %d1,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment);
504ca: 2600 movel %d0,%d3 504cc: 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;
504d2: 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;
504d6: 246e 0014 moveal %fp@(20),%a2 504da: 9082 subl %d2,%d0 504dc: 2480 movel %d0,%a2@
if( extend_size >= heap->min_block_size ) {
504de: b0a8 0014 cmpl %a0@(20),%d0 504e2: 640c bccs 504f0 <_Heap_Extend+0x70>
/* 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 ));
504e4: 4280 clrl %d0 <== NOT EXECUTED
} return HEAP_EXTEND_SUCCESSFUL; }
504e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 504ec: 4e5e unlk %fp 504ee: 4e75 rts
uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; block->size_and_flag = size | flag;
504f0: 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);
504f2: 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;
504f6: 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 =
504fa: 2228 0020 movel %a0@(32),%d1 504fe: 928a subl %a2,%d1 50500: 8480 orl %d0,%d2
((uintptr_t) heap->first_block - (uintptr_t) new_last_block) | HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block;
50502: 214a 0024 movel %a2,%a0@(36) 50506: 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 =
5050a: 7401 moveq #1,%d2 5050c: 8481 orl %d1,%d2 5050e: 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 ));
50512: 4869 0008 pea %a1@(8)
| HEAP_PREV_BLOCK_USED; heap->last_block = new_last_block; /* Statistics */ stats->size += extend_size;
50516: d1a8 002c addl %d0,%a0@(44)
++stats->used_blocks;
5051a: 52a8 0040 addql #1,%a0@(64)
--stats->frees; /* Do not count subsequent call as actual free() */
5051e: 53a8 0050 subql #1,%a0@(80)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
50522: 2f08 movel %a0,%sp@- 50524: 4eb9 0004 b58c jsr 4b58c <_Heap_Free> 5052a: 508f addql #8,%sp 5052c: 4280 clrl %d0 5052e: 60b6 bras 504e6 <_Heap_Extend+0x66>
0004b510 <_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 ) {
4b510: 4e56 ffe4 linkw %fp,#-28 4b514: 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 )
4b518: 2040 moveal %d0,%a0 4b51a: 5188 subql #8,%a0 4b51c: 226e 0008 moveal %fp@(8),%a1 4b520: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4b526: 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;
4b52a: 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 )
4b52e: 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
4b530: b088 cmpl %a0,%d0 4b532: 6200 00a0 bhiw 4b5d4 <_Heap_Free+0xc4>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4b536: 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
4b53a: b288 cmpl %a0,%d1 4b53c: 6500 0096 bcsw 4b5d4 <_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;
4b540: 2628 0004 movel %a0@(4),%d3 4b544: 74fe moveq #-2,%d2 4b546: 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);
4b548: 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
4b54c: b5c0 cmpal %d0,%a2 4b54e: 6500 0084 bcsw 4b5d4 <_Heap_Free+0xc4> 4b552: b5c1 cmpal %d1,%a2 4b554: 627e bhis 4b5d4 <_Heap_Free+0xc4>
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;
4b556: 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 ) ) {
4b55a: 7a01 moveq #1,%d5 4b55c: ca84 andl %d4,%d5 4b55e: 4a05 tstb %d5 4b560: 6772 beqs 4b5d4 <_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;
4b562: 7afe moveq #-2,%d5 4b564: c885 andl %d5,%d4
_HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block
4b566: b5c1 cmpal %d1,%a2 4b568: 6700 00fa beqw 4b664 <_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 )
4b56c: 7a01 moveq #1,%d5 4b56e: 7c01 moveq #1,%d6 4b570: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4b574: 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 ) ) {
4b576: 7c01 moveq #1,%d6 4b578: c686 andl %d6,%d3 4b57a: 4a03 tstb %d3 4b57c: 6660 bnes 4b5de <_Heap_Free+0xce>
uintptr_t const prev_size = block->prev_size;
4b57e: 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);
4b580: 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
4b582: b1c0 cmpal %d0,%a0 4b584: 654e bcss 4b5d4 <_Heap_Free+0xc4> 4b586: b1c1 cmpal %d1,%a0 4b588: 624a bhis 4b5d4 <_Heap_Free+0xc4>
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) ) {
4b58a: 7001 moveq #1,%d0 4b58c: c0a8 0004 andl %a0@(4),%d0 4b590: 4a00 tstb %d0 4b592: 6740 beqs 4b5d4 <_Heap_Free+0xc4>
_HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */
4b594: 4a05 tstb %d5 4b596: 6700 00d2 beqw 4b66a <_Heap_Free+0x15a>
} RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev;
4b59a: 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;
4b59e: 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;
4b5a2: d882 addl %d2,%d4 4b5a4: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b5a6: 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;
4b5a8: 246a 0008 moveal %a2@(8),%a2 4b5ac: 8083 orl %d3,%d0
next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size;
4b5ae: 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;
4b5b2: 2140 0004 movel %d0,%a0@(4)
Heap_Block *prev = block->prev; prev->next = next; next->prev = prev;
4b5b6: 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;
4b5ba: 274a 0008 movel %a2,%a3@(8)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4b5be: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4b5c2: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b5c6: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4b5ca: 7001 moveq #1,%d0
return( true ); }
4b5cc: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4b5d0: 4e5e unlk %fp 4b5d2: 4e75 rts 4b5d4: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3
/* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true );
4b5d8: 4200 clrb %d0
}
4b5da: 4e5e unlk %fp 4b5dc: 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 */
4b5de: 4a05 tstb %d5 4b5e0: 6736 beqs 4b618 <_Heap_Free+0x108>
Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev;
4b5e2: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + next_block_size;
4b5e6: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b5e8: 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;
4b5ea: 246a 0008 moveal %a2@(8),%a2 4b5ee: 8084 orl %d4,%d0
next_block = _Heap_Block_at( block, size ); next_block->prev_size = size;
4b5f0: 2184 4800 movel %d4,%a0@(00000000,%d4:l)
Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev;
4b5f4: 214b 000c movel %a3,%a0@(12)
) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next;
4b5f8: 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;
4b5fc: 2140 0004 movel %d0,%a0@(4)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4b600: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4b604: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b608: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4b60c: 7001 moveq #1,%d0
new_block->prev = prev; next->prev = new_block;
4b60e: 2548 000c movel %a0,%a2@(12)
prev->next = new_block;
4b612: 2748 0008 movel %a0,%a3@(8) 4b616: 60b4 bras 4b5cc <_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;
4b618: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b61a: 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;
4b61c: 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;
4b61e: 2669 0008 moveal %a1@(8),%a3 4b622: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b626: cdaa 0004 andl %d6,%a2@(4)
next_block->prev_size = block_size;
4b62a: 2482 movel %d2,%a2@
/* Statistics */ ++stats->free_blocks;
4b62c: 2029 0038 movel %a1@(56),%d0 4b630: 5280 addql #1,%d0
new_block->next = next;
4b632: 214b 0008 movel %a3,%a0@(8)
new_block->prev = block_before;
4b636: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
4b63a: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
4b63e: 2748 000c movel %a0,%a3@(12) 4b642: 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;
4b646: b0a9 003c cmpl %a1@(60),%d0 4b64a: 6300 ff72 blsw 4b5be <_Heap_Free+0xae>
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4b64e: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4b652: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b656: 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;
4b65a: 2340 003c movel %d0,%a1@(60)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4b65e: 7001 moveq #1,%d0 4b660: 6000 ff6a braw 4b5cc <_Heap_Free+0xbc>
_HAssert( false ); return false; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block
4b664: 4205 clrb %d5 4b666: 6000 ff0e braw 4b576 <_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;
4b66a: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4b66c: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b66e: 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;
4b670: 8a83 orl %d3,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size;
4b672: 2483 movel %d3,%a2@
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4b674: 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;
4b676: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4b67a: cdaa 0004 andl %d6,%a2@(4)
} /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size;
4b67e: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks;
4b682: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4b686: 52a9 0050 addql #1,%a1@(80) 4b68a: 6000 ff40 braw 4b5cc <_Heap_Free+0xbc>
... 0007ac20 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) {
7ac20: 4e56 fff4 linkw %fp,#-12 7ac24: 206e 0008 moveal %fp@(8),%a0 7ac28: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7ac2c: 246e 000c moveal %fp@(12),%a2
Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block;
7ac30: 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;
7ac34: 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;
7ac38: 4292 clrl %a2@
the_info->Free.total = 0;
7ac3a: 42aa 0008 clrl %a2@(8)
the_info->Free.largest = 0;
7ac3e: 42aa 0004 clrl %a2@(4)
the_info->Used.number = 0;
7ac42: 42aa 000c clrl %a2@(12)
the_info->Used.total = 0;
7ac46: 42aa 0014 clrl %a2@(20)
the_info->Used.largest = 0;
7ac4a: 42aa 0010 clrl %a2@(16)
while ( the_block != end ) {
7ac4e: b489 cmpl %a1,%d2 7ac50: 6746 beqs 7ac98 <_Heap_Get_information+0x78>
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;
7ac52: 260a movel %a2,%d3 7ac54: 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 ) {
7ac5a: 2229 0004 movel %a1@(4),%d1
- HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
7ac5e: 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) )
7ac60: 204a moveal %a2,%a0 7ac62: 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);
7ac64: 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;
7ac66: 2229 0004 movel %a1@(4),%d1 7ac6a: 0801 0000 btst #0,%d1 7ac6e: 6702 beqs 7ac72 <_Heap_Get_information+0x52> 7ac70: 2043 moveal %d3,%a0
info = &the_info->Used; else info = &the_info->Free; info->number++;
7ac72: 5290 addql #1,%a0@
info->total += the_size;
7ac74: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
7ac78: b0a8 0004 cmpl %a0@(4),%d0 7ac7c: 6304 blss 7ac82 <_Heap_Get_information+0x62>
info->largest = the_size;
7ac7e: 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 ) {
7ac82: b3c2 cmpal %d2,%a1 7ac84: 66d8 bnes 7ac5e <_Heap_Get_information+0x3e> 7ac86: 202a 0014 movel %a2@(20),%d0 7ac8a: 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;
7ac8c: 2540 0014 movel %d0,%a2@(20)
}
7ac90: 4cd7 040c moveml %sp@,%d2-%d3/%a2 7ac94: 4e5e unlk %fp 7ac96: 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 ) {
7ac98: 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;
7ac9a: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
}
7ac9e: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 7aca2: 4e5e unlk %fp <== NOT EXECUTED
... 0004649e <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) {
4649e: 4e56 fff0 linkw %fp,#-16 464a2: 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;
464a6: 2639 0005 c2c6 movel 5c2c6 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
464ac: 2439 0005 c2c2 movel 5c2c2 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
464b2: 2839 0005 c2be movel 5c2be <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 )
464b8: b882 cmpl %d2,%d4 464ba: 6216 bhis 464d2 <_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;
464bc: 23c3 0005 dbe6 movel %d3,5dbe6 <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
464c2: 23c2 0005 dbe2 movel %d2,5dbe2 <_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; }
464c8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 464ce: 4e5e unlk %fp 464d0: 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 *)
464d2: 2004 movel %d4,%d0 464d4: 2a04 movel %d4,%d5 464d6: e788 lsll #3,%d0 464d8: eb8d lsll #5,%d5 464da: 9a80 subl %d0,%d5 464dc: 2f05 movel %d5,%sp@- 464de: 4eb9 0004 9080 jsr 49080 <_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(
464e4: 2f05 movel %d5,%sp@- 464e6: 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;
464e8: 23c4 0005 dbe2 movel %d4,5dbe2 <_IO_Number_of_drivers>
memset(
464ee: 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 *)
464f0: 23c0 0005 dbe6 movel %d0,5dbe6 <_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(
464f6: 4eb9 0004 e0f8 jsr 4e0f8 <memset>
_IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ )
464fc: 4fef 0010 lea %sp@(16),%sp 46500: 4a82 tstl %d2 46502: 67c4 beqs 464c8 <_IO_Manager_initialization+0x2a> 46504: 2839 0005 dbe6 movel 5dbe6 <_IO_Driver_address_table>,%d4 4650a: 4280 clrl %d0 4650c: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
4650e: 2243 moveal %d3,%a1 46510: 2044 moveal %d4,%a0 46512: d3c0 addal %d0,%a1 46514: 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++ )
46516: 5281 addql #1,%d1 46518: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
4651e: 20d9 movel %a1@+,%a0@+ 46520: 20d9 movel %a1@+,%a0@+ 46522: 20d9 movel %a1@+,%a0@+ 46524: 20d9 movel %a1@+,%a0@+ 46526: 20d9 movel %a1@+,%a0@+ 46528: 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++ )
4652a: b282 cmpl %d2,%d1 4652c: 649a bccs 464c8 <_IO_Manager_initialization+0x2a>
_IO_Driver_address_table[index] = driver_table[index];
4652e: 2243 moveal %d3,%a1 46530: 2044 moveal %d4,%a0 46532: d3c0 addal %d0,%a1 46534: 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++ )
46536: 5281 addql #1,%d1 46538: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
4653e: 20d9 movel %a1@+,%a0@+ 46540: 20d9 movel %a1@+,%a0@+ 46542: 20d9 movel %a1@+,%a0@+ 46544: 20d9 movel %a1@+,%a0@+ 46546: 20d9 movel %a1@+,%a0@+ 46548: 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++ )
4654a: b282 cmpl %d2,%d1 4654c: 65c0 bcss 4650e <_IO_Manager_initialization+0x70> 4654e: 6000 ff78 braw 464c8 <_IO_Manager_initialization+0x2a>
... 00046f70 <_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 );
46f70: 4280 clrl %d0
void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
46f72: 4e56 0000 linkw %fp,#0 46f76: 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 );
46f7a: 1001 moveb %d1,%d0 46f7c: 2040 moveal %d0,%a0
void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) {
46f7e: 2f03 movel %d3,%sp@- 46f80: 202e 0008 movel %fp@(8),%d0 46f84: 2f02 movel %d2,%sp@- 46f86: 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 );
46f8a: 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;
46f8c: 13c1 0005 da72 moveb %d1,5da72 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error );
46f92: 2f08 movel %a0,%sp@-
bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source;
46f94: 23c0 0005 da6e movel %d0,5da6e <_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 );
46f9a: 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;
46f9c: 23c2 0005 da74 movel %d2,5da74 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
46fa2: 4eb9 0004 8cb2 jsr 48cb2 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error );
46fa8: 307c 0700 moveaw #1792,%a0 46fac: 2608 movel %a0,%d3 46fae: 40c0 movew %sr,%d0 46fb0: 8083 orl %d3,%d0 46fb2: 46c0 movew %d0,%sr
46fb4: 2002 movel %d2,%d0 <== NOT EXECUTED 46fb6: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 46fbc: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state;
46fbe: 7005 moveq #5,%d0 46fc0: 4fef 000c lea %sp@(12),%sp 46fc4: 23c0 0005 db4a movel %d0,5db4a <_System_state_Current> 46fca: 60fe bras 46fca <_Internal_error_Occurred+0x5a>
00047034 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) {
47034: 4e56 fff0 linkw %fp,#-16 47038: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4703c: 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 )
47040: 4aaa 0014 tstl %a2@(20) 47044: 660c bnes 47052 <_Objects_Allocate+0x1e>
47046: 4280 clrl %d0 <== NOT EXECUTED
information->inactive--; } } return the_object; }
47048: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4704e: 4e5e unlk %fp 47050: 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 );
47052: 240a movel %a2,%d2 47054: 0682 0000 001c addil #28,%d2 4705a: 47f9 0004 b07c lea 4b07c <_Chain_Get>,%a3 47060: 2f02 movel %d2,%sp@- 47062: 4e93 jsr %a3@
if ( information->auto_extend ) {
47064: 588f addql #4,%sp 47066: 4a2a 0010 tstb %a2@(16) 4706a: 67dc beqs 47048 <_Objects_Allocate+0x14>
/* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) {
4706c: 4a80 tstl %d0 4706e: 6738 beqs 470a8 <_Objects_Allocate+0x74>
} if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
47070: 2040 moveal %d0,%a0 47072: 4281 clrl %d1 47074: 4283 clrl %d3
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--;
47076: 4282 clrl %d2
} if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
47078: 362a 0008 movew %a2@(8),%d3 4707c: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--;
47080: 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 ]--;
47084: 342a 0012 movew %a2@(18),%d2
} if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) -
47088: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; information->inactive--;
4708a: 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 ]--;
4708c: 4c42 1001 remul %d2,%d1,%d1
information->inactive--;
47090: 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 ]--;
47094: 206a 002a moveal %a2@(42),%a0 47098: e589 lsll #2,%d1
information->inactive--; } } return the_object; }
4709a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 470a0: 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 ]--;
470a2: d1c1 addal %d1,%a0 470a4: 5390 subql #1,%a0@
information->inactive--; } } return the_object; }
470a6: 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 );
470a8: 2f0a movel %a2,%sp@- 470aa: 4eb9 0004 70f0 jsr 470f0 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
470b0: 2f02 movel %d2,%sp@- 470b2: 4e93 jsr %a3@
} if ( the_object ) {
470b4: 508f addql #8,%sp 470b6: 4a80 tstl %d0 470b8: 66b6 bnes 47070 <_Objects_Allocate+0x3c>
information->inactive--; } } return the_object; }
470ba: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
470c0: 4e5e unlk %fp <== NOT EXECUTED
000470c4 <_Objects_Close>: #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
470c4: 4280 clrl %d0
void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) {
470c6: 4e56 0000 linkw %fp,#0 470ca: 226e 000c moveal %fp@(12),%a1 470ce: 206e 0008 moveal %fp@(8),%a0 470d2: 2f0a movel %a2,%sp@- 470d4: 2468 0018 moveal %a0@(24),%a2 470d8: 3029 000a movew %a1@(10),%d0 470dc: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object );
470e0: 2d49 000c movel %a1,%fp@(12)
}
470e4: 245f moveal %sp@+,%a2 470e6: 4e5e unlk %fp
Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object );
470e8: 4ef9 0004 7648 jmp 47648 <_Objects_Namespace_remove>
... 000470f0 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) {
470f0: 4e56 ffcc linkw %fp,#-52 470f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 470f8: 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 );
470fc: 4285 clrl %d5
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
470fe: 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 );
47102: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL )
47106: 4a88 tstl %a0 47108: 6700 022c beqw 47336 <_Objects_Extend_information+0x246>
block_count = 0; else { block_count = information->maximum / information->allocation_size;
4710c: 322a 000e movew %a2@(14),%d1 47110: 302a 0012 movew %a2@(18),%d0 47114: 3801 movew %d1,%d4 47116: 0284 0000 ffff andil #65535,%d4 4711c: 88c0 divuw %d0,%d4 4711e: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47124: 6700 0224 beqw 4734a <_Objects_Extend_information+0x25a>
if ( information->object_blocks[ block ] == NULL )
47128: 4a90 tstl %a0@ 4712a: 6700 021e beqw 4734a <_Objects_Extend_information+0x25a> 4712e: 5888 addql #4,%a0 47130: 2605 movel %d5,%d3 47132: 4282 clrl %d2 47134: 0280 0000 ffff andil #65535,%d0
break; else index_base += information->allocation_size;
4713a: 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++ ) {
4713c: 5282 addql #1,%d2 4713e: b484 cmpl %d4,%d2 47140: 6404 bccs 47146 <_Objects_Extend_information+0x56>
if ( information->object_blocks[ block ] == NULL )
47142: 4a98 tstl %a0@+ 47144: 66f4 bnes 4713a <_Objects_Extend_information+0x4a>
else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size;
47146: 0281 0000 ffff andil #65535,%d1 4714c: 2641 moveal %d1,%a3 4714e: 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 ) {
47150: b7fc 0000 ffff cmpal #65535,%a3 47156: 6200 0186 bhiw 472de <_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;
4715a: 41ea 0014 lea %a2@(20),%a0 4715e: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47162: 4a2a 0010 tstb %a2@(16) 47166: 6700 0180 beqw 472e8 <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
4716a: 2f00 movel %d0,%sp@- 4716c: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !new_object_block )
47172: 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 );
47174: 2c00 movel %d0,%d6
if ( !new_object_block )
47176: 6700 0166 beqw 472de <_Objects_Extend_information+0x1ee>
} /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) {
4717a: 4280 clrl %d0 4717c: 302a 000e movew %a2@(14),%d0 47180: b083 cmpl %d3,%d0 47182: 6200 00c4 bhiw 47248 <_Objects_Extend_information+0x158>
*/ /* * Up the block count and maximum */ block_count++;
47186: 2a44 moveal %d4,%a5 47188: 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 );
4718a: 200b movel %a3,%d0 4718c: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47190: d088 addl %a0,%d0 47192: d085 addl %d5,%d0 47194: e588 lsll #2,%d0 47196: 2f00 movel %d0,%sp@- 47198: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !object_blocks ) {
4719e: 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 );
471a0: 2840 moveal %d0,%a4
if ( !object_blocks ) {
471a2: 4a80 tstl %d0 471a4: 6700 01b2 beqw 47358 <_Objects_Extend_information+0x268>
} /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset(
471a8: 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 ) {
471aa: 4280 clrl %d0
} /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset(
471ac: 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 ) {
471ae: 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);
471b2: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 471b6: de8d addl %a5,%d7 471b8: b085 cmpl %d5,%d0 471ba: 6200 013c bhiw 472f8 <_Objects_Extend_information+0x208>
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
471be: 4a85 tstl %d5 471c0: 670c beqs 471ce <_Objects_Extend_information+0xde>
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
471c2: 2047 moveal %d7,%a0 471c4: 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;
471c6: 4298 clrl %a0@+
} else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) {
471c8: 5280 addql #1,%d0 471ca: b085 cmpl %d5,%d0 471cc: 65f8 bcss 471c6 <_Objects_Extend_information+0xd6> 471ce: 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 );
471d0: 4281 clrl %d1 471d2: 322a 0012 movew %a2@(18),%d1
/* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0;
471d6: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ; index < ( information->allocation_size + index_base );
471da: d283 addl %d3,%d1
} /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL;
471dc: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0; for ( index=index_base ;
471e0: b283 cmpl %d3,%d1 471e2: 6310 blss 471f4 <_Objects_Extend_information+0x104> 471e4: 2247 moveal %d7,%a1 471e6: 2003 movel %d3,%d0 471e8: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL;
471ec: 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++ ) {
471ee: 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 ;
471f0: b280 cmpl %d0,%d1 471f2: 62f8 bhis 471ec <_Objects_Extend_information+0xfc>
index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level );
471f4: 203c 0000 0700 movel #1792,%d0 471fa: 40c4 movew %sr,%d4 471fc: 8084 orl %d4,%d0 471fe: 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(
47200: 2012 movel %a2@,%d0 47202: 7218 moveq #24,%d1 47204: 4285 clrl %d5 47206: e3a8 lsll %d1,%d0 47208: 3a0b movew %a3,%d5 4720a: 4281 clrl %d1 4720c: 2245 moveal %d5,%a1 4720e: 7a1b moveq #27,%d5 47210: 322a 0004 movew %a2@(4),%d1 47214: 08c0 0010 bset #16,%d0
local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks;
47218: 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(
4721c: 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;
4721e: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks;
47222: 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(
47226: 8081 orl %d1,%d0 47228: 2209 movel %a1,%d1 4722a: 8280 orl %d0,%d1
_ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block;
4722c: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id(
47230: 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;
47234: 2547 0018 movel %d7,%a2@(24)
information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level );
47238: 46c4 movew %d4,%sr
if ( old_tables )
4723a: 4a88 tstl %a0 4723c: 670a beqs 47248 <_Objects_Extend_information+0x158>
_Workspace_Free( old_tables );
4723e: 2f08 movel %a0,%sp@- 47240: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47246: 588f addql #4,%sp
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
47248: 206a 002e moveal %a2@(46),%a0
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
4724c: 4280 clrl %d0 4724e: 280e movel %fp,%d4 47250: 0684 ffff fff4 addil #-12,%d4 47256: 47f9 0004 b07c lea 4b07c <_Chain_Get>,%a3
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
4725c: 2a0a movel %a2,%d5 4725e: 0685 0000 001c addil #28,%d5 47264: 49f9 0004 673c lea 4673c <_Chain_Append>,%a4
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
4726a: e58a lsll #2,%d2
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
4726c: 302a 0012 movew %a2@(18),%d0
} /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block;
47270: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/* * Initialize objects .. add to a local chain first. */ _Chain_Initialize(
47274: 2f2a 0014 movel %a2@(20),%sp@- 47278: 2f00 movel %d0,%sp@- 4727a: 2f06 movel %d6,%sp@- 4727c: 2f04 movel %d4,%sp@- 4727e: 4eb9 0004 b0b8 jsr 4b0b8 <_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 ) {
47284: 4fef 0010 lea %sp@(16),%sp 47288: 2f04 movel %d4,%sp@- 4728a: 4e93 jsr %a3@ 4728c: 588f addql #4,%sp 4728e: 4a80 tstl %d0 47290: 6732 beqs 472c4 <_Objects_Extend_information+0x1d4>
the_object->id = _Objects_Build_id(
47292: 2212 movel %a2@,%d1 47294: 7c18 moveq #24,%d6 47296: 7e1b moveq #27,%d7 47298: 2040 moveal %d0,%a0 4729a: eda9 lsll %d6,%d1 4729c: 4286 clrl %d6 4729e: 3c2a 0004 movew %a2@(4),%d6 472a2: 08c1 0010 bset #16,%d1 472a6: efae lsll %d7,%d6 472a8: 8286 orl %d6,%d1 472aa: 8283 orl %d3,%d1
index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++;
472ac: 5283 addql #1,%d3
*/ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id(
472ae: 2141 0008 movel %d1,%a0@(8)
information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node );
472b2: 2f00 movel %d0,%sp@- 472b4: 2f05 movel %d5,%sp@- 472b6: 4e94 jsr %a4@
index++;
472b8: 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 ) {
472ba: 2f04 movel %d4,%sp@- 472bc: 4e93 jsr %a3@ 472be: 588f addql #4,%sp 472c0: 4a80 tstl %d0 472c2: 66ce bnes 47292 <_Objects_Extend_information+0x1a2>
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
472c4: 4280 clrl %d0
information->inactive =
472c6: 322a 0028 movew %a2@(40),%d1 472ca: 326a 0012 moveaw %a2@(18),%a1
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
472ce: 206a 002a moveal %a2@(42),%a0
information->inactive =
472d2: d289 addl %a1,%d1
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
472d4: 3009 movew %a1,%d0
information->inactive =
472d6: 3541 0028 movew %d1,%a2@(40)
_Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size;
472da: 2180 2800 movel %d0,%a0@(00000000,%d2:l)
information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); }
472de: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 472e4: 4e5e unlk %fp 472e6: 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 );
472e8: 2f00 movel %d0,%sp@- 472ea: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error> 472f0: 588f addql #4,%sp 472f2: 2c00 movel %d0,%d6 472f4: 6000 fe84 braw 4717a <_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,
472f8: e58c lsll #2,%d4 472fa: 2f04 movel %d4,%sp@- 472fc: 2f2a 002e movel %a2@(46),%sp@- 47300: 2f0c movel %a4,%sp@- 47302: 4eb9 0004 e088 jsr 4e088 <memcpy>
information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block,
47308: 2f04 movel %d4,%sp@- 4730a: 2f2a 002a movel %a2@(42),%sp@- 4730e: 2f0d movel %a5,%sp@- 47310: 4eb9 0004 e088 jsr 4e088 <memcpy>
information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table,
47316: 4280 clrl %d0 47318: 302a 000e movew %a2@(14),%d0 4731c: da80 addl %d0,%d5 4731e: e58d lsll #2,%d5 47320: 2f05 movel %d5,%sp@- 47322: 2f2a 0018 movel %a2@(24),%sp@- 47326: 2f07 movel %d7,%sp@- 47328: 4eb9 0004 e088 jsr 4e088 <memcpy> 4732e: 4fef 0024 lea %sp@(36),%sp 47332: 6000 fe9c braw 471d0 <_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 )
47336: 4280 clrl %d0 47338: 2605 movel %d5,%d3 4733a: 4282 clrl %d2 4733c: 4284 clrl %d4 4733e: 322a 000e movew %a2@(14),%d1 47342: 302a 0012 movew %a2@(18),%d0 47346: 6000 fdfe braw 47146 <_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 )
4734a: 2605 movel %d5,%d3 <== NOT EXECUTED 4734c: 4282 clrl %d2 <== NOT EXECUTED 4734e: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47354: 6000 fdf0 braw 47146 <_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 );
47358: 2f06 movel %d6,%sp@- 4735a: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free>
return;
47360: 588f addql #4,%sp
} information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); }
47362: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47368: 4e5e unlk %fp <== NOT EXECUTED
00053bec <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) {
53bec: 4e56 ffe0 linkw %fp,#-32 53bf0: 48d7 043c moveml %d2-%d5/%a2,%sp@ 53bf4: 262e 000c movel %fp@(12),%d3 53bf8: 242e 0010 movel %fp@(16),%d2
char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 )
53bfc: 4a83 tstl %d3 53bfe: 660e bnes 53c0e <_Objects_Get_name_as_string+0x22>
} } *d = '\0'; _Thread_Enable_dispatch(); return name;
53c00: 4282 clrl %d2
} return NULL; /* unreachable path */ }
53c02: 2002 movel %d2,%d0 53c04: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53c0a: 4e5e unlk %fp 53c0c: 4e75 rts
Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL )
53c0e: 4a82 tstl %d2 53c10: 67f0 beqs 53c02 <_Objects_Get_name_as_string+0x16>
return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
53c12: 4aae 0008 tstl %fp@(8) 53c16: 6700 00a8 beqw 53cc0 <_Objects_Get_name_as_string+0xd4> 53c1a: 282e 0008 movel %fp@(8),%d4
information = _Objects_Get_information_id( tmpId );
53c1e: 2f04 movel %d4,%sp@- 53c20: 4eb9 0004 c8b0 jsr 4c8b0 <_Objects_Get_information_id>
if ( !information )
53c26: 588f addql #4,%sp 53c28: 4a80 tstl %d0 53c2a: 67d4 beqs 53c00 <_Objects_Get_name_as_string+0x14>
return NULL; the_object = _Objects_Get( information, tmpId, &location );
53c2c: 486e fffc pea %fp@(-4) 53c30: 2f04 movel %d4,%sp@- 53c32: 2f00 movel %d0,%sp@- 53c34: 4eb9 0004 c990 jsr 4c990 <_Objects_Get>
switch ( location ) {
53c3a: 4fef 000c lea %sp@(12),%sp 53c3e: 4aae fffc tstl %fp@(-4) 53c42: 66bc bnes 53c00 <_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;
53c44: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
53c46: 7818 moveq #24,%d4
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
53c48: 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;
53c4a: 2028 000c movel %a0@(12),%d0
lname[ 0 ] = (u32_name >> 24) & 0xff;
53c4e: 2200 movel %d0,%d1 53c50: e8a9 lsrl %d4,%d1
lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff;
53c52: 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;
53c54: 2800 movel %d0,%d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
53c56: e08d lsrl #8,%d5
lname[ 3 ] = (u32_name >> 0) & 0xff;
53c58: 1d40 fffa moveb %d0,%fp@(-6)
lname[ 4 ] = '\0';
53c5c: 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;
53c5e: 4244 clrw %d4 53c60: 4844 swap %d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
53c62: 1d45 fff9 moveb %d5,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0';
53c66: 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;
53c6a: 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;
53c6e: 1d41 fff7 moveb %d1,%fp@(-9) 53c72: 1001 moveb %d1,%d0
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
53c74: 4a83 tstl %d3 53c76: 6756 beqs 53cce <_Objects_Get_name_as_string+0xe2> 53c78: 4a01 tstb %d1 53c7a: 6752 beqs 53cce <_Objects_Get_name_as_string+0xe2> 53c7c: 2042 moveal %d2,%a0 53c7e: 4281 clrl %d1 53c80: 45ee fff7 lea %fp@(-9),%a2
*d = (isprint((unsigned char)*s)) ? *s : '*';
53c84: 4284 clrl %d4 53c86: 1800 moveb %d0,%d4
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
53c88: 5281 addql #1,%d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
53c8a: 2279 0006 9780 moveal 69780 <__ctype_ptr__>,%a1 53c90: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 53c94: 49c4 extbl %d4 53c96: 0284 0000 0097 andil #151,%d4 53c9c: 6602 bnes 53ca0 <_Objects_Get_name_as_string+0xb4> 53c9e: 702a moveq #42,%d0 53ca0: 10c0 moveb %d0,%a0@+
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
53ca2: b681 cmpl %d1,%d3 53ca4: 6306 blss 53cac <_Objects_Get_name_as_string+0xc0> 53ca6: 1032 1800 moveb %a2@(00000000,%d1:l),%d0 53caa: 66d8 bnes 53c84 <_Objects_Get_name_as_string+0x98>
*d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0';
53cac: 4210 clrb %a0@
_Thread_Enable_dispatch();
53cae: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch>
return name; } return NULL; /* unreachable path */ }
53cb4: 2002 movel %d2,%d0 53cb6: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 53cbc: 4e5e unlk %fp 53cbe: 4e75 rts
return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
53cc0: 2079 0006 b59a moveal 6b59a <_Thread_Executing>,%a0 53cc6: 2828 0008 movel %a0@(8),%d4 53cca: 6000 ff52 braw 53c1e <_Objects_Get_name_as_string+0x32>
s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
53cce: 2042 moveal %d2,%a0
*d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0';
53cd0: 4210 clrb %a0@
_Thread_Enable_dispatch();
53cd2: 4eb9 0004 d2f8 jsr 4d2f8 <_Thread_Enable_dispatch> 53cd8: 60da bras 53cb4 <_Objects_Get_name_as_string+0xc8>
... 0004753c <_Objects_Initialize_information>: information->maximum = 0; /* * Register this Object Class in the Object Information Table. */ _Objects_Information_table[ the_api ][ the_class ] = information;
4753c: 41f9 0005 d980 lea 5d980 <_Objects_Information_table>,%a0
, bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) {
47542: 4e56 fff0 linkw %fp,#-16 47546: 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;
4754a: 2270 0c00 moveal %a0@(00000000,%d0:l:4),%a1
, bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) {
4754e: 48d7 003c moveml %d2-%d5,%sp@ 47552: 222e 0014 movel %fp@(20),%d1 47556: 4285 clrl %d5
/* * Are we operating in limited or unlimited (e.g. auto-extend) mode. */ information->auto_extend = (maximum & OBJECTS_UNLIMITED_OBJECTS) ? true : false;
47558: 2601 movel %d1,%d3
, bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) {
4755a: 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;
4755e: 4244 clrw %d4
, bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) {
47560: 3a2e 001a movew %fp@(26),%d5 47564: 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;
47568: d683 addl %d3,%d3 4756a: 9783 subxl %d3,%d3 4756c: 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;
4756e: 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;
47572: 3144 000e movew %d4,%a0@(14)
, bool supports_global, Objects_Thread_queue_Extract_callout extract #endif ) {
47576: 282e 0020 movel %fp@(32),%d4
#if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api; information->the_class = the_class;
4757a: 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 =
4757e: 1143 0010 moveb %d3,%a0@(16)
uint32_t index; #endif information->the_api = the_api; information->the_class = the_class; information->size = size;
47582: 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;
47586: 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;
4758a: 0881 001f bclr #31,%d1
uint32_t maximum_per_allocation; #if defined(RTEMS_MULTIPROCESSING) uint32_t index; #endif information->the_api = the_api;
4758e: 2080 movel %d0,%a0@
information->the_class = the_class; information->size = size; information->local_table = 0;
47590: 42a8 0018 clrl %a0@(24)
information->inactive_per_block = 0;
47594: 42a8 002a clrl %a0@(42)
information->object_blocks = 0;
47598: 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) {
4759c: 4a03 tstb %d3 4759e: 6706 beqs 475a6 <_Objects_Initialize_information+0x6a> 475a0: 4a81 tstl %d1 475a2: 6700 0092 beqw 47636 <_Objects_Initialize_information+0xfa>
/* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id =
475a6: 7a18 moveq #24,%d5 475a8: 4a81 tstl %d1 475aa: 56c3 sne %d3 475ac: eba8 lsll %d5,%d0 475ae: 1a3c 001b moveb #27,%d5 475b2: 49c3 extbl %d3 475b4: 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;
475b6: 43f9 0005 d16c lea 5d16c <null_local_table.3444>,%a1
/* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id =
475bc: ebaa lsll %d5,%d2 475be: 08c0 0010 bset #16,%d0
/* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
475c2: 1a3c 0003 moveb #3,%d5
/* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id =
475c6: 8082 orl %d2,%d0
/* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
475c8: ca84 andl %d4,%d5
} /* * The allocation unit is the maximum value */ information->allocation_size = maximum_per_allocation;
475ca: 3141 0012 movew %d1,%a0@(18)
/* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id =
475ce: 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;
475d0: 2149 0018 movel %a1,%a0@(24)
/* * Calculate minimum and maximum Id's */ minimum_index = (maximum_per_allocation == 0) ? 0 : 1; information->minimum_id =
475d4: 2140 0006 movel %d0,%a0@(6)
/* * Calculate the maximum name length */ name_length = maximum_name_length; if ( name_length & (OBJECTS_NAME_ALIGNMENT-1) )
475d8: 4a85 tstl %d5 475da: 6626 bnes 47602 <_Objects_Initialize_information+0xc6>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
475dc: 43e8 0020 lea %a0@(32),%a1 475e0: 2149 001c movel %a1,%a0@(28)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
475e4: 43e8 001c lea %a0@(28),%a1
name_length = (name_length + OBJECTS_NAME_ALIGNMENT) & ~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length;
475e8: 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;
475ec: 42a8 0020 clrl %a0@(32)
the_chain->last = _Chain_Head(the_chain);
475f0: 2149 0024 movel %a1,%a0@(36)
_Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) {
475f4: 4a81 tstl %d1 475f6: 662c bnes 47624 <_Objects_Initialize_information+0xe8>
_Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif }
475f8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 475fe: 4e5e unlk %fp 47600: 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) &
47602: 5884 addql #4,%d4 <== NOT EXECUTED 47604: 70fc moveq #-4,%d0 <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
47606: 43e8 0020 lea %a0@(32),%a1 <== NOT EXECUTED 4760a: c880 andl %d0,%d4 <== NOT EXECUTED 4760c: 2149 001c movel %a1,%a0@(28) <== NOT EXECUTED
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
47610: 43e8 001c lea %a0@(28),%a1 <== NOT EXECUTED
~(OBJECTS_NAME_ALIGNMENT-1); information->name_length = name_length;
47614: 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;
47618: 42a8 0020 clrl %a0@(32) <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
4761c: 2149 0024 movel %a1,%a0@(36) <== NOT EXECUTED
_Chain_Initialize_empty( &information->Inactive ); /* * Initialize objects .. if there are any */ if ( maximum_per_allocation ) {
47620: 4a81 tstl %d1 <== NOT EXECUTED 47622: 67d4 beqs 475f8 <_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 );
47624: 2d48 0008 movel %a0,%fp@(8)
_Chain_Initialize_empty( &information->global_table[ index ] ); } else information->global_table = NULL; #endif }
47628: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 4762e: 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 );
47630: 4ef9 0004 70f0 jmp 470f0 <_Objects_Extend_information>
/* * Unlimited and maximum of zero is illogical. */ if ( information->auto_extend && maximum_per_allocation == 0) { _Internal_error_Occurred(
47636: 4878 0014 pea 14 <OPER2> 4763a: 4878 0001 pea 1 <ADD> 4763e: 42a7 clrl %sp@- 47640: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
... 000476d8 <_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) /
476d8: 4281 clrl %d1
*/ void _Objects_Shrink_information( Objects_Information *information ) {
476da: 4e56 ffec linkw %fp,#-20 476de: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 476e2: 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 );
476e6: 4283 clrl %d3
block_count = (information->maximum - index_base) /
476e8: 4284 clrl %d4
/* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id );
476ea: 362a 0008 movew %a2@(8),%d3
block_count = (information->maximum - index_base) /
476ee: 382a 000e movew %a2@(14),%d4 476f2: 322a 0012 movew %a2@(18),%d1 476f6: 9883 subl %d3,%d4 476f8: 4c41 4004 remul %d1,%d4,%d4
information->allocation_size; for ( block = 0; block < block_count; block++ ) {
476fc: 672c beqs 4772a <_Objects_Shrink_information+0x52>
if ( information->inactive_per_block[ block ] ==
476fe: 226a 002a moveal %a2@(42),%a1 47702: b291 cmpl %a1@,%d1 47704: 672e beqs 47734 <_Objects_Shrink_information+0x5c>
information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return;
47706: 7404 moveq #4,%d2 47708: 4280 clrl %d0
} index_base += information->allocation_size;
4770a: 2042 moveal %d2,%a0 4770c: d681 addl %d1,%d3 4770e: 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++ ) {
47710: 5280 addql #1,%d0 47712: b084 cmpl %d4,%d0 47714: 6414 bccs 4772a <_Objects_Shrink_information+0x52>
if ( information->inactive_per_block[ block ] ==
47716: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1 4771a: 671a beqs 47736 <_Objects_Shrink_information+0x5e> 4771c: 2408 movel %a0,%d2
information->inactive -= information->allocation_size; return; } index_base += information->allocation_size;
4771e: 2042 moveal %d2,%a0 47720: d681 addl %d1,%d3 47722: 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++ ) {
47724: 5280 addql #1,%d0 47726: b084 cmpl %d4,%d0 47728: 65ec bcss 47716 <_Objects_Shrink_information+0x3e>
return; } index_base += information->allocation_size; } }
4772a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47730: 4e5e unlk %fp 47732: 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 ] ==
47734: 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;
47736: 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 );
4773a: 47f9 0004 b054 lea 4b054 <_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 );
47740: 4280 clrl %d0 47742: 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;
47746: 2810 movel %a0@,%d4
if ((index >= index_base) &&
47748: b680 cmpl %d0,%d3 4774a: 620c bhis 47758 <_Objects_Shrink_information+0x80>
(index < (index_base + information->allocation_size))) {
4774c: 4281 clrl %d1 4774e: 322a 0012 movew %a2@(18),%d1 47752: d283 addl %d3,%d1 47754: b280 cmpl %d0,%d1 47756: 623e bhis 47796 <_Objects_Shrink_information+0xbe>
_Chain_Extract( &extract_me->Node ); } } while ( the_object );
47758: 2044 moveal %d4,%a0 4775a: 4a84 tstl %d4 4775c: 66e2 bnes 47740 <_Objects_Shrink_information+0x68>
/* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] );
4775e: 206a 002e moveal %a2@(46),%a0 47762: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 47766: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
4776c: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return;
47770: 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;
47772: 302a 0028 movew %a2@(40),%d0 47776: 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;
4777a: 226a 002a moveal %a2@(42),%a1
information->inactive -= information->allocation_size;
4777e: 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;
47780: 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;
47784: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size;
47788: 3540 0028 movew %d0,%a2@(40)
return; } index_base += information->allocation_size; } }
4778c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 47792: 4e5e unlk %fp 47794: 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 );
47796: 2f08 movel %a0,%sp@- 47798: 4e93 jsr %a3@ 4779a: 588f addql #4,%sp
} } while ( the_object );
4779c: 2044 moveal %d4,%a0 4779e: 4a84 tstl %d4 477a0: 669e bnes 47740 <_Objects_Shrink_information+0x68> 477a2: 60ba bras 4775e <_Objects_Shrink_information+0x86>
00046150 <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) {
46150: 4e56 ffe4 linkw %fp,#-28 46154: 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;
46158: 2479 0005 c28a moveal 5c28a <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
4615e: 2639 0005 c286 movel 5c286 <Configuration_RTEMS_API+0x26>,%d3
/* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks )
46164: 4a8a tstl %a2 46166: 6754 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) {
46168: 4a83 tstl %d3 4616a: 6750 beqs 461bc <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> 4616c: 280e movel %fp,%d4 4616e: 4282 clrl %d2 46170: 5984 subql #4,%d4 46172: 47f9 0004 5f24 lea 45f24 <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(
46178: 49f9 0004 61d8 lea 461d8 <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(
4617e: 2f04 movel %d4,%sp@- 46180: 2f2a 000c movel %a2@(12),%sp@- 46184: 2f2a 0014 movel %a2@(20),%sp@- 46188: 2f2a 0004 movel %a2@(4),%sp@- 4618c: 2f2a 0008 movel %a2@(8),%sp@- 46190: 2f12 movel %a2@,%sp@- 46192: 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 ) )
46194: 4fef 0018 lea %sp@(24),%sp 46198: 4a80 tstl %d0 4619a: 662a bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start(
4619c: 2f2a 0018 movel %a2@(24),%sp@- 461a0: 2f2a 0010 movel %a2@(16),%sp@- 461a4: 2f2e fffc movel %fp@(-4),%sp@- 461a8: 4e94 jsr %a4@
id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) )
461aa: 4fef 000c lea %sp@(12),%sp 461ae: 4a80 tstl %d0 461b0: 6614 bnes 461c6 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) {
461b2: 5282 addql #1,%d2 461b4: 45ea 001c lea %a2@(28),%a2 461b8: b483 cmpl %d3,%d2 461ba: 65c2 bcss 4617e <_RTEMS_tasks_Initialize_user_tasks_body+0x2e>
user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } }
461bc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 461c2: 4e5e unlk %fp 461c4: 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 );
461c6: 2f00 movel %d0,%sp@- 461c8: 4878 0001 pea 1 <ADD> 461cc: 4878 0001 pea 1 <ADD> 461d0: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
... 0004ae1a <_RTEMS_tasks_Post_switch_extension>: */ void _RTEMS_tasks_Post_switch_extension( Thread_Control *executing ) {
4ae1a: 4e56 ffec linkw %fp,#-20 4ae1e: 206e 0008 moveal %fp@(8),%a0 4ae22: 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 ];
4ae26: 2468 0108 moveal %a0@(264),%a2
if ( !api )
4ae2a: 4a8a tstl %a2 4ae2c: 671a beqs 4ae48 <_RTEMS_tasks_Post_switch_extension+0x2e>
* Signal Processing */ asr = &api->Signal; _ISR_Disable( level );
4ae2e: 203c 0000 0700 movel #1792,%d0 4ae34: 40c1 movew %sr,%d1 4ae36: 8081 orl %d1,%d0 4ae38: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4ae3a: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4ae3e: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4ae42: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4ae44: 4a82 tstl %d2 4ae46: 660a bnes 4ae52 <_RTEMS_tasks_Post_switch_extension+0x38>
(*asr->handler)( signal_set ); asr->nest_level -= 1; rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode ); }
4ae48: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4ae4e: 4e5e unlk %fp <== NOT EXECUTED 4ae50: 4e75 rts <== NOT EXECUTED
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */ return; asr->nest_level += 1;
4ae52: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ae56: 260e movel %fp,%d3 4ae58: 5983 subql #4,%d3 4ae5a: 47f9 0004 cd88 lea 4cd88 <rtems_task_mode>,%a3 4ae60: 2f03 movel %d3,%sp@- 4ae62: 2f3c 0000 ffff movel #65535,%sp@- 4ae68: 2f2a 000e movel %a2@(14),%sp@- 4ae6c: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4ae6e: 2f02 movel %d2,%sp@- 4ae70: 206a 000a moveal %a2@(10),%a0 4ae74: 4e90 jsr %a0@
asr->nest_level -= 1;
4ae76: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4ae7a: 2f03 movel %d3,%sp@- 4ae7c: 2f3c 0000 ffff movel #65535,%sp@- 4ae82: 2f2e fffc movel %fp@(-4),%sp@- 4ae86: 4e93 jsr %a3@ 4ae88: 4fef 001c lea %sp@(28),%sp
}
4ae8c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4ae92: 4e5e unlk %fp <== NOT EXECUTED
0004856c <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) {
4856c: 4e56 0000 linkw %fp,#0 48570: 2039 0006 7fb8 movel 67fb8 <_Thread_Dispatch_disable_level>,%d0 48576: 5280 addql #1,%d0 48578: 2f0a movel %a2,%sp@- 4857a: 246e 0008 moveal %fp@(8),%a2 4857e: 23c0 0006 7fb8 movel %d0,67fb8 <_Thread_Dispatch_disable_level>
long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch();
48584: 2039 0006 804a movel 6804a <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
4858a: 2212 movel %a2@,%d1 4858c: b280 cmpl %d0,%d1 4858e: 6d38 blts 485c8 <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
48590: 9280 subl %d0,%d1 48592: 2f01 movel %d1,%sp@- 48594: 42a7 clrl %sp@- 48596: 4879 0006 8084 pea 68084 <_Watchdog_Seconds_chain> 4859c: 4eb9 0004 ab6c jsr 4ab6c <_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 );
485a2: 23d2 0006 804a movel %a2@,6804a <_TOD_Now> 485a8: 588a addql #4,%a2 485aa: 4fef 000c lea %sp@(12),%sp 485ae: 23d2 0006 804e movel %a2@,6804e <_TOD_Now+0x4>
_TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); }
485b4: 246e fffc moveal %fp@(-4),%a2 485b8: 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;
485ba: 7001 moveq #1,%d0 485bc: 13c0 0006 7fcc moveb %d0,67fcc <_TOD_Is_set>
_TOD_Activate(); _Thread_Enable_dispatch();
485c2: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch> 485c8: 9081 subl %d1,%d0 485ca: 2f00 movel %d0,%sp@- 485cc: 4878 0001 pea 1 <ADD> 485d0: 4879 0006 8084 pea 68084 <_Watchdog_Seconds_chain> 485d6: 4eb9 0004 ab6c jsr 4ab6c <_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 );
485dc: 23d2 0006 804a movel %a2@,6804a <_TOD_Now> 485e2: 588a addql #4,%a2 485e4: 4fef 000c lea %sp@(12),%sp 485e8: 23d2 0006 804e movel %a2@,6804e <_TOD_Now+0x4>
_TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); }
485ee: 246e fffc moveal %fp@(-4),%a2 485f2: 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;
485f4: 7001 moveq #1,%d0 485f6: 13c0 0006 7fcc moveb %d0,67fcc <_TOD_Is_set>
_TOD_Activate(); _Thread_Enable_dispatch();
485fc: 4ef9 0004 9880 jmp 49880 <_Thread_Enable_dispatch>
... 00047968 <_Thread_Clear_state>: ) { ISR_Level level; States_Control current_state; _ISR_Disable( level );
47968: 327c 0700 moveaw #1792,%a1 4796c: 2009 movel %a1,%d0
void _Thread_Clear_state( Thread_Control *the_thread, States_Control state ) {
4796e: 4e56 ffec linkw %fp,#-20 47972: 206e 0008 moveal %fp@(8),%a0 47976: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4797a: 242e 000c movel %fp@(12),%d2
ISR_Level level; States_Control current_state; _ISR_Disable( level );
4797e: 40c3 movew %sr,%d3 47980: 8083 orl %d3,%d0 47982: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
47984: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
47988: 2002 movel %d2,%d0 4798a: c081 andl %d1,%d0 4798c: 6776 beqs 47a04 <_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);
4798e: 2002 movel %d2,%d0 47990: 4680 notl %d0 47992: c081 andl %d1,%d0
current_state =
47994: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear( state, current_state ); if ( _States_Is_ready( current_state ) ) {
47998: 666a bnes 47a04 <_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;
4799a: 2868 008e moveal %a0@(142),%a4 4799e: 3028 0094 movew %a0@(148),%d0 479a2: 3214 movew %a4@,%d1
_Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
479a4: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
479a8: 240a movel %a2,%d2 479aa: 5882 addql #4,%d2 479ac: 8081 orl %d1,%d0 479ae: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
479b0: 266a 0008 moveal %a2@(8),%a3 479b4: 3880 movew %d0,%a4@
the_chain->last = the_node;
479b6: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
479ba: 3239 0005 da78 movew 5da78 <_Priority_Major_bit_map>,%d1 479c0: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
479c4: 214b 0004 movel %a3,%a0@(4) 479c8: 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;
479ca: 2688 movel %a0,%a3@ 479cc: 33c0 0005 da78 movew %d0,5da78 <_Priority_Major_bit_map>
_ISR_Flash( level );
479d2: 2009 movel %a1,%d0 479d4: 46c3 movew %d3,%sr 479d6: 8083 orl %d3,%d0 479d8: 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 ) {
479da: 2028 0014 movel %a0@(20),%d0 479de: 2279 0005 da56 moveal 5da56 <_Thread_Heir>,%a1 479e4: b0a9 0014 cmpl %a1@(20),%d0 479e8: 641a bccs 47a04 <_Thread_Clear_state+0x9c>
_Thread_Heir = the_thread;
479ea: 23c8 0005 da56 movel %a0,5da56 <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
479f0: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0 479f6: 4a28 0075 tstb %a0@(117) 479fa: 6712 beqs 47a0e <_Thread_Clear_state+0xa6>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
479fc: 7001 moveq #1,%d0 479fe: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
} } } _ISR_Enable( level );
47a04: 46c3 movew %d3,%sr
}
47a06: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 47a0a: 4e5e unlk %fp 47a0c: 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 ||
47a0e: 4a80 tstl %d0 47a10: 66f2 bnes 47a04 <_Thread_Clear_state+0x9c>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
47a12: 7001 moveq #1,%d0 <== NOT EXECUTED 47a14: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED 47a1a: 60e8 bras 47a04 <_Thread_Clear_state+0x9c> <== NOT EXECUTED
00047a1c <_Thread_Close>:
47a1c: 4280 clrl %d0
void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) {
47a1e: 4e56 0000 linkw %fp,#0 47a22: 2f0b movel %a3,%sp@- 47a24: 266e 0008 moveal %fp@(8),%a3 47a28: 2f0a movel %a2,%sp@- 47a2a: 246e 000c moveal %fp@(12),%a2 47a2e: 206b 0018 moveal %a3@(24),%a0 47a32: 302a 000a movew %a2@(10),%d0 47a36: 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;
47a3a: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47a40: 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 );
47a42: 2f0a movel %a2,%sp@- 47a44: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 47a4a: 4eb9 0004 8d50 jsr 48d50 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
47a50: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47a56: 5280 addql #1,%d0 47a58: 23c0 0005 d9c8 movel %d0,5d9c8 <_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 );
47a5e: 2f0a movel %a2,%sp@- 47a60: 2f0b movel %a3,%sp@- 47a62: 4eb9 0004 70c4 jsr 470c4 <_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 );
47a68: 4878 0001 pea 1 <ADD> 47a6c: 2f0a movel %a2,%sp@- 47a6e: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
47a74: 2f0a movel %a2,%sp@- 47a76: 4eb9 0004 8424 jsr 48424 <_Thread_queue_Extract_with_proxy> 47a7c: 4fef 0018 lea %sp@(24),%sp 47a80: 4a00 tstb %d0 47a82: 6608 bnes 47a8c <_Thread_Close+0x70>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
47a84: 7002 moveq #2,%d0 47a86: b0aa 0050 cmpl %a2@(80),%d0 47a8a: 6756 beqs 47ae2 <_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 ) )
47a8c: b5f9 0005 da4e cmpal 5da4e <_Thread_Allocated_fp>,%a2 47a92: 6746 beqs 47ada <_Thread_Close+0xbe>
_Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context )
47a94: 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;
47a98: 42aa 0100 clrl %a2@(256)
if ( the_thread->Start.fp_context )
47a9c: 4a80 tstl %d0 47a9e: 670a beqs 47aaa <_Thread_Close+0x8e>
(void) _Workspace_Free( the_thread->Start.fp_context );
47aa0: 2f00 movel %d0,%sp@- 47aa2: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47aa8: 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 );
47aaa: 2f0a movel %a2,%sp@- 47aac: 4eb9 0004 8814 jsr 48814 <_Thread_Stack_Free>
the_thread->Start.stack = NULL; if ( the_thread->extensions )
47ab2: 202a 0114 movel %a2@(276),%d0 47ab6: 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;
47ab8: 42aa 00c8 clrl %a2@(200)
if ( the_thread->extensions )
47abc: 4a80 tstl %d0 47abe: 670a beqs 47aca <_Thread_Close+0xae>
(void) _Workspace_Free( the_thread->extensions );
47ac0: 2f00 movel %d0,%sp@- 47ac2: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47ac8: 588f addql #4,%sp
the_thread->extensions = NULL;
47aca: 42aa 0114 clrl %a2@(276)
}
47ace: 246e fff8 moveal %fp@(-8),%a2 47ad2: 266e fffc moveal %fp@(-4),%a3 47ad6: 4e5e unlk %fp 47ad8: 4e75 rts
*/ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL;
47ada: 42b9 0005 da4e clrl 5da4e <_Thread_Allocated_fp> 47ae0: 60b2 bras 47a94 <_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 );
47ae2: 486a 0048 pea %a2@(72) 47ae6: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 47aec: 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 ) )
47aee: b5f9 0005 da4e cmpal 5da4e <_Thread_Allocated_fp>,%a2 47af4: 669e bnes 47a94 <_Thread_Close+0x78>
47af6: 60e2 bras 47ada <_Thread_Close+0xbe> <== NOT EXECUTED
00047d3c <_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 ) {
47d3c: 4e56 0000 linkw %fp,#0
if ( --_Thread_Dispatch_disable_level )
47d40: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47d46: 5380 subql #1,%d0 47d48: 23c0 0005 d9c8 movel %d0,5d9c8 <_Thread_Dispatch_disable_level> 47d4e: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 47d54: 6704 beqs 47d5a <_Thread_Enable_dispatch+0x1e>
return; _Thread_Dispatch(); }
47d56: 4e5e unlk %fp 47d58: 4e75 rts 47d5a: 4e5e unlk %fp
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) ) void _Thread_Enable_dispatch( void ) { if ( --_Thread_Dispatch_disable_level ) return; _Thread_Dispatch();
47d5c: 4ef9 0004 7be4 jmp 47be4 <_Thread_Dispatch>
... 0004d208 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) {
4d208: 4e56 0000 linkw %fp,#0 4d20c: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing;
4d20e: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
* * Output parameters: NONE */ void _Thread_Handler( void ) {
4d214: 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;
4d216: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
4d21a: 40c0 movew %sr,%d0 4d21c: e189 lsll #8,%d1 4d21e: 0280 0000 f8ff andil #63743,%d0 4d224: 8081 orl %d1,%d0 4d226: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1;
4d228: 7001 moveq #1,%d0
level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors;
4d22a: 1439 0005 d17c moveb 5d17c <doneConstructors.3595>,%d2
doneConstructors = 1;
4d230: 13c0 0005 d17c moveb %d0,5d17c <doneConstructors.3595>
#endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) &&
4d236: 4aaa 0100 tstl %a2@(256) 4d23a: 6720 beqs 4d25c <_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 );
4d23c: 2079 0005 da4e moveal 5da4e <_Thread_Allocated_fp>,%a0 4d242: b1ca cmpal %a2,%a0 4d244: 6716 beqs 4d25c <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL )
4d246: 4a88 tstl %a0 4d248: 670c beqs 4d256 <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4d24a: 4868 0100 pea %a0@(256) 4d24e: 4eb9 0004 9286 jsr 49286 <_CPU_Context_save_fp> 4d254: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4d256: 23ca 0005 da4e movel %a2,5da4e <_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 );
4d25c: 2f0a movel %a2,%sp@- 4d25e: 4eb9 0004 8c34 jsr 48c34 <_User_extensions_Thread_begin>
/* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch();
4d264: 4eb9 0004 7d3c jsr 47d3c <_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) */ {
4d26a: 588f addql #4,%sp 4d26c: 4a02 tstb %d2 4d26e: 6746 beqs 4d2b6 <_Thread_Handler+0xae>
INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d270: 4aaa 009e tstl %a2@(158) 4d274: 6718 beqs 4d28e <_Thread_Handler+0x86>
* 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 );
4d276: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d278: 4eb9 0004 8c72 jsr 48c72 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4d27e: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 4d282: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4d286: 42a7 clrl %sp@- <== NOT EXECUTED 4d288: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred> <== NOT EXECUTED
} #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)(
4d28e: 2f2a 00a6 movel %a2@(166),%sp@- 4d292: 206a 009a moveal %a2@(154),%a0 4d296: 4e90 jsr %a0@
INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument =
4d298: 588f addql #4,%sp 4d29a: 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 );
4d29e: 2f0a movel %a2,%sp@- 4d2a0: 4eb9 0004 8c72 jsr 48c72 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4d2a6: 4878 0006 pea 6 <EXTENDSFDF> 4d2aa: 4878 0001 pea 1 <ADD> 4d2ae: 42a7 clrl %sp@- 4d2b0: 4eb9 0004 6f70 jsr 46f70 <_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 ();
4d2b6: 4eb9 0005 a8c4 jsr 5a8c4 <_init>
} #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4d2bc: 4aaa 009e tstl %a2@(158) 4d2c0: 66b4 bnes 4d276 <_Thread_Handler+0x6e> 4d2c2: 60ca bras 4d28e <_Thread_Handler+0x86>
00047fd0 <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) {
47fd0: 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)
47fd4: 4ab9 0005 c2b8 tstl 5c2b8 <Configuration+0x24> 47fda: 57c0 seq %d0 47fdc: 4ab9 0005 c2b4 tstl 5c2b4 <Configuration+0x20> 47fe2: 57c1 seq %d1 47fe4: 4480 negl %d0 47fe6: 4481 negl %d1 47fe8: b380 eorl %d1,%d0
uint32_t maximum_extensions; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice;
47fea: 2239 0005 c2a4 movel 5c2a4 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
47ff0: 2079 0005 c29c moveal 5c29c <Configuration+0x8>,%a0
* * Output parameters: NONE */ void _Thread_Handler_initialization(void) {
47ff6: 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)
47ff8: 4a00 tstb %d0 47ffa: 6600 00a2 bnew 4809e <_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(
47ffe: 4280 clrl %d0 48000: 1039 0005 c292 moveb 5c292 <rtems_maximum_priority>,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48006: 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(
48008: 5280 addql #1,%d0
_Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; _Thread_Ticks_per_timeslice = ticks_per_timeslice;
4800a: 23c1 0005 d978 movel %d1,5d978 <_Thread_Ticks_per_timeslice>
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48010: 2200 movel %d0,%d1 48012: e588 lsll #2,%d0 48014: e989 lsll #4,%d1
_Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions;
48016: 23c8 0005 da66 movel %a0,5da66 <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice; _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
4801c: 9280 subl %d0,%d1
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
4801e: 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(
48020: 2f01 movel %d1,%sp@-
INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = false;
48022: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
_Thread_Executing = NULL;
48028: 42b9 0005 da82 clrl 5da82 <_Thread_Executing>
_Thread_Heir = NULL;
4802e: 42b9 0005 da56 clrl 5da56 <_Thread_Heir>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL;
48034: 42b9 0005 da4e clrl 5da4e <_Thread_Allocated_fp>
#endif _Thread_Do_post_task_switch_extension = 0;
4803a: 42b9 0005 da6a clrl 5da6a <_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(
48040: 4eb9 0004 9080 jsr 49080 <_Workspace_Allocate_or_fatal_error>
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48046: 588f addql #4,%sp 48048: 1439 0005 c292 moveb 5c292 <rtems_maximum_priority>,%d2 4804e: 2040 moveal %d0,%a0 48050: 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(
48052: 23c0 0005 d974 movel %d0,5d974 <_Thread_Ready_chain>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
48058: 2008 movel %a0,%d0 4805a: 5880 addql #4,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
4805c: 5281 addql #1,%d1 4805e: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
48060: 42a8 0004 clrl %a0@(4)
the_chain->last = _Chain_Head(the_chain);
48064: 2148 0008 movel %a0,%a0@(8) 48068: 41e8 000c lea %a0@(12),%a0 4806c: b481 cmpl %d1,%d2 4806e: 64e8 bccs 48058 <_Thread_Handler_initialization+0x88>
/* * Initialize this class of objects. */ _Objects_Initialize_information(
48070: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 48074: 42a7 clrl %sp@- 48076: 4878 011c pea 11c <DBL_MANT_DIG+0xe7> 4807a: 4878 0001 pea 1 <ADD> 4807e: 4878 0001 pea 1 <ADD> 48082: 4878 0001 pea 1 <ADD> 48086: 4879 0005 db12 pea 5db12 <_Thread_Internal_information> 4808c: 4eb9 0004 753c jsr 4753c <_Objects_Initialize_information>
false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
48092: 242e fffc movel %fp@(-4),%d2
/* * Initialize this class of objects. */ _Objects_Initialize_information(
48096: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); }
4809a: 4e5e unlk %fp 4809c: 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(
4809e: 4878 000f pea f <FPTRAP> 480a2: 4878 0001 pea 1 <ADD> 480a6: 42a7 clrl %sp@- 480a8: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
... 00047e00 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
47e00: 4e56 ffec linkw %fp,#-20 47e04: 48d7 043c moveml %d2-%d5/%a2,%sp@ 47e08: 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 );
47e0c: 2f02 movel %d2,%sp@-
Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
47e0e: 246e 000c moveal %fp@(12),%a2 47e12: 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;
47e16: 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 ) {
47e1a: 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;
47e1e: 42aa 010c clrl %a2@(268) 47e22: 42aa 0110 clrl %a2@(272)
extensions_area = NULL; the_thread->libc_reent = NULL;
47e26: 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 );
47e2a: 2f0a movel %a2,%sp@-
Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) {
47e2c: 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 );
47e30: 4eb9 0004 87b0 jsr 487b0 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
47e36: 508f addql #8,%sp 47e38: 4a80 tstl %d0 47e3a: 6700 011e beqw 47f5a <_Thread_Initialize+0x15a> 47e3e: b082 cmpl %d2,%d0 47e40: 6500 0118 bcsw 47f5a <_Thread_Initialize+0x15a>
void *starting_address, size_t size ) { the_stack->area = starting_address; the_stack->size = size;
47e44: 2540 00bc movel %d0,%a2@(188)
Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address;
47e48: 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 ) {
47e4e: 4a04 tstb %d4 47e50: 6600 0120 bnew 47f72 <_Thread_Initialize+0x172> 47e54: 4280 clrl %d0 47e56: 4284 clrl %d4
#endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) {
47e58: 2239 0005 da66 movel 5da66 <_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;
47e5e: 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;
47e62: 2540 0100 movel %d0,%a2@(256)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
47e66: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
47e6a: 42aa 0064 clrl %a2@(100)
the_watchdog->id = id;
47e6e: 42aa 0068 clrl %a2@(104)
the_watchdog->user_data = user_data;
47e72: 42aa 006c clrl %a2@(108)
#endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) {
47e76: 4a81 tstl %d1 47e78: 6600 011a bnew 47f94 <_Thread_Initialize+0x194>
(_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area;
47e7c: 42aa 0114 clrl %a2@(276) 47e80: 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 );
47e82: 2f03 movel %d3,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level;
47e84: 256e 002c 00b4 movel %fp@(44),%a2@(180)
the_thread->current_state = STATES_DORMANT;
47e8a: 7001 moveq #1,%d0
/* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm;
47e8c: 256e 0024 00ac movel %fp@(36),%a2@(172)
the_thread->Start.budget_callout = budget_callout;
47e92: 256e 0028 00b0 movel %fp@(40),%a2@(176)
/* * General initialization */ the_thread->Start.is_preemptible = is_preemptible;
47e98: 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 );
47e9c: 2f0a movel %a2,%sp@-
#endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT;
47e9e: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
47ea2: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
47ea6: 42aa 001c clrl %a2@(28)
#if defined(RTEMS_ITRON_API) the_thread->suspend_count = 0; #endif the_thread->real_priority = priority;
47eaa: 2543 0018 movel %d3,%a2@(24)
the_thread->Start.initial_priority = priority;
47eae: 2543 00b8 movel %d3,%a2@(184)
_Thread_Set_priority( the_thread, priority );
47eb2: 4eb9 0004 85a8 jsr 485a8 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
47eb8: 206e 0008 moveal %fp@(8),%a0 47ebc: 4280 clrl %d0
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
47ebe: 256e 0030 000c movel %fp@(48),%a2@(12)
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
47ec4: 2068 0018 moveal %a0@(24),%a0 47ec8: 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 );
47ecc: 42aa 0082 clrl %a2@(130) 47ed0: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 47ed4: 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 );
47ed8: 2f0a movel %a2,%sp@- 47eda: 4eb9 0004 8d04 jsr 48d04 <_User_extensions_Thread_create>
if ( extension_status )
47ee0: 4fef 000c lea %sp@(12),%sp 47ee4: 4a00 tstb %d0 47ee6: 667e bnes 47f66 <_Thread_Initialize+0x166>
return true; failed: if ( the_thread->libc_reent )
47ee8: 202a 0104 movel %a2@(260),%d0 47eec: 670a beqs 47ef8 <_Thread_Initialize+0xf8>
_Workspace_Free( the_thread->libc_reent );
47eee: 2f00 movel %d0,%sp@- 47ef0: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47ef6: 588f addql #4,%sp
for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] )
47ef8: 202a 0108 movel %a2@(264),%d0 47efc: 670a beqs 47f08 <_Thread_Initialize+0x108>
_Workspace_Free( the_thread->API_Extensions[i] );
47efe: 2f00 movel %d0,%sp@- 47f00: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f06: 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] )
47f08: 202a 010c movel %a2@(268),%d0 47f0c: 670a beqs 47f18 <_Thread_Initialize+0x118>
_Workspace_Free( the_thread->API_Extensions[i] );
47f0e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47f10: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> <== NOT EXECUTED 47f16: 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] )
47f18: 202a 0110 movel %a2@(272),%d0 47f1c: 670a beqs 47f28 <_Thread_Initialize+0x128>
_Workspace_Free( the_thread->API_Extensions[i] );
47f1e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47f20: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> <== NOT EXECUTED 47f26: 588f addql #4,%sp <== NOT EXECUTED
if ( extensions_area )
47f28: 4a82 tstl %d2 47f2a: 670a beqs 47f36 <_Thread_Initialize+0x136>
(void) _Workspace_Free( extensions_area );
47f2c: 2f02 movel %d2,%sp@- 47f2e: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f34: 588f addql #4,%sp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area )
47f36: 4a84 tstl %d4 47f38: 670a beqs 47f44 <_Thread_Initialize+0x144>
(void) _Workspace_Free( fp_area );
47f3a: 2f04 movel %d4,%sp@- 47f3c: 4eb9 0004 90d0 jsr 490d0 <_Workspace_Free> 47f42: 588f addql #4,%sp
#endif _Thread_Stack_Free( the_thread );
47f44: 2f0a movel %a2,%sp@- 47f46: 4eb9 0004 8814 jsr 48814 <_Thread_Stack_Free>
return false;
47f4c: 588f addql #4,%sp
}
47f4e: 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 );
47f54: 4200 clrb %d0
return false; }
47f56: 4e5e unlk %fp 47f58: 4e75 rts 47f5a: 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;
47f60: 4200 clrb %d0
}
47f62: 4e5e unlk %fp 47f64: 4e75 rts 47f66: 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 )
47f6c: 7001 moveq #1,%d0
_Thread_Stack_Free( the_thread ); return false; }
47f6e: 4e5e unlk %fp 47f70: 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 );
47f72: 4878 001c pea 1c <OPER2+0x8> 47f76: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
if ( !fp_area )
47f7c: 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 );
47f7e: 2800 movel %d0,%d4
if ( !fp_area )
47f80: 6600 fed6 bnew 47e58 <_Thread_Initialize+0x58>
extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent )
47f84: 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 )
47f88: 4282 clrl %d2
extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent )
47f8a: 4a80 tstl %d0 47f8c: 6600 ff60 bnew 47eee <_Thread_Initialize+0xee> 47f90: 6000 ff66 braw 47ef8 <_Thread_Initialize+0xf8>
/* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate(
47f94: e589 lsll #2,%d1 47f96: 2041 moveal %d1,%a0 47f98: 4868 0004 pea %a0@(4) 47f9c: 4eb9 0004 90b4 jsr 490b4 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area )
47fa2: 588f addql #4,%sp
/* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate(
47fa4: 2400 movel %d0,%d2
(_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area )
47fa6: 6700 ff40 beqw 47ee8 <_Thread_Initialize+0xe8>
goto failed; } the_thread->extensions = (void **) extensions_area;
47faa: 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++ )
47fac: 4281 clrl %d1 47fae: 4280 clrl %d0 47fb0: 2279 0005 da66 moveal 5da66 <_Thread_Maximum_extensions>,%a1
(_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area;
47fb6: 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;
47fba: 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++ )
47fbe: 5280 addql #1,%d0 47fc0: 2200 movel %d0,%d1 47fc2: b089 cmpl %a1,%d0 47fc4: 6200 febc bhiw 47e82 <_Thread_Initialize+0x82> 47fc8: 206a 0114 moveal %a2@(276),%a0 47fcc: 60ec bras 47fba <_Thread_Initialize+0x1ba>
... 0004c7bc <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
4c7bc: 4e56 0000 linkw %fp,#0 4c7c0: 2f0a movel %a2,%sp@- 4c7c2: 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;
4c7c6: 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;
4c7cc: 256a 00ac 007a movel %a2@(172),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4c7d2: 256a 00b0 007e movel %a2@(176),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4c7d8: 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;
4c7de: 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;
4c7e4: 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 ) ) {
4c7e8: 2f0a movel %a2,%sp@- 4c7ea: 4eb9 0004 9038 jsr 49038 <_Thread_queue_Extract_with_proxy> 4c7f0: 588f addql #4,%sp 4c7f2: 4a00 tstb %d0 4c7f4: 6608 bnes 4c7fe <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4c7f6: 7002 moveq #2,%d0 4c7f8: b0aa 0050 cmpl %a2@(80),%d0 4c7fc: 672a beqs 4c828 <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4c7fe: 202a 00b8 movel %a2@(184),%d0 4c802: b0aa 0014 cmpl %a2@(20),%d0 4c806: 6718 beqs 4c820 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4c808: 2d4a 0008 movel %a2,%fp@(8) 4c80c: 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;
4c810: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); } }
4c814: 246e fffc moveal %fp@(-4),%a2 4c818: 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 );
4c81a: 4ef9 0004 9248 jmp 49248 <_Thread_Set_priority>
} }
4c820: 246e fffc moveal %fp@(-4),%a2 4c824: 4e5e unlk %fp 4c826: 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 );
4c828: 486a 0048 pea %a2@(72) 4c82c: 4eb9 0004 9c48 jsr 49c48 <_Watchdog_Remove> 4c832: 588f addql #4,%sp 4c834: 60c8 bras 4c7fe <_Thread_Reset+0x42>
... 0004bad8 <_Thread_Reset_timeslice>: Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level );
4bad8: 223c 0000 0700 movel #1792,%d1 4bade: 2001 movel %d1,%d0
* ready chain * select heir */ void _Thread_Reset_timeslice( void ) {
4bae0: 4e56 fff4 linkw %fp,#-12
ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing;
4bae4: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0
* ready chain * select heir */ void _Thread_Reset_timeslice( void ) {
4baea: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready;
4baee: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
4baf2: 40c2 movew %sr,%d2 4baf4: 8082 orl %d2,%d0 4baf6: 46c0 movew %d0,%sr
if ( _Chain_Has_only_one_node( ready ) ) {
4baf8: 2029 0008 movel %a1@(8),%d0 4bafc: b091 cmpl %a1@,%d0 4bafe: 6752 beqs 4bb52 <_Thread_Reset_timeslice+0x7a>
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
4bb00: 2450 moveal %a0@,%a2
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
4bb02: 2009 movel %a1,%d0 4bb04: 5880 addql #4,%d0
{ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous;
4bb06: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
4bb0a: 268a movel %a2,%a3@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
4bb0c: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
4bb10: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
4bb12: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
4bb16: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4bb1a: 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;
4bb1e: 2488 movel %a0,%a2@
return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level );
4bb20: 46c2 movew %d2,%sr 4bb22: 8282 orl %d2,%d1 4bb24: 46c1 movew %d1,%sr
if ( _Thread_Is_heir( executing ) )
4bb26: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 4bb2c: 6712 beqs 4bb40 <_Thread_Reset_timeslice+0x68>
_Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true;
4bb2e: 7001 moveq #1,%d0 <== NOT EXECUTED 4bb30: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
4bb36: 46c2 movew %d2,%sr <== NOT EXECUTED
}
4bb38: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4bb3c: 4e5e unlk %fp 4bb3e: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first;
4bb40: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir>
_Context_Switch_necessary = true;
4bb46: 7001 moveq #1,%d0 4bb48: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary>
_ISR_Enable( level );
4bb4e: 46c2 movew %d2,%sr 4bb50: 60e6 bras 4bb38 <_Thread_Reset_timeslice+0x60>
executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level ); if ( _Chain_Has_only_one_node( ready ) ) { _ISR_Enable( level );
4bb52: 46c2 movew %d2,%sr
_Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; _ISR_Enable( level ); }
4bb54: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
4bb58: 4e5e unlk %fp <== NOT EXECUTED
000491bc <_Thread_Restart>: Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) {
491bc: 7001 moveq #1,%d0
bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) {
491be: 4e56 0000 linkw %fp,#0 491c2: 2f0a movel %a2,%sp@- 491c4: 246e 0008 moveal %fp@(8),%a2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
491c8: c0aa 0010 andl %a2@(16),%d0 491cc: 4a00 tstb %d0 491ce: 670a beqs 491da <_Thread_Restart+0x1e>
return true; } return false; }
491d0: 246e fffc moveal %fp@(-4),%a2 491d4: 4e5e unlk %fp
Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) {
491d6: 4200 clrb %d0
return true; } return false; }
491d8: 4e75 rts
Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread );
491da: 2f0a movel %a2,%sp@- 491dc: 4eb9 0004 93cc jsr 493cc <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
491e2: 2f2e 0010 movel %fp@(16),%sp@- 491e6: 2f2e 000c movel %fp@(12),%sp@- 491ea: 2f0a movel %a2,%sp@- 491ec: 4eb9 0004 c7bc jsr 4c7bc <_Thread_Reset>
_Thread_Load_environment( the_thread );
491f2: 2f0a movel %a2,%sp@- 491f4: 4eb9 0004 c410 jsr 4c410 <_Thread_Load_environment>
_Thread_Ready( the_thread );
491fa: 2f0a movel %a2,%sp@- 491fc: 4eb9 0004 c6fc jsr 4c6fc <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
49202: 2f0a movel %a2,%sp@- 49204: 4eb9 0004 9a38 jsr 49a38 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
4920a: 4fef 001c lea %sp@(28),%sp 4920e: b5f9 0005 ea1a cmpal 5ea1a <_Thread_Executing>,%a2 49214: 670a beqs 49220 <_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 );
49216: 7001 moveq #1,%d0
return true; } return false; }
49218: 246e fffc moveal %fp@(-4),%a2 4921c: 4e5e unlk %fp 4921e: 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 )
49220: 4aaa 0100 tstl %a2@(256) 49224: 6712 beqs 49238 <_Thread_Restart+0x7c>
_Context_Restore_fp( &_Thread_Executing->fp_context );
49226: 486a 0100 pea %a2@(256) 4922a: 4eb9 0004 9fa2 jsr 49fa2 <_CPU_Context_restore_fp> 49230: 2479 0005 ea1a moveal 5ea1a <_Thread_Executing>,%a2 49236: 588f addql #4,%sp
#endif _CPU_Context_Restart_self( &_Thread_Executing->Registers );
49238: 486a 00cc pea %a2@(204) 4923c: 4eb9 0004 9e4a jsr 49e4a <_CPU_Context_Restart_self>
49242: 588f addql #4,%sp <== NOT EXECUTED 49244: 7001 moveq #1,%d0 <== NOT EXECUTED 49246: 60d0 bras 49218 <_Thread_Restart+0x5c> <== NOT EXECUTED
0004c66c <_Thread_Resume>: { ISR_Level level; States_Control current_state; _ISR_Disable( level );
4c66c: 327c 0700 moveaw #1792,%a1 4c670: 2009 movel %a1,%d0
void _Thread_Resume( Thread_Control *the_thread, bool force ) {
4c672: 4e56 ffec linkw %fp,#-20 4c676: 206e 0008 moveal %fp@(8),%a0 4c67a: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
ISR_Level level; States_Control current_state; _ISR_Disable( level );
4c67e: 40c1 movew %sr,%d1 4c680: 8081 orl %d1,%d0 4c682: 46c0 movew %d0,%sr
_ISR_Enable( level ); return; } #endif current_state = the_thread->current_state;
4c684: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4c688: 0800 0001 btst #1,%d0 4c68c: 6774 beqs 4c702 <_Thread_Resume+0x96> 4c68e: 74fd moveq #-3,%d2 4c690: c082 andl %d2,%d0
current_state =
4c692: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) {
4c696: 666a bnes 4c702 <_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;
4c698: 2868 008e moveal %a0@(142),%a4 4c69c: 3028 0094 movew %a0@(148),%d0 4c6a0: 3414 movew %a4@,%d2
_Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4c6a2: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
4c6a6: 260a movel %a2,%d3 4c6a8: 5883 addql #4,%d3 4c6aa: 8082 orl %d2,%d0 4c6ac: 2083 movel %d3,%a0@
old_last_node = the_chain->last;
4c6ae: 266a 0008 moveal %a2@(8),%a3 4c6b2: 3880 movew %d0,%a4@
the_chain->last = the_node;
4c6b4: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c6b8: 3439 0006 3640 movew 63640 <_Priority_Major_bit_map>,%d2 4c6be: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
4c6c2: 214b 0004 movel %a3,%a0@(4) 4c6c6: 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;
4c6c8: 2688 movel %a0,%a3@ 4c6ca: 33c0 0006 3640 movew %d0,63640 <_Priority_Major_bit_map>
_ISR_Flash( level );
4c6d0: 2009 movel %a1,%d0 4c6d2: 46c1 movew %d1,%sr 4c6d4: 8081 orl %d1,%d0 4c6d6: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4c6d8: 2028 0014 movel %a0@(20),%d0 4c6dc: 2279 0006 361e moveal 6361e <_Thread_Heir>,%a1 4c6e2: b0a9 0014 cmpl %a1@(20),%d0 4c6e6: 641a bccs 4c702 <_Thread_Resume+0x96>
_Thread_Heir = the_thread;
4c6e8: 23c8 0006 361e movel %a0,6361e <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
4c6ee: 2079 0006 364a moveal 6364a <_Thread_Executing>,%a0 4c6f4: 4a28 0075 tstb %a0@(117) 4c6f8: 6712 beqs 4c70c <_Thread_Resume+0xa0>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
4c6fa: 7001 moveq #1,%d0 4c6fc: 13c0 0006 365a moveb %d0,6365a <_Context_Switch_necessary>
} } } _ISR_Enable( level );
4c702: 46c1 movew %d1,%sr
}
4c704: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c708: 4e5e unlk %fp 4c70a: 4e75 rts
_ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible ||
4c70c: 4a80 tstl %d0 4c70e: 66f2 bnes 4c702 <_Thread_Resume+0x96>
the_thread->current_priority == 0 ) _Context_Switch_necessary = true;
4c710: 7001 moveq #1,%d0 <== NOT EXECUTED 4c712: 13c0 0006 365a moveb %d0,6365a <_Context_Switch_necessary> <== NOT EXECUTED 4c718: 60e8 bras 4c702 <_Thread_Resume+0x96> <== NOT EXECUTED
... 00048814 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) {
48814: 4e56 0000 linkw %fp,#0 48818: 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 )
4881c: 2279 0005 c2b8 moveal 5c2b8 <Configuration+0x24>,%a1 48822: 4a89 tstl %a1 48824: 670a beqs 48830 <_Thread_Stack_Free+0x1c>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
48826: 2d68 00c0 0008 movel %a0@(192),%fp@(8)
else _Workspace_Free( the_thread->Start.Initial_stack.area ); }
4882c: 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 );
4882e: 4ed1 jmp %a1@
else _Workspace_Free( the_thread->Start.Initial_stack.area );
48830: 2d68 00c0 0008 movel %a0@(192),%fp@(8)
}
48836: 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 );
48838: 4ef9 0004 90d0 jmp 490d0 <_Workspace_Free>
... 00048a48 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) {
48a48: 4e56 fff4 linkw %fp,#-12
ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing;
48a4c: 2079 0005 da82 moveal 5da82 <_Thread_Executing>,%a0
* ready chain * select heir */ void _Thread_Yield_processor( void ) {
48a52: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready; _ISR_Disable( level );
48a56: 243c 0000 0700 movel #1792,%d2 48a5c: 2002 movel %d2,%d0
ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; ready = executing->ready;
48a5e: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
48a62: 40c1 movew %sr,%d1 48a64: 8081 orl %d1,%d0 48a66: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
48a68: 2029 0008 movel %a1@(8),%d0 48a6c: b091 cmpl %a1@,%d0 48a6e: 6750 beqs 48ac0 <_Thread_Yield_processor+0x78>
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
48a70: 2450 moveal %a0@,%a2
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
48a72: 2009 movel %a1,%d0 48a74: 5880 addql #4,%d0
{ Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous;
48a76: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
48a7a: 268a movel %a2,%a3@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
48a7c: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
48a80: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
48a82: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
48a86: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
48a8a: 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;
48a8e: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level );
48a90: 46c1 movew %d1,%sr 48a92: 8481 orl %d1,%d2 48a94: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
48a96: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 48a9c: 6712 beqs 48ab0 <_Thread_Yield_processor+0x68>
_Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true;
48a9e: 7001 moveq #1,%d0 <== NOT EXECUTED 48aa0: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
48aa6: 46c1 movew %d1,%sr
}
48aa8: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 48aac: 4e5e unlk %fp 48aae: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first;
48ab0: 23d1 0005 da56 movel %a1@,5da56 <_Thread_Heir>
_Context_Switch_necessary = true; } else if ( !_Thread_Is_heir( executing ) ) _Context_Switch_necessary = true;
48ab6: 7001 moveq #1,%d0 48ab8: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> 48abe: 60e6 bras 48aa6 <_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 ) )
48ac0: b1f9 0005 da56 cmpal 5da56 <_Thread_Heir>,%a0 48ac6: 67de beqs 48aa6 <_Thread_Yield_processor+0x5e>
_Context_Switch_necessary = true;
48ac8: 7001 moveq #1,%d0 <== NOT EXECUTED 48aca: 13c0 0005 da92 moveb %d0,5da92 <_Context_Switch_necessary> <== NOT EXECUTED 48ad0: 60d4 bras 48aa6 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED
... 000477b4 <_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 ) ) {
477b4: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) {
477b6: 4e56 0000 linkw %fp,#0 477ba: 202e 0010 movel %fp@(16),%d0 477be: 2f0a movel %a2,%sp@- 477c0: 246e 000c moveal %fp@(12),%a2
#endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL;
477c4: 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 ) ) {
477c8: b2aa 0050 cmpl %a2@(80),%d1 477cc: 671c beqs 477ea <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level );
477ce: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
477d0: 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 }
477d4: 246e fffc moveal %fp@(-4),%a2 477d8: 203c 1003 fff8 movel #268697592,%d0 477de: 2d40 000c movel %d0,%fp@(12) 477e2: 4e5e unlk %fp 477e4: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT;
477ea: 123c 0003 moveb #3,%d1 477ee: 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 );
477f2: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
477f4: 486a 0048 pea %a2@(72) 477f8: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 477fe: 588f addql #4,%sp 47800: 203c 1003 fff8 movel #268697592,%d0 47806: 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 }
4780a: 246e fffc moveal %fp@(-4),%a2 4780e: 2d40 000c movel %d0,%fp@(12) 47812: 4e5e unlk %fp 47814: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
... 000482ac <_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 ) {
482ac: 4e56 ffe4 linkw %fp,#-28 482b0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 482b4: 266e 000c moveal %fp@(12),%a3
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
482b8: 41eb 003c lea %a3@(60),%a0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level );
482bc: 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;
482c2: 222b 0014 movel %a3@(20),%d1
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
482c6: 2401 movel %d1,%d2 482c8: ec8a lsrl #6,%d2 482ca: 2002 movel %d2,%d0 482cc: e58a lsll #2,%d2 482ce: 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 ) {
482d0: 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 ];
482d4: 9082 subl %d2,%d0 482d6: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 482da: 2748 0038 movel %a0,%a3@(56)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
482de: 41eb 0038 lea %a3@(56),%a0
block_state = the_thread_queue->state;
482e2: 242c 0038 movel %a4@(56),%d2 482e6: 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;
482ea: 42ab 003c clrl %a3@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
482ee: 0801 0005 btst #5,%d1 482f2: 6656 bnes 4834a <_Thread_queue_Enqueue_priority+0x9e>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
482f4: 2a0a movel %a2,%d5
goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level );
482f6: 2803 movel %d3,%d4 482f8: 5885 addql #4,%d5 482fa: 2004 movel %d4,%d0 482fc: 40c3 movew %sr,%d3 482fe: 8083 orl %d3,%d0 48300: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->first;
48302: 2052 moveal %a2@,%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48304: ba88 cmpl %a0,%d5 48306: 6700 010a beqw 48412 <_Thread_queue_Enqueue_priority+0x166>
search_priority = search_thread->current_priority;
4830a: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
4830e: b3c1 cmpal %d1,%a1 48310: 6418 bccs 4832a <_Thread_queue_Enqueue_priority+0x7e>
break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level );
48312: 2004 movel %d4,%d0 48314: 46c3 movew %d3,%sr 48316: 8083 orl %d3,%d0 48318: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
4831a: 2002 movel %d2,%d0 4831c: c0a8 0010 andl %a0@(16),%d0 48320: 6700 0092 beqw 483b4 <_Thread_queue_Enqueue_priority+0x108>
_ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next;
48324: 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 ) ) {
48326: ba88 cmpl %a0,%d5 48328: 66e0 bnes 4830a <_Thread_queue_Enqueue_priority+0x5e> 4832a: 2403 movel %d3,%d2
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
4832c: 7001 moveq #1,%d0 4832e: b0ac 0030 cmpl %a4@(48),%d0 48332: 6700 0094 beqw 483c8 <_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;
48336: 206e 0010 moveal %fp@(16),%a0
return the_thread_queue->sync_state;
4833a: 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;
4833e: 2082 movel %d2,%a0@
return the_thread_queue->sync_state; }
48340: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48344: 4e5e unlk %fp 48346: 4e75 rts
if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level );
48348: 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;
4834a: 4284 clrl %d4 4834c: 1839 0005 c292 moveb 5c292 <rtems_maximum_priority>,%d4
_ISR_Disable( level );
48352: 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;
48354: 2244 moveal %d4,%a1 48356: 5289 addql #1,%a1
_ISR_Disable( level );
48358: 40c4 movew %sr,%d4 4835a: 8084 orl %d4,%d0 4835c: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->last;
4835e: 206a 0008 moveal %a2@(8),%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48362: b5c8 cmpal %a0,%a2 48364: 6720 beqs 48386 <_Thread_queue_Enqueue_priority+0xda>
search_priority = search_thread->current_priority;
48366: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
4836a: b3c1 cmpal %d1,%a1 4836c: 6318 blss 48386 <_Thread_queue_Enqueue_priority+0xda>
break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level );
4836e: 2003 movel %d3,%d0 48370: 46c4 movew %d4,%sr 48372: 8084 orl %d4,%d0 48374: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48376: 2002 movel %d2,%d0 48378: c0a8 0010 andl %a0@(16),%d0 4837c: 67ca beqs 48348 <_Thread_queue_Enqueue_priority+0x9c>
_ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *)
4837e: 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 ) ) {
48382: b5c8 cmpal %a0,%a2 48384: 66e0 bnes 48366 <_Thread_queue_Enqueue_priority+0xba> 48386: 2404 movel %d4,%d2
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
48388: 7001 moveq #1,%d0 4838a: b0ac 0030 cmpl %a4@(48),%d0 4838e: 66a6 bnes 48336 <_Thread_queue_Enqueue_priority+0x8a>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48390: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
48394: b3c1 cmpal %d1,%a1 48396: 6756 beqs 483ee <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
48398: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
4839a: 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;
4839e: 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;
483a0: 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;
483a4: 208b movel %a3,%a0@
next_node->previous = the_node;
483a6: 234b 0004 movel %a3,%a1@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
483aa: 46c4 movew %d4,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
483ac: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483b0: 4e5e unlk %fp 483b2: 4e75 rts
if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level );
483b4: 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 );
483b6: 2004 movel %d4,%d0 <== NOT EXECUTED 483b8: 40c3 movew %sr,%d3 <== NOT EXECUTED 483ba: 8083 orl %d3,%d0 <== NOT EXECUTED 483bc: 46c0 movew %d0,%sr <== NOT EXECUTED
search_thread = (Thread_Control *) header->first;
483be: 2052 moveal %a2@,%a0 <== NOT EXECUTED
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
483c0: ba88 cmpl %a0,%d5 <== NOT EXECUTED 483c2: 6600 ff46 bnew 4830a <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 483c6: 604a bras 48412 <_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;
483c8: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
483cc: b3c1 cmpal %d1,%a1 483ce: 671e beqs 483ee <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
483d0: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
483d4: 2688 movel %a0,%a3@
the_node->previous = previous_node;
483d6: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
483da: 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;
483de: 228b movel %a3,%a1@
search_node->previous = the_node;
483e0: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
483e4: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
483e6: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 483ea: 4e5e unlk %fp 483ec: 4e75 rts 483ee: 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;
483f2: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
483f6: 2688 movel %a0,%a3@
the_node->previous = previous_node;
483f8: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
483fc: 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;
48400: 228b movel %a3,%a1@
search_node->previous = the_node;
48402: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
48406: 46c2 movew %d2,%sr 48408: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
4840a: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 4840e: 4e5e unlk %fp 48410: 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 ) ) {
48412: 2403 movel %d3,%d2 48414: 327c ffff moveaw #-1,%a1
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
48418: 7001 moveq #1,%d0 4841a: b0ac 0030 cmpl %a4@(48),%d0 4841e: 6600 ff16 bnew 48336 <_Thread_queue_Enqueue_priority+0x8a> 48422: 60a4 bras 483c8 <_Thread_queue_Enqueue_priority+0x11c>
00048210 <_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 ) {
48210: 4e56 fff0 linkw %fp,#-16 48214: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48218: 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 );
4821c: 2f2b 0038 movel %a3@(56),%sp@-
Thread_queue_Control *, Thread_Control *, ISR_Level * ); the_thread = _Thread_Executing;
48220: 2479 0005 da82 moveal 5da82 <_Thread_Executing>,%a2
void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) {
48226: 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 );
4822a: 2f0a movel %a2,%sp@- 4822c: 4eb9 0004 8618 jsr 48618 <_Thread_Set_state>
/* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) {
48232: 508f addql #8,%sp 48234: 4a82 tstl %d2 48236: 6644 bnes 4827c <_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 )
48238: 41f9 0004 82ac lea 482ac <_Thread_queue_Enqueue_priority>,%a0 4823e: 7001 moveq #1,%d0 48240: b0ab 0034 cmpl %a3@(52),%d0 48244: 6706 beqs 4824c <_Thread_queue_Enqueue_with_handler+0x3c> 48246: 41f9 0004 b84c lea 4b84c <_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 );
4824c: 486e fffc pea %fp@(-4) 48250: 2f0a movel %a2,%sp@- 48252: 2f0b movel %a3,%sp@- 48254: 4e90 jsr %a0@
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
48256: 4fef 000c lea %sp@(12),%sp 4825a: 7201 moveq #1,%d1 4825c: b280 cmpl %d0,%d1 4825e: 6712 beqs 48272 <_Thread_queue_Enqueue_with_handler+0x62>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
48260: 2f2e fffc movel %fp@(-4),%sp@- 48264: 2f0a movel %a2,%sp@- 48266: 2f00 movel %d0,%sp@- 48268: 4eb9 0004 77b4 jsr 477b4 <_Thread_blocking_operation_Cancel> 4826e: 4fef 000c lea %sp@(12),%sp
}
48272: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48278: 4e5e unlk %fp 4827a: 4e75 rts
/* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { _Watchdog_Initialize(
4827c: 202a 0008 movel %a2@(8),%d0
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
48280: 256e 0010 0064 movel %fp@(16),%a2@(100)
the_watchdog->id = id;
48286: 2540 0068 movel %d0,%a2@(104)
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
4828a: 2542 0054 movel %d2,%a2@(84)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
4828e: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
48292: 42aa 006c clrl %a2@(108)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
48296: 486a 0048 pea %a2@(72) 4829a: 4879 0005 daa0 pea 5daa0 <_Watchdog_Ticks_chain> 482a0: 4eb9 0004 8e1c jsr 48e1c <_Watchdog_Insert> 482a6: 508f addql #8,%sp 482a8: 608e bras 48238 <_Thread_queue_Enqueue_with_handler+0x28>
... 0004d2c4 <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level );
4d2c4: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) {
4d2ca: 4e56 0000 linkw %fp,#0 4d2ce: 2f0a movel %a2,%sp@- 4d2d0: 246e 000c moveal %fp@(12),%a2
ISR_Level level; _ISR_Disable( level );
4d2d4: 40c1 movew %sr,%d1 4d2d6: 8081 orl %d1,%d0 4d2d8: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4d2da: 202a 0010 movel %a2@(16),%d0 4d2de: 0280 0003 bee0 andil #245472,%d0 4d2e4: 6734 beqs 4d31a <_Thread_queue_Extract_fifo+0x56>
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
4d2e6: 2052 moveal %a2@,%a0
_Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d2e8: 7002 moveq #2,%d0
previous = the_node->previous;
4d2ea: 226a 0004 moveal %a2@(4),%a1
return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL;
4d2ee: 42aa 0044 clrl %a2@(68)
next->previous = previous; previous->next = next;
4d2f2: 2288 movel %a0,%a1@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
4d2f4: 2149 0004 movel %a1,%a0@(4)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4d2f8: b0aa 0050 cmpl %a2@(80),%d0 4d2fc: 6726 beqs 4d324 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4d2fe: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED );
4d300: 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 }
4d304: 246e fffc moveal %fp@(-4),%a2 4d308: 203c 1003 fff8 movel #268697592,%d0 4d30e: 2d40 000c movel %d0,%fp@(12) 4d312: 4e5e unlk %fp 4d314: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level );
4d31a: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif }
4d31c: 246e fffc moveal %fp@(-4),%a2 4d320: 4e5e unlk %fp 4d322: 4e75 rts 4d324: 7003 moveq #3,%d0 4d326: 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 );
4d32a: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4d32c: 486a 0048 pea %a2@(72) 4d330: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 4d336: 588f addql #4,%sp 4d338: 203c 1003 fff8 movel #268697592,%d0 4d33e: 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 }
4d342: 246e fffc moveal %fp@(-4),%a2 4d346: 2d40 000c movel %d0,%fp@(12) 4d34a: 4e5e unlk %fp 4d34c: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
... 0004b8e0 <_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 );
4b8e0: 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 ) {
4b8e6: 4e56 ffec linkw %fp,#-20 4b8ea: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b8ee: 246e 000c moveal %fp@(12),%a2 4b8f2: 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 );
4b8f6: 40c1 movew %sr,%d1 4b8f8: 8081 orl %d1,%d0 4b8fa: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4b8fc: 202a 0010 movel %a2@(16),%d0 4b900: 0280 0003 bee0 andil #245472,%d0 4b906: 677e beqs 4b986 <_Thread_queue_Extract_priority_helper+0xa6>
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4b908: 200a movel %a2,%d0 4b90a: 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;
4b910: 2652 moveal %a2@,%a3
previous_node = the_node->previous;
4b912: 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));
4b916: 206a 0038 moveal %a2@(56),%a0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
4b91a: b088 cmpl %a0,%d0 4b91c: 6774 beqs 4b992 <_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;
4b91e: 286a 0040 moveal %a2@(64),%a4
new_second_node = new_first_node->next;
4b922: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node; next_node->previous = new_first_node;
4b924: 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;
4b928: 2288 movel %a0,%a1@
next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node;
4b92a: 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;
4b92e: 208b movel %a3,%a0@
new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4b930: 202a 0040 movel %a2@(64),%d0 4b934: b0aa 0038 cmpl %a2@(56),%d0 4b938: 6716 beqs 4b950 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */ new_second_node->previous =
4b93a: 43e8 0038 lea %a0@(56),%a1 4b93e: 2b49 0004 movel %a1,%a5@(4)
_Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node;
4b942: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4b946: 214c 0040 movel %a4,%a0@(64)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
4b94a: 41e8 003c lea %a0@(60),%a0 4b94e: 2888 movel %a0,%a4@
/* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) {
4b950: 4a02 tstb %d2 4b952: 6626 bnes 4b97a <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4b954: 7002 moveq #2,%d0 4b956: b0aa 0050 cmpl %a2@(80),%d0 4b95a: 6742 beqs 4b99e <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4b95c: 46c1 movew %d1,%sr 4b95e: 2d4a 0008 movel %a2,%fp@(8) 4b962: 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 }
4b968: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b96e: 2d49 000c movel %a1,%fp@(12) 4b972: 4e5e unlk %fp 4b974: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
/* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level );
4b97a: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif }
4b97c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b982: 4e5e unlk %fp 4b984: 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 );
4b986: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif }
4b988: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b98e: 4e5e unlk %fp 4b990: 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;
4b992: 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;
4b996: 228b movel %a3,%a1@
/* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) {
4b998: 4a02 tstb %d2 4b99a: 67b8 beqs 4b954 <_Thread_queue_Extract_priority_helper+0x74> 4b99c: 60dc bras 4b97a <_Thread_queue_Extract_priority_helper+0x9a> 4b99e: 7003 moveq #3,%d0 4b9a0: 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 );
4b9a4: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4b9a6: 486a 0048 pea %a2@(72) 4b9aa: 4eb9 0004 8f64 jsr 48f64 <_Watchdog_Remove> 4b9b0: 588f addql #4,%sp 4b9b2: 227c 1003 fff8 moveal #268697592,%a1 4b9b8: 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 }
4b9bc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b9c2: 2d49 000c movel %a1,%fp@(12) 4b9c6: 4e5e unlk %fp 4b9c8: 4ef9 0004 7968 jmp 47968 <_Thread_Clear_state>
... 0004848c <_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 ) {
4848c: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) {
4848e: 4e56 0000 linkw %fp,#0 48492: 206e 0008 moveal %fp@(8),%a0
the_thread_queue->state = state;
48496: 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 ) {
4849c: 202e 000c movel %fp@(12),%d0
the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
484a0: 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;
484a6: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
484aa: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
484ae: b280 cmpl %d0,%d1 484b0: 6712 beqs 484c4 <_Thread_queue_Initialize+0x38>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
484b2: 2008 movel %a0,%d0 484b4: 5880 addql #4,%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
484b6: 2148 0008 movel %a0,%a0@(8)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
484ba: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
484bc: 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 ); } }
484c0: 4e5e unlk %fp 484c2: 4e75 rts
* timeout_status - return on a timeout * * Output parameters: NONE */ void _Thread_queue_Initialize(
484c4: 2008 movel %a0,%d0 484c6: 0680 0000 0030 addil #48,%d0
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
484cc: 2208 movel %a0,%d1 484ce: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
484d0: 42a8 0004 clrl %a0@(4)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
484d4: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
484d6: 2148 0008 movel %a0,%a0@(8) 484da: 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 ;
484de: b088 cmpl %a0,%d0 484e0: 67de beqs 484c0 <_Thread_queue_Initialize+0x34>
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
484e2: 2208 movel %a0,%d1 484e4: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
484e6: 42a8 0004 clrl %a0@(4)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
484ea: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
484ec: 2148 0008 movel %a0,%a0@(8) 484f0: 41e8 000c lea %a0@(12),%a0 484f4: b088 cmpl %a0,%d0 484f6: 66d4 bnes 484cc <_Thread_queue_Initialize+0x40> 484f8: 60c6 bras 484c0 <_Thread_queue_Initialize+0x34>
... 000484fc <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) {
484fc: 4e56 fff0 linkw %fp,#-16 48500: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48504: 246e 0008 moveal %fp@(8),%a2 48508: 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 )
4850c: 4a8a tstl %a2 4850e: 6708 beqs 48518 <_Thread_queue_Requeue+0x1c>
/* * 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 ) {
48510: 7001 moveq #1,%d0 48512: b0aa 0034 cmpl %a2@(52),%d0 48516: 670a beqs 48522 <_Thread_queue_Requeue+0x26>
_Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } }
48518: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4851e: 4e5e unlk %fp <== NOT EXECUTED 48520: 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 );
48522: 303c 0700 movew #1792,%d0 48526: 40c2 movew %sr,%d2 48528: 8082 orl %d2,%d0 4852a: 46c0 movew %d0,%sr
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4852c: 202b 0010 movel %a3@(16),%d0 48530: 0280 0003 bee0 andil #245472,%d0 48536: 660c bnes 48544 <_Thread_queue_Requeue+0x48>
_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 );
48538: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
4853a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48540: 4e5e unlk %fp 48542: 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 );
48544: 4878 0001 pea 1 <ADD> 48548: 7001 moveq #1,%d0 4854a: 2f0b movel %a3,%sp@- 4854c: 2540 0030 movel %d0,%a2@(48) 48550: 2f0a movel %a2,%sp@- 48552: 4eb9 0004 b8e0 jsr 4b8e0 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
48558: 486e fffc pea %fp@(-4) 4855c: 2f0b movel %a3,%sp@- 4855e: 2f0a movel %a2,%sp@- 48560: 4eb9 0004 82ac jsr 482ac <_Thread_queue_Enqueue_priority> 48566: 4fef 0018 lea %sp@(24),%sp
} _ISR_Enable( level );
4856a: 46c2 movew %d2,%sr 4856c: 60cc bras 4853a <_Thread_queue_Requeue+0x3e>
... 0005944c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
5944c: 4e56 ffb0 linkw %fp,#-80 59450: 41ee ffec lea %fp@(-20),%a0 59454: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59458: 246e 0008 moveal %fp@(8),%a2 5945c: 2c0e movel %fp,%d6 5945e: 260e movel %fp,%d3 59460: 5186 subql #8,%d6 59462: 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 );
59468: 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 );
5946a: 2a0a movel %a2,%d5 5946c: 4bf9 0005 d4f0 lea 5d4f0 <_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 );
59472: 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 );
59478: 0685 0000 0068 addil #104,%d5 5947e: 47f9 0005 9eac lea 59eac <_Chain_Get>,%a3 59484: 49f9 0005 d580 lea 5d580 <_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 );
5948a: 283c 0000 0700 movel #1792,%d4 59490: 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 );
59494: 41ea 0008 lea %a2@(8),%a0 59498: 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 );
5949c: 41ea 0040 lea %a2@(64),%a0 594a0: 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);
594a4: 41ee fff4 lea %fp@(-12),%a0 594a8: 2d48 fffc movel %a0,%fp@(-4)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
594ac: 41ee ffec lea %fp@(-20),%a0 594b0: 2d46 fff4 movel %d6,%fp@(-12)
the_chain->permanent_null = NULL;
594b4: 42ae fff8 clrl %fp@(-8)
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
594b8: 2d48 ffe8 movel %a0,%fp@(-24)
the_chain->permanent_null = NULL;
594bc: 42ae ffec clrl %fp@(-20)
the_chain->last = _Chain_Head(the_chain);
594c0: 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;
594c4: 41ee fff4 lea %fp@(-12),%a0 594c8: 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;
594cc: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
594d2: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
594d6: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
594da: 9081 subl %d1,%d0 594dc: 2f03 movel %d3,%sp@- 594de: 2f00 movel %d0,%sp@- 594e0: 2f02 movel %d2,%sp@- 594e2: 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();
594e4: 2039 0007 d146 movel 7d146 <_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 ) {
594ea: 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;
594ee: 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 ) {
594f2: b280 cmpl %d0,%d1 594f4: 6500 0086 bcsw 5957c <_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 ) {
594f8: b280 cmpl %d0,%d1 594fa: 6200 00a4 bhiw 595a0 <_Timer_server_Body+0x154>
*/ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot;
594fe: 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 );
59502: 202a 0078 movel %a2@(120),%d0 59506: 2f00 movel %d0,%sp@- 59508: 4e93 jsr %a3@
if ( timer == NULL ) {
5950a: 588f addql #4,%sp 5950c: 4a80 tstl %d0 5950e: 672e beqs 5953e <_Timer_server_Body+0xf2>
static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59510: 2040 moveal %d0,%a0 <== NOT EXECUTED 59512: 7e01 moveq #1,%d7 <== NOT EXECUTED 59514: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59518: be81 cmpl %d1,%d7 <== NOT EXECUTED 5951a: 6700 00a8 beqw 595c4 <_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 ) {
5951e: 7e03 moveq #3,%d7 <== NOT EXECUTED 59520: be81 cmpl %d1,%d7 <== NOT EXECUTED 59522: 66de bnes 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59524: 2040 moveal %d0,%a0 <== NOT EXECUTED 59526: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5952a: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5952c: 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 );
5952e: 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 );
59532: 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 );
59534: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59536: 4e93 jsr %a3@ <== NOT EXECUTED
if ( timer == NULL ) {
59538: 588f addql #4,%sp <== NOT EXECUTED 5953a: 4a80 tstl %d0 <== NOT EXECUTED 5953c: 66d2 bnes 59510 <_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 );
5953e: 2004 movel %d4,%d0 59540: 40c1 movew %sr,%d1 59542: 8081 orl %d1,%d0 59544: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
59546: bcae fff4 cmpl %fp@(-12),%d6 5954a: 6700 0086 beqw 595d2 <_Timer_server_Body+0x186>
ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level );
5954e: 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;
59550: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59556: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
5955a: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5955e: 9081 subl %d1,%d0 <== NOT EXECUTED 59560: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59562: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59564: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59566: 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();
59568: 2039 0007 d146 movel 7d146 <_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 ) {
5956e: 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;
59572: 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 ) {
59576: b280 cmpl %d0,%d1 <== NOT EXECUTED 59578: 6400 ff7e bccw 594f8 <_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 );
5957c: 2f03 movel %d3,%sp@- 5957e: 2e00 movel %d0,%d7 59580: 9e81 subl %d1,%d7 59582: 2f07 movel %d7,%sp@- 59584: 2d40 ffdc movel %d0,%fp@(-36) 59588: 2f05 movel %d5,%sp@- 5958a: 4eb9 0005 d4f0 jsr 5d4f0 <_Watchdog_Adjust_to_chain> 59590: 202e ffdc movel %fp@(-36),%d0 59594: 4fef 000c lea %sp@(12),%sp
*/ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot;
59598: 2540 0074 movel %d0,%a2@(116) 5959c: 6000 ff64 braw 59502 <_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 );
595a0: 9280 subl %d0,%d1 595a2: 2f01 movel %d1,%sp@- 595a4: 4878 0001 pea 1 <ADD> 595a8: 2d40 ffdc movel %d0,%fp@(-36) 595ac: 2f05 movel %d5,%sp@- 595ae: 4eb9 0005 d45c jsr 5d45c <_Watchdog_Adjust> 595b4: 202e ffdc movel %fp@(-36),%d0 595b8: 4fef 000c lea %sp@(12),%sp
} watchdogs->last_snapshot = snapshot;
595bc: 2540 0074 movel %d0,%a2@(116) 595c0: 6000 ff40 braw 59502 <_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 );
595c4: 4868 0010 pea %a0@(16) <== NOT EXECUTED 595c8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 595ca: 4e94 jsr %a4@ <== NOT EXECUTED 595cc: 508f addql #8,%sp <== NOT EXECUTED 595ce: 6000 ff32 braw 59502 <_Timer_server_Body+0xb6> <== NOT EXECUTED
*/ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL;
595d2: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
595d6: 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 ) ) {
595d8: 202e ffd8 movel %fp@(-40),%d0 595dc: b0ae ffe8 cmpl %fp@(-24),%d0 595e0: 6752 beqs 59634 <_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 );
595e2: 2204 movel %d4,%d1 595e4: 40c0 movew %sr,%d0 595e6: 8280 orl %d0,%d1 595e8: 46c1 movew %d1,%sr
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
595ea: 206e ffe8 moveal %fp@(-24),%a0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain))
595ee: b1ee ffd8 cmpal %fp@(-40),%a0 595f2: 6732 beqs 59626 <_Timer_server_Body+0x1da>
{ Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
595f4: 2250 moveal %a0@,%a1
the_chain->first = new_first;
595f6: 2d49 ffe8 movel %a1,%fp@(-24)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE;
595fa: 42a8 0008 clrl %a0@(8)
new_first->previous = _Chain_Head(the_chain);
595fe: 2343 0004 movel %d3,%a1@(4)
_ISR_Enable( level );
59602: 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 );
59604: 2f28 0024 movel %a0@(36),%sp@- 59608: 2f28 0020 movel %a0@(32),%sp@- 5960c: 2068 001c moveal %a0@(28),%a0 59610: 4e90 jsr %a0@
}
59612: 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 );
59614: 2204 movel %d4,%d1 59616: 40c0 movew %sr,%d0 59618: 8280 orl %d0,%d1 5961a: 46c1 movew %d1,%sr
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
5961c: 206e ffe8 moveal %fp@(-24),%a0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain))
59620: b1ee ffd8 cmpal %fp@(-40),%a0 59624: 66ce bnes 595f4 <_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 );
59626: 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;
59628: 41ee fff4 lea %fp@(-12),%a0 5962c: 2548 0078 movel %a0,%a2@(120) 59630: 6000 fe9a braw 594cc <_Timer_server_Body+0x80>
* the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false;
59634: 4207 clrb %d7 59636: 1547 007c moveb %d7,%a2@(124) 5963a: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 59640: 5280 addql #1,%d0 59642: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level>
/* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING );
59648: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5964c: 2f12 movel %a2@,%sp@- 5964e: 4eb9 0005 cbac jsr 5cbac <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
59654: 2f0a movel %a2,%sp@- 59656: 4eba fd1c jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
5965a: 2f0a movel %a2,%sp@- 5965c: 4eba fd80 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
59660: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
ts->active = true;
59666: 7001 moveq #1,%d0 59668: 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 );
5966c: 2f2e ffe0 movel %fp@(-32),%sp@- 59670: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
59676: 2f2e ffe4 movel %fp@(-28),%sp@- 5967a: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove> 59680: 4fef 0018 lea %sp@(24),%sp 59684: 6000 fe3e braw 594c4 <_Timer_server_Body+0x78>
00059688 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) {
59688: 4e56 fff0 linkw %fp,#-16 5968c: 206e 000c moveal %fp@(12),%a0 59690: 48d7 041c moveml %d2-%d4/%a2,%sp@ 59694: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
59698: 202a 0078 movel %a2@(120),%d0 5969c: 671a beqs 596b8 <_Timer_server_Schedule_operation_method+0x30>
* 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 );
5969e: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 596a2: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED
} }
596a6: 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 );
596ac: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} }
596b0: 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 );
596b2: 4ef9 0005 9e74 jmp 59e74 <_Chain_Append> <== NOT EXECUTED
596b8: 2039 0007 d0b4 movel 7d0b4 <_Thread_Dispatch_disable_level>,%d0 596be: 5280 addql #1,%d0 596c0: 23c0 0007 d0b4 movel %d0,7d0b4 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
596c6: 2028 0038 movel %a0@(56),%d0 596ca: 7201 moveq #1,%d1 596cc: b280 cmpl %d0,%d1 596ce: 6700 0088 beqw 59758 <_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 ) {
596d2: 7203 moveq #3,%d1 596d4: b280 cmpl %d0,%d1 596d6: 670e beqs 596e6 <_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 ); } }
596d8: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596de: 4e5e unlk %fp
if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch();
596e0: 4ef9 0005 c164 jmp 5c164 <_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 );
596e6: 203c 0000 0700 movel #1792,%d0 596ec: 40c2 movew %sr,%d2 596ee: 8082 orl %d2,%d0 596f0: 46c0 movew %d0,%sr
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
596f2: 260a movel %a2,%d3 596f4: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
596fa: 2039 0007 d146 movel 7d146 <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
59700: 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));
59704: 226a 0068 moveal %a2@(104),%a1
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
59708: b689 cmpl %a1,%d3 5970a: 671a beqs 59726 <_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;
5970c: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
59710: b280 cmpl %d0,%d1 59712: 6400 00b8 bccw 597cc <_Timer_server_Schedule_operation_method+0x144>
/* * We advanced in time. */ delta = snapshot - last_snapshot;
59716: 2800 movel %d0,%d4 59718: 9881 subl %d1,%d4
if (delta_interval > delta) {
5971a: b883 cmpl %d3,%d4 5971c: 6500 00ba bcsw 597d8 <_Timer_server_Schedule_operation_method+0x150>
59720: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval;
59722: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED
} ts->TOD_watchdogs.last_snapshot = snapshot;
59726: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
5972a: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5972c: 4868 0010 pea %a0@(16) 59730: 486a 0068 pea %a2@(104) 59734: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert>
if ( !ts->active ) {
5973a: 508f addql #8,%sp 5973c: 102a 007c moveb %a2@(124),%d0 59740: 6696 bnes 596d8 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
59742: 2f0a movel %a2,%sp@- 59744: 4eba fc98 jsr %pc@(593de <_Timer_server_Reset_tod_system_watchdog>) 59748: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } }
5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59750: 4e5e unlk %fp
if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch();
59752: 4ef9 0005 c164 jmp 5c164 <_Thread_Enable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level );
59758: 203c 0000 0700 movel #1792,%d0 5975e: 40c3 movew %sr,%d3 59760: 8083 orl %d3,%d0 59762: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
59764: 2039 0007 d1f4 movel 7d1f4 <_Watchdog_Ticks_since_boot>,%d0 5976a: 240a movel %a2,%d2 5976c: 0682 0000 0034 addil #52,%d2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
59772: 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));
59776: 226a 0030 moveal %a2@(48),%a1
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
5977a: b489 cmpl %a1,%d2 5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x108>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot;
5977e: 2800 movel %d0,%d4 59780: 9881 subl %d1,%d4
delta_interval = first_watchdog->delta_interval;
59782: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
59786: b484 cmpl %d4,%d2 59788: 623a bhis 597c4 <_Timer_server_Schedule_operation_method+0x13c> 5978a: 4282 clrl %d2
delta_interval -= delta; } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval;
5978c: 2342 0010 movel %d2,%a1@(16)
} ts->Interval_watchdogs.last_snapshot = snapshot;
59790: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
59794: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
59796: 4868 0010 pea %a0@(16) 5979a: 486a 0030 pea %a2@(48) 5979e: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert>
if ( !ts->active ) {
597a4: 508f addql #8,%sp 597a6: 102a 007c moveb %a2@(124),%d0 597aa: 6600 ff2c bnew 596d8 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
597ae: 2f0a movel %a2,%sp@- 597b0: 4eba fbc2 jsr %pc@(59374 <_Timer_server_Reset_interval_system_watchdog>) 597b4: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } }
597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 597bc: 4e5e unlk %fp
if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch();
597be: 4ef9 0005 c164 jmp 5c164 <_Thread_Enable_dispatch>
*/ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta;
597c4: 9484 subl %d4,%d2
} else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval;
597c6: 2342 0010 movel %d2,%a1@(16) 597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x108>
} } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot;
597cc: d283 addl %d3,%d1
delta_interval += delta;
597ce: 9280 subl %d0,%d1
} first_watchdog->delta_interval = delta_interval;
597d0: 2341 0010 movel %d1,%a1@(16) 597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0x9e>
/* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta;
597d8: 9684 subl %d4,%d3 597da: 2203 movel %d3,%d1
* Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval;
597dc: 2341 0010 movel %d1,%a1@(16) 597e0: 6000 ff44 braw 59726 <_Timer_server_Schedule_operation_method+0x9e>
0007adf4 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) {
7adf4: 4e56 0000 linkw %fp,#0 7adf8: 226e 0008 moveal %fp@(8),%a1 7adfc: 206e 000c moveal %fp@(12),%a0
if ( lhs->tv_sec > rhs->tv_sec )
7ae00: 2211 movel %a1@,%d1 7ae02: 2010 movel %a0@,%d0 7ae04: b081 cmpl %d1,%d0 7ae06: 6d18 blts 7ae20 <_Timespec_Greater_than+0x2c>
return true; if ( lhs->tv_sec < rhs->tv_sec )
7ae08: 6e10 bgts 7ae1a <_Timespec_Greater_than+0x26>
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Greater_than(
7ae0a: 2068 0004 moveal %a0@(4),%a0 7ae0e: b1e9 0004 cmpal %a1@(4),%a0 7ae12: 5dc0 slt %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; }
7ae14: 4e5e unlk %fp
#include <rtems/system.h> #include <rtems/score/timespec.h> #include <rtems/score/tod.h> bool _Timespec_Greater_than(
7ae16: 4480 negl %d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; }
7ae18: 4e75 rts
7ae1a: 4e5e unlk %fp <== NOT EXECUTED
) { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec )
7ae1c: 4200 clrb %d0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; }
7ae1e: 4e75 rts <== NOT EXECUTED
7ae20: 4e5e unlk %fp
bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec )
7ae22: 7001 moveq #1,%d0
/* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } ... 00048c72 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) {
48c72: 4e56 0000 linkw %fp,#0 48c76: 2f0a movel %a2,%sp@-
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
48c78: 2479 0005 db5e moveal 5db5e <_User_extensions_List+0x8>,%a2
} void _User_extensions_Thread_exitted ( Thread_Control *executing ) {
48c7e: 2f02 movel %d2,%sp@- 48c80: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
48c84: b5fc 0005 db56 cmpal #383830,%a2 48c8a: 671a beqs 48ca6 <_User_extensions_Thread_exitted+0x34>
!_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 )
48c8c: 206a 002c moveal %a2@(44),%a0 48c90: 4a88 tstl %a0 48c92: 6706 beqs 48c9a <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
48c94: 2f02 movel %d2,%sp@- 48c96: 4e90 jsr %a0@
48c98: 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 ) {
48c9a: 246a 0004 moveal %a2@(4),%a2
) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ;
48c9e: b5fc 0005 db56 cmpal #383830,%a2 48ca4: 66e6 bnes 48c8c <_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 ); } }
48ca6: 242e fff8 movel %fp@(-8),%d2 48caa: 246e fffc moveal %fp@(-4),%a2
48cae: 4e5e unlk %fp <== NOT EXECUTED
0005d4f0 <_Watchdog_Adjust_to_chain>: Chain_Control *header, Watchdog_Interval units_arg, Chain_Control *to_fire ) {
5d4f0: 4e56 ffe4 linkw %fp,#-28 5d4f4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5d4f8: 2a6e 0008 moveal %fp@(8),%a5 5d4fc: 282e 000c movel %fp@(12),%d4 5d500: 266e 0010 moveal %fp@(16),%a3
Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) {
5d504: 675e beqs 5d564 <_Watchdog_Adjust_to_chain+0x74>
return; } _ISR_Disable( level );
5d506: 263c 0000 0700 movel #1792,%d3 5d50c: 2003 movel %d3,%d0 5d50e: 40c1 movew %sr,%d1 5d510: 8081 orl %d1,%d0 5d512: 46c0 movew %d0,%sr 5d514: 284d moveal %a5,%a4
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
5d516: 240b movel %a3,%d2 5d518: 5882 addql #4,%d2 5d51a: 205c moveal %a4@+,%a0
while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) {
5d51c: b1cc cmpal %a4,%a0 5d51e: 6742 beqs 5d562 <_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 ) {
5d520: 2028 0010 movel %a0@(16),%d0 5d524: b880 cmpl %d0,%d4 5d526: 654c bcss 5d574 <_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;
5d528: 9880 subl %d0,%d4
first->delta_interval = 0;
5d52a: 42a8 0010 clrl %a0@(16)
) { Chain_Node *next; Chain_Node *previous; next = the_node->next;
5d52e: 2250 moveal %a0@,%a1
previous = the_node->previous;
5d530: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
5d534: 2489 movel %a1,%a2@
Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous;
5d536: 234a 0004 movel %a2,%a1@(4)
Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain);
5d53a: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
5d53c: 226b 0008 moveal %a3@(8),%a1
the_chain->last = the_node;
5d540: 2748 0008 movel %a0,%a3@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
5d544: 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;
5d548: 2288 movel %a0,%a1@
while ( 1 ) { _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level );
5d54a: 2003 movel %d3,%d0 5d54c: 46c1 movew %d1,%sr 5d54e: 8081 orl %d1,%d0 5d550: 46c0 movew %d0,%sr
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
5d552: 2055 moveal %a5@,%a0
if ( _Chain_Is_empty( header ) )
5d554: b1cc cmpal %a4,%a0 5d556: 6714 beqs 5d56c <_Watchdog_Adjust_to_chain+0x7c>
break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 )
5d558: 4aa8 0010 tstl %a0@(16) 5d55c: 67d0 beqs 5d52e <_Watchdog_Adjust_to_chain+0x3e>
} _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) {
5d55e: 4a84 tstl %d4 5d560: 66ba bnes 5d51c <_Watchdog_Adjust_to_chain+0x2c>
if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level );
5d562: 46c1 movew %d1,%sr
}
5d564: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5d568: 4e5e unlk %fp 5d56a: 4e75 rts
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
5d56c: 204c moveal %a4,%a0
} _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) {
5d56e: 4a84 tstl %d4 5d570: 66aa bnes 5d51c <_Watchdog_Adjust_to_chain+0x2c> 5d572: 60ee bras 5d562 <_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;
5d574: 9084 subl %d4,%d0 5d576: 2140 0010 movel %d0,%a0@(16)
if ( first->delta_interval != 0 ) break; } } _ISR_Enable( level );
5d57a: 46c1 movew %d1,%sr 5d57c: 60e6 bras 5d564 <_Watchdog_Adjust_to_chain+0x74>
... 000490e8 <_Workspace_Handler_initialization>: /* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) {
490e8: 4e56 0000 linkw %fp,#0 490ec: 2f03 movel %d3,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size;
490ee: 2639 0005 c298 movel 5c298 <Configuration+0x4>,%d3
/* * _Workspace_Handler_initialization */ void _Workspace_Handler_initialization(void) {
490f4: 2f02 movel %d2,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start;
490f6: 2439 0005 c294 movel 5c294 <Configuration>,%d2
uintptr_t size = Configuration.work_space_size; if ( Configuration.do_zero_of_workspace )
490fc: 4a39 0005 c2bc tstb 5c2bc <Configuration+0x28> 49102: 6628 bnes 4912c <_Workspace_Handler_initialization+0x44>
memset( starting_address, 0, size ); memory_available = _Heap_Initialize(
49104: 4878 0004 pea 4 <CONTEXT_ARG> 49108: 2f03 movel %d3,%sp@- 4910a: 2f02 movel %d2,%sp@- 4910c: 4879 0005 d9ea pea 5d9ea <_Workspace_Area> 49112: 4eb9 0004 6c04 jsr 46c04 <_Heap_Initialize>
starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 )
49118: 4fef 0010 lea %sp@(16),%sp 4911c: 4a80 tstl %d0 4911e: 671e beqs 4913e <_Workspace_Handler_initialization+0x56>
_Internal_error_Occurred( INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_TOO_LITTLE_WORKSPACE ); }
49120: 242e fff8 movel %fp@(-8),%d2 49124: 262e fffc movel %fp@(-4),%d3 49128: 4e5e unlk %fp 4912a: 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 );
4912c: 2f03 movel %d3,%sp@- 4912e: 42a7 clrl %sp@- 49130: 2f02 movel %d2,%sp@- 49132: 4eb9 0004 e0f8 jsr 4e0f8 <memset> 49138: 4fef 000c lea %sp@(12),%sp 4913c: 60c6 bras 49104 <_Workspace_Handler_initialization+0x1c>
size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred(
4913e: 4878 0003 pea 3 <DIVIDE> 49142: 4878 0001 pea 1 <ADD> 49146: 42a7 clrl %sp@- 49148: 4eb9 0004 6f70 jsr 46f70 <_Internal_error_Occurred>
... 000482e0 <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 ) {
482e0: 4e56 fff4 linkw %fp,#-12 482e4: 226e 000c moveal %fp@(12),%a1 482e8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 482ec: 242e 0008 movel %fp@(8),%d2 482f0: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
482f4: 2039 0006 3ca6 movel 63ca6 <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
482fa: 2239 0006 3afa movel 63afa <_ISR_Nest_level>,%d1 48300: 6600 009c bnew 4839e <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL )
48304: 4a8a tstl %a2 48306: 6700 00ea beqw 483f2 <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit;
4830a: 2480 movel %d0,%a2@
if ( driver_table == NULL )
4830c: 4a89 tstl %a1 4830e: 6700 00e2 beqw 483f2 <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;
48312: 4a91 tstl %a1@ 48314: 6700 00d4 beqw 483ea <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 )
48318: b480 cmpl %d0,%d2 4831a: 6476 bccs 48392 <rtems_io_register_driver+0xb2>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
4831c: 2039 0006 3a60 movel 63a60 <_Thread_Dispatch_disable_level>,%d0 48322: 5280 addql #1,%d0 48324: 23c0 0006 3a60 movel %d0,63a60 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) {
4832a: 4a82 tstl %d2 4832c: 667c bnes 483aa <rtems_io_register_driver+0xca>
static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers;
4832e: 2039 0006 3ca6 movel 63ca6 <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) {
48334: 6700 00fc beqw 48432 <rtems_io_register_driver+0x152> 48338: 2239 0006 3caa movel 63caa <_IO_Driver_address_table>,%d1 4833e: 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;
48340: 4a90 tstl %a0@ 48342: 6700 008e beqw 483d2 <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 ) {
48346: 5282 addql #1,%d2 48348: 41e8 0018 lea %a0@(24),%a0 4834c: b480 cmpl %d0,%d2 4834e: 65f0 bcss 48340 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
48350: 2482 movel %d2,%a2@
if ( m != n )
48352: b480 cmpl %d0,%d2 48354: 6700 00de beqw 48434 <rtems_io_register_driver+0x154> 48358: 2602 movel %d2,%d3 4835a: 2002 movel %d2,%d0 4835c: 2041 moveal %d1,%a0 4835e: e78b lsll #3,%d3 48360: eb88 lsll #5,%d0 48362: 9083 subl %d3,%d0 48364: d1c0 addal %d0,%a0
} *registered_major = major; } _IO_Driver_address_table [major] = *driver_table;
48366: 20d9 movel %a1@+,%a0@+ 48368: 20d9 movel %a1@+,%a0@+ 4836a: 20d9 movel %a1@+,%a0@+ 4836c: 20d9 movel %a1@+,%a0@+ 4836e: 20d9 movel %a1@+,%a0@+ 48370: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
48372: 4eb9 0004 9e0c jsr 49e0c <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
48378: 2d42 0008 movel %d2,%fp@(8)
}
4837c: 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 );
48382: 42ae 0010 clrl %fp@(16) 48386: 42ae 000c clrl %fp@(12)
}
4838a: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
4838c: 4ef9 0005 0854 jmp 50854 <rtems_io_initialize>
return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit )
48392: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
48394: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4839a: 4e5e unlk %fp 4839c: 4e75 rts
rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() )
4839e: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
483a0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483a6: 4e5e unlk %fp 483a8: 4e75 rts
_Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major;
483aa: 2202 movel %d2,%d1 483ac: 2002 movel %d2,%d0 483ae: e789 lsll #3,%d1 483b0: eb88 lsll #5,%d0 483b2: 2079 0006 3caa moveal 63caa <_IO_Driver_address_table>,%a0 483b8: 9081 subl %d1,%d0 483ba: 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;
483bc: 4a90 tstl %a0@ 483be: 673e beqs 483fe <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();
483c0: 4eb9 0004 9e0c jsr 49e0c <_Thread_Enable_dispatch> 483c6: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
483c8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483ce: 4e5e unlk %fp 483d0: 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;
483d2: 4aa8 0004 tstl %a0@(4) 483d6: 6700 ff78 beqw 48350 <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 ) {
483da: 5282 addql #1,%d2 483dc: 41e8 0018 lea %a0@(24),%a0 483e0: b480 cmpl %d0,%d2 483e2: 6500 ff5c bcsw 48340 <rtems_io_register_driver+0x60> 483e6: 6000 ff68 braw 48350 <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;
483ea: 4aa9 0004 tstl %a1@(4) 483ee: 6600 ff28 bnew 48318 <rtems_io_register_driver+0x38>
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
483f2: 7009 moveq #9,%d0
}
483f4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 483fa: 4e5e unlk %fp 483fc: 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;
483fe: 4aa8 0004 tstl %a0@(4) 48402: 66bc bnes 483c0 <rtems_io_register_driver+0xe0>
} *registered_major = major; } _IO_Driver_address_table [major] = *driver_table;
48404: 20d9 movel %a1@+,%a0@+ 48406: 20d9 movel %a1@+,%a0@+ 48408: 20d9 movel %a1@+,%a0@+ 4840a: 20d9 movel %a1@+,%a0@+ 4840c: 20d9 movel %a1@+,%a0@+ 4840e: 2091 movel %a1@,%a0@
if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major;
48410: 2482 movel %d2,%a2@
} _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch();
48412: 4eb9 0004 9e0c jsr 49e0c <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
48418: 2d42 0008 movel %d2,%fp@(8)
}
4841c: 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 );
48422: 42ae 0010 clrl %fp@(16) 48426: 42ae 000c clrl %fp@(12)
}
4842a: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL );
4842c: 4ef9 0005 0854 jmp 50854 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m;
48432: 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();
48434: 4eb9 0004 9e0c jsr 49e0c <_Thread_Enable_dispatch> 4843a: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); }
4843c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48442: 4e5e unlk %fp
... 00047764 <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 ) {
47764: 4e56 0000 linkw %fp,#0 47768: 2f0a movel %a2,%sp@- 4776a: 246e 0010 moveal %fp@(16),%a2 4776e: 2f02 movel %d2,%sp@-
int i; /* * Validate parameters and look up information structure. */ if ( !info )
47770: 4a8a tstl %a2 47772: 6766 beqs 477da <rtems_object_get_class_information+0x76>
return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class );
47774: 2f2e 000c movel %fp@(12),%sp@- 47778: 2f2e 0008 movel %fp@(8),%sp@- 4777c: 4eb9 0004 9314 jsr 49314 <_Objects_Get_information>
if ( !obj_info )
47782: 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 );
47784: 2040 moveal %d0,%a0
if ( !obj_info )
47786: 4a80 tstl %d0 47788: 675e beqs 477e8 <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;
4778a: 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;
4778e: 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;
47790: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
47796: 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;
4779a: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
477a0: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
477a4: 6750 beqs 477f6 <rtems_object_get_class_information+0x92> 477a6: 2068 0018 moveal %a0@(24),%a0 477aa: 7201 moveq #1,%d1 477ac: 7001 moveq #1,%d0 477ae: 93c9 subal %a1,%a1 477b0: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
477b2: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 477b6: 6718 beqs 477d0 <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++ )
477b8: 2200 movel %d0,%d1 477ba: b082 cmpl %d2,%d0 477bc: 63f2 blss 477b0 <rtems_object_get_class_information+0x4c>
if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated;
477be: 2549 000e movel %a1,%a2@(14) 477c2: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
477c4: 242e fff8 movel %fp@(-8),%d2 477c8: 246e fffc moveal %fp@(-4),%a2 477cc: 4e5e unlk %fp 477ce: 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++;
477d0: 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++ )
477d2: 2200 movel %d0,%d1 477d4: b082 cmpl %d2,%d0 477d6: 63d8 blss 477b0 <rtems_object_get_class_information+0x4c> 477d8: 60e4 bras 477be <rtems_object_get_class_information+0x5a>
unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; }
477da: 242e fff8 movel %fp@(-8),%d2
int i; /* * Validate parameters and look up information structure. */ if ( !info )
477de: 7009 moveq #9,%d0
unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; }
477e0: 246e fffc moveal %fp@(-4),%a2 477e4: 4e5e unlk %fp 477e6: 4e75 rts 477e8: 242e fff8 movel %fp@(-8),%d2
*/ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info )
477ec: 700a moveq #10,%d0
unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; }
477ee: 246e fffc moveal %fp@(-4),%a2 477f2: 4e5e unlk %fp 477f4: 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++ )
477f6: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated;
477f8: 4280 clrl %d0 <== NOT EXECUTED 477fa: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 477fe: 60c4 bras 477c4 <rtems_object_get_class_information+0x60><== NOT EXECUTED
0007a514 <rtems_rate_monotonic_period>: rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) {
7a514: 4e56 ffec linkw %fp,#-20 7a518: 48d7 040c moveml %d2-%d3/%a2,%sp@ 7a51c: 486e fffc pea %fp@(-4) 7a520: 242e 0008 movel %fp@(8),%d2 7a524: 2f02 movel %d2,%sp@- 7a526: 4879 000a 5706 pea a5706 <_Rate_monotonic_Information> 7a52c: 4eb9 0004 c58c jsr 4c58c <_Objects_Get>
rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) {
7a532: 4fef 000c lea %sp@(12),%sp 7a536: 2440 moveal %d0,%a2 7a538: 4aae fffc tstl %fp@(-4) 7a53c: 661e bnes 7a55c <rtems_rate_monotonic_period+0x48>
case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) {
7a53e: 2039 000a 5396 movel a5396 <_Thread_Executing>,%d0 7a544: b0aa 0040 cmpl %a2@(64),%d0 7a548: 671e beqs 7a568 <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
7a54a: 4eb9 0004 cea8 jsr 4cea8 <_Thread_Enable_dispatch> 7a550: 7017 moveq #23,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7a552: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a558: 4e5e unlk %fp 7a55a: 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;
7a55c: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7a55e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a564: 4e5e unlk %fp 7a566: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) {
7a568: 4aae 000c tstl %fp@(12) 7a56c: 6700 00ce beqw 7a63c <rtems_rate_monotonic_period+0x128>
} _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level );
7a570: 203c 0000 0700 movel #1792,%d0 7a576: 40c3 movew %sr,%d3 7a578: 8083 orl %d3,%d0 7a57a: 46c0 movew %d0,%sr
switch ( the_period->state ) {
7a57c: 202a 0038 movel %a2@(56),%d0 7a580: 7202 moveq #2,%d1 7a582: b280 cmpl %d0,%d1 7a584: 6700 00dc beqw 7a662 <rtems_rate_monotonic_period+0x14e> 7a588: 123c 0004 moveb #4,%d1 7a58c: b280 cmpl %d0,%d1 7a58e: 6762 beqs 7a5f2 <rtems_rate_monotonic_period+0xde> 7a590: 4a80 tstl %d0 7a592: 66c8 bnes 7a55c <rtems_rate_monotonic_period+0x48>
case RATE_MONOTONIC_INACTIVE: { _ISR_Enable( level );
7a594: 46c3 movew %d3,%sr
/* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period );
7a596: 2f0a movel %a2,%sp@- 7a598: 2d40 fff8 movel %d0,%fp@(-8) 7a59c: 4eb9 0007 a2cc jsr 7a2cc <_Rate_monotonic_Initiate_statistics>
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
7a5a2: 223c 0007 a700 movel #501504,%d1
the_watchdog->id = id;
7a5a8: 2542 0030 movel %d2,%a2@(48)
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
7a5ac: 242e 000c movel %fp@(12),%d2
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
7a5b0: 2541 002c movel %d1,%a2@(44)
the_period->state = RATE_MONOTONIC_ACTIVE;
7a5b4: 7202 moveq #2,%d1
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
7a5b6: 2542 001c movel %d2,%a2@(28) 7a5ba: 2541 0038 movel %d1,%a2@(56)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
7a5be: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
7a5c2: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length;
7a5c6: 2542 003c movel %d2,%a2@(60)
) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
7a5ca: 486a 0010 pea %a2@(16) 7a5ce: 4879 000a 53b4 pea a53b4 <_Watchdog_Ticks_chain> 7a5d4: 4eb9 0004 df88 jsr 4df88 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
7a5da: 4eb9 0004 cea8 jsr 4cea8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
7a5e0: 202e fff8 movel %fp@(-8),%d0 7a5e4: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7a5e8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a5ee: 4e5e unlk %fp 7a5f0: 4e75 rts
case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period );
7a5f2: 2f0a movel %a2,%sp@- 7a5f4: 4eb9 0007 a3fa jsr 7a3fa <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
7a5fa: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
7a5fc: 7202 moveq #2,%d1
the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
7a5fe: 7006 moveq #6,%d0
Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units;
7a600: 242e 000c movel %fp@(12),%d2
*/ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE;
7a604: 2541 0038 movel %d1,%a2@(56) 7a608: 2542 001c movel %d2,%a2@(28)
the_period->next_length = length;
7a60c: 2542 003c movel %d2,%a2@(60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
7a610: 486a 0010 pea %a2@(16) 7a614: 4879 000a 53b4 pea a53b4 <_Watchdog_Ticks_chain> 7a61a: 2d40 fff8 movel %d0,%fp@(-8) 7a61e: 4eb9 0004 df88 jsr 4df88 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch();
7a624: 4eb9 0004 cea8 jsr 4cea8 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
7a62a: 202e fff8 movel %fp@(-8),%d0 7a62e: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7a632: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a638: 4e5e unlk %fp 7a63a: 4e75 rts
_Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) {
7a63c: 202a 0038 movel %a2@(56),%d0 7a640: 7204 moveq #4,%d1 7a642: b280 cmpl %d0,%d1 7a644: 6400 009c bccw 7a6e2 <rtems_rate_monotonic_period+0x1ce>
7a648: 4280 clrl %d0 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch();
7a64a: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 7a64e: 4eb9 0004 cea8 jsr 4cea8 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
7a654: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7a658: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a65e: 4e5e unlk %fp 7a660: 4e75 rts
case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period );
7a662: 2f0a movel %a2,%sp@- 7a664: 4eb9 0007 a3fa jsr 7a3fa <_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;
7a66a: 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;
7a66e: 7001 moveq #1,%d0
the_period->next_length = length;
7a670: 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;
7a674: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length; _ISR_Enable( level );
7a678: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
7a67a: 2079 000a 5396 moveal a5396 <_Thread_Executing>,%a0 7a680: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
7a686: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 7a68a: 2f08 movel %a0,%sp@- 7a68c: 4eb9 0004 d784 jsr 4d784 <_Thread_Set_state>
/* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level );
7a692: 203c 0000 0700 movel #1792,%d0 7a698: 40c1 movew %sr,%d1 7a69a: 8081 orl %d1,%d0 7a69c: 46c0 movew %d0,%sr
local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE;
7a69e: 7402 moveq #2,%d2
/* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state;
7a6a0: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
7a6a4: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
7a6a8: 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 )
7a6aa: 7203 moveq #3,%d1 7a6ac: 4fef 000c lea %sp@(12),%sp 7a6b0: b280 cmpl %d0,%d1 7a6b2: 6712 beqs 7a6c6 <rtems_rate_monotonic_period+0x1b2>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch();
7a6b4: 4eb9 0004 cea8 jsr 4cea8 <_Thread_Enable_dispatch> 7a6ba: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
7a6bc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 7a6c2: 4e5e unlk %fp 7a6c4: 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 );
7a6c6: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 7a6ca: 2f39 000a 5396 movel a5396 <_Thread_Executing>,%sp@- 7a6d0: 4eb9 0004 cad4 jsr 4cad4 <_Thread_Clear_state> 7a6d6: 508f addql #8,%sp
_Thread_Enable_dispatch();
7a6d8: 4eb9 0004 cea8 jsr 4cea8 <_Thread_Enable_dispatch> 7a6de: 4280 clrl %d0 7a6e0: 60da bras 7a6bc <rtems_rate_monotonic_period+0x1a8>
_Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) {
7a6e2: 41f9 0009 f38a lea 9f38a <CSWTCH.43>,%a0 7a6e8: 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();
7a6ec: 2d40 fff8 movel %d0,%fp@(-8) 7a6f0: 4eb9 0004 cea8 jsr 4cea8 <_Thread_Enable_dispatch>
return( return_value );
7a6f6: 202e fff8 movel %fp@(-8),%d0 7a6fa: 6000 ff5c braw 7a658 <rtems_rate_monotonic_period+0x144>
... 00069404 <rtems_rate_monotonic_report_statistics_with_plugin>: */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) {
69404: 4e56 ff78 linkw %fp,#-136 69408: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 6940c: 262e 0008 movel %fp@(8),%d3 69410: 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 )
69414: 4a8a tstl %a2 69416: 6700 0082 beqw 6949a <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return; (*print)( context, "Period information by period\n" );
6941a: 4879 0009 c02a pea 9c02a <_TOD_Days_per_month+0x68> 69420: 2f03 movel %d3,%sp@- 69422: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" );
69424: 4879 0009 c048 pea 9c048 <_TOD_Days_per_month+0x86> 6942a: 2f03 movel %d3,%sp@- 6942c: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
6942e: 4879 0009 c06a pea 9c06a <_TOD_Days_per_month+0xa8> 69434: 2f03 movel %d3,%sp@- 69436: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
69438: 4879 0009 c08d pea 9c08d <_TOD_Days_per_month+0xcb> 6943e: 2f03 movel %d3,%sp@- 69440: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " "
69442: 4fef 001c lea %sp@(28),%sp 69446: 2ebc 0009 c0d8 movel #639192,%sp@ 6944c: 2f03 movel %d3,%sp@- 6944e: 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 ;
69450: 2439 000a 570c movel a570c <_Rate_monotonic_Information+0x6>,%d2 69456: 508f addql #8,%sp 69458: b4b9 000a 5710 cmpl a5710 <_Rate_monotonic_Information+0xa>,%d2 6945e: 623a bhis 6949a <rtems_rate_monotonic_report_statistics_with_plugin+0x96> 69460: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name );
69462: 2a0e movel %fp,%d5 69464: 0684 ffff ffa2 addil #-94,%d4 6946a: 47f9 0007 a144 lea 7a144 <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 );
69470: 4bf9 0007 a204 lea 7a204 <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 );
69476: 5b85 subql #5,%d5 69478: 49f9 0004 a93c lea 4a93c <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 );
6947e: 2e3c 0006 ac58 movel #437336,%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 );
69484: 2f04 movel %d4,%sp@- 69486: 2f02 movel %d2,%sp@- 69488: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
6948a: 508f addql #8,%sp 6948c: 4a80 tstl %d0 6948e: 6714 beqs 694a4 <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++ ) {
69490: 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 ;
69492: b4b9 000a 5710 cmpl a5710 <_Rate_monotonic_Information+0xa>,%d2 69498: 63ea blss 69484 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } }
6949a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 694a0: 4e5e unlk %fp 694a2: 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 );
694a4: 486e ffda pea %fp@(-38) 694a8: 2f02 movel %d2,%sp@- 694aa: 4e95 jsr %a5@
#if defined(RTEMS_DEBUG) if ( status != RTEMS_SUCCESSFUL ) continue; #endif rtems_object_get_name( the_status.owner, sizeof(name), name );
694ac: 2f05 movel %d5,%sp@- 694ae: 4878 0005 pea 5 <COMPARE> 694b2: 2f2e ffda movel %fp@(-38),%sp@- 694b6: 4e94 jsr %a4@
/* * Print part of report line that is not dependent on granularity */ (*print)( context,
694b8: 2f2e ffa6 movel %fp@(-90),%sp@- 694bc: 2f2e ffa2 movel %fp@(-94),%sp@- 694c0: 2f05 movel %d5,%sp@- 694c2: 2f02 movel %d2,%sp@- 694c4: 4879 0009 c124 pea 9c124 <_TOD_Days_per_month+0x162> 694ca: 2f03 movel %d3,%sp@- 694cc: 4e92 jsr %a2@
); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) {
694ce: 202e ffa2 movel %fp@(-94),%d0 694d2: 4fef 002c lea %sp@(44),%sp 694d6: 6618 bnes 694f0 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
694d8: 4879 0009 d91b pea 9d91b <__FUNCTION__.5933+0x5d>
* 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++ ) {
694de: 5282 addql #1,%d2
/* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" );
694e0: 2f03 movel %d3,%sp@- 694e2: 4e92 jsr %a2@
continue;
694e4: 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 ;
694e6: b4b9 000a 5710 cmpl a5710 <_Rate_monotonic_Information+0xa>,%d2 694ec: 6396 blss 69484 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
694ee: 60aa bras 6949a <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 );
694f0: 486e fff2 pea %fp@(-14) 694f4: 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++ ) {
694f6: 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 );
694f8: 2f00 movel %d0,%sp@- 694fa: 486e ffba pea %fp@(-70) 694fe: 4e90 jsr %a0@
(*print)( context,
69500: 202e fff6 movel %fp@(-10),%d0 69504: 223c 0000 03e8 movel #1000,%d1 6950a: 4c41 0800 remsl %d1,%d0,%d0 6950e: 2c2e ffb6 movel %fp@(-74),%d6 69512: 2f00 movel %d0,%sp@- 69514: 2001 movel %d1,%d0 69516: 2f2e fff2 movel %fp@(-14),%sp@- 6951a: 4c40 6806 remsl %d0,%d6,%d6 6951e: 202e ffae movel %fp@(-82),%d0 69522: 2246 moveal %d6,%a1 69524: 223c 0000 03e8 movel #1000,%d1 6952a: 2f09 movel %a1,%sp@- 6952c: 2f2e ffb2 movel %fp@(-78),%sp@- 69530: 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,
69534: 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,
6953a: 2f00 movel %d0,%sp@- 6953c: 2f2e ffaa movel %fp@(-86),%sp@- 69540: 4879 0009 c13b pea 9c13b <_TOD_Days_per_month+0x179> 69546: 2f03 movel %d3,%sp@- 69548: 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);
6954a: 4fef 002c lea %sp@(44),%sp 6954e: 2047 moveal %d7,%a0 69550: 486e fff2 pea %fp@(-14) 69554: 2f2e ffa2 movel %fp@(-94),%sp@- 69558: 486e ffd2 pea %fp@(-46) 6955c: 4e90 jsr %a0@
(*print)( context,
6955e: 202e fff6 movel %fp@(-10),%d0 69562: 4c46 0800 remsl %d6,%d0,%d0 69566: 222e ffce movel %fp@(-50),%d1 6956a: 2f00 movel %d0,%sp@- 6956c: 2f2e fff2 movel %fp@(-14),%sp@- 69570: 4c46 1801 remsl %d6,%d1,%d1 69574: 202e ffc6 movel %fp@(-58),%d0 69578: 2241 moveal %d1,%a1 6957a: 2f09 movel %a1,%sp@- 6957c: 2f2e ffca movel %fp@(-54),%sp@- 69580: 4c46 0800 remsl %d6,%d0,%d0 69584: 2f00 movel %d0,%sp@- 69586: 2f2e ffc2 movel %fp@(-62),%sp@- 6958a: 4879 0009 c15a pea 9c15a <_TOD_Days_per_month+0x198> 69590: 2f03 movel %d3,%sp@- 69592: 4e92 jsr %a2@ 69594: 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 ;
69598: b4b9 000a 5710 cmpl a5710 <_Rate_monotonic_Information+0xa>,%d2 6959e: 6300 fee4 blsw 69484 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
695a2: 6000 fef6 braw 6949a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
000695c0 <rtems_rate_monotonic_reset_all_statistics>: /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) {
695c0: 4e56 0000 linkw %fp,#0 695c4: 2039 000a 52dc movel a52dc <_Thread_Dispatch_disable_level>,%d0 695ca: 5280 addql #1,%d0 695cc: 2f0a movel %a2,%sp@- 695ce: 23c0 000a 52dc movel %d0,a52dc <_Thread_Dispatch_disable_level> 695d4: 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 ;
695d6: 2439 000a 570c movel a570c <_Rate_monotonic_Information+0x6>,%d2 695dc: b4b9 000a 5710 cmpl a5710 <_Rate_monotonic_Information+0xa>,%d2 695e2: 6216 bhis 695fa <rtems_rate_monotonic_reset_all_statistics+0x3a> 695e4: 45f9 0006 960c lea 6960c <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_reset_statistics( id );
695ea: 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++ ) {
695ec: 5282 addql #1,%d2
status = rtems_rate_monotonic_reset_statistics( id );
695ee: 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 ;
695f0: 588f addql #4,%sp 695f2: b4b9 000a 5710 cmpl a5710 <_Rate_monotonic_Information+0xa>,%d2 695f8: 63f0 blss 695ea <rtems_rate_monotonic_reset_all_statistics+0x2a>
/* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); }
695fa: 242e fff8 movel %fp@(-8),%d2 695fe: 246e fffc moveal %fp@(-4),%a2 69602: 4e5e unlk %fp
} /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch();
69604: 4ef9 0004 cea8 jmp 4cea8 <_Thread_Enable_dispatch>
... 00057468 <rtems_region_create>: uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) {
57468: 4e56 ffec linkw %fp,#-20 5746c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57470: 262e 0008 movel %fp@(8),%d3 57474: 242e 000c movel %fp@(12),%d2 57478: 246e 001c moveal %fp@(28),%a2
rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) )
5747c: 4a83 tstl %d3 5747e: 6700 0096 beqw 57516 <rtems_region_create+0xae>
return RTEMS_INVALID_NAME; if ( !starting_address )
57482: 4a82 tstl %d2 57484: 670a beqs 57490 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS; if ( !id )
57486: 4a8a tstl %a2 57488: 6706 beqs 57490 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) )
5748a: 7003 moveq #3,%d0 5748c: c082 andl %d2,%d0 5748e: 670c beqs 5749c <rtems_region_create+0x34>
return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); return return_status;
57490: 7009 moveq #9,%d0
}
57492: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57498: 4e5e unlk %fp 5749a: 4e75 rts
return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */
5749c: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 574a2: 4eb9 0005 9de0 jsr 59de0 <_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 );
574a8: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 574ae: 4eb9 0005 b39c jsr 5b39c <_Objects_Allocate>
the_region = _Region_Allocate(); if ( !the_region )
574b4: 508f addql #8,%sp 574b6: 2640 moveal %d0,%a3 574b8: 4a80 tstl %d0 574ba: 6766 beqs 57522 <rtems_region_create+0xba>
return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize(
574bc: 2f2e 0014 movel %fp@(20),%sp@- 574c0: 2f2e 0010 movel %fp@(16),%sp@- 574c4: 2f02 movel %d2,%sp@- 574c6: 486b 0068 pea %a3@(104) 574ca: 4eb9 0005 ae20 jsr 5ae20 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) {
574d0: 4fef 0010 lea %sp@(16),%sp
if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize(
574d4: 2740 005c movel %d0,%a3@(92)
&the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) {
574d8: 6662 bnes 5753c <rtems_region_create+0xd4>
*/ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object );
574da: 2f0b movel %a3,%sp@- 574dc: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 574e2: 103c 0008 moveb #8,%d0 574e6: 2d40 fffc movel %d0,%fp@(-4) 574ea: 4eb9 0005 b6d4 jsr 5b6d4 <_Objects_Free> 574f0: 202e fffc movel %fp@(-4),%d0 574f4: 508f addql #8,%sp
*id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator();
574f6: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 574fc: 2d40 fffc movel %d0,%fp@(-4) 57500: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57506: 202e fffc movel %fp@(-4),%d0 5750a: 588f addql #4,%sp
}
5750c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57512: 4e5e unlk %fp 57514: 4e75 rts
) { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) )
57516: 7003 moveq #3,%d0
} } _RTEMS_Unlock_allocator(); return return_status; }
57518: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5751e: 4e5e unlk %fp 57520: 4e75 rts
*id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator();
57522: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
_RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region )
57528: 7005 moveq #5,%d0
*id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator();
5752a: 2d40 fffc movel %d0,%fp@(-4) 5752e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57534: 202e fffc movel %fp@(-4),%d0 57538: 588f addql #4,%sp 5753a: 60d0 bras 5750c <rtems_region_create+0xa4>
return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address;
5753c: 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(
57540: 222e 0018 movel %fp@(24),%d1
} else { the_region->starting_address = starting_address; the_region->length = length;
57544: 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(
57548: e489 lsrl #2,%d1
else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size;
5754a: 242e 0014 movel %fp@(20),%d2
the_region->attribute_set = attribute_set;
5754e: 206e 0018 moveal %fp@(24),%a0
} else { the_region->starting_address = starting_address; the_region->length = length;
57552: 2740 0054 movel %d0,%a3@(84)
&_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id;
57556: 4280 clrl %d0
else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size;
57558: 2742 0058 movel %d2,%a3@(88)
the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize(
5755c: 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;
5755e: 2748 0060 movel %a0,%a3@(96)
the_region->number_of_used_blocks = 0; _Thread_queue_Initialize(
57562: 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;
57564: 42ab 0064 clrl %a3@(100)
_Thread_queue_Initialize(
57568: 4878 0006 pea 6 <EXTENDSFDF> 5756c: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 57570: 2f02 movel %d2,%sp@- 57572: 486b 0010 pea %a3@(16)
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
57576: 4282 clrl %d2 57578: 2d40 fffc movel %d0,%fp@(-4) 5757c: 4eb9 0005 c8e4 jsr 5c8e4 <_Thread_queue_Initialize> 57582: 222b 0008 movel %a3@(8),%d1
&_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id;
57586: 4fef 0010 lea %sp@(16),%sp 5758a: 2079 0007 cfd0 moveal 7cfd0 <_Region_Information+0x18>,%a0 57590: 3401 movew %d1,%d2
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
57592: 2743 000c movel %d3,%a3@(12) 57596: 202e fffc movel %fp@(-4),%d0
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
5759a: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 5759e: 2481 movel %d1,%a2@
return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator();
575a0: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 575a6: 2d40 fffc movel %d0,%fp@(-4) 575aa: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
575b0: 202e fffc movel %fp@(-4),%d0 575b4: 588f addql #4,%sp 575b6: 6000 ff54 braw 5750c <rtems_region_create+0xa4>
... 0005766c <rtems_region_extend>: rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) {
5766c: 4e56 fff8 linkw %fp,#-8 57670: 2f0a movel %a2,%sp@- 57672: 2f02 movel %d2,%sp@- 57674: 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 )
57678: 677e beqs 576f8 <rtems_region_extend+0x8c>
return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */
5767a: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 57680: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *)
57686: 486e fff8 pea %fp@(-8) 5768a: 2f2e 0008 movel %fp@(8),%sp@- 5768e: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 57694: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location ); switch ( location ) {
5769a: 4fef 0010 lea %sp@(16),%sp 5769e: 2440 moveal %d0,%a2 576a0: 4aae fff8 tstl %fp@(-8) 576a4: 6640 bnes 576e6 <rtems_region_extend+0x7a>
case OBJECTS_LOCAL: heap_status = _Heap_Extend(
576a6: 486e fffc pea %fp@(-4) 576aa: 2f2e 0010 movel %fp@(16),%sp@- 576ae: 2f02 movel %d2,%sp@- 576b0: 486a 0068 pea %a2@(104) 576b4: 4eb9 0005 ab10 jsr 5ab10 <_Heap_Extend>
starting_address, length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
576ba: 4fef 0010 lea %sp@(16),%sp 576be: 4a80 tstl %d0 576c0: 6748 beqs 5770a <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 ) {
576c2: 7201 moveq #1,%d1 576c4: b280 cmpl %d0,%d1 576c6: 6760 beqs 57728 <rtems_region_extend+0xbc>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
576c8: 2f39 0007 d166 movel 7d166 <_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 ) {
576ce: 7418 moveq #24,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
576d0: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
576d6: 588f addql #4,%sp
}
576d8: 2002 movel %d2,%d0 576da: 242e fff0 movel %fp@(-16),%d2 576de: 246e fff4 moveal %fp@(-12),%a2 576e2: 4e5e unlk %fp 576e4: 4e75 rts
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
576e6: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) {
576ec: 7404 moveq #4,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
576ee: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
576f4: 588f addql #4,%sp 576f6: 60e0 bras 576d8 <rtems_region_extend+0x6c>
Heap_Extend_status heap_status; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address )
576f8: 143c 0009 moveb #9,%d2
break; } _RTEMS_Unlock_allocator(); return return_status; }
576fc: 2002 movel %d2,%d0 576fe: 242e fff0 movel %fp@(-16),%d2 57702: 246e fff4 moveal %fp@(-12),%a2 57706: 4e5e unlk %fp 57708: 4e75 rts
length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended;
5770a: 202e fffc movel %fp@(-4),%d0
the_region->maximum_segment_size += amount_extended;
5770e: d1aa 005c addl %d0,%a2@(92) 57712: 4282 clrl %d2
length, &amount_extended ); if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { the_region->length += amount_extended;
57714: d1aa 0054 addl %d0,%a2@(84)
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57718: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 5771e: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57724: 588f addql #4,%sp 57726: 60b0 bras 576d8 <rtems_region_extend+0x6c>
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57728: 2f39 0007 d166 movel 7d166 <_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 ) {
5772e: 7409 moveq #9,%d2
default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57730: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57736: 588f addql #4,%sp 57738: 609e bras 576d8 <rtems_region_extend+0x6c>
... 000579c0 <rtems_region_get_segment_size>: rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) {
579c0: 4e56 fffc linkw %fp,#-4 579c4: 2f03 movel %d3,%sp@- 579c6: 262e 0010 movel %fp@(16),%d3 579ca: 2f02 movel %d2,%sp@- 579cc: 242e 000c movel %fp@(12),%d2
Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment )
579d0: 6700 0092 beqw 57a64 <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS; if ( !size )
579d4: 4a83 tstl %d3 579d6: 6700 008c beqw 57a64 <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator();
579da: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@- 579e0: 4eb9 0005 9de0 jsr 59de0 <_API_Mutex_Lock> 579e6: 486e fffc pea %fp@(-4) 579ea: 2f2e 0008 movel %fp@(8),%sp@- 579ee: 4879 0007 cfb8 pea 7cfb8 <_Region_Information> 579f4: 4eb9 0005 b838 jsr 5b838 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location ); switch ( location ) {
579fa: 222e fffc movel %fp@(-4),%d1 579fe: 4fef 0010 lea %sp@(16),%sp 57a02: 6636 bnes 57a3a <rtems_region_get_segment_size+0x7a>
case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
57a04: 2f03 movel %d3,%sp@- 57a06: 2040 moveal %d0,%a0 57a08: 2f02 movel %d2,%sp@- 57a0a: 4868 0068 pea %a0@(104) 57a0e: 4eb9 0005 b274 jsr 5b274 <_Heap_Size_of_alloc_area> 57a14: 4fef 000c lea %sp@(12),%sp 57a18: 4a00 tstb %d0 57a1a: 6624 bnes 57a40 <rtems_region_get_segment_size+0x80>
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a1c: 2f39 0007 d166 movel 7d166 <_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 ) )
57a22: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a24: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
57a2a: 588f addql #4,%sp <== NOT EXECUTED
}
57a2c: 2002 movel %d2,%d0 57a2e: 242e fff4 movel %fp@(-12),%d2 57a32: 262e fff8 movel %fp@(-8),%d3 57a36: 4e5e unlk %fp 57a38: 4e75 rts
return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) {
57a3a: 7001 moveq #1,%d0 57a3c: b081 cmpl %d1,%d0 57a3e: 6712 beqs 57a52 <rtems_region_get_segment_size+0x92>
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a40: 2f39 0007 d166 movel 7d166 <_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 ) )
57a46: 4282 clrl %d2
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a48: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57a4e: 588f addql #4,%sp 57a50: 60da bras 57a2c <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a52: 2f39 0007 d166 movel 7d166 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) {
57a58: 7404 moveq #4,%d2
case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator();
57a5a: 4eb9 0005 9e40 jsr 59e40 <_API_Mutex_Unlock>
return return_status;
57a60: 588f addql #4,%sp 57a62: 60c8 bras 57a2c <rtems_region_get_segment_size+0x6c> 57a64: 7409 moveq #9,%d2
}
57a66: 2002 movel %d2,%d0 57a68: 242e fff4 movel %fp@(-12),%d2 57a6c: 262e fff8 movel %fp@(-8),%d3
57a70: 4e5e unlk %fp <== NOT EXECUTED
00045a8c <rtems_semaphore_create>: uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) {
45a8c: 4e56 ffd4 linkw %fp,#-44 45a90: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 45a94: 262e 0008 movel %fp@(8),%d3 45a98: 242e 0010 movel %fp@(16),%d2 45a9c: 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 ) )
45aa0: 4a83 tstl %d3 45aa2: 6748 beqs 45aec <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME; if ( !id )
45aa4: 4a8a tstl %a2 45aa6: 6700 00ea beqw 45b92 <rtems_semaphore_create+0x106>
* id - semaphore id * RTEMS_SUCCESSFUL - if successful * error code - if unsuccessful */ rtems_status_code rtems_semaphore_create(
45aaa: 2002 movel %d2,%d0 45aac: 0280 0000 00c0 andil #192,%d0
return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) ||
45ab2: 6744 beqs 45af8 <rtems_semaphore_create+0x6c>
_Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
45ab4: 7230 moveq #48,%d1 45ab6: 7810 moveq #16,%d4 45ab8: c282 andl %d2,%d1 45aba: b881 cmpl %d1,%d4 45abc: 670c beqs 45aca <rtems_semaphore_create+0x3e>
name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL;
45abe: 700b moveq #11,%d0
}
45ac0: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ac6: 4e5e unlk %fp 45ac8: 4e75 rts
#endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
45aca: 44c2 movew %d2,%ccr 45acc: 66f0 bnes 45abe <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) &&
45ace: 0c80 0000 00c0 cmpil #192,%d0 45ad4: 67e8 beqs 45abe <rtems_semaphore_create+0x32>
_Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
45ad6: 7001 moveq #1,%d0 45ad8: b0ae 000c cmpl %fp@(12),%d0 45adc: 6420 bccs 45afe <rtems_semaphore_create+0x72> 45ade: 103c 000a moveb #10,%d0
0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
45ae2: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45ae8: 4e5e unlk %fp 45aea: 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 ) )
45aec: 7003 moveq #3,%d0
0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
45aee: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45af4: 4e5e unlk %fp 45af6: 4e75 rts
*/ RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
45af8: 7830 moveq #48,%d4 45afa: 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 ) )
45afc: 66d8 bnes 45ad6 <rtems_semaphore_create+0x4a>
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
45afe: 2039 0005 d9c8 movel 5d9c8 <_Thread_Dispatch_disable_level>,%d0 45b04: 5280 addql #1,%d0 45b06: 23c0 0005 d9c8 movel %d0,5d9c8 <_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 );
45b0c: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45b12: 4eb9 0004 7034 jsr 47034 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) {
45b18: 588f addql #4,%sp 45b1a: 2640 moveal %d0,%a3 45b1c: 4a80 tstl %d0 45b1e: 6700 00d8 beqw 45bf8 <rtems_semaphore_create+0x16c>
_Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_semaphore->attribute_set = attribute_set;
45b22: 2742 0010 movel %d2,%a3@(16)
/* * Initialize it as a counting semaphore. */ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
45b26: 4a84 tstl %d4 45b28: 6774 beqs 45b9e <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;
45b2a: 44c2 movew %d2,%ccr 45b2c: 56c0 sne %d0 45b2e: 49c0 extbl %d0 45b30: 5280 addql #1,%d0 45b32: 2d40 fff0 movel %d0,%fp@(-16)
else the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
45b36: 7010 moveq #16,%d0 45b38: b084 cmpl %d4,%d0 45b3a: 6700 00ce beqw 45c0a <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;
45b3e: 7202 moveq #2,%d1
the_mutex_attr.only_owner_release = false;
45b40: 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;
45b42: 2d41 ffea movel %d1,%fp@(-22)
the_mutex_attr.only_owner_release = false;
45b46: 1d44 ffee moveb %d4,%fp@(-18)
} mutex_status = _CORE_mutex_Initialize(
45b4a: 7001 moveq #1,%d0 45b4c: b0ae 000c cmpl %fp@(12),%d0 45b50: 57c0 seq %d0 45b52: 49c0 extbl %d0 45b54: 4480 negl %d0 45b56: 2f00 movel %d0,%sp@- 45b58: 486e ffea pea %fp@(-22) 45b5c: 486b 0014 pea %a3@(20) 45b60: 4eb9 0004 6780 jsr 46780 <_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 ) {
45b66: 4fef 000c lea %sp@(12),%sp 45b6a: 7206 moveq #6,%d1 45b6c: b280 cmpl %d0,%d1 45b6e: 665e bnes 45bce <rtems_semaphore_create+0x142>
*/ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
45b70: 2f0b movel %a3,%sp@- 45b72: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45b78: 4eb9 0004 736c jsr 4736c <_Objects_Free>
_Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch();
45b7e: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
45b84: 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();
45b86: 7013 moveq #19,%d0
0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
45b88: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b8e: 4e5e unlk %fp 45b90: 4e75 rts
CORE_mutex_Status mutex_status; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id )
45b92: 7009 moveq #9,%d0
0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
45b94: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45b9a: 4e5e unlk %fp 45b9c: 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(
45b9e: 2f2e 000c movel %fp@(12),%sp@-
*/ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF;
45ba2: 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(
45ba4: 486e fff8 pea %fp@(-8) 45ba8: 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;
45bac: 44c2 movew %d2,%ccr 45bae: 56c0 sne %d0
*/ if ( _Attributes_Is_counting_semaphore( attribute_set ) ) { /* * This effectively disables limit checking. */ the_semaphore_attr.maximum_count = 0xFFFFFFFF;
45bb0: 2d41 fff8 movel %d1,%fp@(-8)
if ( _Attributes_Is_priority( attribute_set ) ) the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
45bb4: 49c0 extbl %d0 45bb6: 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;
45bb8: 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;
45bbc: 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;
45bc0: 42ae fff4 clrl %fp@(-12)
_CORE_semaphore_Initialize(
45bc4: 4eb9 0004 6ac8 jsr 46ac8 <_CORE_semaphore_Initialize> 45bca: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
45bce: 202b 0008 movel %a3@(8),%d0 45bd2: 4281 clrl %d1 45bd4: 2079 0005 d91c moveal 5d91c <_Semaphore_Information+0x18>,%a0 45bda: 3200 movew %d0,%d1
information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name;
45bdc: 2743 000c movel %d3,%a3@(12)
#if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object;
45be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id;
45be4: 2480 movel %d0,%a2@
the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch();
45be6: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
45bec: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3
the_semaphore->Object.id, name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch();
45bf2: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
45bf4: 4e5e unlk %fp 45bf6: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch();
45bf8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch> 45bfe: 7005 moveq #5,%d0
0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; }
45c00: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 45c06: 4e5e unlk %fp 45c08: 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;
45c0a: 42ae ffea clrl %fp@(-22)
the_mutex_attr.only_owner_release = false; if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
45c0e: 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;
45c10: 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;
45c12: 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;
45c18: 1d41 ffee moveb %d1,%fp@(-18)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
45c1c: b8ae fff0 cmpl %fp@(-16),%d4 45c20: 6600 ff28 bnew 45b4a <rtems_semaphore_create+0xbe>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
45c24: 0802 0006 btst #6,%d2 45c28: 6712 beqs 45c3c <rtems_semaphore_create+0x1b0>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
45c2a: 103c 0002 moveb #2,%d0
the_mutex_attr.only_owner_release = true;
45c2e: 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;
45c30: 2d40 fff0 movel %d0,%fp@(-16)
the_mutex_attr.only_owner_release = true;
45c34: 1d41 ffee moveb %d1,%fp@(-18) 45c38: 6000 ff10 braw 45b4a <rtems_semaphore_create+0xbe>
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
45c3c: 4a02 tstb %d2 45c3e: 6c00 ff0a bgew 45b4a <rtems_semaphore_create+0xbe>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
45c42: 7803 moveq #3,%d4
the_mutex_attr.only_owner_release = true;
45c44: 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;
45c46: 2d44 fff0 movel %d4,%fp@(-16)
the_mutex_attr.only_owner_release = true;
45c4a: 1d40 ffee moveb %d0,%fp@(-18) 45c4e: 6000 fefa braw 45b4a <rtems_semaphore_create+0xbe>
... 00045c54 <rtems_semaphore_delete>: #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) {
45c54: 4e56 fffc linkw %fp,#-4 45c58: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *)
45c5a: 486e fffc pea %fp@(-4) 45c5e: 2f2e 0008 movel %fp@(8),%sp@- 45c62: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45c68: 4eb9 0004 74d0 jsr 474d0 <_Objects_Get>
register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) {
45c6e: 4fef 000c lea %sp@(12),%sp 45c72: 2440 moveal %d0,%a2 45c74: 4aae fffc tstl %fp@(-4) 45c78: 670a beqs 45c84 <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45c7a: 246e fff8 moveal %fp@(-8),%a2
{ register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) {
45c7e: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45c80: 4e5e unlk %fp 45c82: 4e75 rts 45c84: 7030 moveq #48,%d0 45c86: 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) ) {
45c8a: 6760 beqs 45cec <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
45c8c: 4aaa 0062 tstl %a2@(98) 45c90: 6616 bnes 45ca8 <rtems_semaphore_delete+0x54> 45c92: 7220 moveq #32,%d1 45c94: b280 cmpl %d0,%d1 45c96: 6710 beqs 45ca8 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch();
45c98: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45c9e: 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();
45ca2: 700c moveq #12,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45ca4: 4e5e unlk %fp 45ca6: 4e75 rts
!_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush(
45ca8: 4878 0004 pea 4 <CONTEXT_ARG> 45cac: 42a7 clrl %sp@- 45cae: 486a 0014 pea %a2@(20) 45cb2: 4eb9 0004 6774 jsr 46774 <_CORE_mutex_Flush> 45cb8: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
45cbc: 2f0a movel %a2,%sp@- 45cbe: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45cc4: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close>
*/ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
45cca: 2f0a movel %a2,%sp@- 45ccc: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45cd2: 4eb9 0004 736c jsr 4736c <_Objects_Free>
0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch();
45cd8: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
45cde: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch();
45ce2: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
45ce4: 246e fff8 moveal %fp@(-8),%a2 45ce8: 4e5e unlk %fp 45cea: 4e75 rts
&the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush(
45cec: 4878 0002 pea 2 <DOUBLE_FLOAT> 45cf0: 42a7 clrl %sp@- 45cf2: 486a 0014 pea %a2@(20) 45cf6: 4eb9 0004 6abc jsr 46abc <_CORE_semaphore_Flush> 45cfc: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
45d00: 2f0a movel %a2,%sp@- 45d02: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45d08: 4eb9 0004 70c4 jsr 470c4 <_Objects_Close> 45d0e: 2f0a movel %a2,%sp@- 45d10: 4879 0005 d904 pea 5d904 <_Semaphore_Information> 45d16: 4eb9 0004 736c jsr 4736c <_Objects_Free>
0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch();
45d1c: 4eb9 0004 7d3c jsr 47d3c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
45d22: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch();
45d26: 4280 clrl %d0 45d28: 60ba bras 45ce4 <rtems_semaphore_delete+0x90>
... 00050388 <rtems_semaphore_flush>: #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) {
50388: 4e56 fffc linkw %fp,#-4 5038c: 486e fffc pea %fp@(-4) 50390: 2f2e 0008 movel %fp@(8),%sp@- 50394: 4879 0006 399c pea 6399c <_Semaphore_Information> 5039a: 4eb9 0004 9520 jsr 49520 <_Objects_Get>
register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) {
503a0: 4fef 000c lea %sp@(12),%sp 503a4: 4aae fffc tstl %fp@(-4) 503a8: 6706 beqs 503b0 <rtems_semaphore_flush+0x28> 503aa: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
503ac: 4e5e unlk %fp 503ae: 4e75 rts
the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
503b0: 7230 moveq #48,%d1 503b2: 2040 moveal %d0,%a0 503b4: c2a8 0010 andl %a0@(16),%d1 503b8: 6720 beqs 503da <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
503ba: 4878 0001 pea 1 <ADD> 503be: 42a7 clrl %sp@- 503c0: 4868 0014 pea %a0@(20) 503c4: 4eb9 0004 8728 jsr 48728 <_CORE_mutex_Flush> 503ca: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch();
503ce: 4eb9 0004 9e0c jsr 49e0c <_Thread_Enable_dispatch> 503d4: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
503d6: 4e5e unlk %fp 503d8: 4e75 rts
&the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush(
503da: 4878 0001 pea 1 <ADD> 503de: 2040 moveal %d0,%a0 503e0: 42a7 clrl %sp@- 503e2: 4868 0014 pea %a0@(20) 503e6: 4eb9 0004 8a70 jsr 48a70 <_CORE_semaphore_Flush> 503ec: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch();
503f0: 4eb9 0004 9e0c jsr 49e0c <_Thread_Enable_dispatch> 503f6: 4280 clrl %d0 503f8: 60dc bras 503d6 <rtems_semaphore_flush+0x4e>
... 00058f30 <rtems_timer_reset>: */ rtems_status_code rtems_timer_reset( rtems_id id ) {
58f30: 4e56 fff0 linkw %fp,#-16 58f34: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 58f38: 486e fffc pea %fp@(-4) 58f3c: 2f2e 0008 movel %fp@(8),%sp@- 58f40: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 58f46: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) {
58f4c: 4fef 000c lea %sp@(12),%sp 58f50: 2440 moveal %d0,%a2 58f52: 4aae fffc tstl %fp@(-4) 58f56: 670e beqs 58f66 <rtems_timer_reset+0x36> 58f58: 7404 moveq #4,%d2
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58f5a: 2002 movel %d2,%d0 58f5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f62: 4e5e unlk %fp 58f64: 4e75 rts
the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) {
58f66: 202a 0038 movel %a2@(56),%d0 58f6a: 671a beqs 58f86 <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 ) {
58f6c: 7201 moveq #1,%d1 58f6e: b280 cmpl %d0,%d1 58f70: 673c beqs 58fae <rtems_timer_reset+0x7e> 58f72: 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();
58f74: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
58f7a: 2002 movel %d2,%d0 58f7c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 58f82: 4e5e unlk %fp 58f84: 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 );
58f86: 45ea 0010 lea %a2@(16),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
58f8a: 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 );
58f8c: 2f0a movel %a2,%sp@- 58f8e: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
58f94: 2f0a movel %a2,%sp@- 58f96: 4879 0007 d18c pea 7d18c <_Watchdog_Ticks_chain> 58f9c: 4eb9 0005 d580 jsr 5d580 <_Watchdog_Insert> 58fa2: 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();
58fa6: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58fac: 60cc bras 58f7a <rtems_timer_reset+0x4a>
if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker );
58fae: 486a 0010 pea %a2@(16)
(*timer_server->schedule_operation)( timer_server, the_timer );
58fb2: 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;
58fb4: 2679 0007 d30e moveal 7d30e <_Timer_server>,%a3
if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker );
58fba: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
58fc0: 2f0a movel %a2,%sp@- 58fc2: 2f0b movel %a3,%sp@- 58fc4: 206b 0004 moveal %a3@(4),%a0 58fc8: 4e90 jsr %a0@ 58fca: 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();
58fce: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch> 58fd4: 60a4 bras 58f7a <rtems_timer_reset+0x4a>
... 000590c0 <rtems_timer_server_fire_when>: rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) {
590c0: 4e56 ffec linkw %fp,#-20 590c4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 590c8: 242e 000c movel %fp@(12),%d2 590cc: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
590d0: 2479 0007 d30e moveal 7d30e <_Timer_server>,%a2
if ( !timer_server )
590d6: 4a8a tstl %a2 590d8: 6700 00c8 beqw 591a2 <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set )
590dc: 4a39 0007 d0c8 tstb 7d0c8 <_TOD_Is_set> 590e2: 6700 00a6 beqw 5918a <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED; if ( !routine )
590e6: 4a83 tstl %d3 590e8: 6700 00ac beqw 59196 <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) )
590ec: 2f02 movel %d2,%sp@- 590ee: 4eb9 0005 5d94 jsr 55d94 <_TOD_Validate> 590f4: 588f addql #4,%sp 590f6: 4a00 tstb %d0 590f8: 660c bnes 59106 <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;
590fa: 7014 moveq #20,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
590fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59102: 4e5e unlk %fp 59104: 4e75 rts
return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time );
59106: 2f02 movel %d2,%sp@- 59108: 4eb9 0005 5c84 jsr 55c84 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
5910e: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time );
59110: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
59112: b0b9 0007 d146 cmpl 7d146 <_TOD_Now>,%d0 59118: 63e0 blss 590fa <rtems_timer_server_fire_when+0x3a> 5911a: 486e fffc pea %fp@(-4) 5911e: 2f2e 0008 movel %fp@(8),%sp@- 59122: 4879 0007 d2d6 pea 7d2d6 <_Timer_Information> 59128: 4eb9 0005 b874 jsr 5b874 <_Objects_Get>
return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) {
5912e: 4fef 000c lea %sp@(12),%sp 59132: 2640 moveal %d0,%a3 59134: 4aae fffc tstl %fp@(-4) 59138: 6674 bnes 591ae <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker );
5913a: 486b 0010 pea %a3@(16) 5913e: 4eb9 0005 d6c8 jsr 5d6c8 <_Watchdog_Remove>
the_watchdog->routine = routine; the_watchdog->id = id;
59144: 202e 0008 movel %fp@(8),%d0 59148: 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();
5914c: 94b9 0007 d146 subl 7d146 <_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;
59152: 7003 moveq #3,%d0
the_watchdog->user_data = user_data;
59154: 276e 0014 0034 movel %fp@(20),%a3@(52) 5915a: 2740 0038 movel %d0,%a3@(56)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
5915e: 2742 001c movel %d2,%a3@(28)
Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine;
59162: 2743 002c movel %d3,%a3@(44)
Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE;
59166: 42ab 0018 clrl %a3@(24)
(*timer_server->schedule_operation)( timer_server, the_timer );
5916a: 2f0b movel %a3,%sp@- 5916c: 2f0a movel %a2,%sp@- 5916e: 206a 0004 moveal %a2@(4),%a0 59172: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59174: 4eb9 0005 c164 jsr 5c164 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5917a: 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();
5917e: 4280 clrl %d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
59180: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59186: 4e5e unlk %fp 59188: 4e75 rts
Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set )
5918a: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
5918c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59192: 4e5e unlk %fp <== NOT EXECUTED 59194: 4e75 rts <== NOT EXECUTED
return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine )
59196: 7009 moveq #9,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
59198: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5919e: 4e5e unlk %fp 591a0: 4e75 rts
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server )
591a2: 700e moveq #14,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
591a4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591aa: 4e5e unlk %fp 591ac: 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 ) {
591ae: 7004 moveq #4,%d0
case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; }
591b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591b6: 4e5e unlk %fp
...