RTEMS 4.11Annotated Report
Sun Dec 23 00:27:41 2012
ffc0eddc <TOD_MICROSECONDS_TO_TICKS>:
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
microseconds_per_tick = rtems_configuration_get_microseconds_per_tick();
ffc0eddc: 3d 20 ff c2 lis r9,-62
ffc0ede0: 81 49 46 34 lwz r10,17972(r9)
ticks = microseconds / microseconds_per_tick;
ffc0ede4: 7d 23 53 96 divwu r9,r3,r10
if ( (microseconds % microseconds_per_tick) != 0 )
ffc0ede8: 7d 49 51 d6 mullw r10,r9,r10
ffc0edec: 7f 83 50 00 cmpw cr7,r3,r10
ffc0edf0: 41 9e 00 08 beq- cr7,ffc0edf8 <TOD_MICROSECONDS_TO_TICKS+0x1c><== ALWAYS TAKEN
ticks += 1;
ffc0edf4: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
return ticks;
}
ffc0edf8: 7d 23 4b 78 mr r3,r9
ffc0edfc: 4e 80 00 20 blr
ffc0a124 <TOD_MILLISECONDS_TO_TICKS>:
/**
* We should ensure the ticks not be truncated by integer division. We
* need to have it be greater than or equal to the requested time. It
* should not be shorter.
*/
milliseconds_per_tick = rtems_configuration_get_milliseconds_per_tick();
ffc0a124: 3d 20 ff c2 lis r9,-62
ffc0a128: 81 49 c0 04 lwz r10,-16380(r9)
ffc0a12c: 39 20 03 e8 li r9,1000
ffc0a130: 7d 4a 4b 96 divwu r10,r10,r9
ticks = milliseconds / milliseconds_per_tick;
ffc0a134: 7d 23 53 96 divwu r9,r3,r10
if ( (milliseconds % milliseconds_per_tick) != 0 )
ffc0a138: 7d 49 51 d6 mullw r10,r9,r10
ffc0a13c: 7f 83 50 00 cmpw cr7,r3,r10
ffc0a140: 41 9e 00 08 beq- cr7,ffc0a148 <TOD_MILLISECONDS_TO_TICKS+0x24><== ALWAYS TAKEN
ticks += 1;
ffc0a144: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
return ticks;
}
ffc0a148: 7d 23 4b 78 mr r3,r9
ffc0a14c: 4e 80 00 20 blr
ffc121c4 <_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
)
{
ffc121c4: 94 21 ff e0 stwu r1,-32(r1)
ffc121c8: 7c 08 02 a6 mflr r0
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;
ffc121cc: 39 20 00 00 li r9,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
)
{
ffc121d0: bf a1 00 14 stmw r29,20(r1)
ffc121d4: 7c 7f 1b 78 mr r31,r3
ffc121d8: 7c 9d 23 78 mr r29,r4
ffc121dc: 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;
ffc121e0: 91 23 00 48 stw r9,72(r3)
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
ffc121e4: 70 c9 00 03 andi. r9,r6,3
)
{
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
ffc121e8: 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;
ffc121ec: 90 c3 00 4c stw r6,76(r3)
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
ffc121f0: 41 82 00 1c beq- ffc1220c <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uintptr_t);
ffc121f4: 39 26 00 04 addi r9,r6,4
allocated_message_size &= ~(sizeof(uintptr_t) - 1);
ffc121f8: 55 29 00 3a rlwinm r9,r9,0,0,29
/*
* Check for an overflow. It can occur while increasing allocated_message_size
* to multiplicity of uintptr_t above.
*/
if (allocated_message_size < maximum_message_size)
ffc121fc: 7f 89 30 40 cmplw cr7,r9,r6
ffc12200: 40 9c 00 10 bge- cr7,ffc12210 <_CORE_message_queue_Initialize+0x4c>
return false;
ffc12204: 38 60 00 00 li r3,0
ffc12208: 48 00 00 84 b ffc1228c <_CORE_message_queue_Initialize+0xc8>
/*
* Check if allocated_message_size is aligned to uintptr-size boundary.
* If not, it will increase allocated_message_size to multiplicity of pointer
* size.
*/
if (allocated_message_size & (sizeof(uintptr_t) - 1)) {
ffc1220c: 7c c9 33 78 mr r9,r6
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
ffc12210: 3b c9 00 10 addi r30,r9,16
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
ffc12214: 7d 45 f0 16 mulhwu r10,r5,r30
ffc12218: 7d 65 f1 d6 mullw r11,r5,r30
if ( x > SIZE_MAX )
ffc1221c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc12220: 41 bd ff e4 bgt- cr7,ffc12204 <_CORE_message_queue_Initialize+0x40>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
ffc12224: 7d 63 5b 78 mr r3,r11
ffc12228: 90 a1 00 08 stw r5,8(r1)
ffc1222c: 48 00 31 19 bl ffc15344 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
ffc12230: 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 *)
ffc12234: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
ffc12238: 7c 64 1b 78 mr r4,r3
if (the_message_queue->message_buffers == 0)
ffc1223c: 80 a1 00 08 lwz r5,8(r1)
ffc12240: 41 be ff c4 beq- cr7,ffc12204 <_CORE_message_queue_Initialize+0x40><== NEVER TAKEN
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc12244: 38 7f 00 60 addi r3,r31,96
ffc12248: 7f c6 f3 78 mr r6,r30
ffc1224c: 4b ff ff 3d bl ffc12188 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE bool _CORE_message_queue_Is_priority(
CORE_message_queue_Attributes *the_attribute
)
{
return
ffc12250: 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 );
ffc12254: 39 5f 00 54 addi r10,r31,84
ffc12258: 39 3f 00 50 addi r9,r31,80
head->next = tail;
ffc1225c: 91 5f 00 50 stw r10,80(r31)
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc12260: 68 84 00 01 xori r4,r4,1
head->previous = NULL;
ffc12264: 39 40 00 00 li r10,0
tail->previous = head;
ffc12268: 91 3f 00 58 stw r9,88(r31)
ffc1226c: 7c 84 00 34 cntlzw r4,r4
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc12270: 91 5f 00 54 stw r10,84(r31)
ffc12274: 7f e3 fb 78 mr r3,r31
ffc12278: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc1227c: 38 a0 00 80 li r5,128
ffc12280: 38 c0 00 06 li r6,6
ffc12284: 48 00 27 a9 bl ffc14a2c <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
ffc12288: 38 60 00 01 li r3,1
}
ffc1228c: 39 61 00 20 addi r11,r1,32
ffc12290: 4b ff 37 3c b ffc059cc <_restgpr_29_x>
ffc097fc <_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
)
{
ffc097fc: 7c 2b 0b 78 mr r11,r1
ffc09800: 7c 08 02 a6 mflr r0
ffc09804: 94 21 ff f0 stwu r1,-16(r1)
ffc09808: 48 01 08 41 bl ffc1a048 <_savegpr_31>
ffc0980c: 90 01 00 14 stw r0,20(r1)
ffc09810: 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)) ) {
ffc09814: 48 00 1d 01 bl ffc0b514 <_Thread_queue_Dequeue>
ffc09818: 2f 83 00 00 cmpwi cr7,r3,0
ffc0981c: 40 be 00 3c bne+ cr7,ffc09858 <_CORE_semaphore_Surrender+0x5c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09820: 7d 00 00 a6 mfmsr r8
ffc09824: 7d 30 42 a6 mfsprg r9,0
ffc09828: 7d 09 48 78 andc r9,r8,r9
ffc0982c: 7d 20 01 24 mtmsr r9
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09830: 81 3f 00 48 lwz r9,72(r31)
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
ffc09834: 38 60 00 04 li r3,4
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
ffc09838: 81 5f 00 40 lwz r10,64(r31)
ffc0983c: 7f 89 50 40 cmplw cr7,r9,r10
ffc09840: 40 9c 00 10 bge- cr7,ffc09850 <_CORE_semaphore_Surrender+0x54><== NEVER TAKEN
the_semaphore->count += 1;
ffc09844: 39 29 00 01 addi r9,r9,1
ffc09848: 91 3f 00 48 stw r9,72(r31)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc0984c: 38 60 00 00 li r3,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc09850: 7d 00 01 24 mtmsr r8
ffc09854: 48 00 00 08 b ffc0985c <_CORE_semaphore_Surrender+0x60>
ffc09858: 38 60 00 00 li r3,0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0985c: 39 61 00 10 addi r11,r1,16
ffc09860: 4b ff 6d 64 b ffc005c4 <_restgpr_31_x>
ffc08454 <_Event_Surrender>:
rtems_event_set event_in,
Event_Control *event,
Thread_blocking_operation_States *sync_state,
States_Control wait_state
)
{
ffc08454: 7c 2b 0b 78 mr r11,r1
ffc08458: 7c 08 02 a6 mflr r0
ffc0845c: 94 21 ff f0 stwu r1,-16(r1)
ffc08460: 90 01 00 14 stw r0,20(r1)
ffc08464: 48 01 1b e5 bl ffc1a048 <_savegpr_31>
ffc08468: 7c 7f 1b 78 mr r31,r3
rtems_event_set pending_events;
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
option_set = the_thread->Wait.option;
ffc0846c: 80 63 00 30 lwz r3,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08470: 7d 20 00 a6 mfmsr r9
ffc08474: 7d 50 42 a6 mfsprg r10,0
ffc08478: 7d 2a 50 78 andc r10,r9,r10
ffc0847c: 7d 40 01 24 mtmsr r10
RTEMS_INLINE_ROUTINE void _Event_sets_Post(
rtems_event_set the_new_events,
rtems_event_set *the_event_set
)
{
*the_event_set |= the_new_events;
ffc08480: 81 45 00 00 lwz r10,0(r5)
ffc08484: 7c 84 53 78 or r4,r4,r10
ffc08488: 90 85 00 00 stw r4,0(r5)
_ISR_Disable( level );
_Event_sets_Post( event_in, &event->pending_events );
pending_events = event->pending_events;
event_condition = the_thread->Wait.count;
ffc0848c: 81 1f 00 24 lwz r8,36(r31)
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
ffc08490: 7c 8a 40 39 and. r10,r4,r8
ffc08494: 40 a2 00 08 bne+ ffc0849c <_Event_Surrender+0x48>
ffc08498: 48 00 00 f0 b ffc08588 <_Event_Surrender+0x134>
/*
* 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() &&
ffc0849c: 3d 60 00 00 lis r11,0
ffc084a0: 39 6b 2e 00 addi r11,r11,11776
ffc084a4: 80 0b 00 08 lwz r0,8(r11)
ffc084a8: 2f 80 00 00 cmpwi cr7,r0,0
ffc084ac: 41 9e 00 54 beq- cr7,ffc08500 <_Event_Surrender+0xac>
ffc084b0: 81 6b 00 10 lwz r11,16(r11)
ffc084b4: 7f 9f 58 00 cmpw cr7,r31,r11
ffc084b8: 40 be 00 48 bne+ cr7,ffc08500 <_Event_Surrender+0xac>
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc084bc: 81 66 00 00 lwz r11,0(r6)
ffc084c0: 39 6b ff ff addi r11,r11,-1
/*
* 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 ) &&
ffc084c4: 2b 8b 00 01 cmplwi cr7,r11,1
ffc084c8: 41 bd 00 38 bgt+ cr7,ffc08500 <_Event_Surrender+0xac>
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
ffc084cc: 7f 8a 40 00 cmpw cr7,r10,r8
ffc084d0: 41 9e 00 0c beq- cr7,ffc084dc <_Event_Surrender+0x88>
ffc084d4: 70 68 00 02 andi. r8,r3,2
ffc084d8: 41 82 00 b0 beq- ffc08588 <_Event_Surrender+0x134> <== 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) );
ffc084dc: 7c 84 50 78 andc r4,r4,r10
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc084e0: 39 00 00 00 li r8,0
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
event->pending_events = _Event_sets_Clear(
ffc084e4: 90 85 00 00 stw r4,0(r5)
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc084e8: 91 1f 00 24 stw r8,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc084ec: 81 1f 00 28 lwz r8,40(r31)
ffc084f0: 91 48 00 00 stw r10,0(r8)
*sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc084f4: 39 40 00 03 li r10,3
ffc084f8: 91 46 00 00 stw r10,0(r6)
ffc084fc: 48 00 00 8c b ffc08588 <_Event_Surrender+0x134>
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
ffc08500: 80 df 00 10 lwz r6,16(r31)
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
ffc08504: 7c eb 30 39 and. r11,r7,r6
ffc08508: 41 82 00 80 beq- ffc08588 <_Event_Surrender+0x134>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc0850c: 7f 8a 40 00 cmpw cr7,r10,r8
ffc08510: 41 9e 00 0c beq- cr7,ffc0851c <_Event_Surrender+0xc8>
ffc08514: 70 68 00 02 andi. r8,r3,2
ffc08518: 41 82 00 70 beq- ffc08588 <_Event_Surrender+0x134> <== NEVER TAKEN
ffc0851c: 7c 84 50 78 andc r4,r4,r10
event->pending_events = _Event_sets_Clear(
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc08520: 39 00 00 00 li r8,0
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Are_set( the_thread->current_state, wait_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
event->pending_events = _Event_sets_Clear(
ffc08524: 90 85 00 00 stw r4,0(r5)
pending_events,
seized_events
);
the_thread->Wait.count = 0;
ffc08528: 91 1f 00 24 stw r8,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc0852c: 81 1f 00 28 lwz r8,40(r31)
ffc08530: 91 48 00 00 stw r10,0(r8)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc08534: 7d 40 00 a6 mfmsr r10
ffc08538: 7d 20 01 24 mtmsr r9
ffc0853c: 7d 40 01 24 mtmsr r10
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc08540: 81 5f 00 50 lwz r10,80(r31)
ffc08544: 2f 8a 00 02 cmpwi cr7,r10,2
ffc08548: 41 9e 00 0c beq- cr7,ffc08554 <_Event_Surrender+0x100>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0854c: 7d 20 01 24 mtmsr r9
ffc08550: 48 00 00 18 b ffc08568 <_Event_Surrender+0x114>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc08554: 39 40 00 03 li r10,3
ffc08558: 91 5f 00 50 stw r10,80(r31)
ffc0855c: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc08560: 38 7f 00 48 addi r3,r31,72
ffc08564: 48 00 3a b5 bl ffc0c018 <_Watchdog_Remove>
}
return;
}
}
_ISR_Enable( level );
}
ffc08568: 80 01 00 14 lwz r0,20(r1)
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc0856c: 7f e3 fb 78 mr r3,r31
ffc08570: 3c 80 10 07 lis r4,4103
ffc08574: 83 e1 00 0c lwz r31,12(r1)
ffc08578: 7c 08 03 a6 mtlr r0
ffc0857c: 60 84 ff f8 ori r4,r4,65528
ffc08580: 38 21 00 10 addi r1,r1,16
ffc08584: 48 00 27 f0 b ffc0ad74 <_Thread_Clear_state>
ffc08588: 7d 20 01 24 mtmsr r9
ffc0858c: 39 61 00 10 addi r11,r1,16
ffc08590: 4b ff 80 34 b ffc005c4 <_restgpr_31_x>
ffc08594 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
ffc08594: 7c 2b 0b 78 mr r11,r1
ffc08598: 94 21 ff e0 stwu r1,-32(r1)
ffc0859c: 7c 08 02 a6 mflr r0
ffc085a0: 48 01 1a a9 bl ffc1a048 <_savegpr_31>
ffc085a4: 7c 9f 23 78 mr r31,r4
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
ffc085a8: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *arg
)
{
ffc085ac: 90 01 00 24 stw r0,36(r1)
ISR_Level level;
Thread_blocking_operation_States *sync_state;
sync_state = arg;
the_thread = _Thread_Get( id, &location );
ffc085b0: 48 00 2c 01 bl ffc0b1b0 <_Thread_Get>
switch ( location ) {
ffc085b4: 81 21 00 08 lwz r9,8(r1)
ffc085b8: 2f 89 00 00 cmpwi cr7,r9,0
ffc085bc: 40 9e 00 64 bne- cr7,ffc08620 <_Event_Timeout+0x8c> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc085c0: 7d 40 00 a6 mfmsr r10
ffc085c4: 7d 10 42 a6 mfsprg r8,0
ffc085c8: 7d 48 40 78 andc r8,r10,r8
ffc085cc: 7d 00 01 24 mtmsr r8
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc085d0: 91 23 00 24 stw r9,36(r3)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc085d4: 3d 20 00 00 lis r9,0
if ( _Thread_Is_executing( the_thread ) ) {
ffc085d8: 81 29 2e 10 lwz r9,11792(r9)
ffc085dc: 7f 83 48 00 cmpw cr7,r3,r9
ffc085e0: 40 be 00 18 bne+ cr7,ffc085f8 <_Event_Timeout+0x64>
if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc085e4: 81 3f 00 00 lwz r9,0(r31)
ffc085e8: 2f 89 00 01 cmpwi cr7,r9,1
ffc085ec: 40 be 00 0c bne+ cr7,ffc085f8 <_Event_Timeout+0x64>
*sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc085f0: 39 20 00 02 li r9,2
ffc085f4: 91 3f 00 00 stw r9,0(r31)
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc085f8: 39 20 00 06 li r9,6
ffc085fc: 91 23 00 34 stw r9,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08600: 7d 40 01 24 mtmsr r10
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc08604: 3c 80 10 07 lis r4,4103
ffc08608: 60 84 ff f8 ori r4,r4,65528
ffc0860c: 48 00 27 69 bl ffc0ad74 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc08610: 3d 20 00 00 lis r9,0
ffc08614: 81 49 28 24 lwz r10,10276(r9)
--level;
ffc08618: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0861c: 91 49 28 24 stw r10,10276(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc08620: 39 61 00 20 addi r11,r1,32
ffc08624: 4b ff 7f a0 b ffc005c4 <_restgpr_31_x>
ffc0dd5c <_Heap_Free>:
/*
* 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 ) {
ffc0dd5c: 2c 04 00 00 cmpwi r4,0
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc0dd60: 7c 08 02 a6 mflr r0
ffc0dd64: 7c 2b 0b 78 mr r11,r1
ffc0dd68: 94 21 ff f0 stwu r1,-16(r1)
ffc0dd6c: 90 01 00 14 stw r0,20(r1)
ffc0dd70: 48 00 c2 d9 bl ffc1a048 <_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 ) {
ffc0dd74: 41 82 01 e4 beq- ffc0df58 <_Heap_Free+0x1fc>
ffc0dd78: 81 03 00 10 lwz r8,16(r3)
ffc0dd7c: 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
ffc0dd80: 81 63 00 20 lwz r11,32(r3)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0dd84: 7d 44 43 96 divwu r10,r4,r8
ffc0dd88: 7d 4a 41 d6 mullw r10,r10,r8
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;
ffc0dd8c: 39 00 00 00 li r8,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0dd90: 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;
ffc0dd94: 7f 8a 58 40 cmplw cr7,r10,r11
ffc0dd98: 41 9c 00 14 blt- cr7,ffc0ddac <_Heap_Free+0x50>
ffc0dd9c: 81 03 00 24 lwz r8,36(r3)
ffc0dda0: 7d 0a 40 10 subfc r8,r10,r8
ffc0dda4: 39 00 00 00 li r8,0
ffc0dda8: 7d 08 41 14 adde r8,r8,r8
}
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 ) ) {
ffc0ddac: 2f 88 00 00 cmpwi cr7,r8,0
return false;
ffc0ddb0: 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 ) ) {
ffc0ddb4: 41 9e 01 a8 beq- cr7,ffc0df5c <_Heap_Free+0x200>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0ddb8: 80 8a 00 04 lwz r4,4(r10)
ffc0ddbc: 38 c0 00 00 li r6,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;
ffc0ddc0: 54 87 00 3c rlwinm r7,r4,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);
ffc0ddc4: 7d 07 52 14 add r8,r7,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;
ffc0ddc8: 7f 88 58 40 cmplw cr7,r8,r11
ffc0ddcc: 41 9c 00 14 blt- cr7,ffc0dde0 <_Heap_Free+0x84> <== NEVER TAKEN
ffc0ddd0: 80 c9 00 24 lwz r6,36(r9)
ffc0ddd4: 7c c8 30 10 subfc r6,r8,r6
ffc0ddd8: 38 c0 00 00 li r6,0
ffc0dddc: 7c c6 31 14 adde r6,r6,r6
_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 ) ) {
ffc0dde0: 2f 86 00 00 cmpwi cr7,r6,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 ) ) {
return false;
ffc0dde4: 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 ) ) {
ffc0dde8: 41 9e 01 74 beq- cr7,ffc0df5c <_Heap_Free+0x200> <== NEVER TAKEN
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0ddec: 80 a8 00 04 lwz r5,4(r8)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0ddf0: 70 a6 00 01 andi. r6,r5,1
ffc0ddf4: 41 82 01 68 beq- ffc0df5c <_Heap_Free+0x200>
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
ffc0ddf8: 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;
ffc0ddfc: 54 a5 00 3c rlwinm r5,r5,0,0,30
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
ffc0de00: 7f 88 18 00 cmpw cr7,r8,r3
ffc0de04: 41 9e 00 18 beq- cr7,ffc0de1c <_Heap_Free+0xc0>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0de08: 7c c8 2a 14 add r6,r8,r5
return true;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
ffc0de0c: 80 06 00 04 lwz r0,4(r6)
ffc0de10: 68 00 00 01 xori r0,r0,1
ffc0de14: 54 00 07 fe clrlwi r0,r0,31
ffc0de18: 48 00 00 08 b ffc0de20 <_Heap_Free+0xc4>
ffc0de1c: 38 00 00 00 li r0,0
if ( !_Heap_Is_prev_used( block ) ) {
ffc0de20: 70 9f 00 01 andi. r31,r4,1
ffc0de24: 40 82 00 94 bne- ffc0deb8 <_Heap_Free+0x15c>
uintptr_t const prev_size = block->prev_size;
ffc0de28: 80 8a 00 00 lwz r4,0(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;
ffc0de2c: 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);
ffc0de30: 7c c4 50 50 subf r6,r4,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;
ffc0de34: 7f 86 58 40 cmplw cr7,r6,r11
ffc0de38: 41 9c 00 10 blt- cr7,ffc0de48 <_Heap_Free+0xec> <== NEVER TAKEN
ffc0de3c: 7d 86 18 10 subfc r12,r6,r3
ffc0de40: 39 80 00 00 li r12,0
ffc0de44: 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 ) ) {
ffc0de48: 2f 8c 00 00 cmpwi cr7,r12,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 ) ) {
return false;
ffc0de4c: 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 ) ) {
ffc0de50: 41 9e 01 0c beq- cr7,ffc0df5c <_Heap_Free+0x200> <== 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;
ffc0de54: 81 66 00 04 lwz r11,4(r6)
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) ) {
ffc0de58: 71 7f 00 01 andi. r31,r11,1
ffc0de5c: 41 82 01 00 beq- ffc0df5c <_Heap_Free+0x200> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc0de60: 2f 80 00 00 cmpwi cr7,r0,0
ffc0de64: 7c 87 22 14 add r4,r7,r4
ffc0de68: 41 be 00 34 beq+ cr7,ffc0de9c <_Heap_Free+0x140>
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
ffc0de6c: 81 48 00 0c lwz r10,12(r8)
uintptr_t const size = block_size + prev_size + next_block_size;
ffc0de70: 7c a4 2a 14 add r5,r4,r5
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
ffc0de74: 80 88 00 08 lwz r4,8(r8)
Heap_Block *prev = block->prev;
prev->next = next;
ffc0de78: 90 8a 00 08 stw r4,8(r10)
next->prev = prev;
ffc0de7c: 91 44 00 0c stw r10,12(r4)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc0de80: 81 49 00 38 lwz r10,56(r9)
ffc0de84: 39 4a ff ff addi r10,r10,-1
ffc0de88: 91 49 00 38 stw r10,56(r9)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0de8c: 60 aa 00 01 ori r10,r5,1
ffc0de90: 91 46 00 04 stw r10,4(r6)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
ffc0de94: 7c a5 31 2e stwx r5,r5,r6
ffc0de98: 48 00 00 9c b ffc0df34 <_Heap_Free+0x1d8>
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0de9c: 60 85 00 01 ori r5,r4,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc0dea0: 7c 87 51 2e stwx r4,r7,r10
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;
ffc0dea4: 90 a6 00 04 stw r5,4(r6)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0dea8: 80 c8 00 04 lwz r6,4(r8)
ffc0deac: 54 c6 00 3c rlwinm r6,r6,0,0,30
ffc0deb0: 90 c8 00 04 stw r6,4(r8)
ffc0deb4: 48 00 00 80 b ffc0df34 <_Heap_Free+0x1d8>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc0deb8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0debc: 41 be 00 30 beq+ cr7,ffc0deec <_Heap_Free+0x190>
uintptr_t const size = block_size + next_block_size;
ffc0dec0: 7c c5 3a 14 add r6,r5,r7
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
ffc0dec4: 80 a8 00 08 lwz r5,8(r8)
Heap_Block *prev = old_block->prev;
ffc0dec8: 81 08 00 0c lwz r8,12(r8)
new_block->next = next;
ffc0decc: 90 aa 00 08 stw r5,8(r10)
new_block->prev = prev;
ffc0ded0: 91 0a 00 0c stw r8,12(r10)
next->prev = new_block;
prev->next = new_block;
ffc0ded4: 91 48 00 08 stw r10,8(r8)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc0ded8: 60 c8 00 01 ori r8,r6,1
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc0dedc: 91 45 00 0c stw r10,12(r5)
ffc0dee0: 91 0a 00 04 stw r8,4(r10)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc0dee4: 7c c6 51 2e stwx r6,r6,r10
ffc0dee8: 48 00 00 4c b ffc0df34 <_Heap_Free+0x1d8>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc0deec: 80 c9 00 08 lwz r6,8(r9)
new_block->next = next;
new_block->prev = block_before;
ffc0def0: 91 2a 00 0c stw r9,12(r10)
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
ffc0def4: 90 ca 00 08 stw r6,8(r10)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
ffc0def8: 91 46 00 0c stw r10,12(r6)
} 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;
ffc0defc: 60 e6 00 01 ori r6,r7,1
ffc0df00: 90 ca 00 04 stw r6,4(r10)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc0df04: 80 c8 00 04 lwz r6,4(r8)
next_block->prev_size = block_size;
ffc0df08: 7c e7 51 2e stwx r7,r7,r10
} 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;
ffc0df0c: 54 c6 00 3c rlwinm r6,r6,0,0,30
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc0df10: 91 49 00 08 stw r10,8(r9)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0df14: 81 49 00 38 lwz r10,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;
ffc0df18: 90 c8 00 04 stw r6,4(r8)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc0df1c: 39 4a 00 01 addi r10,r10,1
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0df20: 81 09 00 3c lwz r8,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;
ffc0df24: 91 49 00 38 stw r10,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc0df28: 7f 88 50 40 cmplw cr7,r8,r10
ffc0df2c: 40 9c 00 08 bge- cr7,ffc0df34 <_Heap_Free+0x1d8>
stats->max_free_blocks = stats->free_blocks;
ffc0df30: 91 49 00 3c stw r10,60(r9)
}
}
/* Statistics */
--stats->used_blocks;
ffc0df34: 81 49 00 40 lwz r10,64(r9)
ffc0df38: 39 4a ff ff addi r10,r10,-1
ffc0df3c: 91 49 00 40 stw r10,64(r9)
++stats->frees;
ffc0df40: 81 49 00 50 lwz r10,80(r9)
ffc0df44: 39 4a 00 01 addi r10,r10,1
ffc0df48: 91 49 00 50 stw r10,80(r9)
stats->free_size += block_size;
ffc0df4c: 81 49 00 30 lwz r10,48(r9)
ffc0df50: 7c ea 3a 14 add r7,r10,r7
ffc0df54: 90 e9 00 30 stw r7,48(r9)
* 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;
ffc0df58: 38 60 00 01 li r3,1
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc0df5c: 39 61 00 10 addi r11,r1,16
ffc0df60: 4b ff 26 64 b ffc005c4 <_restgpr_31_x>
ffc0b814 <_Heap_Greedy_allocate>:
Heap_Block *_Heap_Greedy_allocate(
Heap_Control *heap,
const uintptr_t *block_sizes,
size_t block_count
)
{
ffc0b814: 94 21 ff e0 stwu r1,-32(r1)
ffc0b818: 7c 08 02 a6 mflr r0
ffc0b81c: bf 61 00 0c stmw r27,12(r1)
ffc0b820: 7c 7f 1b 78 mr r31,r3
ffc0b824: 7c 9c 23 78 mr r28,r4
ffc0b828: 90 01 00 24 stw r0,36(r1)
ffc0b82c: 7c bb 2b 78 mr r27,r5
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
ffc0b830: 3b c0 00 00 li r30,0
const uintptr_t *block_sizes,
size_t block_count
)
{
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *allocated_blocks = NULL;
ffc0b834: 3b a0 00 00 li r29,0
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
ffc0b838: 48 00 00 40 b ffc0b878 <_Heap_Greedy_allocate+0x64>
#include "config.h"
#endif
#include <rtems/score/heap.h>
Heap_Block *_Heap_Greedy_allocate(
ffc0b83c: 57 c9 10 3a rlwinm r9,r30,2,0,29
* @brief See _Heap_Allocate_aligned_with_boundary() with alignment and
* boundary equals zero.
*/
RTEMS_INLINE_ROUTINE void *_Heap_Allocate( Heap_Control *heap, uintptr_t size )
{
return _Heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
ffc0b840: 7c 9c 48 2e lwzx r4,r28,r9
ffc0b844: 7f e3 fb 78 mr r3,r31
ffc0b848: 38 a0 00 00 li r5,0
ffc0b84c: 38 c0 00 00 li r6,0
ffc0b850: 48 00 6e 95 bl ffc126e4 <_Heap_Allocate_aligned_with_boundary>
size_t i;
for (i = 0; i < block_count; ++i) {
void *next = _Heap_Allocate( heap, block_sizes [i] );
if ( next != NULL ) {
ffc0b854: 2c 03 00 00 cmpwi r3,0
ffc0b858: 41 82 00 1c beq- ffc0b874 <_Heap_Greedy_allocate+0x60> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc0b85c: 81 3f 00 10 lwz r9,16(r31)
ffc0b860: 7c 63 4b 96 divwu r3,r3,r9
ffc0b864: 7d 23 49 d6 mullw r9,r3,r9
Heap_Block *next_block = _Heap_Block_of_alloc_area(
(uintptr_t) next,
heap->page_size
);
next_block->next = allocated_blocks;
ffc0b868: 93 a9 00 00 stw r29,0(r9)
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc0b86c: 39 29 ff f8 addi r9,r9,-8
ffc0b870: 7d 3d 4b 78 mr r29,r9
Heap_Block *allocated_blocks = NULL;
Heap_Block *blocks = NULL;
Heap_Block *current;
size_t i;
for (i = 0; i < block_count; ++i) {
ffc0b874: 3b de 00 01 addi r30,r30,1
ffc0b878: 7f 9e d8 00 cmpw cr7,r30,r27
ffc0b87c: 40 9e ff c0 bne+ cr7,ffc0b83c <_Heap_Greedy_allocate+0x28>
ffc0b880: 3b 80 00 00 li r28,0
ffc0b884: 48 00 00 28 b ffc0b8ac <_Heap_Greedy_allocate+0x98>
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc0b888: 80 de 00 04 lwz r6,4(r30)
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
_Heap_Block_allocate(
ffc0b88c: 7f e3 fb 78 mr r3,r31
ffc0b890: 7f c4 f3 78 mr r4,r30
ffc0b894: 54 c6 00 3c rlwinm r6,r6,0,0,30
ffc0b898: 38 be 00 08 addi r5,r30,8
ffc0b89c: 38 c6 ff f8 addi r6,r6,-8
ffc0b8a0: 48 00 03 0d bl ffc0bbac <_Heap_Block_allocate>
current,
_Heap_Alloc_area_of_block( current ),
_Heap_Block_size( current ) - HEAP_BLOCK_HEADER_SIZE
);
current->next = blocks;
ffc0b8a4: 93 9e 00 08 stw r28,8(r30)
ffc0b8a8: 7f dc f3 78 mr r28,r30
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0b8ac: 83 df 00 08 lwz r30,8(r31)
next_block->next = allocated_blocks;
allocated_blocks = next_block;
}
}
while ( (current = _Heap_Free_list_first( heap )) != free_list_tail ) {
ffc0b8b0: 7f 9e f8 00 cmpw cr7,r30,r31
ffc0b8b4: 40 9e ff d4 bne+ cr7,ffc0b888 <_Heap_Greedy_allocate+0x74>
ffc0b8b8: 48 00 00 14 b ffc0b8cc <_Heap_Greedy_allocate+0xb8>
blocks = current;
}
while ( allocated_blocks != NULL ) {
current = allocated_blocks;
allocated_blocks = allocated_blocks->next;
ffc0b8bc: 7f a4 eb 78 mr r4,r29
ffc0b8c0: 87 a4 00 08 lwzu r29,8(r4)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
ffc0b8c4: 7f e3 fb 78 mr r3,r31
ffc0b8c8: 48 00 6f ad bl ffc12874 <_Heap_Free>
current->next = blocks;
blocks = current;
}
while ( allocated_blocks != NULL ) {
ffc0b8cc: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b8d0: 40 9e ff ec bne+ cr7,ffc0b8bc <_Heap_Greedy_allocate+0xa8>
allocated_blocks = allocated_blocks->next;
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( current ) );
}
return blocks;
}
ffc0b8d4: 39 61 00 20 addi r11,r1,32
ffc0b8d8: 7f 83 e3 78 mr r3,r28
ffc0b8dc: 4b ff 58 48 b ffc01124 <_restgpr_27_x>
ffc12710 <_Heap_Iterate>:
void _Heap_Iterate(
Heap_Control *heap,
Heap_Block_visitor visitor,
void *visitor_arg
)
{
ffc12710: 94 21 ff e8 stwu r1,-24(r1)
ffc12714: 7c 08 02 a6 mflr r0
ffc12718: 90 01 00 1c stw r0,28(r1)
ffc1271c: bf 81 00 08 stmw r28,8(r1)
ffc12720: 7c 9d 23 78 mr r29,r4
ffc12724: 7c bc 2b 78 mr r28,r5
Heap_Block *current = heap->first_block;
ffc12728: 81 23 00 20 lwz r9,32(r3)
Heap_Block *end = heap->last_block;
ffc1272c: 83 c3 00 24 lwz r30,36(r3)
ffc12730: 48 00 00 34 b ffc12764 <_Heap_Iterate+0x54>
ffc12734: 80 89 00 04 lwz r4,4(r9)
while ( !stop && current != end ) {
uintptr_t size = _Heap_Block_size( current );
Heap_Block *next = _Heap_Block_at( current, size );
bool used = _Heap_Is_prev_used( next );
stop = (*visitor)( current, size, used, visitor_arg );
ffc12738: 7d 23 4b 78 mr r3,r9
ffc1273c: 7f 86 e3 78 mr r6,r28
ffc12740: 7f a9 03 a6 mtctr r29
ffc12744: 54 84 00 3c rlwinm r4,r4,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);
ffc12748: 7f e9 22 14 add r31,r9,r4
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;
ffc1274c: 80 bf 00 04 lwz r5,4(r31)
ffc12750: 54 a5 07 fe clrlwi r5,r5,31
ffc12754: 4e 80 04 21 bctrl
ffc12758: 7f e9 fb 78 mr r9,r31
{
Heap_Block *current = heap->first_block;
Heap_Block *end = heap->last_block;
bool stop = false;
while ( !stop && current != end ) {
ffc1275c: 2f 83 00 00 cmpwi cr7,r3,0
ffc12760: 40 9e 00 0c bne- cr7,ffc1276c <_Heap_Iterate+0x5c> <== NEVER TAKEN
ffc12764: 7f 89 f0 00 cmpw cr7,r9,r30
ffc12768: 40 9e ff cc bne+ cr7,ffc12734 <_Heap_Iterate+0x24>
stop = (*visitor)( current, size, used, visitor_arg );
current = next;
}
}
ffc1276c: 39 61 00 18 addi r11,r1,24
ffc12770: 4b ff 0d d4 b ffc03544 <_restgpr_28_x>
ffc1aa0c <_Heap_Size_of_alloc_area>:
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1aa0c: 81 03 00 10 lwz r8,16(r3)
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
ffc1aa10: 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
ffc1aa14: 80 e3 00 20 lwz r7,32(r3)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1aa18: 7d 44 43 96 divwu r10,r4,r8
ffc1aa1c: 7d 0a 41 d6 mullw r8,r10,r8
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;
ffc1aa20: 39 40 00 00 li r10,0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc1aa24: 39 08 ff f8 addi r8,r8,-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;
ffc1aa28: 7f 88 38 40 cmplw cr7,r8,r7
ffc1aa2c: 41 9c 00 14 blt- cr7,ffc1aa40 <_Heap_Size_of_alloc_area+0x34>
ffc1aa30: 81 43 00 24 lwz r10,36(r3)
ffc1aa34: 7d 48 50 10 subfc r10,r8,r10
ffc1aa38: 39 40 00 00 li r10,0
ffc1aa3c: 7d 4a 51 14 adde r10,r10,r10
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 ) ) {
ffc1aa40: 2f 8a 00 00 cmpwi cr7,r10,0
return false;
ffc1aa44: 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 ) ) {
ffc1aa48: 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;
ffc1aa4c: 81 48 00 04 lwz r10,4(r8)
ffc1aa50: 55 4a 00 3c rlwinm r10,r10,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);
ffc1aa54: 7d 4a 42 14 add r10,r10,r8
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;
ffc1aa58: 7f 8a 38 40 cmplw cr7,r10,r7
ffc1aa5c: 39 00 00 00 li r8,0
ffc1aa60: 41 9c 00 14 blt- cr7,ffc1aa74 <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN
ffc1aa64: 81 09 00 24 lwz r8,36(r9)
ffc1aa68: 7d 0a 40 10 subfc r8,r10,r8
ffc1aa6c: 39 00 00 00 li r8,0
ffc1aa70: 7d 08 41 14 adde r8,r8,r8
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1aa74: 2f 88 00 00 cmpwi cr7,r8,0
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 ) ) {
return false;
ffc1aa78: 38 60 00 00 li r3,0
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc1aa7c: 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;
ffc1aa80: 81 2a 00 04 lwz r9,4(r10)
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
ffc1aa84: 71 28 00 01 andi. r8,r9,1
ffc1aa88: 4d 82 00 20 beqlr
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin;
ffc1aa8c: 20 84 00 04 subfic r4,r4,4
ffc1aa90: 7d 44 52 14 add r10,r4,r10
ffc1aa94: 91 45 00 00 stw r10,0(r5)
return true;
ffc1aa98: 38 60 00 01 li r3,1
}
ffc1aa9c: 4e 80 00 20 blr
ffc0a34c <_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;
ffc0a34c: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc0a350: 94 21 ff 98 stwu r1,-104(r1)
ffc0a354: 7c 08 02 a6 mflr r0
ffc0a358: bd c1 00 20 stmw r14,32(r1)
ffc0a35c: 7c 7d 1b 78 mr r29,r3
ffc0a360: 7c 9e 23 78 mr r30,r4
ffc0a364: 90 01 00 6c stw r0,108(r1)
uintptr_t const page_size = heap->page_size;
ffc0a368: 83 43 00 10 lwz r26,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0a36c: 83 03 00 14 lwz r24,20(r3)
Heap_Block *const first_block = heap->first_block;
ffc0a370: 83 83 00 20 lwz r28,32(r3)
Heap_Block *const last_block = heap->last_block;
ffc0a374: 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;
ffc0a378: 41 9e 00 10 beq- cr7,ffc0a388 <_Heap_Walk+0x3c>
ffc0a37c: 3f e0 ff c1 lis r31,-63
ffc0a380: 3b ff a2 9c addi r31,r31,-23908
ffc0a384: 48 00 00 0c b ffc0a390 <_Heap_Walk+0x44>
ffc0a388: 3f e0 ff c1 lis r31,-63
ffc0a38c: 3b ff a2 98 addi r31,r31,-23912
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0a390: 3d 20 00 00 lis r9,0
ffc0a394: 81 29 28 08 lwz r9,10248(r9)
ffc0a398: 2f 89 00 03 cmpwi cr7,r9,3
ffc0a39c: 41 9e 00 0c beq- cr7,ffc0a3a8 <_Heap_Walk+0x5c>
return true;
ffc0a3a0: 38 60 00 01 li r3,1
ffc0a3a4: 48 00 04 cc b ffc0a870 <_Heap_Walk+0x524>
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)(
ffc0a3a8: 81 5d 00 08 lwz r10,8(r29)
ffc0a3ac: 3c a0 ff c1 lis r5,-63
ffc0a3b0: 81 1d 00 18 lwz r8,24(r29)
ffc0a3b4: 7f c3 f3 78 mr r3,r30
ffc0a3b8: 91 41 00 0c stw r10,12(r1)
ffc0a3bc: 38 80 00 00 li r4,0
ffc0a3c0: 38 a5 6e 94 addi r5,r5,28308
ffc0a3c4: 7f e9 03 a6 mtctr r31
ffc0a3c8: 81 5d 00 0c lwz r10,12(r29)
ffc0a3cc: 7f 46 d3 78 mr r6,r26
ffc0a3d0: 81 3d 00 1c lwz r9,28(r29)
ffc0a3d4: 7f 07 c3 78 mr r7,r24
ffc0a3d8: 91 41 00 10 stw r10,16(r1)
ffc0a3dc: 7f 8a e3 78 mr r10,r28
ffc0a3e0: 92 e1 00 08 stw r23,8(r1)
ffc0a3e4: 4c c6 31 82 crclr 4*cr1+eq
ffc0a3e8: 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 ) {
ffc0a3ec: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0a3f0: 40 be 00 18 bne+ cr7,ffc0a408 <_Heap_Walk+0xbc>
(*printer)( source, true, "page size is zero\n" );
ffc0a3f4: 3c a0 ff c1 lis r5,-63
ffc0a3f8: 7f c3 f3 78 mr r3,r30
ffc0a3fc: 38 80 00 01 li r4,1
ffc0a400: 38 a5 6f 25 addi r5,r5,28453
ffc0a404: 48 00 00 d8 b ffc0a4dc <_Heap_Walk+0x190>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0a408: 73 47 00 07 andi. r7,r26,7
ffc0a40c: 41 a2 00 1c beq+ ffc0a428 <_Heap_Walk+0xdc>
(*printer)(
ffc0a410: 3c a0 ff c1 lis r5,-63
ffc0a414: 7f c3 f3 78 mr r3,r30
ffc0a418: 38 80 00 01 li r4,1
ffc0a41c: 38 a5 6f 38 addi r5,r5,28472
ffc0a420: 7f 46 d3 78 mr r6,r26
ffc0a424: 48 00 04 3c b ffc0a860 <_Heap_Walk+0x514>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a428: 7d 38 d3 96 divwu r9,r24,r26
ffc0a42c: 7d 29 d1 d6 mullw r9,r9,r26
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0a430: 7f 98 48 00 cmpw cr7,r24,r9
ffc0a434: 41 be 00 1c beq+ cr7,ffc0a450 <_Heap_Walk+0x104>
(*printer)(
ffc0a438: 3c a0 ff c1 lis r5,-63
ffc0a43c: 7f c3 f3 78 mr r3,r30
ffc0a440: 38 80 00 01 li r4,1
ffc0a444: 38 a5 6f 56 addi r5,r5,28502
ffc0a448: 7f 06 c3 78 mr r6,r24
ffc0a44c: 48 00 04 14 b ffc0a860 <_Heap_Walk+0x514>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0a450: 39 3c 00 08 addi r9,r28,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a454: 7d 49 d3 96 divwu r10,r9,r26
ffc0a458: 7d 4a d1 d6 mullw r10,r10,r26
);
return false;
}
if (
ffc0a45c: 7f 89 50 00 cmpw cr7,r9,r10
ffc0a460: 41 be 00 18 beq+ cr7,ffc0a478 <_Heap_Walk+0x12c>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc0a464: 3c a0 ff c1 lis r5,-63
ffc0a468: 7f c3 f3 78 mr r3,r30
ffc0a46c: 38 80 00 01 li r4,1
ffc0a470: 38 a5 6f 7a addi r5,r5,28538
ffc0a474: 48 00 03 e8 b ffc0a85c <_Heap_Walk+0x510>
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;
ffc0a478: 81 3c 00 04 lwz r9,4(r28)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0a47c: 71 27 00 01 andi. r7,r9,1
ffc0a480: 40 a2 00 18 bne+ ffc0a498 <_Heap_Walk+0x14c>
(*printer)(
ffc0a484: 3c a0 ff c1 lis r5,-63
ffc0a488: 7f c3 f3 78 mr r3,r30
ffc0a48c: 38 80 00 01 li r4,1
ffc0a490: 38 a5 6f ab addi r5,r5,28587
ffc0a494: 48 00 00 48 b ffc0a4dc <_Heap_Walk+0x190>
- 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;
ffc0a498: 82 d7 00 04 lwz r22,4(r23)
ffc0a49c: 56 d6 00 3c rlwinm r22,r22,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);
ffc0a4a0: 7e d7 b2 14 add r22,r23,r22
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;
ffc0a4a4: 81 36 00 04 lwz r9,4(r22)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc0a4a8: 71 27 00 01 andi. r7,r9,1
ffc0a4ac: 40 a2 00 18 bne+ ffc0a4c4 <_Heap_Walk+0x178>
(*printer)(
ffc0a4b0: 3c a0 ff c1 lis r5,-63
ffc0a4b4: 7f c3 f3 78 mr r3,r30
ffc0a4b8: 38 80 00 01 li r4,1
ffc0a4bc: 38 a5 6f d9 addi r5,r5,28633
ffc0a4c0: 48 00 00 1c b ffc0a4dc <_Heap_Walk+0x190>
);
return false;
}
if (
ffc0a4c4: 7f 96 e0 00 cmpw cr7,r22,r28
ffc0a4c8: 41 9e 00 24 beq- cr7,ffc0a4ec <_Heap_Walk+0x1a0>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
ffc0a4cc: 3c a0 ff c1 lis r5,-63
ffc0a4d0: 7f c3 f3 78 mr r3,r30
ffc0a4d4: 38 80 00 01 li r4,1
ffc0a4d8: 38 a5 6f ee addi r5,r5,28654
ffc0a4dc: 7f e9 03 a6 mtctr r31
ffc0a4e0: 4c c6 31 82 crclr 4*cr1+eq
ffc0a4e4: 4e 80 04 21 bctrl
ffc0a4e8: 48 00 03 5c b ffc0a844 <_Heap_Walk+0x4f8>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc0a4ec: 81 3d 00 10 lwz r9,16(r29)
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
ffc0a4f0: 7f aa eb 78 mr r10,r29
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a4f4: 80 dd 00 08 lwz r6,8(r29)
ffc0a4f8: 48 00 00 bc b ffc0a5b4 <_Heap_Walk+0x268>
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;
ffc0a4fc: 80 fd 00 20 lwz r7,32(r29)
ffc0a500: 39 00 00 00 li r8,0
ffc0a504: 7f 87 30 40 cmplw cr7,r7,r6
ffc0a508: 41 9d 00 14 bgt- cr7,ffc0a51c <_Heap_Walk+0x1d0>
ffc0a50c: 81 1d 00 24 lwz r8,36(r29)
ffc0a510: 7d 06 40 10 subfc r8,r6,r8
ffc0a514: 39 00 00 00 li r8,0
ffc0a518: 7d 08 41 14 adde r8,r8,r8
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 ) ) {
ffc0a51c: 2f 88 00 00 cmpwi cr7,r8,0
ffc0a520: 40 be 00 18 bne+ cr7,ffc0a538 <_Heap_Walk+0x1ec>
(*printer)(
ffc0a524: 3c a0 ff c1 lis r5,-63
ffc0a528: 7f c3 f3 78 mr r3,r30
ffc0a52c: 38 80 00 01 li r4,1
ffc0a530: 38 a5 70 1d addi r5,r5,28701
ffc0a534: 48 00 03 2c b ffc0a860 <_Heap_Walk+0x514>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0a538: 39 06 00 08 addi r8,r6,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a53c: 7c e8 4b 96 divwu r7,r8,r9
ffc0a540: 7c e7 49 d6 mullw r7,r7,r9
);
return false;
}
if (
ffc0a544: 7f 88 38 00 cmpw cr7,r8,r7
ffc0a548: 41 be 00 18 beq+ cr7,ffc0a560 <_Heap_Walk+0x214>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc0a54c: 3c a0 ff c1 lis r5,-63
ffc0a550: 7f c3 f3 78 mr r3,r30
ffc0a554: 38 80 00 01 li r4,1
ffc0a558: 38 a5 70 3d addi r5,r5,28733
ffc0a55c: 48 00 03 04 b ffc0a860 <_Heap_Walk+0x514>
- 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;
ffc0a560: 81 06 00 04 lwz r8,4(r6)
ffc0a564: 55 08 00 3c rlwinm r8,r8,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0a568: 7d 06 42 14 add r8,r6,r8
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;
ffc0a56c: 81 08 00 04 lwz r8,4(r8)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0a570: 71 07 00 01 andi. r7,r8,1
ffc0a574: 41 a2 00 18 beq+ ffc0a58c <_Heap_Walk+0x240>
(*printer)(
ffc0a578: 3c a0 ff c1 lis r5,-63
ffc0a57c: 7f c3 f3 78 mr r3,r30
ffc0a580: 38 80 00 01 li r4,1
ffc0a584: 38 a5 70 6d addi r5,r5,28781
ffc0a588: 48 00 02 d8 b ffc0a860 <_Heap_Walk+0x514>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0a58c: 80 e6 00 0c lwz r7,12(r6)
ffc0a590: 7f 87 50 00 cmpw cr7,r7,r10
ffc0a594: 41 be 00 18 beq+ cr7,ffc0a5ac <_Heap_Walk+0x260>
(*printer)(
ffc0a598: 3c a0 ff c1 lis r5,-63
ffc0a59c: 7f c3 f3 78 mr r3,r30
ffc0a5a0: 38 80 00 01 li r4,1
ffc0a5a4: 38 a5 70 89 addi r5,r5,28809
ffc0a5a8: 48 00 01 38 b ffc0a6e0 <_Heap_Walk+0x394>
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0a5ac: 7c ca 33 78 mr r10,r6
ffc0a5b0: 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 ) {
ffc0a5b4: 7f 86 e8 00 cmpw cr7,r6,r29
ffc0a5b8: 40 9e ff 44 bne+ cr7,ffc0a4fc <_Heap_Walk+0x1b0>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a5bc: 3e 80 ff c1 lis r20,-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)(
ffc0a5c0: 3e 60 ff c1 lis r19,-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)(
ffc0a5c4: 3e 40 ff c1 lis r18,-63
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 ) {
ffc0a5c8: 7e dc b3 78 mr r28,r22
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a5cc: 3a 94 72 29 addi r20,r20,29225
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0a5d0: 3a 73 72 12 addi r19,r19,29202
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)(
ffc0a5d4: 3a 52 71 75 addi r18,r18,29045
ffc0a5d8: 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)" : "")
ffc0a5dc: 3e a0 ff c1 lis r21,-63
ffc0a5e0: 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)(
ffc0a5e4: 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)" : ""),
ffc0a5e8: 3d c0 ff c1 lis r14,-63
block = next_block;
} while ( block != first_block );
return true;
}
ffc0a5ec: 81 7c 00 04 lwz r11,4(r28)
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;
ffc0a5f0: 7f 89 ba 78 xor r9,r28,r23
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;
ffc0a5f4: 81 1d 00 20 lwz r8,32(r29)
ffc0a5f8: 7d 29 00 34 cntlzw r9,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;
ffc0a5fc: 55 7b 00 3c rlwinm r27,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);
ffc0a600: 7f 3b e2 14 add r25,r27,r28
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;
ffc0a604: 7f 88 c8 40 cmplw cr7,r8,r25
ffc0a608: 55 29 d9 7e rlwinm r9,r9,27,5,31
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;
ffc0a60c: 55 6b 07 fe clrlwi r11,r11,31
ffc0a610: 69 29 00 01 xori r9,r9,1
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;
ffc0a614: 39 40 00 00 li r10,0
ffc0a618: 41 9d 00 14 bgt- cr7,ffc0a62c <_Heap_Walk+0x2e0> <== NEVER TAKEN
ffc0a61c: 81 5d 00 24 lwz r10,36(r29)
ffc0a620: 7d 59 50 10 subfc r10,r25,r10
ffc0a624: 39 40 00 00 li r10,0
ffc0a628: 7d 4a 51 14 adde r10,r10,r10
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0a62c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0a630: 40 be 00 18 bne+ cr7,ffc0a648 <_Heap_Walk+0x2fc>
(*printer)(
ffc0a634: 3c a0 ff c1 lis r5,-63
ffc0a638: 7f c3 f3 78 mr r3,r30
ffc0a63c: 38 80 00 01 li r4,1
ffc0a640: 38 a5 70 bb addi r5,r5,28859
ffc0a644: 48 00 00 94 b ffc0a6d8 <_Heap_Walk+0x38c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0a648: 7d 5b d3 96 divwu r10,r27,r26
ffc0a64c: 7d 4a d1 d6 mullw r10,r10,r26
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0a650: 7f 9b 50 00 cmpw cr7,r27,r10
ffc0a654: 41 9e 00 28 beq- cr7,ffc0a67c <_Heap_Walk+0x330>
ffc0a658: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a65c: 41 be 00 94 beq+ cr7,ffc0a6f0 <_Heap_Walk+0x3a4>
(*printer)(
ffc0a660: 3c a0 ff c1 lis r5,-63
ffc0a664: 7f c3 f3 78 mr r3,r30
ffc0a668: 38 80 00 01 li r4,1
ffc0a66c: 38 a5 70 e8 addi r5,r5,28904
ffc0a670: 7f 86 e3 78 mr r6,r28
ffc0a674: 7f 67 db 78 mr r7,r27
ffc0a678: 48 00 00 68 b ffc0a6e0 <_Heap_Walk+0x394>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
ffc0a67c: 7f 9b c0 40 cmplw cr7,r27,r24
ffc0a680: 40 9c 00 38 bge- cr7,ffc0a6b8 <_Heap_Walk+0x36c>
ffc0a684: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a688: 41 be 00 68 beq+ cr7,ffc0a6f0 <_Heap_Walk+0x3a4> <== NEVER TAKEN
(*printer)(
ffc0a68c: 3c a0 ff c1 lis r5,-63
ffc0a690: 7f e9 03 a6 mtctr r31
ffc0a694: 7f c3 f3 78 mr r3,r30
ffc0a698: 38 80 00 01 li r4,1
ffc0a69c: 38 a5 71 16 addi r5,r5,28950
ffc0a6a0: 7f 86 e3 78 mr r6,r28
ffc0a6a4: 7f 67 db 78 mr r7,r27
ffc0a6a8: 7f 08 c3 78 mr r8,r24
ffc0a6ac: 4c c6 31 82 crclr 4*cr1+eq
ffc0a6b0: 4e 80 04 21 bctrl
ffc0a6b4: 48 00 01 90 b ffc0a844 <_Heap_Walk+0x4f8>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
ffc0a6b8: 7f 99 e0 40 cmplw cr7,r25,r28
ffc0a6bc: 41 9d 00 34 bgt- cr7,ffc0a6f0 <_Heap_Walk+0x3a4>
ffc0a6c0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a6c4: 41 be 00 2c beq+ cr7,ffc0a6f0 <_Heap_Walk+0x3a4>
(*printer)(
ffc0a6c8: 3c a0 ff c1 lis r5,-63
ffc0a6cc: 7f c3 f3 78 mr r3,r30
ffc0a6d0: 38 80 00 01 li r4,1
ffc0a6d4: 38 a5 71 41 addi r5,r5,28993
ffc0a6d8: 7f 86 e3 78 mr r6,r28
ffc0a6dc: 7f 27 cb 78 mr r7,r25
ffc0a6e0: 7f e9 03 a6 mtctr r31
ffc0a6e4: 4c c6 31 82 crclr 4*cr1+eq
ffc0a6e8: 4e 80 04 21 bctrl
ffc0a6ec: 48 00 01 58 b ffc0a844 <_Heap_Walk+0x4f8>
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;
ffc0a6f0: 81 39 00 04 lwz r9,4(r25)
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0a6f4: 71 27 00 01 andi. r7,r9,1
ffc0a6f8: 40 a2 00 f4 bne+ ffc0a7ec <_Heap_Walk+0x4a0>
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 ?
ffc0a6fc: 81 1c 00 0c lwz r8,12(r28)
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)(
ffc0a700: 81 3d 00 08 lwz r9,8(r29)
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;
ffc0a704: 80 fd 00 0c lwz r7,12(r29)
ffc0a708: 7f 88 48 00 cmpw cr7,r8,r9
ffc0a70c: 41 9e 00 18 beq- cr7,ffc0a724 <_Heap_Walk+0x3d8>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0a710: 7f 88 e8 00 cmpw cr7,r8,r29
ffc0a714: 39 35 6d 3d addi r9,r21,27965
ffc0a718: 40 be 00 10 bne+ cr7,ffc0a728 <_Heap_Walk+0x3dc>
ffc0a71c: 39 2e 6e 71 addi r9,r14,28273
ffc0a720: 48 00 00 08 b ffc0a728 <_Heap_Walk+0x3dc>
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)(
ffc0a724: 39 2f 6e 61 addi r9,r15,28257
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
ffc0a728: 81 5c 00 08 lwz r10,8(r28)
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)(
ffc0a72c: 7f 8a 38 00 cmpw cr7,r10,r7
ffc0a730: 41 9e 00 18 beq- cr7,ffc0a748 <_Heap_Walk+0x3fc>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0a734: 7f 8a e8 00 cmpw cr7,r10,r29
ffc0a738: 38 f5 6d 3d addi r7,r21,27965
ffc0a73c: 40 be 00 10 bne+ cr7,ffc0a74c <_Heap_Walk+0x400>
ffc0a740: 38 f0 6e 8a addi r7,r16,28298
ffc0a744: 48 00 00 08 b ffc0a74c <_Heap_Walk+0x400>
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)(
ffc0a748: 38 f1 6e 7b addi r7,r17,28283
ffc0a74c: 90 e1 00 08 stw r7,8(r1)
ffc0a750: 7f c3 f3 78 mr r3,r30
ffc0a754: 38 80 00 00 li r4,0
ffc0a758: 7f e9 03 a6 mtctr r31
ffc0a75c: 91 61 00 18 stw r11,24(r1)
ffc0a760: 7e 45 93 78 mr r5,r18
ffc0a764: 7f 86 e3 78 mr r6,r28
ffc0a768: 7f 67 db 78 mr r7,r27
ffc0a76c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a770: 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 ) {
ffc0a774: 81 19 00 00 lwz r8,0(r25)
ffc0a778: 81 61 00 18 lwz r11,24(r1)
ffc0a77c: 7f 9b 40 00 cmpw cr7,r27,r8
ffc0a780: 41 be 00 30 beq+ cr7,ffc0a7b0 <_Heap_Walk+0x464>
(*printer)(
ffc0a784: 3c a0 ff c1 lis r5,-63
ffc0a788: 7f e9 03 a6 mtctr r31
ffc0a78c: 7f c3 f3 78 mr r3,r30
ffc0a790: 38 80 00 01 li r4,1
ffc0a794: 38 a5 71 aa addi r5,r5,29098
ffc0a798: 7f 86 e3 78 mr r6,r28
ffc0a79c: 7f 67 db 78 mr r7,r27
ffc0a7a0: 7f 29 cb 78 mr r9,r25
ffc0a7a4: 4c c6 31 82 crclr 4*cr1+eq
ffc0a7a8: 4e 80 04 21 bctrl
ffc0a7ac: 48 00 00 98 b ffc0a844 <_Heap_Walk+0x4f8>
);
return false;
}
if ( !prev_used ) {
ffc0a7b0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a7b4: 40 be 00 18 bne+ cr7,ffc0a7cc <_Heap_Walk+0x480>
(*printer)(
ffc0a7b8: 3c a0 ff c1 lis r5,-63
ffc0a7bc: 7f c3 f3 78 mr r3,r30
ffc0a7c0: 38 80 00 01 li r4,1
ffc0a7c4: 38 a5 71 e3 addi r5,r5,29155
ffc0a7c8: 48 00 00 94 b ffc0a85c <_Heap_Walk+0x510>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0a7cc: 81 3d 00 08 lwz r9,8(r29)
ffc0a7d0: 48 00 00 10 b ffc0a7e0 <_Heap_Walk+0x494>
{
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 ) {
ffc0a7d4: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0a7d8: 41 9e 00 5c beq- cr7,ffc0a834 <_Heap_Walk+0x4e8>
return true;
}
free_block = free_block->next;
ffc0a7dc: 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 ) {
ffc0a7e0: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0a7e4: 40 9e ff f0 bne+ cr7,ffc0a7d4 <_Heap_Walk+0x488>
ffc0a7e8: 48 00 00 64 b ffc0a84c <_Heap_Walk+0x500>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0a7ec: 2f 8b 00 00 cmpwi cr7,r11,0
(*printer)(
ffc0a7f0: 7f c3 f3 78 mr r3,r30
ffc0a7f4: 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) {
ffc0a7f8: 41 9e 00 20 beq- cr7,ffc0a818 <_Heap_Walk+0x4cc>
(*printer)(
ffc0a7fc: 7e 65 9b 78 mr r5,r19
ffc0a800: 7f e9 03 a6 mtctr r31
ffc0a804: 7f 86 e3 78 mr r6,r28
ffc0a808: 7f 67 db 78 mr r7,r27
ffc0a80c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a810: 4e 80 04 21 bctrl
ffc0a814: 48 00 00 20 b ffc0a834 <_Heap_Walk+0x4e8>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0a818: 7e 85 a3 78 mr r5,r20
ffc0a81c: 81 1c 00 00 lwz r8,0(r28)
ffc0a820: 7f 86 e3 78 mr r6,r28
ffc0a824: 7f e9 03 a6 mtctr r31
ffc0a828: 7f 67 db 78 mr r7,r27
ffc0a82c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a830: 4e 80 04 21 bctrl
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc0a834: 7f 99 b0 00 cmpw cr7,r25,r22
ffc0a838: 7f 3c cb 78 mr r28,r25
ffc0a83c: 40 9e fd b0 bne+ cr7,ffc0a5ec <_Heap_Walk+0x2a0>
ffc0a840: 4b ff fb 60 b ffc0a3a0 <_Heap_Walk+0x54>
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0a844: 38 60 00 00 li r3,0
ffc0a848: 48 00 00 28 b ffc0a870 <_Heap_Walk+0x524>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0a84c: 3c a0 ff c1 lis r5,-63
ffc0a850: 7f c3 f3 78 mr r3,r30
ffc0a854: 38 80 00 01 li r4,1
ffc0a858: 38 a5 72 4e addi r5,r5,29262
ffc0a85c: 7f 86 e3 78 mr r6,r28
ffc0a860: 7f e9 03 a6 mtctr r31
ffc0a864: 4c c6 31 82 crclr 4*cr1+eq
ffc0a868: 4e 80 04 21 bctrl
ffc0a86c: 4b ff ff d8 b ffc0a844 <_Heap_Walk+0x4f8>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0a870: 39 61 00 68 addi r11,r1,104
ffc0a874: 4b ff 62 f4 b ffc00b68 <_restgpr_14_x>
ffc0a29c <_Heap_Walk_print>:
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0a29c: 7c 2b 0b 78 mr r11,r1
ffc0a2a0: 7c 08 02 a6 mflr r0
ffc0a2a4: 94 21 ff 88 stwu r1,-120(r1)
ffc0a2a8: 4b ff 68 b9 bl ffc00b60 <_savegpr_31>
ffc0a2ac: 90 01 00 7c stw r0,124(r1)
ffc0a2b0: 7c 6b 1b 78 mr r11,r3
ffc0a2b4: 90 c1 00 1c stw r6,28(r1)
ffc0a2b8: 90 e1 00 20 stw r7,32(r1)
ffc0a2bc: 91 01 00 24 stw r8,36(r1)
ffc0a2c0: 91 21 00 28 stw r9,40(r1)
ffc0a2c4: 91 41 00 2c stw r10,44(r1)
ffc0a2c8: 40 86 00 24 bne- cr1,ffc0a2ec <_Heap_Walk_print+0x50> <== ALWAYS TAKEN
ffc0a2cc: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0a2d0: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0a2d4: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0a2d8: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0a2dc: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0a2e0: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0a2e4: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0a2e8: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc0a2ec: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0a2f0: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc0a2f4: 41 be 00 10 beq+ cr7,ffc0a304 <_Heap_Walk_print+0x68>
printk( "FAIL[%d]: ", source );
ffc0a2f8: 3c 60 ff c1 lis r3,-63
ffc0a2fc: 38 63 6e 4b addi r3,r3,28235
ffc0a300: 48 00 00 0c b ffc0a30c <_Heap_Walk_print+0x70>
} else {
printk( "PASS[%d]: ", source );
ffc0a304: 3c 60 ff c1 lis r3,-63
ffc0a308: 38 63 6e 56 addi r3,r3,28246
ffc0a30c: 7d 64 5b 78 mr r4,r11
ffc0a310: 4c c6 31 82 crclr 4*cr1+eq
ffc0a314: 4b ff b3 59 bl ffc0566c <printk>
}
va_start( ap, fmt );
ffc0a318: 39 20 00 03 li r9,3
ffc0a31c: 99 21 00 08 stb r9,8(r1)
ffc0a320: 39 20 00 00 li r9,0
vprintk( fmt, ap );
ffc0a324: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0a328: 99 21 00 09 stb r9,9(r1)
ffc0a32c: 39 21 00 80 addi r9,r1,128
vprintk( fmt, ap );
ffc0a330: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0a334: 91 21 00 0c stw r9,12(r1)
ffc0a338: 39 21 00 10 addi r9,r1,16
ffc0a33c: 91 21 00 10 stw r9,16(r1)
vprintk( fmt, ap );
ffc0a340: 4b ff dd 75 bl ffc080b4 <vprintk>
va_end( ap );
}
ffc0a344: 39 61 00 78 addi r11,r1,120
ffc0a348: 4b ff 68 64 b ffc00bac <_restgpr_31_x>
ffc09d78 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc09d78: 94 21 ff d8 stwu r1,-40(r1)
ffc09d7c: 7c 08 02 a6 mflr r0
ffc09d80: bf a1 00 1c stmw r29,28(r1)
ffc09d84: 7c 9e 23 78 mr r30,r4
ffc09d88: 7c 7d 1b 78 mr r29,r3
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
ffc09d8c: 98 81 00 0c stb r4,12(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
ffc09d90: 3c 80 ff c1 lis r4,-63
ffc09d94: 38 84 bd 74 addi r4,r4,-17036
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
ffc09d98: 90 61 00 08 stw r3,8(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
ffc09d9c: 38 61 00 08 addi r3,r1,8
ffc09da0: 7c bf 2b 78 mr r31,r5
ffc09da4: 90 01 00 2c stw r0,44(r1)
Internal_errors_Source source,
bool is_internal,
Internal_errors_t error
)
{
User_extensions_Fatal_context ctx = { source, is_internal, error };
ffc09da8: 90 a1 00 10 stw r5,16(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Fatal_visitor );
ffc09dac: 48 00 1f ed bl ffc0bd98 <_User_extensions_Iterate>
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
ffc09db0: 3d 40 00 00 lis r10,0
ffc09db4: 39 2a 2d ec addi r9,r10,11756
ffc09db8: 93 aa 2d ec stw r29,11756(r10)
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc09dbc: 7f e3 fb 78 mr r3,r31
)
{
_User_extensions_Fatal( the_source, is_internal, the_error );
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc09dc0: 9b c9 00 04 stb r30,4(r9)
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc09dc4: 39 40 00 05 li r10,5
_Internal_errors_What_happened.the_error = the_error;
ffc09dc8: 93 e9 00 08 stw r31,8(r9)
ffc09dcc: 3d 20 00 00 lis r9,0
ffc09dd0: 91 49 28 4c stw r10,10316(r9)
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc09dd4: 4b ff 99 8d bl ffc03760 <_BSP_Fatal_error>
ffc09dd8: 48 00 00 00 b ffc09dd8 <_Internal_error_Occurred+0x60><== NOT EXECUTED
ffc09df0 <_Objects_Allocate>:
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc09df0: 94 21 ff f0 stwu r1,-16(r1)
ffc09df4: 7c 08 02 a6 mflr r0
ffc09df8: 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 )
ffc09dfc: 81 23 00 18 lwz r9,24(r3)
#endif
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc09e00: bf c1 00 08 stmw r30,8(r1)
ffc09e04: 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 )
ffc09e08: 2f 89 00 00 cmpwi cr7,r9,0
ffc09e0c: 40 be 00 0c bne+ cr7,ffc09e18 <_Objects_Allocate+0x28> <== ALWAYS TAKEN
return NULL;
ffc09e10: 38 60 00 00 li r3,0
ffc09e14: 48 00 00 70 b ffc09e84 <_Objects_Allocate+0x94>
/*
* 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 );
ffc09e18: 3b c3 00 20 addi r30,r3,32
ffc09e1c: 7f c3 f3 78 mr r3,r30
ffc09e20: 4b ff f5 b9 bl ffc093d8 <_Chain_Get>
if ( information->auto_extend ) {
ffc09e24: 89 3f 00 12 lbz r9,18(r31)
ffc09e28: 2f 89 00 00 cmpwi cr7,r9,0
ffc09e2c: 41 9e 00 58 beq- cr7,ffc09e84 <_Objects_Allocate+0x94>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc09e30: 2f 83 00 00 cmpwi cr7,r3,0
ffc09e34: 40 be 00 1c bne+ cr7,ffc09e50 <_Objects_Allocate+0x60>
_Objects_Extend_information( information );
ffc09e38: 7f e3 fb 78 mr r3,r31
ffc09e3c: 48 00 00 69 bl ffc09ea4 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc09e40: 7f c3 f3 78 mr r3,r30
ffc09e44: 4b ff f5 95 bl ffc093d8 <_Chain_Get>
}
if ( the_object ) {
ffc09e48: 2c 03 00 00 cmpwi r3,0
ffc09e4c: 41 82 ff c4 beq+ ffc09e10 <_Objects_Allocate+0x20>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc09e50: a1 43 00 0a lhz r10,10(r3)
ffc09e54: a1 3f 00 0a lhz r9,10(r31)
ffc09e58: 7d 29 50 50 subf r9,r9,r10
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc09e5c: a1 5f 00 14 lhz r10,20(r31)
ffc09e60: 7d 29 53 96 divwu r9,r9,r10
information->inactive_per_block[ block ]--;
ffc09e64: 81 5f 00 30 lwz r10,48(r31)
ffc09e68: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc09e6c: 7d 0a 48 2e lwzx r8,r10,r9
ffc09e70: 39 08 ff ff addi r8,r8,-1
ffc09e74: 7d 0a 49 2e stwx r8,r10,r9
information->inactive--;
ffc09e78: a1 3f 00 2c lhz r9,44(r31)
ffc09e7c: 39 29 ff ff addi r9,r9,-1
ffc09e80: b1 3f 00 2c sth r9,44(r31)
);
}
#endif
return the_object;
}
ffc09e84: 39 61 00 10 addi r11,r1,16
ffc09e88: 4b ff 67 38 b ffc005c0 <_restgpr_30_x>
ffc09ea4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09ea4: 94 21 ff b8 stwu r1,-72(r1)
ffc09ea8: 7c 08 02 a6 mflr r0
ffc09eac: 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 )
ffc09eb0: 81 43 00 34 lwz r10,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc09eb4: be a1 00 1c stmw r21,28(r1)
ffc09eb8: 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 )
ffc09ebc: 2f 8a 00 00 cmpwi cr7,r10,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 );
ffc09ec0: a3 83 00 0a lhz r28,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc09ec4: 41 9e 00 54 beq- cr7,ffc09f18 <_Objects_Extend_information+0x74>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc09ec8: a1 03 00 14 lhz r8,20(r3)
/*
* 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 );
ffc09ecc: 7f 9e e3 78 mr r30,r28
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc09ed0: a3 a3 00 10 lhz r29,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;
ffc09ed4: 3b 60 00 00 li r27,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc09ed8: 7f bd 43 96 divwu r29,r29,r8
ffc09edc: 2f 9d 00 00 cmpwi cr7,r29,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;
ffc09ee0: 39 3d 00 01 addi r9,r29,1
ffc09ee4: 40 be 00 24 bne+ cr7,ffc09f08 <_Objects_Extend_information+0x64><== ALWAYS TAKEN
ffc09ee8: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc09eec: 48 00 00 1c b ffc09f08 <_Objects_Extend_information+0x64><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09ef0: 57 67 10 3a rlwinm r7,r27,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 ) {
ffc09ef4: 7c ea 38 2e lwzx r7,r10,r7
ffc09ef8: 2f 87 00 00 cmpwi cr7,r7,0
ffc09efc: 41 9e 00 30 beq- cr7,ffc09f2c <_Objects_Extend_information+0x88>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc09f00: 7f de 42 14 add r30,r30,r8
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc09f04: 3b 7b 00 01 addi r27,r27,1
ffc09f08: 35 29 ff ff addic. r9,r9,-1
ffc09f0c: 40 82 ff e4 bne+ ffc09ef0 <_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;
ffc09f10: 3b 40 00 01 li r26,1
ffc09f14: 48 00 00 1c b ffc09f30 <_Objects_Extend_information+0x8c>
minimum_index = _Objects_Get_index( information->minimum_id );
ffc09f18: 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;
ffc09f1c: 3b 40 00 01 li r26,1
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc09f20: 3b 60 00 00 li r27,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
ffc09f24: 3b a0 00 00 li r29,0
ffc09f28: 48 00 00 08 b ffc09f30 <_Objects_Extend_information+0x8c>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc09f2c: 3b 40 00 00 li r26,0
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc09f30: a1 3f 00 14 lhz r9,20(r31)
ffc09f34: a3 3f 00 10 lhz r25,16(r31)
ffc09f38: 7f 29 ca 14 add r25,r9,r25
/*
* 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 ) {
ffc09f3c: 2b 99 ff ff cmplwi cr7,r25,65535
ffc09f40: 41 9d 02 10 bgt- cr7,ffc0a150 <_Objects_Extend_information+0x2ac>
/*
* 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;
ffc09f44: 80 7f 00 18 lwz r3,24(r31)
ffc09f48: 7c 69 19 d6 mullw r3,r9,r3
if ( information->auto_extend ) {
ffc09f4c: 89 3f 00 12 lbz r9,18(r31)
ffc09f50: 2f 89 00 00 cmpwi cr7,r9,0
ffc09f54: 41 9e 00 14 beq- cr7,ffc09f68 <_Objects_Extend_information+0xc4>
new_object_block = _Workspace_Allocate( block_size );
ffc09f58: 48 00 23 49 bl ffc0c2a0 <_Workspace_Allocate>
if ( !new_object_block )
ffc09f5c: 7c 76 1b 79 mr. r22,r3
ffc09f60: 40 a2 00 10 bne+ ffc09f70 <_Objects_Extend_information+0xcc>
ffc09f64: 48 00 01 ec b ffc0a150 <_Objects_Extend_information+0x2ac>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc09f68: 48 00 23 61 bl ffc0c2c8 <_Workspace_Allocate_or_fatal_error>
ffc09f6c: 7c 76 1b 78 mr r22,r3
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
ffc09f70: 2f 9a 00 00 cmpwi cr7,r26,0
ffc09f74: 41 9e 01 58 beq- cr7,ffc0a0cc <_Objects_Extend_information+0x228>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc09f78: 3b 1d 00 01 addi r24,r29,1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc09f7c: 1d 38 00 03 mulli r9,r24,3
((maximum + minimum_index) * sizeof(Objects_Control *));
ffc09f80: 7c 79 e2 14 add r3,r25,r28
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc09f84: 7c 63 4a 14 add r3,r3,r9
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
ffc09f88: 89 3f 00 12 lbz r9,18(r31)
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
ffc09f8c: 54 63 10 3a rlwinm r3,r3,2,0,29
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
if ( information->auto_extend ) {
ffc09f90: 2f 89 00 00 cmpwi cr7,r9,0
ffc09f94: 41 9e 00 1c beq- cr7,ffc09fb0 <_Objects_Extend_information+0x10c>
object_blocks = _Workspace_Allocate( block_size );
ffc09f98: 48 00 23 09 bl ffc0c2a0 <_Workspace_Allocate>
if ( !object_blocks ) {
ffc09f9c: 7c 7a 1b 79 mr. r26,r3
ffc09fa0: 40 a2 00 18 bne+ ffc09fb8 <_Objects_Extend_information+0x114>
_Workspace_Free( new_object_block );
ffc09fa4: 7e c3 b3 78 mr r3,r22
ffc09fa8: 48 00 23 11 bl ffc0c2b8 <_Workspace_Free>
ffc09fac: 48 00 01 a4 b ffc0a150 <_Objects_Extend_information+0x2ac>
return;
}
} else {
object_blocks = _Workspace_Allocate_or_fatal_error( block_size );
ffc09fb0: 48 00 23 19 bl ffc0c2c8 <_Workspace_Allocate_or_fatal_error>
ffc09fb4: 7c 7a 1b 78 mr r26,r3
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc09fb8: a1 1f 00 10 lhz r8,16(r31)
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
object_blocks, block_count * sizeof(void*) );
ffc09fbc: 57 18 10 3a rlwinm r24,r24,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc09fc0: 7e fa c2 14 add r23,r26,r24
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc09fc4: 7f 88 e0 40 cmplw cr7,r8,r28
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc09fc8: 38 fc 00 01 addi r7,r28,1
ffc09fcc: 7f 17 c2 14 add r24,r23,r24
ffc09fd0: 7c e9 03 a6 mtctr r7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc09fd4: 39 20 00 00 li r9,0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc09fd8: 39 40 00 00 li r10,0
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc09fdc: 40 bd 00 50 ble+ cr7,ffc0a02c <_Objects_Extend_information+0x188>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc09fe0: 57 b5 10 3a rlwinm r21,r29,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,
ffc09fe4: 80 9f 00 34 lwz r4,52(r31)
ffc09fe8: 7e a5 ab 78 mr r5,r21
ffc09fec: 7f 43 d3 78 mr r3,r26
ffc09ff0: 48 00 65 4d bl ffc1053c <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc09ff4: 80 9f 00 30 lwz r4,48(r31)
ffc09ff8: 7e a5 ab 78 mr r5,r21
ffc09ffc: 7e e3 bb 78 mr r3,r23
ffc0a000: 48 00 65 3d bl ffc1053c <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0a004: a1 3f 00 10 lhz r9,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,
ffc0a008: 80 9f 00 1c lwz r4,28(r31)
ffc0a00c: 7f 03 c3 78 mr r3,r24
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0a010: 7c a9 e2 14 add r5,r9,r28
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0a014: 54 a5 10 3a rlwinm r5,r5,2,0,29
ffc0a018: 48 00 65 25 bl ffc1053c <memcpy>
ffc0a01c: 48 00 00 14 b ffc0a030 <_Objects_Extend_information+0x18c>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc0a020: 55 28 10 3a rlwinm r8,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;
ffc0a024: 7d 48 c1 2e stwx r10,r8,r24
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0a028: 39 29 00 01 addi r9,r9,1
ffc0a02c: 42 00 ff f4 bdnz+ ffc0a020 <_Objects_Extend_information+0x17c>
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc0a030: 39 20 00 00 li r9,0
ffc0a034: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0a038: 7d 3a e9 2e stwx r9,r26,r29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0a03c: 7f ca f3 78 mr r10,r30
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0a040: 38 e0 00 00 li r7,0
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
ffc0a044: 7d 37 e9 2e stwx r9,r23,r29
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0a048: a1 3f 00 14 lhz r9,20(r31)
index++ ) {
local_table[ index ] = NULL;
ffc0a04c: 7d 1e 4a 14 add r8,r30,r9
ffc0a050: 7f 9e 40 40 cmplw cr7,r30,r8
ffc0a054: 39 29 00 01 addi r9,r9,1
ffc0a058: 41 9d 00 0c bgt- cr7,ffc0a064 <_Objects_Extend_information+0x1c0><== NEVER TAKEN
ffc0a05c: 2f 88 00 00 cmpwi cr7,r8,0
ffc0a060: 40 be 00 18 bne+ cr7,ffc0a078 <_Objects_Extend_information+0x1d4><== ALWAYS TAKEN
ffc0a064: 39 20 00 01 li r9,1 <== NOT EXECUTED
ffc0a068: 48 00 00 10 b ffc0a078 <_Objects_Extend_information+0x1d4><== NOT EXECUTED
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc0a06c: 55 48 10 3a rlwinm r8,r10,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0a070: 7c e8 c1 2e stwx r7,r8,r24
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
ffc0a074: 39 4a 00 01 addi r10,r10,1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0a078: 35 29 ff ff addic. r9,r9,-1
ffc0a07c: 40 82 ff f0 bne+ ffc0a06c <_Objects_Extend_information+0x1c8>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a080: 7d 40 00 a6 mfmsr r10
ffc0a084: 7d 30 42 a6 mfsprg r9,0
ffc0a088: 7d 49 48 78 andc r9,r10,r9
ffc0a08c: 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) |
ffc0a090: 81 3f 00 00 lwz r9,0(r31)
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0a094: a1 1f 00 04 lhz r8,4(r31)
ffc0a098: 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;
ffc0a09c: b3 3f 00 10 sth r25,16(r31)
ffc0a0a0: 65 29 00 01 oris r9,r9,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a0a4: 7d 39 cb 78 or r25,r9,r25
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc0a0a8: 80 7f 00 34 lwz r3,52(r31)
ffc0a0ac: 55 08 d8 08 rlwinm r8,r8,27,0,4
information->object_blocks = object_blocks;
ffc0a0b0: 93 5f 00 34 stw r26,52(r31)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a0b4: 7f 39 43 78 or r25,r25,r8
information->inactive_per_block = inactive_per_block;
ffc0a0b8: 92 ff 00 30 stw r23,48(r31)
information->local_table = local_table;
ffc0a0bc: 93 1f 00 1c stw r24,28(r31)
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0a0c0: 93 3f 00 0c stw r25,12(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a0c4: 7d 40 01 24 mtmsr r10
information->maximum
);
_ISR_Enable( level );
_Workspace_Free( old_tables );
ffc0a0c8: 48 00 21 f1 bl ffc0c2b8 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0a0cc: 81 3f 00 34 lwz r9,52(r31)
ffc0a0d0: 57 7b 10 3a rlwinm r27,r27,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a0d4: 3b a1 00 08 addi r29,r1,8
ffc0a0d8: 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;
ffc0a0dc: 7e c9 d9 2e stwx r22,r9,r27
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a0e0: 7f a3 eb 78 mr r3,r29
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0a0e4: 3b 9f 00 20 addi r28,r31,32
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0a0e8: 81 3f 00 34 lwz r9,52(r31)
ffc0a0ec: 80 df 00 18 lwz r6,24(r31)
ffc0a0f0: 7c 89 d8 2e lwzx r4,r9,r27
ffc0a0f4: 4b ff f3 25 bl ffc09418 <_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 ) {
ffc0a0f8: 48 00 00 30 b ffc0a128 <_Objects_Extend_information+0x284>
ffc0a0fc: 81 3f 00 00 lwz r9,0(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0a100: 7f 83 e3 78 mr r3,r28
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
ffc0a104: a1 5f 00 04 lhz r10,4(r31)
ffc0a108: 55 29 c0 0e rlwinm r9,r9,24,0,7
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a10c: 55 4a d8 08 rlwinm r10,r10,27,0,4
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a110: 65 29 00 01 oris r9,r9,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0a114: 7d 29 53 78 or r9,r9,r10
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0a118: 7d 29 f3 78 or r9,r9,r30
ffc0a11c: 91 24 00 08 stw r9,8(r4)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc0a120: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0a124: 4b ff f2 85 bl ffc093a8 <_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 ) {
ffc0a128: 7f a3 eb 78 mr r3,r29
ffc0a12c: 4b ff f2 ad bl ffc093d8 <_Chain_Get>
ffc0a130: 7c 64 1b 79 mr. r4,r3
ffc0a134: 40 82 ff c8 bne+ ffc0a0fc <_Objects_Extend_information+0x258>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0a138: a1 3f 00 14 lhz r9,20(r31)
ffc0a13c: 81 5f 00 30 lwz r10,48(r31)
ffc0a140: 7d 2a d9 2e stwx r9,r10,r27
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0a144: a1 5f 00 2c lhz r10,44(r31)
ffc0a148: 7d 29 52 14 add r9,r9,r10
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
ffc0a14c: b1 3f 00 2c sth r9,44(r31)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc0a150: 39 61 00 48 addi r11,r1,72
ffc0a154: 4b ff 64 48 b ffc0059c <_restgpr_21_x>
ffc0a200 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0a200: 94 21 ff f0 stwu r1,-16(r1)
ffc0a204: 7c 08 02 a6 mflr r0
ffc0a208: bf c1 00 08 stmw r30,8(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0a20c: 7c 9f 23 79 mr. r31,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0a210: 90 01 00 14 stw r0,20(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0a214: 40 a2 00 0c bne+ ffc0a220 <_Objects_Get_information+0x20>
return NULL;
ffc0a218: 38 60 00 00 li r3,0
ffc0a21c: 48 00 00 50 b ffc0a26c <_Objects_Get_information+0x6c>
ffc0a220: 7c 7e 1b 78 mr r30,r3
/*
* 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 );
ffc0a224: 48 00 3d 41 bl ffc0df64 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc0a228: 2c 03 00 00 cmpwi r3,0
ffc0a22c: 41 a2 ff ec beq- ffc0a218 <_Objects_Get_information+0x18>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc0a230: 7f 9f 18 40 cmplw cr7,r31,r3
ffc0a234: 41 bd ff e4 bgt- cr7,ffc0a218 <_Objects_Get_information+0x18>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc0a238: 3d 20 00 00 lis r9,0
ffc0a23c: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0a240: 39 29 2b f8 addi r9,r9,11256
ffc0a244: 7d 29 f0 2e lwzx r9,r9,r30
ffc0a248: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a24c: 41 be ff cc beq- cr7,ffc0a218 <_Objects_Get_information+0x18><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc0a250: 57 ff 10 3a rlwinm r31,r31,2,0,29
ffc0a254: 7c 69 f8 2e lwzx r3,r9,r31
if ( !info )
ffc0a258: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a25c: 41 be ff bc beq- cr7,ffc0a218 <_Objects_Get_information+0x18><== 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 )
ffc0a260: a1 23 00 10 lhz r9,16(r3)
ffc0a264: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a268: 41 be ff b0 beq- cr7,ffc0a218 <_Objects_Get_information+0x18>
return NULL;
#endif
return info;
}
ffc0a26c: 39 61 00 10 addi r11,r1,16
ffc0a270: 4b ff 63 50 b ffc005c0 <_restgpr_30_x>
ffc1c6ec <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
ffc1c6ec: 81 23 00 08 lwz r9,8(r3)
ffc1c6f0: 21 29 00 01 subfic r9,r9,1
ffc1c6f4: 7c 89 22 14 add r4,r9,r4
if ( information->maximum >= index ) {
ffc1c6f8: a1 23 00 10 lhz r9,16(r3)
ffc1c6fc: 7f 89 20 40 cmplw cr7,r9,r4
ffc1c700: 41 9c 00 24 blt- cr7,ffc1c724 <_Objects_Get_no_protection+0x38>
if ( (the_object = information->local_table[ index ]) != NULL ) {
ffc1c704: 81 23 00 1c lwz r9,28(r3)
ffc1c708: 54 84 10 3a rlwinm r4,r4,2,0,29
ffc1c70c: 7c 69 20 2e lwzx r3,r9,r4
ffc1c710: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c714: 41 9e 00 10 beq- cr7,ffc1c724 <_Objects_Get_no_protection+0x38><== NEVER TAKEN
*location = OBJECTS_LOCAL;
ffc1c718: 39 20 00 00 li r9,0
ffc1c71c: 91 25 00 00 stw r9,0(r5)
return the_object;
ffc1c720: 4e 80 00 20 blr
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
ffc1c724: 39 20 00 01 li r9,1
ffc1c728: 91 25 00 00 stw r9,0(r5)
return NULL;
ffc1c72c: 38 60 00 00 li r3,0
}
ffc1c730: 4e 80 00 20 blr
ffc0e228 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0e228: 7c 2b 0b 78 mr r11,r1
ffc0e22c: 94 21 ff e0 stwu r1,-32(r1)
ffc0e230: 7c 08 02 a6 mflr r0
ffc0e234: 48 01 a4 55 bl ffc28688 <_savegpr_31>
ffc0e238: 7c 9f 23 78 mr r31,r4
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0e23c: 7c 64 1b 79 mr. r4,r3
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0e240: 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;
ffc0e244: 40 82 00 10 bne- ffc0e254 <_Objects_Id_to_name+0x2c>
ffc0e248: 3d 20 00 00 lis r9,0
ffc0e24c: 81 29 37 30 lwz r9,14128(r9)
ffc0e250: 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);
ffc0e254: 54 8a 47 7e rlwinm r10,r4,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0e258: 39 0a ff ff addi r8,r10,-1
ffc0e25c: 2b 88 00 02 cmplwi cr7,r8,2
ffc0e260: 40 9d 00 40 ble- cr7,ffc0e2a0 <_Objects_Id_to_name+0x78>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
ffc0e264: 38 60 00 03 li r3,3
ffc0e268: 48 00 00 54 b ffc0e2bc <_Objects_Id_to_name+0x94>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0e26c: 54 88 3e 7a rlwinm r8,r4,7,25,29
ffc0e270: 7c 6a 40 2e lwzx r3,r10,r8
if ( !information )
ffc0e274: 2f 83 00 00 cmpwi cr7,r3,0
ffc0e278: 41 be ff ec beq- cr7,ffc0e264 <_Objects_Id_to_name+0x3c><== 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 );
ffc0e27c: 38 a1 00 08 addi r5,r1,8
ffc0e280: 4b ff ff 29 bl ffc0e1a8 <_Objects_Get>
if ( !the_object )
ffc0e284: 2c 03 00 00 cmpwi r3,0
ffc0e288: 41 a2 ff dc beq- ffc0e264 <_Objects_Id_to_name+0x3c>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0e28c: 81 23 00 0c lwz r9,12(r3)
ffc0e290: 91 3f 00 00 stw r9,0(r31)
_Thread_Enable_dispatch();
ffc0e294: 48 00 0e 61 bl ffc0f0f4 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0e298: 38 60 00 00 li r3,0
ffc0e29c: 48 00 00 20 b ffc0e2bc <_Objects_Id_to_name+0x94>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
ffc0e2a0: 3d 00 00 00 lis r8,0
ffc0e2a4: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc0e2a8: 39 08 34 d8 addi r8,r8,13528
ffc0e2ac: 7d 48 50 2e lwzx r10,r8,r10
ffc0e2b0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0e2b4: 40 9e ff b8 bne+ cr7,ffc0e26c <_Objects_Id_to_name+0x44>
ffc0e2b8: 4b ff ff ac b ffc0e264 <_Objects_Id_to_name+0x3c>
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
ffc0e2bc: 39 61 00 20 addi r11,r1,32
ffc0e2c0: 4b ff 25 70 b ffc00830 <_restgpr_31_x>
ffc0b034 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b034: 94 21 ff e8 stwu r1,-24(r1)
ffc0b038: 7c 08 02 a6 mflr r0
ffc0b03c: bf 81 00 08 stmw r28,8(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
ffc0b040: 7c 9f 23 79 mr. r31,r4
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b044: 90 01 00 1c stw r0,28(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
ffc0b048: 41 82 01 9c beq- ffc0b1e4 <_RBTree_Extract_unprotected+0x1b0>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
ffc0b04c: 81 23 00 08 lwz r9,8(r3)
ffc0b050: 7c 7c 1b 78 mr r28,r3
ffc0b054: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0b058: 40 be 00 14 bne+ cr7,ffc0b06c <_RBTree_Extract_unprotected+0x38>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Successor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_RIGHT );
ffc0b05c: 7f e3 fb 78 mr r3,r31
ffc0b060: 38 80 00 01 li r4,1
ffc0b064: 48 00 04 f5 bl ffc0b558 <_RBTree_Next_unprotected>
RBTree_Node *next;
next = _RBTree_Successor_unprotected(the_node);
the_rbtree->first[RBT_LEFT] = next;
ffc0b068: 90 7c 00 08 stw r3,8(r28)
}
/* Check if max needs to be updated. min=max for 1 element trees so
* do not use else if here. */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
ffc0b06c: 81 3c 00 0c lwz r9,12(r28)
ffc0b070: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0b074: 40 be 00 14 bne+ cr7,ffc0b088 <_RBTree_Extract_unprotected+0x54>
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Predecessor_unprotected(
const RBTree_Node *node
)
{
return _RBTree_Next_unprotected( node, RBT_LEFT );
ffc0b078: 7f e3 fb 78 mr r3,r31
ffc0b07c: 38 80 00 00 li r4,0
ffc0b080: 48 00 04 d9 bl ffc0b558 <_RBTree_Next_unprotected>
RBTree_Node *previous;
previous = _RBTree_Predecessor_unprotected(the_node);
the_rbtree->first[RBT_RIGHT] = previous;
ffc0b084: 90 7c 00 0c stw r3,12(r28)
* 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]) {
ffc0b088: 83 df 00 04 lwz r30,4(r31)
ffc0b08c: 83 bf 00 08 lwz r29,8(r31)
ffc0b090: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0b094: 41 9e 00 d0 beq- cr7,ffc0b164 <_RBTree_Extract_unprotected+0x130>
ffc0b098: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b09c: 40 be 00 0c bne+ cr7,ffc0b0a8 <_RBTree_Extract_unprotected+0x74>
ffc0b0a0: 48 00 00 d0 b ffc0b170 <_RBTree_Extract_unprotected+0x13c>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
ffc0b0a4: 7d 3e 4b 78 mr r30,r9
ffc0b0a8: 81 3e 00 08 lwz r9,8(r30)
ffc0b0ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b0b0: 40 9e ff f4 bne+ cr7,ffc0b0a4 <_RBTree_Extract_unprotected+0x70>
* 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];
ffc0b0b4: 83 be 00 04 lwz r29,4(r30)
if(leaf) {
ffc0b0b8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b0bc: 41 9e 00 10 beq- cr7,ffc0b0cc <_RBTree_Extract_unprotected+0x98>
leaf->parent = target->parent;
ffc0b0c0: 81 3e 00 00 lwz r9,0(r30)
ffc0b0c4: 91 3d 00 00 stw r9,0(r29)
ffc0b0c8: 48 00 00 0c b ffc0b0d4 <_RBTree_Extract_unprotected+0xa0>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
ffc0b0cc: 7f c3 f3 78 mr r3,r30
ffc0b0d0: 4b ff fd cd bl ffc0ae9c <_RBTree_Extract_validate_unprotected>
}
victim_color = target->color;
dir = target != target->parent->child[0];
ffc0b0d4: 81 1e 00 00 lwz r8,0(r30)
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;
ffc0b0d8: 81 5e 00 0c lwz r10,12(r30)
dir = target != target->parent->child[0];
ffc0b0dc: 81 28 00 04 lwz r9,4(r8)
ffc0b0e0: 7f c9 4a 78 xor r9,r30,r9
ffc0b0e4: 7d 29 00 34 cntlzw r9,r9
ffc0b0e8: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b0ec: 69 29 00 01 xori r9,r9,1
target->parent->child[dir] = leaf;
ffc0b0f0: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b0f4: 7d 08 4a 14 add r8,r8,r9
ffc0b0f8: 93 a8 00 04 stw r29,4(r8)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
ffc0b0fc: 81 1f 00 00 lwz r8,0(r31)
ffc0b100: 81 28 00 04 lwz r9,4(r8)
ffc0b104: 7f e9 4a 78 xor r9,r31,r9
ffc0b108: 7d 29 00 34 cntlzw r9,r9
ffc0b10c: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b110: 69 29 00 01 xori r9,r9,1
the_node->parent->child[dir] = target;
ffc0b114: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b118: 7d 08 4a 14 add r8,r8,r9
ffc0b11c: 93 c8 00 04 stw r30,4(r8)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
ffc0b120: 81 3f 00 08 lwz r9,8(r31)
ffc0b124: 91 3e 00 08 stw r9,8(r30)
if (the_node->child[RBT_RIGHT])
ffc0b128: 81 3f 00 08 lwz r9,8(r31)
ffc0b12c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b130: 41 9e 00 08 beq- cr7,ffc0b138 <_RBTree_Extract_unprotected+0x104><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
ffc0b134: 93 c9 00 00 stw r30,0(r9)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
ffc0b138: 81 3f 00 04 lwz r9,4(r31)
ffc0b13c: 91 3e 00 04 stw r9,4(r30)
if (the_node->child[RBT_LEFT])
ffc0b140: 81 3f 00 04 lwz r9,4(r31)
ffc0b144: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b148: 41 9e 00 08 beq- cr7,ffc0b150 <_RBTree_Extract_unprotected+0x11c>
the_node->child[RBT_LEFT]->parent = target;
ffc0b14c: 93 c9 00 00 stw r30,0(r9)
/* 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;
ffc0b150: 81 3f 00 00 lwz r9,0(r31)
ffc0b154: 91 3e 00 00 stw r9,0(r30)
target->color = the_node->color;
ffc0b158: 81 3f 00 0c lwz r9,12(r31)
ffc0b15c: 91 3e 00 0c stw r9,12(r30)
ffc0b160: 48 00 00 50 b ffc0b1b0 <_RBTree_Extract_unprotected+0x17c>
* 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 ) {
ffc0b164: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b168: 40 be 00 0c bne+ cr7,ffc0b174 <_RBTree_Extract_unprotected+0x140>
ffc0b16c: 48 00 00 14 b ffc0b180 <_RBTree_Extract_unprotected+0x14c>
* 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]) {
ffc0b170: 7f dd f3 78 mr r29,r30
* 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 ) {
leaf->parent = the_node->parent;
ffc0b174: 81 3f 00 00 lwz r9,0(r31)
ffc0b178: 91 3d 00 00 stw r9,0(r29)
ffc0b17c: 48 00 00 0c b ffc0b188 <_RBTree_Extract_unprotected+0x154>
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
ffc0b180: 7f e3 fb 78 mr r3,r31
ffc0b184: 4b ff fd 19 bl ffc0ae9c <_RBTree_Extract_validate_unprotected>
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0b188: 81 1f 00 00 lwz r8,0(r31)
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;
ffc0b18c: 81 5f 00 0c lwz r10,12(r31)
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc0b190: 81 28 00 04 lwz r9,4(r8)
ffc0b194: 7f e9 4a 78 xor r9,r31,r9
ffc0b198: 7d 29 00 34 cntlzw r9,r9
ffc0b19c: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b1a0: 69 29 00 01 xori r9,r9,1
the_node->parent->child[dir] = leaf;
ffc0b1a4: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b1a8: 7d 08 4a 14 add r8,r8,r9
ffc0b1ac: 93 a8 00 04 stw r29,4(r8)
/* fix coloring. leaf has moved up the tree. The color of the deleted
* node is in victim_color. There are two cases:
* 1. Deleted a red node, its child must be black. Nothing must be done.
* 2. Deleted a black node, its child must be red. Paint child black.
*/
if (victim_color == RBT_BLACK) { /* eliminate case 1 */
ffc0b1b0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b1b4: 40 9e 00 10 bne- cr7,ffc0b1c4 <_RBTree_Extract_unprotected+0x190>
if (leaf) {
ffc0b1b8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b1bc: 41 9e 00 08 beq- cr7,ffc0b1c4 <_RBTree_Extract_unprotected+0x190>
leaf->color = RBT_BLACK; /* case 2 */
ffc0b1c0: 91 5d 00 0c stw r10,12(r29)
/* 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;
ffc0b1c4: 81 5c 00 04 lwz r10,4(r28)
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
ffc0b1c8: 39 20 00 00 li r9,0
ffc0b1cc: 91 3f 00 08 stw r9,8(r31)
ffc0b1d0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b1d4: 91 3f 00 04 stw r9,4(r31)
ffc0b1d8: 91 3f 00 00 stw r9,0(r31)
ffc0b1dc: 41 9e 00 08 beq- cr7,ffc0b1e4 <_RBTree_Extract_unprotected+0x1b0>
ffc0b1e0: 91 2a 00 0c stw r9,12(r10)
}
ffc0b1e4: 39 61 00 18 addi r11,r1,24
ffc0b1e8: 4b ff 5b 84 b ffc00d6c <_restgpr_28_x>
ffc0ba0c <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
ffc0ba0c: 94 21 ff e8 stwu r1,-24(r1)
ffc0ba10: 7c 08 02 a6 mflr r0
ffc0ba14: bf 81 00 08 stmw r28,8(r1)
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
ffc0ba18: 7c 7f 1b 79 mr. r31,r3
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
ffc0ba1c: 90 01 00 1c stw r0,28(r1)
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
ffc0ba20: 41 82 00 4c beq- ffc0ba6c <_RBTree_Initialize+0x60> <== NEVER TAKEN
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
ffc0ba24: 39 20 00 00 li r9,0
the_rbtree->root = NULL;
the_rbtree->first[0] = NULL;
the_rbtree->first[1] = NULL;
the_rbtree->compare_function = compare_function;
ffc0ba28: 90 9f 00 10 stw r4,16(r31)
ffc0ba2c: 7c de 33 78 mr r30,r6
ffc0ba30: 7c fc 3b 78 mr r28,r7
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
ffc0ba34: 91 3f 00 00 stw r9,0(r31)
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
ffc0ba38: 7c bd 2b 78 mr r29,r5
the_rbtree->root = NULL;
ffc0ba3c: 91 3f 00 04 stw r9,4(r31)
the_rbtree->first[0] = NULL;
ffc0ba40: 91 3f 00 08 stw r9,8(r31)
the_rbtree->first[1] = NULL;
ffc0ba44: 91 3f 00 0c stw r9,12(r31)
the_rbtree->compare_function = compare_function;
the_rbtree->is_unique = is_unique;
ffc0ba48: 99 1f 00 14 stb r8,20(r31)
while ( count-- ) {
ffc0ba4c: 48 00 00 18 b ffc0ba64 <_RBTree_Initialize+0x58>
_RBTree_Insert_unprotected(the_rbtree, next);
ffc0ba50: 7f a4 eb 78 mr r4,r29
ffc0ba54: 7f e3 fb 78 mr r3,r31
ffc0ba58: 4b ff fc 91 bl ffc0b6e8 <_RBTree_Insert_unprotected>
#include <rtems/system.h>
#include <rtems/score/address.h>
#include <rtems/score/rbtree.h>
#include <rtems/score/isr.h>
void _RBTree_Initialize(
ffc0ba5c: 7f bd e2 14 add r29,r29,r28
ffc0ba60: 3b de ff ff addi r30,r30,-1
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
ffc0ba64: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0ba68: 40 9e ff e8 bne+ cr7,ffc0ba50 <_RBTree_Initialize+0x44>
_RBTree_Insert_unprotected(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
ffc0ba6c: 39 61 00 18 addi r11,r1,24
ffc0ba70: 4b ff 5e f8 b ffc01968 <_restgpr_28_x>
ffc0b29c <_RBTree_Insert_unprotected>:
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b29c: 94 21 ff e0 stwu r1,-32(r1)
ffc0b2a0: 7c 08 02 a6 mflr r0
ffc0b2a4: bf 41 00 08 stmw r26,8(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0b2a8: 7c 9f 23 79 mr. r31,r4
*/
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc0b2ac: 90 01 00 24 stw r0,36(r1)
if(!the_node) return (RBTree_Node*)-1;
ffc0b2b0: 41 82 01 d8 beq- ffc0b488 <_RBTree_Insert_unprotected+0x1ec>
RBTree_Node *iter_node = the_rbtree->root;
ffc0b2b4: 83 c3 00 04 lwz r30,4(r3)
ffc0b2b8: 7c 7d 1b 78 mr r29,r3
int compare_result;
if (!iter_node) { /* special case: first node inserted */
ffc0b2bc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0b2c0: 7f db f3 78 mr r27,r30
ffc0b2c4: 40 be 00 28 bne+ cr7,ffc0b2ec <_RBTree_Insert_unprotected+0x50>
the_node->color = RBT_BLACK;
ffc0b2c8: 93 df 00 0c stw r30,12(r31)
the_rbtree->root = the_node;
ffc0b2cc: 93 e3 00 04 stw r31,4(r3)
the_rbtree->first[0] = the_rbtree->first[1] = the_node;
ffc0b2d0: 93 e3 00 0c stw r31,12(r3)
ffc0b2d4: 93 e3 00 08 stw r31,8(r3)
the_node->parent = (RBTree_Node *) the_rbtree;
ffc0b2d8: 90 7f 00 00 stw r3,0(r31)
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0b2dc: 93 df 00 08 stw r30,8(r31)
ffc0b2e0: 93 df 00 04 stw r30,4(r31)
ffc0b2e4: 48 00 01 c0 b ffc0b4a4 <_RBTree_Insert_unprotected+0x208>
(dir && _RBTree_Is_greater(compare_result)) ) {
the_rbtree->first[dir] = the_node;
}
break;
} else {
iter_node = iter_node->child[dir];
ffc0b2e8: 7f db f3 78 mr r27,r30
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) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
ffc0b2ec: 81 3d 00 10 lwz r9,16(r29)
ffc0b2f0: 7f e3 fb 78 mr r3,r31
ffc0b2f4: 7f c4 f3 78 mr r4,r30
ffc0b2f8: 7d 29 03 a6 mtctr r9
ffc0b2fc: 4e 80 04 21 bctrl
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
ffc0b300: 89 3d 00 14 lbz r9,20(r29)
ffc0b304: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b308: 41 9e 00 0c beq- cr7,ffc0b314 <_RBTree_Insert_unprotected+0x78>
ffc0b30c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b310: 41 9e 01 94 beq- cr7,ffc0b4a4 <_RBTree_Insert_unprotected+0x208>
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
ffc0b314: 7c 7c 18 f8 not r28,r3
ffc0b318: 57 9c 0f fe rlwinm r28,r28,1,31,31
if (!iter_node->child[dir]) {
ffc0b31c: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0b320: 7f de 4a 14 add r30,r30,r9
ffc0b324: 39 5e 00 04 addi r10,r30,4
ffc0b328: 83 de 00 04 lwz r30,4(r30)
ffc0b32c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0b330: 40 9e ff b8 bne+ cr7,ffc0b2e8 <_RBTree_Insert_unprotected+0x4c>
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0b334: 93 df 00 08 stw r30,8(r31)
the_node->color = RBT_RED;
ffc0b338: 39 00 00 01 li r8,1
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
ffc0b33c: 7d 3d 4a 14 add r9,r29,r9
compare_result = the_rbtree->compare_function(the_node, iter_node);
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
ffc0b340: 93 df 00 04 stw r30,4(r31)
the_node->color = RBT_RED;
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b344: 7f e3 fb 78 mr r3,r31
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
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;
ffc0b348: 93 ea 00 00 stw r31,0(r10)
the_node->parent = iter_node;
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b34c: 81 5d 00 10 lwz r10,16(r29)
if ( the_rbtree->is_unique && _RBTree_Is_equal( compare_result ) )
return iter_node;
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
if (!iter_node->child[dir]) {
the_node->child[RBT_LEFT] = the_node->child[RBT_RIGHT] = NULL;
the_node->color = RBT_RED;
ffc0b350: 91 1f 00 0c stw r8,12(r31)
iter_node->child[dir] = the_node;
the_node->parent = iter_node;
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b354: 7d 49 03 a6 mtctr r10
RBTree_Direction dir = !_RBTree_Is_lesser( compare_result );
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;
ffc0b358: 93 7f 00 00 stw r27,0(r31)
/* update min/max */
compare_result = the_rbtree->compare_function(
ffc0b35c: 80 89 00 08 lwz r4,8(r9)
ffc0b360: 4e 80 04 21 bctrl
the_node,
_RBTree_First(the_rbtree, dir)
);
if ( (!dir && _RBTree_Is_lesser(compare_result)) ||
ffc0b364: 2f 1c 00 00 cmpwi cr6,r28,0
ffc0b368: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b36c: 40 9a 00 0c bne- cr6,ffc0b378 <_RBTree_Insert_unprotected+0xdc>
ffc0b370: 40 bc 00 e4 bge+ cr7,ffc0b454 <_RBTree_Insert_unprotected+0x1b8>
ffc0b374: 48 00 00 08 b ffc0b37c <_RBTree_Insert_unprotected+0xe0>
(dir && _RBTree_Is_greater(compare_result)) ) {
ffc0b378: 40 9d 00 dc ble- cr7,ffc0b454 <_RBTree_Insert_unprotected+0x1b8>
the_rbtree->first[dir] = the_node;
ffc0b37c: 57 9c 10 3a rlwinm r28,r28,2,0,29
ffc0b380: 7f bd e2 14 add r29,r29,r28
ffc0b384: 93 fd 00 08 stw r31,8(r29)
ffc0b388: 48 00 00 cc b ffc0b454 <_RBTree_Insert_unprotected+0x1b8>
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
if(!(the_node->parent->parent)) return NULL;
ffc0b38c: 41 9e 00 38 beq- cr7,ffc0b3c4 <_RBTree_Insert_unprotected+0x128><== NEVER TAKEN
if(!(the_node->parent->parent->parent)) return NULL;
ffc0b390: 81 3d 00 00 lwz r9,0(r29)
ffc0b394: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b398: 41 9e 00 2c beq- cr7,ffc0b3c4 <_RBTree_Insert_unprotected+0x128><== 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])
ffc0b39c: 81 3d 00 04 lwz r9,4(r29)
ffc0b3a0: 7f 83 48 00 cmpw cr7,r3,r9
ffc0b3a4: 40 be 00 08 bne+ cr7,ffc0b3ac <_RBTree_Insert_unprotected+0x110>
return the_node->parent->child[RBT_RIGHT];
ffc0b3a8: 81 3d 00 08 lwz r9,8(r29)
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0b3ac: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b3b0: 41 9e 00 18 beq- cr7,ffc0b3c8 <_RBTree_Insert_unprotected+0x12c>
ffc0b3b4: 81 49 00 0c lwz r10,12(r9)
ffc0b3b8: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0b3bc: 40 be 00 0c bne+ cr7,ffc0b3c8 <_RBTree_Insert_unprotected+0x12c>
ffc0b3c0: 48 00 00 10 b ffc0b3d0 <_RBTree_Insert_unprotected+0x134>
)
{
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;
ffc0b3c4: 39 20 00 00 li r9,0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0b3c8: 39 40 00 00 li r10,0
ffc0b3cc: 48 00 00 08 b ffc0b3d4 <_RBTree_Insert_unprotected+0x138>
ffc0b3d0: 39 40 00 01 li r10,1
while (_RBTree_Is_red(_RBTree_Parent(the_node))) {
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)) {
ffc0b3d4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b3d8: 41 9e 00 14 beq- cr7,ffc0b3ec <_RBTree_Insert_unprotected+0x150>
the_node->parent->color = RBT_BLACK;
ffc0b3dc: 93 63 00 0c stw r27,12(r3)
u->color = RBT_BLACK;
ffc0b3e0: 93 69 00 0c stw r27,12(r9)
g->color = RBT_RED;
ffc0b3e4: 93 5d 00 0c stw r26,12(r29)
ffc0b3e8: 48 00 00 64 b ffc0b44c <_RBTree_Insert_unprotected+0x1b0>
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];
ffc0b3ec: 80 9d 00 04 lwz r4,4(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];
ffc0b3f0: 81 23 00 04 lwz r9,4(r3)
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b3f4: 7c 64 22 78 xor r4,r3,r4
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];
ffc0b3f8: 7f e9 4a 78 xor r9,r31,r9
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b3fc: 7c 84 00 34 cntlzw r4,r4
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];
ffc0b400: 7d 29 00 34 cntlzw r9,r9
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b404: 54 84 d9 7e rlwinm r4,r4,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];
ffc0b408: 55 29 d9 7e rlwinm r9,r9,27,5,31
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc0b40c: 68 9c 00 01 xori r28,r4,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];
ffc0b410: 69 29 00 01 xori r9,r9,1
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
ffc0b414: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0b418: 41 9e 00 18 beq- cr7,ffc0b430 <_RBTree_Insert_unprotected+0x194>
_RBTree_Rotate(the_node->parent, pdir);
ffc0b41c: 7f 84 e3 78 mr r4,r28
ffc0b420: 4b ff fe 01 bl ffc0b220 <_RBTree_Rotate>
the_node = the_node->child[pdir];
ffc0b424: 57 89 10 3a rlwinm r9,r28,2,0,29
ffc0b428: 7f ff 4a 14 add r31,r31,r9
ffc0b42c: 83 ff 00 04 lwz r31,4(r31)
}
the_node->parent->color = RBT_BLACK;
ffc0b430: 81 3f 00 00 lwz r9,0(r31)
g->color = RBT_RED;
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0b434: 7f a3 eb 78 mr r3,r29
ffc0b438: 20 9c 00 01 subfic r4,r28,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;
ffc0b43c: 93 69 00 0c stw r27,12(r9)
g->color = RBT_RED;
ffc0b440: 93 5d 00 0c stw r26,12(r29)
/* now rotate grandparent in the other branch direction (toward uncle) */
_RBTree_Rotate(g, (1-pdir));
ffc0b444: 7f fd fb 78 mr r29,r31
ffc0b448: 4b ff fd d9 bl ffc0b220 <_RBTree_Rotate>
ffc0b44c: 7f bf eb 78 mr r31,r29
ffc0b450: 48 00 00 0c b ffc0b45c <_RBTree_Insert_unprotected+0x1c0>
ffc0b454: 3b 60 00 00 li r27,0
ffc0b458: 3b 40 00 01 li r26,1
_ISR_Disable( level );
return_node = _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
return return_node;
}
ffc0b45c: 80 7f 00 00 lwz r3,0(r31)
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
const RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
ffc0b460: 83 a3 00 00 lwz r29,0(r3)
ffc0b464: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b468: 40 be 00 28 bne+ cr7,ffc0b490 <_RBTree_Insert_unprotected+0x1f4>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc0b46c: 39 20 00 00 li r9,0
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))) {
ffc0b470: 2f 09 00 00 cmpwi cr6,r9,0
ffc0b474: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b478: 40 9a ff 14 bne+ cr6,ffc0b38c <_RBTree_Insert_unprotected+0xf0>
/* 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;
ffc0b47c: 40 be 00 28 bne+ cr7,ffc0b4a4 <_RBTree_Insert_unprotected+0x208>
ffc0b480: 93 bf 00 0c stw r29,12(r31)
ffc0b484: 48 00 00 20 b ffc0b4a4 <_RBTree_Insert_unprotected+0x208>
RBTree_Node *_RBTree_Insert_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
if(!the_node) return (RBTree_Node*)-1;
ffc0b488: 3b c0 ff ff li r30,-1
ffc0b48c: 48 00 00 18 b ffc0b4a4 <_RBTree_Insert_unprotected+0x208>
ffc0b490: 81 23 00 0c lwz r9,12(r3)
ffc0b494: 69 29 00 01 xori r9,r9,1
ffc0b498: 7d 29 00 34 cntlzw r9,r9
ffc0b49c: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b4a0: 4b ff ff d0 b ffc0b470 <_RBTree_Insert_unprotected+0x1d4>
/* verify red-black properties */
_RBTree_Validate_insert_unprotected(the_node);
}
return (RBTree_Node*)0;
}
ffc0b4a4: 39 61 00 20 addi r11,r1,32
ffc0b4a8: 7f c3 f3 78 mr r3,r30
ffc0b4ac: 4b ff 58 b8 b ffc00d64 <_restgpr_26_x>
ffc0b4e4 <_RBTree_Iterate_unprotected>:
const RBTree_Control *rbtree,
RBTree_Direction dir,
RBTree_Visitor visitor,
void *visitor_arg
)
{
ffc0b4e4: 94 21 ff e0 stwu r1,-32(r1)
ffc0b4e8: 7c 08 02 a6 mflr r0
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
ffc0b4ec: 7c 89 00 34 cntlzw r9,r4
ffc0b4f0: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc0b4f4: 90 01 00 24 stw r0,36(r1)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_First(
const RBTree_Control *the_rbtree,
RBTree_Direction dir
)
{
return the_rbtree->first[dir];
ffc0b4f8: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b4fc: 7c 63 4a 14 add r3,r3,r9
ffc0b500: bf 61 00 0c stmw r27,12(r1)
ffc0b504: 7c bd 2b 78 mr r29,r5
ffc0b508: 7c dc 33 78 mr r28,r6
ffc0b50c: 83 e3 00 08 lwz r31,8(r3)
*/
RTEMS_INLINE_ROUTINE RBTree_Direction _RBTree_Opposite_direction(
RBTree_Direction the_dir
)
{
return (RBTree_Direction) !((int) the_dir);
ffc0b510: 7c 9e 23 78 mr r30,r4
ffc0b514: 48 00 00 34 b ffc0b548 <_RBTree_Iterate_unprotected+0x64>
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
ffc0b518: 7f e3 fb 78 mr r3,r31
ffc0b51c: 7f a9 03 a6 mtctr r29
ffc0b520: 7f c4 f3 78 mr r4,r30
ffc0b524: 7f 85 e3 78 mr r5,r28
ffc0b528: 4e 80 04 21 bctrl
current = _RBTree_Next_unprotected( current, dir );
ffc0b52c: 7f c4 f3 78 mr r4,r30
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
stop = (*visitor)( current, dir, visitor_arg );
ffc0b530: 7c 7b 1b 78 mr r27,r3
current = _RBTree_Next_unprotected( current, dir );
ffc0b534: 7f e3 fb 78 mr r3,r31
ffc0b538: 48 00 00 21 bl ffc0b558 <_RBTree_Next_unprotected>
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
ffc0b53c: 2f 9b 00 00 cmpwi cr7,r27,0
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
ffc0b540: 7c 7f 1b 78 mr r31,r3
{
RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
bool stop = false;
while ( !stop && current != NULL ) {
ffc0b544: 40 9e 00 0c bne- cr7,ffc0b550 <_RBTree_Iterate_unprotected+0x6c><== NEVER TAKEN
ffc0b548: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0b54c: 40 9e ff cc bne+ cr7,ffc0b518 <_RBTree_Iterate_unprotected+0x34>
stop = (*visitor)( current, dir, visitor_arg );
current = _RBTree_Next_unprotected( current, dir );
}
}
ffc0b550: 39 61 00 20 addi r11,r1,32
ffc0b554: 4b ff 58 14 b ffc00d68 <_restgpr_27_x>
ffc0ade4 <_RBTree_Sibling>:
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0ade4: 7c 6a 1b 79 mr. r10,r3
ffc0ade8: 41 82 00 30 beq- ffc0ae18 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent)) return NULL;
ffc0adec: 81 2a 00 00 lwz r9,0(r10)
ffc0adf0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0adf4: 41 9e 00 24 beq- cr7,ffc0ae18 <_RBTree_Sibling+0x34> <== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
ffc0adf8: 81 09 00 00 lwz r8,0(r9)
ffc0adfc: 2f 88 00 00 cmpwi cr7,r8,0
ffc0ae00: 41 9e 00 18 beq- cr7,ffc0ae18 <_RBTree_Sibling+0x34>
if(the_node == the_node->parent->child[RBT_LEFT])
ffc0ae04: 80 69 00 04 lwz r3,4(r9)
ffc0ae08: 7f 8a 18 00 cmpw cr7,r10,r3
ffc0ae0c: 4c be 00 20 bnelr+ cr7
return the_node->parent->child[RBT_RIGHT];
ffc0ae10: 80 69 00 08 lwz r3,8(r9)
ffc0ae14: 4e 80 00 20 blr
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
const RBTree_Node *the_node
)
{
if(!the_node) return NULL;
ffc0ae18: 38 60 00 00 li r3,0
if(the_node == the_node->parent->child[RBT_LEFT])
return the_node->parent->child[RBT_RIGHT];
else
return the_node->parent->child[RBT_LEFT];
}
ffc0ae1c: 4e 80 00 20 blr
ffc099d8 <_RTEMS_signal_Post_switch_hook>:
#include <rtems/score/thread.h>
#include <rtems/score/apiext.h>
#include <rtems/rtems/tasks.h>
static void _RTEMS_signal_Post_switch_hook( Thread_Control *executing )
{
ffc099d8: 94 21 ff e0 stwu r1,-32(r1)
ffc099dc: 7c 08 02 a6 mflr r0
ffc099e0: 90 01 00 24 stw r0,36(r1)
ffc099e4: 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 ];
ffc099e8: 83 e3 01 48 lwz r31,328(r3)
if ( !api )
ffc099ec: 2f 9f 00 00 cmpwi cr7,r31,0
ffc099f0: 41 9e 00 7c beq- cr7,ffc09a6c <_RTEMS_signal_Post_switch_hook+0x94><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc099f4: 7d 20 00 a6 mfmsr r9
ffc099f8: 7d 50 42 a6 mfsprg r10,0
ffc099fc: 7d 2a 50 78 andc r10,r9,r10
ffc09a00: 7d 40 01 24 mtmsr r10
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc09a04: 39 40 00 00 li r10,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc09a08: 83 df 00 14 lwz r30,20(r31)
asr->signals_posted = 0;
ffc09a0c: 91 5f 00 14 stw r10,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc09a10: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc09a14: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09a18: 41 be 00 54 beq+ cr7,ffc09a6c <_RTEMS_signal_Post_switch_hook+0x94>
return;
asr->nest_level += 1;
ffc09a1c: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a20: 38 80 00 00 li r4,0
ffc09a24: 80 7f 00 10 lwz r3,16(r31)
ffc09a28: 60 84 ff ff ori r4,r4,65535
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc09a2c: 39 29 00 01 addi r9,r9,1
ffc09a30: 91 3f 00 1c stw r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a34: 38 a1 00 08 addi r5,r1,8
ffc09a38: 48 00 04 41 bl ffc09e78 <rtems_task_mode>
(*asr->handler)( signal_set );
ffc09a3c: 81 3f 00 0c lwz r9,12(r31)
ffc09a40: 7f c3 f3 78 mr r3,r30
ffc09a44: 7d 29 03 a6 mtctr r9
ffc09a48: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc09a4c: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a50: 38 80 00 00 li r4,0
ffc09a54: 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;
ffc09a58: 39 29 ff ff addi r9,r9,-1
ffc09a5c: 91 3f 00 1c stw r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc09a60: 60 84 ff ff ori r4,r4,65535
ffc09a64: 38 a1 00 08 addi r5,r1,8
ffc09a68: 48 00 04 11 bl ffc09e78 <rtems_task_mode>
}
ffc09a6c: 39 61 00 20 addi r11,r1,32
ffc09a70: 4b ff 7a a0 b ffc01510 <_restgpr_30_x>
ffc338f4 <_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
)
{
ffc338f4: 94 21 ff d8 stwu r1,-40(r1)
ffc338f8: 7c 08 02 a6 mflr r0
ffc338fc: 90 01 00 2c stw r0,44(r1)
ffc33900: bf 81 00 18 stmw r28,24(r1)
ffc33904: 7c 9d 23 78 mr r29,r4
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
ffc33908: 3c 80 00 00 lis r4,0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
Timestamp_Control uptime;
#endif
Thread_Control *owning_thread = the_period->owner;
ffc3390c: 83 c3 00 40 lwz r30,64(r3)
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
)
{
ffc33910: 7c 7f 1b 78 mr r31,r3
ffc33914: 38 84 63 48 addi r4,r4,25416
ffc33918: 38 61 00 08 addi r3,r1,8
ffc3391c: 7c bc 2b 78 mr r28,r5
ffc33920: 4b fd 58 05 bl ffc09124 <_TOD_Get_with_nanoseconds>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc33924: 81 5f 00 50 lwz r10,80(r31)
ffc33928: 81 7f 00 54 lwz r11,84(r31)
/*
* Determine elapsed wall time since period initiated.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc3392c: 80 c1 00 08 lwz r6,8(r1)
ffc33930: 80 e1 00 0c lwz r7,12(r1)
ffc33934: 7d 6b 38 10 subfc r11,r11,r7
ffc33938: 7d 4a 31 10 subfe r10,r10,r6
ffc3393c: 91 5d 00 00 stw r10,0(r29)
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc33940: 3d 40 00 00 lis r10,0
ffc33944: 39 4a 65 60 addi r10,r10,25952
ffc33948: 91 7d 00 04 stw r11,4(r29)
ffc3394c: 80 aa 00 10 lwz r5,16(r10)
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc33950: 81 1e 00 80 lwz r8,128(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc33954: 7f 9e 28 00 cmpw cr7,r30,r5
#endif
/*
* Determine cpu usage since period initiated.
*/
used = owning_thread->cpu_time_used;
ffc33958: 81 3e 00 84 lwz r9,132(r30)
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
if (owning_thread == _Thread_Executing) {
ffc3395c: 40 be 00 48 bne+ cr7,ffc339a4 <_Rate_monotonic_Get_status+0xb0>
ffc33960: 81 6a 00 24 lwz r11,36(r10)
ffc33964: 81 4a 00 20 lwz r10,32(r10)
ffc33968: 7c eb 38 10 subfc r7,r11,r7
ffc3396c: 7c ca 31 10 subfe r6,r10,r6
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc33970: 81 5f 00 48 lwz r10,72(r31)
ffc33974: 81 7f 00 4c lwz r11,76(r31)
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc33978: 7d 29 38 14 addc r9,r9,r7
ffc3397c: 7d 08 31 14 adde r8,r8,r6
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
ffc33980: 7f 8a 40 00 cmpw cr7,r10,r8
ffc33984: 41 9d 00 28 bgt- cr7,ffc339ac <_Rate_monotonic_Get_status+0xb8><== NEVER TAKEN
ffc33988: 40 be 00 0c bne+ cr7,ffc33994 <_Rate_monotonic_Get_status+0xa0>
ffc3398c: 7f 8b 48 40 cmplw cr7,r11,r9
ffc33990: 41 9d 00 1c bgt- cr7,ffc339ac <_Rate_monotonic_Get_status+0xb8>
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc33994: 7d 6b 48 10 subfc r11,r11,r9
ffc33998: 7d 4a 41 10 subfe r10,r10,r8
ffc3399c: 91 5c 00 00 stw r10,0(r28)
ffc339a0: 91 7c 00 04 stw r11,4(r28)
if (used < the_period->cpu_usage_period_initiated)
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
ffc339a4: 38 60 00 01 li r3,1
ffc339a8: 48 00 00 08 b ffc339b0 <_Rate_monotonic_Get_status+0xbc>
/*
* The cpu usage info was reset while executing. Can't
* determine a status.
*/
if (_Timestamp_Less_than(&used, &the_period->cpu_usage_period_initiated))
return false;
ffc339ac: 38 60 00 00 li r3,0
return false;
*cpu_since_last_period = used - the_period->cpu_usage_period_initiated;
#endif
return true;
}
ffc339b0: 39 61 00 28 addi r11,r1,40
ffc339b4: 48 01 fe 3c b ffc537f0 <_restgpr_28_x>
ffc33d50 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc33d50: 7c 2b 0b 78 mr r11,r1
ffc33d54: 94 21 ff e0 stwu r1,-32(r1)
ffc33d58: 7c 08 02 a6 mflr r0
ffc33d5c: 7c 64 1b 78 mr r4,r3
ffc33d60: 3c 60 00 00 lis r3,0
ffc33d64: 48 01 fa 4d bl ffc537b0 <_savegpr_31>
ffc33d68: 38 63 67 e0 addi r3,r3,26592
ffc33d6c: 90 01 00 24 stw r0,36(r1)
ffc33d70: 38 a1 00 08 addi r5,r1,8
ffc33d74: 4b fd 5e 31 bl ffc09ba4 <_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 ) {
ffc33d78: 81 21 00 08 lwz r9,8(r1)
ffc33d7c: 2f 89 00 00 cmpwi cr7,r9,0
ffc33d80: 40 9e 00 88 bne- cr7,ffc33e08 <_Rate_monotonic_Timeout+0xb8><== NEVER TAKEN
ffc33d84: 7c 7f 1b 78 mr r31,r3
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc33d88: 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);
ffc33d8c: 81 23 00 10 lwz r9,16(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc33d90: 71 2a 40 00 andi. r10,r9,16384
ffc33d94: 41 82 00 24 beq- ffc33db8 <_Rate_monotonic_Timeout+0x68>
ffc33d98: 81 43 00 20 lwz r10,32(r3)
ffc33d9c: 81 3f 00 08 lwz r9,8(r31)
ffc33da0: 7f 8a 48 00 cmpw cr7,r10,r9
ffc33da4: 40 be 00 14 bne+ cr7,ffc33db8 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc33da8: 3c 80 10 07 lis r4,4103
ffc33dac: 60 84 ff f8 ori r4,r4,65528
ffc33db0: 4b fd 67 ed bl ffc0a59c <_Thread_Clear_state>
ffc33db4: 48 00 00 18 b ffc33dcc <_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 ) {
ffc33db8: 81 3f 00 38 lwz r9,56(r31)
ffc33dbc: 2f 89 00 01 cmpwi cr7,r9,1
ffc33dc0: 40 be 00 30 bne+ cr7,ffc33df0 <_Rate_monotonic_Timeout+0xa0>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc33dc4: 39 20 00 03 li r9,3
ffc33dc8: 91 3f 00 38 stw r9,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc33dcc: 7f e3 fb 78 mr r3,r31
ffc33dd0: 4b ff fd 15 bl ffc33ae4 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc33dd4: 81 3f 00 3c lwz r9,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc33dd8: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc33ddc: 91 3f 00 1c stw r9,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc33de0: 38 63 64 88 addi r3,r3,25736
ffc33de4: 38 9f 00 10 addi r4,r31,16
ffc33de8: 4b fd 78 fd bl ffc0b6e4 <_Watchdog_Insert>
ffc33dec: 48 00 00 0c b ffc33df8 <_Rate_monotonic_Timeout+0xa8>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc33df0: 39 20 00 04 li r9,4
ffc33df4: 91 3f 00 38 stw r9,56(r31)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc33df8: 3d 20 00 00 lis r9,0
ffc33dfc: 81 49 34 80 lwz r10,13440(r9)
--level;
ffc33e00: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc33e04: 91 49 34 80 stw r10,13440(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc33e08: 39 61 00 20 addi r11,r1,32
ffc33e0c: 48 01 f9 f0 b ffc537fc <_restgpr_31_x>
ffc339b8 <_Rate_monotonic_Update_statistics>:
}
static void _Rate_monotonic_Update_statistics(
Rate_monotonic_Control *the_period
)
{
ffc339b8: 7c 2b 0b 78 mr r11,r1
ffc339bc: 7c 08 02 a6 mflr r0
ffc339c0: 94 21 ff e0 stwu r1,-32(r1)
ffc339c4: 90 01 00 24 stw r0,36(r1)
ffc339c8: 48 01 fd e9 bl ffc537b0 <_savegpr_31>
ffc339cc: 7c 7f 1b 78 mr r31,r3
/*
* Update the counts.
*/
stats = &the_period->Statistics;
stats->count++;
ffc339d0: 81 23 00 58 lwz r9,88(r3)
ffc339d4: 39 29 00 01 addi r9,r9,1
ffc339d8: 91 23 00 58 stw r9,88(r3)
if ( the_period->state == RATE_MONOTONIC_EXPIRED )
ffc339dc: 81 23 00 38 lwz r9,56(r3)
ffc339e0: 2f 89 00 04 cmpwi cr7,r9,4
ffc339e4: 40 be 00 10 bne+ cr7,ffc339f4 <_Rate_monotonic_Update_statistics+0x3c>
stats->missed_count++;
ffc339e8: 81 23 00 5c lwz r9,92(r3)
ffc339ec: 39 29 00 01 addi r9,r9,1
ffc339f0: 91 23 00 5c stw r9,92(r3)
/*
* Grab status for time statistics.
*/
valid_status =
ffc339f4: 7f e3 fb 78 mr r3,r31
ffc339f8: 38 81 00 08 addi r4,r1,8
ffc339fc: 38 a1 00 10 addi r5,r1,16
ffc33a00: 4b ff fe f5 bl ffc338f4 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status( the_period, &since_last_period, &executed );
if (!valid_status)
ffc33a04: 2f 83 00 00 cmpwi cr7,r3,0
ffc33a08: 41 9e 00 d4 beq- cr7,ffc33adc <_Rate_monotonic_Update_statistics+0x124>
/*
* Update CPU time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_cpu_time, &executed );
ffc33a0c: 81 41 00 10 lwz r10,16(r1)
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc33a10: 81 1f 00 70 lwz r8,112(r31)
ffc33a14: 81 3f 00 74 lwz r9,116(r31)
ffc33a18: 81 61 00 14 lwz r11,20(r1)
ffc33a1c: 7d 29 58 14 addc r9,r9,r11
ffc33a20: 7d 08 51 14 adde r8,r8,r10
ffc33a24: 91 3f 00 74 stw r9,116(r31)
if ( _Timestamp_Less_than( &executed, &stats->min_cpu_time ) )
ffc33a28: 81 3f 00 60 lwz r9,96(r31)
ffc33a2c: 91 1f 00 70 stw r8,112(r31)
ffc33a30: 7f 89 50 00 cmpw cr7,r9,r10
ffc33a34: 41 9d 00 14 bgt- cr7,ffc33a48 <_Rate_monotonic_Update_statistics+0x90>
ffc33a38: 40 9e 00 18 bne- cr7,ffc33a50 <_Rate_monotonic_Update_statistics+0x98><== NEVER TAKEN
ffc33a3c: 81 3f 00 64 lwz r9,100(r31)
ffc33a40: 7f 89 58 40 cmplw cr7,r9,r11
ffc33a44: 40 9d 00 0c ble- cr7,ffc33a50 <_Rate_monotonic_Update_statistics+0x98>
stats->min_cpu_time = executed;
ffc33a48: 91 5f 00 60 stw r10,96(r31)
ffc33a4c: 91 7f 00 64 stw r11,100(r31)
if ( _Timestamp_Greater_than( &executed, &stats->max_cpu_time ) )
ffc33a50: 81 3f 00 68 lwz r9,104(r31)
ffc33a54: 7f 89 50 00 cmpw cr7,r9,r10
ffc33a58: 41 9c 00 14 blt- cr7,ffc33a6c <_Rate_monotonic_Update_statistics+0xb4><== NEVER TAKEN
ffc33a5c: 40 9e 00 18 bne- cr7,ffc33a74 <_Rate_monotonic_Update_statistics+0xbc><== NEVER TAKEN
ffc33a60: 81 3f 00 6c lwz r9,108(r31)
ffc33a64: 7f 89 58 40 cmplw cr7,r9,r11
ffc33a68: 40 9c 00 0c bge- cr7,ffc33a74 <_Rate_monotonic_Update_statistics+0xbc>
stats->max_cpu_time = executed;
ffc33a6c: 91 5f 00 68 stw r10,104(r31)
ffc33a70: 91 7f 00 6c stw r11,108(r31)
/*
* Update Wall time
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Add_to( &stats->total_wall_time, &since_last_period );
ffc33a74: 81 41 00 08 lwz r10,8(r1)
ffc33a78: 81 1f 00 88 lwz r8,136(r31)
ffc33a7c: 81 3f 00 8c lwz r9,140(r31)
ffc33a80: 81 61 00 0c lwz r11,12(r1)
ffc33a84: 7d 29 58 14 addc r9,r9,r11
ffc33a88: 7d 08 51 14 adde r8,r8,r10
ffc33a8c: 91 3f 00 8c stw r9,140(r31)
if ( _Timestamp_Less_than( &since_last_period, &stats->min_wall_time ) )
ffc33a90: 81 3f 00 78 lwz r9,120(r31)
ffc33a94: 91 1f 00 88 stw r8,136(r31)
ffc33a98: 7f 89 50 00 cmpw cr7,r9,r10
ffc33a9c: 41 9d 00 14 bgt- cr7,ffc33ab0 <_Rate_monotonic_Update_statistics+0xf8>
ffc33aa0: 40 9e 00 18 bne- cr7,ffc33ab8 <_Rate_monotonic_Update_statistics+0x100><== NEVER TAKEN
ffc33aa4: 81 3f 00 7c lwz r9,124(r31)
ffc33aa8: 7f 89 58 40 cmplw cr7,r9,r11
ffc33aac: 40 9d 00 0c ble- cr7,ffc33ab8 <_Rate_monotonic_Update_statistics+0x100>
stats->min_wall_time = since_last_period;
ffc33ab0: 91 5f 00 78 stw r10,120(r31)
ffc33ab4: 91 7f 00 7c stw r11,124(r31)
if ( _Timestamp_Greater_than( &since_last_period, &stats->max_wall_time ) )
ffc33ab8: 81 3f 00 80 lwz r9,128(r31)
ffc33abc: 7f 89 50 00 cmpw cr7,r9,r10
ffc33ac0: 41 bc 00 14 blt+ cr7,ffc33ad4 <_Rate_monotonic_Update_statistics+0x11c><== NEVER TAKEN
ffc33ac4: 40 9e 00 18 bne- cr7,ffc33adc <_Rate_monotonic_Update_statistics+0x124>
ffc33ac8: 81 3f 00 84 lwz r9,132(r31)
ffc33acc: 7f 89 58 40 cmplw cr7,r9,r11
ffc33ad0: 40 9c 00 0c bge- cr7,ffc33adc <_Rate_monotonic_Update_statistics+0x124>
stats->max_wall_time = since_last_period;
ffc33ad4: 91 5f 00 80 stw r10,128(r31)
ffc33ad8: 91 7f 00 84 stw r11,132(r31)
stats->min_wall_time = since_last_period;
if ( since_last_period > stats->max_wall_time )
stats->max_wall_time = since_last_period;
#endif
}
ffc33adc: 39 61 00 20 addi r11,r1,32
ffc33ae0: 48 01 fd 1c b ffc537fc <_restgpr_31_x>
ffc0b03c <_Scheduler_CBS_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
ffc0b03c: 7c 2b 0b 78 mr r11,r1
ffc0b040: 94 21 ff f0 stwu r1,-16(r1)
ffc0b044: 7c 08 02 a6 mflr r0
ffc0b048: 48 01 0a b5 bl ffc1bafc <_savegpr_31>
ffc0b04c: 7c 7f 1b 78 mr r31,r3
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
ffc0b050: 38 60 00 1c li r3,28
#include <rtems/score/wkspace.h>
void *_Scheduler_CBS_Allocate(
Thread_Control *the_thread
)
{
ffc0b054: 90 01 00 14 stw r0,20(r1)
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
ffc0b058: 48 00 1c 7d bl ffc0ccd4 <_Workspace_Allocate>
if ( sched ) {
ffc0b05c: 2c 03 00 00 cmpwi r3,0
ffc0b060: 41 82 00 1c beq- ffc0b07c <_Scheduler_CBS_Allocate+0x40><== NEVER TAKEN
the_thread->scheduler_info = sched;
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b064: 39 40 00 02 li r10,2
void *sched;
Scheduler_CBS_Per_thread *schinfo;
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
if ( sched ) {
the_thread->scheduler_info = sched;
ffc0b068: 90 7f 00 88 stw r3,136(r31)
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b06c: 91 43 00 14 stw r10,20(r3)
schinfo->cbs_server = NULL;
ffc0b070: 39 40 00 00 li r10,0
sched = _Workspace_Allocate(sizeof(Scheduler_CBS_Per_thread));
if ( sched ) {
the_thread->scheduler_info = sched;
schinfo = (Scheduler_CBS_Per_thread *)(the_thread->scheduler_info);
schinfo->edf_per_thread.thread = the_thread;
ffc0b074: 93 e3 00 00 stw r31,0(r3)
schinfo->edf_per_thread.queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
schinfo->cbs_server = NULL;
ffc0b078: 91 43 00 18 stw r10,24(r3)
}
return sched;
}
ffc0b07c: 39 61 00 10 addi r11,r1,16
ffc0b080: 4b ff 5b 4c b ffc00bcc <_restgpr_31_x>
ffc0c6f8 <_Scheduler_CBS_Budget_callout>:
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
void _Scheduler_CBS_Budget_callout(
Thread_Control *the_thread
)
{
ffc0c6f8: 7c 2b 0b 78 mr r11,r1
ffc0c6fc: 7c 08 02 a6 mflr r0
ffc0c700: 94 21 ff e0 stwu r1,-32(r1)
ffc0c704: 90 01 00 24 stw r0,36(r1)
ffc0c708: 48 01 0b 09 bl ffc1d210 <_savegpr_31>
ffc0c70c: 7c 7f 1b 78 mr r31,r3
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server_id server_id;
/* Put violating task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
ffc0c710: 80 83 00 ac lwz r4,172(r3)
if ( the_thread->real_priority != new_priority )
ffc0c714: 81 23 00 18 lwz r9,24(r3)
ffc0c718: 7f 89 20 00 cmpw cr7,r9,r4
ffc0c71c: 41 9e 00 08 beq- cr7,ffc0c724 <_Scheduler_CBS_Budget_callout+0x2c><== NEVER TAKEN
the_thread->real_priority = new_priority;
ffc0c720: 90 83 00 18 stw r4,24(r3)
if ( the_thread->current_priority != new_priority )
ffc0c724: 81 3f 00 14 lwz r9,20(r31)
ffc0c728: 7f 89 20 00 cmpw cr7,r9,r4
ffc0c72c: 41 9e 00 10 beq- cr7,ffc0c73c <_Scheduler_CBS_Budget_callout+0x44><== NEVER TAKEN
_Thread_Change_priority(the_thread, new_priority, true);
ffc0c730: 7f e3 fb 78 mr r3,r31
ffc0c734: 38 a0 00 01 li r5,1
ffc0c738: 48 00 06 61 bl ffc0cd98 <_Thread_Change_priority>
/* Invoke callback function if any. */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
ffc0c73c: 83 ff 00 88 lwz r31,136(r31)
if ( sched_info->cbs_server->cbs_budget_overrun ) {
ffc0c740: 81 3f 00 18 lwz r9,24(r31)
ffc0c744: 81 49 00 0c lwz r10,12(r9)
ffc0c748: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0c74c: 41 9e 00 24 beq- cr7,ffc0c770 <_Scheduler_CBS_Budget_callout+0x78><== NEVER TAKEN
_Scheduler_CBS_Get_server_id(
ffc0c750: 80 69 00 00 lwz r3,0(r9)
ffc0c754: 38 81 00 08 addi r4,r1,8
ffc0c758: 4b ff ff 49 bl ffc0c6a0 <_Scheduler_CBS_Get_server_id>
sched_info->cbs_server->task_id,
&server_id
);
sched_info->cbs_server->cbs_budget_overrun( server_id );
ffc0c75c: 81 3f 00 18 lwz r9,24(r31)
ffc0c760: 80 61 00 08 lwz r3,8(r1)
ffc0c764: 81 29 00 0c lwz r9,12(r9)
ffc0c768: 7d 29 03 a6 mtctr r9
ffc0c76c: 4e 80 04 21 bctrl
}
}
ffc0c770: 39 61 00 20 addi r11,r1,32
ffc0c774: 4b ff 51 44 b ffc018b8 <_restgpr_31_x>
ffc0c2b4 <_Scheduler_CBS_Create_server>:
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
ffc0c2b4: 94 21 ff e0 stwu r1,-32(r1)
ffc0c2b8: 7c 08 02 a6 mflr r0
ffc0c2bc: 90 01 00 24 stw r0,36(r1)
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
ffc0c2c0: 81 23 00 04 lwz r9,4(r3)
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
Scheduler_CBS_Budget_overrun budget_overrun_callback,
rtems_id *server_id
)
{
ffc0c2c4: bf 41 00 08 stmw r26,8(r1)
ffc0c2c8: 7c 7f 1b 78 mr r31,r3
unsigned int i;
Scheduler_CBS_Server *the_server;
if ( params->budget <= 0 ||
ffc0c2cc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c2d0: 40 9d 00 7c ble- cr7,ffc0c34c <_Scheduler_CBS_Create_server+0x98>
ffc0c2d4: 81 23 00 00 lwz r9,0(r3)
ffc0c2d8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c2dc: 40 9d 00 70 ble- cr7,ffc0c34c <_Scheduler_CBS_Create_server+0x98>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
ffc0c2e0: 3d 20 00 00 lis r9,0
ffc0c2e4: 81 49 27 94 lwz r10,10132(r9)
if ( !_Scheduler_CBS_Server_list[i] )
ffc0c2e8: 3d 20 00 00 lis r9,0
ffc0c2ec: 81 09 28 b0 lwz r8,10416(r9)
ffc0c2f0: 7c 9a 23 78 mr r26,r4
ffc0c2f4: 39 4a 00 01 addi r10,r10,1
ffc0c2f8: 7c bd 2b 78 mr r29,r5
ffc0c2fc: 7d 49 03 a6 mtctr r10
ffc0c300: 39 20 00 00 li r9,0
ffc0c304: 48 00 00 18 b ffc0c31c <_Scheduler_CBS_Create_server+0x68>
#include <rtems/system.h>
#include <rtems/config.h>
#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
int _Scheduler_CBS_Create_server (
ffc0c308: 55 3c 10 3a rlwinm r28,r9,2,0,29
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
if ( !_Scheduler_CBS_Server_list[i] )
ffc0c30c: 7d 48 e0 2e lwzx r10,r8,r28
ffc0c310: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0c314: 41 9e 00 48 beq- cr7,ffc0c35c <_Scheduler_CBS_Create_server+0xa8>
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
for ( i = 0; i<_Scheduler_CBS_Maximum_servers; i++ ) {
ffc0c318: 39 29 00 01 addi r9,r9,1
ffc0c31c: 42 00 ff ec bdnz+ ffc0c308 <_Scheduler_CBS_Create_server+0x54>
if ( !_Scheduler_CBS_Server_list[i] )
break;
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
ffc0c320: 38 60 ff e6 li r3,-26
ffc0c324: 48 00 00 6c b ffc0c390 <_Scheduler_CBS_Create_server+0xdc>
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
ffc0c328: 81 5f 00 00 lwz r10,0(r31)
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
ffc0c32c: 38 60 00 00 li r3,0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
ffc0c330: 81 7f 00 04 lwz r11,4(r31)
ffc0c334: 91 49 00 04 stw r10,4(r9)
the_server->task_id = -1;
ffc0c338: 39 40 ff ff li r10,-1
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
the_server->parameters = *params;
ffc0c33c: 91 69 00 08 stw r11,8(r9)
the_server->task_id = -1;
ffc0c340: 91 49 00 00 stw r10,0(r9)
the_server->cbs_budget_overrun = budget_overrun_callback;
ffc0c344: 93 49 00 0c stw r26,12(r9)
return SCHEDULER_CBS_OK;
ffc0c348: 48 00 00 48 b ffc0c390 <_Scheduler_CBS_Create_server+0xdc>
if ( params->budget <= 0 ||
params->deadline <= 0 ||
params->budget >= SCHEDULER_EDF_PRIO_MSB ||
params->deadline >= SCHEDULER_EDF_PRIO_MSB )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
ffc0c34c: 38 60 ff ee li r3,-18
ffc0c350: 48 00 00 40 b ffc0c390 <_Scheduler_CBS_Create_server+0xdc>
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
if ( !the_server )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
ffc0c354: 38 60 ff ef li r3,-17 <== NOT EXECUTED
ffc0c358: 48 00 00 38 b ffc0c390 <_Scheduler_CBS_Create_server+0xdc><== NOT EXECUTED
}
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
ffc0c35c: 91 3d 00 00 stw r9,0(r29)
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
ffc0c360: 3f c0 00 00 lis r30,0
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
ffc0c364: 38 60 00 10 li r3,16
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
ffc0c368: 83 7e 28 b0 lwz r27,10416(r30)
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
ffc0c36c: 48 00 20 7d bl ffc0e3e8 <_Workspace_Allocate>
the_server = _Scheduler_CBS_Server_list[*server_id];
ffc0c370: 81 3d 00 00 lwz r9,0(r29)
if ( i == _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_FULL;
*server_id = i;
_Scheduler_CBS_Server_list[*server_id] = (Scheduler_CBS_Server *)
ffc0c374: 7c 7b e1 2e stwx r3,r27,r28
_Workspace_Allocate( sizeof(Scheduler_CBS_Server) );
the_server = _Scheduler_CBS_Server_list[*server_id];
ffc0c378: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0c37c: 81 5e 28 b0 lwz r10,10416(r30)
ffc0c380: 7d 2a 48 2e lwzx r9,r10,r9
if ( !the_server )
ffc0c384: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c388: 40 9e ff a0 bne+ cr7,ffc0c328 <_Scheduler_CBS_Create_server+0x74><== ALWAYS TAKEN
ffc0c38c: 4b ff ff c8 b ffc0c354 <_Scheduler_CBS_Create_server+0xa0><== NOT EXECUTED
the_server->parameters = *params;
the_server->task_id = -1;
the_server->cbs_budget_overrun = budget_overrun_callback;
return SCHEDULER_CBS_OK;
}
ffc0c390: 39 61 00 20 addi r11,r1,32
ffc0c394: 4b ff 55 10 b ffc018a4 <_restgpr_26_x>
ffc0c41c <_Scheduler_CBS_Detach_thread>:
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
ffc0c41c: 94 21 ff d8 stwu r1,-40(r1)
ffc0c420: 7c 08 02 a6 mflr r0
ffc0c424: bf a1 00 1c stmw r29,28(r1)
ffc0c428: 7c 7d 1b 78 mr r29,r3
ffc0c42c: 7c 9e 23 78 mr r30,r4
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
ffc0c430: 7c 83 23 78 mr r3,r4
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
rtems_id task_id
)
{
ffc0c434: 90 01 00 2c stw r0,44(r1)
Objects_Locations location;
Thread_Control *the_thread;
Scheduler_CBS_Per_thread *sched_info;
the_thread = _Thread_Get(task_id, &location);
ffc0c438: 38 81 00 08 addi r4,r1,8
ffc0c43c: 48 00 0e bd bl ffc0d2f8 <_Thread_Get>
/* The routine _Thread_Get may disable dispatch and not enable again. */
if ( the_thread ) {
ffc0c440: 7c 7f 1b 79 mr. r31,r3
ffc0c444: 41 82 00 08 beq- ffc0c44c <_Scheduler_CBS_Detach_thread+0x30>
_Thread_Enable_dispatch();
ffc0c448: 48 00 0e 95 bl ffc0d2dc <_Thread_Enable_dispatch>
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
ffc0c44c: 3d 20 00 00 lis r9,0
ffc0c450: 81 29 27 94 lwz r9,10132(r9)
ffc0c454: 7f 9d 48 40 cmplw cr7,r29,r9
ffc0c458: 40 9c 00 6c bge- cr7,ffc0c4c4 <_Scheduler_CBS_Detach_thread+0xa8>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
ffc0c45c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0c460: 41 9e 00 64 beq- cr7,ffc0c4c4 <_Scheduler_CBS_Detach_thread+0xa8>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
ffc0c464: 3d 20 00 00 lis r9,0
ffc0c468: 81 29 28 b0 lwz r9,10416(r9)
ffc0c46c: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0c470: 7d 29 e8 2e lwzx r9,r9,r29
ffc0c474: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c478: 41 9e 00 44 beq- cr7,ffc0c4bc <_Scheduler_CBS_Detach_thread+0xa0>
return SCHEDULER_CBS_ERROR_NOSERVER;
/* Thread and server are not attached. */
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
ffc0c47c: 81 49 00 00 lwz r10,0(r9)
ffc0c480: 7f 8a f0 00 cmpw cr7,r10,r30
ffc0c484: 40 9e 00 40 bne- cr7,ffc0c4c4 <_Scheduler_CBS_Detach_thread+0xa8><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
ffc0c488: 39 40 ff ff li r10,-1
ffc0c48c: 91 49 00 00 stw r10,0(r9)
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
ffc0c490: 39 40 00 00 li r10,0
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
ffc0c494: 38 60 00 00 li r3,0
if ( _Scheduler_CBS_Server_list[server_id]->task_id != task_id )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
_Scheduler_CBS_Server_list[server_id]->task_id = -1;
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
sched_info->cbs_server = NULL;
ffc0c498: 81 3f 00 88 lwz r9,136(r31)
ffc0c49c: 91 49 00 18 stw r10,24(r9)
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
ffc0c4a0: 81 3f 00 a0 lwz r9,160(r31)
ffc0c4a4: 91 3f 00 78 stw r9,120(r31)
the_thread->budget_callout = the_thread->Start.budget_callout;
ffc0c4a8: 81 3f 00 a4 lwz r9,164(r31)
ffc0c4ac: 91 3f 00 7c stw r9,124(r31)
the_thread->is_preemptible = the_thread->Start.is_preemptible;
ffc0c4b0: 89 3f 00 9c lbz r9,156(r31)
ffc0c4b4: 99 3f 00 70 stb r9,112(r31)
ffc0c4b8: 48 00 00 10 b ffc0c4c8 <_Scheduler_CBS_Detach_thread+0xac>
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
if ( !the_thread )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
/* Server is not valid. */
if ( !_Scheduler_CBS_Server_list[server_id] )
return SCHEDULER_CBS_ERROR_NOSERVER;
ffc0c4bc: 38 60 ff e7 li r3,-25
ffc0c4c0: 48 00 00 08 b ffc0c4c8 <_Scheduler_CBS_Detach_thread+0xac>
if ( the_thread ) {
_Thread_Enable_dispatch();
}
if ( server_id >= _Scheduler_CBS_Maximum_servers )
return SCHEDULER_CBS_ERROR_INVALID_PARAMETER;
ffc0c4c4: 38 60 ff ee li r3,-18
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
return SCHEDULER_CBS_OK;
}
ffc0c4c8: 39 61 00 28 addi r11,r1,40
ffc0c4cc: 4b ff 53 e4 b ffc018b0 <_restgpr_29_x>
ffc0c778 <_Scheduler_CBS_Initialize>:
int _Scheduler_CBS_Initialize(void)
{
ffc0c778: 7c 2b 0b 78 mr r11,r1
ffc0c77c: 94 21 ff f0 stwu r1,-16(r1)
ffc0c780: 7c 08 02 a6 mflr r0
ffc0c784: 48 01 0a 8d bl ffc1d210 <_savegpr_31>
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
ffc0c788: 3f e0 00 00 lis r31,0
ffc0c78c: 80 7f 27 94 lwz r3,10132(r31)
sched_info->cbs_server->cbs_budget_overrun( server_id );
}
}
int _Scheduler_CBS_Initialize(void)
{
ffc0c790: 90 01 00 14 stw r0,20(r1)
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
ffc0c794: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0c798: 48 00 1c 51 bl ffc0e3e8 <_Workspace_Allocate>
ffc0c79c: 3d 40 00 00 lis r10,0
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
ffc0c7a0: 2f 83 00 00 cmpwi cr7,r3,0
}
int _Scheduler_CBS_Initialize(void)
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
ffc0c7a4: 90 6a 28 b0 stw r3,10416(r10)
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
ffc0c7a8: 41 9e 00 38 beq- cr7,ffc0c7e0 <_Scheduler_CBS_Initialize+0x68><== NEVER TAKEN
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
ffc0c7ac: 81 1f 27 94 lwz r8,10132(r31)
ffc0c7b0: 39 20 00 00 li r9,0
_Scheduler_CBS_Server_list[i] = NULL;
ffc0c7b4: 38 e0 00 00 li r7,0
ffc0c7b8: 39 08 00 01 addi r8,r8,1
ffc0c7bc: 7d 09 03 a6 mtctr r8
ffc0c7c0: 48 00 00 14 b ffc0c7d4 <_Scheduler_CBS_Initialize+0x5c>
ffc0c7c4: 81 0a 28 b0 lwz r8,10416(r10)
ffc0c7c8: 55 26 10 3a rlwinm r6,r9,2,0,29
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
ffc0c7cc: 39 29 00 01 addi r9,r9,1
_Scheduler_CBS_Server_list[i] = NULL;
ffc0c7d0: 7c e8 31 2e stwx r7,r8,r6
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
ffc0c7d4: 42 00 ff f0 bdnz+ ffc0c7c4 <_Scheduler_CBS_Initialize+0x4c>
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
ffc0c7d8: 38 60 00 00 li r3,0
ffc0c7dc: 48 00 00 08 b ffc0c7e4 <_Scheduler_CBS_Initialize+0x6c>
{
unsigned int i;
_Scheduler_CBS_Server_list = (Scheduler_CBS_Server **) _Workspace_Allocate(
_Scheduler_CBS_Maximum_servers * sizeof(Scheduler_CBS_Server*) );
if ( !_Scheduler_CBS_Server_list )
return SCHEDULER_CBS_ERROR_NO_MEMORY;
ffc0c7e0: 38 60 ff ef li r3,-17 <== NOT EXECUTED
for (i = 0; i<_Scheduler_CBS_Maximum_servers; i++) {
_Scheduler_CBS_Server_list[i] = NULL;
}
return SCHEDULER_CBS_OK;
}
ffc0c7e4: 39 61 00 10 addi r11,r1,16
ffc0c7e8: 4b ff 50 d0 b ffc018b8 <_restgpr_31_x>
ffc0b084 <_Scheduler_CBS_Release_job>:
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
ffc0b084: 2c 04 00 00 cmpwi r4,0
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
(Scheduler_CBS_Server *) sched_info->cbs_server;
ffc0b088: 81 23 00 88 lwz r9,136(r3)
)
{
Priority_Control new_priority;
Scheduler_CBS_Per_thread *sched_info =
(Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
Scheduler_CBS_Server *serv_info =
ffc0b08c: 81 29 00 18 lwz r9,24(r9)
ffc0b090: 2f 89 00 00 cmpwi cr7,r9,0
(Scheduler_CBS_Server *) sched_info->cbs_server;
if (deadline) {
ffc0b094: 41 82 00 30 beq- ffc0b0c4 <_Scheduler_CBS_Release_job+0x40>
ffc0b098: 3d 40 00 00 lis r10,0
/* Initializing or shifting deadline. */
if (serv_info)
ffc0b09c: 41 9e 00 18 beq- cr7,ffc0b0b4 <_Scheduler_CBS_Release_job+0x30>
new_priority = (_Watchdog_Ticks_since_boot + serv_info->parameters.deadline)
ffc0b0a0: 80 8a 28 a4 lwz r4,10404(r10)
ffc0b0a4: 81 49 00 04 lwz r10,4(r9)
ffc0b0a8: 7c 84 52 14 add r4,r4,r10
ffc0b0ac: 54 84 00 7e clrlwi r4,r4,1
ffc0b0b0: 48 00 00 1c b ffc0b0cc <_Scheduler_CBS_Release_job+0x48>
& ~SCHEDULER_EDF_PRIO_MSB;
else
new_priority = (_Watchdog_Ticks_since_boot + deadline)
ffc0b0b4: 81 2a 28 a4 lwz r9,10404(r10)
ffc0b0b8: 7c 84 4a 14 add r4,r4,r9
ffc0b0bc: 54 84 00 7e clrlwi r4,r4,1
ffc0b0c0: 48 00 00 14 b ffc0b0d4 <_Scheduler_CBS_Release_job+0x50>
& ~SCHEDULER_EDF_PRIO_MSB;
}
else {
/* Switch back to background priority. */
new_priority = the_thread->Start.initial_priority;
ffc0b0c4: 80 83 00 ac lwz r4,172(r3)
}
/* Budget replenishment for the next job. */
if (serv_info)
ffc0b0c8: 41 9e 00 0c beq- cr7,ffc0b0d4 <_Scheduler_CBS_Release_job+0x50><== NEVER TAKEN
the_thread->cpu_time_budget = serv_info->parameters.budget;
ffc0b0cc: 81 29 00 08 lwz r9,8(r9)
ffc0b0d0: 91 23 00 74 stw r9,116(r3)
the_thread->real_priority = new_priority;
ffc0b0d4: 90 83 00 18 stw r4,24(r3)
_Thread_Change_priority(the_thread, new_priority, true);
ffc0b0d8: 38 a0 00 01 li r5,1
ffc0b0dc: 48 00 04 ec b ffc0b5c8 <_Thread_Change_priority>
ffc0b0e0 <_Scheduler_CBS_Unblock>:
#include <rtems/score/schedulercbs.h>
void _Scheduler_CBS_Unblock(
Thread_Control *the_thread
)
{
ffc0b0e0: 94 21 ff f0 stwu r1,-16(r1)
ffc0b0e4: 7c 08 02 a6 mflr r0
ffc0b0e8: bf c1 00 08 stmw r30,8(r1)
ffc0b0ec: 7c 7f 1b 78 mr r31,r3
ffc0b0f0: 90 01 00 14 stw r0,20(r1)
Scheduler_CBS_Per_thread *sched_info;
Scheduler_CBS_Server *serv_info;
Priority_Control new_priority;
_Scheduler_EDF_Enqueue(the_thread);
ffc0b0f4: 48 00 01 1d bl ffc0b210 <_Scheduler_EDF_Enqueue>
/* TODO: flash critical section? */
sched_info = (Scheduler_CBS_Per_thread *) the_thread->scheduler_info;
serv_info = (Scheduler_CBS_Server *) sched_info->cbs_server;
ffc0b0f8: 81 3f 00 88 lwz r9,136(r31)
ffc0b0fc: 81 29 00 18 lwz r9,24(r9)
* Late unblock rule for deadline-driven tasks. The remaining time to
* deadline must be sufficient to serve the remaining computation time
* without increased utilization of this task. It might cause a deadline
* miss of another task.
*/
if (serv_info) {
ffc0b100: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b104: 41 9e 00 58 beq- cr7,ffc0b15c <_Scheduler_CBS_Unblock+0x7c>
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
ffc0b108: 3d 00 00 00 lis r8,0
ffc0b10c: 81 5f 00 18 lwz r10,24(r31)
ffc0b110: 80 e8 28 a4 lwz r7,10404(r8)
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
ffc0b114: 81 09 00 04 lwz r8,4(r9)
*/
if (serv_info) {
time_t deadline = serv_info->parameters.deadline;
time_t budget = serv_info->parameters.budget;
time_t deadline_left = the_thread->cpu_time_budget;
time_t budget_left = the_thread->real_priority -
ffc0b118: 7c e7 50 50 subf r7,r7,r10
_Watchdog_Ticks_since_boot;
if ( deadline*budget_left > budget*deadline_left ) {
ffc0b11c: 7d 07 41 d6 mullw r8,r7,r8
ffc0b120: 80 e9 00 08 lwz r7,8(r9)
ffc0b124: 81 3f 00 74 lwz r9,116(r31)
ffc0b128: 7d 27 49 d6 mullw r9,r7,r9
ffc0b12c: 7f 88 48 00 cmpw cr7,r8,r9
ffc0b130: 40 9d 00 2c ble- cr7,ffc0b15c <_Scheduler_CBS_Unblock+0x7c>
/* Put late unblocked task to background until the end of period. */
new_priority = the_thread->Start.initial_priority;
ffc0b134: 80 9f 00 ac lwz r4,172(r31)
if ( the_thread->real_priority != new_priority )
ffc0b138: 7f 8a 20 00 cmpw cr7,r10,r4
ffc0b13c: 41 9e 00 08 beq- cr7,ffc0b144 <_Scheduler_CBS_Unblock+0x64>
the_thread->real_priority = new_priority;
ffc0b140: 90 9f 00 18 stw r4,24(r31)
if ( the_thread->current_priority != new_priority )
ffc0b144: 81 3f 00 14 lwz r9,20(r31)
ffc0b148: 7f 89 20 00 cmpw cr7,r9,r4
ffc0b14c: 41 9e 00 10 beq- cr7,ffc0b15c <_Scheduler_CBS_Unblock+0x7c>
_Thread_Change_priority(the_thread, new_priority, true);
ffc0b150: 7f e3 fb 78 mr r3,r31
ffc0b154: 38 a0 00 01 li r5,1
ffc0b158: 48 00 04 71 bl ffc0b5c8 <_Thread_Change_priority>
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
ffc0b15c: 3f c0 00 00 lis r30,0
ffc0b160: 80 7f 00 14 lwz r3,20(r31)
ffc0b164: 3b de 2e 80 addi r30,r30,11904
ffc0b168: 3d 40 00 00 lis r10,0
ffc0b16c: 81 3e 00 14 lwz r9,20(r30)
ffc0b170: 81 4a 20 b0 lwz r10,8368(r10)
ffc0b174: 80 89 00 14 lwz r4,20(r9)
ffc0b178: 7d 49 03 a6 mtctr r10
ffc0b17c: 4e 80 04 21 bctrl
ffc0b180: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b184: 40 9d 00 34 ble- cr7,ffc0b1b8 <_Scheduler_CBS_Unblock+0xd8>
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0b188: 81 3e 00 10 lwz r9,16(r30)
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_higher_than( the_thread->current_priority,
_Thread_Heir->current_priority)) {
_Thread_Heir = the_thread;
ffc0b18c: 93 fe 00 14 stw r31,20(r30)
if ( _Thread_Executing->is_preemptible ||
ffc0b190: 89 29 00 70 lbz r9,112(r9)
ffc0b194: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b198: 40 9e 00 10 bne- cr7,ffc0b1a8 <_Scheduler_CBS_Unblock+0xc8>
ffc0b19c: 81 3f 00 14 lwz r9,20(r31)
ffc0b1a0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b1a4: 40 9e 00 14 bne- cr7,ffc0b1b8 <_Scheduler_CBS_Unblock+0xd8><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0b1a8: 3d 20 00 00 lis r9,0
ffc0b1ac: 39 40 00 01 li r10,1
ffc0b1b0: 39 29 2e 80 addi r9,r9,11904
ffc0b1b4: 99 49 00 0c stb r10,12(r9)
}
}
ffc0b1b8: 39 61 00 10 addi r11,r1,16
ffc0b1bc: 4b ff 5a 0c b ffc00bc8 <_restgpr_30_x>
ffc0b03c <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
ffc0b03c: 7c 2b 0b 78 mr r11,r1
ffc0b040: 94 21 ff f0 stwu r1,-16(r1)
ffc0b044: 7c 08 02 a6 mflr r0
ffc0b048: 48 01 0a 19 bl ffc1ba60 <_savegpr_31>
ffc0b04c: 7c 7f 1b 78 mr r31,r3
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
ffc0b050: 38 60 00 18 li r3,24
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
ffc0b054: 90 01 00 14 stw r0,20(r1)
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
ffc0b058: 48 00 1b e1 bl ffc0cc38 <_Workspace_Allocate>
if ( sched ) {
ffc0b05c: 2c 03 00 00 cmpwi r3,0
ffc0b060: 41 82 00 14 beq- ffc0b074 <_Scheduler_EDF_Allocate+0x38><== NEVER TAKEN
the_thread->scheduler_info = sched;
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b064: 39 40 00 02 li r10,2
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
if ( sched ) {
the_thread->scheduler_info = sched;
ffc0b068: 90 7f 00 88 stw r3,136(r31)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
ffc0b06c: 93 e3 00 00 stw r31,0(r3)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0b070: 91 43 00 14 stw r10,20(r3)
}
return sched;
}
ffc0b074: 39 61 00 10 addi r11,r1,16
ffc0b078: 4b ff 5b 54 b ffc00bcc <_restgpr_31_x>
ffc0b23c <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
ffc0b23c: 94 21 ff f0 stwu r1,-16(r1)
ffc0b240: 7c 08 02 a6 mflr r0
ffc0b244: bf c1 00 08 stmw r30,8(r1)
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
ffc0b248: 3f c0 00 00 lis r30,0
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
ffc0b24c: 7c 7f 1b 78 mr r31,r3
ffc0b250: 90 01 00 14 stw r0,20(r1)
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
ffc0b254: 3b de 2e 80 addi r30,r30,11904
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
_Scheduler_EDF_Enqueue(the_thread);
ffc0b258: 4b ff fe 75 bl ffc0b0cc <_Scheduler_EDF_Enqueue>
ffc0b25c: 3d 20 00 00 lis r9,0
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
ffc0b260: 81 5e 00 14 lwz r10,20(r30)
ffc0b264: 81 29 20 b0 lwz r9,8368(r9)
ffc0b268: 80 6a 00 14 lwz r3,20(r10)
ffc0b26c: 80 9f 00 14 lwz r4,20(r31)
ffc0b270: 7d 29 03 a6 mtctr r9
ffc0b274: 4e 80 04 21 bctrl
ffc0b278: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b27c: 40 bc 00 34 bge+ cr7,ffc0b2b0 <_Scheduler_EDF_Unblock+0x74>
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0b280: 81 3e 00 10 lwz r9,16(r30)
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
ffc0b284: 93 fe 00 14 stw r31,20(r30)
if ( _Thread_Executing->is_preemptible ||
ffc0b288: 89 29 00 70 lbz r9,112(r9)
ffc0b28c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b290: 40 9e 00 10 bne- cr7,ffc0b2a0 <_Scheduler_EDF_Unblock+0x64>
ffc0b294: 81 3f 00 14 lwz r9,20(r31)
ffc0b298: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b29c: 40 9e 00 14 bne- cr7,ffc0b2b0 <_Scheduler_EDF_Unblock+0x74><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0b2a0: 3d 20 00 00 lis r9,0
ffc0b2a4: 39 40 00 01 li r10,1
ffc0b2a8: 39 29 2e 80 addi r9,r9,11904
ffc0b2ac: 99 49 00 0c stb r10,12(r9)
}
}
ffc0b2b0: 39 61 00 10 addi r11,r1,16
ffc0b2b4: 4b ff 59 14 b ffc00bc8 <_restgpr_30_x>
ffc0a67c <_Scheduler_priority_Block>:
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
ffc0a67c: 81 43 00 88 lwz r10,136(r3)
ready = sched_info->ready_chain;
ffc0a680: 81 2a 00 00 lwz r9,0(r10)
if ( _Chain_Has_only_one_node( ready ) ) {
ffc0a684: 80 e9 00 00 lwz r7,0(r9)
ffc0a688: 81 09 00 08 lwz r8,8(r9)
ffc0a68c: 7f 87 40 00 cmpw cr7,r7,r8
ffc0a690: 40 be 00 4c bne+ cr7,ffc0a6dc <_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 );
ffc0a694: 39 09 00 04 addi r8,r9,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc0a698: 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;
ffc0a69c: 91 09 00 00 stw r8,0(r9)
head->previous = NULL;
ffc0a6a0: 39 00 00 00 li r8,0
ffc0a6a4: 91 09 00 04 stw r8,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;
ffc0a6a8: 81 0a 00 04 lwz r8,4(r10)
ffc0a6ac: 81 2a 00 14 lwz r9,20(r10)
ffc0a6b0: 80 e8 00 00 lwz r7,0(r8)
ffc0a6b4: 7c e9 48 38 and r9,r7,r9
if ( *the_priority_map->minor == 0 )
ffc0a6b8: 2f 89 00 00 cmpwi cr7,r9,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;
ffc0a6bc: 91 28 00 00 stw r9,0(r8)
if ( *the_priority_map->minor == 0 )
ffc0a6c0: 40 9e 00 2c bne- cr7,ffc0a6ec <_Scheduler_priority_Block+0x70>
_Priority_Major_bit_map &= the_priority_map->block_major;
ffc0a6c4: 3d 20 00 00 lis r9,0
ffc0a6c8: 81 4a 00 10 lwz r10,16(r10)
ffc0a6cc: 81 09 28 50 lwz r8,10320(r9)
ffc0a6d0: 7d 0a 50 38 and r10,r8,r10
ffc0a6d4: 91 49 28 50 stw r10,10320(r9)
ffc0a6d8: 48 00 00 14 b ffc0a6ec <_Scheduler_priority_Block+0x70>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0a6dc: 81 23 00 00 lwz r9,0(r3)
previous = the_node->previous;
ffc0a6e0: 81 43 00 04 lwz r10,4(r3)
next->previous = previous;
ffc0a6e4: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc0a6e8: 91 2a 00 00 stw r9,0(r10)
RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Heir );
ffc0a6ec: 3d 20 00 00 lis r9,0
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
ffc0a6f0: 81 29 2e 14 lwz r9,11796(r9)
ffc0a6f4: 7f 83 48 00 cmpw cr7,r3,r9
ffc0a6f8: 40 be 00 60 bne+ cr7,ffc0a758 <_Scheduler_priority_Block+0xdc>
* @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
ffc0a6fc: 3d 20 00 00 lis r9,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 );
ffc0a700: 3c e0 00 00 lis r7,0
ffc0a704: 81 49 20 80 lwz r10,8320(r9)
ffc0a708: 81 27 28 50 lwz r9,10320(r7)
ffc0a70c: 7d 28 00 34 cntlzw r8,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a710: 3c c0 00 00 lis r6,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 );
ffc0a714: 91 27 28 50 stw r9,10320(r7)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a718: 38 c6 2e 40 addi r6,r6,11840
ffc0a71c: 55 07 10 3a rlwinm r7,r8,2,0,29
ffc0a720: 7d 26 38 2e lwzx r9,r6,r7
ffc0a724: 7d 25 00 34 cntlzw r5,r9
ffc0a728: 7d 26 39 2e stwx r9,r6,r7
return (_Priority_Bits_index( major ) << 4) +
ffc0a72c: 55 09 20 36 rlwinm r9,r8,4,0,27
ffc0a730: 7d 29 2a 14 add r9,r9,r5
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0a734: 1d 29 00 0c mulli r9,r9,12
ffc0a738: 7d 0a 4a 14 add r8,r10,r9
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a73c: 7d 2a 48 2e lwzx r9,r10,r9
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a740: 39 48 00 04 addi r10,r8,4
ffc0a744: 7f 89 50 00 cmpw cr7,r9,r10
ffc0a748: 40 be 00 08 bne+ cr7,ffc0a750 <_Scheduler_priority_Block+0xd4><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0a74c: 39 20 00 00 li r9,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(
ffc0a750: 3d 40 00 00 lis r10,0
ffc0a754: 91 2a 2e 14 stw r9,11796(r10)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0a758: 3d 20 00 00 lis r9,0
ffc0a75c: 39 29 2e 00 addi r9,r9,11776
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc0a760: 81 49 00 10 lwz r10,16(r9)
ffc0a764: 7f 83 50 00 cmpw cr7,r3,r10
ffc0a768: 4c be 00 20 bnelr+ cr7
_Thread_Dispatch_necessary = true;
ffc0a76c: 39 40 00 01 li r10,1
ffc0a770: 99 49 00 0c stb r10,12(r9)
ffc0a774: 4e 80 00 20 blr
ffc0a92c <_Scheduler_priority_Schedule>:
* @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
ffc0a92c: 3d 20 00 00 lis r9,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 );
ffc0a930: 3c e0 00 00 lis r7,0
ffc0a934: 81 49 20 80 lwz r10,8320(r9)
ffc0a938: 81 27 28 50 lwz r9,10320(r7)
ffc0a93c: 7d 28 00 34 cntlzw r8,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a940: 3c c0 00 00 lis r6,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 );
ffc0a944: 91 27 28 50 stw r9,10320(r7)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0a948: 38 c6 2e 40 addi r6,r6,11840
ffc0a94c: 55 07 10 3a rlwinm r7,r8,2,0,29
ffc0a950: 7d 26 38 2e lwzx r9,r6,r7
ffc0a954: 7d 25 00 34 cntlzw r5,r9
ffc0a958: 7d 26 39 2e stwx r9,r6,r7
return (_Priority_Bits_index( major ) << 4) +
ffc0a95c: 55 09 20 36 rlwinm r9,r8,4,0,27
ffc0a960: 7d 29 2a 14 add r9,r9,r5
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0a964: 1d 29 00 0c mulli r9,r9,12
ffc0a968: 7d 0a 4a 14 add r8,r10,r9
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a96c: 7d 2a 48 2e lwzx r9,r10,r9
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a970: 39 48 00 04 addi r10,r8,4
ffc0a974: 7f 89 50 00 cmpw cr7,r9,r10
ffc0a978: 40 be 00 08 bne+ cr7,ffc0a980 <_Scheduler_priority_Schedule+0x54><== ALWAYS TAKEN
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0a97c: 39 20 00 00 li r9,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(
ffc0a980: 3d 40 00 00 lis r10,0
ffc0a984: 91 2a 2e 14 stw r9,11796(r10)
ffc0a988: 4e 80 00 20 blr
ffc095d4 <_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();
ffc095d4: 3d 20 ff c2 lis r9,-62
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
ffc095d8: 81 29 cf c4 lwz r9,-12348(r9)
ffc095dc: 3d 00 00 0f lis r8,15
ffc095e0: 61 08 42 40 ori r8,r8,16960
ffc095e4: 7d 08 4b 96 divwu r8,r8,r9
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc095e8: 7c 69 1b 79 mr. r9,r3
ffc095ec: 41 82 00 90 beq- ffc0967c <_TOD_Validate+0xa8> <== NEVER TAKEN
ffc095f0: 81 49 00 18 lwz r10,24(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;
ffc095f4: 38 60 00 00 li 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();
if ((!the_tod) ||
ffc095f8: 7f 8a 40 40 cmplw cr7,r10,r8
ffc095fc: 4c 9c 00 20 bgelr cr7
(the_tod->ticks >= ticks_per_second) ||
ffc09600: 81 49 00 14 lwz r10,20(r9)
ffc09604: 2b 8a 00 3b cmplwi cr7,r10,59
ffc09608: 4d 9d 00 20 bgtlr cr7
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
ffc0960c: 81 49 00 10 lwz r10,16(r9)
ffc09610: 2b 8a 00 3b cmplwi cr7,r10,59
ffc09614: 4d 9d 00 20 bgtlr cr7
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
ffc09618: 81 49 00 0c lwz r10,12(r9)
ffc0961c: 2b 8a 00 17 cmplwi cr7,r10,23
ffc09620: 4d 9d 00 20 bgtlr cr7
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
ffc09624: 81 49 00 04 lwz r10,4(r9)
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) ||
ffc09628: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0962c: 4d 9e 00 20 beqlr cr7
(the_tod->month == 0) ||
ffc09630: 2b 8a 00 0c cmplwi cr7,r10,12
ffc09634: 4d 9d 00 20 bgtlr cr7
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
ffc09638: 81 09 00 00 lwz r8,0(r9)
(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) ||
ffc0963c: 2b 88 07 c3 cmplwi cr7,r8,1987
ffc09640: 4c 9d 00 20 blelr cr7
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
ffc09644: 81 29 00 08 lwz r9,8(r9)
(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) ||
ffc09648: 2f 89 00 00 cmpwi cr7,r9,0
ffc0964c: 4d 9e 00 20 beqlr cr7
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
ffc09650: 71 07 00 03 andi. r7,r8,3
ffc09654: 3c e0 ff c2 lis r7,-62
ffc09658: 39 07 e7 08 addi r8,r7,-6392
ffc0965c: 40 82 00 08 bne- ffc09664 <_TOD_Validate+0x90>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
ffc09660: 39 4a 00 0d addi r10,r10,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
ffc09664: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc09668: 7c 68 50 2e lwzx r3,r8,r10
if ( the_tod->day > days_in_month )
ffc0966c: 7c 69 18 10 subfc r3,r9,r3
ffc09670: 38 60 00 00 li r3,0
ffc09674: 7c 63 19 14 adde r3,r3,r3
ffc09678: 4e 80 00 20 blr
(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;
ffc0967c: 38 60 00 00 li r3,0 <== NOT EXECUTED
if ( the_tod->day > days_in_month )
return false;
return true;
}
ffc09680: 4e 80 00 20 blr <== NOT EXECUTED
ffc0ac50 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0ac50: 94 21 ff e0 stwu r1,-32(r1)
ffc0ac54: 7c 08 02 a6 mflr r0
ffc0ac58: 90 01 00 24 stw r0,36(r1)
ffc0ac5c: bf 81 00 10 stmw r28,16(r1)
ffc0ac60: 7c 7f 1b 78 mr r31,r3
ffc0ac64: 7c bd 2b 78 mr r29,r5
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0ac68: 83 83 00 10 lwz r28,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 );
ffc0ac6c: 90 81 00 08 stw r4,8(r1)
ffc0ac70: 48 00 0e a5 bl ffc0bb14 <_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 )
ffc0ac74: 81 3f 00 14 lwz r9,20(r31)
ffc0ac78: 80 81 00 08 lwz r4,8(r1)
ffc0ac7c: 7f 89 20 00 cmpw cr7,r9,r4
ffc0ac80: 41 9e 00 0c beq- cr7,ffc0ac8c <_Thread_Change_priority+0x3c>
_Thread_Set_priority( the_thread, new_priority );
ffc0ac84: 7f e3 fb 78 mr r3,r31
ffc0ac88: 48 00 0e 1d bl ffc0baa4 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0ac8c: 7f c0 00 a6 mfmsr r30
ffc0ac90: 7d 30 42 a6 mfsprg r9,0
ffc0ac94: 7f c9 48 78 andc r9,r30,r9
ffc0ac98: 7d 20 01 24 mtmsr r9
/*
* 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;
ffc0ac9c: 81 5f 00 10 lwz r10,16(r31)
ffc0aca0: 57 89 07 7a rlwinm r9,r28,0,29,29
if ( state != STATES_TRANSIENT ) {
ffc0aca4: 2f 8a 00 04 cmpwi cr7,r10,4
ffc0aca8: 41 9e 00 44 beq- cr7,ffc0acec <_Thread_Change_priority+0x9c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0acac: 2f 89 00 00 cmpwi cr7,r9,0
ffc0acb0: 40 9e 00 0c bne- cr7,ffc0acbc <_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);
ffc0acb4: 55 49 07 b8 rlwinm r9,r10,0,30,28
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0acb8: 91 3f 00 10 stw r9,16(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0acbc: 7f c0 01 24 mtmsr r30
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0acc0: 3d 20 00 03 lis r9,3
ffc0acc4: 61 29 be e0 ori r9,r9,48864
ffc0acc8: 7d 48 48 39 and. r8,r10,r9
ffc0accc: 41 a2 00 a0 beq+ ffc0ad6c <_Thread_Change_priority+0x11c>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0acd0: 80 01 00 24 lwz r0,36(r1)
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0acd4: 7f e4 fb 78 mr r4,r31
ffc0acd8: 80 7f 00 44 lwz r3,68(r31)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0acdc: 7c 08 03 a6 mtlr r0
ffc0ace0: bb 81 00 10 lmw r28,16(r1)
ffc0ace4: 38 21 00 20 addi r1,r1,32
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0ace8: 48 00 0d 04 b ffc0b9ec <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0acec: 2f 89 00 00 cmpwi cr7,r9,0
ffc0acf0: 40 9e 00 30 bne- cr7,ffc0ad20 <_Thread_Change_priority+0xd0><== 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 )
ffc0acf4: 2f 9d 00 00 cmpwi cr7,r29,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 );
ffc0acf8: 91 3f 00 10 stw r9,16(r31)
ffc0acfc: 3d 20 00 00 lis r9,0
ffc0ad00: 39 29 20 80 addi r9,r9,8320
if ( prepend_it )
ffc0ad04: 41 9e 00 0c beq- cr7,ffc0ad10 <_Thread_Change_priority+0xc0>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
ffc0ad08: 81 29 00 28 lwz r9,40(r9)
ffc0ad0c: 48 00 00 08 b ffc0ad14 <_Thread_Change_priority+0xc4>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
ffc0ad10: 81 29 00 24 lwz r9,36(r9)
ffc0ad14: 7f e3 fb 78 mr r3,r31
ffc0ad18: 7d 29 03 a6 mtctr r9
ffc0ad1c: 4e 80 04 21 bctrl
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0ad20: 7d 20 00 a6 mfmsr r9
ffc0ad24: 7f c0 01 24 mtmsr r30
ffc0ad28: 7d 20 01 24 mtmsr r9
* 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();
ffc0ad2c: 3d 20 00 00 lis r9,0
ffc0ad30: 81 29 20 88 lwz r9,8328(r9)
ffc0ad34: 7d 29 03 a6 mtctr r9
ffc0ad38: 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 );
ffc0ad3c: 3d 20 00 00 lis r9,0
ffc0ad40: 39 29 2e 00 addi r9,r9,11776
ffc0ad44: 81 49 00 10 lwz r10,16(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() &&
ffc0ad48: 81 09 00 14 lwz r8,20(r9)
ffc0ad4c: 7f 8a 40 00 cmpw cr7,r10,r8
ffc0ad50: 41 9e 00 18 beq- cr7,ffc0ad68 <_Thread_Change_priority+0x118>
ffc0ad54: 89 4a 00 70 lbz r10,112(r10)
ffc0ad58: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ad5c: 41 9e 00 0c beq- cr7,ffc0ad68 <_Thread_Change_priority+0x118>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
ffc0ad60: 39 40 00 01 li r10,1
ffc0ad64: 99 49 00 0c stb r10,12(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ad68: 7f c0 01 24 mtmsr r30
_ISR_Enable( level );
}
ffc0ad6c: 39 61 00 20 addi r11,r1,32
ffc0ad70: 4b ff 58 48 b ffc005b8 <_restgpr_28_x>
ffc0af8c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0af8c: 94 21 ff e8 stwu r1,-24(r1)
ffc0af90: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0af94: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0af98: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0af9c: 48 00 02 15 bl ffc0b1b0 <_Thread_Get>
switch ( location ) {
ffc0afa0: 81 21 00 08 lwz r9,8(r1)
ffc0afa4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0afa8: 40 9e 00 20 bne- cr7,ffc0afc8 <_Thread_Delay_ended+0x3c><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0afac: 3c 80 10 00 lis r4,4096
ffc0afb0: 60 84 00 18 ori r4,r4,24
ffc0afb4: 4b ff fd c1 bl ffc0ad74 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0afb8: 3d 20 00 00 lis r9,0
ffc0afbc: 81 49 28 24 lwz r10,10276(r9)
--level;
ffc0afc0: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0afc4: 91 49 28 24 stw r10,10276(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0afc8: 80 01 00 1c lwz r0,28(r1)
ffc0afcc: 38 21 00 18 addi r1,r1,24
ffc0afd0: 7c 08 03 a6 mtlr r0
ffc0afd4: 4e 80 00 20 blr
ffc0afd8 <_Thread_Dispatch>:
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
ffc0afd8: 94 21 ff b8 stwu r1,-72(r1)
ffc0afdc: 7c 08 02 a6 mflr r0
ffc0afe0: be 81 00 18 stmw r20,24(r1)
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
ffc0afe4: 3f e0 00 00 lis r31,0
ffc0afe8: 39 3f 2e 00 addi r9,r31,11776
#if defined(RTEMS_SMP)
#include <rtems/score/smp.h>
#endif
void _Thread_Dispatch( void )
{
ffc0afec: 90 01 00 4c stw r0,76(r1)
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
ffc0aff0: 82 c9 00 10 lwz r22,16(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0aff4: 7d 40 00 a6 mfmsr r10
ffc0aff8: 7d 30 42 a6 mfsprg r9,0
ffc0affc: 7d 49 48 78 andc r9,r10,r9
ffc0b000: 7d 20 01 24 mtmsr r9
*/
static inline void _TOD_Get_uptime(
Timestamp_Control *time
)
{
_TOD_Get_with_nanoseconds( time, &_TOD.uptime );
ffc0b004: 3f 40 00 00 lis r26,0
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b008: 3e e0 00 00 lis r23,0
* 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;
ffc0b00c: 3f c0 00 00 lis r30,0
ffc0b010: 3b a0 00 01 li r29,1
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
ffc0b014: 3b 80 00 00 li r28,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;
ffc0b018: 3f 60 00 00 lis r27,0
ffc0b01c: 3b 5a 2b e8 addi r26,r26,11240
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0b020: 3f 20 00 00 lis r25,0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0b024: 3f 00 00 00 lis r24,0
ffc0b028: 3a f7 22 0c addi r23,r23,8716
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0b02c: 48 00 01 30 b ffc0b15c <_Thread_Dispatch+0x184>
heir = _Thread_Heir;
ffc0b030: 82 a9 00 14 lwz r21,20(r9)
ffc0b034: 93 be 28 24 stw r29,10276(r30)
/*
* 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 )
ffc0b038: 7f 95 b0 00 cmpw cr7,r21,r22
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
#ifndef RTEMS_SMP
_Thread_Dispatch_set_disable_level( 1 );
#endif
_Thread_Dispatch_necessary = false;
ffc0b03c: 9b 89 00 0c stb r28,12(r9)
_Thread_Executing = heir;
ffc0b040: 92 a9 00 10 stw r21,16(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 )
ffc0b044: 40 be 00 28 bne+ cr7,ffc0b06c <_Thread_Dispatch+0x94>
ffc0b048: 39 00 00 00 li r8,0
ffc0b04c: 3d 20 00 00 lis r9,0
ffc0b050: 91 09 28 24 stw r8,10276(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b054: 7d 40 01 24 mtmsr r10
ffc0b058: 3d 20 00 00 lis r9,0
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b05c: 3f c0 00 00 lis r30,0
ffc0b060: 83 e9 2d 10 lwz r31,11536(r9)
ffc0b064: 3b de 2d 14 addi r30,r30,11540
ffc0b068: 48 00 01 1c b ffc0b184 <_Thread_Dispatch+0x1ac>
*/
#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 )
ffc0b06c: 81 35 00 78 lwz r9,120(r21)
ffc0b070: 2f 89 00 01 cmpwi cr7,r9,1
ffc0b074: 40 be 00 0c bne+ cr7,ffc0b080 <_Thread_Dispatch+0xa8>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0b078: 81 3b 28 20 lwz r9,10272(r27)
ffc0b07c: 91 35 00 74 stw r9,116(r21)
ffc0b080: 7d 40 01 24 mtmsr r10
ffc0b084: 38 61 00 08 addi r3,r1,8
ffc0b088: 7f 44 d3 78 mr r4,r26
ffc0b08c: 4b ff e7 d9 bl ffc09864 <_TOD_Get_with_nanoseconds>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0b090: 38 bf 2e 00 addi r5,r31,11776
const Timestamp64_Control *_start,
const Timestamp64_Control *_end,
Timestamp64_Control *_result
)
{
*_result = *_end - *_start;
ffc0b094: 81 05 00 20 lwz r8,32(r5)
ffc0b098: 81 25 00 24 lwz r9,36(r5)
ffc0b09c: 81 41 00 08 lwz r10,8(r1)
ffc0b0a0: 81 61 00 0c lwz r11,12(r1)
ffc0b0a4: 7c e9 58 10 subfc r7,r9,r11
ffc0b0a8: 7c c8 51 10 subfe r6,r8,r10
static inline void _Timestamp64_implementation_Add_to(
Timestamp64_Control *_time,
const Timestamp64_Control *_add
)
{
*_time += *_add;
ffc0b0ac: 81 16 00 80 lwz r8,128(r22)
ffc0b0b0: 81 36 00 84 lwz r9,132(r22)
ffc0b0b4: 7d 29 38 14 addc r9,r9,r7
ffc0b0b8: 7d 08 31 14 adde r8,r8,r6
ffc0b0bc: 91 36 00 84 stw r9,132(r22)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0b0c0: 81 39 28 2c lwz r9,10284(r25)
ffc0b0c4: 91 16 00 80 stw r8,128(r22)
ffc0b0c8: 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;
ffc0b0cc: 91 45 00 20 stw r10,32(r5)
ffc0b0d0: 91 65 00 24 stw r11,36(r5)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0b0d4: 41 9e 00 14 beq- cr7,ffc0b0e8 <_Thread_Dispatch+0x110> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0b0d8: 81 49 00 00 lwz r10,0(r9)
ffc0b0dc: 91 56 01 44 stw r10,324(r22)
*_Thread_libc_reent = heir->libc_reent;
ffc0b0e0: 81 55 01 44 lwz r10,324(r21)
ffc0b0e4: 91 49 00 00 stw r10,0(r9)
ffc0b0e8: 82 98 22 08 lwz r20,8712(r24)
ffc0b0ec: 48 00 00 1c b ffc0b108 <_Thread_Dispatch+0x130>
const User_extensions_Switch_control *extension =
(const User_extensions_Switch_control *) node;
(*extension->thread_switch)( executing, heir );
ffc0b0f0: 81 34 00 08 lwz r9,8(r20)
ffc0b0f4: 7e c3 b3 78 mr r3,r22
ffc0b0f8: 7e a4 ab 78 mr r4,r21
ffc0b0fc: 7d 29 03 a6 mtctr r9
ffc0b100: 4e 80 04 21 bctrl
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
ffc0b104: 82 94 00 00 lwz r20,0(r20)
{
const Chain_Control *chain = &_User_extensions_Switches_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b108: 7f 94 b8 00 cmpw cr7,r20,r23
ffc0b10c: 40 9e ff e4 bne+ cr7,ffc0b0f0 <_Thread_Dispatch+0x118>
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0b110: 81 36 01 40 lwz r9,320(r22)
ffc0b114: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b118: 41 9e 00 0c beq- cr7,ffc0b124 <_Thread_Dispatch+0x14c>
_Context_Save_fp( &executing->fp_context );
ffc0b11c: 38 76 01 40 addi r3,r22,320
ffc0b120: 48 00 ef e1 bl ffc1a100 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0b124: 38 76 00 c0 addi r3,r22,192
ffc0b128: 38 95 00 c0 addi r4,r21,192
ffc0b12c: 48 00 f1 55 bl ffc1a280 <_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 )
ffc0b130: 81 36 01 40 lwz r9,320(r22)
ffc0b134: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b138: 41 9e 00 0c beq- cr7,ffc0b144 <_Thread_Dispatch+0x16c>
_Context_Restore_fp( &executing->fp_context );
ffc0b13c: 38 76 01 40 addi r3,r22,320
ffc0b140: 48 00 f0 81 bl ffc1a1c0 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0b144: 39 3f 2e 00 addi r9,r31,11776
ffc0b148: 82 c9 00 10 lwz r22,16(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b14c: 7d 40 00 a6 mfmsr r10
ffc0b150: 7d 30 42 a6 mfsprg r9,0
ffc0b154: 7d 49 48 78 andc r9,r10,r9
ffc0b158: 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 ) {
ffc0b15c: 39 3f 2e 00 addi r9,r31,11776
ffc0b160: 89 09 00 0c lbz r8,12(r9)
ffc0b164: 2f 88 00 00 cmpwi cr7,r8,0
ffc0b168: 40 9e fe c8 bne+ cr7,ffc0b030 <_Thread_Dispatch+0x58>
ffc0b16c: 4b ff fe dc b ffc0b048 <_Thread_Dispatch+0x70>
const API_extensions_Post_switch_control *post_switch =
(const API_extensions_Post_switch_control *) node;
(*post_switch->hook)( executing );
ffc0b170: 81 3f 00 08 lwz r9,8(r31)
ffc0b174: 7e c3 b3 78 mr r3,r22
ffc0b178: 7d 29 03 a6 mtctr r9
ffc0b17c: 4e 80 04 21 bctrl
#ifdef RTEMS_SMP
_Thread_Unnest_dispatch();
#endif
_API_extensions_Run_post_switch( executing );
}
ffc0b180: 83 ff 00 00 lwz r31,0(r31)
{
const Chain_Control *chain = &_API_extensions_Post_switch_list;
const Chain_Node *tail = _Chain_Immutable_tail( chain );
const Chain_Node *node = _Chain_Immutable_first( chain );
while ( node != tail ) {
ffc0b184: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0b188: 40 9e ff e8 bne+ cr7,ffc0b170 <_Thread_Dispatch+0x198>
ffc0b18c: 39 61 00 48 addi r11,r1,72
ffc0b190: 4b ff 54 08 b ffc00598 <_restgpr_20_x>
ffc0f668 <_Thread_Handler>:
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
ffc0f668: 94 21 ff f0 stwu r1,-16(r1)
ffc0f66c: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
ffc0f670: 3d 20 00 00 lis r9,0
#define INIT_NAME __main
#define EXECUTE_GLOBAL_CONSTRUCTORS
#endif
void _Thread_Handler( void )
{
ffc0f674: 90 01 00 14 stw r0,20(r1)
ffc0f678: bf c1 00 08 stmw r30,8(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
ffc0f67c: 83 e9 2e 10 lwz r31,11792(r9)
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
ffc0f680: 81 5f 00 a8 lwz r10,168(r31)
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc0f684: 39 20 00 00 li r9,0
ffc0f688: 7d 20 00 a6 mfmsr r9
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc0f68c: 71 48 00 01 andi. r8,r10,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc0f690: 7d 50 42 a6 mfsprg r10,0
ffc0f694: 40 a2 00 0c bne+ ffc0f6a0 <_Thread_Handler+0x38>
msr |= ppc_interrupt_get_disable_mask();
ffc0f698: 7d 49 4b 78 or r9,r10,r9
ffc0f69c: 48 00 00 08 b ffc0f6a4 <_Thread_Handler+0x3c>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc0f6a0: 7d 29 50 78 andc r9,r9,r10
}
_CPU_MSR_SET(msr);
ffc0f6a4: 7d 20 01 24 mtmsr r9
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
ffc0f6a8: 3d 20 00 00 lis r9,0
ffc0f6ac: 8b c9 29 c4 lbz r30,10692(r9)
);
}
static inline void _User_extensions_Thread_begin( Thread_Control *executing )
{
_User_extensions_Iterate(
ffc0f6b0: 3c 80 ff c1 lis r4,-63
doneConstructors = true;
ffc0f6b4: 39 40 00 01 li r10,1
ffc0f6b8: 7f e3 fb 78 mr r3,r31
ffc0f6bc: 99 49 29 c4 stb r10,10692(r9)
ffc0f6c0: 38 84 bd 4c addi r4,r4,-17076
ffc0f6c4: 4b ff c6 d5 bl ffc0bd98 <_User_extensions_Iterate>
_User_extensions_Thread_begin( executing );
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc0f6c8: 4b ff ba cd bl ffc0b194 <_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 (doCons) /* && (volatile void *)_init) */ {
ffc0f6cc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0f6d0: 40 be 00 08 bne+ cr7,ffc0f6d8 <_Thread_Handler+0x70>
INIT_NAME ();
ffc0f6d4: 48 00 b6 29 bl ffc1acfc <_init>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc0f6d8: 81 3f 00 90 lwz r9,144(r31)
ffc0f6dc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f6e0: 40 be 00 18 bne+ cr7,ffc0f6f8 <_Thread_Handler+0x90> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc0f6e4: 81 3f 00 8c lwz r9,140(r31)
ffc0f6e8: 80 7f 00 98 lwz r3,152(r31)
ffc0f6ec: 7d 29 03 a6 mtctr r9
ffc0f6f0: 4e 80 04 21 bctrl
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
ffc0f6f4: 90 7f 00 28 stw r3,40(r31)
}
}
static inline void _User_extensions_Thread_exitted( Thread_Control *executing )
{
_User_extensions_Iterate(
ffc0f6f8: 3c 80 ff c1 lis r4,-63
ffc0f6fc: 7f e3 fb 78 mr r3,r31
ffc0f700: 38 84 bd 60 addi r4,r4,-17056
ffc0f704: 4b ff c6 95 bl ffc0bd98 <_User_extensions_Iterate>
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
_Internal_error_Occurred(
ffc0f708: 38 60 00 00 li r3,0
ffc0f70c: 38 80 00 01 li r4,1
ffc0f710: 38 a0 00 05 li r5,5
ffc0f714: 4b ff a6 65 bl ffc09d78 <_Internal_error_Occurred>
ffc0b44c <_Thread_Handler_initialization>:
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
ffc0b44c: 3d 20 ff c2 lis r9,-62
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b450: 94 21 ff f0 stwu r1,-16(r1)
uint32_t ticks_per_timeslice =
ffc0b454: 39 29 ad 58 addi r9,r9,-21160
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b458: 7c 08 02 a6 mflr r0
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
ffc0b45c: 81 09 00 28 lwz r8,40(r9)
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b460: bf c1 00 08 stmw r30,8(r1)
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
ffc0b464: 2f 88 00 00 cmpwi cr7,r8,0
#if defined(RTEMS_SMP)
#include <rtems/bspsmp.h>
#endif
void _Thread_Handler_initialization(void)
{
ffc0b468: 90 01 00 14 stw r0,20(r1)
uint32_t ticks_per_timeslice =
ffc0b46c: 83 e9 00 14 lwz r31,20(r9)
rtems_configuration_get_ticks_per_timeslice();
uint32_t maximum_extensions =
ffc0b470: 83 c9 00 08 lwz r30,8(r9)
rtems_configuration_get_maximum_extensions();
rtems_stack_allocate_init_hook stack_allocate_init_hook =
ffc0b474: 81 49 00 24 lwz r10,36(r9)
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies =
_Configuration_MP_table->maximum_proxies;
#endif
if ( rtems_configuration_get_stack_allocate_hook() == NULL ||
ffc0b478: 41 9e 00 10 beq- cr7,ffc0b488 <_Thread_Handler_initialization+0x3c><== NEVER TAKEN
ffc0b47c: 81 09 00 2c lwz r8,44(r9)
ffc0b480: 2f 88 00 00 cmpwi cr7,r8,0
ffc0b484: 40 be 00 14 bne+ cr7,ffc0b498 <_Thread_Handler_initialization+0x4c>
rtems_configuration_get_stack_free_hook() == NULL)
_Internal_error_Occurred(
ffc0b488: 38 60 00 00 li r3,0
ffc0b48c: 38 80 00 01 li r4,1
ffc0b490: 38 a0 00 0e li r5,14
ffc0b494: 4b ff e8 e5 bl ffc09d78 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
if ( stack_allocate_init_hook != NULL )
ffc0b498: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b49c: 41 9e 00 10 beq- cr7,ffc0b4ac <_Thread_Handler_initialization+0x60>
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
ffc0b4a0: 80 69 00 04 lwz r3,4(r9)
ffc0b4a4: 7d 49 03 a6 mtctr r10
ffc0b4a8: 4e 80 04 21 bctrl
_Thread_Dispatch_necessary = false;
ffc0b4ac: 3d 40 00 00 lis r10,0
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
ffc0b4b0: 80 01 00 14 lwz r0,20(r1)
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
ffc0b4b4: 39 4a 2e 00 addi r10,r10,11776
ffc0b4b8: 39 20 00 00 li r9,0
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
ffc0b4bc: 7c 08 03 a6 mtlr r0
);
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
ffc0b4c0: 99 2a 00 0c stb r9,12(r10)
_Thread_Executing = NULL;
ffc0b4c4: 39 20 00 00 li r9,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b4c8: 3c 60 00 00 lis r3,0
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
_Thread_Executing = NULL;
ffc0b4cc: 91 2a 00 10 stw r9,16(r10)
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b4d0: 38 63 2d 74 addi r3,r3,11636
ffc0b4d4: 38 80 00 01 li r4,1
if ( stack_allocate_init_hook != NULL )
(*stack_allocate_init_hook)( rtems_configuration_get_stack_space_size() );
_Thread_Dispatch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
ffc0b4d8: 91 2a 00 14 stw r9,20(r10)
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
ffc0b4dc: 3d 40 00 00 lis r10,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b4e0: 38 a0 00 01 li r5,1
_Thread_Dispatch_necessary = false;
_Thread_Executing = NULL;
_Thread_Heir = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
ffc0b4e4: 91 2a 28 28 stw r9,10280(r10)
#endif
_Thread_Maximum_extensions = maximum_extensions;
ffc0b4e8: 3d 20 00 00 lis r9,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b4ec: 38 c0 00 01 li r6,1
_Thread_Heir = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Thread_Allocated_fp = NULL;
#endif
_Thread_Maximum_extensions = maximum_extensions;
ffc0b4f0: 93 c9 28 30 stw r30,10288(r9)
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
ffc0b4f4: 3d 20 00 00 lis r9,0
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b4f8: 38 e0 01 58 li r7,344
_Thread_Allocated_fp = NULL;
#endif
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
ffc0b4fc: 93 e9 28 20 stw r31,10272(r9)
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b500: 39 00 00 00 li r8,0
ffc0b504: 39 20 00 08 li r9,8
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
ffc0b508: bb c1 00 08 lmw r30,8(r1)
ffc0b50c: 38 21 00 10 addi r1,r1,16
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
maximum_internal_threads += 1;
#endif
_Objects_Initialize_information(
ffc0b510: 4b ff ee 54 b ffc0a364 <_Objects_Initialize_information>
ffc0b244 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b244: 94 21 ff c0 stwu r1,-64(r1)
ffc0b248: 7c 08 02 a6 mflr r0
ffc0b24c: be e1 00 1c stmw r23,28(r1)
ffc0b250: 7d 1c 43 78 mr r28,r8
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0b254: 39 00 00 00 li r8,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b258: 90 01 00 44 stw r0,68(r1)
ffc0b25c: 7d 3b 4b 78 mr r27,r9
ffc0b260: 7c 78 1b 78 mr r24,r3
ffc0b264: 81 21 00 50 lwz r9,80(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 );
ffc0b268: 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;
ffc0b26c: 91 04 01 48 stw r8,328(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b270: 7c 9f 23 78 mr r31,r4
ffc0b274: 7c de 33 78 mr r30,r6
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0b278: 91 04 01 4c stw r8,332(r4)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0b27c: 7c f7 3b 78 mr r23,r7
ffc0b280: 7d 5a 53 78 mr r26,r10
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0b284: 91 04 01 44 stw r8,324(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 );
ffc0b288: 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
)
{
ffc0b28c: 83 29 00 00 lwz r25,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 );
ffc0b290: 48 00 08 d9 bl ffc0bb68 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0b294: 7c 68 1b 79 mr. r8,r3
return false; /* stack allocation failed */
ffc0b298: 38 60 00 00 li r3,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 )
ffc0b29c: 41 82 01 a8 beq- ffc0b444 <_Thread_Initialize+0x200>
ffc0b2a0: 7f 88 f0 40 cmplw cr7,r8,r30
ffc0b2a4: 41 9c 01 a0 blt- cr7,ffc0b444 <_Thread_Initialize+0x200><== NEVER TAKEN
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0b2a8: 2f 97 00 00 cmpwi cr7,r23,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0b2ac: 81 3f 00 bc lwz r9,188(r31)
the_stack->size = size;
ffc0b2b0: 91 1f 00 b0 stw r8,176(r31)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
ffc0b2b4: 3b a0 00 00 li r29,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0b2b8: 91 3f 00 b4 stw r9,180(r31)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0b2bc: 41 be 00 14 beq+ cr7,ffc0b2d0 <_Thread_Initialize+0x8c>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0b2c0: 38 60 01 08 li r3,264
ffc0b2c4: 48 00 0f dd bl ffc0c2a0 <_Workspace_Allocate>
if ( !fp_area )
ffc0b2c8: 7c 7d 1b 79 mr. r29,r3
ffc0b2cc: 41 82 01 34 beq- ffc0b400 <_Thread_Initialize+0x1bc>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0b2d0: 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;
ffc0b2d4: 93 bf 01 40 stw r29,320(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0b2d8: 38 e0 00 00 li r7,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0b2dc: 81 09 28 30 lwz r8,10288(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;
ffc0b2e0: 3b c0 00 00 li r30,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;
ffc0b2e4: 93 bf 00 b8 stw r29,184(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0b2e8: 2f 88 00 00 cmpwi cr7,r8,0
ffc0b2ec: 90 ff 00 50 stw r7,80(r31)
the_watchdog->routine = routine;
ffc0b2f0: 90 ff 00 64 stw r7,100(r31)
the_watchdog->id = id;
ffc0b2f4: 90 ff 00 68 stw r7,104(r31)
the_watchdog->user_data = user_data;
ffc0b2f8: 90 ff 00 6c stw r7,108(r31)
ffc0b2fc: 41 be 00 18 beq+ cr7,ffc0b314 <_Thread_Initialize+0xd0>
extensions_area = _Workspace_Allocate(
ffc0b300: 38 68 00 01 addi r3,r8,1
ffc0b304: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0b308: 48 00 0f 99 bl ffc0c2a0 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0b30c: 7c 7e 1b 79 mr. r30,r3
ffc0b310: 41 82 00 f4 beq- ffc0b404 <_Thread_Initialize+0x1c0>
* 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 ) {
ffc0b314: 2f 9e 00 00 cmpwi cr7,r30,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0b318: 93 df 01 50 stw r30,336(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 ) {
ffc0b31c: 40 be 00 58 bne+ cr7,ffc0b374 <_Thread_Initialize+0x130>
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0b320: 81 21 00 48 lwz r9,72(r1)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
ffc0b324: 7f e3 fb 78 mr r3,r31
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0b328: 93 5f 00 a0 stw r26,160(r31)
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
ffc0b32c: 3b 40 00 01 li r26,1
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0b330: 91 3f 00 a4 stw r9,164(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0b334: 81 21 00 4c lwz r9,76(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0b338: 9b 7f 00 9c stb r27,156(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0b33c: 91 3f 00 a8 stw r9,168(r31)
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0b340: 39 20 00 00 li r9,0
ffc0b344: 91 3f 00 44 stw r9,68(r31)
the_thread->resource_count = 0;
ffc0b348: 91 3f 00 1c stw r9,28(r31)
ffc0b34c: 3d 20 00 00 lis r9,0
ffc0b350: 81 29 20 98 lwz r9,8344(r9)
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
ffc0b354: 93 5f 00 10 stw r26,16(r31)
ffc0b358: 7d 29 03 a6 mtctr r9
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->real_priority = priority;
ffc0b35c: 93 9f 00 18 stw r28,24(r31)
the_thread->Start.initial_priority = priority;
ffc0b360: 93 9f 00 ac stw r28,172(r31)
ffc0b364: 4e 80 04 21 bctrl
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
ffc0b368: 7c 7b 1b 79 mr. r27,r3
ffc0b36c: 40 a2 00 38 bne+ ffc0b3a4 <_Thread_Initialize+0x160>
ffc0b370: 48 00 00 98 b ffc0b408 <_Thread_Initialize+0x1c4>
* 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++ )
ffc0b374: 3d 20 00 00 lis r9,0
ffc0b378: 81 49 28 30 lwz r10,10288(r9)
ffc0b37c: 38 e0 00 00 li r7,0
the_thread->extensions[i] = NULL;
ffc0b380: 39 00 00 00 li r8,0
ffc0b384: 48 00 00 14 b ffc0b398 <_Thread_Initialize+0x154>
ffc0b388: 81 3f 01 50 lwz r9,336(r31)
ffc0b38c: 54 e6 10 3a rlwinm r6,r7,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++ )
ffc0b390: 38 e7 00 01 addi r7,r7,1
the_thread->extensions[i] = NULL;
ffc0b394: 7d 09 31 2e stwx r8,r9,r6
* 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++ )
ffc0b398: 7f 87 50 40 cmplw cr7,r7,r10
ffc0b39c: 40 9d ff ec ble+ cr7,ffc0b388 <_Thread_Initialize+0x144>
ffc0b3a0: 4b ff ff 80 b ffc0b320 <_Thread_Initialize+0xdc>
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
goto failed;
_Thread_Set_priority( the_thread, priority );
ffc0b3a4: 7f e3 fb 78 mr r3,r31
ffc0b3a8: 7f 84 e3 78 mr r4,r28
ffc0b3ac: 48 00 06 f9 bl ffc0baa4 <_Thread_Set_priority>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
ffc0b3b0: a1 3f 00 0a lhz r9,10(r31)
static inline void _Timestamp64_implementation_Set_to_zero(
Timestamp64_Control *_time
)
{
*_time = 0;
ffc0b3b4: 39 40 00 00 li r10,0
ffc0b3b8: 91 5f 00 80 stw r10,128(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0b3bc: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0b3c0: 39 60 00 00 li r11,0
ffc0b3c4: 81 58 00 1c lwz r10,28(r24)
static inline bool _User_extensions_Thread_create( Thread_Control *created )
{
User_extensions_Thread_create_context ctx = { created, true };
_User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor );
ffc0b3c8: 3c 80 ff c1 lis r4,-63
ffc0b3cc: 91 7f 00 84 stw r11,132(r31)
ffc0b3d0: 38 61 00 08 addi r3,r1,8
ffc0b3d4: 38 84 bc bc addi r4,r4,-17220
ffc0b3d8: 7f ea 49 2e stwx r31,r10,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0b3dc: 93 3f 00 0c stw r25,12(r31)
* @{
*/
static inline bool _User_extensions_Thread_create( Thread_Control *created )
{
User_extensions_Thread_create_context ctx = { created, true };
ffc0b3e0: 93 e1 00 08 stw r31,8(r1)
ffc0b3e4: 9b 41 00 0c stb r26,12(r1)
_User_extensions_Iterate( &ctx, _User_extensions_Thread_create_visitor );
ffc0b3e8: 48 00 09 b1 bl ffc0bd98 <_User_extensions_Iterate>
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
ffc0b3ec: 38 60 00 01 li r3,1
return ctx.ok;
ffc0b3f0: 89 21 00 0c lbz r9,12(r1)
* 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 )
ffc0b3f4: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b3f8: 41 be 00 10 beq+ cr7,ffc0b408 <_Thread_Initialize+0x1c4>
ffc0b3fc: 48 00 00 48 b ffc0b444 <_Thread_Initialize+0x200>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0b400: 3b c0 00 00 li r30,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;
ffc0b404: 3b 60 00 00 li r27,0
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
ffc0b408: 80 7f 01 44 lwz r3,324(r31)
ffc0b40c: 48 00 0e ad bl ffc0c2b8 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0b410: 80 7f 01 48 lwz r3,328(r31)
ffc0b414: 48 00 0e a5 bl ffc0c2b8 <_Workspace_Free>
ffc0b418: 80 7f 01 4c lwz r3,332(r31)
ffc0b41c: 48 00 0e 9d bl ffc0c2b8 <_Workspace_Free>
_Workspace_Free( extensions_area );
ffc0b420: 7f c3 f3 78 mr r3,r30
ffc0b424: 48 00 0e 95 bl ffc0c2b8 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
ffc0b428: 7f a3 eb 78 mr r3,r29
ffc0b42c: 48 00 0e 8d bl ffc0c2b8 <_Workspace_Free>
#endif
_Workspace_Free( sched );
ffc0b430: 7f 63 db 78 mr r3,r27
ffc0b434: 48 00 0e 85 bl ffc0c2b8 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
ffc0b438: 7f e3 fb 78 mr r3,r31
ffc0b43c: 48 00 07 89 bl ffc0bbc4 <_Thread_Stack_Free>
return false;
ffc0b440: 38 60 00 00 li r3,0
}
ffc0b444: 39 61 00 40 addi r11,r1,64
ffc0b448: 4b ff 51 5c b ffc005a4 <_restgpr_23_x>
ffc0c2f8 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0c2f8: 94 21 ff e8 stwu r1,-24(r1)
ffc0c2fc: 7c 08 02 a6 mflr r0
ffc0c300: 90 01 00 1c stw r0,28(r1)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
ffc0c304: 81 23 00 10 lwz r9,16(r3)
ffc0c308: bf c1 00 10 stmw r30,16(r1)
ffc0c30c: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0c310: 71 2a 00 01 andi. r10,r9,1
ffc0c314: 40 a2 00 7c bne+ ffc0c390 <_Thread_Restart+0x98>
_Thread_Set_transient( the_thread );
ffc0c318: 90 81 00 08 stw r4,8(r1)
ffc0c31c: 90 a1 00 0c stw r5,12(r1)
ffc0c320: 48 00 00 ed bl ffc0c40c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0c324: 7f e3 fb 78 mr r3,r31
ffc0c328: 80 81 00 08 lwz r4,8(r1)
ffc0c32c: 80 a1 00 0c lwz r5,12(r1)
ffc0c330: 48 00 28 6d bl ffc0eb9c <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0c334: 7f e3 fb 78 mr r3,r31
ffc0c338: 48 00 25 49 bl ffc0e880 <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0c33c: 7f e3 fb 78 mr r3,r31
ffc0c340: 48 00 28 15 bl ffc0eb54 <_Thread_Ready>
);
}
static inline void _User_extensions_Thread_restart( Thread_Control *restarted )
{
_User_extensions_Iterate(
ffc0c344: 3c 80 ff c1 lis r4,-63
ffc0c348: 7f e3 fb 78 mr r3,r31
ffc0c34c: 38 84 c6 30 addi r4,r4,-14800
ffc0c350: 48 00 03 41 bl ffc0c690 <_User_extensions_Iterate>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0c354: 3d 20 00 00 lis r9,0
ffc0c358: 39 29 2e 20 addi r9,r9,11808
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0c35c: 81 49 00 10 lwz r10,16(r9)
_Thread_Restart_self();
return true;
ffc0c360: 38 60 00 01 li r3,1
ffc0c364: 7d 3e 4b 78 mr r30,r9
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0c368: 7f 9f 50 00 cmpw cr7,r31,r10
ffc0c36c: 40 be 00 28 bne+ cr7,ffc0c394 <_Thread_Restart+0x9c>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0c370: 81 3f 01 40 lwz r9,320(r31)
ffc0c374: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c378: 41 9e 00 0c beq- cr7,ffc0c384 <_Thread_Restart+0x8c> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0c37c: 38 7f 01 40 addi r3,r31,320
ffc0c380: 48 00 e7 c1 bl ffc1ab40 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0c384: 80 7e 00 10 lwz r3,16(r30)
ffc0c388: 38 63 00 c0 addi r3,r3,192
ffc0c38c: 48 00 e9 49 bl ffc1acd4 <_CPU_Context_restore>
_Thread_Restart_self();
return true;
}
return false;
ffc0c390: 38 60 00 00 li r3,0
}
ffc0c394: 39 61 00 18 addi r11,r1,24
ffc0c398: 4b ff 4a 88 b ffc00e20 <_restgpr_30_x>
ffc0e210 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
ffc0e210: 7c 64 1b 78 mr r4,r3
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
ffc0e214: 80 63 00 44 lwz r3,68(r3)
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
ffc0e218: 81 23 00 30 lwz r9,48(r3)
ffc0e21c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0e220: 41 9e 00 30 beq- cr7,ffc0e250 <_Thread_queue_Process_timeout+0x40>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0e224: 3d 40 00 00 lis r10,0
ffc0e228: 81 4a 2e 10 lwz r10,11792(r10)
ffc0e22c: 7f 84 50 00 cmpw cr7,r4,r10
ffc0e230: 40 be 00 20 bne+ cr7,ffc0e250 <_Thread_queue_Process_timeout+0x40><== NEVER TAKEN
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
ffc0e234: 2f 89 00 03 cmpwi cr7,r9,3
ffc0e238: 4d 9e 00 20 beqlr cr7
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
ffc0e23c: 81 23 00 3c lwz r9,60(r3)
ffc0e240: 91 24 00 34 stw r9,52(r4)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc0e244: 39 20 00 02 li r9,2
ffc0e248: 91 23 00 30 stw r9,48(r3)
ffc0e24c: 4e 80 00 20 blr
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
ffc0e250: 81 23 00 3c lwz r9,60(r3)
ffc0e254: 91 24 00 34 stw r9,52(r4)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
ffc0e258: 4b ff fe 9c b ffc0e0f4 <_Thread_queue_Extract>
ffc0b9ec <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0b9ec: 94 21 ff d8 stwu r1,-40(r1)
ffc0b9f0: 7c 08 02 a6 mflr r0
ffc0b9f4: 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 )
ffc0b9f8: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0b9fc: 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 )
ffc0ba00: 41 82 00 58 beq- ffc0ba58 <_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 ) {
ffc0ba04: 81 3f 00 34 lwz r9,52(r31)
ffc0ba08: 2f 89 00 01 cmpwi cr7,r9,1
ffc0ba0c: 40 be 00 4c bne+ cr7,ffc0ba58 <_Thread_queue_Requeue+0x6c><== NEVER TAKEN
ffc0ba10: 7c 9e 23 78 mr r30,r4
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0ba14: 7f a0 00 a6 mfmsr r29
ffc0ba18: 7d 50 42 a6 mfsprg r10,0
ffc0ba1c: 7f aa 50 78 andc r10,r29,r10
ffc0ba20: 7d 40 01 24 mtmsr r10
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 ) ) {
ffc0ba24: 3d 00 00 03 lis r8,3
ffc0ba28: 81 44 00 10 lwz r10,16(r4)
ffc0ba2c: 61 08 be e0 ori r8,r8,48864
ffc0ba30: 7d 07 50 39 and. r7,r8,r10
ffc0ba34: 41 a2 00 20 beq+ ffc0ba54 <_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;
ffc0ba38: 91 3f 00 30 stw r9,48(r31)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0ba3c: 38 a0 00 01 li r5,1
ffc0ba40: 48 00 26 cd bl ffc0e10c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0ba44: 7f e3 fb 78 mr r3,r31
ffc0ba48: 7f c4 f3 78 mr r4,r30
ffc0ba4c: 38 a1 00 08 addi r5,r1,8
ffc0ba50: 4b ff fd 11 bl ffc0b760 <_Thread_queue_Enqueue_priority>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ba54: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
}
ffc0ba58: 39 61 00 28 addi r11,r1,40
ffc0ba5c: 4b ff 4b 60 b ffc005bc <_restgpr_29_x>
ffc0ba60 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0ba60: 94 21 ff e8 stwu r1,-24(r1)
ffc0ba64: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0ba68: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0ba6c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0ba70: 4b ff f7 41 bl ffc0b1b0 <_Thread_Get>
switch ( location ) {
ffc0ba74: 81 21 00 08 lwz r9,8(r1)
ffc0ba78: 2f 89 00 00 cmpwi cr7,r9,0
ffc0ba7c: 40 9e 00 18 bne- cr7,ffc0ba94 <_Thread_queue_Timeout+0x34><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0ba80: 48 00 27 91 bl ffc0e210 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc0ba84: 3d 20 00 00 lis r9,0
ffc0ba88: 81 49 28 24 lwz r10,10276(r9)
--level;
ffc0ba8c: 39 4a ff ff addi r10,r10,-1
_Thread_Dispatch_disable_level = level;
ffc0ba90: 91 49 28 24 stw r10,10276(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0ba94: 80 01 00 1c lwz r0,28(r1)
ffc0ba98: 38 21 00 18 addi r1,r1,24
ffc0ba9c: 7c 08 03 a6 mtlr r0
ffc0baa0: 4e 80 00 20 blr
ffc19d40 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc19d40: 94 21 ff a0 stwu r1,-96(r1)
ffc19d44: 7c 08 02 a6 mflr r0
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc19d48: 39 20 00 00 li r9,0
ffc19d4c: be 41 00 28 stmw r18,40(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc19d50: 3a c1 00 14 addi r22,r1,20
ffc19d54: 3a 61 00 18 addi r19,r1,24
ffc19d58: 3b 21 00 0c addi r25,r1,12
ffc19d5c: 90 01 00 64 stw r0,100(r1)
head->previous = NULL;
tail->previous = head;
ffc19d60: 3b a1 00 08 addi r29,r1,8
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc19d64: 92 61 00 14 stw r19,20(r1)
ffc19d68: 7c 7f 1b 78 mr r31,r3
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc19d6c: 3e a0 00 00 lis r21,0
head->previous = NULL;
ffc19d70: 91 21 00 18 stw r9,24(r1)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19d74: 3b 43 00 30 addi r26,r3,48
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc19d78: 3e 80 00 00 lis r20,0
tail->previous = head;
ffc19d7c: 92 c1 00 1c stw r22,28(r1)
/*
* 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 );
ffc19d80: 3b 83 00 68 addi r28,r3,104
* 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;
ffc19d84: 3a 40 00 00 li r18,0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc19d88: 93 21 00 08 stw r25,8(r1)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc19d8c: 3f 60 00 00 lis r27,0
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc19d90: 3a e3 00 08 addi r23,r3,8
head->previous = NULL;
ffc19d94: 91 21 00 0c stw r9,12(r1)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc19d98: 3b 03 00 40 addi r24,r3,64
tail->previous = head;
ffc19d9c: 93 a1 00 10 stw r29,16(r1)
{
/*
* 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;
ffc19da0: 92 df 00 78 stw r22,120(r31)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc19da4: 81 35 29 18 lwz r9,10520(r21)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19da8: 7f 43 d3 78 mr r3,r26
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc19dac: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19db0: 7f a5 eb 78 mr r5,r29
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc19db4: 91 3f 00 3c stw r9,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc19db8: 7c 84 48 50 subf r4,r4,r9
ffc19dbc: 48 00 46 b1 bl ffc1e46c <_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();
ffc19dc0: 39 34 70 00 addi r9,r20,28672
ffc19dc4: 80 69 00 00 lwz r3,0(r9)
ffc19dc8: 3c c0 3b 9a lis r6,15258
ffc19dcc: 80 89 00 04 lwz r4,4(r9)
ffc19dd0: 38 a0 00 00 li r5,0
ffc19dd4: 60 c6 ca 00 ori r6,r6,51712
ffc19dd8: 48 01 37 a1 bl ffc2d578 <__divdi3>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc19ddc: 80 bf 00 74 lwz r5,116(r31)
ffc19de0: 7c 9e 23 78 mr r30,r4
/*
* 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 ) {
ffc19de4: 7f 84 28 40 cmplw cr7,r4,r5
ffc19de8: 40 bd 00 18 ble+ cr7,ffc19e00 <_Timer_server_Body+0xc0>
/*
* 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 );
ffc19dec: 7c 85 20 50 subf r4,r5,r4
ffc19df0: 7f 83 e3 78 mr r3,r28
ffc19df4: 7f a5 eb 78 mr r5,r29
ffc19df8: 48 00 46 75 bl ffc1e46c <_Watchdog_Adjust_to_chain>
ffc19dfc: 48 00 00 18 b ffc19e14 <_Timer_server_Body+0xd4>
} else if ( snapshot < last_snapshot ) {
ffc19e00: 40 bc 00 14 bge+ cr7,ffc19e14 <_Timer_server_Body+0xd4>
/*
* 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 );
ffc19e04: 7f 83 e3 78 mr r3,r28
ffc19e08: 38 80 00 01 li r4,1
ffc19e0c: 7c be 28 50 subf r5,r30,r5
ffc19e10: 48 00 45 a1 bl ffc1e3b0 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
ffc19e14: 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 );
ffc19e18: 80 7f 00 78 lwz r3,120(r31)
ffc19e1c: 48 00 0a ed bl ffc1a908 <_Chain_Get>
if ( timer == NULL ) {
ffc19e20: 7c 7e 1b 79 mr. r30,r3
ffc19e24: 41 82 00 2c beq- ffc19e50 <_Timer_server_Body+0x110>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19e28: 81 3e 00 38 lwz r9,56(r30)
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc19e2c: 7f 43 d3 78 mr r3,r26
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19e30: 2f 89 00 01 cmpwi cr7,r9,1
ffc19e34: 41 9e 00 10 beq- cr7,ffc19e44 <_Timer_server_Body+0x104>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19e38: 2f 89 00 03 cmpwi cr7,r9,3
ffc19e3c: 40 9e ff dc bne+ cr7,ffc19e18 <_Timer_server_Body+0xd8> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc19e40: 7f 83 e3 78 mr r3,r28
ffc19e44: 38 9e 00 10 addi r4,r30,16
ffc19e48: 48 00 46 c1 bl ffc1e508 <_Watchdog_Insert>
ffc19e4c: 4b ff ff cc b ffc19e18 <_Timer_server_Body+0xd8>
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
ffc19e50: 4b ff fe 05 bl ffc19c54 <ppc_interrupt_disable>
if ( _Chain_Is_empty( insert_chain ) ) {
ffc19e54: 81 21 00 14 lwz r9,20(r1)
ffc19e58: 7f 89 98 00 cmpw cr7,r9,r19
ffc19e5c: 40 be 00 1c bne+ cr7,ffc19e78 <_Timer_server_Body+0x138><== NEVER TAKEN
ts->insert_chain = NULL;
ffc19e60: 93 df 00 78 stw r30,120(r31)
ffc19e64: 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 ) ) {
ffc19e68: 81 21 00 08 lwz r9,8(r1)
ffc19e6c: 7f 89 c8 00 cmpw cr7,r9,r25
ffc19e70: 40 be 00 10 bne+ cr7,ffc19e80 <_Timer_server_Body+0x140>
ffc19e74: 48 00 00 50 b ffc19ec4 <_Timer_server_Body+0x184>
ffc19e78: 7c 60 01 24 mtmsr r3 <== NOT EXECUTED
ffc19e7c: 4b ff ff 28 b ffc19da4 <_Timer_server_Body+0x64> <== 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 );
ffc19e80: 4b ff fd d5 bl ffc19c54 <ppc_interrupt_disable>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc19e84: 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))
ffc19e88: 7f 89 c8 00 cmpw cr7,r9,r25
ffc19e8c: 41 9e 00 30 beq- cr7,ffc19ebc <_Timer_server_Body+0x17c>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
ffc19e90: 81 49 00 00 lwz r10,0(r9)
head->next = new_first;
new_first->previous = head;
ffc19e94: 93 aa 00 04 stw r29,4(r10)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
ffc19e98: 91 41 00 08 stw r10,8(r1)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc19e9c: 92 49 00 08 stw r18,8(r9)
ffc19ea0: 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 );
ffc19ea4: 81 49 00 1c lwz r10,28(r9)
ffc19ea8: 80 69 00 20 lwz r3,32(r9)
ffc19eac: 80 89 00 24 lwz r4,36(r9)
ffc19eb0: 7d 49 03 a6 mtctr r10
ffc19eb4: 4e 80 04 21 bctrl
}
ffc19eb8: 4b ff ff c8 b ffc19e80 <_Timer_server_Body+0x140>
ffc19ebc: 7c 60 01 24 mtmsr r3
ffc19ec0: 4b ff fe e0 b ffc19da0 <_Timer_server_Body+0x60>
} else {
ts->active = false;
ffc19ec4: 39 20 00 00 li r9,0
ffc19ec8: 99 3f 00 7c stb r9,124(r31)
ffc19ecc: 81 3b 28 f8 lwz r9,10488(r27)
++level;
ffc19ed0: 39 29 00 01 addi r9,r9,1
_Thread_Dispatch_disable_level = level;
ffc19ed4: 91 3b 28 f8 stw r9,10488(r27)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc19ed8: 80 7f 00 00 lwz r3,0(r31)
ffc19edc: 38 80 00 08 li r4,8
ffc19ee0: 48 00 40 cd bl ffc1dfac <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc19ee4: 7f e3 fb 78 mr r3,r31
ffc19ee8: 4b ff fd 81 bl ffc19c68 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc19eec: 7f e3 fb 78 mr r3,r31
ffc19ef0: 4b ff fd e5 bl ffc19cd4 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc19ef4: 48 00 36 f1 bl ffc1d5e4 <_Thread_Enable_dispatch>
ts->active = true;
ffc19ef8: 39 20 00 01 li r9,1
ffc19efc: 99 3f 00 7c stb r9,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc19f00: 7e e3 bb 78 mr r3,r23
ffc19f04: 48 00 47 61 bl ffc1e664 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc19f08: 7f 03 c3 78 mr r3,r24
ffc19f0c: 48 00 47 59 bl ffc1e664 <_Watchdog_Remove>
ffc19f10: 4b ff fe 90 b ffc19da0 <_Timer_server_Body+0x60>
ffc19f14 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc19f14: 94 21 ff e8 stwu r1,-24(r1)
ffc19f18: 7c 08 02 a6 mflr r0
ffc19f1c: 90 01 00 1c stw r0,28(r1)
if ( ts->insert_chain == NULL ) {
ffc19f20: 81 23 00 78 lwz r9,120(r3)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc19f24: bf a1 00 0c stmw r29,12(r1)
ffc19f28: 7c 7f 1b 78 mr r31,r3
if ( ts->insert_chain == NULL ) {
ffc19f2c: 2f 89 00 00 cmpwi cr7,r9,0
ffc19f30: 40 be 01 3c bne+ cr7,ffc1a06c <_Timer_server_Schedule_operation_method+0x158>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc19f34: 3d 20 00 00 lis r9,0
ffc19f38: 81 49 28 f8 lwz r10,10488(r9)
ffc19f3c: 7c 9e 23 78 mr r30,r4
++level;
ffc19f40: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc19f44: 91 49 28 f8 stw r10,10488(r9)
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc19f48: 81 24 00 38 lwz r9,56(r4)
ffc19f4c: 2f 89 00 01 cmpwi cr7,r9,1
ffc19f50: 40 be 00 6c bne+ cr7,ffc19fbc <_Timer_server_Schedule_operation_method+0xa8>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc19f54: 4b ff fd 01 bl ffc19c54 <ppc_interrupt_disable>
snapshot = _Watchdog_Ticks_since_boot;
ffc19f58: 3d 20 00 00 lis r9,0
ffc19f5c: 81 49 29 18 lwz r10,10520(r9)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc19f60: 39 1f 00 34 addi r8,r31,52
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc19f64: 81 3f 00 30 lwz r9,48(r31)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
ffc19f68: 80 ff 00 3c lwz r7,60(r31)
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc19f6c: 7f 89 40 00 cmpw cr7,r9,r8
ffc19f70: 41 9e 00 20 beq- cr7,ffc19f90 <_Timer_server_Schedule_operation_method+0x7c>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
ffc19f74: 80 c9 00 10 lwz r6,16(r9)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
ffc19f78: 7c e7 50 50 subf r7,r7,r10
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
ffc19f7c: 39 00 00 00 li r8,0
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
ffc19f80: 7f 86 38 40 cmplw cr7,r6,r7
ffc19f84: 40 9d 00 08 ble- cr7,ffc19f8c <_Timer_server_Schedule_operation_method+0x78>
delta_interval -= delta;
ffc19f88: 7d 07 30 50 subf r8,r7,r6
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
ffc19f8c: 91 09 00 10 stw r8,16(r9)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
ffc19f90: 91 5f 00 3c stw r10,60(r31)
ffc19f94: 7c 60 01 24 mtmsr r3
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc19f98: 38 7f 00 30 addi r3,r31,48
ffc19f9c: 38 9e 00 10 addi r4,r30,16
ffc19fa0: 48 00 45 69 bl ffc1e508 <_Watchdog_Insert>
if ( !ts->active ) {
ffc19fa4: 89 3f 00 7c lbz r9,124(r31)
ffc19fa8: 2f 89 00 00 cmpwi cr7,r9,0
ffc19fac: 40 be 00 ac bne+ cr7,ffc1a058 <_Timer_server_Schedule_operation_method+0x144>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc19fb0: 7f e3 fb 78 mr r3,r31
ffc19fb4: 4b ff fc b5 bl ffc19c68 <_Timer_server_Reset_interval_system_watchdog>
ffc19fb8: 48 00 00 a0 b ffc1a058 <_Timer_server_Schedule_operation_method+0x144>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc19fbc: 2f 89 00 03 cmpwi cr7,r9,3
ffc19fc0: 40 be 00 98 bne+ cr7,ffc1a058 <_Timer_server_Schedule_operation_method+0x144>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
ffc19fc4: 4b ff fc 91 bl ffc19c54 <ppc_interrupt_disable>
ffc19fc8: 7c 7d 1b 78 mr r29,r3
ffc19fcc: 3d 20 00 00 lis r9,0
ffc19fd0: 39 29 70 00 addi r9,r9,28672
ffc19fd4: 80 69 00 00 lwz r3,0(r9)
ffc19fd8: 3c c0 3b 9a lis r6,15258
ffc19fdc: 80 89 00 04 lwz r4,4(r9)
ffc19fe0: 38 a0 00 00 li r5,0
ffc19fe4: 60 c6 ca 00 ori r6,r6,51712
ffc19fe8: 48 01 35 91 bl ffc2d578 <__divdi3>
ffc19fec: 81 3f 00 68 lwz r9,104(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc19ff0: 39 1f 00 6c addi r8,r31,108
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
ffc19ff4: 81 5f 00 74 lwz r10,116(r31)
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc19ff8: 7f 89 40 00 cmpw cr7,r9,r8
ffc19ffc: 41 9e 00 34 beq- cr7,ffc1a030 <_Timer_server_Schedule_operation_method+0x11c>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc1a000: 7f 84 50 40 cmplw cr7,r4,r10
_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;
ffc1a004: 81 09 00 10 lwz r8,16(r9)
if ( snapshot > last_snapshot ) {
ffc1a008: 40 9d 00 1c ble- cr7,ffc1a024 <_Timer_server_Schedule_operation_method+0x110>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
ffc1a00c: 7c ea 20 50 subf r7,r10,r4
if (delta_interval > delta) {
ffc1a010: 7f 88 38 40 cmplw cr7,r8,r7
delta_interval -= delta;
} else {
delta_interval = 0;
ffc1a014: 39 40 00 00 li r10,0
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
ffc1a018: 40 9d 00 14 ble- cr7,ffc1a02c <_Timer_server_Schedule_operation_method+0x118><== NEVER TAKEN
delta_interval -= delta;
ffc1a01c: 7d 47 40 50 subf r10,r7,r8
ffc1a020: 48 00 00 0c b ffc1a02c <_Timer_server_Schedule_operation_method+0x118>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
ffc1a024: 7d 48 52 14 add r10,r8,r10
delta_interval += delta;
ffc1a028: 7d 44 50 50 subf r10,r4,r10
}
first_watchdog->delta_interval = delta_interval;
ffc1a02c: 91 49 00 10 stw r10,16(r9)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
ffc1a030: 90 9f 00 74 stw r4,116(r31)
ffc1a034: 7f a0 01 24 mtmsr r29
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1a038: 38 7f 00 68 addi r3,r31,104
ffc1a03c: 38 9e 00 10 addi r4,r30,16
ffc1a040: 48 00 44 c9 bl ffc1e508 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1a044: 89 3f 00 7c lbz r9,124(r31)
ffc1a048: 2f 89 00 00 cmpwi cr7,r9,0
ffc1a04c: 40 be 00 0c bne+ cr7,ffc1a058 <_Timer_server_Schedule_operation_method+0x144><== NEVER TAKEN
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1a050: 7f e3 fb 78 mr r3,r31
ffc1a054: 4b ff fc 81 bl ffc19cd4 <_Timer_server_Reset_tod_system_watchdog>
* 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 );
}
}
ffc1a058: 80 01 00 1c lwz r0,28(r1)
ffc1a05c: bb a1 00 0c lmw r29,12(r1)
ffc1a060: 7c 08 03 a6 mtlr r0
ffc1a064: 38 21 00 18 addi r1,r1,24
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1a068: 48 00 35 7c b ffc1d5e4 <_Thread_Enable_dispatch>
* 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 );
}
}
ffc1a06c: 80 01 00 1c lwz r0,28(r1)
ffc1a070: bb a1 00 0c lmw r29,12(r1)
ffc1a074: 7c 08 03 a6 mtlr r0
* 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 );
ffc1a078: 80 63 00 78 lwz r3,120(r3)
}
}
ffc1a07c: 38 21 00 18 addi r1,r1,24
* 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 );
ffc1a080: 48 00 08 58 b ffc1a8d8 <_Chain_Append>
ffc0d54c <_Timestamp64_Divide>:
const Timestamp64_Control *_lhs,
const Timestamp64_Control *_rhs,
uint32_t *_ival_percentage,
uint32_t *_fval_percentage
)
{
ffc0d54c: 94 21 ff e8 stwu r1,-24(r1)
ffc0d550: 7c 08 02 a6 mflr r0
ffc0d554: 90 01 00 1c stw r0,28(r1)
ffc0d558: bf 81 00 08 stmw r28,8(r1)
ffc0d55c: 7c be 2b 78 mr r30,r5
ffc0d560: 7c df 33 78 mr r31,r6
Timestamp64_Control answer;
if ( *_rhs == 0 ) {
ffc0d564: 80 a4 00 00 lwz r5,0(r4)
ffc0d568: 81 24 00 04 lwz r9,4(r4)
ffc0d56c: 7c a8 4b 79 or. r8,r5,r9
ffc0d570: 40 a2 00 10 bne+ ffc0d580 <_Timestamp64_Divide+0x34> <== ALWAYS TAKEN
*_ival_percentage = 0;
ffc0d574: 91 1e 00 00 stw r8,0(r30) <== NOT EXECUTED
*_fval_percentage = 0;
ffc0d578: 91 06 00 00 stw r8,0(r6) <== NOT EXECUTED
return;
ffc0d57c: 48 00 00 5c b ffc0d5d8 <_Timestamp64_Divide+0x8c> <== NOT EXECUTED
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
ffc0d580: 80 c3 00 04 lwz r6,4(r3)
ffc0d584: 3d 00 00 01 lis r8,1
ffc0d588: 80 e3 00 00 lwz r7,0(r3)
ffc0d58c: 61 08 86 a0 ori r8,r8,34464
ffc0d590: 7c 68 30 16 mulhwu r3,r8,r6
ffc0d594: 7c e8 39 d6 mullw r7,r8,r7
ffc0d598: 7c 88 31 d6 mullw r4,r8,r6
ffc0d59c: 7c 67 1a 14 add r3,r7,r3
ffc0d5a0: 7d 26 4b 78 mr r6,r9
ffc0d5a4: 48 00 dd 7d bl ffc1b320 <__divdi3>
*_ival_percentage = answer / 1000;
ffc0d5a8: 38 a0 00 00 li r5,0
ffc0d5ac: 38 c0 03 e8 li r6,1000
* This looks odd but gives the results the proper precision.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (*_lhs * 100000) / *_rhs;
ffc0d5b0: 7c 7c 1b 78 mr r28,r3
ffc0d5b4: 7c 9d 23 78 mr r29,r4
*_ival_percentage = answer / 1000;
ffc0d5b8: 48 00 dd 69 bl ffc1b320 <__divdi3>
ffc0d5bc: 90 9e 00 00 stw r4,0(r30)
*_fval_percentage = answer % 1000;
ffc0d5c0: 7f 83 e3 78 mr r3,r28
ffc0d5c4: 7f a4 eb 78 mr r4,r29
ffc0d5c8: 38 a0 00 00 li r5,0
ffc0d5cc: 38 c0 03 e8 li r6,1000
ffc0d5d0: 48 00 e1 75 bl ffc1b744 <__moddi3>
ffc0d5d4: 90 9f 00 00 stw r4,0(r31)
}
ffc0d5d8: 39 61 00 18 addi r11,r1,24
ffc0d5dc: 4b ff 3d 54 b ffc01330 <_restgpr_28_x>
ffc0d840 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0d840: 94 21 ff e8 stwu r1,-24(r1)
ffc0d844: 7c 08 02 a6 mflr r0
ffc0d848: 90 01 00 1c stw r0,28(r1)
ffc0d84c: bf 81 00 08 stmw r28,8(r1)
ffc0d850: 7c 7e 1b 78 mr r30,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d854: 7d 20 00 a6 mfmsr r9
ffc0d858: 7d 50 42 a6 mfsprg r10,0
ffc0d85c: 7d 2a 50 78 andc r10,r9,r10
ffc0d860: 7d 40 01 24 mtmsr r10
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0d864: 81 43 00 00 lwz r10,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 );
ffc0d868: 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 ) ) {
ffc0d86c: 7f 8a e8 00 cmpw cr7,r10,r29
ffc0d870: 41 9e 00 80 beq- cr7,ffc0d8f0 <_Watchdog_Adjust+0xb0>
switch ( direction ) {
ffc0d874: 2f 84 00 00 cmpwi cr7,r4,0
ffc0d878: 7c bf 2b 78 mr r31,r5
ffc0d87c: 41 9e 00 68 beq- cr7,ffc0d8e4 <_Watchdog_Adjust+0xa4>
ffc0d880: 2f 84 00 01 cmpwi cr7,r4,1
ffc0d884: 40 be 00 6c bne+ cr7,ffc0d8f0 <_Watchdog_Adjust+0xb0> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0d888: 81 0a 00 10 lwz r8,16(r10)
ffc0d88c: 7f e8 2a 14 add r31,r8,r5
ffc0d890: 48 00 00 18 b ffc0d8a8 <_Watchdog_Adjust+0x68>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d894: 81 5e 00 00 lwz r10,0(r30)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0d898: 81 0a 00 10 lwz r8,16(r10)
ffc0d89c: 7f 9f 40 40 cmplw cr7,r31,r8
ffc0d8a0: 40 bc 00 10 bge+ cr7,ffc0d8b0 <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval -= units;
ffc0d8a4: 7f ff 40 50 subf r31,r31,r8
ffc0d8a8: 93 ea 00 10 stw r31,16(r10)
break;
ffc0d8ac: 48 00 00 44 b ffc0d8f0 <_Watchdog_Adjust+0xb0>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0d8b0: 93 8a 00 10 stw r28,16(r10)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
ffc0d8b4: 7f e8 f8 50 subf r31,r8,r31
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d8b8: 7d 20 01 24 mtmsr r9
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0d8bc: 7f c3 f3 78 mr r3,r30
ffc0d8c0: 48 00 02 41 bl ffc0db00 <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d8c4: 7d 20 00 a6 mfmsr r9
ffc0d8c8: 7d 50 42 a6 mfsprg r10,0
ffc0d8cc: 7d 2a 50 78 andc r10,r9,r10
ffc0d8d0: 7d 40 01 24 mtmsr r10
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0d8d4: 81 5e 00 00 lwz r10,0(r30)
ffc0d8d8: 7f 8a e8 00 cmpw cr7,r10,r29
ffc0d8dc: 40 be 00 0c bne+ cr7,ffc0d8e8 <_Watchdog_Adjust+0xa8>
ffc0d8e0: 48 00 00 10 b ffc0d8f0 <_Watchdog_Adjust+0xb0>
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;
ffc0d8e4: 3b 80 00 01 li r28,1
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0d8e8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0d8ec: 40 9e ff a8 bne+ cr7,ffc0d894 <_Watchdog_Adjust+0x54> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d8f0: 7d 20 01 24 mtmsr r9
}
}
_ISR_Enable( level );
}
ffc0d8f4: 39 61 00 18 addi r11,r1,24
ffc0d8f8: 4b ff 3a 38 b ffc01330 <_restgpr_28_x>
ffc0c018 <_Watchdog_Remove>:
#include <rtems/score/watchdog.h>
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
ffc0c018: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c01c: 7c c0 00 a6 mfmsr r6
ffc0c020: 7d 50 42 a6 mfsprg r10,0
ffc0c024: 7c ca 50 78 andc r10,r6,r10
ffc0c028: 7d 40 01 24 mtmsr r10
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0c02c: 80 63 00 08 lwz r3,8(r3)
switch ( previous_state ) {
ffc0c030: 2f 83 00 01 cmpwi cr7,r3,1
ffc0c034: 41 9e 00 18 beq- cr7,ffc0c04c <_Watchdog_Remove+0x34>
ffc0c038: 2b 83 00 01 cmplwi cr7,r3,1
ffc0c03c: 41 9c 00 70 blt- cr7,ffc0c0ac <_Watchdog_Remove+0x94>
ffc0c040: 2b 83 00 03 cmplwi cr7,r3,3
ffc0c044: 41 9d 00 68 bgt- cr7,ffc0c0ac <_Watchdog_Remove+0x94> <== NEVER TAKEN
ffc0c048: 48 00 00 10 b ffc0c058 <_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;
ffc0c04c: 39 40 00 00 li r10,0
ffc0c050: 91 49 00 08 stw r10,8(r9)
break;
ffc0c054: 48 00 00 58 b ffc0c0ac <_Watchdog_Remove+0x94>
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0c058: 39 40 00 00 li r10,0
ffc0c05c: 91 49 00 08 stw r10,8(r9)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
ffc0c060: 81 49 00 00 lwz r10,0(r9)
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0c064: 81 0a 00 00 lwz r8,0(r10)
ffc0c068: 2f 88 00 00 cmpwi cr7,r8,0
ffc0c06c: 41 9e 00 14 beq- cr7,ffc0c080 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0c070: 80 ea 00 10 lwz r7,16(r10)
ffc0c074: 81 09 00 10 lwz r8,16(r9)
ffc0c078: 7d 07 42 14 add r8,r7,r8
ffc0c07c: 91 0a 00 10 stw r8,16(r10)
if ( _Watchdog_Sync_count )
ffc0c080: 3d 00 00 00 lis r8,0
ffc0c084: 81 08 28 40 lwz r8,10304(r8)
ffc0c088: 2f 88 00 00 cmpwi cr7,r8,0
ffc0c08c: 41 9e 00 14 beq- cr7,ffc0c0a0 <_Watchdog_Remove+0x88>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0c090: 3d 00 00 00 lis r8,0
ffc0c094: 80 e8 2e 08 lwz r7,11784(r8)
ffc0c098: 3d 00 00 00 lis r8,0
ffc0c09c: 90 e8 28 38 stw r7,10296(r8)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0c0a0: 81 09 00 04 lwz r8,4(r9)
next->previous = previous;
ffc0c0a4: 91 0a 00 04 stw r8,4(r10)
previous->next = next;
ffc0c0a8: 91 48 00 00 stw r10,0(r8)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0c0ac: 3d 40 00 00 lis r10,0
ffc0c0b0: 81 4a 28 44 lwz r10,10308(r10)
ffc0c0b4: 91 49 00 18 stw r10,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c0b8: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
return( previous_state );
}
ffc0c0bc: 4e 80 00 20 blr
ffc0c0c0 <_Watchdog_Tickle>:
#include <rtems/score/watchdog.h>
void _Watchdog_Tickle(
Chain_Control *header
)
{
ffc0c0c0: 94 21 ff e8 stwu r1,-24(r1)
ffc0c0c4: 7c 08 02 a6 mflr r0
ffc0c0c8: 90 01 00 1c stw r0,28(r1)
ffc0c0cc: bf 81 00 08 stmw r28,8(r1)
ffc0c0d0: 7c 7e 1b 78 mr r30,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c0d4: 7f a0 00 a6 mfmsr r29
ffc0c0d8: 7d 30 42 a6 mfsprg r9,0
ffc0c0dc: 7f a9 48 78 andc r9,r29,r9
ffc0c0e0: 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;
ffc0c0e4: 83 e3 00 00 lwz r31,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 );
ffc0c0e8: 3b 83 00 04 addi r28,r3,4
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0c0ec: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0c0f0: 41 9e 00 6c beq- cr7,ffc0c15c <_Watchdog_Tickle+0x9c>
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
ffc0c0f4: 81 3f 00 10 lwz r9,16(r31)
ffc0c0f8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c0fc: 41 9e 00 14 beq- cr7,ffc0c110 <_Watchdog_Tickle+0x50> <== NEVER TAKEN
the_watchdog->delta_interval--;
ffc0c100: 39 29 ff ff addi r9,r9,-1
ffc0c104: 91 3f 00 10 stw r9,16(r31)
if ( the_watchdog->delta_interval != 0 )
ffc0c108: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c10c: 40 9e 00 50 bne- cr7,ffc0c15c <_Watchdog_Tickle+0x9c>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
ffc0c110: 7f e3 fb 78 mr r3,r31
ffc0c114: 4b ff ff 05 bl ffc0c018 <_Watchdog_Remove>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c118: 7f a0 01 24 mtmsr r29
_ISR_Enable( level );
switch( watchdog_state ) {
ffc0c11c: 2f 83 00 02 cmpwi cr7,r3,2
ffc0c120: 40 be 00 18 bne+ cr7,ffc0c138 <_Watchdog_Tickle+0x78>
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
ffc0c124: 81 3f 00 1c lwz r9,28(r31)
ffc0c128: 80 7f 00 20 lwz r3,32(r31)
ffc0c12c: 80 9f 00 24 lwz r4,36(r31)
ffc0c130: 7d 29 03 a6 mtctr r9
ffc0c134: 4e 80 04 21 bctrl
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c138: 7f a0 00 a6 mfmsr r29
ffc0c13c: 7d 30 42 a6 mfsprg r9,0
ffc0c140: 7f a9 48 78 andc r9,r29,r9
ffc0c144: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0c148: 83 fe 00 00 lwz r31,0(r30)
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
ffc0c14c: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0c150: 41 9e 00 0c beq- cr7,ffc0c15c <_Watchdog_Tickle+0x9c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
ffc0c154: 81 3f 00 10 lwz r9,16(r31)
ffc0c158: 4b ff ff b0 b ffc0c108 <_Watchdog_Tickle+0x48>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c15c: 7f a0 01 24 mtmsr r29
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
ffc0c160: 39 61 00 18 addi r11,r1,24
ffc0c164: 4b ff 44 54 b ffc005b8 <_restgpr_28_x>
ffc0c168 <_Workspace_Handler_initialization>:
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c168: 3d 40 ff c2 lis r10,-62
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c16c: 7d 80 00 26 mfcr r12
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c170: 39 2a ad 58 addi r9,r10,-21160
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c174: 94 21 ff d0 stwu r1,-48(r1)
ffc0c178: 7c 08 02 a6 mflr r0
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c17c: 89 09 00 32 lbz r8,50(r9)
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c180: bf 01 00 10 stmw r24,16(r1)
ffc0c184: 7c 99 23 78 mr r25,r4
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c188: 2f 88 00 00 cmpwi cr7,r8,0
ffc0c18c: 83 ca ad 58 lwz r30,-21160(r10)
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c190: 7c ba 2b 78 mr r26,r5
ffc0c194: 90 01 00 34 stw r0,52(r1)
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c198: 39 40 00 00 li r10,0
void _Workspace_Handler_initialization(
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
ffc0c19c: 91 81 00 0c stw r12,12(r1)
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
uintptr_t remaining = rtems_configuration_get_work_space_size();
ffc0c1a0: 40 9e 00 08 bne- cr7,ffc0c1a8 <_Workspace_Handler_initialization+0x40>
ffc0c1a4: 81 49 00 04 lwz r10,4(r9)
ffc0c1a8: 7f ca f2 14 add r30,r10,r30
bool do_zero = rtems_configuration_get_do_zero_of_workspace();
ffc0c1ac: 89 49 00 30 lbz r10,48(r9)
bool unified = rtems_configuration_get_unified_work_area();
ffc0c1b0: 89 29 00 31 lbz r9,49(r9)
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
ffc0c1b4: 3f 60 ff c1 lis r27,-63
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
ffc0c1b8: 3f 00 00 00 lis r24,0
ffc0c1bc: 7c 7f 1b 78 mr r31,r3
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
ffc0c1c0: 3b 80 00 00 li r28,0
Heap_Area *areas,
size_t area_count,
Heap_Initialization_or_extend_handler extend
)
{
Heap_Initialization_or_extend_handler init_or_extend = _Heap_Initialize;
ffc0c1c4: 3b 7b 9a f8 addi r27,r27,-25864
size_t i;
for (i = 0; i < area_count; ++i) {
Heap_Area *area = &areas [i];
if ( do_zero ) {
ffc0c1c8: 2e 0a 00 00 cmpwi cr4,r10,0
if ( area->size > overhead ) {
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
ffc0c1cc: 2d 89 00 00 cmpwi cr3,r9,0
} else {
size = 0;
}
}
space_available = (*init_or_extend)(
ffc0c1d0: 3b 18 2c 94 addi r24,r24,11412
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
ffc0c1d4: 48 00 00 9c b ffc0c270 <_Workspace_Handler_initialization+0x108>
Heap_Area *area = &areas [i];
if ( do_zero ) {
ffc0c1d8: 41 b2 00 14 beq+ cr4,ffc0c1ec <_Workspace_Handler_initialization+0x84>
memset( area->begin, 0, area->size );
ffc0c1dc: 80 7f 00 00 lwz r3,0(r31)
ffc0c1e0: 38 80 00 00 li r4,0
ffc0c1e4: 80 bf 00 04 lwz r5,4(r31)
ffc0c1e8: 48 00 44 49 bl ffc10630 <memset>
}
if ( area->size > overhead ) {
ffc0c1ec: 83 bf 00 04 lwz r29,4(r31)
ffc0c1f0: 2b 9d 00 16 cmplwi cr7,r29,22
ffc0c1f4: 40 9d 00 74 ble- cr7,ffc0c268 <_Workspace_Handler_initialization+0x100>
uintptr_t space_available;
uintptr_t size;
if ( unified ) {
ffc0c1f8: 40 8e 00 24 bne- cr3,ffc0c21c <_Workspace_Handler_initialization+0xb4>
size = area->size;
} else {
if ( remaining > 0 ) {
ffc0c1fc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0c200: 41 9e 00 18 beq- cr7,ffc0c218 <_Workspace_Handler_initialization+0xb0><== NEVER TAKEN
size = remaining < area->size - overhead ?
ffc0c204: 39 3d ff ea addi r9,r29,-22
remaining + overhead : area->size;
ffc0c208: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0c20c: 40 9c 00 10 bge- cr7,ffc0c21c <_Workspace_Handler_initialization+0xb4><== NEVER TAKEN
ffc0c210: 3b be 00 16 addi r29,r30,22
ffc0c214: 48 00 00 08 b ffc0c21c <_Workspace_Handler_initialization+0xb4>
} else {
size = 0;
ffc0c218: 3b a0 00 00 li r29,0 <== NOT EXECUTED
}
}
space_available = (*init_or_extend)(
ffc0c21c: 7f a5 eb 78 mr r5,r29
ffc0c220: 80 9f 00 00 lwz r4,0(r31)
ffc0c224: 7f 03 c3 78 mr r3,r24
ffc0c228: 7f 69 03 a6 mtctr r27
ffc0c22c: 38 c0 00 08 li r6,8
ffc0c230: 4e 80 04 21 bctrl
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
ffc0c234: 81 3f 00 00 lwz r9,0(r31)
area->size -= size;
if ( space_available < remaining ) {
ffc0c238: 7f 83 f0 40 cmplw cr7,r3,r30
area->begin,
size,
page_size
);
area->begin = (char *) area->begin + size;
ffc0c23c: 7d 29 ea 14 add r9,r9,r29
ffc0c240: 91 3f 00 00 stw r9,0(r31)
area->size -= size;
ffc0c244: 81 3f 00 04 lwz r9,4(r31)
ffc0c248: 7f bd 48 50 subf r29,r29,r9
ffc0c24c: 93 bf 00 04 stw r29,4(r31)
if ( space_available < remaining ) {
ffc0c250: 40 9c 00 10 bge- cr7,ffc0c260 <_Workspace_Handler_initialization+0xf8><== ALWAYS TAKEN
remaining -= space_available;
ffc0c254: 7f c3 f0 50 subf r30,r3,r30 <== NOT EXECUTED
} else {
remaining = 0;
}
init_or_extend = extend;
ffc0c258: 7f 5b d3 78 mr r27,r26 <== NOT EXECUTED
ffc0c25c: 48 00 00 0c b ffc0c268 <_Workspace_Handler_initialization+0x100><== NOT EXECUTED
ffc0c260: 7f 5b d3 78 mr r27,r26
area->size -= size;
if ( space_available < remaining ) {
remaining -= space_available;
} else {
remaining = 0;
ffc0c264: 3b c0 00 00 li r30,0
bool unified = rtems_configuration_get_unified_work_area();
uintptr_t page_size = CPU_HEAP_ALIGNMENT;
uintptr_t overhead = _Heap_Area_overhead( page_size );
size_t i;
for (i = 0; i < area_count; ++i) {
ffc0c268: 3b 9c 00 01 addi r28,r28,1
ffc0c26c: 3b ff 00 08 addi r31,r31,8
ffc0c270: 7f 9c c8 00 cmpw cr7,r28,r25
ffc0c274: 40 9e ff 64 bne+ cr7,ffc0c1d8 <_Workspace_Handler_initialization+0x70>
init_or_extend = extend;
}
}
if ( remaining > 0 ) {
ffc0c278: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0c27c: 41 be 00 14 beq+ cr7,ffc0c290 <_Workspace_Handler_initialization+0x128>
_Internal_error_Occurred(
ffc0c280: 38 60 00 00 li r3,0
ffc0c284: 38 80 00 01 li r4,1
ffc0c288: 38 a0 00 02 li r5,2
ffc0c28c: 4b ff da ed bl ffc09d78 <_Internal_error_Occurred>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
}
ffc0c290: 81 81 00 0c lwz r12,12(r1)
ffc0c294: 39 61 00 30 addi r11,r1,48
ffc0c298: 7d 81 81 20 mtcrf 24,r12
ffc0c29c: 4b ff 43 0c b ffc005a8 <_restgpr_24_x>
ffc0bc58 <_Workspace_String_duplicate>:
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
ffc0bc58: 94 21 ff e8 stwu r1,-24(r1)
ffc0bc5c: 7c 08 02 a6 mflr r0
ffc0bc60: bf a1 00 0c stmw r29,12(r1)
ffc0bc64: 7c 7d 1b 78 mr r29,r3
char *dup = _Workspace_Allocate(len + 1);
ffc0bc68: 38 64 00 01 addi r3,r4,1
char *_Workspace_String_duplicate(
const char *string,
size_t len
)
{
ffc0bc6c: 90 01 00 1c stw r0,28(r1)
ffc0bc70: 7c 9f 23 78 mr r31,r4
char *dup = _Workspace_Allocate(len + 1);
ffc0bc74: 4b ff ff 75 bl ffc0bbe8 <_Workspace_Allocate>
if (dup != NULL) {
ffc0bc78: 7c 7e 1b 79 mr. r30,r3
ffc0bc7c: 41 82 00 18 beq- ffc0bc94 <_Workspace_String_duplicate+0x3c><== NEVER TAKEN
dup [len] = '\0';
ffc0bc80: 39 20 00 00 li r9,0
ffc0bc84: 7d 3e f9 ae stbx r9,r30,r31
memcpy(dup, string, len);
ffc0bc88: 7f a4 eb 78 mr r4,r29
ffc0bc8c: 7f e5 fb 78 mr r5,r31
ffc0bc90: 48 00 41 2d bl ffc0fdbc <memcpy>
}
return dup;
}
ffc0bc94: 39 61 00 18 addi r11,r1,24
ffc0bc98: 7f c3 f3 78 mr r3,r30
ffc0bc9c: 48 00 83 64 b ffc14000 <_restgpr_29_x>
ffc091e0 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
ffc091e0: 94 21 ff d0 stwu r1,-48(r1)
ffc091e4: 7c 08 02 a6 mflr r0
ffc091e8: bf 61 00 1c stmw r27,28(r1)
ffc091ec: 7c 7e 1b 78 mr r30,r3
ffc091f0: 7c 9d 23 78 mr r29,r4
ffc091f4: 90 01 00 34 stw r0,52(r1)
ffc091f8: 7c bc 2b 78 mr r28,r5
ffc091fc: 7c df 33 78 mr r31,r6
ffc09200: 48 00 00 20 b ffc09220 <rtems_chain_get_with_wait+0x40>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09204: 7f a3 eb 78 mr r3,r29
ffc09208: 38 80 00 00 li r4,0
ffc0920c: 7f 85 e3 78 mr r5,r28
ffc09210: 38 c1 00 08 addi r6,r1,8
ffc09214: 4b ff f3 2d bl ffc08540 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
ffc09218: 2c 03 00 00 cmpwi r3,0
ffc0921c: 40 82 00 18 bne- ffc09234 <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 );
ffc09220: 7f c3 f3 78 mr r3,r30
ffc09224: 48 00 05 bd bl ffc097e0 <_Chain_Get>
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc09228: 7c 7b 1b 79 mr. r27,r3
ffc0922c: 41 82 ff d8 beq+ ffc09204 <rtems_chain_get_with_wait+0x24>
ffc09230: 38 60 00 00 li r3,0
timeout,
&out
);
}
*node_ptr = node;
ffc09234: 93 7f 00 00 stw r27,0(r31)
return sc;
}
ffc09238: 39 61 00 30 addi r11,r1,48
ffc0923c: 48 00 b7 18 b ffc14954 <_restgpr_27_x>
ffc11824 <rtems_event_system_receive>:
rtems_event_set *event_out
)
{
rtems_status_code sc;
if ( event_out != NULL ) {
ffc11824: 7c c9 33 79 mr. r9,r6
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc11828: 7c 08 02 a6 mflr r0
ffc1182c: 7c 2b 0b 78 mr r11,r1
ffc11830: 94 21 ff f0 stwu r1,-16(r1)
ffc11834: 90 01 00 14 stw r0,20(r1)
ffc11838: 48 00 71 59 bl ffc18990 <_savegpr_31>
rtems_status_code sc;
if ( event_out != NULL ) {
ffc1183c: 41 82 00 5c beq- ffc11898 <rtems_event_system_receive+0x74><== NEVER TAKEN
Thread_Control *executing = _Thread_Executing;
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
ffc11840: 2f 83 00 00 cmpwi cr7,r3,0
)
{
rtems_status_code sc;
if ( event_out != NULL ) {
Thread_Control *executing = _Thread_Executing;
ffc11844: 3d 00 00 00 lis r8,0
ffc11848: 83 e8 2e 50 lwz r31,11856(r8)
RTEMS_API_Control *api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc1184c: 81 1f 01 48 lwz r8,328(r31)
Event_Control *event = &api->System_event;
if ( !_Event_sets_Is_empty( event_in ) ) {
ffc11850: 41 be 00 38 beq+ cr7,ffc11888 <rtems_event_system_receive+0x64><== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc11854: 3d 20 00 00 lis r9,0
ffc11858: 81 49 27 bc lwz r10,10172(r9)
++level;
ffc1185c: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc11860: 91 49 27 bc stw r10,10172(r9)
_Thread_Disable_dispatch();
_Event_Seize(
ffc11864: 3d 20 00 00 lis r9,0
ffc11868: 7f e7 fb 78 mr r7,r31
ffc1186c: 39 08 00 04 addi r8,r8,4
ffc11870: 39 29 27 ec addi r9,r9,10220
ffc11874: 3d 40 00 04 lis r10,4
ffc11878: 4b ff 7b 51 bl ffc093c8 <_Event_Seize>
executing,
event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
ffc1187c: 4b ff aa dd bl ffc0c358 <_Thread_Enable_dispatch>
sc = executing->Wait.return_code;
ffc11880: 80 7f 00 34 lwz r3,52(r31)
ffc11884: 48 00 00 18 b ffc1189c <rtems_event_system_receive+0x78>
} else {
*event_out = event->pending_events;
ffc11888: 81 48 00 04 lwz r10,4(r8) <== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
ffc1188c: 38 60 00 00 li r3,0 <== NOT EXECUTED
);
_Thread_Enable_dispatch();
sc = executing->Wait.return_code;
} else {
*event_out = event->pending_events;
ffc11890: 91 49 00 00 stw r10,0(r9) <== NOT EXECUTED
ffc11894: 48 00 00 08 b ffc1189c <rtems_event_system_receive+0x78><== NOT EXECUTED
sc = RTEMS_SUCCESSFUL;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc11898: 38 60 00 09 li r3,9 <== NOT EXECUTED
}
return sc;
}
ffc1189c: 39 61 00 10 addi r11,r1,16
ffc118a0: 48 00 71 3c b ffc189dc <_restgpr_31_x>
ffc08a88 <rtems_event_system_send>:
rtems_status_code rtems_event_system_send(
rtems_id id,
rtems_event_set event_in
)
{
ffc08a88: 7c 2b 0b 78 mr r11,r1
ffc08a8c: 94 21 ff e0 stwu r1,-32(r1)
ffc08a90: 7c 08 02 a6 mflr r0
ffc08a94: 48 01 15 b5 bl ffc1a048 <_savegpr_31>
ffc08a98: 7c 9f 23 78 mr r31,r4
rtems_status_code sc;
Thread_Control *thread;
Objects_Locations location;
RTEMS_API_Control *api;
thread = _Thread_Get( id, &location );
ffc08a9c: 38 81 00 08 addi r4,r1,8
rtems_status_code rtems_event_system_send(
rtems_id id,
rtems_event_set event_in
)
{
ffc08aa0: 90 01 00 24 stw r0,36(r1)
rtems_status_code sc;
Thread_Control *thread;
Objects_Locations location;
RTEMS_API_Control *api;
thread = _Thread_Get( id, &location );
ffc08aa4: 48 00 27 0d bl ffc0b1b0 <_Thread_Get>
switch ( location ) {
ffc08aa8: 81 21 00 08 lwz r9,8(r1)
ffc08aac: 2f 89 00 00 cmpwi cr7,r9,0
ffc08ab0: 40 9e 00 2c bne- cr7,ffc08adc <rtems_event_system_send+0x54><== NEVER TAKEN
case OBJECTS_LOCAL:
api = thread->API_Extensions[ THREAD_API_RTEMS ];
_Event_Surrender(
ffc08ab4: 80 a3 01 48 lwz r5,328(r3)
ffc08ab8: 3c c0 00 00 lis r6,0
ffc08abc: 7f e4 fb 78 mr r4,r31
ffc08ac0: 38 a5 00 04 addi r5,r5,4
ffc08ac4: 38 c6 28 54 addi r6,r6,10324
ffc08ac8: 3c e0 00 04 lis r7,4
ffc08acc: 4b ff f9 89 bl ffc08454 <_Event_Surrender>
event_in,
&api->System_event,
&_System_event_Sync_state,
STATES_WAITING_FOR_SYSTEM_EVENT
);
_Thread_Enable_dispatch();
ffc08ad0: 48 00 26 c5 bl ffc0b194 <_Thread_Enable_dispatch>
sc = RTEMS_SUCCESSFUL;
ffc08ad4: 38 60 00 00 li r3,0
break;
ffc08ad8: 48 00 00 08 b ffc08ae0 <rtems_event_system_send+0x58>
case OBJECTS_REMOTE:
sc = RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
break;
#endif
default:
sc = RTEMS_INVALID_ID;
ffc08adc: 38 60 00 04 li r3,4 <== NOT EXECUTED
break;
}
return sc;
}
ffc08ae0: 39 61 00 20 addi r11,r1,32
ffc08ae4: 4b ff 7a e0 b ffc005c4 <_restgpr_31_x>
ffc0b594 <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)
{
ffc0b594: 94 21 ff e0 stwu r1,-32(r1)
ffc0b598: 7c 08 02 a6 mflr r0
ffc0b59c: bf 61 00 0c stmw r27,12(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0b5a0: 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)
{
ffc0b5a4: 90 01 00 24 stw r0,36(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0b5a8: 41 82 00 6c beq- ffc0b614 <rtems_iterate_over_all_threads+0x80><== NEVER TAKEN
ffc0b5ac: 3f e0 00 00 lis r31,0
ffc0b5b0: 3b ff 2f f8 addi r31,r31,12280
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0b5b4: 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 ] )
ffc0b5b8: 85 3f 00 04 lwzu r9,4(r31)
ffc0b5bc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b5c0: 40 be 00 10 bne+ cr7,ffc0b5d0 <rtems_iterate_over_all_threads+0x3c>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0b5c4: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0b5c8: 40 9e ff f0 bne+ cr7,ffc0b5b8 <rtems_iterate_over_all_threads+0x24>
ffc0b5cc: 48 00 00 48 b ffc0b614 <rtems_iterate_over_all_threads+0x80>
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0b5d0: 83 a9 00 04 lwz r29,4(r9)
if ( !information )
ffc0b5d4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0b5d8: 41 be ff ec beq- cr7,ffc0b5c4 <rtems_iterate_over_all_threads+0x30>
ffc0b5dc: 3b c0 00 01 li r30,1
ffc0b5e0: 48 00 00 24 b ffc0b604 <rtems_iterate_over_all_threads+0x70>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0b5e4: 81 3d 00 1c lwz r9,28(r29)
ffc0b5e8: 57 ca 10 3a rlwinm r10,r30,2,0,29
ffc0b5ec: 7c 69 50 2e lwzx r3,r9,r10
if ( !the_thread )
ffc0b5f0: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b5f4: 41 9e 00 0c beq- cr7,ffc0b600 <rtems_iterate_over_all_threads+0x6c>
continue;
(*routine)(the_thread);
ffc0b5f8: 7f 69 03 a6 mtctr r27
ffc0b5fc: 4e 80 04 21 bctrl
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0b600: 3b de 00 01 addi r30,r30,1
ffc0b604: a1 3d 00 10 lhz r9,16(r29)
ffc0b608: 7f 9e 48 40 cmplw cr7,r30,r9
ffc0b60c: 40 9d ff d8 ble+ cr7,ffc0b5e4 <rtems_iterate_over_all_threads+0x50>
ffc0b610: 4b ff ff b4 b ffc0b5c4 <rtems_iterate_over_all_threads+0x30>
(*routine)(the_thread);
}
}
}
ffc0b614: 39 61 00 20 addi r11,r1,32
ffc0b618: 4b ff 5d 14 b ffc0132c <_restgpr_27_x>
ffc1705c <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc1705c: 94 21 ff d0 stwu r1,-48(r1)
ffc17060: 7c 08 02 a6 mflr r0
ffc17064: bf 21 00 14 stmw r25,20(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc17068: 7c 7b 1b 79 mr. r27,r3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc1706c: 90 01 00 34 stw r0,52(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc17070: 41 a2 00 dc beq+ ffc1714c <rtems_partition_create+0xf0>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc17074: 2f 84 00 00 cmpwi cr7,r4,0
return RTEMS_INVALID_ADDRESS;
ffc17078: 38 60 00 09 li r3,9
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc1707c: 41 9e 00 d4 beq- cr7,ffc17150 <rtems_partition_create+0xf4>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc17080: 2f 88 00 00 cmpwi cr7,r8,0
ffc17084: 7d 1c 43 78 mr r28,r8
ffc17088: 41 9e 00 c8 beq- cr7,ffc17150 <rtems_partition_create+0xf4><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc1708c: 2f 85 00 00 cmpwi cr7,r5,0
ffc17090: 7c be 2b 78 mr r30,r5
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
ffc17094: 38 60 00 08 li r3,8
return RTEMS_INVALID_ADDRESS;
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc17098: 41 be 00 b8 beq+ cr7,ffc17150 <rtems_partition_create+0xf4>
ffc1709c: 2f 86 00 00 cmpwi cr7,r6,0
ffc170a0: 41 be 00 b0 beq+ cr7,ffc17150 <rtems_partition_create+0xf4>
ffc170a4: 7f 85 30 40 cmplw cr7,r5,r6
ffc170a8: 41 bc 00 a8 blt+ cr7,ffc17150 <rtems_partition_create+0xf4>
ffc170ac: 70 c9 00 07 andi. r9,r6,7
ffc170b0: 40 a2 00 a0 bne+ ffc17150 <rtems_partition_create+0xf4>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc170b4: 70 99 00 07 andi. r25,r4,7
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
ffc170b8: 38 60 00 09 li r3,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 ) )
ffc170bc: 40 a2 00 94 bne+ ffc17150 <rtems_partition_create+0xf4>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
uint32_t level = _Thread_Dispatch_disable_level;
ffc170c0: 3d 20 00 00 lis r9,0
ffc170c4: 81 49 28 f8 lwz r10,10488(r9)
ffc170c8: 7c fa 3b 78 mr r26,r7
++level;
ffc170cc: 39 4a 00 01 addi r10,r10,1
_Thread_Dispatch_disable_level = level;
ffc170d0: 91 49 28 f8 stw r10,10488(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 );
ffc170d4: 3f a0 00 00 lis r29,0
ffc170d8: 90 81 00 08 stw r4,8(r1)
ffc170dc: 3b bd 6e b0 addi r29,r29,28336
ffc170e0: 7f a3 eb 78 mr r3,r29
ffc170e4: 90 c1 00 0c stw r6,12(r1)
ffc170e8: 48 00 51 11 bl ffc1c1f8 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc170ec: 7c 7f 1b 79 mr. r31,r3
ffc170f0: 80 81 00 08 lwz r4,8(r1)
ffc170f4: 80 c1 00 0c lwz r6,12(r1)
ffc170f8: 40 a2 00 10 bne+ ffc17108 <rtems_partition_create+0xac>
_Thread_Enable_dispatch();
ffc170fc: 48 00 64 e9 bl ffc1d5e4 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
ffc17100: 38 60 00 05 li r3,5
ffc17104: 48 00 00 4c b ffc17150 <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,
ffc17108: 7c be 33 96 divwu r5,r30,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc1710c: 90 9f 00 10 stw r4,16(r31)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc17110: 90 df 00 18 stw r6,24(r31)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc17114: 93 df 00 14 stw r30,20(r31)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
ffc17118: 93 5f 00 1c stw r26,28(r31)
the_partition->number_of_used_blocks = 0;
ffc1711c: 93 3f 00 20 stw r25,32(r31)
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc17120: 38 7f 00 24 addi r3,r31,36
ffc17124: 48 00 38 25 bl ffc1a948 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc17128: 81 3f 00 08 lwz r9,8(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc1712c: 81 1d 00 1c lwz r8,28(r29)
ffc17130: 55 2a 13 ba rlwinm r10,r9,2,14,29
ffc17134: 7f e8 51 2e stwx r31,r8,r10
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc17138: 93 7f 00 0c stw r27,12(r31)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc1713c: 91 3c 00 00 stw r9,0(r28)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc17140: 48 00 64 a5 bl ffc1d5e4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc17144: 38 60 00 00 li r3,0
ffc17148: 48 00 00 08 b ffc17150 <rtems_partition_create+0xf4>
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
ffc1714c: 38 60 00 03 li r3,3
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc17150: 39 61 00 30 addi r11,r1,48
ffc17154: 4b ff 72 50 b ffc0e3a4 <_restgpr_25_x>
ffc33b80 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc33b80: 94 21 ff d8 stwu r1,-40(r1)
ffc33b84: 7c 08 02 a6 mflr r0
ffc33b88: bf 81 00 18 stmw r28,24(r1)
ffc33b8c: 7c 7e 1b 78 mr r30,r3
ffc33b90: 3c 60 00 00 lis r3,0
ffc33b94: 7c 9d 23 78 mr r29,r4
ffc33b98: 90 01 00 2c stw r0,44(r1)
ffc33b9c: 38 63 67 e0 addi r3,r3,26592
ffc33ba0: 7f c4 f3 78 mr r4,r30
ffc33ba4: 38 a1 00 08 addi r5,r1,8
ffc33ba8: 4b fd 5f fd bl ffc09ba4 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc33bac: 81 21 00 08 lwz r9,8(r1)
ffc33bb0: 2f 89 00 00 cmpwi cr7,r9,0
ffc33bb4: 40 9e 01 8c bne- cr7,ffc33d40 <rtems_rate_monotonic_period+0x1c0>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc33bb8: 3d 40 00 00 lis r10,0
ffc33bbc: 81 23 00 40 lwz r9,64(r3)
ffc33bc0: 81 4a 65 70 lwz r10,25968(r10)
ffc33bc4: 7c 7f 1b 78 mr r31,r3
ffc33bc8: 7f 89 50 00 cmpw cr7,r9,r10
ffc33bcc: 41 9e 00 10 beq- cr7,ffc33bdc <rtems_rate_monotonic_period+0x5c>
_Thread_Enable_dispatch();
ffc33bd0: 4b fd 6d ed bl ffc0a9bc <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc33bd4: 3b c0 00 17 li r30,23
ffc33bd8: 48 00 01 6c b ffc33d44 <rtems_rate_monotonic_period+0x1c4>
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc33bdc: 2f 9d 00 00 cmpwi cr7,r29,0
ffc33be0: 40 9e 00 28 bne- cr7,ffc33c08 <rtems_rate_monotonic_period+0x88>
switch ( the_period->state ) {
ffc33be4: 81 23 00 38 lwz r9,56(r3)
ffc33be8: 3b c0 00 00 li r30,0
ffc33bec: 2b 89 00 04 cmplwi cr7,r9,4
ffc33bf0: 41 9d 00 10 bgt- cr7,ffc33c00 <rtems_rate_monotonic_period+0x80><== NEVER TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc33bf4: 3d 40 ff c6 lis r10,-58
ffc33bf8: 39 4a d0 20 addi r10,r10,-12256
ffc33bfc: 7f ca 48 ae lbzx r30,r10,r9
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
ffc33c00: 4b fd 6d bd bl ffc0a9bc <_Thread_Enable_dispatch>
ffc33c04: 48 00 01 40 b ffc33d44 <rtems_rate_monotonic_period+0x1c4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc33c08: 7f 80 00 a6 mfmsr r28
ffc33c0c: 7d 30 42 a6 mfsprg r9,0
ffc33c10: 7f 89 48 78 andc r9,r28,r9
ffc33c14: 7d 20 01 24 mtmsr r9
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
ffc33c18: 81 23 00 38 lwz r9,56(r3)
ffc33c1c: 2f 89 00 00 cmpwi cr7,r9,0
ffc33c20: 40 be 00 4c bne+ cr7,ffc33c6c <rtems_rate_monotonic_period+0xec>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc33c24: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->next_length = length;
ffc33c28: 93 a3 00 3c stw r29,60(r3)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc33c2c: 4b ff fe b9 bl ffc33ae4 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc33c30: 39 20 00 02 li r9,2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc33c34: 3d 40 ff c3 lis r10,-61
ffc33c38: 91 3f 00 38 stw r9,56(r31)
ffc33c3c: 39 4a 3d 50 addi r10,r10,15696
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc33c40: 39 20 00 00 li r9,0
the_watchdog->routine = routine;
ffc33c44: 91 5f 00 2c stw r10,44(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc33c48: 3c 60 00 00 lis r3,0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc33c4c: 91 3f 00 18 stw r9,24(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc33c50: 38 63 64 88 addi r3,r3,25736
ffc33c54: 38 9f 00 10 addi r4,r31,16
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc33c58: 93 df 00 30 stw r30,48(r31)
the_watchdog->user_data = user_data;
ffc33c5c: 91 3f 00 34 stw r9,52(r31)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc33c60: 93 bf 00 1c stw r29,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc33c64: 4b fd 7a 81 bl ffc0b6e4 <_Watchdog_Insert>
ffc33c68: 48 00 00 74 b ffc33cdc <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 ) {
ffc33c6c: 2f 89 00 02 cmpwi cr7,r9,2
ffc33c70: 40 be 00 78 bne+ cr7,ffc33ce8 <rtems_rate_monotonic_period+0x168>
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc33c74: 4b ff fd 45 bl ffc339b8 <_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;
ffc33c78: 39 20 00 01 li r9,1
ffc33c7c: 91 3f 00 38 stw r9,56(r31)
the_period->next_length = length;
ffc33c80: 93 bf 00 3c stw r29,60(r31)
ffc33c84: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc33c88: 3d 20 00 00 lis r9,0
ffc33c8c: 80 69 65 70 lwz r3,25968(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc33c90: 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;
ffc33c94: 81 3f 00 08 lwz r9,8(r31)
ffc33c98: 91 23 00 20 stw r9,32(r3)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc33c9c: 4b fd 76 45 bl ffc0b2e0 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc33ca0: 7d 40 00 a6 mfmsr r10
ffc33ca4: 7d 30 42 a6 mfsprg r9,0
ffc33ca8: 7d 49 48 78 andc r9,r10,r9
ffc33cac: 7d 20 01 24 mtmsr r9
* 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;
ffc33cb0: 39 00 00 02 li r8,2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
ffc33cb4: 81 3f 00 38 lwz r9,56(r31)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc33cb8: 91 1f 00 38 stw r8,56(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc33cbc: 7d 40 01 24 mtmsr r10
/*
* 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 )
ffc33cc0: 2f 89 00 03 cmpwi cr7,r9,3
ffc33cc4: 40 be 00 18 bne+ cr7,ffc33cdc <rtems_rate_monotonic_period+0x15c><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc33cc8: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc33ccc: 39 29 65 60 addi r9,r9,25952 <== NOT EXECUTED
ffc33cd0: 80 69 00 10 lwz r3,16(r9) <== NOT EXECUTED
ffc33cd4: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc33cd8: 4b fd 68 c5 bl ffc0a59c <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc33cdc: 4b fd 6c e1 bl ffc0a9bc <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc33ce0: 3b c0 00 00 li r30,0
ffc33ce4: 48 00 00 60 b ffc33d44 <rtems_rate_monotonic_period+0x1c4>
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc33ce8: 2f 89 00 04 cmpwi cr7,r9,4
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc33cec: 3b c0 00 04 li r30,4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc33cf0: 40 be 00 54 bne+ cr7,ffc33d44 <rtems_rate_monotonic_period+0x1c4><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc33cf4: 4b ff fc c5 bl ffc339b8 <_Rate_monotonic_Update_statistics>
ffc33cf8: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc33cfc: 39 20 00 02 li r9,2
the_period->next_length = length;
ffc33d00: 93 bf 00 3c stw r29,60(r31)
ffc33d04: 3c 60 00 00 lis r3,0
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc33d08: 91 3f 00 38 stw r9,56(r31)
ffc33d0c: 38 63 64 88 addi r3,r3,25736
ffc33d10: 38 9f 00 10 addi r4,r31,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc33d14: 93 bf 00 1c stw r29,28(r31)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
ffc33d18: 3b c0 00 06 li r30,6
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc33d1c: 4b fd 79 c9 bl ffc0b6e4 <_Watchdog_Insert>
ffc33d20: 3d 20 00 00 lis r9,0
ffc33d24: 81 29 20 c0 lwz r9,8384(r9)
ffc33d28: 80 7f 00 40 lwz r3,64(r31)
ffc33d2c: 80 9f 00 3c lwz r4,60(r31)
ffc33d30: 7d 29 03 a6 mtctr r9
ffc33d34: 4e 80 04 21 bctrl
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Scheduler_Release_job(the_period->owner, the_period->next_length);
_Thread_Enable_dispatch();
ffc33d38: 4b fd 6c 85 bl ffc0a9bc <_Thread_Enable_dispatch>
ffc33d3c: 48 00 00 08 b ffc33d44 <rtems_rate_monotonic_period+0x1c4>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc33d40: 3b c0 00 04 li r30,4
}
ffc33d44: 39 61 00 28 addi r11,r1,40
ffc33d48: 7f c3 f3 78 mr r3,r30
ffc33d4c: 48 01 fa a4 b ffc537f0 <_restgpr_28_x>
ffc26b58 <rtems_rate_monotonic_report_statistics_with_plugin>:
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc26b58: 94 21 ff 70 stwu r1,-144(r1)
ffc26b5c: 7c 08 02 a6 mflr r0
ffc26b60: be e1 00 6c stmw r23,108(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc26b64: 7c 9f 23 79 mr. r31,r4
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc26b68: 90 01 00 94 stw r0,148(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc26b6c: 41 82 01 cc beq- ffc26d38 <rtems_rate_monotonic_report_statistics_with_plugin+0x1e0><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
ffc26b70: 3c 80 ff c6 lis r4,-58
ffc26b74: 7f e9 03 a6 mtctr r31
ffc26b78: 38 84 a4 60 addi r4,r4,-23456
ffc26b7c: 7c 7e 1b 78 mr r30,r3
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc26b80: 3f 40 ff c6 lis r26,-58
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,
ffc26b84: 3f 20 ff c6 lis r25,-58
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc26b88: 4c c6 31 82 crclr 4*cr1+eq
ffc26b8c: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc26b90: 3c 80 ff c6 lis r4,-58
ffc26b94: 38 84 a4 7e addi r4,r4,-23426
ffc26b98: 7f e9 03 a6 mtctr r31
ffc26b9c: 7f c3 f3 78 mr r3,r30
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,
ffc26ba0: 3f 00 ff c6 lis r24,-58
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc26ba4: 3e e0 ff c5 lis r23,-59
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc26ba8: 3b 5a a5 5a addi r26,r26,-23206
if ( !print )
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc26bac: 4c c6 31 82 crclr 4*cr1+eq
ffc26bb0: 4e 80 04 21 bctrl
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc26bb4: 3c 80 ff c6 lis r4,-58
ffc26bb8: 38 84 a4 a0 addi r4,r4,-23392
ffc26bbc: 7f e9 03 a6 mtctr r31
ffc26bc0: 7f c3 f3 78 mr r3,r30
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,
ffc26bc4: 3b 39 a5 71 addi r25,r25,-23183
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,
ffc26bc8: 3b 18 a5 90 addi r24,r24,-23152
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc26bcc: 3a f7 4f ea addi r23,r23,20458
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" );
ffc26bd0: 4c c6 31 82 crclr 4*cr1+eq
ffc26bd4: 4e 80 04 21 bctrl
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc26bd8: 3c 80 ff c6 lis r4,-58
ffc26bdc: 38 84 a4 c3 addi r4,r4,-23357
ffc26be0: 7f e9 03 a6 mtctr r31
ffc26be4: 7f c3 f3 78 mr r3,r30
ffc26be8: 4c c6 31 82 crclr 4*cr1+eq
ffc26bec: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc26bf0: 3c 80 ff c6 lis r4,-58
ffc26bf4: 7f c3 f3 78 mr r3,r30
ffc26bf8: 7f e9 03 a6 mtctr r31
ffc26bfc: 38 84 a5 0e addi r4,r4,-23282
ffc26c00: 4c c6 31 82 crclr 4*cr1+eq
ffc26c04: 4e 80 04 21 bctrl
/*
* 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 ;
ffc26c08: 3d 20 00 00 lis r9,0
ffc26c0c: 39 49 67 e0 addi r10,r9,26592
ffc26c10: 83 aa 00 08 lwz r29,8(r10)
id <= _Rate_monotonic_Information.maximum_id ;
ffc26c14: 7d 3b 4b 78 mr r27,r9
/*
* 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 ;
ffc26c18: 48 00 01 10 b ffc26d28 <rtems_rate_monotonic_report_statistics_with_plugin+0x1d0>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc26c1c: 7f a3 eb 78 mr r3,r29
ffc26c20: 38 81 00 08 addi r4,r1,8
ffc26c24: 48 00 c9 b5 bl ffc335d8 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
ffc26c28: 2f 83 00 00 cmpwi cr7,r3,0
ffc26c2c: 40 be 00 f8 bne+ cr7,ffc26d24 <rtems_rate_monotonic_report_statistics_with_plugin+0x1cc>
#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 );
ffc26c30: 38 81 00 40 addi r4,r1,64
ffc26c34: 7f a3 eb 78 mr r3,r29
ffc26c38: 48 00 cb 91 bl ffc337c8 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc26c3c: 80 61 00 40 lwz r3,64(r1)
ffc26c40: 38 80 00 05 li r4,5
ffc26c44: 38 a1 00 60 addi r5,r1,96
ffc26c48: 4b fe 8a 69 bl ffc0f6b0 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc26c4c: 7f 44 d3 78 mr r4,r26
ffc26c50: 7f c3 f3 78 mr r3,r30
ffc26c54: 80 e1 00 08 lwz r7,8(r1)
ffc26c58: 7f a5 eb 78 mr r5,r29
ffc26c5c: 81 01 00 0c lwz r8,12(r1)
ffc26c60: 38 c1 00 60 addi r6,r1,96
ffc26c64: 7f e9 03 a6 mtctr r31
ffc26c68: 4c c6 31 82 crclr 4*cr1+eq
ffc26c6c: 4e 80 04 21 bctrl
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc26c70: 80 81 00 08 lwz r4,8(r1)
ffc26c74: 2f 84 00 00 cmpwi cr7,r4,0
ffc26c78: 40 9e 00 1c bne- cr7,ffc26c94 <rtems_rate_monotonic_report_statistics_with_plugin+0x13c>
(*print)( context, "\n" );
ffc26c7c: 7f c3 f3 78 mr r3,r30
ffc26c80: 7f e9 03 a6 mtctr r31
ffc26c84: 7e e4 bb 78 mr r4,r23
ffc26c88: 4c c6 31 82 crclr 4*cr1+eq
ffc26c8c: 4e 80 04 21 bctrl
continue;
ffc26c90: 48 00 00 94 b ffc26d24 <rtems_rate_monotonic_report_statistics_with_plugin+0x1cc>
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 );
ffc26c94: 38 61 00 20 addi r3,r1,32
ffc26c98: 38 a1 00 58 addi r5,r1,88
ffc26c9c: 48 00 0c a9 bl ffc27944 <_Timespec_Divide_by_integer>
(*print)( context,
ffc26ca0: 80 c1 00 14 lwz r6,20(r1)
ffc26ca4: 81 01 00 1c lwz r8,28(r1)
ffc26ca8: 3b 80 03 e8 li r28,1000
ffc26cac: 81 41 00 5c lwz r10,92(r1)
ffc26cb0: 7c c6 e3 d6 divw r6,r6,r28
ffc26cb4: 80 e1 00 18 lwz r7,24(r1)
ffc26cb8: 7f e9 03 a6 mtctr r31
ffc26cbc: 81 21 00 58 lwz r9,88(r1)
ffc26cc0: 80 a1 00 10 lwz r5,16(r1)
ffc26cc4: 7d 08 e3 d6 divw r8,r8,r28
ffc26cc8: 7d 4a e3 d6 divw r10,r10,r28
ffc26ccc: 7f 24 cb 78 mr r4,r25
ffc26cd0: 7f c3 f3 78 mr r3,r30
ffc26cd4: 4c c6 31 82 crclr 4*cr1+eq
ffc26cd8: 4e 80 04 21 bctrl
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);
ffc26cdc: 80 81 00 08 lwz r4,8(r1)
ffc26ce0: 38 61 00 38 addi r3,r1,56
ffc26ce4: 38 a1 00 58 addi r5,r1,88
ffc26ce8: 48 00 0c 5d bl ffc27944 <_Timespec_Divide_by_integer>
(*print)( context,
ffc26cec: 80 c1 00 2c lwz r6,44(r1)
ffc26cf0: 81 01 00 34 lwz r8,52(r1)
ffc26cf4: 7f c3 f3 78 mr r3,r30
ffc26cf8: 81 41 00 5c lwz r10,92(r1)
ffc26cfc: 7f 04 c3 78 mr r4,r24
ffc26d00: 80 a1 00 28 lwz r5,40(r1)
ffc26d04: 7c c6 e3 d6 divw r6,r6,r28
ffc26d08: 80 e1 00 30 lwz r7,48(r1)
ffc26d0c: 7f e9 03 a6 mtctr r31
ffc26d10: 81 21 00 58 lwz r9,88(r1)
ffc26d14: 7d 08 e3 d6 divw r8,r8,r28
ffc26d18: 7d 4a e3 d6 divw r10,r10,r28
ffc26d1c: 4c c6 31 82 crclr 4*cr1+eq
ffc26d20: 4e 80 04 21 bctrl
* 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++ ) {
ffc26d24: 3b bd 00 01 addi r29,r29,1
/*
* 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 ;
ffc26d28: 39 3b 67 e0 addi r9,r27,26592
/*
* 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 ;
ffc26d2c: 81 29 00 0c lwz r9,12(r9)
ffc26d30: 7f 9d 48 40 cmplw cr7,r29,r9
ffc26d34: 40 9d fe e8 ble+ cr7,ffc26c1c <rtems_rate_monotonic_report_statistics_with_plugin+0xc4>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc26d38: 39 61 00 90 addi r11,r1,144
ffc26d3c: 48 02 ca a0 b ffc537dc <_restgpr_23_x>
ffc0970c <rtems_rbheap_allocate>:
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
ffc0970c: 94 21 ff e0 stwu r1,-32(r1)
ffc09710: 7c 08 02 a6 mflr r0
ffc09714: 2f 84 00 00 cmpwi cr7,r4,0
ffc09718: 90 01 00 24 stw r0,36(r1)
void *ptr = NULL;
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
ffc0971c: 81 23 00 30 lwz r9,48(r3)
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
ffc09720: bf 61 00 0c stmw r27,12(r1)
ffc09724: 7c 7c 1b 78 mr r28,r3
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc09728: 7f a4 4b 96 divwu r29,r4,r9
ffc0972c: 7f bd 49 d6 mullw r29,r29,r9
if (excess > 0) {
ffc09730: 7d 5d 20 51 subf. r10,r29,r4
ffc09734: 41 82 00 dc beq- ffc09810 <rtems_rbheap_allocate+0x104> <== ALWAYS TAKEN
value += alignment - excess;
ffc09738: 7f a4 4a 14 add r29,r4,r9 <== NOT EXECUTED
ffc0973c: 7f aa e8 50 subf r29,r10,r29 <== NOT EXECUTED
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
ffc09740: 40 be 00 0c bne+ cr7,ffc0974c <rtems_rbheap_allocate+0x40><== NOT EXECUTED
return big_enough;
}
void *rtems_rbheap_allocate(rtems_rbheap_control *control, size_t size)
{
void *ptr = NULL;
ffc09744: 38 60 00 00 li r3,0
ffc09748: 48 00 00 d0 b ffc09818 <rtems_rbheap_allocate+0x10c>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
ffc0974c: 7f 84 e8 40 cmplw cr7,r4,r29 <== NOT EXECUTED
ffc09750: 40 bd 00 0c ble+ cr7,ffc0975c <rtems_rbheap_allocate+0x50><== NOT EXECUTED
ffc09754: 4b ff ff f0 b ffc09744 <rtems_rbheap_allocate+0x38> <== NOT EXECUTED
ffc09758: 7c 9d 23 78 mr r29,r4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0975c: 81 3c 00 00 lwz r9,0(r28)
rtems_chain_control *free_chain,
size_t size
)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
ffc09760: 39 1c 00 04 addi r8,r28,4
rtems_rbheap_chunk *big_enough = NULL;
ffc09764: 3b e0 00 00 li r31,0
ffc09768: 48 00 00 18 b ffc09780 <rtems_rbheap_allocate+0x74>
while (current != tail && big_enough == NULL) {
rtems_rbheap_chunk *free_chunk = (rtems_rbheap_chunk *) current;
if (free_chunk->size >= size) {
ffc0976c: 81 49 00 1c lwz r10,28(r9)
ffc09770: 7f 8a e8 40 cmplw cr7,r10,r29
ffc09774: 41 9c 00 08 blt- cr7,ffc0977c <rtems_rbheap_allocate+0x70>
ffc09778: 7d 3f 4b 78 mr r31,r9
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
if (chunk != NULL) {
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
ffc0977c: 81 29 00 00 lwz r9,0(r9)
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
ffc09780: 7f 09 40 00 cmpw cr6,r9,r8
ffc09784: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09788: 40 ba 00 0c bne+ cr6,ffc09794 <rtems_rbheap_allocate+0x88>
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
ffc0978c: 40 be 00 0c bne+ cr7,ffc09798 <rtems_rbheap_allocate+0x8c>
ffc09790: 4b ff ff b4 b ffc09744 <rtems_rbheap_allocate+0x38>
{
rtems_chain_node *current = rtems_chain_first(free_chain);
const rtems_chain_node *tail = rtems_chain_tail(free_chain);
rtems_rbheap_chunk *big_enough = NULL;
while (current != tail && big_enough == NULL) {
ffc09794: 41 9e ff d8 beq+ cr7,ffc0976c <rtems_rbheap_allocate+0x60><== ALWAYS TAKEN
if (size > 0 && size <= aligned_size) {
rtems_rbheap_chunk *free_chunk = search_free_chunk(free_chain, aligned_size);
if (free_chunk != NULL) {
uintptr_t free_size = free_chunk->size;
ffc09798: 83 7f 00 1c lwz r27,28(r31)
if (free_size > aligned_size) {
ffc0979c: 7f 9b e8 40 cmplw cr7,r27,r29
ffc097a0: 40 9d 00 4c ble- cr7,ffc097ec <rtems_rbheap_allocate+0xe0>
rtems_rbheap_chunk *new_chunk = get_chunk(control);
ffc097a4: 7f 83 e3 78 mr r3,r28
ffc097a8: 4b ff fd c5 bl ffc0956c <get_chunk>
if (new_chunk != NULL) {
ffc097ac: 7c 7e 1b 79 mr. r30,r3
ffc097b0: 41 a2 ff 94 beq- ffc09744 <rtems_rbheap_allocate+0x38> <== NEVER TAKEN
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
ffc097b4: 81 3f 00 18 lwz r9,24(r31)
if (free_size > aligned_size) {
rtems_rbheap_chunk *new_chunk = get_chunk(control);
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
ffc097b8: 7f 7d d8 50 subf r27,r29,r27
free_chunk->size = new_free_size;
ffc097bc: 93 7f 00 1c stw r27,28(r31)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc097c0: 38 7c 00 18 addi r3,r28,24
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
ffc097c4: 7f 7b 4a 14 add r27,r27,r9
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
ffc097c8: 39 20 00 00 li r9,0
ffc097cc: 93 7e 00 18 stw r27,24(r30)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc097d0: 38 9e 00 08 addi r4,r30,8
if (new_chunk != NULL) {
uintptr_t new_free_size = free_size - aligned_size;
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
ffc097d4: 93 be 00 1c stw r29,28(r30)
ffc097d8: 91 3e 00 04 stw r9,4(r30)
ffc097dc: 91 3e 00 00 stw r9,0(r30)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc097e0: 48 00 1a bd bl ffc0b29c <_RBTree_Insert_unprotected>
free_chunk->size = new_free_size;
new_chunk->begin = free_chunk->begin + new_free_size;
new_chunk->size = aligned_size;
rtems_chain_set_off_chain(&new_chunk->chain_node);
insert_into_tree(chunk_tree, new_chunk);
ptr = (void *) new_chunk->begin;
ffc097e4: 80 7e 00 18 lwz r3,24(r30)
ffc097e8: 48 00 00 30 b ffc09818 <rtems_rbheap_allocate+0x10c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc097ec: 81 3f 00 00 lwz r9,0(r31)
previous = the_node->previous;
ffc097f0: 81 5f 00 04 lwz r10,4(r31)
}
} else {
rtems_chain_extract_unprotected(&free_chunk->chain_node);
rtems_chain_set_off_chain(&free_chunk->chain_node);
ptr = (void *) free_chunk->begin;
ffc097f4: 80 7f 00 18 lwz r3,24(r31)
next->previous = previous;
ffc097f8: 91 49 00 04 stw r10,4(r9)
previous->next = next;
ffc097fc: 91 2a 00 00 stw r9,0(r10)
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
ffc09800: 39 20 00 00 li r9,0
ffc09804: 91 3f 00 04 stw r9,4(r31)
ffc09808: 91 3f 00 00 stw r9,0(r31)
ffc0980c: 48 00 00 0c b ffc09818 <rtems_rbheap_allocate+0x10c>
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
uintptr_t alignment = control->alignment;
uintptr_t aligned_size = align_up(alignment, size);
if (size > 0 && size <= aligned_size) {
ffc09810: 40 9e ff 48 bne+ cr7,ffc09758 <rtems_rbheap_allocate+0x4c>
ffc09814: 4b ff ff 30 b ffc09744 <rtems_rbheap_allocate+0x38>
}
}
}
return ptr;
}
ffc09818: 39 61 00 20 addi r11,r1,32
ffc0981c: 4b ff 75 4c b ffc00d68 <_restgpr_27_x>
ffc09950 <rtems_rbheap_extend_descriptors_with_malloc>:
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
ffc09950: 7c 2b 0b 78 mr r11,r1 <== NOT EXECUTED
ffc09954: 94 21 ff f0 stwu r1,-16(r1) <== NOT EXECUTED
ffc09958: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0995c: 4b ff 73 d1 bl ffc00d2c <_savegpr_31> <== NOT EXECUTED
ffc09960: 7c 7f 1b 78 mr r31,r3 <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
ffc09964: 38 60 00 20 li r3,32 <== NOT EXECUTED
{
/* Do nothing */
}
void rtems_rbheap_extend_descriptors_with_malloc(rtems_rbheap_control *control)
{
ffc09968: 90 01 00 14 stw r0,20(r1) <== NOT EXECUTED
rtems_rbheap_chunk *chunk = malloc(sizeof(*chunk));
ffc0996c: 4b ff b4 41 bl ffc04dac <malloc> <== NOT EXECUTED
if (chunk != NULL) {
ffc09970: 2c 03 00 00 cmpwi r3,0 <== NOT EXECUTED
ffc09974: 41 82 00 1c beq- ffc09990 <rtems_rbheap_extend_descriptors_with_malloc+0x40><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert_unprotected(_Chain_Head(the_chain), the_node);
ffc09978: 39 5f 00 0c addi r10,r31,12 <== NOT EXECUTED
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0997c: 91 43 00 04 stw r10,4(r3) <== NOT EXECUTED
before_node = after_node->next;
ffc09980: 81 5f 00 0c lwz r10,12(r31) <== NOT EXECUTED
after_node->next = the_node;
ffc09984: 90 7f 00 0c stw r3,12(r31) <== NOT EXECUTED
the_node->next = before_node;
before_node->previous = the_node;
ffc09988: 90 6a 00 04 stw r3,4(r10) <== NOT EXECUTED
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0998c: 91 43 00 00 stw r10,0(r3) <== NOT EXECUTED
rtems_rbheap_add_to_spare_descriptor_chain(control, chunk);
}
}
ffc09990: 39 61 00 10 addi r11,r1,16 <== NOT EXECUTED
ffc09994: 4b ff 73 e4 b ffc00d78 <_restgpr_31_x> <== NOT EXECUTED
ffc09820 <rtems_rbheap_free>:
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
ffc09820: 94 21 ff c0 stwu r1,-64(r1)
ffc09824: 7c 08 02 a6 mflr r0
ffc09828: bf 61 00 2c stmw r27,44(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
ffc0982c: 7c 9f 23 79 mr. r31,r4
_RBTree_Extract_unprotected(chunk_tree, &b->tree_node);
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
ffc09830: 90 01 00 44 stw r0,68(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (ptr != NULL) {
ffc09834: 41 82 01 0c beq- ffc09940 <rtems_rbheap_free+0x120>
ffc09838: 7c 7d 1b 78 mr r29,r3
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
ffc0983c: 3b 83 00 18 addi r28,r3,24
#define NULL_PAGE rtems_rbheap_chunk_of_node(NULL)
static rtems_rbheap_chunk *find(rtems_rbtree_control *chunk_tree, uintptr_t key)
{
rtems_rbheap_chunk chunk = { .begin = key };
ffc09840: 38 80 00 00 li r4,0
ffc09844: 38 61 00 08 addi r3,r1,8
ffc09848: 38 a0 00 20 li r5,32
ffc0984c: 48 00 7b dd bl ffc11428 <memset>
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
ffc09850: 3b c0 00 00 li r30,0
ffc09854: 93 e1 00 20 stw r31,32(r1)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
ffc09858: 83 fd 00 1c lwz r31,28(r29)
ffc0985c: 48 00 00 44 b ffc098a0 <rtems_rbheap_free+0x80>
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
ffc09860: 81 3c 00 10 lwz r9,16(r28)
ffc09864: 38 61 00 10 addi r3,r1,16
ffc09868: 7f e4 fb 78 mr r4,r31
ffc0986c: 7d 29 03 a6 mtctr r9
ffc09870: 4e 80 04 21 bctrl
if ( _RBTree_Is_equal( compare_result ) ) {
ffc09874: 2c 03 00 00 cmpwi r3,0
ffc09878: 40 82 00 14 bne- ffc0988c <rtems_rbheap_free+0x6c>
found = iter_node;
if ( the_rbtree->is_unique )
ffc0987c: 89 5c 00 14 lbz r10,20(r28)
ffc09880: 2f 8a 00 00 cmpwi cr7,r10,0
ffc09884: 40 9e 00 28 bne- cr7,ffc098ac <rtems_rbheap_free+0x8c> <== ALWAYS TAKEN
ffc09888: 7f fe fb 78 mr r30,r31 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Is_greater(
int compare_result
)
{
return compare_result > 0;
ffc0988c: 7c 6a fe 70 srawi r10,r3,31
ffc09890: 7d 23 50 50 subf r9,r3,r10
break;
}
RBTree_Direction dir =
(RBTree_Direction) _RBTree_Is_greater( compare_result );
iter_node = iter_node->child[dir];
ffc09894: 55 29 1f 7a rlwinm r9,r9,3,29,29
ffc09898: 7f ff 4a 14 add r31,r31,r9
ffc0989c: 83 ff 00 04 lwz r31,4(r31)
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
ffc098a0: 2f 9f 00 00 cmpwi cr7,r31,0
ffc098a4: 40 9e ff bc bne+ cr7,ffc09860 <rtems_rbheap_free+0x40>
ffc098a8: 7f df f3 78 mr r31,r30
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
ffc098ac: 2f 9f 00 00 cmpwi cr7,r31,0
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
}
} else {
sc = RTEMS_INVALID_ID;
ffc098b0: 38 60 00 04 li r3,4
if (ptr != NULL) {
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
ffc098b4: 3b df ff f8 addi r30,r31,-8
ffc098b8: 41 9e 00 8c beq- cr7,ffc09944 <rtems_rbheap_free+0x124>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(
const Chain_Node *node
)
{
return (node->next == NULL) && (node->previous == NULL);
ffc098bc: 81 5f ff f8 lwz r10,-8(r31)
ffc098c0: 39 20 00 00 li r9,0
ffc098c4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc098c8: 40 be 00 10 bne+ cr7,ffc098d8 <rtems_rbheap_free+0xb8>
ffc098cc: 81 3e 00 04 lwz r9,4(r30)
ffc098d0: 7d 29 00 34 cntlzw r9,r9
ffc098d4: 55 29 d9 7e rlwinm r9,r9,27,5,31
if (!rtems_rbheap_is_chunk_free(chunk)) {
ffc098d8: 2f 89 00 00 cmpwi cr7,r9,0
check_and_merge(free_chain, chunk_tree, chunk, succ);
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
} else {
sc = RTEMS_INCORRECT_STATE;
ffc098dc: 38 60 00 0e li r3,14
rtems_chain_control *free_chain = &control->free_chunk_chain;
rtems_rbtree_control *chunk_tree = &control->chunk_tree;
rtems_rbheap_chunk *chunk = find(chunk_tree, (uintptr_t) ptr);
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
ffc098e0: 41 be 00 64 beq+ cr7,ffc09944 <rtems_rbheap_free+0x124>
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
ffc098e4: 3b fe 00 08 addi r31,r30,8
ffc098e8: 38 80 00 00 li r4,0
ffc098ec: 7f e3 fb 78 mr r3,r31
ffc098f0: 48 00 1c 69 bl ffc0b558 <_RBTree_Next_unprotected>
ffc098f4: 38 80 00 01 li r4,1
ffc098f8: 7c 7b 1b 78 mr r27,r3
ffc098fc: 7f e3 fb 78 mr r3,r31
ffc09900: 48 00 1c 59 bl ffc0b558 <_RBTree_Next_unprotected>
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
ffc09904: 7f 84 e3 78 mr r4,r28
static rtems_rbheap_chunk *get_next(
const rtems_rbheap_chunk *chunk,
RBTree_Direction dir
)
{
return rtems_rbheap_chunk_of_node(
ffc09908: 38 c3 ff f8 addi r6,r3,-8
if (chunk != NULL_PAGE) {
if (!rtems_rbheap_is_chunk_free(chunk)) {
rtems_rbheap_chunk *pred = get_next(chunk, RBT_LEFT);
rtems_rbheap_chunk *succ = get_next(chunk, RBT_RIGHT);
check_and_merge(free_chain, chunk_tree, chunk, succ);
ffc0990c: 7f c5 f3 78 mr r5,r30
ffc09910: 7f a3 eb 78 mr r3,r29
ffc09914: 4b ff fb d1 bl ffc094e4 <check_and_merge>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc09918: 81 3d 00 00 lwz r9,0(r29)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0991c: 93 be 00 04 stw r29,4(r30)
add_to_chain(free_chain, chunk);
check_and_merge(free_chain, chunk_tree, chunk, pred);
ffc09920: 7f a3 eb 78 mr r3,r29
ffc09924: 7f 84 e3 78 mr r4,r28
before_node = after_node->next;
after_node->next = the_node;
ffc09928: 93 dd 00 00 stw r30,0(r29)
ffc0992c: 7f c5 f3 78 mr r5,r30
ffc09930: 38 db ff f8 addi r6,r27,-8
the_node->next = before_node;
ffc09934: 91 3e 00 00 stw r9,0(r30)
before_node->previous = the_node;
ffc09938: 93 c9 00 04 stw r30,4(r9)
ffc0993c: 4b ff fb a9 bl ffc094e4 <check_and_merge>
}
}
rtems_status_code rtems_rbheap_free(rtems_rbheap_control *control, void *ptr)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc09940: 38 60 00 00 li r3,0
sc = RTEMS_INVALID_ID;
}
}
return sc;
}
ffc09944: 39 61 00 40 addi r11,r1,64
ffc09948: 4b ff 74 20 b ffc00d68 <_restgpr_27_x>
ffc095e0 <rtems_rbheap_initialize>:
void *handler_arg
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
ffc095e0: 7c ca 33 79 mr. r10,r6
ffc095e4: 41 a2 01 04 beq+ ffc096e8 <rtems_rbheap_initialize+0x108>
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
ffc095e8: 94 21 ff e8 stwu r1,-24(r1)
ffc095ec: 7c 08 02 a6 mflr r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
ffc095f0: 7c a5 22 14 add r5,r5,r4
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
ffc095f4: bf a1 00 0c stmw r29,12(r1)
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc095f8: 7f c4 53 96 divwu r30,r4,r10
uintptr_t area_size,
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
ffc095fc: 90 01 00 1c stw r0,28(r1)
#include <stdlib.h>
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc09600: 7f de 51 d6 mullw r30,r30,r10
ffc09604: 7c 7f 1b 78 mr r31,r3
if (excess > 0) {
ffc09608: 7d 3e 20 51 subf. r9,r30,r4
ffc0960c: 41 82 00 e8 beq- ffc096f4 <rtems_rbheap_initialize+0x114>
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc09610: 7f 84 28 40 cmplw cr7,r4,r5
static uintptr_t align_up(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
if (excess > 0) {
value += alignment - excess;
ffc09614: 7f ca 22 14 add r30,r10,r4
ffc09618: 7f c9 f0 50 subf r30,r9,r30
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc0961c: 39 20 00 09 li r9,9
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc09620: 40 bc 00 e0 bge+ cr7,ffc09700 <rtems_rbheap_initialize+0x120>
ffc09624: 7f 84 f0 40 cmplw cr7,r4,r30
ffc09628: 41 bd 00 d8 bgt+ cr7,ffc09700 <rtems_rbheap_initialize+0x120><== NEVER TAKEN
ffc0962c: 48 00 00 08 b ffc09634 <rtems_rbheap_initialize+0x54>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (alignment > 0) {
uintptr_t begin = (uintptr_t) area_begin;
ffc09630: 7c 9e 23 78 mr r30,r4
return value;
}
static uintptr_t align_down(uintptr_t alignment, uintptr_t value)
{
uintptr_t excess = value % alignment;
ffc09634: 7c a5 53 96 divwu r5,r5,r10
return value - excess;
ffc09638: 7f a5 51 d6 mullw r29,r5,r10
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc0963c: 39 20 00 09 li r9,9
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc09640: 7f 9e e8 40 cmplw cr7,r30,r29
ffc09644: 40 bc 00 bc bge+ cr7,ffc09700 <rtems_rbheap_initialize+0x120>
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 );
ffc09648: 39 3f 00 04 addi r9,r31,4
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc0964c: 93 ff 00 08 stw r31,8(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 );
ffc09650: 38 df 00 0c addi r6,r31,12
head->next = tail;
ffc09654: 91 3f 00 00 stw r9,0(r31)
head->previous = NULL;
ffc09658: 39 20 00 00 li r9,0
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 );
ffc0965c: 38 bf 00 10 addi r5,r31,16
head->next = tail;
head->previous = NULL;
ffc09660: 91 3f 00 04 stw r9,4(r31)
rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
control->alignment = alignment;
control->handler_arg = handler_arg;
control->extend_descriptors = extend_descriptors;
first = get_chunk(control);
ffc09664: 7f e3 fb 78 mr r3,r31
ffc09668: 91 3f 00 10 stw r9,16(r31)
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
ffc0966c: 91 3f 00 18 stw r9,24(r31)
the_rbtree->root = NULL;
ffc09670: 91 3f 00 1c stw r9,28(r31)
the_rbtree->first[0] = NULL;
ffc09674: 91 3f 00 20 stw r9,32(r31)
the_rbtree->first[1] = NULL;
ffc09678: 91 3f 00 24 stw r9,36(r31)
the_rbtree->compare_function = compare_function;
ffc0967c: 3d 20 ff c1 lis r9,-63
ffc09680: 39 29 94 d4 addi r9,r9,-27436
ffc09684: 91 3f 00 28 stw r9,40(r31)
the_rbtree->is_unique = is_unique;
ffc09688: 39 20 00 01 li r9,1
ffc0968c: 99 3f 00 2c stb r9,44(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc09690: 90 bf 00 0c stw r5,12(r31)
head->previous = NULL;
tail->previous = head;
ffc09694: 90 df 00 14 stw r6,20(r31)
rtems_rbheap_chunk *first = NULL;
rtems_chain_initialize_empty(free_chain);
rtems_chain_initialize_empty(&control->spare_descriptor_chain);
rtems_rbtree_initialize_empty(chunk_tree, chunk_compare, true);
control->alignment = alignment;
ffc09698: 91 5f 00 30 stw r10,48(r31)
control->handler_arg = handler_arg;
ffc0969c: 91 1f 00 38 stw r8,56(r31)
control->extend_descriptors = extend_descriptors;
ffc096a0: 90 ff 00 34 stw r7,52(r31)
first = get_chunk(control);
ffc096a4: 4b ff fe c9 bl ffc0956c <get_chunk>
first->begin = aligned_begin;
first->size = aligned_end - aligned_begin;
add_to_chain(free_chain, first);
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
ffc096a8: 39 20 00 1a li r9,26
control->alignment = alignment;
control->handler_arg = handler_arg;
control->extend_descriptors = extend_descriptors;
first = get_chunk(control);
if (first != NULL) {
ffc096ac: 7c 64 1b 79 mr. r4,r3
ffc096b0: 41 82 00 50 beq- ffc09700 <rtems_rbheap_initialize+0x120>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc096b4: 81 3f 00 00 lwz r9,0(r31)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc096b8: 38 7f 00 18 addi r3,r31,24
control->handler_arg = handler_arg;
control->extend_descriptors = extend_descriptors;
first = get_chunk(control);
if (first != NULL) {
first->begin = aligned_begin;
ffc096bc: 93 c4 00 18 stw r30,24(r4)
first->size = aligned_end - aligned_begin;
ffc096c0: 7f de e8 50 subf r30,r30,r29
ffc096c4: 93 c4 00 1c stw r30,28(r4)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc096c8: 93 e4 00 04 stw r31,4(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc096cc: 90 9f 00 00 stw r4,0(r31)
the_node->next = before_node;
before_node->previous = the_node;
ffc096d0: 90 89 00 04 stw r4,4(r9)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc096d4: 91 24 00 00 stw r9,0(r4)
static void insert_into_tree(
rtems_rbtree_control *tree,
rtems_rbheap_chunk *chunk
)
{
_RBTree_Insert_unprotected(tree, &chunk->tree_node);
ffc096d8: 38 84 00 08 addi r4,r4,8
ffc096dc: 48 00 1b c1 bl ffc0b29c <_RBTree_Insert_unprotected>
uintptr_t alignment,
rtems_rbheap_extend_descriptors extend_descriptors,
void *handler_arg
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
ffc096e0: 39 20 00 00 li r9,0
ffc096e4: 48 00 00 1c b ffc09700 <rtems_rbheap_initialize+0x120>
}
} else {
sc = RTEMS_INVALID_ADDRESS;
}
} else {
sc = RTEMS_INVALID_NUMBER;
ffc096e8: 39 20 00 0a li r9,10
}
return sc;
}
ffc096ec: 7d 23 4b 78 mr r3,r9
ffc096f0: 4e 80 00 20 blr
uintptr_t begin = (uintptr_t) area_begin;
uintptr_t end = begin + area_size;
uintptr_t aligned_begin = align_up(alignment, begin);
uintptr_t aligned_end = align_down(alignment, end);
if (begin < end && begin <= aligned_begin && aligned_begin < aligned_end) {
ffc096f4: 7f 84 28 40 cmplw cr7,r4,r5
ffc096f8: 41 bc ff 38 blt- cr7,ffc09630 <rtems_rbheap_initialize+0x50>
insert_into_tree(chunk_tree, first);
} else {
sc = RTEMS_NO_MEMORY;
}
} else {
sc = RTEMS_INVALID_ADDRESS;
ffc096fc: 39 20 00 09 li r9,9
} else {
sc = RTEMS_INVALID_NUMBER;
}
return sc;
}
ffc09700: 39 61 00 18 addi r11,r1,24
ffc09704: 7d 23 4b 78 mr r3,r9
ffc09708: 4b ff 76 68 b ffc00d70 <_restgpr_29_x>
ffc189f4 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc189f4: 7c 2b 0b 78 mr r11,r1
ffc189f8: 94 21 ff e0 stwu r1,-32(r1)
ffc189fc: 7c 08 02 a6 mflr r0
ffc18a00: 48 01 5b 01 bl ffc2e500 <_savegpr_31>
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc18a04: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc18a08: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc18a0c: 41 a2 00 a8 beq+ ffc18ab4 <rtems_signal_send+0xc0>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc18a10: 38 81 00 08 addi r4,r1,8
ffc18a14: 48 00 4b ed bl ffc1d600 <_Thread_Get>
switch ( location ) {
ffc18a18: 81 21 00 08 lwz r9,8(r1)
ffc18a1c: 2f 89 00 00 cmpwi cr7,r9,0
ffc18a20: 40 9e 00 9c bne- cr7,ffc18abc <rtems_signal_send+0xc8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc18a24: 81 23 01 48 lwz r9,328(r3)
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
ffc18a28: 81 49 00 0c lwz r10,12(r9)
ffc18a2c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc18a30: 41 9e 00 78 beq- cr7,ffc18aa8 <rtems_signal_send+0xb4>
if ( asr->is_enabled ) {
ffc18a34: 89 49 00 08 lbz r10,8(r9)
ffc18a38: 2f 8a 00 00 cmpwi cr7,r10,0
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc18a3c: 7d 00 00 a6 mfmsr r8
ffc18a40: 7d 50 42 a6 mfsprg r10,0
ffc18a44: 7d 0a 50 78 andc r10,r8,r10
ffc18a48: 7d 40 01 24 mtmsr r10
ffc18a4c: 41 9e 00 40 beq- cr7,ffc18a8c <rtems_signal_send+0x98>
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc18a50: 81 49 00 14 lwz r10,20(r9)
ffc18a54: 7d 5f fb 78 or r31,r10,r31
ffc18a58: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc18a5c: 7d 00 01 24 mtmsr r8
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc18a60: 3d 20 00 00 lis r9,0
ffc18a64: 39 29 72 20 addi r9,r9,29216
ffc18a68: 81 49 00 08 lwz r10,8(r9)
ffc18a6c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc18a70: 41 9e 00 2c beq- cr7,ffc18a9c <rtems_signal_send+0xa8>
ffc18a74: 81 49 00 10 lwz r10,16(r9)
ffc18a78: 7f 83 50 00 cmpw cr7,r3,r10
ffc18a7c: 40 be 00 20 bne+ cr7,ffc18a9c <rtems_signal_send+0xa8> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc18a80: 39 40 00 01 li r10,1
ffc18a84: 99 49 00 0c stb r10,12(r9)
ffc18a88: 48 00 00 14 b ffc18a9c <rtems_signal_send+0xa8>
ffc18a8c: 81 49 00 18 lwz r10,24(r9)
ffc18a90: 7d 5f fb 78 or r31,r10,r31
ffc18a94: 93 e9 00 18 stw r31,24(r9)
ffc18a98: 7d 00 01 24 mtmsr r8
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc18a9c: 48 00 4b 49 bl ffc1d5e4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc18aa0: 38 60 00 00 li r3,0
ffc18aa4: 48 00 00 1c b ffc18ac0 <rtems_signal_send+0xcc>
}
_Thread_Enable_dispatch();
ffc18aa8: 48 00 4b 3d bl ffc1d5e4 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
ffc18aac: 38 60 00 0b li r3,11
ffc18ab0: 48 00 00 10 b ffc18ac0 <rtems_signal_send+0xcc>
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
ffc18ab4: 38 60 00 0a li r3,10
ffc18ab8: 48 00 00 08 b ffc18ac0 <rtems_signal_send+0xcc>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc18abc: 38 60 00 04 li r3,4
}
ffc18ac0: 39 61 00 20 addi r11,r1,32
ffc18ac4: 4b ff 58 f8 b ffc0e3bc <_restgpr_31_x>
ffc118a4 <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc118a4: 7c a6 2b 79 mr. r6,r5
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
ffc118a8: 94 21 ff f8 stwu r1,-8(r1)
ffc118ac: 7c 08 02 a6 mflr r0
ffc118b0: 90 01 00 0c stw r0,12(r1)
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc118b4: 41 82 01 7c beq- ffc11a30 <rtems_task_mode+0x18c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc118b8: 3d 20 00 00 lis r9,0
ffc118bc: 81 49 2e 50 lwz r10,11856(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 )
ffc118c0: 80 ea 00 78 lwz r7,120(r10)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc118c4: 89 0a 00 70 lbz r8,112(r10)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc118c8: 2f 87 00 00 cmpwi cr7,r7,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc118cc: 81 2a 01 48 lwz r9,328(r10)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc118d0: 7d 08 00 34 cntlzw r8,r8
ffc118d4: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc118d8: 55 08 40 2e rlwinm r8,r8,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc118dc: 41 9e 00 08 beq- cr7,ffc118e4 <rtems_task_mode+0x40>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc118e0: 61 08 02 00 ori r8,r8,512
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc118e4: 88 e9 00 08 lbz r7,8(r9)
ffc118e8: 7c e7 00 34 cntlzw r7,r7
ffc118ec: 54 e7 d9 7e rlwinm r7,r7,27,5,31
ffc118f0: 54 e7 50 2a rlwinm r7,r7,10,0,21
ffc118f4: 7c e7 43 78 or r7,r7,r8
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc118f8: 39 00 00 00 li r8,0
ffc118fc: 7d 00 00 a6 mfmsr r8
if (msr & MSR_EE) return 0;
ffc11900: 69 08 80 00 xori r8,r8,32768
ffc11904: 55 05 8f fe rlwinm r5,r8,17,31,31
old_mode |= _ISR_Get_level();
ffc11908: 7c e8 2b 78 or r8,r7,r5
*previous_mode_set = old_mode;
ffc1190c: 91 06 00 00 stw r8,0(r6)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc11910: 70 88 01 00 andi. r8,r4,256
ffc11914: 41 82 00 10 beq- ffc11924 <rtems_task_mode+0x80>
*/
RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt (
Modes_Control mode_set
)
{
return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT;
ffc11918: 68 68 01 00 xori r8,r3,256
ffc1191c: 55 08 c7 fe rlwinm r8,r8,24,31,31
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc11920: 99 0a 00 70 stb r8,112(r10)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc11924: 70 88 02 00 andi. r8,r4,512
ffc11928: 41 82 00 28 beq- ffc11950 <rtems_task_mode+0xac>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc1192c: 70 68 02 00 andi. r8,r3,512
ffc11930: 41 82 00 1c beq- ffc1194c <rtems_task_mode+0xa8>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc11934: 39 00 00 01 li r8,1
ffc11938: 91 0a 00 78 stw r8,120(r10)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc1193c: 3d 00 00 00 lis r8,0
ffc11940: 81 08 27 b8 lwz r8,10168(r8)
ffc11944: 91 0a 00 74 stw r8,116(r10)
ffc11948: 48 00 00 08 b ffc11950 <rtems_task_mode+0xac>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc1194c: 91 0a 00 78 stw r8,120(r10)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc11950: 70 8a 00 01 andi. r10,r4,1
ffc11954: 41 a2 00 28 beq+ ffc1197c <rtems_task_mode+0xd8>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc11958: 39 40 00 00 li r10,0
ffc1195c: 7d 40 00 a6 mfmsr r10
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc11960: 70 68 00 01 andi. r8,r3,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc11964: 7d 10 42 a6 mfsprg r8,0
ffc11968: 40 a2 00 0c bne+ ffc11974 <rtems_task_mode+0xd0>
msr |= ppc_interrupt_get_disable_mask();
ffc1196c: 7d 0a 53 78 or r10,r8,r10
ffc11970: 48 00 00 08 b ffc11978 <rtems_task_mode+0xd4>
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc11974: 7d 4a 40 78 andc r10,r10,r8
}
_CPU_MSR_SET(msr);
ffc11978: 7d 40 01 24 mtmsr r10
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc1197c: 70 8a 04 00 andi. r10,r4,1024
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc11980: 38 e0 00 00 li r7,0
if ( mask & RTEMS_ASR_MASK ) {
ffc11984: 41 82 00 50 beq- ffc119d4 <rtems_task_mode+0x130>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
ffc11988: 68 63 04 00 xori r3,r3,1024
if ( is_asr_enabled != asr->is_enabled ) {
ffc1198c: 89 49 00 08 lbz r10,8(r9)
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
ffc11990: 54 63 b7 fe rlwinm r3,r3,22,31,31
if ( is_asr_enabled != asr->is_enabled ) {
ffc11994: 7f 8a 18 00 cmpw cr7,r10,r3
ffc11998: 41 9e 00 3c beq- cr7,ffc119d4 <rtems_task_mode+0x130>
asr->is_enabled = is_asr_enabled;
ffc1199c: 98 69 00 08 stb r3,8(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc119a0: 7d 00 00 a6 mfmsr r8
ffc119a4: 7d 50 42 a6 mfsprg r10,0
ffc119a8: 7d 0a 50 78 andc r10,r8,r10
ffc119ac: 7d 40 01 24 mtmsr r10
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc119b0: 80 e9 00 18 lwz r7,24(r9)
information->signals_pending = information->signals_posted;
ffc119b4: 81 49 00 14 lwz r10,20(r9)
information->signals_posted = _signals;
ffc119b8: 90 e9 00 14 stw r7,20(r9)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc119bc: 91 49 00 18 stw r10,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc119c0: 7d 00 01 24 mtmsr r8
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc119c4: 81 29 00 14 lwz r9,20(r9)
ffc119c8: 7d 29 00 34 cntlzw r9,r9
ffc119cc: 55 29 d9 7e rlwinm r9,r9,27,5,31
ffc119d0: 69 27 00 01 xori r7,r9,1
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc119d4: 3d 20 00 00 lis r9,0
ffc119d8: 81 29 27 e4 lwz r9,10212(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc119dc: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc119e0: 2f 89 00 03 cmpwi cr7,r9,3
ffc119e4: 40 be 00 50 bne+ cr7,ffc11a34 <rtems_task_mode+0x190>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
ffc119e8: 2f 87 00 00 cmpwi cr7,r7,0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc119ec: 3d 00 00 00 lis r8,0
ffc119f0: 39 08 2e 40 addi r8,r8,11840
ffc119f4: 81 48 00 10 lwz r10,16(r8)
if ( are_signals_pending ||
ffc119f8: 40 9e 00 1c bne- cr7,ffc11a14 <rtems_task_mode+0x170>
ffc119fc: 81 28 00 14 lwz r9,20(r8)
ffc11a00: 7f 8a 48 00 cmpw cr7,r10,r9
ffc11a04: 41 9e 00 30 beq- cr7,ffc11a34 <rtems_task_mode+0x190>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
ffc11a08: 89 2a 00 70 lbz r9,112(r10)
ffc11a0c: 2f 89 00 00 cmpwi cr7,r9,0
ffc11a10: 41 9e 00 24 beq- cr7,ffc11a34 <rtems_task_mode+0x190> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc11a14: 3d 20 00 00 lis r9,0
ffc11a18: 39 40 00 01 li r10,1
ffc11a1c: 39 29 2e 40 addi r9,r9,11840
ffc11a20: 99 49 00 0c stb r10,12(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
ffc11a24: 4b ff a7 79 bl ffc0c19c <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
ffc11a28: 38 60 00 00 li r3,0
ffc11a2c: 48 00 00 08 b ffc11a34 <rtems_task_mode+0x190>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
ffc11a30: 38 60 00 09 li r3,9
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
ffc11a34: 80 01 00 0c lwz r0,12(r1)
ffc11a38: 38 21 00 08 addi r1,r1,8
ffc11a3c: 7c 08 03 a6 mtlr r0
ffc11a40: 4e 80 00 20 blr
ffc0cfdc <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0cfdc: 94 21 ff e0 stwu r1,-32(r1)
ffc0cfe0: 7c 08 02 a6 mflr r0
ffc0cfe4: bf c1 00 18 stmw r30,24(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0cfe8: 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
)
{
ffc0cfec: 7c be 2b 78 mr r30,r5
ffc0cff0: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0cff4: 41 82 00 18 beq- ffc0d00c <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 ) );
ffc0cff8: 3d 20 00 00 lis r9,0
ffc0cffc: 89 49 27 04 lbz r10,9988(r9)
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
ffc0d000: 39 20 00 13 li r9,19
)
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0d004: 7f 9f 50 40 cmplw cr7,r31,r10
ffc0d008: 41 bd 00 6c bgt+ cr7,ffc0d074 <rtems_task_set_priority+0x98>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0d00c: 2f 9e 00 00 cmpwi cr7,r30,0
return RTEMS_INVALID_ADDRESS;
ffc0d010: 39 20 00 09 li r9,9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0d014: 41 9e 00 60 beq- cr7,ffc0d074 <rtems_task_set_priority+0x98>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0d018: 38 81 00 08 addi r4,r1,8
ffc0d01c: 48 00 26 0d bl ffc0f628 <_Thread_Get>
switch ( location ) {
ffc0d020: 81 21 00 08 lwz r9,8(r1)
ffc0d024: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d028: 40 9e 00 48 bne- cr7,ffc0d070 <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 ) {
ffc0d02c: 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;
ffc0d030: 81 23 00 14 lwz r9,20(r3)
ffc0d034: 91 3e 00 00 stw r9,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0d038: 41 9e 00 2c beq- cr7,ffc0d064 <rtems_task_set_priority+0x88>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0d03c: 81 23 00 1c lwz r9,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;
ffc0d040: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0d044: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d048: 41 9e 00 10 beq- cr7,ffc0d058 <rtems_task_set_priority+0x7c>
ffc0d04c: 81 23 00 14 lwz r9,20(r3)
ffc0d050: 7f 89 f8 40 cmplw cr7,r9,r31
ffc0d054: 40 9d 00 10 ble- cr7,ffc0d064 <rtems_task_set_priority+0x88><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
ffc0d058: 7f e4 fb 78 mr r4,r31
ffc0d05c: 38 a0 00 00 li r5,0
ffc0d060: 48 00 20 69 bl ffc0f0c8 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0d064: 48 00 25 a9 bl ffc0f60c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0d068: 39 20 00 00 li r9,0
ffc0d06c: 48 00 00 08 b ffc0d074 <rtems_task_set_priority+0x98>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0d070: 39 20 00 04 li r9,4
}
ffc0d074: 39 61 00 20 addi r11,r1,32
ffc0d078: 7d 23 4b 78 mr r3,r9
ffc0d07c: 4b ff 40 d0 b ffc0114c <_restgpr_30_x>
ffc1955c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc1955c: 94 21 ff e8 stwu r1,-24(r1)
ffc19560: 7c 08 02 a6 mflr r0
ffc19564: 7c 64 1b 78 mr r4,r3
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
ffc19568: 3c 60 00 00 lis r3,0
ffc1956c: 90 01 00 1c stw r0,28(r1)
ffc19570: 38 63 72 e0 addi r3,r3,29408
ffc19574: 38 a1 00 08 addi r5,r1,8
ffc19578: 48 00 31 bd bl ffc1c734 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1957c: 81 21 00 08 lwz r9,8(r1)
ffc19580: 2f 89 00 00 cmpwi cr7,r9,0
ffc19584: 40 9e 00 24 bne- cr7,ffc195a8 <rtems_timer_cancel+0x4c>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc19588: 81 23 00 38 lwz r9,56(r3)
ffc1958c: 2f 89 00 04 cmpwi cr7,r9,4
ffc19590: 41 9e 00 0c beq- cr7,ffc1959c <rtems_timer_cancel+0x40> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc19594: 38 63 00 10 addi r3,r3,16
ffc19598: 48 00 50 cd bl ffc1e664 <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc1959c: 48 00 40 49 bl ffc1d5e4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc195a0: 38 60 00 00 li r3,0
ffc195a4: 48 00 00 08 b ffc195ac <rtems_timer_cancel+0x50>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc195a8: 38 60 00 04 li r3,4
}
ffc195ac: 80 01 00 1c lwz r0,28(r1)
ffc195b0: 38 21 00 18 addi r1,r1,24
ffc195b4: 7c 08 03 a6 mtlr r0
ffc195b8: 4e 80 00 20 blr
ffc19b24 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19b24: 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;
ffc19b28: 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
)
{
ffc19b2c: 7c 08 02 a6 mflr r0
ffc19b30: bf 01 00 18 stmw r24,24(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc19b34: 83 c9 29 38 lwz r30,10552(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc19b38: 90 01 00 3c stw r0,60(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc19b3c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc19b40: 41 9e 01 04 beq- cr7,ffc19c44 <rtems_timer_server_fire_when+0x120>
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
ffc19b44: 3f a0 00 00 lis r29,0
ffc19b48: 3b bd 70 00 addi r29,r29,28672
ffc19b4c: 89 5d 00 14 lbz r10,20(r29)
ffc19b50: 7c 7b 1b 78 mr r27,r3
return RTEMS_NOT_DEFINED;
ffc19b54: 38 60 00 0b li r3,11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
ffc19b58: 2f 8a 00 00 cmpwi cr7,r10,0
ffc19b5c: 41 be 00 f0 beq+ cr7,ffc19c4c <rtems_timer_server_fire_when+0x128><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc19b60: 2f 85 00 00 cmpwi cr7,r5,0
ffc19b64: 7c ba 2b 78 mr r26,r5
return RTEMS_INVALID_ADDRESS;
ffc19b68: 38 60 00 09 li r3,9
return RTEMS_INCORRECT_STATE;
if ( !_TOD.is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc19b6c: 41 9e 00 e0 beq- cr7,ffc19c4c <rtems_timer_server_fire_when+0x128>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc19b70: 7c 83 23 78 mr r3,r4
ffc19b74: 7c 9f 23 78 mr r31,r4
ffc19b78: 7c d8 33 78 mr r24,r6
ffc19b7c: 4b ff c9 01 bl ffc1647c <_TOD_Validate>
ffc19b80: 2f 83 00 00 cmpwi cr7,r3,0
ffc19b84: 40 9e 00 0c bne- cr7,ffc19b90 <rtems_timer_server_fire_when+0x6c>
return RTEMS_INVALID_CLOCK;
ffc19b88: 38 60 00 14 li r3,20
ffc19b8c: 48 00 00 c0 b ffc19c4c <rtems_timer_server_fire_when+0x128>
seconds = _TOD_To_seconds( wall_time );
ffc19b90: 7f e3 fb 78 mr r3,r31
ffc19b94: 4b ff c8 45 bl ffc163d8 <_TOD_To_seconds>
ffc19b98: 80 9d 00 04 lwz r4,4(r29)
ffc19b9c: 7c 7c 1b 78 mr r28,r3
ffc19ba0: 80 7d 00 00 lwz r3,0(r29)
ffc19ba4: 3c c0 3b 9a lis r6,15258
ffc19ba8: 38 a0 00 00 li r5,0
ffc19bac: 60 c6 ca 00 ori r6,r6,51712
ffc19bb0: 48 01 39 c9 bl ffc2d578 <__divdi3>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc19bb4: 7f 9c 20 40 cmplw cr7,r28,r4
ffc19bb8: 40 9d ff d0 ble+ cr7,ffc19b88 <rtems_timer_server_fire_when+0x64>
ffc19bbc: 3c 60 00 00 lis r3,0
ffc19bc0: 38 63 72 e0 addi r3,r3,29408
ffc19bc4: 7f 64 db 78 mr r4,r27
ffc19bc8: 38 a1 00 08 addi r5,r1,8
ffc19bcc: 48 00 2b 69 bl ffc1c734 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc19bd0: 83 21 00 08 lwz r25,8(r1)
ffc19bd4: 7c 7f 1b 78 mr r31,r3
ffc19bd8: 2f 99 00 00 cmpwi cr7,r25,0
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc19bdc: 38 60 00 04 li r3,4
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc19be0: 40 9e 00 6c bne- cr7,ffc19c4c <rtems_timer_server_fire_when+0x128>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc19be4: 38 7f 00 10 addi r3,r31,16
ffc19be8: 48 00 4a 7d bl ffc1e664 <_Watchdog_Remove>
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc19bec: 39 20 00 03 li r9,3
ffc19bf0: 91 3f 00 38 stw r9,56(r31)
ffc19bf4: 3c c0 3b 9a lis r6,15258
ffc19bf8: 38 a0 00 00 li r5,0
ffc19bfc: 80 7d 00 00 lwz r3,0(r29)
ffc19c00: 60 c6 ca 00 ori r6,r6,51712
ffc19c04: 80 9d 00 04 lwz r4,4(r29)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc19c08: 93 3f 00 18 stw r25,24(r31)
the_watchdog->routine = routine;
ffc19c0c: 93 5f 00 2c stw r26,44(r31)
the_watchdog->id = id;
ffc19c10: 93 7f 00 30 stw r27,48(r31)
the_watchdog->user_data = user_data;
ffc19c14: 93 1f 00 34 stw r24,52(r31)
ffc19c18: 48 01 39 61 bl ffc2d578 <__divdi3>
_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 );
ffc19c1c: 81 3e 00 04 lwz r9,4(r30)
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();
ffc19c20: 7c 84 e0 50 subf r4,r4,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc19c24: 7f c3 f3 78 mr r3,r30
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();
ffc19c28: 90 9f 00 1c stw r4,28(r31)
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc19c2c: 7d 29 03 a6 mtctr r9
ffc19c30: 7f e4 fb 78 mr r4,r31
ffc19c34: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc19c38: 48 00 39 ad bl ffc1d5e4 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc19c3c: 38 60 00 00 li r3,0
ffc19c40: 48 00 00 0c b ffc19c4c <rtems_timer_server_fire_when+0x128>
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
ffc19c44: 38 60 00 0e li r3,14
ffc19c48: 48 00 00 04 b ffc19c4c <rtems_timer_server_fire_when+0x128>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc19c4c: 39 61 00 38 addi r11,r1,56
ffc19c50: 4b ff 47 50 b ffc0e3a0 <_restgpr_24_x>