RTEMS 4.11Annotated Report
Wed Jul 27 17:41:34 2011
ffc11a98 <_CORE_message_queue_Initialize>:
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
)
{
ffc11a98: 94 21 ff e0 stwu r1,-32(r1)
ffc11a9c: 7c 08 02 a6 mflr r0
ffc11aa0: 90 01 00 24 stw r0,36(r1)
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
ffc11aa4: 38 00 00 00 li r0,0
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
)
{
ffc11aa8: bf 81 00 10 stmw r28,16(r1)
ffc11aac: 7c 7f 1b 78 mr r31,r3
ffc11ab0: 7c 9d 23 78 mr r29,r4
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
ffc11ab4: 90 03 00 48 stw r0,72(r3)
/*
* 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)) {
ffc11ab8: 70 c0 00 03 andi. r0,r6,3
ffc11abc: 7c dc 33 78 mr r28,r6
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
ffc11ac0: 90 a3 00 44 stw r5,68(r3)
the_message_queue->number_of_pending_messages = 0;
the_message_queue->maximum_message_size = maximum_message_size;
ffc11ac4: 90 c3 00 4c stw r6,76(r3)
/*
* 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)) {
ffc11ac8: 41 82 00 18 beq- ffc11ae0 <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uint32_t);
ffc11acc: 3b 86 00 04 addi r28,r6,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
ffc11ad0: 57 9c 00 3a rlwinm r28,r28,0,0,29
}
if (allocated_message_size < maximum_message_size)
ffc11ad4: 7f 9c 30 40 cmplw cr7,r28,r6
return false;
ffc11ad8: 3b c0 00 00 li r30,0
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
allocated_message_size &= ~(sizeof(uint32_t) - 1);
}
if (allocated_message_size < maximum_message_size)
ffc11adc: 41 bc 00 80 blt+ cr7,ffc11b5c <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
ffc11ae0: 3b 9c 00 10 addi r28,r28,16
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
ffc11ae4: 7d 45 e0 16 mulhwu r10,r5,r28
ffc11ae8: 7d 65 e1 d6 mullw r11,r5,r28
if ( x > SIZE_MAX )
ffc11aec: 2f 8a 00 00 cmpwi cr7,r10,0
*/
if ( !size_t_mult32_with_overflow(
(size_t) maximum_pending_messages,
allocated_message_size + sizeof(CORE_message_queue_Buffer_control),
&message_buffering_required ) )
return false;
ffc11af0: 3b c0 00 00 li r30,0
size_t *c
)
{
long long x = (long long)a*b;
if ( x > SIZE_MAX )
ffc11af4: 41 9d 00 68 bgt- cr7,ffc11b5c <_CORE_message_queue_Initialize+0xc4>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
ffc11af8: 7d 63 5b 78 mr r3,r11
ffc11afc: 90 a1 00 08 stw r5,8(r1)
ffc11b00: 48 00 32 35 bl ffc14d34 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
ffc11b04: 2f 83 00 00 cmpwi cr7,r3,0
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
ffc11b08: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
ffc11b0c: 7c 64 1b 78 mr r4,r3
if (the_message_queue->message_buffers == 0)
ffc11b10: 80 a1 00 08 lwz r5,8(r1)
ffc11b14: 41 9e 00 48 beq- cr7,ffc11b5c <_CORE_message_queue_Initialize+0xc4>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc11b18: 38 7f 00 60 addi r3,r31,96
ffc11b1c: 7f 86 e3 78 mr r6,r28
ffc11b20: 48 00 50 8d bl ffc16bac <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc11b24: 80 9d 00 00 lwz r4,0(r29)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc11b28: 38 1f 00 50 addi r0,r31,80
head->next = tail;
head->previous = NULL;
ffc11b2c: 93 df 00 54 stw r30,84(r31)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc11b30: 39 3f 00 54 addi r9,r31,84
ffc11b34: 68 84 00 01 xori r4,r4,1
head->next = tail;
ffc11b38: 91 3f 00 50 stw r9,80(r31)
ffc11b3c: 7c 84 00 34 cntlzw r4,r4
head->previous = NULL;
tail->previous = head;
ffc11b40: 90 1f 00 58 stw r0,88(r31)
ffc11b44: 7f e3 fb 78 mr r3,r31
ffc11b48: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc11b4c: 38 a0 00 80 li r5,128
ffc11b50: 38 c0 00 06 li r6,6
ffc11b54: 48 00 27 75 bl ffc142c8 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
ffc11b58: 3b c0 00 01 li r30,1
}
ffc11b5c: 39 61 00 20 addi r11,r1,32
ffc11b60: 7f c3 f3 78 mr r3,r30
ffc11b64: 4b ff 3e 64 b ffc059c8 <_restgpr_28_x>
ffc08fd0 <_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
)
{
ffc08fd0: 7c 08 02 a6 mflr r0
ffc08fd4: 7c 2b 0b 78 mr r11,r1
ffc08fd8: 94 21 ff f0 stwu r1,-16(r1)
ffc08fdc: 90 01 00 14 stw r0,20(r1)
ffc08fe0: 48 01 13 55 bl ffc1a334 <_savegpr_31>
ffc08fe4: 7c 7f 1b 78 mr r31,r3
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc08fe8: 48 00 1c ad bl ffc0ac94 <_Thread_queue_Dequeue>
ffc08fec: 2f 83 00 00 cmpwi cr7,r3,0
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc08ff0: 38 00 00 00 li r0,0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc08ff4: 40 be 00 38 bne+ cr7,ffc0902c <_CORE_semaphore_Surrender+0x5c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08ff8: 7d 60 00 a6 mfmsr r11
ffc08ffc: 7c 10 42 a6 mfsprg r0,0
ffc09000: 7d 60 00 78 andc r0,r11,r0
ffc09004: 7c 00 01 24 mtmsr r0
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09008: 81 3f 00 48 lwz r9,72(r31)
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
ffc0900c: 38 00 00 04 li r0,4
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09010: 81 5f 00 40 lwz r10,64(r31)
ffc09014: 7f 89 50 40 cmplw cr7,r9,r10
ffc09018: 40 9c 00 10 bge- cr7,ffc09028 <_CORE_semaphore_Surrender+0x58><== NEVER TAKEN
the_semaphore->count += 1;
ffc0901c: 39 29 00 01 addi r9,r9,1
ffc09020: 91 3f 00 48 stw r9,72(r31)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc09024: 38 00 00 00 li r0,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc09028: 7d 60 01 24 mtmsr r11
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0902c: 39 61 00 10 addi r11,r1,16
ffc09030: 7c 03 03 78 mr r3,r0
ffc09034: 4b ff 75 00 b ffc00534 <_restgpr_31_x>
ffc07bc8 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
ffc07bc8: 7c 2b 0b 78 mr r11,r1
ffc07bcc: 7c 08 02 a6 mflr r0
ffc07bd0: 94 21 ff f0 stwu r1,-16(r1)
ffc07bd4: 90 01 00 14 stw r0,20(r1)
ffc07bd8: 48 01 27 5d bl ffc1a334 <_savegpr_31>
ffc07bdc: 7c 7f 1b 78 mr r31,r3
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc07be0: 81 03 01 2c lwz r8,300(r3)
option_set = (rtems_option) the_thread->Wait.option;
ffc07be4: 80 e3 00 30 lwz r7,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07be8: 7c 00 00 a6 mfmsr r0
ffc07bec: 7d 30 42 a6 mfsprg r9,0
ffc07bf0: 7c 09 48 78 andc r9,r0,r9
ffc07bf4: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
pending_events = api->pending_events;
ffc07bf8: 81 68 00 00 lwz r11,0(r8)
event_condition = (rtems_event_set) the_thread->Wait.count;
ffc07bfc: 81 43 00 24 lwz r10,36(r3)
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
ffc07c00: 7d 49 58 39 and. r9,r10,r11
ffc07c04: 41 82 00 f4 beq- ffc07cf8 <_Event_Surrender+0x130>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
ffc07c08: 3c c0 00 00 lis r6,0
ffc07c0c: 38 c6 2d b8 addi r6,r6,11704
ffc07c10: 80 a6 00 08 lwz r5,8(r6)
ffc07c14: 2f 85 00 00 cmpwi cr7,r5,0
ffc07c18: 41 9e 00 64 beq- cr7,ffc07c7c <_Event_Surrender+0xb4>
ffc07c1c: 80 c6 00 0c lwz r6,12(r6)
ffc07c20: 7f 83 30 00 cmpw cr7,r3,r6
ffc07c24: 40 be 00 58 bne+ cr7,ffc07c7c <_Event_Surrender+0xb4>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc07c28: 3c c0 00 00 lis r6,0
ffc07c2c: 80 a6 28 0c lwz r5,10252(r6)
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
ffc07c30: 2f 85 00 02 cmpwi cr7,r5,2
ffc07c34: 41 9e 00 10 beq- cr7,ffc07c44 <_Event_Surrender+0x7c> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
ffc07c38: 80 c6 28 0c lwz r6,10252(r6)
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc07c3c: 2f 86 00 01 cmpwi cr7,r6,1
ffc07c40: 40 be 00 3c bne+ cr7,ffc07c7c <_Event_Surrender+0xb4>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
ffc07c44: 7f 89 50 00 cmpw cr7,r9,r10
ffc07c48: 41 9e 00 0c beq- cr7,ffc07c54 <_Event_Surrender+0x8c>
ffc07c4c: 70 e5 00 02 andi. r5,r7,2
ffc07c50: 41 82 00 a8 beq- ffc07cf8 <_Event_Surrender+0x130> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
ffc07c54: 7d 6b 48 78 andc r11,r11,r9
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
ffc07c58: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
ffc07c5c: 39 60 00 00 li r11,0
ffc07c60: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc07c64: 81 7f 00 28 lwz r11,40(r31)
ffc07c68: 91 2b 00 00 stw r9,0(r11)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc07c6c: 39 60 00 03 li r11,3
ffc07c70: 3d 20 00 00 lis r9,0
ffc07c74: 91 69 28 0c stw r11,10252(r9)
ffc07c78: 48 00 00 80 b ffc07cf8 <_Event_Surrender+0x130>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
ffc07c7c: 80 df 00 10 lwz r6,16(r31)
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
ffc07c80: 70 c5 01 00 andi. r5,r6,256
ffc07c84: 41 82 00 74 beq- ffc07cf8 <_Event_Surrender+0x130>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc07c88: 7f 89 50 00 cmpw cr7,r9,r10
ffc07c8c: 41 9e 00 0c beq- cr7,ffc07c98 <_Event_Surrender+0xd0>
ffc07c90: 70 ea 00 02 andi. r10,r7,2
ffc07c94: 41 82 00 64 beq- ffc07cf8 <_Event_Surrender+0x130> <== NEVER TAKEN
ffc07c98: 7d 6b 48 78 andc r11,r11,r9
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
ffc07c9c: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
ffc07ca0: 39 60 00 00 li r11,0
ffc07ca4: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc07ca8: 81 7f 00 28 lwz r11,40(r31)
ffc07cac: 91 2b 00 00 stw r9,0(r11)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc07cb0: 7d 20 00 a6 mfmsr r9
ffc07cb4: 7c 00 01 24 mtmsr r0
ffc07cb8: 7d 20 01 24 mtmsr r9
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc07cbc: 81 3f 00 50 lwz r9,80(r31)
ffc07cc0: 2f 89 00 02 cmpwi cr7,r9,2
ffc07cc4: 41 9e 00 0c beq- cr7,ffc07cd0 <_Event_Surrender+0x108>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07cc8: 7c 00 01 24 mtmsr r0
ffc07ccc: 48 00 00 18 b ffc07ce4 <_Event_Surrender+0x11c>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc07cd0: 39 20 00 03 li r9,3
ffc07cd4: 91 3f 00 50 stw r9,80(r31)
ffc07cd8: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc07cdc: 38 7f 00 48 addi r3,r31,72
ffc07ce0: 48 00 3c cd bl ffc0b9ac <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc07ce4: 3c 80 10 03 lis r4,4099
ffc07ce8: 7f e3 fb 78 mr r3,r31
ffc07cec: 60 84 ff f8 ori r4,r4,65528
ffc07cf0: 48 00 28 69 bl ffc0a558 <_Thread_Clear_state>
ffc07cf4: 48 00 00 08 b ffc07cfc <_Event_Surrender+0x134>
ffc07cf8: 7c 00 01 24 mtmsr r0
}
return;
}
}
_ISR_Enable( level );
}
ffc07cfc: 39 61 00 10 addi r11,r1,16
ffc07d00: 4b ff 88 34 b ffc00534 <_restgpr_31_x>
ffc07d04 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc07d04: 94 21 ff e8 stwu r1,-24(r1)
ffc07d08: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc07d0c: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc07d10: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc07d14: 48 00 2c 3d bl ffc0a950 <_Thread_Get>
switch ( location ) {
ffc07d18: 80 01 00 08 lwz r0,8(r1)
ffc07d1c: 2f 80 00 00 cmpwi cr7,r0,0
ffc07d20: 40 9e 00 6c bne- cr7,ffc07d8c <_Event_Timeout+0x88> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc07d24: 7d 60 00 a6 mfmsr r11
ffc07d28: 7d 30 42 a6 mfsprg r9,0
ffc07d2c: 7d 69 48 78 andc r9,r11,r9
ffc07d30: 7d 20 01 24 mtmsr r9
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc07d34: 3d 20 00 00 lis r9,0
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc07d38: 90 03 00 24 stw r0,36(r3)
if ( _Thread_Is_executing( the_thread ) ) {
ffc07d3c: 80 09 2d c4 lwz r0,11716(r9)
ffc07d40: 7f 83 00 00 cmpw cr7,r3,r0
ffc07d44: 40 be 00 1c bne+ cr7,ffc07d60 <_Event_Timeout+0x5c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc07d48: 3d 20 00 00 lis r9,0
ffc07d4c: 80 09 28 0c lwz r0,10252(r9)
ffc07d50: 2f 80 00 01 cmpwi cr7,r0,1
ffc07d54: 40 be 00 0c bne+ cr7,ffc07d60 <_Event_Timeout+0x5c>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc07d58: 38 00 00 02 li r0,2
ffc07d5c: 90 09 28 0c stw r0,10252(r9)
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc07d60: 38 00 00 06 li r0,6
ffc07d64: 90 03 00 34 stw r0,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc07d68: 7d 60 01 24 mtmsr r11
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc07d6c: 3c 80 10 03 lis r4,4099
ffc07d70: 60 84 ff f8 ori r4,r4,65528
ffc07d74: 48 00 27 e5 bl ffc0a558 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc07d78: 3d 20 00 00 lis r9,0
ffc07d7c: 81 69 27 c8 lwz r11,10184(r9)
ffc07d80: 38 0b ff ff addi r0,r11,-1
ffc07d84: 90 09 27 c8 stw r0,10184(r9)
return _Thread_Dispatch_disable_level;
ffc07d88: 80 09 27 c8 lwz r0,10184(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc07d8c: 80 01 00 1c lwz r0,28(r1)
ffc07d90: 38 21 00 18 addi r1,r1,24
ffc07d94: 7c 08 03 a6 mtlr r0
ffc07d98: 4e 80 00 20 blr
ffc0da8c <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0da8c: 94 21 ff c0 stwu r1,-64(r1)
ffc0da90: 7c 08 02 a6 mflr r0
ffc0da94: be c1 00 18 stmw r22,24(r1)
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
ffc0da98: 7f c4 2a 14 add r30,r4,r5
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
ffc0da9c: 7f 9e 20 40 cmplw cr7,r30,r4
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0daa0: 90 01 00 44 stw r0,68(r1)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
ffc0daa4: 3b 40 00 00 li r26,0
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0daa8: 7c d9 33 78 mr r25,r6
ffc0daac: 7c 7f 1b 78 mr r31,r3
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
ffc0dab0: 83 83 00 20 lwz r28,32(r3)
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc0dab4: 7c 9d 23 78 mr r29,r4
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
ffc0dab8: 93 41 00 0c stw r26,12(r1)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
ffc0dabc: 38 00 00 00 li r0,0
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
ffc0dac0: 93 41 00 08 stw r26,8(r1)
uintptr_t const page_size = heap->page_size;
ffc0dac4: 83 63 00 10 lwz r27,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0dac8: 80 c3 00 14 lwz r6,20(r3)
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
ffc0dacc: 83 03 00 30 lwz r24,48(r3)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
ffc0dad0: 41 bc 02 70 blt+ cr7,ffc0dd40 <_Heap_Extend+0x2b4>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
ffc0dad4: 7c 83 23 78 mr r3,r4
ffc0dad8: 38 e1 00 0c addi r7,r1,12
ffc0dadc: 7c a4 2b 78 mr r4,r5
ffc0dae0: 39 01 00 08 addi r8,r1,8
ffc0dae4: 7f 65 db 78 mr r5,r27
ffc0dae8: 4b ff b4 65 bl ffc08f4c <_Heap_Get_first_and_last_block>
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
/* For simplicity we reject extend areas that are too small */
return false;
ffc0daec: 7f 40 d3 78 mr r0,r26
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc0daf0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0daf4: 41 9e 02 4c beq- cr7,ffc0dd40 <_Heap_Extend+0x2b4>
ffc0daf8: 7f 89 e3 78 mr r9,r28
ffc0dafc: 3a c0 00 00 li r22,0
ffc0db00: 39 40 00 00 li r10,0
ffc0db04: 3a e0 00 00 li r23,0
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
ffc0db08: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0db0c: 7d 2b 4b 78 mr r11,r9
ffc0db10: 40 be 00 08 bne+ cr7,ffc0db18 <_Heap_Extend+0x8c>
ffc0db14: 81 7f 00 18 lwz r11,24(r31)
uintptr_t const sub_area_end = start_block->prev_size;
ffc0db18: 80 09 00 00 lwz r0,0(r9)
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
ffc0db1c: 7f 80 e8 40 cmplw cr7,r0,r29
ffc0db20: 40 9d 00 0c ble- cr7,ffc0db2c <_Heap_Extend+0xa0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
ffc0db24: 7f 9e 58 40 cmplw cr7,r30,r11
ffc0db28: 41 9d 02 14 bgt- cr7,ffc0dd3c <_Heap_Extend+0x2b0>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc0db2c: 7f 9e 58 00 cmpw cr7,r30,r11
ffc0db30: 41 9e 00 10 beq- cr7,ffc0db40 <_Heap_Extend+0xb4>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
ffc0db34: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0db38: 41 9c 00 10 blt- cr7,ffc0db48 <_Heap_Extend+0xbc>
ffc0db3c: 48 00 00 10 b ffc0db4c <_Heap_Extend+0xc0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc0db40: 7d 37 4b 78 mr r23,r9
ffc0db44: 48 00 00 08 b ffc0db4c <_Heap_Extend+0xc0>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
ffc0db48: 7d 2a 4b 78 mr r10,r9
ffc0db4c: 7d 60 db 96 divwu r11,r0,r27
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc0db50: 7f 80 e8 00 cmpw cr7,r0,r29
ffc0db54: 7d 6b d9 d6 mullw r11,r11,r27
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0db58: 39 6b ff f8 addi r11,r11,-8
ffc0db5c: 40 be 00 10 bne+ cr7,ffc0db6c <_Heap_Extend+0xe0>
start_block->prev_size = extend_area_end;
ffc0db60: 93 c9 00 00 stw r30,0(r9)
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 )
ffc0db64: 7d 7a 5b 78 mr r26,r11
ffc0db68: 48 00 00 10 b ffc0db78 <_Heap_Extend+0xec>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
ffc0db6c: 7f 80 e8 40 cmplw cr7,r0,r29
ffc0db70: 40 9c 00 08 bge- cr7,ffc0db78 <_Heap_Extend+0xec>
ffc0db74: 7d 76 5b 78 mr r22,r11
- 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;
ffc0db78: 81 2b 00 04 lwz r9,4(r11)
ffc0db7c: 55 29 00 3c rlwinm r9,r9,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0db80: 7d 29 5a 14 add r9,r9,r11
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
ffc0db84: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0db88: 40 9e ff 80 bne+ cr7,ffc0db08 <_Heap_Extend+0x7c>
if ( extend_area_begin < heap->area_begin ) {
ffc0db8c: 80 1f 00 18 lwz r0,24(r31)
ffc0db90: 7f 9d 00 40 cmplw cr7,r29,r0
ffc0db94: 40 9c 00 0c bge- cr7,ffc0dba0 <_Heap_Extend+0x114>
heap->area_begin = extend_area_begin;
ffc0db98: 93 bf 00 18 stw r29,24(r31)
ffc0db9c: 48 00 00 14 b ffc0dbb0 <_Heap_Extend+0x124>
} else if ( heap->area_end < extend_area_end ) {
ffc0dba0: 80 1f 00 1c lwz r0,28(r31)
ffc0dba4: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0dba8: 40 9c 00 08 bge- cr7,ffc0dbb0 <_Heap_Extend+0x124>
heap->area_end = extend_area_end;
ffc0dbac: 93 df 00 1c stw r30,28(r31)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
ffc0dbb0: 81 61 00 0c lwz r11,12(r1)
ffc0dbb4: 81 21 00 08 lwz r9,8(r1)
extend_first_block->prev_size = extend_area_end;
ffc0dbb8: 93 cb 00 00 stw r30,0(r11)
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
ffc0dbbc: 7c 0b 48 50 subf r0,r11,r9
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
ffc0dbc0: 60 08 00 01 ori r8,r0,1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
ffc0dbc4: 90 09 00 00 stw r0,0(r9)
extend_last_block->size_and_flag = 0;
ffc0dbc8: 38 00 00 00 li r0,0
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
ffc0dbcc: 91 0b 00 04 stw r8,4(r11)
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
ffc0dbd0: 90 09 00 04 stw r0,4(r9)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc0dbd4: 80 1f 00 20 lwz r0,32(r31)
ffc0dbd8: 7f 80 58 40 cmplw cr7,r0,r11
ffc0dbdc: 40 9d 00 0c ble- cr7,ffc0dbe8 <_Heap_Extend+0x15c>
heap->first_block = extend_first_block;
ffc0dbe0: 91 7f 00 20 stw r11,32(r31)
ffc0dbe4: 48 00 00 14 b ffc0dbf8 <_Heap_Extend+0x16c>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
ffc0dbe8: 80 1f 00 24 lwz r0,36(r31)
ffc0dbec: 7f 80 48 40 cmplw cr7,r0,r9
ffc0dbf0: 40 9c 00 08 bge- cr7,ffc0dbf8 <_Heap_Extend+0x16c>
heap->last_block = extend_last_block;
ffc0dbf4: 91 3f 00 24 stw r9,36(r31)
}
if ( merge_below_block != NULL ) {
ffc0dbf8: 2f 97 00 00 cmpwi cr7,r23,0
ffc0dbfc: 41 9e 00 48 beq- cr7,ffc0dc44 <_Heap_Extend+0x1b8>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
ffc0dc00: 80 1f 00 10 lwz r0,16(r31)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
ffc0dc04: 3b bd 00 08 addi r29,r29,8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
ffc0dc08: 7d 3d 03 96 divwu r9,r29,r0
ffc0dc0c: 7d 29 01 d6 mullw r9,r9,r0
if ( remainder != 0 ) {
ffc0dc10: 7d 29 e8 51 subf. r9,r9,r29
ffc0dc14: 41 82 00 0c beq- ffc0dc20 <_Heap_Extend+0x194> <== NEVER TAKEN
return value - remainder + alignment;
ffc0dc18: 7f bd 02 14 add r29,r29,r0
ffc0dc1c: 7f a9 e8 50 subf r29,r9,r29
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ffc0dc20: 80 17 00 00 lwz r0,0(r23)
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
ffc0dc24: 38 9d ff f8 addi r4,r29,-8
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Free_block( heap, new_first_block );
ffc0dc28: 7f e3 fb 78 mr r3,r31
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ffc0dc2c: 90 1d ff f8 stw r0,-8(r29)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
ffc0dc30: 7c 04 b8 50 subf r0,r4,r23
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
ffc0dc34: 60 00 00 01 ori r0,r0,1
ffc0dc38: 90 04 00 04 stw r0,4(r4)
_Heap_Free_block( heap, new_first_block );
ffc0dc3c: 4b ff fe 15 bl ffc0da50 <_Heap_Free_block>
ffc0dc40: 48 00 00 1c b ffc0dc5c <_Heap_Extend+0x1d0>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
ffc0dc44: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0dc48: 41 9e 00 14 beq- cr7,ffc0dc5c <_Heap_Extend+0x1d0>
_Heap_Link_below(
ffc0dc4c: 81 21 00 08 lwz r9,8(r1)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
ffc0dc50: 7d 49 50 50 subf r10,r9,r10
ffc0dc54: 61 4a 00 01 ori r10,r10,1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
ffc0dc58: 91 49 00 04 stw r10,4(r9)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
ffc0dc5c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0dc60: 41 9e 00 4c beq- cr7,ffc0dcac <_Heap_Extend+0x220>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0dc64: 80 1f 00 10 lwz r0,16(r31)
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
ffc0dc68: 3b de ff f8 addi r30,r30,-8
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
ffc0dc6c: 7f da f0 50 subf r30,r26,r30
ffc0dc70: 7f de 03 96 divwu r30,r30,r0
ffc0dc74: 7f de 01 d6 mullw r30,r30,r0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ffc0dc78: 80 1a 00 04 lwz r0,4(r26)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ffc0dc7c: 7f e3 fb 78 mr r3,r31
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ffc0dc80: 7c 1e 00 50 subf r0,r30,r0
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc0dc84: 7d 3e d2 14 add r9,r30,r26
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
ffc0dc88: 60 00 00 01 ori r0,r0,1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc0dc8c: 90 09 00 04 stw r0,4(r9)
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ffc0dc90: 7f 44 d3 78 mr r4,r26
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dc94: 80 1a 00 04 lwz r0,4(r26)
ffc0dc98: 54 00 07 fe clrlwi r0,r0,31
block->size_and_flag = size | flag;
ffc0dc9c: 7f de 03 78 or r30,r30,r0
ffc0dca0: 93 da 00 04 stw r30,4(r26)
ffc0dca4: 4b ff fd ad bl ffc0da50 <_Heap_Free_block>
ffc0dca8: 48 00 00 34 b ffc0dcdc <_Heap_Extend+0x250>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
ffc0dcac: 2f 96 00 00 cmpwi cr7,r22,0
ffc0dcb0: 41 9e 00 2c beq- cr7,ffc0dcdc <_Heap_Extend+0x250>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dcb4: 81 76 00 04 lwz r11,4(r22)
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
ffc0dcb8: 80 01 00 0c lwz r0,12(r1)
ffc0dcbc: 55 6b 07 fe clrlwi r11,r11,31
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
ffc0dcc0: 81 21 00 08 lwz r9,8(r1)
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
ffc0dcc4: 7c 16 00 50 subf r0,r22,r0
block->size_and_flag = size | flag;
ffc0dcc8: 7d 60 03 78 or r0,r11,r0
ffc0dccc: 90 16 00 04 stw r0,4(r22)
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
ffc0dcd0: 80 09 00 04 lwz r0,4(r9)
ffc0dcd4: 60 00 00 01 ori r0,r0,1
ffc0dcd8: 90 09 00 04 stw r0,4(r9)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc0dcdc: 2f 97 00 00 cmpwi cr7,r23,0
ffc0dce0: 40 be 00 18 bne+ cr7,ffc0dcf8 <_Heap_Extend+0x26c>
ffc0dce4: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0dce8: 40 be 00 10 bne+ cr7,ffc0dcf8 <_Heap_Extend+0x26c>
_Heap_Free_block( heap, extend_first_block );
ffc0dcec: 80 81 00 0c lwz r4,12(r1)
ffc0dcf0: 7f e3 fb 78 mr r3,r31
ffc0dcf4: 4b ff fd 5d bl ffc0da50 <_Heap_Free_block>
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
ffc0dcf8: 81 3f 00 24 lwz r9,36(r31)
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
ffc0dcfc: 2f 99 00 00 cmpwi cr7,r25,0
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
ffc0dd00: 80 1f 00 20 lwz r0,32(r31)
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dd04: 81 69 00 04 lwz r11,4(r9)
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
ffc0dd08: 7c 09 00 50 subf r0,r9,r0
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0dd0c: 55 6b 07 fe clrlwi r11,r11,31
block->size_and_flag = size | flag;
ffc0dd10: 7d 60 03 78 or r0,r11,r0
ffc0dd14: 90 09 00 04 stw r0,4(r9)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
ffc0dd18: 80 1f 00 30 lwz r0,48(r31)
ffc0dd1c: 7f 18 00 50 subf r24,r24,r0
/* Statistics */
stats->size += extended_size;
ffc0dd20: 80 1f 00 2c lwz r0,44(r31)
ffc0dd24: 7c 00 c2 14 add r0,r0,r24
ffc0dd28: 90 1f 00 2c stw r0,44(r31)
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
ffc0dd2c: 38 00 00 01 li r0,1
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
ffc0dd30: 41 9e 00 10 beq- cr7,ffc0dd40 <_Heap_Extend+0x2b4> <== NEVER TAKEN
*extended_size_ptr = extended_size;
ffc0dd34: 93 19 00 00 stw r24,0(r25)
ffc0dd38: 48 00 00 08 b ffc0dd40 <_Heap_Extend+0x2b4>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
ffc0dd3c: 38 00 00 00 li r0,0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc0dd40: 39 61 00 40 addi r11,r1,64
ffc0dd44: 7c 03 03 78 mr r3,r0
ffc0dd48: 4b ff 27 80 b ffc004c8 <_restgpr_22_x>
ffc0ddcc <_Heap_Free>:
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0ddcc: 7c 2b 0b 78 mr r11,r1
ffc0ddd0: 94 21 ff f0 stwu r1,-16(r1)
ffc0ddd4: 7c 08 02 a6 mflr r0
ffc0ddd8: 7c 69 1b 78 mr r9,r3
ffc0dddc: 48 00 c5 59 bl ffc1a334 <_savegpr_31>
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
ffc0dde0: 7c 8b 23 79 mr. r11,r4
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0dde4: 90 01 00 14 stw r0,20(r1)
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
ffc0dde8: 38 60 00 01 li r3,1
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
ffc0ddec: 41 82 01 e8 beq- ffc0dfd4 <_Heap_Free+0x208>
ffc0ddf0: 80 09 00 10 lwz r0,16(r9)
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
ffc0ddf4: 80 a9 00 20 lwz r5,32(r9)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0ddf8: 7d 6b 03 96 divwu r11,r11,r0
ffc0ddfc: 7d 6b 01 d6 mullw r11,r11,r0
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;
ffc0de00: 38 00 00 00 li r0,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0de04: 39 6b ff f8 addi r11,r11,-8
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;
ffc0de08: 7f 8b 28 40 cmplw cr7,r11,r5
ffc0de0c: 41 9c 00 14 blt- cr7,ffc0de20 <_Heap_Free+0x54>
ffc0de10: 80 09 00 24 lwz r0,36(r9)
ffc0de14: 7c 0b 00 10 subfc r0,r11,r0
ffc0de18: 38 00 00 00 li r0,0
ffc0de1c: 7c 00 01 14 adde r0,r0,r0
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc0de20: 2f 80 00 00 cmpwi cr7,r0,0
return false;
ffc0de24: 38 60 00 00 li r3,0
}
alloc_begin = (uintptr_t) alloc_begin_ptr;
block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc0de28: 41 9e 01 ac beq- cr7,ffc0dfd4 <_Heap_Free+0x208>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0de2c: 80 cb 00 04 lwz r6,4(r11)
ffc0de30: 38 00 00 00 li r0,0
- 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;
ffc0de34: 54 c8 00 3c rlwinm r8,r6,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0de38: 7d 48 5a 14 add r10,r8,r11
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;
ffc0de3c: 7f 8a 28 40 cmplw cr7,r10,r5
ffc0de40: 41 9c 00 14 blt- cr7,ffc0de54 <_Heap_Free+0x88> <== NEVER TAKEN
ffc0de44: 80 09 00 24 lwz r0,36(r9)
ffc0de48: 7c 0a 00 10 subfc r0,r10,r0
ffc0de4c: 38 00 00 00 li r0,0
ffc0de50: 7c 00 01 14 adde r0,r0,r0
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0de54: 2f 80 00 00 cmpwi cr7,r0,0
return false;
ffc0de58: 38 60 00 00 li r3,0
_Heap_Protection_block_check( heap, block );
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0de5c: 41 9e 01 78 beq- cr7,ffc0dfd4 <_Heap_Free+0x208> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0de60: 80 0a 00 04 lwz r0,4(r10)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0de64: 70 04 00 01 andi. r4,r0,1
ffc0de68: 41 82 01 6c beq- ffc0dfd4 <_Heap_Free+0x208>
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc0de6c: 80 69 00 24 lwz r3,36(r9)
- 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;
ffc0de70: 54 00 00 3c rlwinm r0,r0,0,0,30
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
ffc0de74: 38 80 00 00 li r4,0
ffc0de78: 7f 8a 18 00 cmpw cr7,r10,r3
ffc0de7c: 41 9e 00 18 beq- cr7,ffc0de94 <_Heap_Free+0xc8>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0de80: 7c ea 02 14 add r7,r10,r0
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;
ffc0de84: 80 e7 00 04 lwz r7,4(r7)
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
ffc0de88: 70 ff 00 01 andi. r31,r7,1
ffc0de8c: 7c 80 00 26 mfcr r4
ffc0de90: 54 84 1f fe rlwinm r4,r4,3,31,31
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 ) ) {
ffc0de94: 70 c7 00 01 andi. r7,r6,1
if ( !_Heap_Protection_determine_block_free( heap, block ) ) {
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc0de98: 54 84 06 3e clrlwi r4,r4,24
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
ffc0de9c: 40 82 00 94 bne- ffc0df30 <_Heap_Free+0x164>
uintptr_t const prev_size = block->prev_size;
ffc0dea0: 80 cb 00 00 lwz r6,0(r11)
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;
ffc0dea4: 39 80 00 00 li r12,0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0dea8: 7c e6 58 50 subf r7,r6,r11
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;
ffc0deac: 7f 87 28 40 cmplw cr7,r7,r5
ffc0deb0: 41 9c 00 10 blt- cr7,ffc0dec0 <_Heap_Free+0xf4> <== NEVER TAKEN
ffc0deb4: 7d 87 18 10 subfc r12,r7,r3
ffc0deb8: 39 80 00 00 li r12,0
ffc0debc: 7d 8c 61 14 adde r12,r12,r12
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
ffc0dec0: 2f 8c 00 00 cmpwi cr7,r12,0
_HAssert( false );
return( false );
ffc0dec4: 38 60 00 00 li r3,0
if ( !_Heap_Is_prev_used( block ) ) {
uintptr_t const prev_size = block->prev_size;
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
ffc0dec8: 41 9e 01 0c beq- cr7,ffc0dfd4 <_Heap_Free+0x208> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc0decc: 80 a7 00 04 lwz r5,4(r7)
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) ) {
ffc0ded0: 70 bf 00 01 andi. r31,r5,1
ffc0ded4: 41 82 01 00 beq- ffc0dfd4 <_Heap_Free+0x208> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc0ded8: 2f 84 00 00 cmpwi cr7,r4,0
ffc0dedc: 7c c8 32 14 add r6,r8,r6
ffc0dee0: 41 9e 00 34 beq- cr7,ffc0df14 <_Heap_Free+0x148>
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
ffc0dee4: 81 6a 00 08 lwz r11,8(r10)
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0dee8: 7c c6 02 14 add r6,r6,r0
Heap_Block *prev = block->prev;
ffc0deec: 81 4a 00 0c lwz r10,12(r10)
prev->next = next;
ffc0def0: 91 6a 00 08 stw r11,8(r10)
next->prev = prev;
ffc0def4: 91 4b 00 0c stw r10,12(r11)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0def8: 81 69 00 38 lwz r11,56(r9)
ffc0defc: 38 0b ff ff addi r0,r11,-1
ffc0df00: 90 09 00 38 stw r0,56(r9)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0df04: 60 c0 00 01 ori r0,r6,1
ffc0df08: 90 07 00 04 stw r0,4(r7)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
ffc0df0c: 7c c6 39 2e stwx r6,r6,r7
ffc0df10: 48 00 00 9c b ffc0dfac <_Heap_Free+0x1e0>
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0df14: 60 c0 00 01 ori r0,r6,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc0df18: 7c c8 59 2e stwx r6,r8,r11
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;
ffc0df1c: 90 07 00 04 stw r0,4(r7)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0df20: 80 0a 00 04 lwz r0,4(r10)
ffc0df24: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc0df28: 90 0a 00 04 stw r0,4(r10)
ffc0df2c: 48 00 00 80 b ffc0dfac <_Heap_Free+0x1e0>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc0df30: 2f 84 00 00 cmpwi cr7,r4,0
ffc0df34: 41 9e 00 30 beq- cr7,ffc0df64 <_Heap_Free+0x198>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
ffc0df38: 80 ca 00 08 lwz r6,8(r10)
uintptr_t const size = block_size + next_block_size;
ffc0df3c: 7c e0 42 14 add r7,r0,r8
Heap_Block *prev = old_block->prev;
ffc0df40: 81 4a 00 0c lwz r10,12(r10)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0df44: 60 e0 00 01 ori r0,r7,1
new_block->next = next;
ffc0df48: 90 cb 00 08 stw r6,8(r11)
new_block->prev = prev;
ffc0df4c: 91 4b 00 0c stw r10,12(r11)
next->prev = new_block;
prev->next = new_block;
ffc0df50: 91 6a 00 08 stw r11,8(r10)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc0df54: 91 66 00 0c stw r11,12(r6)
ffc0df58: 90 0b 00 04 stw r0,4(r11)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc0df5c: 7c e7 59 2e stwx r7,r7,r11
ffc0df60: 48 00 00 4c b ffc0dfac <_Heap_Free+0x1e0>
} 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;
ffc0df64: 61 00 00 01 ori r0,r8,1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc0df68: 80 e9 00 08 lwz r7,8(r9)
ffc0df6c: 90 0b 00 04 stw r0,4(r11)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0df70: 80 0a 00 04 lwz r0,4(r10)
new_block->next = next;
ffc0df74: 90 eb 00 08 stw r7,8(r11)
ffc0df78: 54 00 00 3c rlwinm r0,r0,0,0,30
new_block->prev = block_before;
ffc0df7c: 91 2b 00 0c stw r9,12(r11)
next_block->prev_size = block_size;
ffc0df80: 7d 08 59 2e stwx r8,r8,r11
block_before->next = new_block;
next->prev = new_block;
ffc0df84: 91 67 00 0c stw r11,12(r7)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc0df88: 91 69 00 08 stw r11,8(r9)
/* Statistics */
++stats->free_blocks;
ffc0df8c: 81 69 00 38 lwz r11,56(r9)
} 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;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0df90: 90 0a 00 04 stw r0,4(r10)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0df94: 38 0b 00 01 addi r0,r11,1
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0df98: 81 69 00 3c lwz r11,60(r9)
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0df9c: 90 09 00 38 stw r0,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0dfa0: 7f 8b 00 40 cmplw cr7,r11,r0
ffc0dfa4: 40 9c 00 08 bge- cr7,ffc0dfac <_Heap_Free+0x1e0>
stats->max_free_blocks = stats->free_blocks;
ffc0dfa8: 90 09 00 3c stw r0,60(r9)
}
}
/* Statistics */
--stats->used_blocks;
ffc0dfac: 81 69 00 40 lwz r11,64(r9)
++stats->frees;
stats->free_size += block_size;
return( true );
ffc0dfb0: 38 60 00 01 li r3,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0dfb4: 38 0b ff ff addi r0,r11,-1
++stats->frees;
ffc0dfb8: 81 69 00 50 lwz r11,80(r9)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc0dfbc: 90 09 00 40 stw r0,64(r9)
++stats->frees;
ffc0dfc0: 38 0b 00 01 addi r0,r11,1
ffc0dfc4: 90 09 00 50 stw r0,80(r9)
stats->free_size += block_size;
ffc0dfc8: 80 09 00 30 lwz r0,48(r9)
ffc0dfcc: 7d 00 42 14 add r8,r0,r8
ffc0dfd0: 91 09 00 30 stw r8,48(r9)
return( true );
}
ffc0dfd4: 39 61 00 10 addi r11,r1,16
ffc0dfd8: 4b ff 25 5c b ffc00534 <_restgpr_31_x>
ffc1ae40 <_Heap_Size_of_alloc_area>:
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1ae40: 80 03 00 10 lwz r0,16(r3)
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
ffc1ae44: 7c 69 1b 78 mr r9,r3
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
ffc1ae48: 81 03 00 20 lwz r8,32(r3)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1ae4c: 7d 44 03 96 divwu r10,r4,r0
ffc1ae50: 7d 4a 01 d6 mullw r10,r10,r0
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;
ffc1ae54: 38 00 00 00 li r0,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc1ae58: 39 4a ff f8 addi r10,r10,-8
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;
ffc1ae5c: 7f 8a 40 40 cmplw cr7,r10,r8
ffc1ae60: 41 9c 00 14 blt- cr7,ffc1ae74 <_Heap_Size_of_alloc_area+0x34>
ffc1ae64: 80 03 00 24 lwz r0,36(r3)
ffc1ae68: 7c 0a 00 10 subfc r0,r10,r0
ffc1ae6c: 38 00 00 00 li r0,0
ffc1ae70: 7c 00 01 14 adde r0,r0,r0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc1ae74: 2f 80 00 00 cmpwi cr7,r0,0
return false;
ffc1ae78: 38 60 00 00 li r3,0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc1ae7c: 4d 9e 00 20 beqlr cr7
- 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;
ffc1ae80: 81 6a 00 04 lwz r11,4(r10)
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;
ffc1ae84: 38 00 00 00 li r0,0
- 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;
ffc1ae88: 55 6b 00 3c rlwinm r11,r11,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc1ae8c: 7d 6b 52 14 add r11,r11,r10
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;
ffc1ae90: 7f 8b 40 40 cmplw cr7,r11,r8
ffc1ae94: 41 9c 00 14 blt- cr7,ffc1aea8 <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN
ffc1ae98: 80 09 00 24 lwz r0,36(r9)
ffc1ae9c: 7c 0b 00 10 subfc r0,r11,r0
ffc1aea0: 38 00 00 00 li r0,0
ffc1aea4: 7c 00 01 14 adde r0,r0,r0
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1aea8: 2f 80 00 00 cmpwi cr7,r0,0
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
ffc1aeac: 38 60 00 00 li r3,0
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1aeb0: 4d 9e 00 20 beqlr cr7
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;
ffc1aeb4: 80 0b 00 04 lwz r0,4(r11)
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
ffc1aeb8: 70 09 00 01 andi. r9,r0,1
ffc1aebc: 4d 82 00 20 beqlr
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
ffc1aec0: 20 84 00 04 subfic r4,r4,4
ffc1aec4: 7d 64 5a 14 add r11,r4,r11
ffc1aec8: 91 65 00 00 stw r11,0(r5)
return true;
ffc1aecc: 38 60 00 01 li r3,1
}
ffc1aed0: 4e 80 00 20 blr
ffc09bb8 <_Heap_Walk>:
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc09bb8: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc09bbc: 94 21 ff 98 stwu r1,-104(r1)
ffc09bc0: 7c 08 02 a6 mflr r0
ffc09bc4: bd c1 00 20 stmw r14,32(r1)
ffc09bc8: 7c 7e 1b 78 mr r30,r3
ffc09bcc: 7c 9f 23 78 mr r31,r4
ffc09bd0: 90 01 00 6c stw r0,108(r1)
uintptr_t const page_size = heap->page_size;
ffc09bd4: 83 43 00 10 lwz r26,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc09bd8: 83 23 00 14 lwz r25,20(r3)
Heap_Block *const first_block = heap->first_block;
ffc09bdc: 83 03 00 20 lwz r24,32(r3)
Heap_Block *const last_block = heap->last_block;
ffc09be0: 82 e3 00 24 lwz r23,36(r3)
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc09be4: 41 9e 00 10 beq- cr7,ffc09bf4 <_Heap_Walk+0x3c>
ffc09be8: 3d 20 ff c1 lis r9,-63
ffc09bec: 39 29 9b 08 addi r9,r9,-25848
ffc09bf0: 48 00 00 0c b ffc09bfc <_Heap_Walk+0x44>
ffc09bf4: 3d 20 ff c1 lis r9,-63
ffc09bf8: 39 29 9b 04 addi r9,r9,-25852
ffc09bfc: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc09c00: 3d 20 00 00 lis r9,0
return true;
ffc09c04: 38 60 00 01 li r3,1
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc09c08: 80 09 27 e0 lwz r0,10208(r9)
ffc09c0c: 2f 80 00 03 cmpwi cr7,r0,3
ffc09c10: 40 be 04 bc bne+ cr7,ffc0a0cc <_Heap_Walk+0x514>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
ffc09c14: 80 1e 00 08 lwz r0,8(r30)
ffc09c18: 3c a0 ff c1 lis r5,-63
ffc09c1c: 81 1e 00 18 lwz r8,24(r30)
ffc09c20: 7f e3 fb 78 mr r3,r31
ffc09c24: 90 01 00 0c stw r0,12(r1)
ffc09c28: 38 80 00 00 li r4,0
ffc09c2c: 38 a5 74 ad addi r5,r5,29869
ffc09c30: 80 1e 00 0c lwz r0,12(r30)
ffc09c34: 7f 46 d3 78 mr r6,r26
ffc09c38: 81 3e 00 1c lwz r9,28(r30)
ffc09c3c: 7f 27 cb 78 mr r7,r25
ffc09c40: 90 01 00 10 stw r0,16(r1)
ffc09c44: 7f 0a c3 78 mr r10,r24
ffc09c48: 80 01 00 18 lwz r0,24(r1)
ffc09c4c: 92 e1 00 08 stw r23,8(r1)
ffc09c50: 7c 09 03 a6 mtctr r0
ffc09c54: 4c c6 31 82 crclr 4*cr1+eq
ffc09c58: 4e 80 04 21 bctrl
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
ffc09c5c: 2f 9a 00 00 cmpwi cr7,r26,0
ffc09c60: 40 be 00 18 bne+ cr7,ffc09c78 <_Heap_Walk+0xc0>
(*printer)( source, true, "page size is zero\n" );
ffc09c64: 3c a0 ff c1 lis r5,-63
ffc09c68: 7f e3 fb 78 mr r3,r31
ffc09c6c: 38 80 00 01 li r4,1
ffc09c70: 38 a5 75 3e addi r5,r5,30014
ffc09c74: 48 00 00 c0 b ffc09d34 <_Heap_Walk+0x17c>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc09c78: 73 49 00 07 andi. r9,r26,7
ffc09c7c: 41 a2 00 1c beq+ ffc09c98 <_Heap_Walk+0xe0>
(*printer)(
ffc09c80: 3c a0 ff c1 lis r5,-63
ffc09c84: 7f e3 fb 78 mr r3,r31
ffc09c88: 38 80 00 01 li r4,1
ffc09c8c: 38 a5 75 51 addi r5,r5,30033
ffc09c90: 7f 46 d3 78 mr r6,r26
ffc09c94: 48 00 04 54 b ffc0a0e8 <_Heap_Walk+0x530>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09c98: 7c 19 d3 96 divwu r0,r25,r26
ffc09c9c: 7c 00 d1 d6 mullw r0,r0,r26
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc09ca0: 7f 99 00 00 cmpw cr7,r25,r0
ffc09ca4: 41 be 00 1c beq+ cr7,ffc09cc0 <_Heap_Walk+0x108>
(*printer)(
ffc09ca8: 3c a0 ff c1 lis r5,-63
ffc09cac: 7f e3 fb 78 mr r3,r31
ffc09cb0: 38 80 00 01 li r4,1
ffc09cb4: 38 a5 75 6f addi r5,r5,30063
ffc09cb8: 7f 26 cb 78 mr r6,r25
ffc09cbc: 48 00 04 2c b ffc0a0e8 <_Heap_Walk+0x530>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc09cc0: 38 18 00 08 addi r0,r24,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09cc4: 7d 20 d3 96 divwu r9,r0,r26
ffc09cc8: 7d 29 d1 d6 mullw r9,r9,r26
);
return false;
}
if (
ffc09ccc: 7f 80 48 00 cmpw cr7,r0,r9
ffc09cd0: 41 be 00 1c beq+ cr7,ffc09cec <_Heap_Walk+0x134>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc09cd4: 3c a0 ff c1 lis r5,-63
ffc09cd8: 7f e3 fb 78 mr r3,r31
ffc09cdc: 38 80 00 01 li r4,1
ffc09ce0: 38 a5 75 93 addi r5,r5,30099
ffc09ce4: 7f 06 c3 78 mr r6,r24
ffc09ce8: 48 00 04 00 b ffc0a0e8 <_Heap_Walk+0x530>
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;
ffc09cec: 80 18 00 04 lwz r0,4(r24)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc09cf0: 70 09 00 01 andi. r9,r0,1
ffc09cf4: 40 a2 00 18 bne+ ffc09d0c <_Heap_Walk+0x154>
(*printer)(
ffc09cf8: 3c a0 ff c1 lis r5,-63
ffc09cfc: 7f e3 fb 78 mr r3,r31
ffc09d00: 38 80 00 01 li r4,1
ffc09d04: 38 a5 75 c4 addi r5,r5,30148
ffc09d08: 48 00 00 2c b ffc09d34 <_Heap_Walk+0x17c>
- 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;
ffc09d0c: 83 b7 00 04 lwz r29,4(r23)
ffc09d10: 57 bd 00 3c rlwinm r29,r29,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc09d14: 7f b7 ea 14 add r29,r23,r29
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;
ffc09d18: 80 1d 00 04 lwz r0,4(r29)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc09d1c: 70 09 00 01 andi. r9,r0,1
ffc09d20: 40 a2 00 28 bne+ ffc09d48 <_Heap_Walk+0x190>
(*printer)(
ffc09d24: 3c a0 ff c1 lis r5,-63
ffc09d28: 7f e3 fb 78 mr r3,r31
ffc09d2c: 38 80 00 01 li r4,1
ffc09d30: 38 a5 75 f2 addi r5,r5,30194
ffc09d34: 80 01 00 18 lwz r0,24(r1)
ffc09d38: 7c 09 03 a6 mtctr r0
ffc09d3c: 4c c6 31 82 crclr 4*cr1+eq
ffc09d40: 4e 80 04 21 bctrl
ffc09d44: 48 00 00 ec b ffc09e30 <_Heap_Walk+0x278>
);
return false;
}
if (
ffc09d48: 7f 9d c0 00 cmpw cr7,r29,r24
ffc09d4c: 41 9e 00 18 beq- cr7,ffc09d64 <_Heap_Walk+0x1ac>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
ffc09d50: 3c a0 ff c1 lis r5,-63
ffc09d54: 7f e3 fb 78 mr r3,r31
ffc09d58: 38 80 00 01 li r4,1
ffc09d5c: 38 a5 76 07 addi r5,r5,30215
ffc09d60: 4b ff ff d4 b ffc09d34 <_Heap_Walk+0x17c>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc09d64: 81 3e 00 10 lwz r9,16(r30)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
ffc09d68: 7f c0 f3 78 mr r0,r30
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc09d6c: 80 de 00 08 lwz r6,8(r30)
ffc09d70: 48 00 00 d0 b ffc09e40 <_Heap_Walk+0x288>
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;
ffc09d74: 81 5e 00 20 lwz r10,32(r30)
ffc09d78: 39 60 00 00 li r11,0
ffc09d7c: 7f 8a 30 40 cmplw cr7,r10,r6
ffc09d80: 41 9d 00 14 bgt- cr7,ffc09d94 <_Heap_Walk+0x1dc>
ffc09d84: 81 7e 00 24 lwz r11,36(r30)
ffc09d88: 7d 66 58 10 subfc r11,r6,r11
ffc09d8c: 39 60 00 00 li r11,0
ffc09d90: 7d 6b 59 14 adde r11,r11,r11
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
ffc09d94: 2f 8b 00 00 cmpwi cr7,r11,0
ffc09d98: 40 be 00 18 bne+ cr7,ffc09db0 <_Heap_Walk+0x1f8>
(*printer)(
ffc09d9c: 3c a0 ff c1 lis r5,-63
ffc09da0: 7f e3 fb 78 mr r3,r31
ffc09da4: 38 80 00 01 li r4,1
ffc09da8: 38 a5 76 36 addi r5,r5,30262
ffc09dac: 48 00 03 3c b ffc0a0e8 <_Heap_Walk+0x530>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc09db0: 39 66 00 08 addi r11,r6,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09db4: 7d 4b 4b 96 divwu r10,r11,r9
ffc09db8: 7d 4a 49 d6 mullw r10,r10,r9
);
return false;
}
if (
ffc09dbc: 7f 8b 50 00 cmpw cr7,r11,r10
ffc09dc0: 41 be 00 18 beq+ cr7,ffc09dd8 <_Heap_Walk+0x220>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc09dc4: 3c a0 ff c1 lis r5,-63
ffc09dc8: 7f e3 fb 78 mr r3,r31
ffc09dcc: 38 80 00 01 li r4,1
ffc09dd0: 38 a5 76 56 addi r5,r5,30294
ffc09dd4: 48 00 03 14 b ffc0a0e8 <_Heap_Walk+0x530>
- 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;
ffc09dd8: 81 66 00 04 lwz r11,4(r6)
ffc09ddc: 55 6b 00 3c rlwinm r11,r11,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc09de0: 7d 66 5a 14 add r11,r6,r11
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;
ffc09de4: 81 6b 00 04 lwz r11,4(r11)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc09de8: 71 6a 00 01 andi. r10,r11,1
ffc09dec: 41 a2 00 18 beq+ ffc09e04 <_Heap_Walk+0x24c>
(*printer)(
ffc09df0: 3c a0 ff c1 lis r5,-63
ffc09df4: 7f e3 fb 78 mr r3,r31
ffc09df8: 38 80 00 01 li r4,1
ffc09dfc: 38 a5 76 86 addi r5,r5,30342
ffc09e00: 48 00 02 e8 b ffc0a0e8 <_Heap_Walk+0x530>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc09e04: 80 e6 00 0c lwz r7,12(r6)
ffc09e08: 7f 87 00 00 cmpw cr7,r7,r0
ffc09e0c: 41 be 00 2c beq+ cr7,ffc09e38 <_Heap_Walk+0x280>
(*printer)(
ffc09e10: 3c a0 ff c1 lis r5,-63
ffc09e14: 7f e3 fb 78 mr r3,r31
ffc09e18: 38 80 00 01 li r4,1
ffc09e1c: 38 a5 76 a2 addi r5,r5,30370
ffc09e20: 80 01 00 18 lwz r0,24(r1)
ffc09e24: 7c 09 03 a6 mtctr r0
ffc09e28: 4c c6 31 82 crclr 4*cr1+eq
ffc09e2c: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc09e30: 38 60 00 00 li r3,0
ffc09e34: 48 00 02 98 b ffc0a0cc <_Heap_Walk+0x514>
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc09e38: 7c c0 33 78 mr r0,r6
ffc09e3c: 80 c6 00 08 lwz r6,8(r6)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
ffc09e40: 7f 86 f0 00 cmpw cr7,r6,r30
ffc09e44: 40 9e ff 30 bne+ cr7,ffc09d74 <_Heap_Walk+0x1bc>
ffc09e48: 48 00 00 0c b ffc09e54 <_Heap_Walk+0x29c>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc09e4c: 7f 7d db 78 mr r29,r27
ffc09e50: 48 00 00 30 b ffc09e80 <_Heap_Walk+0x2c8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc09e54: 3e 60 ff c1 lis r19,-63
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc09e58: 3e 80 ff c1 lis r20,-63
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc09e5c: 3e 40 ff c1 lis r18,-63
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc09e60: 3a 73 78 42 addi r19,r19,30786
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc09e64: 3a 94 78 2b addi r20,r20,30763
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc09e68: 3a 52 77 8e addi r18,r18,30606
ffc09e6c: 3e 20 ff c1 lis r17,-63
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc09e70: 3e c0 ff c1 lis r22,-63
ffc09e74: 3e 00 ff c1 lis r16,-63
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc09e78: 3d e0 ff c1 lis r15,-63
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc09e7c: 3d c0 ff c1 lis r14,-63
block = next_block;
} while ( block != first_block );
return true;
}
ffc09e80: 82 bd 00 04 lwz r21,4(r29)
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;
ffc09e84: 38 00 00 00 li r0,0
ffc09e88: 81 3e 00 20 lwz r9,32(r30)
- 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;
ffc09e8c: 56 bc 00 3c rlwinm r28,r21,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc09e90: 7f 7c ea 14 add r27,r28,r29
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;
ffc09e94: 7f 89 d8 40 cmplw cr7,r9,r27
ffc09e98: 41 9d 00 14 bgt- cr7,ffc09eac <_Heap_Walk+0x2f4> <== NEVER TAKEN
ffc09e9c: 80 1e 00 24 lwz r0,36(r30)
ffc09ea0: 7c 1b 00 10 subfc r0,r27,r0
ffc09ea4: 38 00 00 00 li r0,0
ffc09ea8: 7c 00 01 14 adde r0,r0,r0
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc09eac: 2f 80 00 00 cmpwi cr7,r0,0
ffc09eb0: 40 be 00 18 bne+ cr7,ffc09ec8 <_Heap_Walk+0x310>
(*printer)(
ffc09eb4: 3c a0 ff c1 lis r5,-63
ffc09eb8: 7f e3 fb 78 mr r3,r31
ffc09ebc: 38 80 00 01 li r4,1
ffc09ec0: 38 a5 76 d4 addi r5,r5,30420
ffc09ec4: 48 00 00 a8 b ffc09f6c <_Heap_Walk+0x3b4>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc09ec8: 7d 3c d3 96 divwu r9,r28,r26
ffc09ecc: 7d 29 d1 d6 mullw r9,r9,r26
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
ffc09ed0: 7f a0 ba 78 xor r0,r29,r23
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc09ed4: 7f 9c 48 00 cmpw cr7,r28,r9
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
ffc09ed8: 7c 00 00 34 cntlzw r0,r0
ffc09edc: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc09ee0: 68 00 00 01 xori r0,r0,1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc09ee4: 41 9e 00 28 beq- cr7,ffc09f0c <_Heap_Walk+0x354>
ffc09ee8: 2f 80 00 00 cmpwi cr7,r0,0
ffc09eec: 41 be 00 20 beq+ cr7,ffc09f0c <_Heap_Walk+0x354>
(*printer)(
ffc09ef0: 3c a0 ff c1 lis r5,-63
ffc09ef4: 7f e3 fb 78 mr r3,r31
ffc09ef8: 38 80 00 01 li r4,1
ffc09efc: 38 a5 77 01 addi r5,r5,30465
ffc09f00: 7f a6 eb 78 mr r6,r29
ffc09f04: 7f 87 e3 78 mr r7,r28
ffc09f08: 4b ff ff 18 b ffc09e20 <_Heap_Walk+0x268>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
ffc09f0c: 7f 9c c8 40 cmplw cr7,r28,r25
ffc09f10: 40 9c 00 3c bge- cr7,ffc09f4c <_Heap_Walk+0x394>
ffc09f14: 2f 80 00 00 cmpwi cr7,r0,0
ffc09f18: 41 be 00 34 beq+ cr7,ffc09f4c <_Heap_Walk+0x394> <== NEVER TAKEN
(*printer)(
ffc09f1c: 80 01 00 18 lwz r0,24(r1)
ffc09f20: 3c a0 ff c1 lis r5,-63
ffc09f24: 7f e3 fb 78 mr r3,r31
ffc09f28: 38 80 00 01 li r4,1
ffc09f2c: 7c 09 03 a6 mtctr r0
ffc09f30: 38 a5 77 2f addi r5,r5,30511
ffc09f34: 7f a6 eb 78 mr r6,r29
ffc09f38: 7f 87 e3 78 mr r7,r28
ffc09f3c: 7f 28 cb 78 mr r8,r25
ffc09f40: 4c c6 31 82 crclr 4*cr1+eq
ffc09f44: 4e 80 04 21 bctrl
ffc09f48: 4b ff fe e8 b ffc09e30 <_Heap_Walk+0x278>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
ffc09f4c: 7f 9b e8 40 cmplw cr7,r27,r29
ffc09f50: 41 9d 00 28 bgt- cr7,ffc09f78 <_Heap_Walk+0x3c0>
ffc09f54: 2f 80 00 00 cmpwi cr7,r0,0
ffc09f58: 41 be 00 20 beq+ cr7,ffc09f78 <_Heap_Walk+0x3c0>
(*printer)(
ffc09f5c: 3c a0 ff c1 lis r5,-63
ffc09f60: 7f e3 fb 78 mr r3,r31
ffc09f64: 38 80 00 01 li r4,1
ffc09f68: 38 a5 77 5a addi r5,r5,30554
ffc09f6c: 7f a6 eb 78 mr r6,r29
ffc09f70: 7f 67 db 78 mr r7,r27
ffc09f74: 4b ff fe ac b ffc09e20 <_Heap_Walk+0x268>
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;
ffc09f78: 80 1b 00 04 lwz r0,4(r27)
ffc09f7c: 56 b5 07 fe clrlwi r21,r21,31
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc09f80: 70 09 00 01 andi. r9,r0,1
ffc09f84: 40 a2 00 ec bne+ ffc0a070 <_Heap_Walk+0x4b8>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
ffc09f88: 81 1d 00 0c lwz r8,12(r29)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc09f8c: 39 2f 74 7a addi r9,r15,29818
ffc09f90: 80 1e 00 08 lwz r0,8(r30)
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
ffc09f94: 81 7e 00 0c lwz r11,12(r30)
ffc09f98: 7f 88 00 00 cmpw cr7,r8,r0
ffc09f9c: 41 9e 00 14 beq- cr7,ffc09fb0 <_Heap_Walk+0x3f8>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc09fa0: 7f 88 f0 00 cmpw cr7,r8,r30
ffc09fa4: 39 36 73 c3 addi r9,r22,29635
ffc09fa8: 40 be 00 08 bne+ cr7,ffc09fb0 <_Heap_Walk+0x3f8>
ffc09fac: 39 2e 74 8a addi r9,r14,29834
block->next,
block->next == last_free_block ?
ffc09fb0: 81 5d 00 08 lwz r10,8(r29)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc09fb4: 38 11 74 94 addi r0,r17,29844
ffc09fb8: 7f 8a 58 00 cmpw cr7,r10,r11
ffc09fbc: 41 9e 00 14 beq- cr7,ffc09fd0 <_Heap_Walk+0x418>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc09fc0: 7f 8a f0 00 cmpw cr7,r10,r30
ffc09fc4: 38 16 73 c3 addi r0,r22,29635
ffc09fc8: 40 be 00 08 bne+ cr7,ffc09fd0 <_Heap_Walk+0x418>
ffc09fcc: 38 10 74 a3 addi r0,r16,29859
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc09fd0: 90 01 00 08 stw r0,8(r1)
ffc09fd4: 7f e3 fb 78 mr r3,r31
ffc09fd8: 38 80 00 00 li r4,0
ffc09fdc: 80 01 00 18 lwz r0,24(r1)
ffc09fe0: 7e 45 93 78 mr r5,r18
ffc09fe4: 7f a6 eb 78 mr r6,r29
ffc09fe8: 7f 87 e3 78 mr r7,r28
ffc09fec: 7c 09 03 a6 mtctr r0
ffc09ff0: 4c c6 31 82 crclr 4*cr1+eq
ffc09ff4: 4e 80 04 21 bctrl
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
ffc09ff8: 81 1b 00 00 lwz r8,0(r27)
ffc09ffc: 7f 9c 40 00 cmpw cr7,r28,r8
ffc0a000: 41 be 00 34 beq+ cr7,ffc0a034 <_Heap_Walk+0x47c>
(*printer)(
ffc0a004: 80 01 00 18 lwz r0,24(r1)
ffc0a008: 3c a0 ff c1 lis r5,-63
ffc0a00c: 7f e3 fb 78 mr r3,r31
ffc0a010: 38 80 00 01 li r4,1
ffc0a014: 7c 09 03 a6 mtctr r0
ffc0a018: 38 a5 77 c3 addi r5,r5,30659
ffc0a01c: 7f a6 eb 78 mr r6,r29
ffc0a020: 7f 87 e3 78 mr r7,r28
ffc0a024: 7f 69 db 78 mr r9,r27
ffc0a028: 4c c6 31 82 crclr 4*cr1+eq
ffc0a02c: 4e 80 04 21 bctrl
ffc0a030: 4b ff fe 00 b ffc09e30 <_Heap_Walk+0x278>
);
return false;
}
if ( !prev_used ) {
ffc0a034: 2f 95 00 00 cmpwi cr7,r21,0
ffc0a038: 40 be 00 18 bne+ cr7,ffc0a050 <_Heap_Walk+0x498>
(*printer)(
ffc0a03c: 3c a0 ff c1 lis r5,-63
ffc0a040: 7f e3 fb 78 mr r3,r31
ffc0a044: 38 80 00 01 li r4,1
ffc0a048: 38 a5 77 fc addi r5,r5,30716
ffc0a04c: 48 00 00 98 b ffc0a0e4 <_Heap_Walk+0x52c>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a050: 81 3e 00 08 lwz r9,8(r30)
ffc0a054: 48 00 00 10 b ffc0a064 <_Heap_Walk+0x4ac>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
ffc0a058: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0a05c: 41 9e 00 64 beq- cr7,ffc0a0c0 <_Heap_Walk+0x508>
return true;
}
free_block = free_block->next;
ffc0a060: 81 29 00 08 lwz r9,8(r9)
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
ffc0a064: 7f 89 f0 00 cmpw cr7,r9,r30
ffc0a068: 40 9e ff f0 bne+ cr7,ffc0a058 <_Heap_Walk+0x4a0>
ffc0a06c: 48 00 00 68 b ffc0a0d4 <_Heap_Walk+0x51c>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0a070: 2f 95 00 00 cmpwi cr7,r21,0
(*printer)(
ffc0a074: 7f e3 fb 78 mr r3,r31
ffc0a078: 38 80 00 00 li r4,0
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0a07c: 41 9e 00 24 beq- cr7,ffc0a0a0 <_Heap_Walk+0x4e8>
(*printer)(
ffc0a080: 80 01 00 18 lwz r0,24(r1)
ffc0a084: 7e 85 a3 78 mr r5,r20
ffc0a088: 7f a6 eb 78 mr r6,r29
ffc0a08c: 7f 87 e3 78 mr r7,r28
ffc0a090: 7c 09 03 a6 mtctr r0
ffc0a094: 4c c6 31 82 crclr 4*cr1+eq
ffc0a098: 4e 80 04 21 bctrl
ffc0a09c: 48 00 00 24 b ffc0a0c0 <_Heap_Walk+0x508>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a0a0: 80 01 00 18 lwz r0,24(r1)
ffc0a0a4: 7e 65 9b 78 mr r5,r19
ffc0a0a8: 7f a6 eb 78 mr r6,r29
ffc0a0ac: 81 1d 00 00 lwz r8,0(r29)
ffc0a0b0: 7f 87 e3 78 mr r7,r28
ffc0a0b4: 7c 09 03 a6 mtctr r0
ffc0a0b8: 4c c6 31 82 crclr 4*cr1+eq
ffc0a0bc: 4e 80 04 21 bctrl
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc0a0c0: 7f 9b c0 00 cmpw cr7,r27,r24
ffc0a0c4: 40 9e fd 88 bne+ cr7,ffc09e4c <_Heap_Walk+0x294>
return true;
ffc0a0c8: 38 60 00 01 li r3,1
}
ffc0a0cc: 39 61 00 68 addi r11,r1,104
ffc0a0d0: 4b ff 6a 1c b ffc00aec <_restgpr_14_x>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0a0d4: 3c a0 ff c1 lis r5,-63
ffc0a0d8: 7f e3 fb 78 mr r3,r31
ffc0a0dc: 38 80 00 01 li r4,1
ffc0a0e0: 38 a5 78 67 addi r5,r5,30823
ffc0a0e4: 7f a6 eb 78 mr r6,r29
ffc0a0e8: 80 01 00 18 lwz r0,24(r1)
ffc0a0ec: 7c 09 03 a6 mtctr r0
ffc0a0f0: 4c c6 31 82 crclr 4*cr1+eq
ffc0a0f4: 4e 80 04 21 bctrl
ffc0a0f8: 4b ff fd 38 b ffc09e30 <_Heap_Walk+0x278>
ffc09b08 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc09b08: 7c 08 02 a6 mflr r0
ffc09b0c: 7c 2b 0b 78 mr r11,r1
ffc09b10: 94 21 ff 88 stwu r1,-120(r1)
ffc09b14: 90 01 00 7c stw r0,124(r1)
ffc09b18: 4b ff 6f cd bl ffc00ae4 <_savegpr_31>
ffc09b1c: 7c 60 1b 78 mr r0,r3
ffc09b20: 90 c1 00 1c stw r6,28(r1)
ffc09b24: 90 e1 00 20 stw r7,32(r1)
ffc09b28: 91 01 00 24 stw r8,36(r1)
ffc09b2c: 91 21 00 28 stw r9,40(r1)
ffc09b30: 91 41 00 2c stw r10,44(r1)
ffc09b34: 40 86 00 24 bne- cr1,ffc09b58 <_Heap_Walk_print+0x50> <== ALWAYS TAKEN
ffc09b38: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc09b3c: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc09b40: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc09b44: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc09b48: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc09b4c: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc09b50: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc09b54: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc09b58: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc09b5c: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc09b60: 41 be 00 10 beq+ cr7,ffc09b70 <_Heap_Walk_print+0x68>
printk( "FAIL[%d]: ", source );
ffc09b64: 3c 60 ff c1 lis r3,-63
ffc09b68: 38 63 74 64 addi r3,r3,29796
ffc09b6c: 48 00 00 0c b ffc09b78 <_Heap_Walk_print+0x70>
} else {
printk( "PASS[%d]: ", source );
ffc09b70: 3c 60 ff c1 lis r3,-63
ffc09b74: 38 63 74 6f addi r3,r3,29807
ffc09b78: 7c 04 03 78 mr r4,r0
ffc09b7c: 4c c6 31 82 crclr 4*cr1+eq
ffc09b80: 4b ff be d1 bl ffc05a50 <printk>
}
va_start( ap, fmt );
ffc09b84: 38 00 00 03 li r0,3
ffc09b88: 98 01 00 08 stb r0,8(r1)
ffc09b8c: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc09b90: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc09b94: 98 01 00 09 stb r0,9(r1)
ffc09b98: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc09b9c: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc09ba0: 90 01 00 0c stw r0,12(r1)
ffc09ba4: 38 01 00 10 addi r0,r1,16
ffc09ba8: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc09bac: 4b ff dc 45 bl ffc077f0 <vprintk>
va_end( ap );
}
ffc09bb0: 39 61 00 78 addi r11,r1,120
ffc09bb4: 4b ff 6f 7c b ffc00b30 <_restgpr_31_x>
ffc09560 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc09560: 7c 2b 0b 78 mr r11,r1
ffc09564: 94 21 ff f0 stwu r1,-16(r1)
ffc09568: 7c 08 02 a6 mflr r0
ffc0956c: 48 01 0d c9 bl ffc1a334 <_savegpr_31>
_Internal_errors_What_happened.the_source = the_source;
ffc09570: 3d 60 00 00 lis r11,0
ffc09574: 39 2b 2c d0 addi r9,r11,11472
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc09578: 90 01 00 14 stw r0,20(r1)
ffc0957c: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc09580: 98 89 00 04 stb r4,4(r9)
_Internal_errors_What_happened.the_error = the_error;
ffc09584: 90 a9 00 08 stw r5,8(r9)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
ffc09588: 90 6b 2c d0 stw r3,11472(r11)
_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 );
ffc0958c: 48 00 20 e5 bl ffc0b670 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc09590: 38 00 00 05 li r0,5
ffc09594: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc09598: 7f e3 fb 78 mr r3,r31
ffc0959c: 90 09 28 04 stw r0,10244(r9)
ffc095a0: 4b ff a3 5d bl ffc038fc <_BSP_Fatal_error>
ffc095a4: 48 00 00 00 b ffc095a4 <_Internal_error_Occurred+0x44><== NOT EXECUTED
ffc095bc <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc095bc: 94 21 ff f0 stwu r1,-16(r1)
ffc095c0: 7c 08 02 a6 mflr r0
ffc095c4: 90 01 00 14 stw r0,20(r1)
* 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 )
ffc095c8: 80 03 00 18 lwz r0,24(r3)
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc095cc: bf c1 00 08 stmw r30,8(r1)
ffc095d0: 7c 7f 1b 78 mr r31,r3
* 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 )
ffc095d4: 2f 80 00 00 cmpwi cr7,r0,0
return NULL;
ffc095d8: 38 60 00 00 li r3,0
* 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 )
ffc095dc: 41 9e 00 70 beq- cr7,ffc0964c <_Objects_Allocate+0x90> <== NEVER TAKEN
/*
* 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 );
ffc095e0: 3b df 00 20 addi r30,r31,32
ffc095e4: 7f c3 f3 78 mr r3,r30
ffc095e8: 4b ff f5 c9 bl ffc08bb0 <_Chain_Get>
if ( information->auto_extend ) {
ffc095ec: 88 1f 00 12 lbz r0,18(r31)
ffc095f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc095f4: 41 9e 00 58 beq- cr7,ffc0964c <_Objects_Allocate+0x90>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc095f8: 2f 83 00 00 cmpwi cr7,r3,0
ffc095fc: 40 be 00 1c bne+ cr7,ffc09618 <_Objects_Allocate+0x5c>
_Objects_Extend_information( information );
ffc09600: 7f e3 fb 78 mr r3,r31
ffc09604: 48 00 00 85 bl ffc09688 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc09608: 7f c3 f3 78 mr r3,r30
ffc0960c: 4b ff f5 a5 bl ffc08bb0 <_Chain_Get>
}
if ( the_object ) {
ffc09610: 2c 03 00 00 cmpwi r3,0
ffc09614: 41 a2 00 38 beq+ ffc0964c <_Objects_Allocate+0x90>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc09618: a1 23 00 0a lhz r9,10(r3)
ffc0961c: a0 1f 00 0a lhz r0,10(r31)
ffc09620: 7c 00 48 50 subf r0,r0,r9
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc09624: a1 3f 00 14 lhz r9,20(r31)
ffc09628: 7c 00 4b 96 divwu r0,r0,r9
information->inactive_per_block[ block ]--;
ffc0962c: 81 3f 00 30 lwz r9,48(r31)
ffc09630: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc09634: 7d 69 00 2e lwzx r11,r9,r0
ffc09638: 39 6b ff ff addi r11,r11,-1
ffc0963c: 7d 69 01 2e stwx r11,r9,r0
information->inactive--;
ffc09640: a1 3f 00 2c lhz r9,44(r31)
ffc09644: 38 09 ff ff addi r0,r9,-1
ffc09648: b0 1f 00 2c sth r0,44(r31)
);
}
#endif
return the_object;
}
ffc0964c: 39 61 00 10 addi r11,r1,16
ffc09650: 4b ff 6e e0 b ffc00530 <_restgpr_30_x>
ffc09688 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09688: 94 21 ff b8 stwu r1,-72(r1)
ffc0968c: 7c 08 02 a6 mflr r0
ffc09690: 90 01 00 4c stw r0,76(r1)
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc09694: 81 63 00 34 lwz r11,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09698: be a1 00 1c stmw r21,28(r1)
ffc0969c: 7c 7f 1b 78 mr r31,r3
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc096a0: 2f 8b 00 00 cmpwi cr7,r11,0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
ffc096a4: a3 83 00 0a lhz r28,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc096a8: 41 9e 00 58 beq- cr7,ffc09700 <_Objects_Extend_information+0x78>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc096ac: a1 43 00 14 lhz r10,20(r3)
for ( ; block < block_count; block++ ) {
ffc096b0: 39 20 00 00 li r9,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc096b4: a3 63 00 10 lhz r27,16(r3)
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc096b8: 3b a0 00 00 li r29,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc096bc: 7f 7b 53 96 divwu r27,r27,r10
ffc096c0: 2f 9b 00 00 cmpwi cr7,r27,0
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc096c4: 38 1b 00 01 addi r0,r27,1
ffc096c8: 40 be 00 24 bne+ cr7,ffc096ec <_Objects_Extend_information+0x64><== ALWAYS TAKEN
ffc096cc: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc096d0: 48 00 00 1c b ffc096ec <_Objects_Extend_information+0x64><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc096d4: 57 a8 10 3a rlwinm r8,r29,2,0,29
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
ffc096d8: 7d 0b 40 2e lwzx r8,r11,r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc096dc: 7d 29 52 14 add r9,r9,r10
if ( information->object_blocks[ block ] == NULL ) {
ffc096e0: 2f 88 00 00 cmpwi cr7,r8,0
ffc096e4: 41 9e 00 30 beq- cr7,ffc09714 <_Objects_Extend_information+0x8c>
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc096e8: 3b bd 00 01 addi r29,r29,1
ffc096ec: 34 00 ff ff addic. r0,r0,-1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc096f0: 7f c9 e2 14 add r30,r9,r28
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc096f4: 40 82 ff e0 bne+ ffc096d4 <_Objects_Extend_information+0x4c>
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
ffc096f8: 3b 40 00 01 li r26,1
ffc096fc: 48 00 00 1c b ffc09718 <_Objects_Extend_information+0x90>
minimum_index = _Objects_Get_index( information->minimum_id );
ffc09700: 7f 9e e3 78 mr r30,r28
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
ffc09704: 3b 40 00 01 li r26,1
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc09708: 3b a0 00 00 li r29,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
ffc0970c: 3b 60 00 00 li r27,0
ffc09710: 48 00 00 08 b ffc09718 <_Objects_Extend_information+0x90>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc09714: 3b 40 00 00 li r26,0
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc09718: a0 1f 00 14 lhz r0,20(r31)
ffc0971c: a2 ff 00 10 lhz r23,16(r31)
ffc09720: 7e e0 ba 14 add r23,r0,r23
/*
* 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 ) {
ffc09724: 2b 97 ff ff cmplwi cr7,r23,65535
ffc09728: 41 9d 02 10 bgt- cr7,ffc09938 <_Objects_Extend_information+0x2b0>
/*
* 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;
ffc0972c: 80 7f 00 18 lwz r3,24(r31)
ffc09730: 7c 60 19 d6 mullw r3,r0,r3
if ( information->auto_extend ) {
ffc09734: 88 1f 00 12 lbz r0,18(r31)
ffc09738: 2f 80 00 00 cmpwi cr7,r0,0
ffc0973c: 41 9e 00 14 beq- cr7,ffc09750 <_Objects_Extend_information+0xc8>
new_object_block = _Workspace_Allocate( block_size );
ffc09740: 48 00 24 2d bl ffc0bb6c <_Workspace_Allocate>
if ( !new_object_block )
ffc09744: 7c 78 1b 79 mr. r24,r3
ffc09748: 40 a2 00 10 bne+ ffc09758 <_Objects_Extend_information+0xd0>
ffc0974c: 48 00 01 ec b ffc09938 <_Objects_Extend_information+0x2b0>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc09750: 48 00 24 7d bl ffc0bbcc <_Workspace_Allocate_or_fatal_error>
ffc09754: 7c 78 1b 78 mr r24,r3
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
ffc09758: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0975c: 41 9e 01 58 beq- cr7,ffc098b4 <_Objects_Extend_information+0x22c>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc09760: 3b 5b 00 01 addi r26,r27,1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc09764: 1c 1a 00 03 mulli r0,r26,3
((maximum + minimum_index) * sizeof(Objects_Control *));
ffc09768: 7c 77 e2 14 add r3,r23,r28
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc0976c: 7c 63 02 14 add r3,r3,r0
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
ffc09770: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc09774: 48 00 23 f9 bl ffc0bb6c <_Workspace_Allocate>
if ( !object_blocks ) {
ffc09778: 7c 76 1b 79 mr. r22,r3
ffc0977c: 40 a2 00 10 bne+ ffc0978c <_Objects_Extend_information+0x104>
_Workspace_Free( new_object_block );
ffc09780: 7f 03 c3 78 mr r3,r24
ffc09784: 48 00 24 1d bl ffc0bba0 <_Workspace_Free>
return;
ffc09788: 48 00 01 b0 b ffc09938 <_Objects_Extend_information+0x2b0>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0978c: a0 1f 00 10 lhz r0,16(r31)
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc09790: 57 5a 10 3a rlwinm r26,r26,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc09794: 7f 36 d2 14 add r25,r22,r26
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc09798: 7f 80 e0 40 cmplw cr7,r0,r28
ffc0979c: 7f 59 d2 14 add r26,r25,r26
ffc097a0: 39 20 00 00 li r9,0
ffc097a4: 40 bd 00 50 ble+ cr7,ffc097f4 <_Objects_Extend_information+0x16c>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc097a8: 57 75 10 3a rlwinm r21,r27,2,0,29
/*
* 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,
ffc097ac: 80 9f 00 34 lwz r4,52(r31)
ffc097b0: 7e a5 ab 78 mr r5,r21
ffc097b4: 48 00 71 25 bl ffc108d8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc097b8: 80 9f 00 30 lwz r4,48(r31)
ffc097bc: 7e a5 ab 78 mr r5,r21
ffc097c0: 7f 23 cb 78 mr r3,r25
ffc097c4: 48 00 71 15 bl ffc108d8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc097c8: a0 1f 00 10 lhz r0,16(r31)
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc097cc: 80 9f 00 1c lwz r4,28(r31)
ffc097d0: 7f 43 d3 78 mr r3,r26
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc097d4: 7f 9c 02 14 add r28,r28,r0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc097d8: 57 85 10 3a rlwinm r5,r28,2,0,29
ffc097dc: 48 00 70 fd bl ffc108d8 <memcpy>
ffc097e0: 48 00 00 30 b ffc09810 <_Objects_Extend_information+0x188>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc097e4: 55 2a 10 3a rlwinm r10,r9,2,0,29
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc097e8: 7d 6a d1 2e stwx r11,r10,r26
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc097ec: 39 29 00 01 addi r9,r9,1
ffc097f0: 48 00 00 18 b ffc09808 <_Objects_Extend_information+0x180>
ffc097f4: 2f 9c 00 00 cmpwi cr7,r28,0
local_table[ index ] = NULL;
ffc097f8: 39 60 00 00 li r11,0
ffc097fc: 38 1c 00 01 addi r0,r28,1
ffc09800: 40 be 00 08 bne+ cr7,ffc09808 <_Objects_Extend_information+0x180><== ALWAYS TAKEN
ffc09804: 38 00 00 01 li r0,1 <== NOT EXECUTED
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc09808: 34 00 ff ff addic. r0,r0,-1
ffc0980c: 40 82 ff d8 bne+ ffc097e4 <_Objects_Extend_information+0x15c>
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc09810: a1 5f 00 14 lhz r10,20(r31)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc09814: 38 00 00 00 li r0,0
ffc09818: 57 7b 10 3a rlwinm r27,r27,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0981c: 7d 7e 52 14 add r11,r30,r10
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc09820: 7c 16 d9 2e stwx r0,r22,r27
ffc09824: 7f 9e 58 40 cmplw cr7,r30,r11
inactive_per_block[block_count] = 0;
ffc09828: 7c 19 d9 2e stwx r0,r25,r27
for ( index=index_base ;
ffc0982c: 39 20 00 00 li r9,0
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09830: 57 c8 10 3a rlwinm r8,r30,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc09834: 38 e0 00 00 li r7,0
ffc09838: 38 0a 00 01 addi r0,r10,1
ffc0983c: 41 9d 00 0c bgt- cr7,ffc09848 <_Objects_Extend_information+0x1c0><== NEVER TAKEN
ffc09840: 2f 8b 00 00 cmpwi cr7,r11,0
ffc09844: 40 be 00 18 bne+ cr7,ffc0985c <_Objects_Extend_information+0x1d4><== ALWAYS TAKEN
ffc09848: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0984c: 48 00 00 10 b ffc0985c <_Objects_Extend_information+0x1d4><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09850: 7d 7a 42 14 add r11,r26,r8
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc09854: 7c eb 49 2e stwx r7,r11,r9
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
ffc09858: 39 29 00 04 addi r9,r9,4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0985c: 34 00 ff ff addic. r0,r0,-1
ffc09860: 40 82 ff f0 bne+ ffc09850 <_Objects_Extend_information+0x1c8>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09864: 7c 00 00 a6 mfmsr r0
ffc09868: 7d 30 42 a6 mfsprg r9,0
ffc0986c: 7c 09 48 78 andc r9,r0,r9
ffc09870: 7d 20 01 24 mtmsr r9
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc09874: 81 3f 00 00 lwz r9,0(r31)
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;
ffc09878: 56 f7 04 3e clrlwi r23,r23,16
information->maximum_id = _Objects_Build_id(
ffc0987c: a1 7f 00 04 lhz r11,4(r31)
ffc09880: 55 29 c0 0e rlwinm r9,r9,24,0,7
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;
ffc09884: b2 ff 00 10 sth r23,16(r31)
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc09888: 55 6b d8 08 rlwinm r11,r11,27,0,4
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0988c: 65 29 00 01 oris r9,r9,1
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc09890: 80 7f 00 34 lwz r3,52(r31)
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc09894: 7d 29 5b 78 or r9,r9,r11
information->object_blocks = object_blocks;
ffc09898: 92 df 00 34 stw r22,52(r31)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0989c: 7d 37 bb 78 or r23,r9,r23
information->inactive_per_block = inactive_per_block;
ffc098a0: 93 3f 00 30 stw r25,48(r31)
information->local_table = local_table;
ffc098a4: 93 5f 00 1c stw r26,28(r31)
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc098a8: 92 ff 00 0c stw r23,12(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc098ac: 7c 00 01 24 mtmsr r0
information->maximum
);
_ISR_Enable( level );
_Workspace_Free( old_tables );
ffc098b0: 48 00 22 f1 bl ffc0bba0 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc098b4: 81 3f 00 34 lwz r9,52(r31)
ffc098b8: 57 bd 10 3a rlwinm r29,r29,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc098bc: 3b 81 00 08 addi r28,r1,8
ffc098c0: a0 bf 00 14 lhz r5,20(r31)
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc098c4: 7f 09 e9 2e stwx r24,r9,r29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc098c8: 7f 83 e3 78 mr r3,r28
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc098cc: 3b 7f 00 20 addi r27,r31,32
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc098d0: 81 3f 00 34 lwz r9,52(r31)
ffc098d4: 80 df 00 18 lwz r6,24(r31)
ffc098d8: 7c 89 e8 2e lwzx r4,r9,r29
ffc098dc: 48 00 41 8d bl ffc0da68 <_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 ) {
ffc098e0: 48 00 00 30 b ffc09910 <_Objects_Extend_information+0x288>
ffc098e4: 81 3f 00 00 lwz r9,0(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc098e8: 7f 63 db 78 mr r3,r27
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
ffc098ec: a0 1f 00 04 lhz r0,4(r31)
ffc098f0: 55 29 c0 0e rlwinm r9,r9,24,0,7
ffc098f4: 65 29 00 01 oris r9,r9,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc098f8: 54 00 d8 08 rlwinm r0,r0,27,0,4
ffc098fc: 7d 20 03 78 or r0,r9,r0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc09900: 7c 00 f3 78 or r0,r0,r30
ffc09904: 90 04 00 08 stw r0,8(r4)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc09908: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0990c: 4b ff f2 4d bl ffc08b58 <_Chain_Append>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
ffc09910: 7f 83 e3 78 mr r3,r28
ffc09914: 4b ff f2 9d bl ffc08bb0 <_Chain_Get>
ffc09918: 7c 64 1b 79 mr. r4,r3
ffc0991c: 40 82 ff c8 bne+ ffc098e4 <_Objects_Extend_information+0x25c>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc09920: a0 1f 00 14 lhz r0,20(r31)
ffc09924: 81 3f 00 30 lwz r9,48(r31)
ffc09928: 7c 09 e9 2e stwx r0,r9,r29
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0992c: a1 3f 00 2c lhz r9,44(r31)
ffc09930: 7c 00 4a 14 add r0,r0,r9
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
ffc09934: b0 1f 00 2c sth r0,44(r31)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc09938: 39 61 00 48 addi r11,r1,72
ffc0993c: 4b ff 6b d0 b ffc0050c <_restgpr_21_x>
ffc099f4 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc099f4: 94 21 ff e8 stwu r1,-24(r1)
ffc099f8: 7c 08 02 a6 mflr r0
ffc099fc: bf a1 00 0c stmw r29,12(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc09a00: 7c 9d 23 79 mr. r29,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc09a04: 7c 7e 1b 78 mr r30,r3
ffc09a08: 90 01 00 1c stw r0,28(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
ffc09a0c: 3b e0 00 00 li r31,0
)
{
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc09a10: 41 82 00 50 beq- ffc09a60 <_Objects_Get_information+0x6c>
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
ffc09a14: 48 00 45 c9 bl ffc0dfdc <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc09a18: 2c 03 00 00 cmpwi r3,0
ffc09a1c: 41 82 00 44 beq- ffc09a60 <_Objects_Get_information+0x6c>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc09a20: 7f 9d 18 40 cmplw cr7,r29,r3
ffc09a24: 41 9d 00 3c bgt- cr7,ffc09a60 <_Objects_Get_information+0x6c>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc09a28: 3d 20 00 00 lis r9,0
ffc09a2c: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc09a30: 39 29 2b e0 addi r9,r9,11232
ffc09a34: 7d 29 f0 2e lwzx r9,r9,r30
ffc09a38: 2f 89 00 00 cmpwi cr7,r9,0
ffc09a3c: 41 9e 00 24 beq- cr7,ffc09a60 <_Objects_Get_information+0x6c><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc09a40: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc09a44: 7f e9 e8 2e lwzx r31,r9,r29
if ( !info )
ffc09a48: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09a4c: 41 9e 00 14 beq- cr7,ffc09a60 <_Objects_Get_information+0x6c><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
ffc09a50: a0 1f 00 10 lhz r0,16(r31)
ffc09a54: 2f 80 00 00 cmpwi cr7,r0,0
ffc09a58: 40 be 00 08 bne+ cr7,ffc09a60 <_Objects_Get_information+0x6c>
return NULL;
ffc09a5c: 3b e0 00 00 li r31,0
#endif
return info;
}
ffc09a60: 39 61 00 18 addi r11,r1,24
ffc09a64: 7f e3 fb 78 mr r3,r31
ffc09a68: 4b ff 6a c4 b ffc0052c <_restgpr_29_x>
ffc0a494 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0a494: 94 21 ff e0 stwu r1,-32(r1)
ffc0a498: 7c 08 02 a6 mflr r0
ffc0a49c: bf c1 00 18 stmw r30,24(r1)
ffc0a4a0: 7c 9e 23 78 mr r30,r4
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0a4a4: 7c 64 1b 79 mr. r4,r3
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0a4a8: 90 01 00 24 stw r0,36(r1)
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0a4ac: 40 82 00 10 bne- ffc0a4bc <_Objects_Id_to_name+0x28>
ffc0a4b0: 3d 20 00 00 lis r9,0
ffc0a4b4: 81 29 2e 24 lwz r9,11812(r9)
ffc0a4b8: 80 89 00 08 lwz r4,8(r9)
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
ffc0a4bc: 54 89 47 7e rlwinm r9,r4,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0a4c0: 38 09 ff ff addi r0,r9,-1
ffc0a4c4: 2b 80 00 02 cmplwi cr7,r0,2
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
ffc0a4c8: 3b e0 00 03 li r31,3
ffc0a4cc: 41 9d 00 38 bgt- cr7,ffc0a504 <_Objects_Id_to_name+0x70>
ffc0a4d0: 48 00 00 40 b ffc0a510 <_Objects_Id_to_name+0x7c>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0a4d4: 54 80 3e 7a rlwinm r0,r4,7,25,29
ffc0a4d8: 7c 69 00 2e lwzx r3,r9,r0
if ( !information )
ffc0a4dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a4e0: 41 9e 00 24 beq- cr7,ffc0a504 <_Objects_Id_to_name+0x70><== NEVER TAKEN
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
ffc0a4e4: 38 a1 00 08 addi r5,r1,8
ffc0a4e8: 4b ff ff 2d bl ffc0a414 <_Objects_Get>
if ( !the_object )
ffc0a4ec: 2c 03 00 00 cmpwi r3,0
ffc0a4f0: 41 82 00 14 beq- ffc0a504 <_Objects_Id_to_name+0x70>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0a4f4: 80 03 00 0c lwz r0,12(r3)
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0a4f8: 3b e0 00 00 li r31,0
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0a4fc: 90 1e 00 00 stw r0,0(r30)
_Thread_Enable_dispatch();
ffc0a500: 48 00 0d e5 bl ffc0b2e4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
ffc0a504: 39 61 00 20 addi r11,r1,32
ffc0a508: 7f e3 fb 78 mr r3,r31
ffc0a50c: 4b ff 65 d0 b ffc00adc <_restgpr_30_x>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
ffc0a510: 3d 60 00 00 lis r11,0
ffc0a514: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0a518: 39 6b 2c 40 addi r11,r11,11328
ffc0a51c: 7d 2b 48 2e lwzx r9,r11,r9
ffc0a520: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a524: 40 9e ff b0 bne+ cr7,ffc0a4d4 <_Objects_Id_to_name+0x40>
ffc0a528: 4b ff ff dc b ffc0a504 <_Objects_Id_to_name+0x70>
ffc0a4d8 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a4d8: 94 21 ff e8 stwu r1,-24(r1)
ffc0a4dc: 7c 08 02 a6 mflr r0
ffc0a4e0: bf 81 00 08 stmw r28,8(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if(!the_node) return;
ffc0a4e4: 7c 9e 23 79 mr. r30,r4
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a4e8: 7c 7f 1b 78 mr r31,r3
ffc0a4ec: 90 01 00 1c stw r0,28(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if(!the_node) return;
ffc0a4f0: 41 82 01 cc beq- ffc0a6bc <_RBTree_Extract_unprotected+0x1e4>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
ffc0a4f4: 80 03 00 08 lwz r0,8(r3)
ffc0a4f8: 7f 9e 00 00 cmpw cr7,r30,r0
ffc0a4fc: 40 be 00 24 bne+ cr7,ffc0a520 <_RBTree_Extract_unprotected+0x48>
if (the_node->child[RBT_RIGHT])
ffc0a500: 80 1e 00 08 lwz r0,8(r30)
ffc0a504: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a508: 40 be 00 14 bne+ cr7,ffc0a51c <_RBTree_Extract_unprotected+0x44>
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
ffc0a50c: 81 3e 00 00 lwz r9,0(r30)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a510: 7f 83 48 00 cmpw cr7,r3,r9
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
ffc0a514: 91 23 00 08 stw r9,8(r3)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a518: 40 be 00 08 bne+ cr7,ffc0a520 <_RBTree_Extract_unprotected+0x48>
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
ffc0a51c: 90 1f 00 08 stw r0,8(r31)
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
ffc0a520: 80 1f 00 0c lwz r0,12(r31)
ffc0a524: 83 9e 00 04 lwz r28,4(r30)
ffc0a528: 7f 9e 00 00 cmpw cr7,r30,r0
ffc0a52c: 40 be 00 20 bne+ cr7,ffc0a54c <_RBTree_Extract_unprotected+0x74>
if (the_node->child[RBT_LEFT])
ffc0a530: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a534: 40 be 00 14 bne+ cr7,ffc0a548 <_RBTree_Extract_unprotected+0x70>
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
ffc0a538: 80 1e 00 00 lwz r0,0(r30)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a53c: 7f 9f 00 00 cmpw cr7,r31,r0
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
ffc0a540: 90 1f 00 0c stw r0,12(r31)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc0a544: 40 be 00 08 bne+ cr7,ffc0a54c <_RBTree_Extract_unprotected+0x74>
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
ffc0a548: 93 9f 00 0c stw r28,12(r31)
* either max in node->child[RBT_LEFT] or min in node->child[RBT_RIGHT],
* and replace the_node with the target node. This maintains the binary
* search tree property, but may violate the red-black properties.
*/
if (the_node->child[RBT_LEFT] && the_node->child[RBT_RIGHT]) {
ffc0a54c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a550: 80 1e 00 08 lwz r0,8(r30)
ffc0a554: 7f 9d e3 78 mr r29,r28
ffc0a558: 41 9e 00 d0 beq- cr7,ffc0a628 <_RBTree_Extract_unprotected+0x150>
ffc0a55c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a560: 40 be 00 0c bne+ cr7,ffc0a56c <_RBTree_Extract_unprotected+0x94>
ffc0a564: 48 00 00 d0 b ffc0a634 <_RBTree_Extract_unprotected+0x15c>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
ffc0a568: 7c 1d 03 78 mr r29,r0
ffc0a56c: 80 1d 00 08 lwz r0,8(r29)
ffc0a570: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a574: 40 9e ff f4 bne+ cr7,ffc0a568 <_RBTree_Extract_unprotected+0x90>
* target's position (target is the right child of target->parent)
* when target vacates it. if there is no child, then target->parent
* should become NULL. This may cause the coloring to be violated.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = target->child[RBT_LEFT];
ffc0a578: 83 9d 00 04 lwz r28,4(r29)
if(leaf) {
ffc0a57c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a580: 41 9e 00 10 beq- cr7,ffc0a590 <_RBTree_Extract_unprotected+0xb8><== ALWAYS TAKEN
leaf->parent = target->parent;
ffc0a584: 80 1d 00 00 lwz r0,0(r29) <== NOT EXECUTED
ffc0a588: 90 1c 00 00 stw r0,0(r28) <== NOT EXECUTED
ffc0a58c: 48 00 00 0c b ffc0a598 <_RBTree_Extract_unprotected+0xc0><== NOT EXECUTED
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
ffc0a590: 7f a3 eb 78 mr r3,r29
ffc0a594: 4b ff fd 65 bl ffc0a2f8 <_RBTree_Extract_validate_unprotected>
}
victim_color = target->color;
dir = target != target->parent->child[0];
ffc0a598: 81 7d 00 00 lwz r11,0(r29)
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
ffc0a59c: 81 3d 00 10 lwz r9,16(r29)
dir = target != target->parent->child[0];
ffc0a5a0: 80 0b 00 04 lwz r0,4(r11)
ffc0a5a4: 7f a0 02 78 xor r0,r29,r0
ffc0a5a8: 7c 00 00 34 cntlzw r0,r0
ffc0a5ac: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0a5b0: 68 00 00 01 xori r0,r0,1
target->parent->child[dir] = leaf;
ffc0a5b4: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a5b8: 7d 6b 02 14 add r11,r11,r0
ffc0a5bc: 93 8b 00 04 stw r28,4(r11)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
ffc0a5c0: 81 7e 00 00 lwz r11,0(r30)
ffc0a5c4: 80 0b 00 04 lwz r0,4(r11)
ffc0a5c8: 7f c0 02 78 xor r0,r30,r0
ffc0a5cc: 7c 00 00 34 cntlzw r0,r0
ffc0a5d0: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0a5d4: 68 00 00 01 xori r0,r0,1
the_node->parent->child[dir] = target;
ffc0a5d8: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a5dc: 7d 6b 02 14 add r11,r11,r0
ffc0a5e0: 93 ab 00 04 stw r29,4(r11)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
ffc0a5e4: 80 1e 00 08 lwz r0,8(r30)
ffc0a5e8: 90 1d 00 08 stw r0,8(r29)
if (the_node->child[RBT_RIGHT])
ffc0a5ec: 81 7e 00 08 lwz r11,8(r30)
ffc0a5f0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a5f4: 41 9e 00 08 beq- cr7,ffc0a5fc <_RBTree_Extract_unprotected+0x124><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
ffc0a5f8: 93 ab 00 00 stw r29,0(r11)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
ffc0a5fc: 80 1e 00 04 lwz r0,4(r30)
ffc0a600: 90 1d 00 04 stw r0,4(r29)
if (the_node->child[RBT_LEFT])
ffc0a604: 81 7e 00 04 lwz r11,4(r30)
ffc0a608: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a60c: 41 9e 00 08 beq- cr7,ffc0a614 <_RBTree_Extract_unprotected+0x13c>
the_node->child[RBT_LEFT]->parent = target;
ffc0a610: 93 ab 00 00 stw r29,0(r11)
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
ffc0a614: 80 1e 00 00 lwz r0,0(r30)
ffc0a618: 90 1d 00 00 stw r0,0(r29)
target->color = the_node->color;
ffc0a61c: 80 1e 00 10 lwz r0,16(r30)
ffc0a620: 90 1d 00 10 stw r0,16(r29)
ffc0a624: 48 00 00 4c b ffc0a670 <_RBTree_Extract_unprotected+0x198>
* violated. We will fix it later.
* For now we store the color of the node being deleted in victim_color.
*/
leaf = the_node->child[RBT_LEFT] ?
the_node->child[RBT_LEFT] : the_node->child[RBT_RIGHT];
if( leaf ) {
ffc0a628: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a62c: 7c 1c 03 78 mr r28,r0
ffc0a630: 41 9e 00 10 beq- cr7,ffc0a640 <_RBTree_Extract_unprotected+0x168>
leaf->parent = the_node->parent;
ffc0a634: 80 1e 00 00 lwz r0,0(r30)
ffc0a638: 90 1c 00 00 stw r0,0(r28)
ffc0a63c: 48 00 00 0c b ffc0a648 <_RBTree_Extract_unprotected+0x170>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
ffc0a640: 7f c3 f3 78 mr r3,r30
ffc0a644: 4b ff fc b5 bl ffc0a2f8 <_RBTree_Extract_validate_unprotected>
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0a648: 81 7e 00 00 lwz r11,0(r30)
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
ffc0a64c: 81 3e 00 10 lwz r9,16(r30)
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0a650: 80 0b 00 04 lwz r0,4(r11)
ffc0a654: 7f c0 02 78 xor r0,r30,r0
ffc0a658: 7c 00 00 34 cntlzw r0,r0
ffc0a65c: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0a660: 68 00 00 01 xori r0,r0,1
the_node->parent->child[dir] = leaf;
ffc0a664: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a668: 7d 6b 02 14 add r11,r11,r0
ffc0a66c: 93 8b 00 04 stw r28,4(r11)
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node and the child is red. Paint child black.
* 3. Deleted a black node and its child is black. This requires some
* care and rotations.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
ffc0a670: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a674: 40 9e 00 28 bne- cr7,ffc0a69c <_RBTree_Extract_unprotected+0x1c4>
ffc0a678: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0a67c: 41 9e 00 20 beq- cr7,ffc0a69c <_RBTree_Extract_unprotected+0x1c4>
ffc0a680: 80 1c 00 10 lwz r0,16(r28)
ffc0a684: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a688: 40 be 00 0c bne+ cr7,ffc0a694 <_RBTree_Extract_unprotected+0x1bc><== NEVER TAKEN
if (_RBTree_Is_red(leaf))
leaf->color = RBT_BLACK; /* case 2 */
ffc0a68c: 91 3c 00 10 stw r9,16(r28)
ffc0a690: 48 00 00 0c b ffc0a69c <_RBTree_Extract_unprotected+0x1c4>
else if(leaf)
_RBTree_Extract_validate_unprotected(leaf); /* case 3 */
ffc0a694: 7f 83 e3 78 mr r3,r28 <== NOT EXECUTED
ffc0a698: 4b ff fc 61 bl ffc0a2f8 <_RBTree_Extract_validate_unprotected><== NOT EXECUTED
/* Wipe the_node */
_RBTree_Set_off_rbtree(the_node);
/* set root to black, if it exists */
if (the_rbtree->root) the_rbtree->root->color = RBT_BLACK;
ffc0a69c: 81 3f 00 04 lwz r9,4(r31)
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
ffc0a6a0: 38 00 00 00 li r0,0
ffc0a6a4: 90 1e 00 08 stw r0,8(r30)
ffc0a6a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a6ac: 90 1e 00 04 stw r0,4(r30)
ffc0a6b0: 90 1e 00 00 stw r0,0(r30)
ffc0a6b4: 41 9e 00 08 beq- cr7,ffc0a6bc <_RBTree_Extract_unprotected+0x1e4>
ffc0a6b8: 90 09 00 10 stw r0,16(r9)
}
ffc0a6bc: 39 61 00 18 addi r11,r1,24
ffc0a6c0: 4b ff 6a 8c b ffc0114c <_restgpr_28_x>
ffc0a2f8 <_RBTree_Extract_validate_unprotected>:
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
RBTree_Node *the_node
)
{
ffc0a2f8: 94 21 ff e0 stwu r1,-32(r1)
ffc0a2fc: 7c 08 02 a6 mflr r0
ffc0a300: 90 01 00 24 stw r0,36(r1)
ffc0a304: bf 41 00 08 stmw r26,8(r1)
ffc0a308: 7c 7e 1b 78 mr r30,r3
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
ffc0a30c: 83 e3 00 00 lwz r31,0(r3)
if(!parent->parent) return;
ffc0a310: 80 1f 00 00 lwz r0,0(r31)
ffc0a314: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a318: 41 9e 01 b8 beq- cr7,ffc0a4d0 <_RBTree_Extract_validate_unprotected+0x1d8>
sibling = _RBTree_Sibling(the_node);
ffc0a31c: 4b ff ff 29 bl ffc0a244 <_RBTree_Sibling>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0a320: 3b 40 00 00 li r26,0
/* sibling is black, see if both of its children are also black. */
if (sibling &&
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
ffc0a324: 3b 60 00 01 li r27,1
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
ffc0a328: 48 00 01 60 b ffc0a488 <_RBTree_Extract_validate_unprotected+0x190>
ffc0a32c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a330: 41 9e 01 58 beq- cr7,ffc0a488 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN
ffc0a334: 80 03 00 10 lwz r0,16(r3)
ffc0a338: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a33c: 40 be 00 44 bne+ cr7,ffc0a380 <_RBTree_Extract_validate_unprotected+0x88>
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
ffc0a340: 83 bf 00 04 lwz r29,4(r31)
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
ffc0a344: 90 1f 00 10 stw r0,16(r31)
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
ffc0a348: 7f dd ea 78 xor r29,r30,r29
ffc0a34c: 7f bd 00 34 cntlzw r29,r29
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
ffc0a350: 93 43 00 10 stw r26,16(r3)
dir = the_node != parent->child[0];
ffc0a354: 57 bd d9 7e rlwinm r29,r29,27,5,31
ffc0a358: 6b bd 00 01 xori r29,r29,1
_RBTree_Rotate(parent, dir);
ffc0a35c: 7f a4 eb 78 mr r4,r29
sibling = parent->child[!dir];
ffc0a360: 6b bd 00 01 xori r29,r29,1
ffc0a364: 57 bd 10 3a rlwinm r29,r29,2,0,29
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
_RBTree_Rotate(parent, dir);
ffc0a368: 7f e3 fb 78 mr r3,r31
sibling = parent->child[!dir];
ffc0a36c: 7f bf ea 14 add r29,r31,r29
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
_RBTree_Rotate(parent, dir);
ffc0a370: 4b ff ff 11 bl ffc0a280 <_RBTree_Rotate>
sibling = parent->child[!dir];
ffc0a374: 80 7d 00 04 lwz r3,4(r29)
}
/* sibling is black, see if both of its children are also black. */
if (sibling &&
ffc0a378: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a37c: 41 9e 01 0c beq- cr7,ffc0a488 <_RBTree_Extract_validate_unprotected+0x190><== NEVER TAKEN
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
ffc0a380: 81 23 00 08 lwz r9,8(r3)
ffc0a384: 38 00 00 00 li r0,0
ffc0a388: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a38c: 41 9e 00 14 beq- cr7,ffc0a3a0 <_RBTree_Extract_validate_unprotected+0xa8>
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
ffc0a390: 80 09 00 10 lwz r0,16(r9)
ffc0a394: 68 00 00 01 xori r0,r0,1
ffc0a398: 7c 00 00 34 cntlzw r0,r0
ffc0a39c: 54 00 d9 7e rlwinm r0,r0,27,5,31
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (sibling &&
ffc0a3a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3a4: 40 9e 00 40 bne- cr7,ffc0a3e4 <_RBTree_Extract_validate_unprotected+0xec>
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
ffc0a3a8: 81 23 00 04 lwz r9,4(r3)
ffc0a3ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a3b0: 41 9e 00 14 beq- cr7,ffc0a3c4 <_RBTree_Extract_validate_unprotected+0xcc>
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
ffc0a3b4: 80 09 00 10 lwz r0,16(r9)
ffc0a3b8: 68 00 00 01 xori r0,r0,1
ffc0a3bc: 7c 00 00 34 cntlzw r0,r0
ffc0a3c0: 54 00 d9 7e rlwinm r0,r0,27,5,31
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (sibling &&
!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
ffc0a3c4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3c8: 40 9e 00 1c bne- cr7,ffc0a3e4 <_RBTree_Extract_validate_unprotected+0xec>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
ffc0a3cc: 93 63 00 10 stw r27,16(r3)
ffc0a3d0: 81 3f 00 10 lwz r9,16(r31)
ffc0a3d4: 2f 89 00 01 cmpwi cr7,r9,1
ffc0a3d8: 40 be 00 e0 bne+ cr7,ffc0a4b8 <_RBTree_Extract_validate_unprotected+0x1c0>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
ffc0a3dc: 90 1f 00 10 stw r0,16(r31)
break;
ffc0a3e0: 48 00 00 c0 b ffc0a4a0 <_RBTree_Extract_validate_unprotected+0x1a8>
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
ffc0a3e4: 83 bf 00 04 lwz r29,4(r31)
ffc0a3e8: 38 00 00 00 li r0,0
ffc0a3ec: 7f dd ea 78 xor r29,r30,r29
ffc0a3f0: 7f bd 00 34 cntlzw r29,r29
ffc0a3f4: 57 bd d9 7e rlwinm r29,r29,27,5,31
ffc0a3f8: 6b bd 00 01 xori r29,r29,1
if (!_RBTree_Is_red(sibling->child[!dir])) {
ffc0a3fc: 6b bc 00 01 xori r28,r29,1
ffc0a400: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0a404: 7d 23 4a 14 add r9,r3,r9
ffc0a408: 81 29 00 04 lwz r9,4(r9)
ffc0a40c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a410: 41 9e 00 14 beq- cr7,ffc0a424 <_RBTree_Extract_validate_unprotected+0x12c>
* This function maintains the properties of the red-black tree.
*
* @note It does NOT disable interrupts to ensure the atomicity
* of the extract operation.
*/
void _RBTree_Extract_validate_unprotected(
ffc0a414: 80 09 00 10 lwz r0,16(r9)
ffc0a418: 68 00 00 01 xori r0,r0,1
ffc0a41c: 7c 00 00 34 cntlzw r0,r0
ffc0a420: 54 00 d9 7e rlwinm r0,r0,27,5,31
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
ffc0a424: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a428: 40 be 00 30 bne+ cr7,ffc0a458 <_RBTree_Extract_validate_unprotected+0x160>
sibling->color = RBT_RED;
ffc0a42c: 39 20 00 01 li r9,1
ffc0a430: 91 23 00 10 stw r9,16(r3)
sibling->child[dir]->color = RBT_BLACK;
ffc0a434: 57 a9 10 3a rlwinm r9,r29,2,0,29
ffc0a438: 7d 23 4a 14 add r9,r3,r9
ffc0a43c: 81 29 00 04 lwz r9,4(r9)
_RBTree_Rotate(sibling, !dir);
ffc0a440: 6b a4 00 01 xori r4,r29,1
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
ffc0a444: 90 09 00 10 stw r0,16(r9)
_RBTree_Rotate(sibling, !dir);
ffc0a448: 4b ff fe 39 bl ffc0a280 <_RBTree_Rotate>
sibling = parent->child[!dir];
ffc0a44c: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0a450: 7d 3f 4a 14 add r9,r31,r9
ffc0a454: 80 69 00 04 lwz r3,4(r9)
}
sibling->color = parent->color;
ffc0a458: 80 1f 00 10 lwz r0,16(r31)
parent->color = RBT_BLACK;
sibling->child[!dir]->color = RBT_BLACK;
ffc0a45c: 57 9c 10 3a rlwinm r28,r28,2,0,29
_RBTree_Rotate(parent, dir);
ffc0a460: 7f a4 eb 78 mr r4,r29
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
}
sibling->color = parent->color;
ffc0a464: 90 03 00 10 stw r0,16(r3)
parent->color = RBT_BLACK;
sibling->child[!dir]->color = RBT_BLACK;
ffc0a468: 7c 63 e2 14 add r3,r3,r28
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
}
sibling->color = parent->color;
parent->color = RBT_BLACK;
ffc0a46c: 38 00 00 00 li r0,0
sibling->child[!dir]->color = RBT_BLACK;
ffc0a470: 81 23 00 04 lwz r9,4(r3)
_RBTree_Rotate(parent, dir);
ffc0a474: 7f e3 fb 78 mr r3,r31
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
}
sibling->color = parent->color;
parent->color = RBT_BLACK;
ffc0a478: 90 1f 00 10 stw r0,16(r31)
sibling->child[!dir]->color = RBT_BLACK;
ffc0a47c: 90 09 00 10 stw r0,16(r9)
_RBTree_Rotate(parent, dir);
ffc0a480: 4b ff fe 01 bl ffc0a280 <_RBTree_Rotate>
break; /* done */
ffc0a484: 48 00 00 1c b ffc0a4a0 <_RBTree_Extract_validate_unprotected+0x1a8>
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
ffc0a488: 80 1e 00 10 lwz r0,16(r30)
ffc0a48c: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a490: 41 9e 00 10 beq- cr7,ffc0a4a0 <_RBTree_Extract_validate_unprotected+0x1a8>
ffc0a494: 80 1f 00 00 lwz r0,0(r31)
ffc0a498: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a49c: 40 9e fe 90 bne+ cr7,ffc0a32c <_RBTree_Extract_validate_unprotected+0x34>
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
ffc0a4a0: 81 3e 00 00 lwz r9,0(r30)
ffc0a4a4: 80 09 00 00 lwz r0,0(r9)
ffc0a4a8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a4ac: 40 be 00 24 bne+ cr7,ffc0a4d0 <_RBTree_Extract_validate_unprotected+0x1d8>
ffc0a4b0: 90 1e 00 10 stw r0,16(r30)
ffc0a4b4: 48 00 00 1c b ffc0a4d0 <_RBTree_Extract_validate_unprotected+0x1d8>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
ffc0a4b8: 83 bf 00 00 lwz r29,0(r31)
sibling = _RBTree_Sibling(the_node);
ffc0a4bc: 7f e3 fb 78 mr r3,r31
ffc0a4c0: 7f fe fb 78 mr r30,r31
ffc0a4c4: 4b ff fd 81 bl ffc0a244 <_RBTree_Sibling>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
ffc0a4c8: 7f bf eb 78 mr r31,r29
sibling = _RBTree_Sibling(the_node);
ffc0a4cc: 4b ff ff bc b ffc0a488 <_RBTree_Extract_validate_unprotected+0x190>
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
}
ffc0a4d0: 39 61 00 20 addi r11,r1,32
ffc0a4d4: 4b ff 6c 70 b ffc01144 <_restgpr_26_x>
ffc0a744 <_RBTree_Find>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a744: 7d 20 00 a6 mfmsr r9
ffc0a748: 7c 10 42 a6 mfsprg r0,0
ffc0a74c: 7d 20 00 78 andc r0,r9,r0
ffc0a750: 7c 00 01 24 mtmsr r0
{
ISR_Level level;
RBTree_Node *return_node;
return_node = NULL;
_ISR_Disable( level );
ffc0a754: 48 00 00 24 b ffc0a778 <_RBTree_Find+0x34>
unsigned int the_value
)
{
RBTree_Node* iter_node = the_rbtree->root;
while (iter_node) {
if (the_value == iter_node->value) return(iter_node);
ffc0a758: 80 03 00 0c lwz r0,12(r3)
ffc0a75c: 7f 84 00 00 cmpw cr7,r4,r0
ffc0a760: 41 9e 00 24 beq- cr7,ffc0a784 <_RBTree_Find+0x40>
RBTree_Direction dir = the_value > iter_node->value;
ffc0a764: 7c 04 00 10 subfc r0,r4,r0
ffc0a768: 7c 00 01 10 subfe r0,r0,r0
ffc0a76c: 7c 00 00 d0 neg r0,r0
iter_node = iter_node->child[dir];
ffc0a770: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a774: 7c 63 02 14 add r3,r3,r0
ffc0a778: 80 63 00 04 lwz r3,4(r3)
RBTree_Control *the_rbtree,
unsigned int the_value
)
{
RBTree_Node* iter_node = the_rbtree->root;
while (iter_node) {
ffc0a77c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a780: 40 9e ff d8 bne+ cr7,ffc0a758 <_RBTree_Find+0x14> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a784: 7d 20 01 24 mtmsr r9
return_node = _RBTree_Find_unprotected( the_rbtree, the_value );
_ISR_Enable( level );
return return_node;
}
ffc0a788: 4e 80 00 20 blr
ffc0a6f8 <_RBTree_Find_header>:
*/
RBTree_Control *_RBTree_Find_header(
RBTree_Node *the_node
)
{
ffc0a6f8: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a6fc: 7d 60 00 a6 mfmsr r11
ffc0a700: 7c 10 42 a6 mfsprg r0,0
ffc0a704: 7d 60 00 78 andc r0,r11,r0
ffc0a708: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE RBTree_Control *_RBTree_Find_header_unprotected(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0a70c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a710: 38 60 00 00 li r3,0
ffc0a714: 41 9e 00 28 beq- cr7,ffc0a73c <_RBTree_Find_header+0x44><== NEVER TAKEN
if(!(the_node->parent)) return NULL;
ffc0a718: 80 09 00 00 lwz r0,0(r9)
ffc0a71c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a720: 40 be 00 0c bne+ cr7,ffc0a72c <_RBTree_Find_header+0x34><== ALWAYS TAKEN
ffc0a724: 48 00 00 18 b ffc0a73c <_RBTree_Find_header+0x44> <== NOT EXECUTED
while(the_node->parent) the_node = the_node->parent;
ffc0a728: 7c 09 03 78 mr r9,r0
ffc0a72c: 80 09 00 00 lwz r0,0(r9)
ffc0a730: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a734: 40 9e ff f4 bne+ cr7,ffc0a728 <_RBTree_Find_header+0x30>
ffc0a738: 7d 23 4b 78 mr r3,r9
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a73c: 7d 60 01 24 mtmsr r11
return_header = NULL;
_ISR_Disable( level );
return_header = _RBTree_Find_header_unprotected( the_node );
_ISR_Enable( level );
return return_header;
}
ffc0a740: 4e 80 00 20 blr
ffc0a93c <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a93c: 7c 6b 1b 78 mr r11,r3
ffc0a940: 94 21 ff f8 stwu r1,-8(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0a944: 7c 83 23 79 mr. r3,r4
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a948: 7c 08 02 a6 mflr r0
if(!the_node) return (RBTree_Node*)-1;
ffc0a94c: 39 20 ff ff li r9,-1
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0a950: 90 01 00 0c stw r0,12(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0a954: 41 82 00 a4 beq- ffc0a9f8 <_RBTree_Insert_unprotected+0xbc><== NEVER TAKEN
RBTree_Node *iter_node = the_rbtree->root;
ffc0a958: 81 2b 00 04 lwz r9,4(r11)
if (!iter_node) { /* special case: first node inserted */
ffc0a95c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a960: 40 be 00 74 bne+ cr7,ffc0a9d4 <_RBTree_Insert_unprotected+0x98>
the_node->color = RBT_BLACK;
ffc0a964: 91 23 00 10 stw r9,16(r3)
the_rbtree->root = the_node;
ffc0a968: 90 6b 00 04 stw r3,4(r11)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
ffc0a96c: 90 6b 00 0c stw r3,12(r11)
ffc0a970: 90 6b 00 08 stw r3,8(r11)
the_node->parent = (RBTree_Node *) the_rbtree;
ffc0a974: 91 63 00 00 stw r11,0(r3)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0a978: 91 23 00 08 stw r9,8(r3)
ffc0a97c: 91 23 00 04 stw r9,4(r3)
ffc0a980: 48 00 00 78 b ffc0a9f8 <_RBTree_Insert_unprotected+0xbc>
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
if(the_node->value == iter_node->value) return(iter_node);
RBTree_Direction dir = the_node->value > iter_node->value;
ffc0a984: 7c 0a 00 10 subfc r0,r10,r0
ffc0a988: 7c 00 01 10 subfe r0,r0,r0
ffc0a98c: 7c 00 00 d0 neg r0,r0
if (!iter_node->child[dir]) {
ffc0a990: 54 08 10 3a rlwinm r8,r0,2,0,29
ffc0a994: 7c e9 42 14 add r7,r9,r8
ffc0a998: 80 07 00 04 lwz r0,4(r7)
ffc0a99c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a9a0: 40 be 00 3c bne+ cr7,ffc0a9dc <_RBTree_Insert_unprotected+0xa0>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0a9a4: 90 03 00 08 stw r0,8(r3)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
ffc0a9a8: 7d 6b 42 14 add r11,r11,r8
ffc0a9ac: 90 03 00 04 stw r0,4(r3)
the_node->color = RBT_RED;
ffc0a9b0: 38 00 00 01 li r0,1
ffc0a9b4: 90 03 00 10 stw r0,16(r3)
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
ffc0a9b8: 80 0b 00 08 lwz r0,8(r11)
if(the_node->value == iter_node->value) return(iter_node);
RBTree_Direction dir = the_node->value > iter_node->value;
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
ffc0a9bc: 90 67 00 04 stw r3,4(r7)
the_node->parent = iter_node;
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
ffc0a9c0: 7f 89 00 00 cmpw cr7,r9,r0
RBTree_Direction dir = the_node->value > iter_node->value;
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
ffc0a9c4: 91 23 00 00 stw r9,0(r3)
/* update min/max */
if (_RBTree_Is_first(the_rbtree, iter_node, dir)) {
ffc0a9c8: 40 be 00 28 bne+ cr7,ffc0a9f0 <_RBTree_Insert_unprotected+0xb4>
the_rbtree->first[dir] = the_node;
ffc0a9cc: 90 6b 00 08 stw r3,8(r11)
ffc0a9d0: 48 00 00 20 b ffc0a9f0 <_RBTree_Insert_unprotected+0xb4>
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
if(the_node->value == iter_node->value) return(iter_node);
ffc0a9d4: 81 43 00 0c lwz r10,12(r3)
ffc0a9d8: 48 00 00 08 b ffc0a9e0 <_RBTree_Insert_unprotected+0xa4>
RBTree_Direction dir = the_node->value > iter_node->value;
if (!iter_node->child[dir]) {
ffc0a9dc: 7c 09 03 78 mr r9,r0
the_node->parent = (RBTree_Node *) the_rbtree;
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
} else {
/* typical binary search tree insert, descend tree to leaf and insert */
while (iter_node) {
if(the_node->value == iter_node->value) return(iter_node);
ffc0a9e0: 80 09 00 0c lwz r0,12(r9)
ffc0a9e4: 7f 8a 00 00 cmpw cr7,r10,r0
ffc0a9e8: 40 9e ff 9c bne+ cr7,ffc0a984 <_RBTree_Insert_unprotected+0x48>
ffc0a9ec: 48 00 00 0c b ffc0a9f8 <_RBTree_Insert_unprotected+0xbc>
}
} /* while(iter_node) */
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
ffc0a9f0: 4b ff fe 59 bl ffc0a848 <_RBTree_Validate_insert_unprotected>
}
return (RBTree_Node*)0;
ffc0a9f4: 39 20 00 00 li r9,0
}
ffc0a9f8: 80 01 00 0c lwz r0,12(r1)
ffc0a9fc: 7d 23 4b 78 mr r3,r9
ffc0aa00: 38 21 00 08 addi r1,r1,8
ffc0aa04: 7c 08 03 a6 mtlr r0
ffc0aa08: 4e 80 00 20 blr
ffc0a244 <_RBTree_Sibling>:
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0a244: 2c 03 00 00 cmpwi r3,0
ffc0a248: 38 00 00 00 li r0,0
ffc0a24c: 41 82 00 2c beq- ffc0a278 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
ffc0a250: 81 23 00 00 lwz r9,0(r3)
ffc0a254: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a258: 41 9e 00 20 beq- cr7,ffc0a278 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
ffc0a25c: 81 69 00 00 lwz r11,0(r9)
ffc0a260: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a264: 41 9e 00 14 beq- cr7,ffc0a278 <_RBTree_Sibling+0x34>
if(the_node == the_node->parent->child[RBT_LEFT])
ffc0a268: 80 09 00 04 lwz r0,4(r9)
ffc0a26c: 7f 83 00 00 cmpw cr7,r3,r0
ffc0a270: 40 be 00 08 bne+ cr7,ffc0a278 <_RBTree_Sibling+0x34>
return the_node->parent->child[RBT_RIGHT];
ffc0a274: 80 09 00 08 lwz r0,8(r9)
else
return the_node->parent->child[RBT_LEFT];
}
ffc0a278: 7c 03 03 78 mr r3,r0
ffc0a27c: 4e 80 00 20 blr
ffc0a848 <_RBTree_Validate_insert_unprotected>:
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
ffc0a848: 94 21 ff e0 stwu r1,-32(r1)
ffc0a84c: 7c 08 02 a6 mflr r0
ffc0a850: bf 61 00 0c stmw r27,12(r1)
ffc0a854: 7c 7e 1b 78 mr r30,r3
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
ffc0a858: 3b 80 00 00 li r28,0
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
ffc0a85c: 90 01 00 24 stw r0,36(r1)
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
g->color = RBT_RED;
ffc0a860: 3b 60 00 01 li r27,1
RBTree_Node *u,*g;
/* note: the insert root case is handled already */
/* if the parent is black, nothing needs to be done
* otherwise may need to loop a few times */
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
ffc0a864: 48 00 00 74 b ffc0a8d8 <_RBTree_Validate_insert_unprotected+0x90>
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(!(the_node->parent->parent->parent)) return NULL;
ffc0a868: 80 1f 00 00 lwz r0,0(r31)
ffc0a86c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a870: 41 9e 00 90 beq- cr7,ffc0a900 <_RBTree_Validate_insert_unprotected+0xb8><== NEVER TAKEN
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
if(the_node == the_node->parent->child[RBT_LEFT])
ffc0a874: 81 3f 00 04 lwz r9,4(r31)
ffc0a878: 7f 83 48 00 cmpw cr7,r3,r9
ffc0a87c: 40 be 00 08 bne+ cr7,ffc0a884 <_RBTree_Validate_insert_unprotected+0x3c>
return the_node->parent->child[RBT_RIGHT];
ffc0a880: 81 3f 00 08 lwz r9,8(r31)
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0a884: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a888: 41 9e 00 78 beq- cr7,ffc0a900 <_RBTree_Validate_insert_unprotected+0xb8>
ffc0a88c: 80 09 00 10 lwz r0,16(r9)
ffc0a890: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a894: 40 be 00 6c bne+ cr7,ffc0a900 <_RBTree_Validate_insert_unprotected+0xb8>
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
ffc0a898: 93 83 00 10 stw r28,16(r3)
u->color = RBT_BLACK;
g->color = RBT_RED;
ffc0a89c: 7f fe fb 78 mr r30,r31
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
ffc0a8a0: 93 89 00 10 stw r28,16(r9)
g->color = RBT_RED;
ffc0a8a4: 90 1f 00 10 stw r0,16(r31)
ffc0a8a8: 48 00 00 30 b ffc0a8d8 <_RBTree_Validate_insert_unprotected+0x90>
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
ffc0a8ac: 7f a4 eb 78 mr r4,r29
ffc0a8b0: 4b ff ff 21 bl ffc0a7d0 <_RBTree_Rotate>
the_node = the_node->child[pdir];
ffc0a8b4: 57 a0 10 3a rlwinm r0,r29,2,0,29
ffc0a8b8: 7f de 02 14 add r30,r30,r0
ffc0a8bc: 83 de 00 04 lwz r30,4(r30)
}
the_node->parent->color = RBT_BLACK;
ffc0a8c0: 81 3e 00 00 lwz r9,0(r30)
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0a8c4: 7f e3 fb 78 mr r3,r31
ffc0a8c8: 20 9d 00 01 subfic r4,r29,1
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
}
the_node->parent->color = RBT_BLACK;
ffc0a8cc: 93 89 00 10 stw r28,16(r9)
g->color = RBT_RED;
ffc0a8d0: 93 7f 00 10 stw r27,16(r31)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0a8d4: 4b ff fe fd bl ffc0a7d0 <_RBTree_Rotate>
ISR_Level level;
_ISR_Disable( level );
_RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
ffc0a8d8: 80 7e 00 00 lwz r3,0(r30)
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
ffc0a8dc: 83 e3 00 00 lwz r31,0(r3)
ffc0a8e0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0a8e4: 41 9e 00 14 beq- cr7,ffc0a8f8 <_RBTree_Validate_insert_unprotected+0xb0>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0a8e8: 80 03 00 10 lwz r0,16(r3)
ffc0a8ec: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a8f0: 40 be 00 44 bne+ cr7,ffc0a934 <_RBTree_Validate_insert_unprotected+0xec>
ffc0a8f4: 4b ff ff 74 b ffc0a868 <_RBTree_Validate_insert_unprotected+0x20>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
ffc0a8f8: 93 fe 00 10 stw r31,16(r30)
ffc0a8fc: 48 00 00 38 b ffc0a934 <_RBTree_Validate_insert_unprotected+0xec>
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a900: 83 bf 00 04 lwz r29,4(r31)
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a904: 80 03 00 04 lwz r0,4(r3)
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a908: 7c 7d ea 78 xor r29,r3,r29
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a90c: 7f c0 02 78 xor r0,r30,r0
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a910: 7f bd 00 34 cntlzw r29,r29
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a914: 7c 00 00 34 cntlzw r0,r0
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a918: 57 bd d9 7e rlwinm r29,r29,27,5,31
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a91c: 54 00 d9 7e rlwinm r0,r0,27,5,31
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0a920: 6b bd 00 01 xori r29,r29,1
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
g->color = RBT_RED;
the_node = g;
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
ffc0a924: 68 00 00 01 xori r0,r0,1
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
ffc0a928: 7f 80 e8 00 cmpw cr7,r0,r29
ffc0a92c: 40 be ff 80 bne- cr7,ffc0a8ac <_RBTree_Validate_insert_unprotected+0x64>
ffc0a930: 4b ff ff 90 b ffc0a8c0 <_RBTree_Validate_insert_unprotected+0x78>
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
}
}
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
}
ffc0a934: 39 61 00 20 addi r11,r1,32
ffc0a938: 4b ff 68 10 b ffc01148 <_restgpr_27_x>
ffc0d768 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc0d768: 94 21 ff e0 stwu r1,-32(r1)
ffc0d76c: 7c 08 02 a6 mflr r0
ffc0d770: 90 01 00 24 stw r0,36(r1)
ffc0d774: bf c1 00 18 stmw r30,24(r1)
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc0d778: 83 e3 01 2c lwz r31,300(r3)
if ( !api )
ffc0d77c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0d780: 41 9e 00 7c beq- cr7,ffc0d7fc <_RTEMS_tasks_Post_switch_extension+0x94><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d784: 7c 00 00 a6 mfmsr r0
ffc0d788: 7d 30 42 a6 mfsprg r9,0
ffc0d78c: 7c 09 48 78 andc r9,r0,r9
ffc0d790: 7d 20 01 24 mtmsr r9
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc0d794: 39 20 00 00 li r9,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc0d798: 83 df 00 14 lwz r30,20(r31)
asr->signals_posted = 0;
ffc0d79c: 91 3f 00 14 stw r9,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d7a0: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc0d7a4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0d7a8: 41 be 00 54 beq+ cr7,ffc0d7fc <_RTEMS_tasks_Post_switch_extension+0x94>
return;
asr->nest_level += 1;
ffc0d7ac: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7b0: 38 80 00 00 li r4,0
ffc0d7b4: 80 7f 00 10 lwz r3,16(r31)
ffc0d7b8: 60 84 ff ff ori r4,r4,65535
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc0d7bc: 38 09 00 01 addi r0,r9,1
ffc0d7c0: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7c4: 38 a1 00 08 addi r5,r1,8
ffc0d7c8: 48 00 1e 99 bl ffc0f660 <rtems_task_mode>
(*asr->handler)( signal_set );
ffc0d7cc: 80 1f 00 0c lwz r0,12(r31)
ffc0d7d0: 7f c3 f3 78 mr r3,r30
ffc0d7d4: 7c 09 03 a6 mtctr r0
ffc0d7d8: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc0d7dc: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7e0: 38 80 00 00 li r4,0
ffc0d7e4: 80 61 00 08 lwz r3,8(r1)
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
ffc0d7e8: 38 09 ff ff addi r0,r9,-1
ffc0d7ec: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc0d7f0: 60 84 ff ff ori r4,r4,65535
ffc0d7f4: 38 a1 00 08 addi r5,r1,8
ffc0d7f8: 48 00 1e 69 bl ffc0f660 <rtems_task_mode>
}
ffc0d7fc: 39 61 00 20 addi r11,r1,32
ffc0d800: 4b ff 2d 30 b ffc00530 <_restgpr_30_x>
ffc08b8c <_Rate_monotonic_Get_status>:
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
ffc08b8c: 94 21 ff c8 stwu r1,-56(r1)
ffc08b90: 7c 08 02 a6 mflr r0
ffc08b94: 90 01 00 3c stw r0,60(r1)
ffc08b98: bf 81 00 28 stmw r28,40(r1)
ffc08b9c: 7c 9c 23 78 mr r28,r4
ffc08ba0: 7c 7f 1b 78 mr r31,r3
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
ffc08ba4: 83 c3 00 40 lwz r30,64(r3)
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
ffc08ba8: 38 61 00 18 addi r3,r1,24
bool _Rate_monotonic_Get_status(
Rate_monotonic_Control *the_period,
Rate_monotonic_Period_time_t *wall_since_last_period,
Thread_CPU_usage_t *cpu_since_last_period
)
{
ffc08bac: 7c bd 2b 78 mr r29,r5
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
ffc08bb0: 48 00 1c 61 bl ffc0a810 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc08bb4: 38 7f 00 4c addi r3,r31,76
ffc08bb8: 38 81 00 18 addi r4,r1,24
ffc08bbc: 7f 85 e3 78 mr r5,r28
ffc08bc0: 48 00 42 e1 bl ffc0cea0 <_Timespec_Subtract>
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08bc4: 3c 60 00 00 lis r3,0
ffc08bc8: 38 63 2e 98 addi r3,r3,11928
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc08bcc: 81 5e 00 84 lwz r10,132(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08bd0: 81 23 00 0c lwz r9,12(r3)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
ffc08bd4: 38 00 00 01 li r0,1
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc08bd8: 81 7e 00 88 lwz r11,136(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08bdc: 7f 9e 48 00 cmpw cr7,r30,r9
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc08be0: 91 41 00 10 stw r10,16(r1)
ffc08be4: 91 61 00 14 stw r11,20(r1)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc08be8: 40 be 00 50 bne+ cr7,ffc08c38 <_Rate_monotonic_Get_status+0xac><== NEVER TAKEN
Thread_CPU_usage_t ran;
/* How much time time since last context switch */
_Timestamp_Subtract(
ffc08bec: 38 a1 00 08 addi r5,r1,8
ffc08bf0: 38 63 00 1c addi r3,r3,28
ffc08bf4: 38 81 00 18 addi r4,r1,24
ffc08bf8: 48 00 42 a9 bl ffc0cea0 <_Timespec_Subtract>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc08bfc: 3b ff 00 44 addi r31,r31,68
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &ran
);
/* cpu usage += ran */
_Timestamp_Add_to( &used, &ran );
ffc08c00: 38 81 00 08 addi r4,r1,8
ffc08c04: 38 61 00 10 addi r3,r1,16
ffc08c08: 48 00 41 41 bl ffc0cd48 <_Timespec_Add_to>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc08c0c: 38 61 00 10 addi r3,r1,16
ffc08c10: 7f e4 fb 78 mr r4,r31
ffc08c14: 48 00 42 51 bl ffc0ce64 <_Timespec_Less_than>
return false;
ffc08c18: 38 00 00 00 li r0,0
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc08c1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc08c20: 40 be 00 18 bne+ cr7,ffc08c38 <_Rate_monotonic_Get_status+0xac>
return false;
/* used = current cpu usage - cpu usage at start of period */
_Timestamp_Subtract(
ffc08c24: 7f e3 fb 78 mr r3,r31
ffc08c28: 38 81 00 10 addi r4,r1,16
ffc08c2c: 7f a5 eb 78 mr r5,r29
ffc08c30: 48 00 42 71 bl ffc0cea0 <_Timespec_Subtract>
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
ffc08c34: 38 00 00 01 li r0,1
}
ffc08c38: 39 61 00 38 addi r11,r1,56
ffc08c3c: 7c 03 03 78 mr r3,r0
ffc08c40: 4b ff 85 b0 b ffc011f0 <_restgpr_28_x>
ffc09260 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc09260: 7c 2b 0b 78 mr r11,r1
ffc09264: 94 21 ff e0 stwu r1,-32(r1)
ffc09268: 7c 08 02 a6 mflr r0
ffc0926c: 7c 64 1b 78 mr r4,r3
ffc09270: 3c 60 00 00 lis r3,0
ffc09274: 48 01 2a 79 bl ffc1bcec <_savegpr_31>
ffc09278: 38 63 2c 00 addi r3,r3,11264
ffc0927c: 90 01 00 24 stw r0,36(r1)
ffc09280: 38 a1 00 08 addi r5,r1,8
ffc09284: 48 00 21 25 bl ffc0b3a8 <_Objects_Get>
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc09288: 80 01 00 08 lwz r0,8(r1)
ffc0928c: 7c 7f 1b 78 mr r31,r3
ffc09290: 2f 80 00 00 cmpwi cr7,r0,0
ffc09294: 40 9e 00 88 bne- cr7,ffc0931c <_Rate_monotonic_Timeout+0xbc><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc09298: 80 63 00 40 lwz r3,64(r3)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
ffc0929c: 80 03 00 10 lwz r0,16(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc092a0: 70 09 40 00 andi. r9,r0,16384
ffc092a4: 41 82 00 24 beq- ffc092c8 <_Rate_monotonic_Timeout+0x68>
ffc092a8: 81 23 00 20 lwz r9,32(r3)
ffc092ac: 80 1f 00 08 lwz r0,8(r31)
ffc092b0: 7f 89 00 00 cmpw cr7,r9,r0
ffc092b4: 40 be 00 14 bne+ cr7,ffc092c8 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc092b8: 3c 80 10 03 lis r4,4099
ffc092bc: 60 84 ff f8 ori r4,r4,65528
ffc092c0: 48 00 2b 65 bl ffc0be24 <_Thread_Clear_state>
ffc092c4: 48 00 00 18 b ffc092dc <_Rate_monotonic_Timeout+0x7c>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
ffc092c8: 80 1f 00 38 lwz r0,56(r31)
ffc092cc: 2f 80 00 01 cmpwi cr7,r0,1
ffc092d0: 40 be 00 30 bne+ cr7,ffc09300 <_Rate_monotonic_Timeout+0xa0>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc092d4: 38 00 00 03 li r0,3
ffc092d8: 90 1f 00 38 stw r0,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc092dc: 7f e3 fb 78 mr r3,r31
ffc092e0: 4b ff f9 65 bl ffc08c44 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc092e4: 80 1f 00 3c lwz r0,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc092e8: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc092ec: 90 1f 00 1c stw r0,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc092f0: 38 63 2d c8 addi r3,r3,11720
ffc092f4: 38 9f 00 10 addi r4,r31,16
ffc092f8: 48 00 3f 25 bl ffc0d21c <_Watchdog_Insert>
ffc092fc: 48 00 00 0c b ffc09308 <_Rate_monotonic_Timeout+0xa8>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc09300: 38 00 00 04 li r0,4
ffc09304: 90 1f 00 38 stw r0,56(r31)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc09308: 3d 20 00 00 lis r9,0
ffc0930c: 81 69 28 08 lwz r11,10248(r9)
ffc09310: 38 0b ff ff addi r0,r11,-1
ffc09314: 90 09 28 08 stw r0,10248(r9)
return _Thread_Dispatch_disable_level;
ffc09318: 80 09 28 08 lwz r0,10248(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc0931c: 39 61 00 20 addi r11,r1,32
ffc09320: 4b ff 7e dc b ffc011fc <_restgpr_31_x>
ffc09ea8 <_Scheduler_priority_Block>:
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
ffc09ea8: 81 63 00 8c lwz r11,140(r3)
ready = sched_info->ready_chain;
ffc09eac: 81 2b 00 00 lwz r9,0(r11)
if ( _Chain_Has_only_one_node( ready ) ) {
ffc09eb0: 81 49 00 00 lwz r10,0(r9)
ffc09eb4: 80 09 00 08 lwz r0,8(r9)
ffc09eb8: 7f 8a 00 00 cmpw cr7,r10,r0
ffc09ebc: 40 be 00 4c bne+ cr7,ffc09f08 <_Scheduler_priority_Block+0x60>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc09ec0: 38 09 00 04 addi r0,r9,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc09ec4: 91 29 00 08 stw r9,8(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc09ec8: 90 09 00 00 stw r0,0(r9)
head->previous = NULL;
ffc09ecc: 38 00 00 00 li r0,0
ffc09ed0: 90 09 00 04 stw r0,4(r9)
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc09ed4: 81 2b 00 04 lwz r9,4(r11)
ffc09ed8: 80 0b 00 14 lwz r0,20(r11)
ffc09edc: 81 49 00 00 lwz r10,0(r9)
ffc09ee0: 7d 40 00 38 and r0,r10,r0
if ( *the_priority_map->minor == 0 )
ffc09ee4: 2f 80 00 00 cmpwi cr7,r0,0
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc09ee8: 90 09 00 00 stw r0,0(r9)
if ( *the_priority_map->minor == 0 )
ffc09eec: 40 9e 00 2c bne- cr7,ffc09f18 <_Scheduler_priority_Block+0x70>
_Priority_Major_bit_map &= the_priority_map->block_major;
ffc09ef0: 3d 20 00 00 lis r9,0
ffc09ef4: 80 0b 00 10 lwz r0,16(r11)
ffc09ef8: 81 49 28 08 lwz r10,10248(r9)
ffc09efc: 7d 40 00 38 and r0,r10,r0
ffc09f00: 90 09 28 08 stw r0,10248(r9)
ffc09f04: 48 00 00 14 b ffc09f18 <_Scheduler_priority_Block+0x70>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc09f08: 81 63 00 00 lwz r11,0(r3)
previous = the_node->previous;
ffc09f0c: 81 23 00 04 lwz r9,4(r3)
next->previous = previous;
ffc09f10: 91 2b 00 04 stw r9,4(r11)
previous->next = next;
ffc09f14: 91 69 00 00 stw r11,0(r9)
RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Heir );
ffc09f18: 3d 20 00 00 lis r9,0
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
ffc09f1c: 80 09 2d c8 lwz r0,11720(r9)
ffc09f20: 7f 83 00 00 cmpw cr7,r3,r0
ffc09f24: 40 be 00 60 bne+ cr7,ffc09f84 <_Scheduler_priority_Block+0xdc>
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc09f28: 3d 40 00 00 lis r10,0
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc09f2c: 3d 20 00 00 lis r9,0
ffc09f30: 80 0a 28 08 lwz r0,10248(r10)
ffc09f34: 81 29 20 e0 lwz r9,8416(r9)
ffc09f38: 7c 0b 00 34 cntlzw r11,r0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc09f3c: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc09f40: 90 0a 28 08 stw r0,10248(r10)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc09f44: 39 08 2d e0 addi r8,r8,11744
ffc09f48: 55 6a 10 3a rlwinm r10,r11,2,0,29
ffc09f4c: 7c 08 50 2e lwzx r0,r8,r10
ffc09f50: 7c 07 00 34 cntlzw r7,r0
ffc09f54: 7c 08 51 2e stwx r0,r8,r10
return (_Priority_Bits_index( major ) << 4) +
ffc09f58: 55 60 20 36 rlwinm r0,r11,4,0,27
ffc09f5c: 7c 00 3a 14 add r0,r0,r7
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc09f60: 1c 00 00 0c mulli r0,r0,12
ffc09f64: 7d 69 02 14 add r11,r9,r0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc09f68: 7c 09 00 2e lwzx r0,r9,r0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc09f6c: 39 2b 00 04 addi r9,r11,4
ffc09f70: 7f 80 48 00 cmpw cr7,r0,r9
ffc09f74: 40 be 00 08 bne+ cr7,ffc09f7c <_Scheduler_priority_Block+0xd4><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc09f78: 38 00 00 00 li r0,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc09f7c: 3d 20 00 00 lis r9,0
ffc09f80: 90 09 2d c8 stw r0,11720(r9)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc09f84: 3d 20 00 00 lis r9,0
ffc09f88: 39 29 2d b8 addi r9,r9,11704
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc09f8c: 80 09 00 0c lwz r0,12(r9)
ffc09f90: 7f 83 00 00 cmpw cr7,r3,r0
ffc09f94: 4c be 00 20 bnelr+ cr7
_Thread_Dispatch_necessary = true;
ffc09f98: 38 00 00 01 li r0,1
ffc09f9c: 98 09 00 18 stb r0,24(r9)
ffc09fa0: 4e 80 00 20 blr
ffc0a168 <_Scheduler_priority_Schedule>:
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a168: 3d 40 00 00 lis r10,0
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc0a16c: 3d 20 00 00 lis r9,0
ffc0a170: 80 0a 28 08 lwz r0,10248(r10)
ffc0a174: 81 29 20 e0 lwz r9,8416(r9)
ffc0a178: 7c 0b 00 34 cntlzw r11,r0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a17c: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0a180: 90 0a 28 08 stw r0,10248(r10)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a184: 39 08 2d e0 addi r8,r8,11744
ffc0a188: 55 6a 10 3a rlwinm r10,r11,2,0,29
ffc0a18c: 7c 08 50 2e lwzx r0,r8,r10
ffc0a190: 7c 07 00 34 cntlzw r7,r0
ffc0a194: 7c 08 51 2e stwx r0,r8,r10
return (_Priority_Bits_index( major ) << 4) +
ffc0a198: 55 60 20 36 rlwinm r0,r11,4,0,27
ffc0a19c: 7c 00 3a 14 add r0,r0,r7
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0a1a0: 1c 00 00 0c mulli r0,r0,12
ffc0a1a4: 7d 69 02 14 add r11,r9,r0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a1a8: 7c 09 00 2e lwzx r0,r9,r0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a1ac: 39 2b 00 04 addi r9,r11,4
ffc0a1b0: 7f 80 48 00 cmpw cr7,r0,r9
ffc0a1b4: 40 be 00 08 bne+ cr7,ffc0a1bc <_Scheduler_priority_Schedule+0x54><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0a1b8: 38 00 00 00 li r0,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0a1bc: 3d 20 00 00 lis r9,0
ffc0a1c0: 90 09 2d c8 stw r0,11720(r9)
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
_Scheduler_priority_Schedule_body();
}
ffc0a1c4: 4e 80 00 20 blr
ffc0a334 <_Scheduler_priority_Yield>:
Scheduler_priority_Per_thread *sched_info;
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ffc0a334: 3d 40 00 00 lis r10,0
ffc0a338: 39 4a 2d b8 addi r10,r10,11704
ffc0a33c: 81 2a 00 0c lwz r9,12(r10)
sched_info = (Scheduler_priority_Per_thread *) executing->scheduler_info;
ready = sched_info->ready_chain;
ffc0a340: 81 69 00 8c lwz r11,140(r9)
ffc0a344: 81 6b 00 00 lwz r11,0(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a348: 7c 00 00 a6 mfmsr r0
ffc0a34c: 7d 10 42 a6 mfsprg r8,0
ffc0a350: 7c 08 40 78 andc r8,r0,r8
ffc0a354: 7d 00 01 24 mtmsr r8
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
ffc0a358: 80 eb 00 00 lwz r7,0(r11)
ffc0a35c: 81 0b 00 08 lwz r8,8(r11)
ffc0a360: 7f 87 40 00 cmpw cr7,r7,r8
ffc0a364: 41 9e 00 60 beq- cr7,ffc0a3c4 <_Scheduler_priority_Yield+0x90>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0a368: 80 e9 00 00 lwz r7,0(r9)
previous = the_node->previous;
ffc0a36c: 81 09 00 04 lwz r8,4(r9)
next->previous = previous;
ffc0a370: 91 07 00 04 stw r8,4(r7)
previous->next = next;
ffc0a374: 90 e8 00 00 stw r7,0(r8)
RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
Chain_Node *tail = _Chain_Tail( the_chain );
ffc0a378: 38 eb 00 04 addi r7,r11,4
Chain_Node *old_last = tail->previous;
ffc0a37c: 81 0b 00 08 lwz r8,8(r11)
the_node->next = tail;
ffc0a380: 90 e9 00 00 stw r7,0(r9)
tail->previous = the_node;
ffc0a384: 91 2b 00 08 stw r9,8(r11)
old_last->next = the_node;
ffc0a388: 91 28 00 00 stw r9,0(r8)
the_node->previous = old_last;
ffc0a38c: 91 09 00 04 stw r8,4(r9)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0a390: 7d 00 00 a6 mfmsr r8
ffc0a394: 7c 00 01 24 mtmsr r0
ffc0a398: 7d 00 01 24 mtmsr r8
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
ffc0a39c: 81 0a 00 10 lwz r8,16(r10)
ffc0a3a0: 7f 89 40 00 cmpw cr7,r9,r8
ffc0a3a4: 40 be 00 0c bne+ cr7,ffc0a3b0 <_Scheduler_priority_Yield+0x7c><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) _Chain_First( ready );
ffc0a3a8: 81 2b 00 00 lwz r9,0(r11)
ffc0a3ac: 91 2a 00 10 stw r9,16(r10)
_Thread_Dispatch_necessary = true;
ffc0a3b0: 3d 20 00 00 lis r9,0
ffc0a3b4: 39 60 00 01 li r11,1
ffc0a3b8: 39 29 2d b8 addi r9,r9,11704
ffc0a3bc: 99 69 00 18 stb r11,24(r9)
ffc0a3c0: 48 00 00 18 b ffc0a3d8 <_Scheduler_priority_Yield+0xa4>
}
else if ( !_Thread_Is_heir( executing ) )
ffc0a3c4: 81 6a 00 10 lwz r11,16(r10)
ffc0a3c8: 7f 89 58 00 cmpw cr7,r9,r11
ffc0a3cc: 41 9e 00 0c beq- cr7,ffc0a3d8 <_Scheduler_priority_Yield+0xa4>
_Thread_Dispatch_necessary = true;
ffc0a3d0: 39 20 00 01 li r9,1
ffc0a3d4: 99 2a 00 18 stb r9,24(r10)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a3d8: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
}
ffc0a3dc: 4e 80 00 20 blr
ffc08cbc <_TOD_Validate>:
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc08cbc: 2c 03 00 00 cmpwi r3,0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
ffc08cc0: 3d 20 00 00 lis r9,0
ffc08cc4: 81 29 20 30 lwz r9,8240(r9)
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
ffc08cc8: 38 00 00 00 li r0,0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc08ccc: 41 82 00 94 beq- ffc08d60 <_TOD_Validate+0xa4> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
ffc08cd0: 3d 60 00 0f lis r11,15
ffc08cd4: 61 6b 42 40 ori r11,r11,16960
ffc08cd8: 7d 2b 4b 96 divwu r9,r11,r9
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc08cdc: 81 63 00 18 lwz r11,24(r3)
ffc08ce0: 7f 8b 48 40 cmplw cr7,r11,r9
ffc08ce4: 40 9c 00 7c bge- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->ticks >= ticks_per_second) ||
ffc08ce8: 81 23 00 14 lwz r9,20(r3)
ffc08cec: 2b 89 00 3b cmplwi cr7,r9,59
ffc08cf0: 41 9d 00 70 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
ffc08cf4: 81 23 00 10 lwz r9,16(r3)
ffc08cf8: 2b 89 00 3b cmplwi cr7,r9,59
ffc08cfc: 41 9d 00 64 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
ffc08d00: 81 23 00 0c lwz r9,12(r3)
ffc08d04: 2b 89 00 17 cmplwi cr7,r9,23
ffc08d08: 41 9d 00 58 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
ffc08d0c: 81 23 00 04 lwz r9,4(r3)
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
ffc08d10: 2f 89 00 00 cmpwi cr7,r9,0
ffc08d14: 41 9e 00 4c beq- cr7,ffc08d60 <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->month == 0) ||
ffc08d18: 2b 89 00 0c cmplwi cr7,r9,12
ffc08d1c: 41 9d 00 44 bgt- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
ffc08d20: 81 43 00 00 lwz r10,0(r3)
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
ffc08d24: 2b 8a 07 c3 cmplwi cr7,r10,1987
ffc08d28: 40 9d 00 38 ble- cr7,ffc08d60 <_TOD_Validate+0xa4>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
ffc08d2c: 81 63 00 08 lwz r11,8(r3)
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
ffc08d30: 2f 8b 00 00 cmpwi cr7,r11,0
ffc08d34: 41 9e 00 2c beq- cr7,ffc08d60 <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
ffc08d38: 71 40 00 03 andi. r0,r10,3
ffc08d3c: 3d 40 ff c2 lis r10,-62
ffc08d40: 39 4a e9 2c addi r10,r10,-5844
ffc08d44: 40 82 00 08 bne- ffc08d4c <_TOD_Validate+0x90>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
ffc08d48: 39 29 00 0d addi r9,r9,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
ffc08d4c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc08d50: 7c 0a 48 2e lwzx r0,r10,r9
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
ffc08d54: 7c 0b 00 10 subfc r0,r11,r0
ffc08d58: 38 00 00 00 li r0,0
ffc08d5c: 7c 00 01 14 adde r0,r0,r0
if ( the_tod->day > days_in_month )
return false;
return true;
}
ffc08d60: 7c 03 03 78 mr r3,r0
ffc08d64: 4e 80 00 20 blr
ffc0a440 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0a440: 94 21 ff e0 stwu r1,-32(r1)
ffc0a444: 7c 08 02 a6 mflr r0
ffc0a448: 90 01 00 24 stw r0,36(r1)
ffc0a44c: bf 81 00 10 stmw r28,16(r1)
ffc0a450: 7c 7f 1b 78 mr r31,r3
ffc0a454: 7c be 2b 78 mr r30,r5
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0a458: 83 a3 00 10 lwz r29,16(r3)
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
ffc0a45c: 90 81 00 08 stw r4,8(r1)
ffc0a460: 48 00 0e 4d bl ffc0b2ac <_Thread_Set_transient>
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
ffc0a464: 80 1f 00 14 lwz r0,20(r31)
ffc0a468: 80 81 00 08 lwz r4,8(r1)
ffc0a46c: 7f 80 20 00 cmpw cr7,r0,r4
ffc0a470: 41 9e 00 0c beq- cr7,ffc0a47c <_Thread_Change_priority+0x3c>
_Thread_Set_priority( the_thread, new_priority );
ffc0a474: 7f e3 fb 78 mr r3,r31
ffc0a478: 48 00 0d a9 bl ffc0b220 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a47c: 7f 80 00 a6 mfmsr r28
ffc0a480: 7c 10 42 a6 mfsprg r0,0
ffc0a484: 7f 80 00 78 andc r0,r28,r0
ffc0a488: 7c 00 01 24 mtmsr r0
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
ffc0a48c: 80 1f 00 10 lwz r0,16(r31)
ffc0a490: 57 bd 07 7a rlwinm r29,r29,0,29,29
if ( state != STATES_TRANSIENT ) {
ffc0a494: 2f 80 00 04 cmpwi cr7,r0,4
ffc0a498: 41 9e 00 38 beq- cr7,ffc0a4d0 <_Thread_Change_priority+0x90>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0a49c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0a4a0: 40 9e 00 0c bne- cr7,ffc0a4ac <_Thread_Change_priority+0x6c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc0a4a4: 54 09 07 b8 rlwinm r9,r0,0,30,28
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0a4a8: 91 3f 00 10 stw r9,16(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a4ac: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0a4b0: 3d 20 00 03 lis r9,3
ffc0a4b4: 61 29 be e0 ori r9,r9,48864
ffc0a4b8: 7c 0b 48 39 and. r11,r0,r9
ffc0a4bc: 41 a2 00 94 beq+ ffc0a550 <_Thread_Change_priority+0x110>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0a4c0: 80 7f 00 44 lwz r3,68(r31)
ffc0a4c4: 7f e4 fb 78 mr r4,r31
ffc0a4c8: 48 00 0c 9d bl ffc0b164 <_Thread_queue_Requeue>
ffc0a4cc: 48 00 00 84 b ffc0a550 <_Thread_Change_priority+0x110>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0a4d0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0a4d4: 40 9e 00 30 bne- cr7,ffc0a504 <_Thread_Change_priority+0xc4><== NEVER TAKEN
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
if ( prepend_it )
ffc0a4d8: 2f 9e 00 00 cmpwi cr7,r30,0
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0a4dc: 93 bf 00 10 stw r29,16(r31)
ffc0a4e0: 3d 20 00 00 lis r9,0
ffc0a4e4: 39 29 20 e0 addi r9,r9,8416
if ( prepend_it )
ffc0a4e8: 41 9e 00 0c beq- cr7,ffc0a4f4 <_Thread_Change_priority+0xb4>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
ffc0a4ec: 80 09 00 28 lwz r0,40(r9)
ffc0a4f0: 48 00 00 08 b ffc0a4f8 <_Thread_Change_priority+0xb8>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
ffc0a4f4: 80 09 00 24 lwz r0,36(r9)
ffc0a4f8: 7f e3 fb 78 mr r3,r31
ffc0a4fc: 7c 09 03 a6 mtctr r0
ffc0a500: 4e 80 04 21 bctrl
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0a504: 7c 00 00 a6 mfmsr r0
ffc0a508: 7f 80 01 24 mtmsr r28
ffc0a50c: 7c 00 01 24 mtmsr r0
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
ffc0a510: 3d 20 00 00 lis r9,0
ffc0a514: 80 09 20 e8 lwz r0,8424(r9)
ffc0a518: 7c 09 03 a6 mtctr r0
ffc0a51c: 4e 80 04 21 bctrl
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
ffc0a520: 3d 20 00 00 lis r9,0
ffc0a524: 39 29 2d b8 addi r9,r9,11704
ffc0a528: 81 69 00 0c lwz r11,12(r9)
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
ffc0a52c: 80 09 00 10 lwz r0,16(r9)
ffc0a530: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0a534: 41 9e 00 18 beq- cr7,ffc0a54c <_Thread_Change_priority+0x10c>
ffc0a538: 88 0b 00 74 lbz r0,116(r11)
ffc0a53c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a540: 41 9e 00 0c beq- cr7,ffc0a54c <_Thread_Change_priority+0x10c>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
ffc0a544: 38 00 00 01 li r0,1
ffc0a548: 98 09 00 18 stb r0,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a54c: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
}
ffc0a550: 39 61 00 20 addi r11,r1,32
ffc0a554: 4b ff 5f d4 b ffc00528 <_restgpr_28_x>
ffc0a770 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0a770: 94 21 ff e8 stwu r1,-24(r1)
ffc0a774: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0a778: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0a77c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0a780: 48 00 01 d1 bl ffc0a950 <_Thread_Get>
switch ( location ) {
ffc0a784: 80 01 00 08 lwz r0,8(r1)
ffc0a788: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a78c: 40 9e 00 24 bne- cr7,ffc0a7b0 <_Thread_Delay_ended+0x40><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0a790: 3c 80 10 00 lis r4,4096
ffc0a794: 60 84 00 18 ori r4,r4,24
ffc0a798: 4b ff fd c1 bl ffc0a558 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0a79c: 3d 20 00 00 lis r9,0
ffc0a7a0: 81 69 27 c8 lwz r11,10184(r9)
ffc0a7a4: 38 0b ff ff addi r0,r11,-1
ffc0a7a8: 90 09 27 c8 stw r0,10184(r9)
return _Thread_Dispatch_disable_level;
ffc0a7ac: 80 09 27 c8 lwz r0,10184(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0a7b0: 80 01 00 1c lwz r0,28(r1)
ffc0a7b4: 38 21 00 18 addi r1,r1,24
ffc0a7b8: 7c 08 03 a6 mtlr r0
ffc0a7bc: 4e 80 00 20 blr
ffc0a7c0 <_Thread_Dispatch>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0a7c0: 3d 20 00 00 lis r9,0
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0a7c4: 94 21 ff c8 stwu r1,-56(r1)
ffc0a7c8: 7c 08 02 a6 mflr r0
ffc0a7cc: 81 69 27 c8 lwz r11,10184(r9)
ffc0a7d0: 90 01 00 3c stw r0,60(r1)
ffc0a7d4: 38 0b 00 01 addi r0,r11,1
ffc0a7d8: 90 09 27 c8 stw r0,10184(r9)
ffc0a7dc: bf 21 00 1c stmw r25,28(r1)
return _Thread_Dispatch_disable_level;
ffc0a7e0: 80 09 27 c8 lwz r0,10184(r9)
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
ffc0a7e4: 3f 80 00 00 lis r28,0
ffc0a7e8: 3b bc 2d b8 addi r29,r28,11704
ffc0a7ec: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a7f0: 7c 00 00 a6 mfmsr r0
ffc0a7f4: 7d 30 42 a6 mfsprg r9,0
ffc0a7f8: 7c 09 48 78 andc r9,r0,r9
ffc0a7fc: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
ffc0a800: 3b 20 00 00 li r25,0
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0a804: 3f 40 00 00 lis r26,0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0a808: 3b bd 00 1c addi r29,r29,28
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a80c: 3f 60 00 00 lis r27,0
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0a810: 48 00 00 d8 b ffc0a8e8 <_Thread_Dispatch+0x128>
heir = _Thread_Heir;
ffc0a814: 83 c9 00 10 lwz r30,16(r9)
_Thread_Dispatch_necessary = false;
ffc0a818: 9b 29 00 18 stb r25,24(r9)
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
ffc0a81c: 7f 9e f8 00 cmpw cr7,r30,r31
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
ffc0a820: 93 c9 00 0c stw r30,12(r9)
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
ffc0a824: 41 9e 00 d4 beq- cr7,ffc0a8f8 <_Thread_Dispatch+0x138>
*/
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
ffc0a828: 81 3e 00 7c lwz r9,124(r30)
ffc0a82c: 2f 89 00 01 cmpwi cr7,r9,1
ffc0a830: 40 be 00 0c bne+ cr7,ffc0a83c <_Thread_Dispatch+0x7c>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0a834: 81 3a 27 c4 lwz r9,10180(r26)
ffc0a838: 91 3e 00 78 stw r9,120(r30)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a83c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0a840: 38 61 00 10 addi r3,r1,16
ffc0a844: 48 00 33 7d bl ffc0dbc0 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc0a848: 7f a3 eb 78 mr r3,r29
ffc0a84c: 38 81 00 10 addi r4,r1,16
ffc0a850: 38 a1 00 08 addi r5,r1,8
ffc0a854: 48 00 0c 85 bl ffc0b4d8 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
ffc0a858: 38 7f 00 84 addi r3,r31,132
ffc0a85c: 38 81 00 08 addi r4,r1,8
ffc0a860: 48 00 0c 1d bl ffc0b47c <_Timespec_Add_to>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a864: 81 3b 27 dc lwz r9,10204(r27)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0a868: 81 41 00 10 lwz r10,16(r1)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a86c: 2f 89 00 00 cmpwi cr7,r9,0
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0a870: 81 61 00 14 lwz r11,20(r1)
ffc0a874: 91 5d 00 00 stw r10,0(r29)
ffc0a878: 91 7d 00 04 stw r11,4(r29)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0a87c: 41 9e 00 14 beq- cr7,ffc0a890 <_Thread_Dispatch+0xd0> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0a880: 80 09 00 00 lwz r0,0(r9)
ffc0a884: 90 1f 01 28 stw r0,296(r31)
*_Thread_libc_reent = heir->libc_reent;
ffc0a888: 80 1e 01 28 lwz r0,296(r30)
ffc0a88c: 90 09 00 00 stw r0,0(r9)
}
_User_extensions_Thread_switch( executing, heir );
ffc0a890: 7f e3 fb 78 mr r3,r31
ffc0a894: 7f c4 f3 78 mr r4,r30
ffc0a898: 48 00 0f 69 bl ffc0b800 <_User_extensions_Thread_switch>
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0a89c: 80 1f 01 24 lwz r0,292(r31)
ffc0a8a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a8a4: 41 9e 00 0c beq- cr7,ffc0a8b0 <_Thread_Dispatch+0xf0>
_Context_Save_fp( &executing->fp_context );
ffc0a8a8: 38 7f 01 24 addi r3,r31,292
ffc0a8ac: 48 00 fb 55 bl ffc1a400 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0a8b0: 38 7f 00 c4 addi r3,r31,196
ffc0a8b4: 38 9e 00 c4 addi r4,r30,196
ffc0a8b8: 48 00 fc c9 bl ffc1a580 <_CPU_Context_switch>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
_Thread_Allocated_fp = executing;
}
#else
if ( executing->fp_context != NULL )
ffc0a8bc: 80 1f 01 24 lwz r0,292(r31)
ffc0a8c0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a8c4: 41 9e 00 0c beq- cr7,ffc0a8d0 <_Thread_Dispatch+0x110>
_Context_Restore_fp( &executing->fp_context );
ffc0a8c8: 38 7f 01 24 addi r3,r31,292
ffc0a8cc: 48 00 fb f5 bl ffc1a4c0 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0a8d0: 39 3c 2d b8 addi r9,r28,11704
ffc0a8d4: 83 e9 00 0c lwz r31,12(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a8d8: 7c 00 00 a6 mfmsr r0
ffc0a8dc: 7d 30 42 a6 mfsprg r9,0
ffc0a8e0: 7c 09 48 78 andc r9,r0,r9
ffc0a8e4: 7d 20 01 24 mtmsr r9
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0a8e8: 39 3c 2d b8 addi r9,r28,11704
ffc0a8ec: 89 69 00 18 lbz r11,24(r9)
ffc0a8f0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a8f4: 40 9e ff 20 bne+ cr7,ffc0a814 <_Thread_Dispatch+0x54>
* This routine sets thread dispatch level to the
* value passed in.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_set_disable_level(uint32_t value)
{
_Thread_Dispatch_disable_level = value;
ffc0a8f8: 39 60 00 00 li r11,0
ffc0a8fc: 3d 20 00 00 lis r9,0
ffc0a900: 91 69 27 c8 stw r11,10184(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a904: 7c 00 01 24 mtmsr r0
post_switch:
_Thread_Dispatch_set_disable_level( 0 );
_ISR_Enable( level );
_API_extensions_Run_postswitch();
ffc0a908: 4b ff e0 c1 bl ffc089c8 <_API_extensions_Run_postswitch>
}
ffc0a90c: 39 61 00 38 addi r11,r1,56
ffc0a910: 4b ff 5c 0c b ffc0051c <_restgpr_25_x>
ffc0f9f0 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc0f9f0: 94 21 ff f0 stwu r1,-16(r1)
ffc0f9f4: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc0f9f8: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc0f9fc: 90 01 00 14 stw r0,20(r1)
ffc0fa00: bf c1 00 08 stmw r30,8(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc0fa04: 83 e9 2d c4 lwz r31,11716(r9)
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
ffc0fa08: 81 3f 00 ac lwz r9,172(r31)
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0fa0c: 38 00 00 00 li r0,0
ffc0fa10: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc0fa14: 71 2b 00 01 andi. r11,r9,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc0fa18: 7d 30 42 a6 mfsprg r9,0
ffc0fa1c: 40 82 00 0c bne- ffc0fa28 <_Thread_Handler+0x38>
msr |= ppc_interrupt_get_disable_mask();
ffc0fa20: 7d 20 03 78 or r0,r9,r0
ffc0fa24: 48 00 00 08 b ffc0fa2c <_Thread_Handler+0x3c>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc0fa28: 7c 00 48 78 andc r0,r0,r9
}
_CPU_MSR_SET(msr);
ffc0fa2c: 7c 00 01 24 mtmsr r0
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc0fa30: 3d 20 00 00 lis r9,0
ffc0fa34: 8b c9 29 80 lbz r30,10624(r9)
doneConstructors = 1;
ffc0fa38: 38 00 00 01 li r0,1
/*
* 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 );
ffc0fa3c: 7f e3 fb 78 mr r3,r31
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
ffc0fa40: 98 09 29 80 stb r0,10624(r9)
/*
* 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 );
ffc0fa44: 4b ff bb 89 bl ffc0b5cc <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc0fa48: 4b ff ae cd bl ffc0a914 <_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) */ {
ffc0fa4c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0fa50: 40 be 00 08 bne+ cr7,ffc0fa58 <_Thread_Handler+0x68>
INIT_NAME ();
ffc0fa54: 48 00 b6 e9 bl ffc1b13c <_init>
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc0fa58: 80 1f 00 94 lwz r0,148(r31)
ffc0fa5c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0fa60: 40 be 00 18 bne+ cr7,ffc0fa78 <_Thread_Handler+0x88> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc0fa64: 80 1f 00 90 lwz r0,144(r31)
ffc0fa68: 80 7f 00 9c lwz r3,156(r31)
ffc0fa6c: 7c 09 03 a6 mtctr r0
ffc0fa70: 4e 80 04 21 bctrl
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
ffc0fa74: 90 7f 00 28 stw r3,40(r31)
* 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 );
ffc0fa78: 7f e3 fb 78 mr r3,r31
ffc0fa7c: 4b ff bb a5 bl ffc0b620 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
ffc0fa80: 38 60 00 00 li r3,0
ffc0fa84: 38 80 00 01 li r4,1
ffc0fa88: 38 a0 00 05 li r5,5
ffc0fa8c: 4b ff 9a d5 bl ffc09560 <_Internal_error_Occurred>
ffc0aa00 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa00: 94 21 ff d0 stwu r1,-48(r1)
ffc0aa04: 7c 08 02 a6 mflr r0
ffc0aa08: be e1 00 0c stmw r23,12(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0aa0c: 3b 20 00 00 li r25,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa10: 7d 3a 4b 78 mr r26,r9
ffc0aa14: 90 01 00 34 stw r0,52(r1)
ffc0aa18: 7c 7e 1b 78 mr r30,r3
ffc0aa1c: 7c 9f 23 78 mr r31,r4
ffc0aa20: 81 21 00 40 lwz r9,64(r1)
/*
* 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 );
ffc0aa24: 7c 83 23 78 mr r3,r4
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0aa28: 93 24 01 2c stw r25,300(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa2c: 7c dd 33 78 mr r29,r6
ffc0aa30: 7c fc 3b 78 mr r28,r7
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0aa34: 93 24 01 30 stw r25,304(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa38: 7d 1b 43 78 mr r27,r8
ffc0aa3c: 7d 57 53 78 mr r23,r10
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0aa40: 93 24 01 28 stw r25,296(r4)
/*
* 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 );
ffc0aa44: 7c c4 33 78 mr r4,r6
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0aa48: 83 09 00 00 lwz r24,0(r9)
/*
* 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 );
ffc0aa4c: 48 00 08 b5 bl ffc0b300 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0aa50: 2c 03 00 00 cmpwi r3,0
return false; /* stack allocation failed */
ffc0aa54: 38 00 00 00 li r0,0
/*
* 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 );
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0aa58: 41 82 01 80 beq- ffc0abd8 <_Thread_Initialize+0x1d8>
ffc0aa5c: 7f 83 e8 40 cmplw cr7,r3,r29
ffc0aa60: 41 9c 01 78 blt- cr7,ffc0abd8 <_Thread_Initialize+0x1d8><== NEVER TAKEN
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0aa64: 2f 9c 00 00 cmpwi cr7,r28,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0aa68: 80 1f 00 c0 lwz r0,192(r31)
the_stack->size = size;
ffc0aa6c: 90 7f 00 b4 stw r3,180(r31)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0aa70: 90 1f 00 b8 stw r0,184(r31)
ffc0aa74: 41 be 00 14 beq+ cr7,ffc0aa88 <_Thread_Initialize+0x88>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0aa78: 38 60 01 08 li r3,264
ffc0aa7c: 48 00 10 f1 bl ffc0bb6c <_Workspace_Allocate>
if ( !fp_area )
ffc0aa80: 7c 79 1b 79 mr. r25,r3
ffc0aa84: 41 82 01 10 beq- ffc0ab94 <_Thread_Initialize+0x194>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0aa88: 3d 20 00 00 lis r9,0
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;
ffc0aa8c: 93 3f 01 24 stw r25,292(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0aa90: 38 00 00 00 li r0,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0aa94: 80 69 27 e8 lwz r3,10216(r9)
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0aa98: 3b a0 00 00 li r29,0
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;
ffc0aa9c: 93 3f 00 bc stw r25,188(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0aaa0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0aaa4: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0aaa8: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0aaac: 90 1f 00 68 stw r0,104(r31)
the_watchdog->user_data = user_data;
ffc0aab0: 90 1f 00 6c stw r0,108(r31)
ffc0aab4: 41 be 00 18 beq+ cr7,ffc0aacc <_Thread_Initialize+0xcc>
extensions_area = _Workspace_Allocate(
ffc0aab8: 38 63 00 01 addi r3,r3,1
ffc0aabc: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0aac0: 48 00 10 ad bl ffc0bb6c <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0aac4: 7c 7d 1b 79 mr. r29,r3
ffc0aac8: 41 82 00 d0 beq- ffc0ab98 <_Thread_Initialize+0x198>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0aacc: 2f 9d 00 00 cmpwi cr7,r29,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0aad0: 93 bf 01 34 stw r29,308(r31)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0aad4: 41 9e 00 30 beq- cr7,ffc0ab04 <_Thread_Initialize+0x104>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0aad8: 3d 20 00 00 lis r9,0
ffc0aadc: 81 69 27 e8 lwz r11,10216(r9)
the_thread->extensions[i] = NULL;
ffc0aae0: 38 00 00 00 li r0,0
* 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++ )
ffc0aae4: 39 20 00 00 li r9,0
ffc0aae8: 48 00 00 14 b ffc0aafc <_Thread_Initialize+0xfc>
the_thread->extensions[i] = NULL;
ffc0aaec: 81 1f 01 34 lwz r8,308(r31)
ffc0aaf0: 55 2a 10 3a rlwinm r10,r9,2,0,29
* 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++ )
ffc0aaf4: 39 29 00 01 addi r9,r9,1
the_thread->extensions[i] = NULL;
ffc0aaf8: 7c 08 51 2e stwx r0,r8,r10
* 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++ )
ffc0aafc: 7f 89 58 40 cmplw cr7,r9,r11
ffc0ab00: 40 9d ff ec ble+ cr7,ffc0aaec <_Thread_Initialize+0xec>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0ab04: 80 01 00 38 lwz r0,56(r1)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
ffc0ab08: 3d 20 00 00 lis r9,0
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0ab0c: 3b 80 00 00 li r28,0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0ab10: 9b 5f 00 a0 stb r26,160(r31)
ffc0ab14: 7f e3 fb 78 mr r3,r31
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0ab18: 90 1f 00 a8 stw r0,168(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0ab1c: 80 01 00 3c lwz r0,60(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0ab20: 92 ff 00 a4 stw r23,164(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0ab24: 90 1f 00 ac stw r0,172(r31)
the_thread->current_state = STATES_DORMANT;
ffc0ab28: 38 00 00 01 li r0,1
ffc0ab2c: 90 1f 00 10 stw r0,16(r31)
ffc0ab30: 80 09 20 f8 lwz r0,8440(r9)
the_thread->Wait.queue = NULL;
ffc0ab34: 93 9f 00 44 stw r28,68(r31)
ffc0ab38: 7c 09 03 a6 mtctr r0
the_thread->resource_count = 0;
ffc0ab3c: 93 9f 00 1c stw r28,28(r31)
the_thread->real_priority = priority;
ffc0ab40: 93 7f 00 18 stw r27,24(r31)
the_thread->Start.initial_priority = priority;
ffc0ab44: 93 7f 00 b0 stw r27,176(r31)
ffc0ab48: 4e 80 04 21 bctrl
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
ffc0ab4c: 7c 7a 1b 79 mr. r26,r3
ffc0ab50: 41 82 00 4c beq- ffc0ab9c <_Thread_Initialize+0x19c>
goto failed;
_Thread_Set_priority( the_thread, priority );
ffc0ab54: 7f e3 fb 78 mr r3,r31
ffc0ab58: 7f 64 db 78 mr r4,r27
ffc0ab5c: 48 00 06 c5 bl ffc0b220 <_Thread_Set_priority>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
ffc0ab60: a0 1f 00 0a lhz r0,10(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0ab64: 81 3e 00 1c lwz r9,28(r30)
* 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 );
ffc0ab68: 7f e3 fb 78 mr r3,r31
ffc0ab6c: 54 00 10 3a rlwinm r0,r0,2,0,29
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
ffc0ab70: 93 9f 00 84 stw r28,132(r31)
ffc0ab74: 93 9f 00 88 stw r28,136(r31)
ffc0ab78: 7f e9 01 2e stwx r31,r9,r0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0ab7c: 93 1f 00 0c stw r24,12(r31)
* 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 );
ffc0ab80: 48 00 0b 51 bl ffc0b6d0 <_User_extensions_Thread_create>
if ( extension_status )
return true;
ffc0ab84: 38 00 00 01 li r0,1
* 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 )
ffc0ab88: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ab8c: 41 be 00 10 beq+ cr7,ffc0ab9c <_Thread_Initialize+0x19c>
ffc0ab90: 48 00 00 48 b ffc0abd8 <_Thread_Initialize+0x1d8>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0ab94: 3b a0 00 00 li r29,0
size_t actual_stack_size = 0;
void *stack = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
void *fp_area;
#endif
void *sched = NULL;
ffc0ab98: 3b 40 00 00 li r26,0
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
ffc0ab9c: 80 7f 01 28 lwz r3,296(r31)
ffc0aba0: 48 00 10 01 bl ffc0bba0 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0aba4: 80 7f 01 2c lwz r3,300(r31)
ffc0aba8: 48 00 0f f9 bl ffc0bba0 <_Workspace_Free>
ffc0abac: 80 7f 01 30 lwz r3,304(r31)
ffc0abb0: 48 00 0f f1 bl ffc0bba0 <_Workspace_Free>
_Workspace_Free( extensions_area );
ffc0abb4: 7f a3 eb 78 mr r3,r29
ffc0abb8: 48 00 0f e9 bl ffc0bba0 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
ffc0abbc: 7f 23 cb 78 mr r3,r25
ffc0abc0: 48 00 0f e1 bl ffc0bba0 <_Workspace_Free>
#endif
_Workspace_Free( sched );
ffc0abc4: 7f 43 d3 78 mr r3,r26
ffc0abc8: 48 00 0f d9 bl ffc0bba0 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
ffc0abcc: 7f e3 fb 78 mr r3,r31
ffc0abd0: 48 00 07 a5 bl ffc0b374 <_Thread_Stack_Free>
return false;
ffc0abd4: 38 00 00 00 li r0,0
}
ffc0abd8: 39 61 00 30 addi r11,r1,48
ffc0abdc: 7c 03 03 78 mr r3,r0
ffc0abe0: 4b ff 59 34 b ffc00514 <_restgpr_23_x>
ffc0bb9c <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0bb9c: 94 21 ff e8 stwu r1,-24(r1)
ffc0bba0: 7c 08 02 a6 mflr r0
ffc0bba4: 90 01 00 1c stw r0,28(r1)
_Thread_Restart_self();
return true;
}
return false;
ffc0bba8: 38 00 00 00 li r0,0
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
ffc0bbac: 81 23 00 10 lwz r9,16(r3)
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0bbb0: bf c1 00 10 stmw r30,16(r1)
ffc0bbb4: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0bbb8: 71 2b 00 01 andi. r11,r9,1
ffc0bbbc: 40 a2 00 70 bne+ ffc0bc2c <_Thread_Restart+0x90>
_Thread_Set_transient( the_thread );
ffc0bbc0: 90 81 00 08 stw r4,8(r1)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0bbc4: 3f c0 00 00 lis r30,0
ffc0bbc8: 3b de 2d d8 addi r30,r30,11736
ffc0bbcc: 90 a1 00 0c stw r5,12(r1)
ffc0bbd0: 48 00 00 f5 bl ffc0bcc4 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0bbd4: 7f e3 fb 78 mr r3,r31
ffc0bbd8: 80 81 00 08 lwz r4,8(r1)
ffc0bbdc: 80 a1 00 0c lwz r5,12(r1)
ffc0bbe0: 48 00 31 d1 bl ffc0edb0 <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0bbe4: 7f e3 fb 78 mr r3,r31
ffc0bbe8: 48 00 2e 8d bl ffc0ea74 <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0bbec: 7f e3 fb 78 mr r3,r31
ffc0bbf0: 48 00 31 79 bl ffc0ed68 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0bbf4: 7f e3 fb 78 mr r3,r31
ffc0bbf8: 48 00 05 c1 bl ffc0c1b8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0bbfc: 81 3e 00 0c lwz r9,12(r30)
_Thread_Restart_self();
return true;
ffc0bc00: 38 00 00 01 li r0,1
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0bc04: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0bc08: 40 be 00 24 bne+ cr7,ffc0bc2c <_Thread_Restart+0x90>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0bc0c: 80 1f 01 24 lwz r0,292(r31)
ffc0bc10: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc14: 41 9e 00 0c beq- cr7,ffc0bc20 <_Thread_Restart+0x84> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0bc18: 38 7f 01 24 addi r3,r31,292
ffc0bc1c: 48 00 f3 a5 bl ffc1afc0 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0bc20: 80 7e 00 0c lwz r3,12(r30)
ffc0bc24: 38 63 00 c4 addi r3,r3,196
ffc0bc28: 48 00 f5 59 bl ffc1b180 <_CPU_Context_restore>
return true;
}
return false;
}
ffc0bc2c: 39 61 00 18 addi r11,r1,24
ffc0bc30: 7c 03 03 78 mr r3,r0
ffc0bc34: 4b ff 51 70 b ffc00da4 <_restgpr_30_x>
ffc0b164 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0b164: 94 21 ff d8 stwu r1,-40(r1)
ffc0b168: 7c 08 02 a6 mflr r0
ffc0b16c: bf a1 00 1c stmw r29,28(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0b170: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0b174: 7c 9e 23 78 mr r30,r4
ffc0b178: 90 01 00 2c stw r0,44(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0b17c: 41 82 00 54 beq- ffc0b1d0 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
ffc0b180: 80 1f 00 34 lwz r0,52(r31)
ffc0b184: 2f 80 00 01 cmpwi cr7,r0,1
ffc0b188: 40 be 00 48 bne+ cr7,ffc0b1d0 <_Thread_queue_Requeue+0x6c><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b18c: 7f a0 00 a6 mfmsr r29
ffc0b190: 7d 30 42 a6 mfsprg r9,0
ffc0b194: 7f a9 48 78 andc r9,r29,r9
ffc0b198: 7d 20 01 24 mtmsr r9
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
ffc0b19c: 3d 60 00 03 lis r11,3
ffc0b1a0: 81 24 00 10 lwz r9,16(r4)
ffc0b1a4: 61 6b be e0 ori r11,r11,48864
ffc0b1a8: 7d 6a 48 39 and. r10,r11,r9
ffc0b1ac: 41 a2 00 20 beq+ ffc0b1cc <_Thread_queue_Requeue+0x68> <== NEVER TAKEN
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;
ffc0b1b0: 90 1f 00 30 stw r0,48(r31)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0b1b4: 38 a0 00 01 li r5,1
ffc0b1b8: 48 00 2f e1 bl ffc0e198 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0b1bc: 7f e3 fb 78 mr r3,r31
ffc0b1c0: 7f c4 f3 78 mr r4,r30
ffc0b1c4: 38 a1 00 08 addi r5,r1,8
ffc0b1c8: 4b ff fd 19 bl ffc0aee0 <_Thread_queue_Enqueue_priority>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b1cc: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
}
ffc0b1d0: 39 61 00 28 addi r11,r1,40
ffc0b1d4: 4b ff 53 58 b ffc0052c <_restgpr_29_x>
ffc0b1d8 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0b1d8: 94 21 ff e8 stwu r1,-24(r1)
ffc0b1dc: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b1e0: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0b1e4: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0b1e8: 4b ff f7 69 bl ffc0a950 <_Thread_Get>
switch ( location ) {
ffc0b1ec: 80 01 00 08 lwz r0,8(r1)
ffc0b1f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b1f4: 40 9e 00 1c bne- cr7,ffc0b210 <_Thread_queue_Timeout+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0b1f8: 48 00 30 91 bl ffc0e288 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0b1fc: 3d 20 00 00 lis r9,0
ffc0b200: 81 69 27 c8 lwz r11,10184(r9)
ffc0b204: 38 0b ff ff addi r0,r11,-1
ffc0b208: 90 09 27 c8 stw r0,10184(r9)
return _Thread_Dispatch_disable_level;
ffc0b20c: 80 09 27 c8 lwz r0,10184(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0b210: 80 01 00 1c lwz r0,28(r1)
ffc0b214: 38 21 00 18 addi r1,r1,24
ffc0b218: 7c 08 03 a6 mtlr r0
ffc0b21c: 4e 80 00 20 blr
ffc18de8 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc18de8: 94 21 ff 98 stwu r1,-104(r1)
ffc18dec: 7c 08 02 a6 mflr r0
ffc18df0: be 21 00 2c stmw r17,44(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc18df4: 3a 21 00 14 addi r17,r1,20
ffc18df8: 3a 81 00 18 addi r20,r1,24
ffc18dfc: 90 01 00 6c stw r0,108(r1)
ffc18e00: 3b 61 00 0c addi r27,r1,12
head->previous = NULL;
ffc18e04: 38 00 00 00 li r0,0
tail->previous = head;
ffc18e08: 3b 81 00 08 addi r28,r1,8
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc18e0c: 92 81 00 14 stw r20,20(r1)
ffc18e10: 7c 7f 1b 78 mr r31,r3
head->previous = NULL;
ffc18e14: 90 01 00 18 stw r0,24(r1)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc18e18: 3e 40 00 00 lis r18,0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e1c: 3b 43 00 30 addi r26,r3,48
tail->previous = head;
ffc18e20: 92 21 00 1c stw r17,28(r1)
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc18e24: 3e 60 00 00 lis r19,0
/*
* 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 );
ffc18e28: 3b a3 00 68 addi r29,r3,104
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc18e2c: 93 61 00 08 stw r27,8(r1)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc18e30: 3a a0 00 00 li r21,0
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc18e34: 3a c0 00 00 li r22,0
head->previous = NULL;
ffc18e38: 90 01 00 0c stw r0,12(r1)
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
ffc18e3c: 3a e0 00 01 li r23,1
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc18e40: 3b 03 00 08 addi r24,r3,8
tail->previous = head;
ffc18e44: 93 81 00 10 stw r28,16(r1)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc18e48: 3b 23 00 40 addi r25,r3,64
{
/*
* 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;
ffc18e4c: 92 3f 00 78 stw r17,120(r31)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc18e50: 80 12 28 d0 lwz r0,10448(r18)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e54: 7f 85 e3 78 mr r5,r28
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc18e58: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e5c: 7f 43 d3 78 mr r3,r26
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc18e60: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc18e64: 7c 84 00 50 subf r4,r4,r0
ffc18e68: 48 00 49 5d bl ffc1d7c4 <_Watchdog_Adjust_to_chain>
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc18e6c: 83 d3 28 b4 lwz r30,10420(r19)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc18e70: 80 bf 00 74 lwz r5,116(r31)
/*
* 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 ) {
ffc18e74: 7f 9e 28 40 cmplw cr7,r30,r5
ffc18e78: 40 bd 00 18 ble+ cr7,ffc18e90 <_Timer_server_Body+0xa8>
/*
* 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 );
ffc18e7c: 7c 85 f0 50 subf r4,r5,r30
ffc18e80: 7f a3 eb 78 mr r3,r29
ffc18e84: 7f 85 e3 78 mr r5,r28
ffc18e88: 48 00 49 3d bl ffc1d7c4 <_Watchdog_Adjust_to_chain>
ffc18e8c: 48 00 00 18 b ffc18ea4 <_Timer_server_Body+0xbc>
} else if ( snapshot < last_snapshot ) {
ffc18e90: 40 bc 00 14 bge+ cr7,ffc18ea4 <_Timer_server_Body+0xbc>
/*
* 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 );
ffc18e94: 7f a3 eb 78 mr r3,r29
ffc18e98: 38 80 00 01 li r4,1
ffc18e9c: 7c be 28 50 subf r5,r30,r5
ffc18ea0: 48 00 48 6d bl ffc1d70c <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
ffc18ea4: 93 df 00 74 stw r30,116(r31)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc18ea8: 80 7f 00 78 lwz r3,120(r31)
ffc18eac: 48 00 0b 7d bl ffc19a28 <_Chain_Get>
if ( timer == NULL ) {
ffc18eb0: 7c 7e 1b 79 mr. r30,r3
ffc18eb4: 41 82 00 2c beq- ffc18ee0 <_Timer_server_Body+0xf8> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc18eb8: 80 1e 00 38 lwz r0,56(r30) <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc18ebc: 7f 43 d3 78 mr r3,r26 <== NOT EXECUTED
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc18ec0: 2f 80 00 01 cmpwi cr7,r0,1 <== NOT EXECUTED
ffc18ec4: 41 9e 00 10 beq- cr7,ffc18ed4 <_Timer_server_Body+0xec> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc18ec8: 2f 80 00 03 cmpwi cr7,r0,3 <== NOT EXECUTED
ffc18ecc: 40 9e ff dc bne+ cr7,ffc18ea8 <_Timer_server_Body+0xc0> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc18ed0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc18ed4: 38 9e 00 10 addi r4,r30,16 <== NOT EXECUTED
ffc18ed8: 48 00 49 9d bl ffc1d874 <_Watchdog_Insert> <== NOT EXECUTED
ffc18edc: 4b ff ff cc b ffc18ea8 <_Timer_server_Body+0xc0> <== 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 );
ffc18ee0: 4b ff fe 1d bl ffc18cfc <ppc_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
ffc18ee4: 80 01 00 14 lwz r0,20(r1)
ffc18ee8: 7f 80 a0 00 cmpw cr7,r0,r20
ffc18eec: 40 be 00 1c bne+ cr7,ffc18f08 <_Timer_server_Body+0x120><== NEVER TAKEN
ts->insert_chain = NULL;
ffc18ef0: 93 df 00 78 stw r30,120(r31)
ffc18ef4: 7c 60 01 24 mtmsr r3
_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 ) ) {
ffc18ef8: 80 01 00 08 lwz r0,8(r1)
ffc18efc: 7f 80 d8 00 cmpw cr7,r0,r27
ffc18f00: 40 be 00 10 bne+ cr7,ffc18f10 <_Timer_server_Body+0x128>
ffc18f04: 48 00 00 50 b ffc18f54 <_Timer_server_Body+0x16c>
ffc18f08: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
ffc18f0c: 4b ff ff 44 b ffc18e50 <_Timer_server_Body+0x68> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
ffc18f10: 4b ff fd ed bl ffc18cfc <ppc_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc18f14: 81 21 00 08 lwz r9,8(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
ffc18f18: 7f 89 d8 00 cmpw cr7,r9,r27
ffc18f1c: 41 9e 00 30 beq- cr7,ffc18f4c <_Timer_server_Body+0x164>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
ffc18f20: 81 69 00 00 lwz r11,0(r9)
head->next = new_first;
new_first->previous = head;
ffc18f24: 93 8b 00 04 stw r28,4(r11)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
ffc18f28: 91 61 00 08 stw r11,8(r1)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc18f2c: 92 a9 00 08 stw r21,8(r9)
ffc18f30: 7c 60 01 24 mtmsr r3
/*
* 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 );
ffc18f34: 80 09 00 1c lwz r0,28(r9)
ffc18f38: 80 69 00 20 lwz r3,32(r9)
ffc18f3c: 80 89 00 24 lwz r4,36(r9)
ffc18f40: 7c 09 03 a6 mtctr r0
ffc18f44: 4e 80 04 21 bctrl
}
ffc18f48: 4b ff ff c8 b ffc18f10 <_Timer_server_Body+0x128>
ffc18f4c: 7c 60 01 24 mtmsr r3
ffc18f50: 4b ff fe fc b ffc18e4c <_Timer_server_Body+0x64>
} else {
ts->active = false;
ffc18f54: 9a df 00 7c stb r22,124(r31)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
ffc18f58: 4b ff fd b9 bl ffc18d10 <_Thread_Disable_dispatch>
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc18f5c: 80 7f 00 00 lwz r3,0(r31)
ffc18f60: 38 80 00 08 li r4,8
ffc18f64: 48 00 40 cd bl ffc1d030 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc18f68: 7f e3 fb 78 mr r3,r31
ffc18f6c: 4b ff fd bd bl ffc18d28 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc18f70: 7f e3 fb 78 mr r3,r31
ffc18f74: 4b ff fe 15 bl ffc18d88 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc18f78: 48 00 36 e1 bl ffc1c658 <_Thread_Enable_dispatch>
ts->active = true;
ffc18f7c: 9a ff 00 7c stb r23,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc18f80: 7f 03 c3 78 mr r3,r24
ffc18f84: 48 00 4a 49 bl ffc1d9cc <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc18f88: 7f 23 cb 78 mr r3,r25
ffc18f8c: 48 00 4a 41 bl ffc1d9cc <_Watchdog_Remove>
ffc18f90: 4b ff fe bc b ffc18e4c <_Timer_server_Body+0x64>
ffc18f94 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc18f94: 94 21 ff f0 stwu r1,-16(r1)
ffc18f98: 7c 08 02 a6 mflr r0
ffc18f9c: 90 01 00 14 stw r0,20(r1)
if ( ts->insert_chain == NULL ) {
ffc18fa0: 80 03 00 78 lwz r0,120(r3)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc18fa4: bf c1 00 08 stmw r30,8(r1)
ffc18fa8: 7c 7f 1b 78 mr r31,r3
if ( ts->insert_chain == NULL ) {
ffc18fac: 2f 80 00 00 cmpwi cr7,r0,0
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc18fb0: 7c 9e 23 78 mr r30,r4
if ( ts->insert_chain == NULL ) {
ffc18fb4: 40 be 01 00 bne+ cr7,ffc190b4 <_Timer_server_Schedule_operation_method+0x120><== NEVER TAKEN
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
ffc18fb8: 4b ff fd 59 bl ffc18d10 <_Thread_Disable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc18fbc: 80 1e 00 38 lwz r0,56(r30)
ffc18fc0: 2f 80 00 01 cmpwi cr7,r0,1
ffc18fc4: 40 be 00 6c bne+ cr7,ffc19030 <_Timer_server_Schedule_operation_method+0x9c>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc18fc8: 4b ff fd 35 bl ffc18cfc <ppc_interrupt_disable>
snapshot = _Watchdog_Ticks_since_boot;
ffc18fcc: 3d 20 00 00 lis r9,0
ffc18fd0: 80 09 28 d0 lwz r0,10448(r9)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc18fd4: 39 7f 00 34 addi r11,r31,52
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc18fd8: 81 3f 00 30 lwz r9,48(r31)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
ffc18fdc: 81 5f 00 3c lwz r10,60(r31)
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc18fe0: 7f 89 58 00 cmpw cr7,r9,r11
ffc18fe4: 41 9e 00 20 beq- cr7,ffc19004 <_Timer_server_Schedule_operation_method+0x70>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
ffc18fe8: 81 09 00 10 lwz r8,16(r9)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
ffc18fec: 7d 4a 00 50 subf r10,r10,r0
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
ffc18ff0: 39 60 00 00 li r11,0
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
ffc18ff4: 7f 88 50 40 cmplw cr7,r8,r10
ffc18ff8: 40 9d 00 08 ble- cr7,ffc19000 <_Timer_server_Schedule_operation_method+0x6c>
delta_interval -= delta;
ffc18ffc: 7d 6a 40 50 subf r11,r10,r8
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
ffc19000: 91 69 00 10 stw r11,16(r9)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
ffc19004: 90 1f 00 3c stw r0,60(r31)
ffc19008: 7c 60 01 24 mtmsr r3
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1900c: 38 7f 00 30 addi r3,r31,48
ffc19010: 38 9e 00 10 addi r4,r30,16
ffc19014: 48 00 48 61 bl ffc1d874 <_Watchdog_Insert>
if ( !ts->active ) {
ffc19018: 88 1f 00 7c lbz r0,124(r31)
ffc1901c: 2f 80 00 00 cmpwi cr7,r0,0
ffc19020: 40 be 00 8c bne+ cr7,ffc190ac <_Timer_server_Schedule_operation_method+0x118>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc19024: 7f e3 fb 78 mr r3,r31
ffc19028: 4b ff fd 01 bl ffc18d28 <_Timer_server_Reset_interval_system_watchdog>
ffc1902c: 48 00 00 80 b ffc190ac <_Timer_server_Schedule_operation_method+0x118>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19030: 2f 80 00 03 cmpwi cr7,r0,3
ffc19034: 40 be 00 78 bne+ cr7,ffc190ac <_Timer_server_Schedule_operation_method+0x118>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc19038: 4b ff fc c5 bl ffc18cfc <ppc_interrupt_disable>
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc1903c: 3d 20 00 00 lis r9,0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
ffc19040: 81 1f 00 74 lwz r8,116(r31)
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc19044: 80 09 28 b4 lwz r0,10420(r9)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc19048: 39 7f 00 6c addi r11,r31,108
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc1904c: 81 3f 00 68 lwz r9,104(r31)
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc19050: 7f 89 58 00 cmpw cr7,r9,r11
ffc19054: 41 9e 00 30 beq- cr7,ffc19084 <_Timer_server_Schedule_operation_method+0xf0>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc19058: 7f 80 40 40 cmplw cr7,r0,r8
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
ffc1905c: 81 49 00 10 lwz r10,16(r9)
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
ffc19060: 7d 6a 42 14 add r11,r10,r8
delta_interval += delta;
ffc19064: 7d 60 58 50 subf r11,r0,r11
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc19068: 40 9d 00 18 ble- cr7,ffc19080 <_Timer_server_Schedule_operation_method+0xec>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
ffc1906c: 7d 08 00 50 subf r8,r8,r0
if (delta_interval > delta) {
ffc19070: 7f 8a 40 40 cmplw cr7,r10,r8
delta_interval -= delta;
} else {
delta_interval = 0;
ffc19074: 39 60 00 00 li r11,0
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
ffc19078: 40 9d 00 08 ble- cr7,ffc19080 <_Timer_server_Schedule_operation_method+0xec><== NEVER TAKEN
delta_interval -= delta;
ffc1907c: 7d 68 50 50 subf r11,r8,r10
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
ffc19080: 91 69 00 10 stw r11,16(r9)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
ffc19084: 90 1f 00 74 stw r0,116(r31)
ffc19088: 7c 60 01 24 mtmsr r3
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1908c: 38 7f 00 68 addi r3,r31,104
ffc19090: 38 9e 00 10 addi r4,r30,16
ffc19094: 48 00 47 e1 bl ffc1d874 <_Watchdog_Insert>
if ( !ts->active ) {
ffc19098: 88 1f 00 7c lbz r0,124(r31)
ffc1909c: 2f 80 00 00 cmpwi cr7,r0,0
ffc190a0: 40 be 00 0c bne+ cr7,ffc190ac <_Timer_server_Schedule_operation_method+0x118>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc190a4: 7f e3 fb 78 mr r3,r31
ffc190a8: 4b ff fc e1 bl ffc18d88 <_Timer_server_Reset_tod_system_watchdog>
}
}
_Thread_Enable_dispatch();
ffc190ac: 48 00 35 ad bl ffc1c658 <_Thread_Enable_dispatch>
ffc190b0: 48 00 00 0c b ffc190bc <_Timer_server_Schedule_operation_method+0x128>
* 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 );
ffc190b4: 80 63 00 78 lwz r3,120(r3) <== NOT EXECUTED
ffc190b8: 48 00 09 19 bl ffc199d0 <_Chain_Append> <== NOT EXECUTED
}
}
ffc190bc: 39 61 00 10 addi r11,r1,16
ffc190c0: 4b ff 50 cc b ffc0e18c <_restgpr_30_x>
ffc0cda4 <_Timespec_Divide_by_integer>:
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
ffc0cda4: 94 21 ff e8 stwu r1,-24(r1) <== NOT EXECUTED
ffc0cda8: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0cdac: 7c 86 23 78 mr r6,r4 <== NOT EXECUTED
ffc0cdb0: 90 01 00 1c stw r0,28(r1) <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
ffc0cdb4: 3c 00 3b 9a lis r0,15258 <== NOT EXECUTED
ffc0cdb8: 60 00 ca 00 ori r0,r0,51712 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
ffc0cdbc: 81 63 00 00 lwz r11,0(r3) <== NOT EXECUTED
void _Timespec_Divide_by_integer(
const struct timespec *time,
uint32_t iterations,
struct timespec *result
)
{
ffc0cdc0: bf a1 00 0c stmw r29,12(r1) <== NOT EXECUTED
ffc0cdc4: 7c bf 2b 78 mr r31,r5 <== NOT EXECUTED
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
t = time->tv_sec;
t *= TOD_NANOSECONDS_PER_SECOND;
ffc0cdc8: 7d 0b 00 96 mulhw r8,r11,r0 <== NOT EXECUTED
ffc0cdcc: 7d 2b 01 d6 mullw r9,r11,r0 <== NOT EXECUTED
t += time->tv_nsec;
ffc0cdd0: 81 63 00 04 lwz r11,4(r3) <== NOT EXECUTED
ffc0cdd4: 7d 6a fe 70 srawi r10,r11,31 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
ffc0cdd8: 7c 89 58 14 addc r4,r9,r11 <== NOT EXECUTED
ffc0cddc: 7c 68 51 14 adde r3,r8,r10 <== NOT EXECUTED
ffc0cde0: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0cde4: 48 00 e7 0d bl ffc1b4f0 <__udivdi3> <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
ffc0cde8: 3c c0 3b 9a lis r6,15258 <== NOT EXECUTED
ffc0cdec: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0cdf0: 60 c6 ca 00 ori r6,r6,51712 <== NOT EXECUTED
/*
* Divide to get nanoseconds per iteration
*/
t /= iterations;
ffc0cdf4: 7c 7d 1b 78 mr r29,r3 <== NOT EXECUTED
ffc0cdf8: 7c 9e 23 78 mr r30,r4 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
ffc0cdfc: 48 00 e6 f5 bl ffc1b4f0 <__udivdi3> <== NOT EXECUTED
ffc0ce00: 90 9f 00 00 stw r4,0(r31) <== NOT EXECUTED
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
ffc0ce04: 3c c0 3b 9a lis r6,15258 <== NOT EXECUTED
ffc0ce08: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0ce0c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc0ce10: 38 a0 00 00 li r5,0 <== NOT EXECUTED
ffc0ce14: 60 c6 ca 00 ori r6,r6,51712 <== NOT EXECUTED
ffc0ce18: 48 00 ea cd bl ffc1b8e4 <__umoddi3> <== NOT EXECUTED
}
ffc0ce1c: 39 61 00 18 addi r11,r1,24 <== NOT EXECUTED
/*
* Put it back in the timespec result
*/
result->tv_sec = t / TOD_NANOSECONDS_PER_SECOND;
result->tv_nsec = t % TOD_NANOSECONDS_PER_SECOND;
ffc0ce20: 90 9f 00 04 stw r4,4(r31) <== NOT EXECUTED
}
ffc0ce24: 4b ff 43 d0 b ffc011f4 <_restgpr_29_x> <== NOT EXECUTED
ffc0ce64 <_Timespec_Less_than>:
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ce64: 81 63 00 00 lwz r11,0(r3)
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
ffc0ce68: 7c 69 1b 78 mr r9,r3
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ce6c: 80 04 00 00 lwz r0,0(r4)
return true;
ffc0ce70: 38 60 00 01 li r3,1
bool _Timespec_Less_than(
const struct timespec *lhs,
const struct timespec *rhs
)
{
if ( lhs->tv_sec < rhs->tv_sec )
ffc0ce74: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0ce78: 4d 9c 00 20 bltlr cr7
return true;
if ( lhs->tv_sec > rhs->tv_sec )
ffc0ce7c: 41 9d 00 1c bgt- cr7,ffc0ce98 <_Timespec_Less_than+0x34><== NEVER TAKEN
#include <rtems/system.h>
#include <rtems/score/timespec.h>
#include <rtems/score/tod.h>
bool _Timespec_Less_than(
ffc0ce80: 81 29 00 04 lwz r9,4(r9)
ffc0ce84: 80 04 00 04 lwz r0,4(r4)
ffc0ce88: 7f 89 00 00 cmpw cr7,r9,r0
ffc0ce8c: 7c 60 00 26 mfcr r3
ffc0ce90: 54 63 ef fe rlwinm r3,r3,29,31,31
ffc0ce94: 4e 80 00 20 blr
{
if ( lhs->tv_sec < rhs->tv_sec )
return true;
if ( lhs->tv_sec > rhs->tv_sec )
return false;
ffc0ce98: 38 60 00 00 li r3,0 <== NOT EXECUTED
/* ASSERT: lhs->tv_sec == rhs->tv_sec */
if ( lhs->tv_nsec < rhs->tv_nsec )
return true;
return false;
}
ffc0ce9c: 4e 80 00 20 blr <== NOT EXECUTED
ffc0b518 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0b518: 94 21 ff e8 stwu r1,-24(r1)
ffc0b51c: 7c 08 02 a6 mflr r0
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
ffc0b520: 3d 20 00 00 lis r9,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0b524: 90 01 00 1c stw r0,28(r1)
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
ffc0b528: 39 29 20 04 addi r9,r9,8196
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b52c: 3d 60 00 00 lis r11,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0b530: bf 81 00 08 stmw r28,8(r1)
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
initial_extensions = Configuration.User_extension_table;
ffc0b534: 83 a9 00 3c lwz r29,60(r9)
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
ffc0b538: 83 c9 00 38 lwz r30,56(r9)
ffc0b53c: 39 2b 2d 74 addi r9,r11,11636
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
ffc0b540: 2f 9d 00 00 cmpwi cr7,r29,0
head->previous = NULL;
tail->previous = head;
ffc0b544: 91 29 00 08 stw r9,8(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b548: 38 09 00 04 addi r0,r9,4
ffc0b54c: 90 0b 2d 74 stw r0,11636(r11)
head->previous = NULL;
ffc0b550: 38 00 00 00 li r0,0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b554: 3d 60 00 00 lis r11,0
head->previous = NULL;
ffc0b558: 90 09 00 04 stw r0,4(r9)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0b55c: 39 2b 2c 50 addi r9,r11,11344
ffc0b560: 39 49 00 04 addi r10,r9,4
ffc0b564: 91 4b 2c 50 stw r10,11344(r11)
head->previous = NULL;
ffc0b568: 90 09 00 04 stw r0,4(r9)
tail->previous = head;
ffc0b56c: 91 29 00 08 stw r9,8(r9)
ffc0b570: 41 9e 00 54 beq- cr7,ffc0b5c4 <_User_extensions_Handler_initialization+0xac><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
ffc0b574: 1f 9e 00 34 mulli r28,r30,52
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
ffc0b578: 7f 83 e3 78 mr r3,r28
ffc0b57c: 48 00 06 51 bl ffc0bbcc <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0b580: 7f 85 e3 78 mr r5,r28
ffc0b584: 38 80 00 00 li r4,0
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
ffc0b588: 7c 7f 1b 78 mr r31,r3
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0b58c: 48 00 54 31 bl ffc109bc <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0b590: 3b 80 00 00 li r28,0
ffc0b594: 48 00 00 28 b ffc0b5bc <_User_extensions_Handler_initialization+0xa4>
#include <rtems/config.h>
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
ffc0b598: 57 83 28 34 rlwinm r3,r28,5,0,26
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
ffc0b59c: 38 9f 00 14 addi r4,r31,20
ffc0b5a0: 7c 7d 1a 14 add r3,r29,r3
ffc0b5a4: 7c a3 04 aa lswi r5,r3,32
ffc0b5a8: 7c a4 05 aa stswi r5,r4,32
_User_extensions_Add_set( extension );
ffc0b5ac: 7f e3 fb 78 mr r3,r31
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0b5b0: 3b 9c 00 01 addi r28,r28,1
ffc0b5b4: 48 00 2d 85 bl ffc0e338 <_User_extensions_Add_set>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
ffc0b5b8: 3b ff 00 34 addi r31,r31,52
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0b5bc: 7f 9c f0 00 cmpw cr7,r28,r30
ffc0b5c0: 40 9e ff d8 bne+ cr7,ffc0b598 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
ffc0b5c4: 39 61 00 18 addi r11,r1,24
ffc0b5c8: 4b ff 4f 60 b ffc00528 <_restgpr_28_x>
ffc0d268 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0d268: 94 21 ff e8 stwu r1,-24(r1)
ffc0d26c: 7c 08 02 a6 mflr r0
ffc0d270: 90 01 00 1c stw r0,28(r1)
ffc0d274: bf 81 00 08 stmw r28,8(r1)
ffc0d278: 7c 7f 1b 78 mr r31,r3
ffc0d27c: 7c be 2b 78 mr r30,r5
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d280: 7c 00 00 a6 mfmsr r0
ffc0d284: 7d 30 42 a6 mfsprg r9,0
ffc0d288: 7c 09 48 78 andc r9,r0,r9
ffc0d28c: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0d290: 81 23 00 00 lwz r9,0(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0d294: 3b a3 00 04 addi r29,r3,4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
ffc0d298: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0d29c: 41 9e 00 78 beq- cr7,ffc0d314 <_Watchdog_Adjust+0xac>
switch ( direction ) {
ffc0d2a0: 2f 84 00 00 cmpwi cr7,r4,0
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0d2a4: 3b 80 00 01 li r28,1
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
ffc0d2a8: 41 9e 00 64 beq- cr7,ffc0d30c <_Watchdog_Adjust+0xa4>
ffc0d2ac: 2f 84 00 01 cmpwi cr7,r4,1
ffc0d2b0: 40 be 00 64 bne+ cr7,ffc0d314 <_Watchdog_Adjust+0xac> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0d2b4: 81 69 00 10 lwz r11,16(r9)
ffc0d2b8: 7f cb 2a 14 add r30,r11,r5
ffc0d2bc: 48 00 00 18 b ffc0d2d4 <_Watchdog_Adjust+0x6c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d2c0: 81 3f 00 00 lwz r9,0(r31)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0d2c4: 81 69 00 10 lwz r11,16(r9)
ffc0d2c8: 7f 9e 58 40 cmplw cr7,r30,r11
ffc0d2cc: 40 bc 00 10 bge+ cr7,ffc0d2dc <_Watchdog_Adjust+0x74>
_Watchdog_First( header )->delta_interval -= units;
ffc0d2d0: 7f de 58 50 subf r30,r30,r11
ffc0d2d4: 93 c9 00 10 stw r30,16(r9)
break;
ffc0d2d8: 48 00 00 3c b ffc0d314 <_Watchdog_Adjust+0xac>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0d2dc: 93 89 00 10 stw r28,16(r9)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
ffc0d2e0: 7f cb f0 50 subf r30,r11,r30
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d2e4: 7c 00 01 24 mtmsr r0
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0d2e8: 7f e3 fb 78 mr r3,r31
ffc0d2ec: 48 00 02 35 bl ffc0d520 <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d2f0: 7c 00 00 a6 mfmsr r0
ffc0d2f4: 7d 30 42 a6 mfsprg r9,0
ffc0d2f8: 7c 09 48 78 andc r9,r0,r9
ffc0d2fc: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0d300: 81 3f 00 00 lwz r9,0(r31)
ffc0d304: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0d308: 41 9e 00 0c beq- cr7,ffc0d314 <_Watchdog_Adjust+0xac>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0d30c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0d310: 40 9e ff b0 bne+ cr7,ffc0d2c0 <_Watchdog_Adjust+0x58> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d314: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0d318: 39 61 00 18 addi r11,r1,24
ffc0d31c: 4b ff 40 14 b ffc01330 <_restgpr_28_x>
ffc0b9ac <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
ffc0b9ac: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b9b0: 7c 00 00 a6 mfmsr r0
ffc0b9b4: 7d 70 42 a6 mfsprg r11,0
ffc0b9b8: 7c 0b 58 78 andc r11,r0,r11
ffc0b9bc: 7d 60 01 24 mtmsr r11
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0b9c0: 80 63 00 08 lwz r3,8(r3)
switch ( previous_state ) {
ffc0b9c4: 2f 83 00 01 cmpwi cr7,r3,1
ffc0b9c8: 41 9e 00 18 beq- cr7,ffc0b9e0 <_Watchdog_Remove+0x34>
ffc0b9cc: 2b 83 00 01 cmplwi cr7,r3,1
ffc0b9d0: 41 9c 00 70 blt- cr7,ffc0ba40 <_Watchdog_Remove+0x94>
ffc0b9d4: 2b 83 00 03 cmplwi cr7,r3,3
ffc0b9d8: 41 9d 00 68 bgt- cr7,ffc0ba40 <_Watchdog_Remove+0x94> <== NEVER TAKEN
ffc0b9dc: 48 00 00 10 b ffc0b9ec <_Watchdog_Remove+0x40>
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0b9e0: 39 60 00 00 li r11,0
ffc0b9e4: 91 69 00 08 stw r11,8(r9)
break;
ffc0b9e8: 48 00 00 58 b ffc0ba40 <_Watchdog_Remove+0x94>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0b9ec: 39 60 00 00 li r11,0
ffc0b9f0: 91 69 00 08 stw r11,8(r9)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
ffc0b9f4: 81 69 00 00 lwz r11,0(r9)
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0b9f8: 81 4b 00 00 lwz r10,0(r11)
ffc0b9fc: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ba00: 41 9e 00 14 beq- cr7,ffc0ba14 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0ba04: 81 0b 00 10 lwz r8,16(r11)
ffc0ba08: 81 49 00 10 lwz r10,16(r9)
ffc0ba0c: 7d 48 52 14 add r10,r8,r10
ffc0ba10: 91 4b 00 10 stw r10,16(r11)
if ( _Watchdog_Sync_count )
ffc0ba14: 3d 40 00 00 lis r10,0
ffc0ba18: 81 4a 27 f8 lwz r10,10232(r10)
ffc0ba1c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ba20: 41 9e 00 14 beq- cr7,ffc0ba34 <_Watchdog_Remove+0x88>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0ba24: 3d 40 00 00 lis r10,0
ffc0ba28: 81 0a 2d c0 lwz r8,11712(r10)
ffc0ba2c: 3d 40 00 00 lis r10,0
ffc0ba30: 91 0a 27 f0 stw r8,10224(r10)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0ba34: 81 49 00 04 lwz r10,4(r9)
next->previous = previous;
ffc0ba38: 91 4b 00 04 stw r10,4(r11)
previous->next = next;
ffc0ba3c: 91 6a 00 00 stw r11,0(r10)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0ba40: 3d 60 00 00 lis r11,0
ffc0ba44: 81 6b 27 fc lwz r11,10236(r11)
ffc0ba48: 91 69 00 18 stw r11,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ba4c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
return( previous_state );
}
ffc0ba50: 4e 80 00 20 blr
ffc088e8 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
ffc088e8: 94 21 ff d0 stwu r1,-48(r1)
ffc088ec: 7c 08 02 a6 mflr r0
ffc088f0: bf 61 00 1c stmw r27,28(r1)
ffc088f4: 7c 7b 1b 78 mr r27,r3
ffc088f8: 7c 9c 23 78 mr r28,r4
ffc088fc: 90 01 00 34 stw r0,52(r1)
ffc08900: 7c bd 2b 78 mr r29,r5
ffc08904: 7c df 33 78 mr r31,r6
ffc08908: 48 00 00 20 b ffc08928 <rtems_chain_get_with_wait+0x40>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc0890c: 7f 83 e3 78 mr r3,r28
ffc08910: 38 80 00 00 li r4,0
ffc08914: 7f a5 eb 78 mr r5,r29
ffc08918: 38 c1 00 08 addi r6,r1,8
ffc0891c: 4b ff f2 bd bl ffc07bd8 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
ffc08920: 2c 03 00 00 cmpwi r3,0
ffc08924: 40 82 00 18 bne- ffc0893c <rtems_chain_get_with_wait+0x54><== ALWAYS TAKEN
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc08928: 7f 63 db 78 mr r3,r27
ffc0892c: 48 00 06 29 bl ffc08f54 <_Chain_Get>
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc08930: 7c 7e 1b 79 mr. r30,r3
ffc08934: 41 82 ff d8 beq+ ffc0890c <rtems_chain_get_with_wait+0x24>
ffc08938: 38 60 00 00 li r3,0
}
*node_ptr = node;
return sc;
}
ffc0893c: 39 61 00 30 addi r11,r1,48
timeout,
&out
);
}
*node_ptr = node;
ffc08940: 93 df 00 00 stw r30,0(r31)
return sc;
}
ffc08944: 48 00 c4 5c b ffc14da0 <_restgpr_27_x>
ffc0ad48 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0ad48: 94 21 ff e0 stwu r1,-32(r1)
ffc0ad4c: 7c 08 02 a6 mflr r0
ffc0ad50: bf 61 00 0c stmw r27,12(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0ad54: 7c 7b 1b 79 mr. r27,r3
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0ad58: 90 01 00 24 stw r0,36(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0ad5c: 41 82 00 64 beq- ffc0adc0 <rtems_iterate_over_all_threads+0x78><== NEVER TAKEN
ffc0ad60: 3f e0 00 00 lis r31,0
ffc0ad64: 3b ff 30 00 addi r31,r31,12288
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0ad68: 3b 9f 00 0c addi r28,r31,12
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
ffc0ad6c: 85 3f 00 04 lwzu r9,4(r31)
ffc0ad70: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ad74: 41 9e 00 44 beq- cr7,ffc0adb8 <rtems_iterate_over_all_threads+0x70>
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0ad78: 83 a9 00 04 lwz r29,4(r9)
if ( !information )
ffc0ad7c: 3b c0 00 01 li r30,1
ffc0ad80: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0ad84: 40 be 00 28 bne+ cr7,ffc0adac <rtems_iterate_over_all_threads+0x64>
ffc0ad88: 48 00 00 30 b ffc0adb8 <rtems_iterate_over_all_threads+0x70>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0ad8c: 81 3d 00 1c lwz r9,28(r29)
ffc0ad90: 57 c0 10 3a rlwinm r0,r30,2,0,29
ffc0ad94: 7c 69 00 2e lwzx r3,r9,r0
if ( !the_thread )
ffc0ad98: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ad9c: 41 9e 00 0c beq- cr7,ffc0ada8 <rtems_iterate_over_all_threads+0x60>
continue;
(*routine)(the_thread);
ffc0ada0: 7f 69 03 a6 mtctr r27
ffc0ada4: 4e 80 04 21 bctrl
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0ada8: 3b de 00 01 addi r30,r30,1
ffc0adac: a0 1d 00 10 lhz r0,16(r29)
ffc0adb0: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0adb4: 40 9d ff d8 ble+ cr7,ffc0ad8c <rtems_iterate_over_all_threads+0x44>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0adb8: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0adbc: 40 9e ff b0 bne+ cr7,ffc0ad6c <rtems_iterate_over_all_threads+0x24>
(*routine)(the_thread);
}
}
}
ffc0adc0: 39 61 00 20 addi r11,r1,32
ffc0adc4: 4b ff 65 68 b ffc0132c <_restgpr_27_x>
ffc16494 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc16494: 94 21 ff d0 stwu r1,-48(r1)
ffc16498: 7c 08 02 a6 mflr r0
ffc1649c: bf 21 00 14 stmw r25,20(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc164a0: 7c 7b 1b 79 mr. r27,r3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc164a4: 7c bf 2b 78 mr r31,r5
ffc164a8: 90 01 00 34 stw r0,52(r1)
ffc164ac: 7c fa 3b 78 mr r26,r7
ffc164b0: 7d 1d 43 78 mr r29,r8
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
ffc164b4: 38 00 00 03 li r0,3
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc164b8: 41 a2 00 d0 beq+ ffc16588 <rtems_partition_create+0xf4>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc164bc: 2f 84 00 00 cmpwi cr7,r4,0
return RTEMS_INVALID_ADDRESS;
ffc164c0: 38 00 00 09 li r0,9
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc164c4: 41 9e 00 c4 beq- cr7,ffc16588 <rtems_partition_create+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc164c8: 2f 88 00 00 cmpwi cr7,r8,0
ffc164cc: 41 9e 00 bc beq- cr7,ffc16588 <rtems_partition_create+0xf4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc164d0: 2f 85 00 00 cmpwi cr7,r5,0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
ffc164d4: 38 00 00 08 li r0,8
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc164d8: 41 be 00 b0 beq+ cr7,ffc16588 <rtems_partition_create+0xf4>
ffc164dc: 2f 86 00 00 cmpwi cr7,r6,0
ffc164e0: 41 be 00 a8 beq+ cr7,ffc16588 <rtems_partition_create+0xf4>
ffc164e4: 7f 85 30 40 cmplw cr7,r5,r6
ffc164e8: 41 bc 00 a0 blt+ cr7,ffc16588 <rtems_partition_create+0xf4>
ffc164ec: 70 c9 00 07 andi. r9,r6,7
ffc164f0: 40 a2 00 98 bne+ ffc16588 <rtems_partition_create+0xf4>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc164f4: 70 99 00 07 andi. r25,r4,7
return RTEMS_INVALID_ADDRESS;
ffc164f8: 38 00 00 09 li r0,9
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc164fc: 40 a2 00 8c bne+ ffc16588 <rtems_partition_create+0xf4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc16500: 3d 20 00 00 lis r9,0
ffc16504: 81 69 28 9c lwz r11,10396(r9)
ffc16508: 38 0b 00 01 addi r0,r11,1
ffc1650c: 90 09 28 9c stw r0,10396(r9)
return _Thread_Dispatch_disable_level;
ffc16510: 80 09 28 9c lwz r0,10396(r9)
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
ffc16514: 3f 80 00 00 lis r28,0
ffc16518: 90 81 00 08 stw r4,8(r1)
ffc1651c: 3b 9c 6e c0 addi r28,r28,28352
ffc16520: 7f 83 e3 78 mr r3,r28
ffc16524: 90 c1 00 0c stw r6,12(r1)
ffc16528: 48 00 4d 99 bl ffc1b2c0 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc1652c: 7c 7e 1b 79 mr. r30,r3
ffc16530: 80 81 00 08 lwz r4,8(r1)
ffc16534: 80 c1 00 0c lwz r6,12(r1)
ffc16538: 40 a2 00 10 bne+ ffc16548 <rtems_partition_create+0xb4>
_Thread_Enable_dispatch();
ffc1653c: 48 00 61 1d bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
ffc16540: 38 00 00 05 li r0,5
ffc16544: 48 00 00 44 b ffc16588 <rtems_partition_create+0xf4>
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc16548: 7c bf 33 96 divwu r5,r31,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc1654c: 90 9e 00 10 stw r4,16(r30)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc16550: 90 de 00 18 stw r6,24(r30)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc16554: 93 fe 00 14 stw r31,20(r30)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
ffc16558: 93 5e 00 1c stw r26,28(r30)
the_partition->number_of_used_blocks = 0;
ffc1655c: 93 3e 00 20 stw r25,32(r30)
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc16560: 38 7e 00 24 addi r3,r30,36
ffc16564: 48 00 35 05 bl ffc19a68 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc16568: 80 1e 00 08 lwz r0,8(r30)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc1656c: 81 7c 00 1c lwz r11,28(r28)
ffc16570: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc16574: 7f cb 49 2e stwx r30,r11,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc16578: 93 7e 00 0c stw r27,12(r30)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc1657c: 90 1d 00 00 stw r0,0(r29)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc16580: 48 00 60 d9 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc16584: 38 00 00 00 li r0,0
}
ffc16588: 39 61 00 30 addi r11,r1,48
ffc1658c: 7c 03 03 78 mr r3,r0
ffc16590: 4b ff 7b e8 b ffc0e178 <_restgpr_25_x>
ffc166e0 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
ffc166e0: 94 21 ff e0 stwu r1,-32(r1)
ffc166e4: 7c 08 02 a6 mflr r0
ffc166e8: 90 01 00 24 stw r0,36(r1)
ffc166ec: 7c 60 1b 78 mr r0,r3
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
ffc166f0: 3c 60 00 00 lis r3,0
ffc166f4: bf c1 00 18 stmw r30,24(r1)
ffc166f8: 38 63 6e c0 addi r3,r3,28352
ffc166fc: 7c 9f 23 78 mr r31,r4
ffc16700: 38 a1 00 08 addi r5,r1,8
ffc16704: 7c 04 03 78 mr r4,r0
ffc16708: 48 00 51 19 bl ffc1b820 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc1670c: 80 01 00 08 lwz r0,8(r1)
ffc16710: 7c 7e 1b 78 mr r30,r3
ffc16714: 2f 80 00 00 cmpwi cr7,r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc16718: 38 60 00 04 li r3,4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc1671c: 40 9e 00 58 bne- cr7,ffc16774 <rtems_partition_return_buffer+0x94>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
ffc16720: 80 1e 00 10 lwz r0,16(r30)
ending = _Addresses_Add_offset( starting, the_partition->length );
ffc16724: 81 3e 00 14 lwz r9,20(r30)
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc16728: 7f 9f 00 40 cmplw cr7,r31,r0
ffc1672c: 41 9c 00 50 blt- cr7,ffc1677c <rtems_partition_return_buffer+0x9c>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc16730: 7d 20 4a 14 add r9,r0,r9
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc16734: 7f 9f 48 40 cmplw cr7,r31,r9
ffc16738: 41 9d 00 44 bgt- cr7,ffc1677c <rtems_partition_return_buffer+0x9c><== NEVER TAKEN
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
ffc1673c: 81 3e 00 18 lwz r9,24(r30)
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
ffc16740: 7c 00 f8 50 subf r0,r0,r31
ffc16744: 7d 60 4b 96 divwu r11,r0,r9
ffc16748: 7d 2b 49 d6 mullw r9,r11,r9
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
ffc1674c: 7f 80 48 00 cmpw cr7,r0,r9
ffc16750: 40 9e 00 2c bne- cr7,ffc1677c <rtems_partition_return_buffer+0x9c>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
ffc16754: 38 7e 00 24 addi r3,r30,36
ffc16758: 7f e4 fb 78 mr r4,r31
ffc1675c: 48 00 32 75 bl ffc199d0 <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
ffc16760: 81 3e 00 20 lwz r9,32(r30)
ffc16764: 38 09 ff ff addi r0,r9,-1
ffc16768: 90 1e 00 20 stw r0,32(r30)
_Thread_Enable_dispatch();
ffc1676c: 48 00 5e ed bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc16770: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc16774: 39 61 00 20 addi r11,r1,32
ffc16778: 4b ff 7a 14 b ffc0e18c <_restgpr_30_x>
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
ffc1677c: 48 00 5e dd bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc16780: 38 60 00 09 li r3,9
ffc16784: 4b ff ff f0 b ffc16774 <rtems_partition_return_buffer+0x94>
ffc0f000 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
ffc0f000: 7c 2b 0b 78 mr r11,r1
ffc0f004: 94 21 ff e0 stwu r1,-32(r1)
ffc0f008: 7c 08 02 a6 mflr r0
ffc0f00c: 48 00 cc e1 bl ffc1bcec <_savegpr_31>
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
ffc0f010: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_rate_monotonic_get_statistics(
rtems_id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
ffc0f014: 90 01 00 24 stw r0,36(r1)
ffc0f018: 7c 60 1b 78 mr r0,r3
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
return RTEMS_INVALID_ADDRESS;
ffc0f01c: 38 60 00 09 li r3,9
Objects_Locations location;
Rate_monotonic_Control *the_period;
rtems_rate_monotonic_period_statistics *dst;
Rate_monotonic_Statistics *src;
if ( !statistics )
ffc0f020: 41 82 00 a4 beq- ffc0f0c4 <rtems_rate_monotonic_get_statistics+0xc4><== ALWAYS TAKEN
ffc0f024: 3c 60 00 00 lis r3,0 <== NOT EXECUTED
ffc0f028: 7c 04 03 78 mr r4,r0 <== NOT EXECUTED
ffc0f02c: 38 63 2c 00 addi r3,r3,11264 <== NOT EXECUTED
ffc0f030: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc0f034: 4b ff c3 75 bl ffc0b3a8 <_Objects_Get> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc0f038: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED
ffc0f03c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0f040: 40 9e 00 80 bne- cr7,ffc0f0c0 <rtems_rate_monotonic_get_statistics+0xc0><== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
ffc0f044: 80 03 00 54 lwz r0,84(r3) <== NOT EXECUTED
dst->missed_count = src->missed_count;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
ffc0f048: 81 43 00 5c lwz r10,92(r3) <== NOT EXECUTED
ffc0f04c: 81 63 00 60 lwz r11,96(r3) <== NOT EXECUTED
switch ( location ) {
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
ffc0f050: 90 1f 00 00 stw r0,0(r31) <== NOT EXECUTED
dst->missed_count = src->missed_count;
ffc0f054: 80 03 00 58 lwz r0,88(r3) <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
ffc0f058: 91 5f 00 08 stw r10,8(r31) <== NOT EXECUTED
ffc0f05c: 91 7f 00 0c stw r11,12(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
ffc0f060: 81 43 00 64 lwz r10,100(r3) <== NOT EXECUTED
ffc0f064: 81 63 00 68 lwz r11,104(r3) <== NOT EXECUTED
ffc0f068: 91 5f 00 10 stw r10,16(r31) <== NOT EXECUTED
ffc0f06c: 91 7f 00 14 stw r11,20(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
ffc0f070: 81 43 00 6c lwz r10,108(r3) <== NOT EXECUTED
ffc0f074: 81 63 00 70 lwz r11,112(r3) <== NOT EXECUTED
ffc0f078: 91 5f 00 18 stw r10,24(r31) <== NOT EXECUTED
ffc0f07c: 91 7f 00 1c stw r11,28(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
ffc0f080: 81 43 00 74 lwz r10,116(r3) <== NOT EXECUTED
ffc0f084: 81 63 00 78 lwz r11,120(r3) <== NOT EXECUTED
ffc0f088: 91 5f 00 20 stw r10,32(r31) <== NOT EXECUTED
ffc0f08c: 91 7f 00 24 stw r11,36(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
ffc0f090: 81 43 00 7c lwz r10,124(r3) <== NOT EXECUTED
ffc0f094: 81 63 00 80 lwz r11,128(r3) <== NOT EXECUTED
ffc0f098: 91 5f 00 28 stw r10,40(r31) <== NOT EXECUTED
ffc0f09c: 91 7f 00 2c stw r11,44(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
ffc0f0a0: 81 43 00 84 lwz r10,132(r3) <== NOT EXECUTED
ffc0f0a4: 81 63 00 88 lwz r11,136(r3) <== NOT EXECUTED
case OBJECTS_LOCAL:
dst = statistics;
src = &the_period->Statistics;
dst->count = src->count;
dst->missed_count = src->missed_count;
ffc0f0a8: 90 1f 00 04 stw r0,4(r31) <== NOT EXECUTED
_Timestamp_To_timespec( &src->min_cpu_time, &dst->min_cpu_time );
_Timestamp_To_timespec( &src->max_cpu_time, &dst->max_cpu_time );
_Timestamp_To_timespec( &src->total_cpu_time, &dst->total_cpu_time );
_Timestamp_To_timespec( &src->min_wall_time, &dst->min_wall_time );
_Timestamp_To_timespec( &src->max_wall_time, &dst->max_wall_time );
_Timestamp_To_timespec( &src->total_wall_time, &dst->total_wall_time );
ffc0f0ac: 91 5f 00 30 stw r10,48(r31) <== NOT EXECUTED
ffc0f0b0: 91 7f 00 34 stw r11,52(r31) <== NOT EXECUTED
dst->min_wall_time = src->min_wall_time;
dst->max_wall_time = src->max_wall_time;
dst->total_wall_time = src->total_wall_time;
#endif
_Thread_Enable_dispatch();
ffc0f0b4: 4b ff d1 2d bl ffc0c1e0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
ffc0f0b8: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc0f0bc: 48 00 00 08 b ffc0f0c4 <rtems_rate_monotonic_get_statistics+0xc4><== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0f0c0: 38 60 00 04 li r3,4 <== NOT EXECUTED
}
ffc0f0c4: 39 61 00 20 addi r11,r1,32
ffc0f0c8: 4b ff 21 34 b ffc011fc <_restgpr_31_x>
ffc08dc0 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc08dc0: 94 21 ff d8 stwu r1,-40(r1)
ffc08dc4: 7c 08 02 a6 mflr r0
ffc08dc8: bf 81 00 18 stmw r28,24(r1)
ffc08dcc: 7c 7e 1b 78 mr r30,r3
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
ffc08dd0: 3c 60 00 00 lis r3,0
ffc08dd4: 7c 9f 23 78 mr r31,r4
ffc08dd8: 90 01 00 2c stw r0,44(r1)
ffc08ddc: 38 63 2c 00 addi r3,r3,11264
ffc08de0: 7f c4 f3 78 mr r4,r30
ffc08de4: 38 a1 00 08 addi r5,r1,8
ffc08de8: 48 00 25 c1 bl ffc0b3a8 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc08dec: 80 01 00 08 lwz r0,8(r1)
ffc08df0: 7c 7d 1b 78 mr r29,r3
ffc08df4: 2f 80 00 00 cmpwi cr7,r0,0
ffc08df8: 40 9e 01 70 bne- cr7,ffc08f68 <rtems_rate_monotonic_period+0x1a8>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc08dfc: 3d 60 00 00 lis r11,0
ffc08e00: 81 23 00 40 lwz r9,64(r3)
ffc08e04: 80 0b 2e a4 lwz r0,11940(r11)
ffc08e08: 7f 89 00 00 cmpw cr7,r9,r0
ffc08e0c: 41 9e 00 10 beq- cr7,ffc08e1c <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
ffc08e10: 48 00 33 d1 bl ffc0c1e0 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc08e14: 3b c0 00 17 li r30,23
ffc08e18: 48 00 01 54 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc08e1c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc08e20: 40 9e 00 28 bne- cr7,ffc08e48 <rtems_rate_monotonic_period+0x88>
switch ( the_period->state ) {
ffc08e24: 80 03 00 38 lwz r0,56(r3)
ffc08e28: 3b c0 00 00 li r30,0
ffc08e2c: 2b 80 00 04 cmplwi cr7,r0,4
ffc08e30: 41 9d 00 10 bgt- cr7,ffc08e40 <rtems_rate_monotonic_period+0x80><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc08e34: 3d 20 ff c2 lis r9,-62
ffc08e38: 39 29 df 48 addi r9,r9,-8376
ffc08e3c: 7f c9 00 ae lbzx r30,r9,r0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
ffc08e40: 48 00 33 a1 bl ffc0c1e0 <_Thread_Enable_dispatch>
return( return_value );
ffc08e44: 48 00 01 28 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08e48: 7f 80 00 a6 mfmsr r28
ffc08e4c: 7c 10 42 a6 mfsprg r0,0
ffc08e50: 7f 80 00 78 andc r0,r28,r0
ffc08e54: 7c 00 01 24 mtmsr r0
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
ffc08e58: 80 03 00 38 lwz r0,56(r3)
ffc08e5c: 2f 80 00 00 cmpwi cr7,r0,0
ffc08e60: 40 be 00 4c bne+ cr7,ffc08eac <rtems_rate_monotonic_period+0xec>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08e64: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc08e68: 4b ff fd dd bl ffc08c44 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08e6c: 38 00 00 02 li r0,2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc08e70: 3d 20 ff c1 lis r9,-63
ffc08e74: 90 1d 00 38 stw r0,56(r29)
ffc08e78: 39 29 92 60 addi r9,r9,-28064
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc08e7c: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc08e80: 91 3d 00 2c stw r9,44(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08e84: 3c 60 00 00 lis r3,0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc08e88: 90 1d 00 18 stw r0,24(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08e8c: 38 63 2d c8 addi r3,r3,11720
ffc08e90: 38 9d 00 10 addi r4,r29,16
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc08e94: 93 dd 00 30 stw r30,48(r29)
the_watchdog->user_data = user_data;
ffc08e98: 90 1d 00 34 stw r0,52(r29)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
ffc08e9c: 93 fd 00 3c stw r31,60(r29)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc08ea0: 93 fd 00 1c stw r31,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08ea4: 48 00 43 79 bl ffc0d21c <_Watchdog_Insert>
ffc08ea8: 48 00 00 74 b ffc08f1c <rtems_rate_monotonic_period+0x15c>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
ffc08eac: 2f 80 00 02 cmpwi cr7,r0,2
ffc08eb0: 40 be 00 78 bne+ cr7,ffc08f28 <rtems_rate_monotonic_period+0x168>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc08eb4: 4b ff fe 09 bl ffc08cbc <_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;
ffc08eb8: 38 00 00 01 li r0,1
ffc08ebc: 90 1d 00 38 stw r0,56(r29)
the_period->next_length = length;
ffc08ec0: 93 fd 00 3c stw r31,60(r29)
ffc08ec4: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc08ec8: 3d 20 00 00 lis r9,0
ffc08ecc: 80 1d 00 08 lwz r0,8(r29)
ffc08ed0: 80 69 2e a4 lwz r3,11940(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc08ed4: 38 80 40 00 li r4,16384
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc08ed8: 90 03 00 20 stw r0,32(r3)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc08edc: 48 00 3c 41 bl ffc0cb1c <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08ee0: 7d 20 00 a6 mfmsr r9
ffc08ee4: 7c 10 42 a6 mfsprg r0,0
ffc08ee8: 7d 20 00 78 andc r0,r9,r0
ffc08eec: 7c 00 01 24 mtmsr r0
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08ef0: 39 60 00 02 li r11,2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
ffc08ef4: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08ef8: 91 7d 00 38 stw r11,56(r29)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08efc: 7d 20 01 24 mtmsr r9
/*
* 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 )
ffc08f00: 2f 80 00 03 cmpwi cr7,r0,3
ffc08f04: 40 be 00 18 bne+ cr7,ffc08f1c <rtems_rate_monotonic_period+0x15c><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc08f08: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc08f0c: 39 29 2e 98 addi r9,r9,11928 <== NOT EXECUTED
ffc08f10: 80 69 00 0c lwz r3,12(r9) <== NOT EXECUTED
ffc08f14: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc08f18: 48 00 2f 0d bl ffc0be24 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc08f1c: 48 00 32 c5 bl ffc0c1e0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc08f20: 3b c0 00 00 li r30,0
ffc08f24: 48 00 00 48 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc08f28: 2f 80 00 04 cmpwi cr7,r0,4
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc08f2c: 3b c0 00 04 li r30,4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc08f30: 40 be 00 3c bne+ cr7,ffc08f6c <rtems_rate_monotonic_period+0x1ac><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc08f34: 4b ff fd 89 bl ffc08cbc <_Rate_monotonic_Update_statistics>
ffc08f38: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08f3c: 38 00 00 02 li r0,2
the_period->next_length = length;
ffc08f40: 93 fd 00 3c stw r31,60(r29)
ffc08f44: 3c 60 00 00 lis r3,0
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc08f48: 90 1d 00 38 stw r0,56(r29)
ffc08f4c: 38 63 2d c8 addi r3,r3,11720
ffc08f50: 38 9d 00 10 addi r4,r29,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc08f54: 93 fd 00 1c stw r31,28(r29)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
ffc08f58: 3b c0 00 06 li r30,6
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08f5c: 48 00 42 c1 bl ffc0d21c <_Watchdog_Insert>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc08f60: 48 00 32 81 bl ffc0c1e0 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc08f64: 48 00 00 08 b ffc08f6c <rtems_rate_monotonic_period+0x1ac>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc08f68: 3b c0 00 04 li r30,4
}
ffc08f6c: 39 61 00 28 addi r11,r1,40
ffc08f70: 7f c3 f3 78 mr r3,r30
ffc08f74: 4b ff 82 7c b ffc011f0 <_restgpr_28_x>
ffc09180 <rtems_rate_monotonic_report_statistics>:
void rtems_rate_monotonic_report_statistics( void )
{
rtems_rate_monotonic_report_statistics_with_plugin( NULL, printk_plugin );
ffc09180: 3c 80 ff c1 lis r4,-63 <== NOT EXECUTED
ffc09184: 38 60 00 00 li r3,0 <== NOT EXECUTED
ffc09188: 38 84 ee 04 addi r4,r4,-4604 <== NOT EXECUTED
ffc0918c: 4b ff fd ec b ffc08f78 <rtems_rate_monotonic_report_statistics_with_plugin><== NOT EXECUTED
ffc08f78 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc08f78: 94 21 ff 70 stwu r1,-144(r1) <== NOT EXECUTED
ffc08f7c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc08f80: 90 01 00 94 stw r0,148(r1) <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc08f84: 7c 80 23 79 mr. r0,r4 <== NOT EXECUTED
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc08f88: bf 01 00 70 stmw r24,112(r1) <== NOT EXECUTED
ffc08f8c: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc08f90: 90 01 00 68 stw r0,104(r1) <== NOT EXECUTED
ffc08f94: 41 82 01 e4 beq- ffc09178 <rtems_rate_monotonic_report_statistics_with_plugin+0x200><== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
ffc08f98: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc08f9c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc08fa0: 38 84 df 4d addi r4,r4,-8371 <== NOT EXECUTED
/*
* 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 ;
ffc08fa4: 3f 00 00 00 lis r24,0 <== NOT EXECUTED
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc08fa8: 3f 20 ff c2 lis r25,-62 <== NOT EXECUTED
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,
ffc08fac: 3f 40 ff c2 lis r26,-62 <== NOT EXECUTED
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc08fb0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc08fb4: 4e 80 04 21 bctrl <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc08fb8: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc08fbc: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc08fc0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc08fc4: 38 84 df 6b addi r4,r4,-8341 <== NOT EXECUTED
ffc08fc8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
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,
ffc08fcc: 3f 60 ff c2 lis r27,-62 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc08fd0: 3f 80 ff c2 lis r28,-62 <== NOT EXECUTED
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc08fd4: 3b 39 e0 47 addi r25,r25,-8121 <== NOT EXECUTED
if ( !print )
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc08fd8: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc08fdc: 4e 80 04 21 bctrl <== NOT EXECUTED
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc08fe0: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc08fe4: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc08fe8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc08fec: 38 84 df 8d addi r4,r4,-8307 <== NOT EXECUTED
ffc08ff0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
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,
ffc08ff4: 3b 5a e0 5e addi r26,r26,-8098 <== NOT EXECUTED
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,
ffc08ff8: 3b 7b e0 7d addi r27,r27,-8067 <== NOT EXECUTED
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc08ffc: 3b 9c de fa addi r28,r28,-8454 <== NOT EXECUTED
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc09000: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09004: 4e 80 04 21 bctrl <== NOT EXECUTED
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc09008: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc0900c: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc09010: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09014: 38 84 df b0 addi r4,r4,-8272 <== NOT EXECUTED
ffc09018: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0901c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09020: 4e 80 04 21 bctrl <== NOT EXECUTED
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc09024: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc09028: 3c 80 ff c2 lis r4,-62 <== NOT EXECUTED
ffc0902c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09030: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09034: 38 84 df fb addi r4,r4,-8197 <== NOT EXECUTED
ffc09038: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc0903c: 4e 80 04 21 bctrl <== NOT EXECUTED
/*
* 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 ;
ffc09040: 39 38 2c 00 addi r9,r24,11264 <== NOT EXECUTED
ffc09044: 83 c9 00 08 lwz r30,8(r9) <== NOT EXECUTED
ffc09048: 48 00 01 20 b ffc09168 <rtems_rate_monotonic_report_statistics_with_plugin+0x1f0><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc0904c: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc09050: 38 81 00 30 addi r4,r1,48 <== NOT EXECUTED
ffc09054: 48 00 5f ad bl ffc0f000 <rtems_rate_monotonic_get_statistics><== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL )
ffc09058: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc0905c: 40 be 01 08 bne+ cr7,ffc09164 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ec><== NOT EXECUTED
#if defined(RTEMS_DEBUG)
status = rtems_rate_monotonic_get_status( id, &the_status );
if ( status != RTEMS_SUCCESSFUL )
continue;
#else
(void) rtems_rate_monotonic_get_status( id, &the_status );
ffc09060: 38 81 00 18 addi r4,r1,24 <== NOT EXECUTED
ffc09064: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc09068: 48 00 60 65 bl ffc0f0cc <rtems_rate_monotonic_get_status><== NOT EXECUTED
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc0906c: 80 61 00 18 lwz r3,24(r1) <== NOT EXECUTED
ffc09070: 38 80 00 05 li r4,5 <== NOT EXECUTED
ffc09074: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc09078: 48 00 02 ad bl ffc09324 <rtems_object_get_name> <== NOT EXECUTED
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0907c: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc09080: 7f 24 cb 78 mr r4,r25 <== NOT EXECUTED
ffc09084: 80 e1 00 30 lwz r7,48(r1) <== NOT EXECUTED
ffc09088: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0908c: 81 01 00 34 lwz r8,52(r1) <== NOT EXECUTED
ffc09090: 7f c5 f3 78 mr r5,r30 <== NOT EXECUTED
ffc09094: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09098: 38 c1 00 08 addi r6,r1,8 <== NOT EXECUTED
ffc0909c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc090a0: 4e 80 04 21 bctrl <== NOT EXECUTED
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc090a4: 80 81 00 30 lwz r4,48(r1) <== NOT EXECUTED
ffc090a8: 2f 84 00 00 cmpwi cr7,r4,0 <== NOT EXECUTED
ffc090ac: 40 9e 00 20 bne- cr7,ffc090cc <rtems_rate_monotonic_report_statistics_with_plugin+0x154><== NOT EXECUTED
(*print)( context, "\n" );
ffc090b0: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc090b4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc090b8: 7f 84 e3 78 mr r4,r28 <== NOT EXECUTED
ffc090bc: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc090c0: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc090c4: 4e 80 04 21 bctrl <== NOT EXECUTED
continue;
ffc090c8: 48 00 00 9c b ffc09164 <rtems_rate_monotonic_report_statistics_with_plugin+0x1ec><== 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 );
ffc090cc: 38 61 00 48 addi r3,r1,72 <== NOT EXECUTED
ffc090d0: 38 a1 00 10 addi r5,r1,16 <== NOT EXECUTED
ffc090d4: 48 00 3c d1 bl ffc0cda4 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
ffc090d8: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc090dc: 80 c1 00 3c lwz r6,60(r1) <== NOT EXECUTED
ffc090e0: 3b a0 03 e8 li r29,1000 <== NOT EXECUTED
ffc090e4: 81 01 00 44 lwz r8,68(r1) <== NOT EXECUTED
ffc090e8: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc090ec: 81 41 00 14 lwz r10,20(r1) <== NOT EXECUTED
ffc090f0: 7c c6 eb d6 divw r6,r6,r29 <== NOT EXECUTED
ffc090f4: 80 e1 00 40 lwz r7,64(r1) <== NOT EXECUTED
ffc090f8: 81 21 00 10 lwz r9,16(r1) <== NOT EXECUTED
ffc090fc: 80 a1 00 38 lwz r5,56(r1) <== NOT EXECUTED
ffc09100: 7d 08 eb d6 divw r8,r8,r29 <== NOT EXECUTED
ffc09104: 7d 4a eb d6 divw r10,r10,r29 <== NOT EXECUTED
ffc09108: 7f 44 d3 78 mr r4,r26 <== NOT EXECUTED
ffc0910c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09110: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09114: 4e 80 04 21 bctrl <== NOT EXECUTED
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);
ffc09118: 80 81 00 30 lwz r4,48(r1) <== NOT EXECUTED
ffc0911c: 38 61 00 60 addi r3,r1,96 <== NOT EXECUTED
ffc09120: 38 a1 00 10 addi r5,r1,16 <== NOT EXECUTED
ffc09124: 48 00 3c 81 bl ffc0cda4 <_Timespec_Divide_by_integer> <== NOT EXECUTED
(*print)( context,
ffc09128: 80 c1 00 54 lwz r6,84(r1) <== NOT EXECUTED
ffc0912c: 81 01 00 5c lwz r8,92(r1) <== NOT EXECUTED
ffc09130: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09134: 81 41 00 14 lwz r10,20(r1) <== NOT EXECUTED
ffc09138: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc0913c: 80 01 00 68 lwz r0,104(r1) <== NOT EXECUTED
ffc09140: 7c c6 eb d6 divw r6,r6,r29 <== NOT EXECUTED
ffc09144: 80 a1 00 50 lwz r5,80(r1) <== NOT EXECUTED
ffc09148: 80 e1 00 58 lwz r7,88(r1) <== NOT EXECUTED
ffc0914c: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc09150: 81 21 00 10 lwz r9,16(r1) <== NOT EXECUTED
ffc09154: 7d 08 eb d6 divw r8,r8,r29 <== NOT EXECUTED
ffc09158: 7d 4a eb d6 divw r10,r10,r29 <== NOT EXECUTED
ffc0915c: 4c c6 31 82 crclr 4*cr1+eq <== NOT EXECUTED
ffc09160: 4e 80 04 21 bctrl <== NOT EXECUTED
* 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++ ) {
ffc09164: 3b de 00 01 addi r30,r30,1 <== NOT EXECUTED
/*
* 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 ;
ffc09168: 39 38 2c 00 addi r9,r24,11264 <== NOT EXECUTED
/*
* 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 ;
ffc0916c: 80 09 00 0c lwz r0,12(r9) <== NOT EXECUTED
ffc09170: 7f 9e 00 40 cmplw cr7,r30,r0 <== NOT EXECUTED
ffc09174: 40 9d fe d8 ble+ cr7,ffc0904c <rtems_rate_monotonic_report_statistics_with_plugin+0xd4><== NOT EXECUTED
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc09178: 39 61 00 90 addi r11,r1,144 <== NOT EXECUTED
ffc0917c: 4b ff 80 64 b ffc011e0 <_restgpr_24_x> <== NOT EXECUTED
ffc09190 <rtems_rate_monotonic_reset_all_statistics>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc09190: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
ffc09194: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED
ffc09198: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0919c: 81 69 28 08 lwz r11,10248(r9) <== NOT EXECUTED
ffc091a0: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED
ffc091a4: 38 0b 00 01 addi r0,r11,1 <== NOT EXECUTED
ffc091a8: 90 09 28 08 stw r0,10248(r9) <== NOT EXECUTED
ffc091ac: bf c1 00 08 stmw r30,8(r1) <== NOT EXECUTED
return _Thread_Dispatch_disable_level;
ffc091b0: 80 09 28 08 lwz r0,10248(r9) <== NOT EXECUTED
/*
* 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 ;
ffc091b4: 3f c0 00 00 lis r30,0 <== NOT EXECUTED
ffc091b8: 39 3e 2c 00 addi r9,r30,11264 <== NOT EXECUTED
ffc091bc: 83 e9 00 08 lwz r31,8(r9) <== NOT EXECUTED
ffc091c0: 48 00 00 10 b ffc091d0 <rtems_rate_monotonic_reset_all_statistics+0x40><== NOT EXECUTED
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
ffc091c4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc091c8: 48 00 00 25 bl ffc091ec <rtems_rate_monotonic_reset_statistics><== NOT EXECUTED
* 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++ ) {
ffc091cc: 3b ff 00 01 addi r31,r31,1 <== NOT EXECUTED
/*
* 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 ;
ffc091d0: 39 3e 2c 00 addi r9,r30,11264 <== NOT EXECUTED
/*
* 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 ;
ffc091d4: 80 09 00 0c lwz r0,12(r9) <== NOT EXECUTED
ffc091d8: 7f 9f 00 40 cmplw cr7,r31,r0 <== NOT EXECUTED
ffc091dc: 40 9d ff e8 ble+ cr7,ffc091c4 <rtems_rate_monotonic_reset_all_statistics+0x34><== NOT EXECUTED
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
ffc091e0: 48 00 30 01 bl ffc0c1e0 <_Thread_Enable_dispatch> <== NOT EXECUTED
}
ffc091e4: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc091e8: 4b ff 80 10 b ffc011f8 <_restgpr_30_x> <== NOT EXECUTED
ffc091ec <rtems_rate_monotonic_reset_statistics>:
*/
rtems_status_code rtems_rate_monotonic_reset_statistics(
rtems_id id
)
{
ffc091ec: 7c 2b 0b 78 mr r11,r1 <== NOT EXECUTED
ffc091f0: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc091f4: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc091f8: 7c 64 1b 78 mr r4,r3 <== NOT EXECUTED
ffc091fc: 3c 60 00 00 lis r3,0 <== NOT EXECUTED
ffc09200: 48 01 2a ed bl ffc1bcec <_savegpr_31> <== NOT EXECUTED
ffc09204: 38 63 2c 00 addi r3,r3,11264 <== NOT EXECUTED
ffc09208: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
ffc0920c: 38 a1 00 08 addi r5,r1,8 <== NOT EXECUTED
ffc09210: 48 00 21 99 bl ffc0b3a8 <_Objects_Get> <== NOT EXECUTED
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc09214: 80 01 00 08 lwz r0,8(r1) <== NOT EXECUTED
ffc09218: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
ffc0921c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc09220: 38 60 00 04 li r3,4 <== NOT EXECUTED
{
Objects_Locations location;
Rate_monotonic_Control *the_period;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc09224: 40 9e 00 34 bne- cr7,ffc09258 <rtems_rate_monotonic_reset_statistics+0x6c><== NOT EXECUTED
case OBJECTS_LOCAL:
_Rate_monotonic_Reset_statistics( the_period );
ffc09228: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc0922c: 38 a0 00 38 li r5,56 <== NOT EXECUTED
ffc09230: 38 7f 00 54 addi r3,r31,84 <== NOT EXECUTED
ffc09234: 48 00 91 41 bl ffc12374 <memset> <== NOT EXECUTED
ffc09238: 3c 00 7f ff lis r0,32767 <== NOT EXECUTED
ffc0923c: 60 00 ff ff ori r0,r0,65535 <== NOT EXECUTED
ffc09240: 90 1f 00 5c stw r0,92(r31) <== NOT EXECUTED
ffc09244: 90 1f 00 60 stw r0,96(r31) <== NOT EXECUTED
ffc09248: 90 1f 00 74 stw r0,116(r31) <== NOT EXECUTED
ffc0924c: 90 1f 00 78 stw r0,120(r31) <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc09250: 48 00 2f 91 bl ffc0c1e0 <_Thread_Enable_dispatch> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
ffc09254: 38 60 00 00 li r3,0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc09258: 39 61 00 20 addi r11,r1,32 <== NOT EXECUTED
ffc0925c: 4b ff 7f a0 b ffc011fc <_restgpr_31_x> <== NOT EXECUTED
ffc17ba4 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc17ba4: 7c 2b 0b 78 mr r11,r1
ffc17ba8: 94 21 ff e0 stwu r1,-32(r1)
ffc17bac: 7c 08 02 a6 mflr r0
ffc17bb0: 48 01 63 b9 bl ffc2df68 <_savegpr_31>
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc17bb4: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc17bb8: 90 01 00 24 stw r0,36(r1)
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
ffc17bbc: 38 00 00 0a li r0,10
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc17bc0: 41 a2 00 ac beq+ ffc17c6c <rtems_signal_send+0xc8>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc17bc4: 38 81 00 08 addi r4,r1,8
ffc17bc8: 48 00 4a cd bl ffc1c694 <_Thread_Get>
switch ( location ) {
ffc17bcc: 80 01 00 08 lwz r0,8(r1)
ffc17bd0: 2f 80 00 00 cmpwi cr7,r0,0
ffc17bd4: 40 9e 00 94 bne- cr7,ffc17c68 <rtems_signal_send+0xc4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc17bd8: 81 23 01 2c lwz r9,300(r3)
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
ffc17bdc: 80 09 00 0c lwz r0,12(r9)
ffc17be0: 2f 80 00 00 cmpwi cr7,r0,0
ffc17be4: 41 9e 00 78 beq- cr7,ffc17c5c <rtems_signal_send+0xb8>
if ( asr->is_enabled ) {
ffc17be8: 88 09 00 08 lbz r0,8(r9)
ffc17bec: 2f 80 00 00 cmpwi cr7,r0,0
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc17bf0: 7c 00 00 a6 mfmsr r0
ffc17bf4: 7d 70 42 a6 mfsprg r11,0
ffc17bf8: 7c 0b 58 78 andc r11,r0,r11
ffc17bfc: 7d 60 01 24 mtmsr r11
ffc17c00: 41 9e 00 40 beq- cr7,ffc17c40 <rtems_signal_send+0x9c>
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc17c04: 81 69 00 14 lwz r11,20(r9)
ffc17c08: 7d 7f fb 78 or r31,r11,r31
ffc17c0c: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc17c10: 7c 00 01 24 mtmsr r0
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc17c14: 3d 20 00 00 lis r9,0
ffc17c18: 39 29 71 d8 addi r9,r9,29144
ffc17c1c: 80 09 00 08 lwz r0,8(r9)
ffc17c20: 2f 80 00 00 cmpwi cr7,r0,0
ffc17c24: 41 9e 00 2c beq- cr7,ffc17c50 <rtems_signal_send+0xac>
ffc17c28: 80 09 00 0c lwz r0,12(r9)
ffc17c2c: 7f 83 00 00 cmpw cr7,r3,r0
ffc17c30: 40 be 00 20 bne+ cr7,ffc17c50 <rtems_signal_send+0xac> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc17c34: 38 00 00 01 li r0,1
ffc17c38: 98 09 00 18 stb r0,24(r9)
ffc17c3c: 48 00 00 14 b ffc17c50 <rtems_signal_send+0xac>
ffc17c40: 81 69 00 18 lwz r11,24(r9)
ffc17c44: 7d 7f fb 78 or r31,r11,r31
ffc17c48: 93 e9 00 18 stw r31,24(r9)
ffc17c4c: 7c 00 01 24 mtmsr r0
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc17c50: 48 00 4a 09 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc17c54: 38 00 00 00 li r0,0
ffc17c58: 48 00 00 14 b ffc17c6c <rtems_signal_send+0xc8>
}
_Thread_Enable_dispatch();
ffc17c5c: 48 00 49 fd bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
ffc17c60: 38 00 00 0b li r0,11
ffc17c64: 48 00 00 08 b ffc17c6c <rtems_signal_send+0xc8>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc17c68: 38 00 00 04 li r0,4
}
ffc17c6c: 39 61 00 20 addi r11,r1,32
ffc17c70: 7c 03 03 78 mr r3,r0
ffc17c74: 4b ff 65 1c b ffc0e190 <_restgpr_31_x>
ffc0f660 <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc0f660: 2c 05 00 00 cmpwi r5,0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
ffc0f664: 7c 08 02 a6 mflr r0
ffc0f668: 94 21 ff f8 stwu r1,-8(r1)
ffc0f66c: 90 01 00 0c stw r0,12(r1)
ffc0f670: 7c 60 1b 78 mr r0,r3
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
ffc0f674: 38 60 00 09 li r3,9
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc0f678: 41 82 01 88 beq- ffc0f800 <rtems_task_mode+0x1a0>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc0f67c: 3d 20 00 00 lis r9,0
ffc0f680: 81 69 2d c4 lwz r11,11716(r9)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0f684: 81 0b 00 7c lwz r8,124(r11)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc0f688: 89 4b 00 74 lbz r10,116(r11)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0f68c: 2f 88 00 00 cmpwi cr7,r8,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc0f690: 81 2b 01 2c lwz r9,300(r11)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc0f694: 7d 4a 00 34 cntlzw r10,r10
ffc0f698: 55 4a d9 7e rlwinm r10,r10,27,5,31
ffc0f69c: 55 4a 40 2e rlwinm r10,r10,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc0f6a0: 41 9e 00 08 beq- cr7,ffc0f6a8 <rtems_task_mode+0x48>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc0f6a4: 61 4a 02 00 ori r10,r10,512
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc0f6a8: 89 09 00 08 lbz r8,8(r9)
ffc0f6ac: 7d 08 00 34 cntlzw r8,r8
ffc0f6b0: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc0f6b4: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc0f6b8: 7d 08 53 78 or r8,r8,r10
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0f6bc: 39 40 00 00 li r10,0
ffc0f6c0: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc0f6c4: 71 47 80 00 andi. r7,r10,32768
ffc0f6c8: 7c e0 00 26 mfcr r7
ffc0f6cc: 54 e7 1f fe rlwinm r7,r7,3,31,31
old_mode |= _ISR_Get_level();
ffc0f6d0: 7d 0a 3b 78 or r10,r8,r7
*previous_mode_set = old_mode;
ffc0f6d4: 91 45 00 00 stw r10,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc0f6d8: 70 8a 01 00 andi. r10,r4,256
ffc0f6dc: 41 82 00 14 beq- ffc0f6f0 <rtems_task_mode+0x90>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc0f6e0: 70 07 01 00 andi. r7,r0,256
ffc0f6e4: 7d 40 00 26 mfcr r10
ffc0f6e8: 55 4a 1f fe rlwinm r10,r10,3,31,31
ffc0f6ec: 99 4b 00 74 stb r10,116(r11)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc0f6f0: 70 8a 02 00 andi. r10,r4,512
ffc0f6f4: 41 82 00 28 beq- ffc0f71c <rtems_task_mode+0xbc>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc0f6f8: 70 0a 02 00 andi. r10,r0,512
ffc0f6fc: 41 82 00 1c beq- ffc0f718 <rtems_task_mode+0xb8>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc0f700: 39 40 00 01 li r10,1
ffc0f704: 91 4b 00 7c stw r10,124(r11)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0f708: 3d 40 00 00 lis r10,0
ffc0f70c: 81 4a 27 c4 lwz r10,10180(r10)
ffc0f710: 91 4b 00 78 stw r10,120(r11)
ffc0f714: 48 00 00 08 b ffc0f71c <rtems_task_mode+0xbc>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc0f718: 91 4b 00 7c stw r10,124(r11)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc0f71c: 70 8b 00 01 andi. r11,r4,1
ffc0f720: 41 82 00 28 beq- ffc0f748 <rtems_task_mode+0xe8>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0f724: 39 60 00 00 li r11,0
ffc0f728: 7d 60 00 a6 mfmsr r11
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc0f72c: 7d 50 42 a6 mfsprg r10,0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc0f730: 70 07 00 01 andi. r7,r0,1
ffc0f734: 40 82 00 0c bne- ffc0f740 <rtems_task_mode+0xe0>
msr |= ppc_interrupt_get_disable_mask();
ffc0f738: 7d 4b 5b 78 or r11,r10,r11
ffc0f73c: 48 00 00 08 b ffc0f744 <rtems_task_mode+0xe4>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc0f740: 7d 6b 50 78 andc r11,r11,r10
}
_CPU_MSR_SET(msr);
ffc0f744: 7d 60 01 24 mtmsr r11
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc0f748: 70 8a 04 00 andi. r10,r4,1024
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc0f74c: 39 60 00 00 li r11,0
if ( mask & RTEMS_ASR_MASK ) {
ffc0f750: 41 82 00 58 beq- ffc0f7a8 <rtems_task_mode+0x148>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc0f754: 70 07 04 00 andi. r7,r0,1024
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
ffc0f758: 89 49 00 08 lbz r10,8(r9)
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc0f75c: 7c 00 00 26 mfcr r0
ffc0f760: 54 00 1f fe rlwinm r0,r0,3,31,31
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
ffc0f764: 7f 8a 00 00 cmpw cr7,r10,r0
ffc0f768: 41 9e 00 40 beq- cr7,ffc0f7a8 <rtems_task_mode+0x148>
asr->is_enabled = is_asr_enabled;
ffc0f76c: 98 09 00 08 stb r0,8(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0f770: 7c 00 00 a6 mfmsr r0
ffc0f774: 7d 70 42 a6 mfsprg r11,0
ffc0f778: 7c 0b 58 78 andc r11,r0,r11
ffc0f77c: 7d 60 01 24 mtmsr r11
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc0f780: 81 69 00 18 lwz r11,24(r9)
information->signals_pending = information->signals_posted;
ffc0f784: 81 49 00 14 lwz r10,20(r9)
information->signals_posted = _signals;
ffc0f788: 91 69 00 14 stw r11,20(r9)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc0f78c: 91 49 00 18 stw r10,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0f790: 7c 00 01 24 mtmsr r0
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc0f794: 80 09 00 14 lwz r0,20(r9)
needs_asr_dispatching = true;
ffc0f798: 39 60 00 01 li r11,1
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc0f79c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f7a0: 40 9e 00 08 bne- cr7,ffc0f7a8 <rtems_task_mode+0x148>
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc0f7a4: 39 60 00 00 li r11,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc0f7a8: 3d 20 00 00 lis r9,0
ffc0f7ac: 80 09 28 04 lwz r0,10244(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc0f7b0: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc0f7b4: 2f 80 00 03 cmpwi cr7,r0,3
ffc0f7b8: 40 be 00 48 bne+ cr7,ffc0f800 <rtems_task_mode+0x1a0>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
ffc0f7bc: 2f 8b 00 00 cmpwi cr7,r11,0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc0f7c0: 3d 40 00 00 lis r10,0
ffc0f7c4: 39 4a 2d b8 addi r10,r10,11704
ffc0f7c8: 81 2a 00 0c lwz r9,12(r10)
if ( are_signals_pending ||
ffc0f7cc: 40 9e 00 1c bne- cr7,ffc0f7e8 <rtems_task_mode+0x188>
ffc0f7d0: 80 0a 00 10 lwz r0,16(r10)
ffc0f7d4: 7f 89 00 00 cmpw cr7,r9,r0
ffc0f7d8: 41 9e 00 28 beq- cr7,ffc0f800 <rtems_task_mode+0x1a0>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
ffc0f7dc: 88 09 00 74 lbz r0,116(r9)
ffc0f7e0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f7e4: 41 9e 00 1c beq- cr7,ffc0f800 <rtems_task_mode+0x1a0> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc0f7e8: 3d 20 00 00 lis r9,0
ffc0f7ec: 38 00 00 01 li r0,1
ffc0f7f0: 39 29 2d b8 addi r9,r9,11704
ffc0f7f4: 98 09 00 18 stb r0,24(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
ffc0f7f8: 4b ff af c9 bl ffc0a7c0 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
ffc0f7fc: 38 60 00 00 li r3,0
}
ffc0f800: 80 01 00 0c lwz r0,12(r1)
ffc0f804: 38 21 00 08 addi r1,r1,8
ffc0f808: 7c 08 03 a6 mtlr r0
ffc0f80c: 4e 80 00 20 blr
ffc0c6ac <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0c6ac: 94 21 ff e0 stwu r1,-32(r1)
ffc0c6b0: 7c 08 02 a6 mflr r0
ffc0c6b4: bf c1 00 18 stmw r30,24(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0c6b8: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0c6bc: 7c be 2b 78 mr r30,r5
ffc0c6c0: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0c6c4: 41 82 00 18 beq- ffc0c6dc <rtems_task_set_priority+0x30>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
ffc0c6c8: 3d 20 00 00 lis r9,0
ffc0c6cc: 89 29 27 04 lbz r9,9988(r9)
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
ffc0c6d0: 38 00 00 13 li r0,19
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0c6d4: 7f 9f 48 40 cmplw cr7,r31,r9
ffc0c6d8: 41 bd 00 6c bgt+ cr7,ffc0c744 <rtems_task_set_priority+0x98>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0c6dc: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
ffc0c6e0: 38 00 00 09 li r0,9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0c6e4: 41 9e 00 60 beq- cr7,ffc0c744 <rtems_task_set_priority+0x98>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0c6e8: 38 81 00 08 addi r4,r1,8
ffc0c6ec: 48 00 26 f1 bl ffc0eddc <_Thread_Get>
switch ( location ) {
ffc0c6f0: 80 01 00 08 lwz r0,8(r1)
ffc0c6f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c6f8: 40 9e 00 48 bne- cr7,ffc0c740 <rtems_task_set_priority+0x94>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0c6fc: 2f 9f 00 00 cmpwi cr7,r31,0
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0c700: 80 03 00 14 lwz r0,20(r3)
ffc0c704: 90 1e 00 00 stw r0,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0c708: 41 9e 00 2c beq- cr7,ffc0c734 <rtems_task_set_priority+0x88>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0c70c: 80 03 00 1c lwz r0,28(r3)
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
the_thread->real_priority = new_priority;
ffc0c710: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0c714: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c718: 41 9e 00 10 beq- cr7,ffc0c728 <rtems_task_set_priority+0x7c>
ffc0c71c: 80 03 00 14 lwz r0,20(r3)
ffc0c720: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0c724: 40 9d 00 10 ble- cr7,ffc0c734 <rtems_task_set_priority+0x88><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
ffc0c728: 7f e4 fb 78 mr r4,r31
ffc0c72c: 38 a0 00 00 li r5,0
ffc0c730: 48 00 21 9d bl ffc0e8cc <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0c734: 48 00 26 6d bl ffc0eda0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0c738: 38 00 00 00 li r0,0
ffc0c73c: 48 00 00 08 b ffc0c744 <rtems_task_set_priority+0x98>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0c740: 38 00 00 04 li r0,4
}
ffc0c744: 39 61 00 20 addi r11,r1,32
ffc0c748: 7c 03 03 78 mr r3,r0
ffc0c74c: 4b ff 49 d0 b ffc0111c <_restgpr_30_x>
ffc18674 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc18674: 94 21 ff e8 stwu r1,-24(r1)
ffc18678: 7c 08 02 a6 mflr r0
ffc1867c: 7c 64 1b 78 mr r4,r3
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
ffc18680: 3c 60 00 00 lis r3,0
ffc18684: 90 01 00 1c stw r0,28(r1)
ffc18688: 38 63 72 80 addi r3,r3,29312
ffc1868c: 38 a1 00 08 addi r5,r1,8
ffc18690: 48 00 31 91 bl ffc1b820 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc18694: 80 01 00 08 lwz r0,8(r1)
ffc18698: 2f 80 00 00 cmpwi cr7,r0,0
ffc1869c: 40 9e 00 24 bne- cr7,ffc186c0 <rtems_timer_cancel+0x4c>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc186a0: 80 03 00 38 lwz r0,56(r3)
ffc186a4: 2f 80 00 04 cmpwi cr7,r0,4
ffc186a8: 41 9e 00 0c beq- cr7,ffc186b4 <rtems_timer_cancel+0x40> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc186ac: 38 63 00 10 addi r3,r3,16
ffc186b0: 48 00 53 1d bl ffc1d9cc <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc186b4: 48 00 3f a5 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc186b8: 38 60 00 00 li r3,0
ffc186bc: 48 00 00 08 b ffc186c4 <rtems_timer_cancel+0x50>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc186c0: 38 60 00 04 li r3,4
}
ffc186c4: 80 01 00 1c lwz r0,28(r1)
ffc186c8: 38 21 00 18 addi r1,r1,24
ffc186cc: 7c 08 03 a6 mtlr r0
ffc186d0: 4e 80 00 20 blr
ffc18bf8 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc18bf8: 94 21 ff c8 stwu r1,-56(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc18bfc: 3d 20 00 00 lis r9,0
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc18c00: 7c 08 02 a6 mflr r0
ffc18c04: bf 01 00 18 stmw r24,24(r1)
ffc18c08: 7c 7f 1b 78 mr r31,r3
ffc18c0c: 7c 9c 23 78 mr r28,r4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc18c10: 83 a9 28 ec lwz r29,10476(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc18c14: 7c be 2b 78 mr r30,r5
ffc18c18: 90 01 00 3c stw r0,60(r1)
ffc18c1c: 7c da 33 78 mr r26,r6
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc18c20: 2f 9d 00 00 cmpwi cr7,r29,0
return RTEMS_INCORRECT_STATE;
ffc18c24: 3b 20 00 0e li r25,14
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc18c28: 41 9e 00 c8 beq- cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc18c2c: 3d 20 00 00 lis r9,0
ffc18c30: 88 09 28 a0 lbz r0,10400(r9)
return RTEMS_NOT_DEFINED;
ffc18c34: 3b 20 00 0b li r25,11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc18c38: 2f 80 00 00 cmpwi cr7,r0,0
ffc18c3c: 41 be 00 b4 beq+ cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc18c40: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc18c44: 3b 20 00 09 li r25,9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc18c48: 41 9e 00 a8 beq- cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc18c4c: 7c 83 23 78 mr r3,r4
ffc18c50: 4b ff cc 89 bl ffc158d8 <_TOD_Validate>
return RTEMS_INVALID_CLOCK;
ffc18c54: 3b 20 00 14 li r25,20
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc18c58: 2f 83 00 00 cmpwi cr7,r3,0
ffc18c5c: 41 be 00 94 beq+ cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc18c60: 7f 83 e3 78 mr r3,r28
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc18c64: 3f 60 00 00 lis r27,0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc18c68: 4b ff cb e5 bl ffc1584c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc18c6c: 80 1b 28 b4 lwz r0,10420(r27)
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc18c70: 7c 7c 1b 78 mr r28,r3
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc18c74: 7f 83 00 40 cmplw cr7,r3,r0
ffc18c78: 40 bd 00 78 ble+ cr7,ffc18cf0 <rtems_timer_server_fire_when+0xf8>
ffc18c7c: 3c 60 00 00 lis r3,0
ffc18c80: 38 63 72 80 addi r3,r3,29312
ffc18c84: 7f e4 fb 78 mr r4,r31
ffc18c88: 38 a1 00 08 addi r5,r1,8
ffc18c8c: 48 00 2b 95 bl ffc1b820 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc18c90: 83 01 00 08 lwz r24,8(r1)
ffc18c94: 7c 79 1b 78 mr r25,r3
ffc18c98: 2f 98 00 00 cmpwi cr7,r24,0
ffc18c9c: 40 9e 00 50 bne- cr7,ffc18cec <rtems_timer_server_fire_when+0xf4>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc18ca0: 38 63 00 10 addi r3,r3,16
ffc18ca4: 48 00 4d 29 bl ffc1d9cc <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc18ca8: 38 00 00 03 li r0,3
ffc18cac: 90 19 00 38 stw r0,56(r25)
_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 );
ffc18cb0: 7f 24 cb 78 mr r4,r25
ffc18cb4: 7f a3 eb 78 mr r3,r29
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
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();
ffc18cb8: 80 1b 28 b4 lwz r0,10420(r27)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc18cbc: 93 19 00 18 stw r24,24(r25)
ffc18cc0: 7f 80 e0 50 subf r28,r0,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc18cc4: 80 1d 00 04 lwz r0,4(r29)
the_watchdog->routine = routine;
ffc18cc8: 93 d9 00 2c stw r30,44(r25)
ffc18ccc: 7c 09 03 a6 mtctr r0
the_watchdog->id = id;
ffc18cd0: 93 f9 00 30 stw r31,48(r25)
the_watchdog->user_data = user_data;
ffc18cd4: 93 59 00 34 stw r26,52(r25)
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
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();
ffc18cd8: 93 99 00 1c stw r28,28(r25)
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc18cdc: 3b 20 00 00 li r25,0
(void) _Watchdog_Remove( &the_timer->Ticker );
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();
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc18ce0: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc18ce4: 48 00 39 75 bl ffc1c658 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc18ce8: 48 00 00 08 b ffc18cf0 <rtems_timer_server_fire_when+0xf8>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc18cec: 3b 20 00 04 li r25,4
}
ffc18cf0: 39 61 00 38 addi r11,r1,56
ffc18cf4: 7f 23 cb 78 mr r3,r25
ffc18cf8: 4b ff 54 7c b ffc0e174 <_restgpr_24_x>