RTEMS 4.11Annotated Report
Sun Sep 11 19:41:03 2011
ffc11158 <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();
ffc11158: 3d 20 00 00 lis r9,0
ffc1115c: 80 09 20 28 lwz r0,8232(r9)
ticks = microseconds / microseconds_per_tick;
ffc11160: 7d 23 03 96 divwu r9,r3,r0
if ( (microseconds % microseconds_per_tick) != 0 )
ffc11164: 7c 09 01 d6 mullw r0,r9,r0
ffc11168: 7f 83 00 00 cmpw cr7,r3,r0
ffc1116c: 41 9e 00 08 beq- cr7,ffc11174 <TOD_MICROSECONDS_TO_TICKS+0x1c><== ALWAYS TAKEN
ticks += 1;
ffc11170: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
return ticks;
}
ffc11174: 7d 23 4b 78 mr r3,r9
ffc11178: 4e 80 00 20 blr
ffc0b1d0 <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();
ffc0b1d0: 3d 20 00 00 lis r9,0
ffc0b1d4: 81 29 20 10 lwz r9,8208(r9)
ffc0b1d8: 3c 00 10 62 lis r0,4194
ffc0b1dc: 60 00 4d d3 ori r0,r0,19923
ffc0b1e0: 7c 09 00 16 mulhwu r0,r9,r0
ffc0b1e4: 54 00 d1 be rlwinm r0,r0,26,6,31
ticks = milliseconds / milliseconds_per_tick;
ffc0b1e8: 7d 23 03 96 divwu r9,r3,r0
if ( (milliseconds % milliseconds_per_tick) != 0 )
ffc0b1ec: 7c 09 01 d6 mullw r0,r9,r0
ffc0b1f0: 7f 83 00 00 cmpw cr7,r3,r0
ffc0b1f4: 41 9e 00 08 beq- cr7,ffc0b1fc <TOD_MILLISECONDS_TO_TICKS+0x2c><== ALWAYS TAKEN
ticks += 1;
ffc0b1f8: 39 29 00 01 addi r9,r9,1 <== NOT EXECUTED
return ticks;
}
ffc0b1fc: 7d 23 4b 78 mr r3,r9
ffc0b200: 4e 80 00 20 blr
ffc09fcc <_API_extensions_Run_postdriver>:
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc09fcc: 94 21 ff f0 stwu r1,-16(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc09fd0: 3d 20 00 00 lis r9,0
ffc09fd4: 7c 08 02 a6 mflr r0
ffc09fd8: 93 c1 00 08 stw r30,8(r1)
ffc09fdc: 3b c9 2e 00 addi r30,r9,11776
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09fe0: 3b de 00 04 addi r30,r30,4
/*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
ffc09fe4: 93 e1 00 0c stw r31,12(r1)
ffc09fe8: 83 e9 2e 00 lwz r31,11776(r9)
ffc09fec: 90 01 00 14 stw r0,20(r1)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc09ff0: 7f 9f f0 00 cmpw cr7,r31,r30
ffc09ff4: 41 9e 00 1c beq- cr7,ffc0a010 <_API_extensions_Run_postdriver+0x44><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
ffc09ff8: 80 1f 00 08 lwz r0,8(r31)
ffc09ffc: 7c 09 03 a6 mtctr r0
ffc0a000: 4e 80 04 21 bctrl
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0a004: 83 ff 00 00 lwz r31,0(r31)
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc0a008: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0a00c: 40 9e ff ec bne+ cr7,ffc09ff8 <_API_extensions_Run_postdriver+0x2c>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
ffc0a010: 80 01 00 14 lwz r0,20(r1)
ffc0a014: 83 c1 00 08 lwz r30,8(r1)
ffc0a018: 7c 08 03 a6 mtlr r0
ffc0a01c: 83 e1 00 0c lwz r31,12(r1)
ffc0a020: 38 21 00 10 addi r1,r1,16
ffc0a024: 4e 80 00 20 blr
ffc0a028 <_API_extensions_Run_postswitch>:
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc0a028: 94 21 ff e8 stwu r1,-24(r1)
ffc0a02c: 3d 20 00 00 lis r9,0
ffc0a030: 7c 08 02 a6 mflr r0
ffc0a034: 93 c1 00 10 stw r30,16(r1)
ffc0a038: 3b c9 2e 00 addi r30,r9,11776
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc0a03c: 3b de 00 04 addi r30,r30,4
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc0a040: 93 e1 00 14 stw r31,20(r1)
ffc0a044: 83 e9 2e 00 lwz r31,11776(r9)
ffc0a048: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc0a04c: 7f 9f f0 00 cmpw cr7,r31,r30
/*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
ffc0a050: 93 a1 00 0c stw r29,12(r1)
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc0a054: 41 9e 00 28 beq- cr7,ffc0a07c <_API_extensions_Run_postswitch+0x54><== NEVER TAKEN
ffc0a058: 3f a0 00 00 lis r29,0
ffc0a05c: 3b bd 31 44 addi r29,r29,12612
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
ffc0a060: 80 1f 00 0c lwz r0,12(r31)
ffc0a064: 80 7d 00 0c lwz r3,12(r29)
ffc0a068: 7c 09 03 a6 mtctr r0
ffc0a06c: 4e 80 04 21 bctrl
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0a070: 83 ff 00 00 lwz r31,0(r31)
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_API_extensions_List );
ffc0a074: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0a078: 40 9e ff e8 bne+ cr7,ffc0a060 <_API_extensions_Run_postswitch+0x38>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
ffc0a07c: 80 01 00 1c lwz r0,28(r1)
ffc0a080: 83 a1 00 0c lwz r29,12(r1)
ffc0a084: 7c 08 03 a6 mtlr r0
ffc0a088: 83 c1 00 10 lwz r30,16(r1)
ffc0a08c: 83 e1 00 14 lwz r31,20(r1)
ffc0a090: 38 21 00 18 addi r1,r1,24
ffc0a094: 4e 80 00 20 blr
ffc0ca58 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ffc0ca58: 94 21 ff f0 stwu r1,-16(r1)
ffc0ca5c: 7c 08 02 a6 mflr r0
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0ca60: 3d 20 00 00 lis r9,0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ffc0ca64: 90 01 00 14 stw r0,20(r1)
ffc0ca68: 93 e1 00 0c stw r31,12(r1)
ffc0ca6c: 7c 7f 1b 78 mr r31,r3
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0ca70: 81 29 31 30 lwz r9,12592(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0ca74: 7d 60 00 a6 mfmsr r11
ffc0ca78: 7c 10 42 a6 mfsprg r0,0
ffc0ca7c: 7d 60 00 78 andc r0,r11,r0
ffc0ca80: 7c 00 01 24 mtmsr r0
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
ffc0ca84: 80 03 00 44 lwz r0,68(r3)
ffc0ca88: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ca8c: 41 9e 00 cc beq- cr7,ffc0cb58 <_CORE_RWLock_Release+0x100>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
ffc0ca90: 2f 80 00 01 cmpwi cr7,r0,1
ffc0ca94: 41 9e 00 94 beq- cr7,ffc0cb28 <_CORE_RWLock_Release+0xd0>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
ffc0ca98: 38 00 00 00 li r0,0
ffc0ca9c: 90 09 00 34 stw r0,52(r9)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
ffc0caa0: 90 1f 00 44 stw r0,68(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0caa4: 7d 60 01 24 mtmsr r11
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
ffc0caa8: 7f e3 fb 78 mr r3,r31
ffc0caac: 48 00 23 b9 bl ffc0ee64 <_Thread_queue_Dequeue>
if ( next ) {
ffc0cab0: 2c 03 00 00 cmpwi r3,0
ffc0cab4: 41 82 00 5c beq- ffc0cb10 <_CORE_RWLock_Release+0xb8>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
ffc0cab8: 80 03 00 30 lwz r0,48(r3)
ffc0cabc: 2f 80 00 01 cmpwi cr7,r0,1
ffc0cac0: 41 9e 00 bc beq- cr7,ffc0cb7c <_CORE_RWLock_Release+0x124>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
ffc0cac4: 81 3f 00 48 lwz r9,72(r31)
ffc0cac8: 38 09 00 01 addi r0,r9,1
ffc0cacc: 90 1f 00 48 stw r0,72(r31)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
ffc0cad0: 38 00 00 01 li r0,1
ffc0cad4: 90 1f 00 44 stw r0,68(r31)
ffc0cad8: 48 00 00 20 b ffc0caf8 <_CORE_RWLock_Release+0xa0>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
ffc0cadc: 80 09 00 30 lwz r0,48(r9)
ffc0cae0: 2f 80 00 01 cmpwi cr7,r0,1
ffc0cae4: 41 9e 00 2c beq- cr7,ffc0cb10 <_CORE_RWLock_Release+0xb8><== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
ffc0cae8: 81 3f 00 48 lwz r9,72(r31)
ffc0caec: 38 09 00 01 addi r0,r9,1
ffc0caf0: 90 1f 00 48 stw r0,72(r31)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
ffc0caf4: 48 00 28 11 bl ffc0f304 <_Thread_queue_Extract>
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
ffc0caf8: 7f e3 fb 78 mr r3,r31
ffc0cafc: 48 00 29 91 bl ffc0f48c <_Thread_queue_First>
if ( !next ||
ffc0cb00: 7c 69 1b 79 mr. r9,r3
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
ffc0cb04: 7f e3 fb 78 mr r3,r31
ffc0cb08: 7d 24 4b 78 mr r4,r9
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
ffc0cb0c: 40 82 ff d0 bne+ ffc0cadc <_CORE_RWLock_Release+0x84>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
ffc0cb10: 80 01 00 14 lwz r0,20(r1)
ffc0cb14: 38 60 00 00 li r3,0
ffc0cb18: 83 e1 00 0c lwz r31,12(r1)
ffc0cb1c: 38 21 00 10 addi r1,r1,16
ffc0cb20: 7c 08 03 a6 mtlr r0
ffc0cb24: 4e 80 00 20 blr
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
ffc0cb28: 81 43 00 48 lwz r10,72(r3)
ffc0cb2c: 38 0a ff ff addi r0,r10,-1
if ( the_rwlock->number_of_readers != 0 ) {
ffc0cb30: 2f 80 00 00 cmpwi cr7,r0,0
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
ffc0cb34: 90 03 00 48 stw r0,72(r3)
if ( the_rwlock->number_of_readers != 0 ) {
ffc0cb38: 41 9e ff 60 beq+ cr7,ffc0ca98 <_CORE_RWLock_Release+0x40>
ffc0cb3c: 7d 60 01 24 mtmsr r11
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
ffc0cb40: 80 01 00 14 lwz r0,20(r1)
ffc0cb44: 38 60 00 00 li r3,0
ffc0cb48: 83 e1 00 0c lwz r31,12(r1)
ffc0cb4c: 38 21 00 10 addi r1,r1,16
ffc0cb50: 7c 08 03 a6 mtlr r0
ffc0cb54: 4e 80 00 20 blr
ffc0cb58: 7d 60 01 24 mtmsr r11
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
ffc0cb5c: 38 00 00 02 li r0,2
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
ffc0cb60: 83 e1 00 0c lwz r31,12(r1)
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
ffc0cb64: 90 09 00 34 stw r0,52(r9)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
ffc0cb68: 38 60 00 00 li r3,0
ffc0cb6c: 80 01 00 14 lwz r0,20(r1)
ffc0cb70: 38 21 00 10 addi r1,r1,16
ffc0cb74: 7c 08 03 a6 mtlr r0
ffc0cb78: 4e 80 00 20 blr
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
ffc0cb7c: 38 00 00 02 li r0,2
ffc0cb80: 90 1f 00 44 stw r0,68(r31)
return CORE_RWLOCK_SUCCESSFUL;
ffc0cb84: 4b ff ff 8c b ffc0cb10 <_CORE_RWLock_Release+0xb8>
ffc0cb88 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0cb88: 94 21 ff e8 stwu r1,-24(r1)
ffc0cb8c: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0cb90: 38 81 00 08 addi r4,r1,8
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0cb94: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0cb98: 48 00 1e c9 bl ffc0ea60 <_Thread_Get>
switch ( location ) {
ffc0cb9c: 80 01 00 08 lwz r0,8(r1)
ffc0cba0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cba4: 40 9e 00 1c bne- cr7,ffc0cbc0 <_CORE_RWLock_Timeout+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0cba8: 48 00 2a 25 bl ffc0f5cc <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0cbac: 3d 20 00 00 lis r9,0
ffc0cbb0: 81 69 28 34 lwz r11,10292(r9)
ffc0cbb4: 38 0b ff ff addi r0,r11,-1
ffc0cbb8: 90 09 28 34 stw r0,10292(r9)
return _Thread_Dispatch_disable_level;
ffc0cbbc: 80 09 28 34 lwz r0,10292(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0cbc0: 80 01 00 1c lwz r0,28(r1)
ffc0cbc4: 38 21 00 18 addi r1,r1,24
ffc0cbc8: 7c 08 03 a6 mtlr r0
ffc0cbcc: 4e 80 00 20 blr
ffc14fd4 <_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
)
{
ffc14fd4: 94 21 ff e0 stwu r1,-32(r1)
ffc14fd8: 7c 08 02 a6 mflr r0
ffc14fdc: 90 01 00 24 stw r0,36(r1)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
ffc14fe0: 70 c0 00 03 andi. r0,r6,3
{
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;
ffc14fe4: 38 00 00 00 li r0,0
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
ffc14fe8: 93 81 00 10 stw r28,16(r1)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
ffc14fec: 7c dc 33 78 mr r28,r6
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
)
{
ffc14ff0: 93 a1 00 14 stw r29,20(r1)
ffc14ff4: 7c 9d 23 78 mr r29,r4
ffc14ff8: 93 e1 00 1c stw r31,28(r1)
ffc14ffc: 7c 7f 1b 78 mr r31,r3
ffc15000: 93 c1 00 18 stw r30,24(r1)
size_t message_buffering_required = 0;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
ffc15004: 90 a3 00 44 stw r5,68(r3)
the_message_queue->number_of_pending_messages = 0;
ffc15008: 90 03 00 48 stw r0,72(r3)
the_message_queue->maximum_message_size = maximum_message_size;
ffc1500c: 90 c3 00 4c stw r6,76(r3)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
ffc15010: 90 03 00 60 stw r0,96(r3)
the_message_queue->notify_argument = the_argument;
ffc15014: 90 03 00 64 stw r0,100(r3)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
ffc15018: 41 82 00 3c beq- ffc15054 <_CORE_message_queue_Initialize+0x80>
allocated_message_size += sizeof(uint32_t);
ffc1501c: 3b 86 00 04 addi r28,r6,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
ffc15020: 57 9c 00 3a rlwinm r28,r28,0,0,29
}
if (allocated_message_size < maximum_message_size)
ffc15024: 7f 86 e0 40 cmplw cr7,r6,r28
return false;
ffc15028: 3b c0 00 00 li r30,0
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
allocated_message_size += sizeof(uint32_t);
allocated_message_size &= ~(sizeof(uint32_t) - 1);
}
if (allocated_message_size < maximum_message_size)
ffc1502c: 40 9d 00 28 ble- cr7,ffc15054 <_CORE_message_queue_Initialize+0x80><== ALWAYS TAKEN
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
ffc15030: 80 01 00 24 lwz r0,36(r1)
ffc15034: 7f c3 f3 78 mr r3,r30
ffc15038: 83 81 00 10 lwz r28,16(r1)
ffc1503c: 7c 08 03 a6 mtlr r0
ffc15040: 83 a1 00 14 lwz r29,20(r1)
ffc15044: 83 c1 00 18 lwz r30,24(r1)
ffc15048: 83 e1 00 1c lwz r31,28(r1)
ffc1504c: 38 21 00 20 addi r1,r1,32
ffc15050: 4e 80 00 20 blr
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
if ( !size_t_mult32_with_overflow(
ffc15054: 3b 9c 00 14 addi r28,r28,20
size_t a,
size_t b,
size_t *c
)
{
long long x = (long long)a*b;
ffc15058: 7d 45 e0 16 mulhwu r10,r5,r28
ffc1505c: 7d 65 e1 d6 mullw r11,r5,r28
if ( x > SIZE_MAX )
ffc15060: 2f 8a 00 00 cmpwi cr7,r10,0
*/
if ( !size_t_mult32_with_overflow(
(size_t) maximum_pending_messages,
allocated_message_size + sizeof(CORE_message_queue_Buffer_control),
&message_buffering_required ) )
return false;
ffc15064: 3b c0 00 00 li r30,0
size_t *c
)
{
long long x = (long long)a*b;
if ( x > SIZE_MAX )
ffc15068: 41 bd ff c8 bgt- cr7,ffc15030 <_CORE_message_queue_Initialize+0x5c>
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
ffc1506c: 7d 63 5b 78 mr r3,r11
ffc15070: 90 a1 00 08 stw r5,8(r1)
ffc15074: 48 00 3e 15 bl ffc18e88 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
ffc15078: 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 *)
ffc1507c: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
ffc15080: 7c 64 1b 78 mr r4,r3
if (the_message_queue->message_buffers == 0)
ffc15084: 80 a1 00 08 lwz r5,8(r1)
ffc15088: 41 be ff a8 beq- cr7,ffc15030 <_CORE_message_queue_Initialize+0x5c>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc1508c: 38 7f 00 68 addi r3,r31,104
ffc15090: 7f 86 e3 78 mr r6,r28
ffc15094: 48 00 6e 5d bl ffc1bef0 <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc15098: 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 );
ffc1509c: 38 1f 00 50 addi r0,r31,80
head->next = tail;
head->previous = NULL;
ffc150a0: 93 df 00 54 stw r30,84(r31)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc150a4: 39 3f 00 54 addi r9,r31,84
ffc150a8: 68 84 00 01 xori r4,r4,1
head->next = tail;
head->previous = NULL;
tail->previous = head;
ffc150ac: 90 1f 00 58 stw r0,88(r31)
ffc150b0: 7c 84 00 34 cntlzw r4,r4
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc150b4: 91 3f 00 50 stw r9,80(r31)
ffc150b8: 7f e3 fb 78 mr r3,r31
ffc150bc: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc150c0: 38 a0 00 80 li r5,128
ffc150c4: 38 c0 00 06 li r6,6
ffc150c8: 48 00 30 29 bl ffc180f0 <_Thread_queue_Initialize>
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
ffc150cc: 80 01 00 24 lwz r0,36(r1)
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
ffc150d0: 3b c0 00 01 li r30,1
}
ffc150d4: 83 81 00 10 lwz r28,16(r1)
ffc150d8: 7c 08 03 a6 mtlr r0
ffc150dc: 7f c3 f3 78 mr r3,r30
ffc150e0: 83 a1 00 14 lwz r29,20(r1)
ffc150e4: 83 c1 00 18 lwz r30,24(r1)
ffc150e8: 83 e1 00 1c lwz r31,28(r1)
ffc150ec: 38 21 00 20 addi r1,r1,32
ffc150f0: 4e 80 00 20 blr
ffc0a740 <_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
)
{
ffc0a740: 94 21 ff f0 stwu r1,-16(r1)
ffc0a744: 7c 08 02 a6 mflr r0
ffc0a748: 93 e1 00 0c stw r31,12(r1)
ffc0a74c: 7c 7f 1b 78 mr r31,r3
ffc0a750: 90 01 00 14 stw r0,20(r1)
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc0a754: 48 00 21 d5 bl ffc0c928 <_Thread_queue_Dequeue>
ffc0a758: 2f 83 00 00 cmpwi cr7,r3,0
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc0a75c: 38 60 00 00 li r3,0
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
ffc0a760: 41 9e 00 18 beq- cr7,ffc0a778 <_CORE_semaphore_Surrender+0x38>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0a764: 80 01 00 14 lwz r0,20(r1)
ffc0a768: 83 e1 00 0c lwz r31,12(r1)
ffc0a76c: 38 21 00 10 addi r1,r1,16
ffc0a770: 7c 08 03 a6 mtlr r0
ffc0a774: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a778: 7c 00 00 a6 mfmsr r0
ffc0a77c: 7d 30 42 a6 mfsprg r9,0
ffc0a780: 7c 09 48 78 andc r9,r0,r9
ffc0a784: 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 )
ffc0a788: 81 3f 00 48 lwz r9,72(r31)
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
ffc0a78c: 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 )
ffc0a790: 81 7f 00 40 lwz r11,64(r31)
ffc0a794: 7f 89 58 40 cmplw cr7,r9,r11
ffc0a798: 40 9c 00 10 bge- cr7,ffc0a7a8 <_CORE_semaphore_Surrender+0x68><== NEVER TAKEN
the_semaphore->count += 1;
ffc0a79c: 39 29 00 01 addi r9,r9,1
ffc0a7a0: 91 3f 00 48 stw r9,72(r31)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
ffc0a7a4: 38 60 00 00 li r3,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a7a8: 7c 00 01 24 mtmsr r0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0a7ac: 80 01 00 14 lwz r0,20(r1)
ffc0a7b0: 83 e1 00 0c lwz r31,12(r1)
ffc0a7b4: 38 21 00 10 addi r1,r1,16
ffc0a7b8: 7c 08 03 a6 mtlr r0
ffc0a7bc: 4e 80 00 20 blr
ffc10d48 <_Chain_Initialize>:
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc10d48: 2c 05 00 00 cmpwi r5,0
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
ffc10d4c: 38 00 00 00 li r0,0
size_t node_size
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
ffc10d50: 39 43 00 04 addi r10,r3,4
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
ffc10d54: 90 03 00 04 stw r0,4(r3)
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
ffc10d58: 7c 69 1b 78 mr r9,r3
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc10d5c: 41 82 00 38 beq- ffc10d94 <_Chain_Initialize+0x4c> <== NEVER TAKEN
ffc10d60: 39 05 ff ff addi r8,r5,-1
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
ffc10d64: 7c a9 03 a6 mtctr r5
Chain_Node *next = starting_address;
ffc10d68: 7c 89 23 78 mr r9,r4
)
{
size_t count = number_nodes;
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
Chain_Node *current = head;
ffc10d6c: 7c 6b 1b 78 mr r11,r3
ffc10d70: 48 00 00 0c b ffc10d7c <_Chain_Initialize+0x34>
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc10d74: 7d 2b 4b 78 mr r11,r9
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
ffc10d78: 7c 09 03 78 mr r9,r0
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
current->next = next;
ffc10d7c: 91 2b 00 00 stw r9,0(r11)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
ffc10d80: 7c 09 32 14 add r0,r9,r6
head->previous = NULL;
while ( count-- ) {
current->next = next;
next->previous = current;
ffc10d84: 91 69 00 04 stw r11,4(r9)
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc10d88: 42 00 ff ec bdnz+ ffc10d74 <_Chain_Initialize+0x2c>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
ffc10d8c: 7c c6 41 d6 mullw r6,r6,r8
Chain_Node *current = head;
Chain_Node *next = starting_address;
head->previous = NULL;
while ( count-- ) {
ffc10d90: 7d 24 32 14 add r9,r4,r6
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = tail;
ffc10d94: 91 49 00 00 stw r10,0(r9)
tail->previous = current;
ffc10d98: 91 23 00 08 stw r9,8(r3)
}
ffc10d9c: 4e 80 00 20 blr
ffc08f08 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
ffc08f08: 94 21 ff f0 stwu r1,-16(r1)
ffc08f0c: 7c 08 02 a6 mflr r0
ffc08f10: 90 01 00 14 stw r0,20(r1)
ffc08f14: 93 e1 00 0c stw r31,12(r1)
ffc08f18: 7c 7f 1b 78 mr r31,r3
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc08f1c: 81 63 01 30 lwz r11,304(r3)
option_set = (rtems_option) the_thread->Wait.option;
ffc08f20: 80 c3 00 30 lwz r6,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc08f24: 7d 40 00 a6 mfmsr r10
ffc08f28: 7c 10 42 a6 mfsprg r0,0
ffc08f2c: 7d 40 00 78 andc r0,r10,r0
ffc08f30: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
pending_events = api->pending_events;
ffc08f34: 81 2b 00 00 lwz r9,0(r11)
event_condition = (rtems_event_set) the_thread->Wait.count;
ffc08f38: 80 03 00 24 lwz r0,36(r3)
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
ffc08f3c: 7c 08 48 39 and. r8,r0,r9
ffc08f40: 41 82 00 e4 beq- ffc09024 <_Event_Surrender+0x11c>
/*
* 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() &&
ffc08f44: 3c e0 00 00 lis r7,0
ffc08f48: 38 e7 31 44 addi r7,r7,12612
ffc08f4c: 80 a7 00 08 lwz r5,8(r7)
ffc08f50: 2f 85 00 00 cmpwi cr7,r5,0
ffc08f54: 41 9e 00 10 beq- cr7,ffc08f64 <_Event_Surrender+0x5c>
ffc08f58: 80 e7 00 0c lwz r7,12(r7)
ffc08f5c: 7f 83 38 00 cmpw cr7,r3,r7
ffc08f60: 41 9e 00 78 beq- cr7,ffc08fd8 <_Event_Surrender+0xd0>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
ffc08f64: 80 ff 00 10 lwz r7,16(r31)
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
ffc08f68: 70 e5 01 00 andi. r5,r7,256
ffc08f6c: 41 82 00 b8 beq- ffc09024 <_Event_Surrender+0x11c>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc08f70: 7f 80 40 00 cmpw cr7,r0,r8
ffc08f74: 41 9e 00 0c beq- cr7,ffc08f80 <_Event_Surrender+0x78>
ffc08f78: 70 c0 00 02 andi. r0,r6,2
ffc08f7c: 41 82 00 a8 beq- ffc09024 <_Event_Surrender+0x11c> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc08f80: 80 ff 00 28 lwz r7,40(r31)
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) );
ffc08f84: 7d 29 40 78 andc r9,r9,r8
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
ffc08f88: 38 00 00 00 li r0,0
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
ffc08f8c: 91 2b 00 00 stw r9,0(r11)
the_thread->Wait.count = 0;
ffc08f90: 90 1f 00 24 stw r0,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc08f94: 91 07 00 00 stw r8,0(r7)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc08f98: 7c 00 00 a6 mfmsr r0
ffc08f9c: 7d 40 01 24 mtmsr r10
ffc08fa0: 7c 00 01 24 mtmsr r0
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc08fa4: 80 1f 00 50 lwz r0,80(r31)
ffc08fa8: 2f 80 00 02 cmpwi cr7,r0,2
ffc08fac: 41 9e 00 90 beq- cr7,ffc0903c <_Event_Surrender+0x134>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc08fb0: 7d 40 01 24 mtmsr r10
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc08fb4: 3c 80 10 03 lis r4,4099
ffc08fb8: 7f e3 fb 78 mr r3,r31
ffc08fbc: 60 84 ff f8 ori r4,r4,65528
ffc08fc0: 48 00 30 a1 bl ffc0c060 <_Thread_Clear_state>
}
return;
}
}
_ISR_Enable( level );
}
ffc08fc4: 80 01 00 14 lwz r0,20(r1)
ffc08fc8: 83 e1 00 0c lwz r31,12(r1)
ffc08fcc: 38 21 00 10 addi r1,r1,16
ffc08fd0: 7c 08 03 a6 mtlr r0
ffc08fd4: 4e 80 00 20 blr
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc08fd8: 3c e0 00 00 lis r7,0
ffc08fdc: 80 a7 28 54 lwz r5,10324(r7)
/*
* 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 ) &&
ffc08fe0: 2f 85 00 02 cmpwi cr7,r5,2
ffc08fe4: 41 9e 00 10 beq- cr7,ffc08ff4 <_Event_Surrender+0xec> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
ffc08fe8: 80 a7 28 54 lwz r5,10324(r7)
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc08fec: 2f 85 00 01 cmpwi cr7,r5,1
ffc08ff0: 40 9e ff 74 bne+ cr7,ffc08f64 <_Event_Surrender+0x5c>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
ffc08ff4: 7f 80 40 00 cmpw cr7,r0,r8
ffc08ff8: 41 9e 00 0c beq- cr7,ffc09004 <_Event_Surrender+0xfc>
ffc08ffc: 70 c0 00 02 andi. r0,r6,2
ffc09000: 41 82 00 24 beq- ffc09024 <_Event_Surrender+0x11c> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc09004: 80 df 00 28 lwz r6,40(r31)
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
ffc09008: 38 00 00 00 li r0,0
ffc0900c: 7d 29 40 78 andc r9,r9,r8
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
ffc09010: 91 2b 00 00 stw r9,0(r11)
the_thread->Wait.count = 0;
ffc09014: 90 1f 00 24 stw r0,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc09018: 38 00 00 03 li r0,3
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc0901c: 91 06 00 00 stw r8,0(r6)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc09020: 90 07 28 54 stw r0,10324(r7)
ffc09024: 7d 40 01 24 mtmsr r10
}
return;
}
}
_ISR_Enable( level );
}
ffc09028: 80 01 00 14 lwz r0,20(r1)
ffc0902c: 83 e1 00 0c lwz r31,12(r1)
ffc09030: 38 21 00 10 addi r1,r1,16
ffc09034: 7c 08 03 a6 mtlr r0
ffc09038: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc0903c: 38 00 00 03 li r0,3
ffc09040: 90 1f 00 50 stw r0,80(r31)
ffc09044: 7d 40 01 24 mtmsr r10
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc09048: 38 7f 00 48 addi r3,r31,72
ffc0904c: 48 00 49 79 bl ffc0d9c4 <_Watchdog_Remove>
ffc09050: 3c 80 10 03 lis r4,4099
ffc09054: 7f e3 fb 78 mr r3,r31
ffc09058: 60 84 ff f8 ori r4,r4,65528
ffc0905c: 48 00 30 05 bl ffc0c060 <_Thread_Clear_state>
ffc09060: 4b ff ff c8 b ffc09028 <_Event_Surrender+0x120>
ffc09064 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc09064: 94 21 ff e8 stwu r1,-24(r1)
ffc09068: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc0906c: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc09070: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc09074: 48 00 34 b1 bl ffc0c524 <_Thread_Get>
switch ( location ) {
ffc09078: 80 01 00 08 lwz r0,8(r1)
ffc0907c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09080: 40 9e 00 54 bne- cr7,ffc090d4 <_Event_Timeout+0x70> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09084: 7d 20 00 a6 mfmsr r9
ffc09088: 7d 70 42 a6 mfsprg r11,0
ffc0908c: 7d 2b 58 78 andc r11,r9,r11
ffc09090: 7d 60 01 24 mtmsr r11
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc09094: 3d 60 00 00 lis r11,0
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
ffc09098: 81 6b 31 50 lwz r11,12624(r11)
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc0909c: 90 03 00 24 stw r0,36(r3)
if ( _Thread_Is_executing( the_thread ) ) {
ffc090a0: 7f 83 58 00 cmpw cr7,r3,r11
ffc090a4: 41 9e 00 40 beq- cr7,ffc090e4 <_Event_Timeout+0x80>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc090a8: 38 00 00 06 li r0,6
ffc090ac: 90 03 00 34 stw r0,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc090b0: 7d 20 01 24 mtmsr r9
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc090b4: 3c 80 10 03 lis r4,4099
ffc090b8: 60 84 ff f8 ori r4,r4,65528
ffc090bc: 48 00 2f a5 bl ffc0c060 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc090c0: 3d 20 00 00 lis r9,0
ffc090c4: 81 69 28 0c lwz r11,10252(r9)
ffc090c8: 38 0b ff ff addi r0,r11,-1
ffc090cc: 90 09 28 0c stw r0,10252(r9)
return _Thread_Dispatch_disable_level;
ffc090d0: 80 09 28 0c lwz r0,10252(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc090d4: 80 01 00 1c lwz r0,28(r1)
ffc090d8: 38 21 00 18 addi r1,r1,24
ffc090dc: 7c 08 03 a6 mtlr r0
ffc090e0: 4e 80 00 20 blr
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc090e4: 3d 60 00 00 lis r11,0
ffc090e8: 80 0b 28 54 lwz r0,10324(r11)
ffc090ec: 2f 80 00 01 cmpwi cr7,r0,1
ffc090f0: 40 9e ff b8 bne+ cr7,ffc090a8 <_Event_Timeout+0x44>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc090f4: 38 00 00 02 li r0,2
ffc090f8: 90 0b 28 54 stw r0,10324(r11)
ffc090fc: 4b ff ff ac b ffc090a8 <_Event_Timeout+0x44>
ffc10f94 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc10f94: 94 21 ff e0 stwu r1,-32(r1)
ffc10f98: 7c 08 02 a6 mflr r0
ffc10f9c: 7d 80 00 26 mfcr r12
ffc10fa0: 7c 89 23 78 mr r9,r4
ffc10fa4: 90 01 00 24 stw r0,36(r1)
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
ffc10fa8: 38 04 00 04 addi r0,r4,4
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
ffc10fac: 7f 84 00 40 cmplw cr7,r4,r0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc10fb0: 93 a1 00 14 stw r29,20(r1)
ffc10fb4: 7c 7d 1b 78 mr r29,r3
Heap_Statistics *const stats = &heap->stats;
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_ALLOC_BONUS;
uintptr_t const page_size = heap->page_size;
ffc10fb8: 80 e3 00 10 lwz r7,16(r3)
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
/* Integer overflow occured */
return NULL;
ffc10fbc: 38 60 00 00 li r3,0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc10fc0: 93 61 00 0c stw r27,12(r1)
ffc10fc4: 93 81 00 10 stw r28,16(r1)
ffc10fc8: 93 c1 00 18 stw r30,24(r1)
ffc10fcc: 93 e1 00 1c stw r31,28(r1)
ffc10fd0: 91 81 00 08 stw r12,8(r1)
Heap_Block *block = NULL;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
bool search_again = false;
if ( block_size_floor < alloc_size ) {
ffc10fd4: 41 9d 00 7c bgt- cr7,ffc11050 <_Heap_Allocate_aligned_with_boundary+0xbc>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
ffc10fd8: 2e 06 00 00 cmpwi cr4,r6,0
ffc10fdc: 40 92 01 b8 bne- cr4,ffc11194 <_Heap_Allocate_aligned_with_boundary+0x200>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc10fe0: 80 9d 00 08 lwz r4,8(r29)
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc10fe4: 7f 9d 20 00 cmpw cr7,r29,r4
ffc10fe8: 41 9e 01 c4 beq- cr7,ffc111ac <_Heap_Allocate_aligned_with_boundary+0x218>
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
ffc10fec: 2c 05 00 00 cmpwi r5,0
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc10ff0: 3b c0 00 00 li r30,0
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
ffc10ff4: 3b 67 00 07 addi r27,r7,7
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
ffc10ff8: 23 89 00 04 subfic r28,r9,4
ffc10ffc: 48 00 00 24 b ffc11020 <_Heap_Allocate_aligned_with_boundary+0x8c>
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
if ( alignment == 0 ) {
ffc11000: 40 82 00 7c bne- ffc1107c <_Heap_Allocate_aligned_with_boundary+0xe8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc11004: 3b e4 00 08 addi r31,r4,8
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
ffc11008: 2f 9f 00 00 cmpwi cr7,r31,0
);
}
}
/* Statistics */
++search_count;
ffc1100c: 3b de 00 01 addi r30,r30,1
if ( alloc_begin != 0 ) {
ffc11010: 40 9e 01 3c bne- cr7,ffc1114c <_Heap_Allocate_aligned_with_boundary+0x1b8>
break;
}
block = block->next;
ffc11014: 80 84 00 08 lwz r4,8(r4)
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc11018: 7f 9d 20 00 cmpw cr7,r29,r4
ffc1101c: 41 9e 00 20 beq- cr7,ffc1103c <_Heap_Allocate_aligned_with_boundary+0xa8>
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
ffc11020: 81 64 00 04 lwz r11,4(r4)
ffc11024: 7f 80 58 40 cmplw cr7,r0,r11
ffc11028: 41 bc ff d8 blt- cr7,ffc11000 <_Heap_Allocate_aligned_with_boundary+0x6c>
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
ffc1102c: 80 84 00 08 lwz r4,8(r4)
);
}
}
/* Statistics */
++search_count;
ffc11030: 3b de 00 01 addi r30,r30,1
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc11034: 7f 9d 20 00 cmpw cr7,r29,r4
ffc11038: 40 9e ff e8 bne+ cr7,ffc11020 <_Heap_Allocate_aligned_with_boundary+0x8c>
ffc1103c: 3b e0 00 00 li r31,0
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
ffc11040: 80 1d 00 44 lwz r0,68(r29)
ffc11044: 7f 80 f0 40 cmplw cr7,r0,r30
ffc11048: 41 9c 01 38 blt- cr7,ffc11180 <_Heap_Allocate_aligned_with_boundary+0x1ec>
stats->max_search = search_count;
}
return (void *) alloc_begin;
ffc1104c: 7f e3 fb 78 mr r3,r31
}
ffc11050: 80 01 00 24 lwz r0,36(r1)
ffc11054: 81 81 00 08 lwz r12,8(r1)
ffc11058: 7c 08 03 a6 mtlr r0
ffc1105c: 83 61 00 0c lwz r27,12(r1)
ffc11060: 83 81 00 10 lwz r28,16(r1)
ffc11064: 7d 80 81 20 mtcrf 8,r12
ffc11068: 83 a1 00 14 lwz r29,20(r1)
ffc1106c: 83 c1 00 18 lwz r30,24(r1)
ffc11070: 83 e1 00 1c lwz r31,28(r1)
ffc11074: 38 21 00 20 addi r1,r1,32
ffc11078: 4e 80 00 20 blr
- 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;
ffc1107c: 55 6b 00 3c rlwinm r11,r11,0,0,30
ffc11080: 80 7d 00 14 lwz r3,20(r29)
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
ffc11084: 7d 64 5a 14 add r11,r4,r11
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS;
uintptr_t alloc_begin = alloc_end - alloc_size;
ffc11088: 7f fc 5a 14 add r31,r28,r11
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc1108c: 7f ff 2b 96 divwu r31,r31,r5
ffc11090: 7f ff 29 d6 mullw r31,r31,r5
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
ffc11094: 7d 43 d8 50 subf r10,r3,r27
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
ffc11098: 7d 6a 5a 14 add r11,r10,r11
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
ffc1109c: 7f 8b f8 40 cmplw cr7,r11,r31
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc110a0: 39 84 00 08 addi r12,r4,8
ffc110a4: 40 9c 00 0c bge- cr7,ffc110b0 <_Heap_Allocate_aligned_with_boundary+0x11c>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc110a8: 7d 6b 2b 96 divwu r11,r11,r5
ffc110ac: 7f eb 29 d6 mullw r31,r11,r5
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ffc110b0: 41 92 00 64 beq- cr4,ffc11114 <_Heap_Allocate_aligned_with_boundary+0x180>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
ffc110b4: 7d 5f 4a 14 add r10,r31,r9
ffc110b8: 7d 6a 33 96 divwu r11,r10,r6
ffc110bc: 7d 6b 31 d6 mullw r11,r11,r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc110c0: 7f 9f 58 40 cmplw cr7,r31,r11
ffc110c4: 40 9c 00 50 bge- cr7,ffc11114 <_Heap_Allocate_aligned_with_boundary+0x180>
ffc110c8: 7f 8a 58 40 cmplw cr7,r10,r11
ffc110cc: 40 9d 00 48 ble- cr7,ffc11114 <_Heap_Allocate_aligned_with_boundary+0x180>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
ffc110d0: 7d 0c 4a 14 add r8,r12,r9
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
ffc110d4: 7f 88 58 40 cmplw cr7,r8,r11
return 0;
ffc110d8: 3b e0 00 00 li r31,0
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
ffc110dc: 40 bd 00 10 ble+ cr7,ffc110ec <_Heap_Allocate_aligned_with_boundary+0x158>
ffc110e0: 4b ff ff 28 b ffc11008 <_Heap_Allocate_aligned_with_boundary+0x74>
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc110e4: 40 99 00 30 ble- cr6,ffc11114 <_Heap_Allocate_aligned_with_boundary+0x180>
if ( boundary_line < boundary_floor ) {
ffc110e8: 41 85 00 a4 bgt- cr1,ffc1118c <_Heap_Allocate_aligned_with_boundary+0x1f8><== NEVER TAKEN
return 0;
}
alloc_begin = boundary_line - alloc_size;
ffc110ec: 7f e9 58 50 subf r31,r9,r11
ffc110f0: 7f ff 2b 96 divwu r31,r31,r5
ffc110f4: 7f ff 29 d6 mullw r31,r31,r5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
ffc110f8: 7d 5f 4a 14 add r10,r31,r9
ffc110fc: 7d 6a 33 96 divwu r11,r10,r6
ffc11100: 7d 6b 31 d6 mullw r11,r11,r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc11104: 7f 9f 58 40 cmplw cr7,r31,r11
ffc11108: 7f 0a 58 40 cmplw cr6,r10,r11
if ( boundary_line < boundary_floor ) {
ffc1110c: 7c 88 58 40 cmplw cr1,r8,r11
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
ffc11110: 41 9c ff d4 blt+ cr7,ffc110e4 <_Heap_Allocate_aligned_with_boundary+0x150>
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
ffc11114: 7f 8c f8 40 cmplw cr7,r12,r31
ffc11118: 41 9d 00 74 bgt- cr7,ffc1118c <_Heap_Allocate_aligned_with_boundary+0x1f8>
ffc1111c: 7d 7f 3b 96 divwu r11,r31,r7
ffc11120: 7d 6b 39 d6 mullw r11,r11,r7
ffc11124: 21 44 ff f8 subfic r10,r4,-8
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
ffc11128: 7d 6a 5a 14 add r11,r10,r11
if ( free_size >= min_block_size || free_size == 0 ) {
ffc1112c: 7f 83 58 40 cmplw cr7,r3,r11
ffc11130: 40 bd fe d8 ble- cr7,ffc11008 <_Heap_Allocate_aligned_with_boundary+0x74>
return alloc_begin;
}
}
return 0;
ffc11134: 31 6b ff ff addic r11,r11,-1
ffc11138: 7d 6b 59 10 subfe r11,r11,r11
ffc1113c: 7f ff 58 38 and r31,r31,r11
}
/* Statistics */
++search_count;
if ( alloc_begin != 0 ) {
ffc11140: 2f 9f 00 00 cmpwi cr7,r31,0
);
}
}
/* Statistics */
++search_count;
ffc11144: 3b de 00 01 addi r30,r30,1
if ( alloc_begin != 0 ) {
ffc11148: 41 9e fe cc beq+ cr7,ffc11014 <_Heap_Allocate_aligned_with_boundary+0x80>
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ffc1114c: 81 7d 00 48 lwz r11,72(r29)
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc11150: 7f a3 eb 78 mr r3,r29
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
ffc11154: 80 1d 00 4c lwz r0,76(r29)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc11158: 7f e5 fb 78 mr r5,r31
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ffc1115c: 39 6b 00 01 addi r11,r11,1
stats->searches += search_count;
ffc11160: 7c 00 f2 14 add r0,r0,r30
search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin );
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
ffc11164: 91 7d 00 48 stw r11,72(r29)
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc11168: 7d 26 4b 78 mr r6,r9
} while ( search_again );
if ( alloc_begin != 0 ) {
/* Statistics */
++stats->allocs;
stats->searches += search_count;
ffc1116c: 90 1d 00 4c stw r0,76(r29)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc11170: 4b ff 9a e5 bl ffc0ac54 <_Heap_Block_allocate>
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
ffc11174: 80 1d 00 44 lwz r0,68(r29)
ffc11178: 7f 80 f0 40 cmplw cr7,r0,r30
ffc1117c: 40 bc fe d0 bge- cr7,ffc1104c <_Heap_Allocate_aligned_with_boundary+0xb8>
stats->max_search = search_count;
ffc11180: 93 dd 00 44 stw r30,68(r29)
}
return (void *) alloc_begin;
ffc11184: 7f e3 fb 78 mr r3,r31
ffc11188: 4b ff fe c8 b ffc11050 <_Heap_Allocate_aligned_with_boundary+0xbc>
if ( free_size >= min_block_size || free_size == 0 ) {
return alloc_begin;
}
}
return 0;
ffc1118c: 3b e0 00 00 li r31,0
ffc11190: 4b ff fe 78 b ffc11008 <_Heap_Allocate_aligned_with_boundary+0x74>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
ffc11194: 7f 84 30 40 cmplw cr7,r4,r6
ffc11198: 41 bd fe b8 bgt- cr7,ffc11050 <_Heap_Allocate_aligned_with_boundary+0xbc>
return NULL;
}
if ( alignment == 0 ) {
ffc1119c: 2f 85 00 00 cmpwi cr7,r5,0
ffc111a0: 40 be fe 40 bne- cr7,ffc10fe0 <_Heap_Allocate_aligned_with_boundary+0x4c>
alignment = page_size;
ffc111a4: 7c e5 3b 78 mr r5,r7
ffc111a8: 4b ff fe 38 b ffc10fe0 <_Heap_Allocate_aligned_with_boundary+0x4c>
do {
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
block = _Heap_Free_list_first( heap );
while ( block != free_list_tail ) {
ffc111ac: 3b c0 00 00 li r30,0
ffc111b0: 3b e0 00 00 li r31,0
ffc111b4: 4b ff fe 8c b ffc11040 <_Heap_Allocate_aligned_with_boundary+0xac>
ffc10d94 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc10d94: 94 21 ff c0 stwu r1,-64(r1)
ffc10d98: 7d 80 00 26 mfcr r12
ffc10d9c: 7c 08 02 a6 mflr r0
ffc10da0: 93 a1 00 34 stw r29,52(r1)
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
ffc10da4: 7f a4 2a 14 add r29,r4,r5
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
ffc10da8: 7f 84 e8 40 cmplw cr7,r4,r29
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc10dac: 90 01 00 44 stw r0,68(r1)
ffc10db0: 93 41 00 28 stw r26,40(r1)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
ffc10db4: 3b 40 00 00 li r26,0
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc10db8: 93 c1 00 38 stw r30,56(r1)
ffc10dbc: 7c 7e 1b 78 mr r30,r3
ffc10dc0: 93 01 00 20 stw r24,32(r1)
ffc10dc4: 93 21 00 24 stw r25,36(r1)
ffc10dc8: 7c d9 33 78 mr r25,r6
ffc10dcc: 93 61 00 2c stw r27,44(r1)
ffc10dd0: 93 81 00 30 stw r28,48(r1)
ffc10dd4: 93 e1 00 3c stw r31,60(r1)
ffc10dd8: 7c 9f 23 78 mr r31,r4
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
ffc10ddc: 83 63 00 20 lwz r27,32(r3)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
return false;
ffc10de0: 38 60 00 00 li r3,0
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
ffc10de4: 92 e1 00 1c stw r23,28(r1)
ffc10de8: 91 81 00 18 stw r12,24(r1)
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
ffc10dec: 93 41 00 0c stw r26,12(r1)
Heap_Block *extend_last_block = NULL;
ffc10df0: 93 41 00 08 stw r26,8(r1)
uintptr_t const page_size = heap->page_size;
ffc10df4: 83 9e 00 10 lwz r28,16(r30)
uintptr_t const min_block_size = heap->min_block_size;
ffc10df8: 80 de 00 14 lwz r6,20(r30)
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
ffc10dfc: 83 1e 00 30 lwz r24,48(r30)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
ffc10e00: 40 9d 00 40 ble- cr7,ffc10e40 <_Heap_Extend+0xac>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc10e04: 80 01 00 44 lwz r0,68(r1)
ffc10e08: 81 81 00 18 lwz r12,24(r1)
ffc10e0c: 7c 08 03 a6 mtlr r0
ffc10e10: 82 e1 00 1c lwz r23,28(r1)
ffc10e14: 83 01 00 20 lwz r24,32(r1)
ffc10e18: 7d 81 81 20 mtcrf 24,r12
ffc10e1c: 83 21 00 24 lwz r25,36(r1)
ffc10e20: 83 41 00 28 lwz r26,40(r1)
ffc10e24: 83 61 00 2c lwz r27,44(r1)
ffc10e28: 83 81 00 30 lwz r28,48(r1)
ffc10e2c: 83 a1 00 34 lwz r29,52(r1)
ffc10e30: 83 c1 00 38 lwz r30,56(r1)
ffc10e34: 83 e1 00 3c lwz r31,60(r1)
ffc10e38: 38 21 00 40 addi r1,r1,64
ffc10e3c: 4e 80 00 20 blr
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
ffc10e40: 7c 83 23 78 mr r3,r4
ffc10e44: 38 e1 00 0c addi r7,r1,12
ffc10e48: 7c a4 2b 78 mr r4,r5
ffc10e4c: 39 01 00 08 addi r8,r1,8
ffc10e50: 7f 85 e3 78 mr r5,r28
ffc10e54: 4b ff 98 3d bl ffc0a690 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc10e58: 2f 83 00 00 cmpwi cr7,r3,0
/* For simplicity we reject extend areas that are too small */
return false;
ffc10e5c: 7f 43 d3 78 mr r3,r26
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
ffc10e60: 41 be ff a4 beq- cr7,ffc10e04 <_Heap_Extend+0x70>
ffc10e64: 7f 69 db 78 mr r9,r27
ffc10e68: 3a e0 00 00 li r23,0
ffc10e6c: 38 00 00 00 li r0,0
ffc10e70: 39 00 00 00 li r8,0
ffc10e74: 48 00 00 44 b ffc10eb8 <_Heap_Extend+0x124>
return false;
}
if ( extend_area_end == sub_area_begin ) {
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
ffc10e78: 7f 9d 58 40 cmplw cr7,r29,r11
ffc10e7c: 40 9c 00 08 bge- cr7,ffc10e84 <_Heap_Extend+0xf0>
ffc10e80: 7d 20 4b 78 mr r0,r9
ffc10e84: 7d 4b e3 96 divwu r10,r11,r28
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc10e88: 7f 8b f8 00 cmpw cr7,r11,r31
ffc10e8c: 7d 4a e1 d6 mullw r10,r10,r28
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc10e90: 39 4a ff f8 addi r10,r10,-8
ffc10e94: 41 9e 00 64 beq- cr7,ffc10ef8 <_Heap_Extend+0x164>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
ffc10e98: 7f 9f 58 40 cmplw cr7,r31,r11
ffc10e9c: 40 9d 00 08 ble- cr7,ffc10ea4 <_Heap_Extend+0x110>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
ffc10ea0: 7d 57 53 78 mr r23,r10
- 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;
ffc10ea4: 81 2a 00 04 lwz r9,4(r10)
ffc10ea8: 55 29 00 3c rlwinm r9,r9,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc10eac: 7d 29 52 14 add r9,r9,r10
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
ffc10eb0: 7f 9b 48 00 cmpw cr7,r27,r9
ffc10eb4: 41 9e 00 60 beq- cr7,ffc10f14 <_Heap_Extend+0x180>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
ffc10eb8: 7f 89 d8 00 cmpw cr7,r9,r27
ffc10ebc: 7d 2a 4b 78 mr r10,r9
ffc10ec0: 41 9e 01 b8 beq- cr7,ffc11078 <_Heap_Extend+0x2e4>
uintptr_t const sub_area_end = start_block->prev_size;
ffc10ec4: 81 69 00 00 lwz r11,0(r9)
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
ffc10ec8: 7f 9f 58 40 cmplw cr7,r31,r11
ffc10ecc: 40 9c 00 0c bge- cr7,ffc10ed8 <_Heap_Extend+0x144>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
ffc10ed0: 7f 8a e8 40 cmplw cr7,r10,r29
ffc10ed4: 41 9c 02 28 blt- cr7,ffc110fc <_Heap_Extend+0x368>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc10ed8: 7f 8a e8 00 cmpw cr7,r10,r29
ffc10edc: 40 9e ff 9c bne+ cr7,ffc10e78 <_Heap_Extend+0xe4>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc10ee0: 7d 4b e3 96 divwu r10,r11,r28
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc10ee4: 7f 8b f8 00 cmpw cr7,r11,r31
ffc10ee8: 7d 4a e1 d6 mullw r10,r10,r28
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
ffc10eec: 7d 28 4b 78 mr r8,r9
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc10ef0: 39 4a ff f8 addi r10,r10,-8
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
ffc10ef4: 40 9e ff a4 bne+ cr7,ffc10e98 <_Heap_Extend+0x104> <== ALWAYS TAKEN
start_block->prev_size = extend_area_end;
ffc10ef8: 93 a9 00 00 stw r29,0(r9)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
ffc10efc: 7d 5a 53 78 mr r26,r10
- 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;
ffc10f00: 81 2a 00 04 lwz r9,4(r10)
ffc10f04: 55 29 00 3c rlwinm r9,r9,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc10f08: 7d 29 52 14 add r9,r9,r10
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
ffc10f0c: 7f 9b 48 00 cmpw cr7,r27,r9
ffc10f10: 40 9e ff a8 bne+ cr7,ffc10eb8 <_Heap_Extend+0x124> <== NEVER TAKEN
if ( extend_area_begin < heap->area_begin ) {
ffc10f14: 81 3e 00 18 lwz r9,24(r30)
ffc10f18: 7f 9f 48 40 cmplw cr7,r31,r9
ffc10f1c: 41 9c 01 64 blt- cr7,ffc11080 <_Heap_Extend+0x2ec>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
ffc10f20: 81 3e 00 1c lwz r9,28(r30)
ffc10f24: 7f 9d 48 40 cmplw cr7,r29,r9
ffc10f28: 40 9d 00 08 ble- cr7,ffc10f30 <_Heap_Extend+0x19c>
heap->area_end = extend_area_end;
ffc10f2c: 93 be 00 1c stw r29,28(r30)
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc10f30: 81 5e 00 20 lwz r10,32(r30)
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
ffc10f34: 81 21 00 0c lwz r9,12(r1)
ffc10f38: 81 61 00 08 lwz r11,8(r1)
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc10f3c: 7f 8a 48 40 cmplw cr7,r10,r9
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
ffc10f40: 93 a9 00 00 stw r29,0(r9)
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
ffc10f44: 7d 49 58 50 subf r10,r9,r11
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
ffc10f48: 61 47 00 01 ori r7,r10,1
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
ffc10f4c: 91 4b 00 00 stw r10,0(r11)
extend_last_block->size_and_flag = 0;
ffc10f50: 39 40 00 00 li r10,0
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
ffc10f54: 90 e9 00 04 stw r7,4(r9)
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
ffc10f58: 91 4b 00 04 stw r10,4(r11)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc10f5c: 40 9d 01 58 ble- cr7,ffc110b4 <_Heap_Extend+0x320> <== ALWAYS TAKEN
heap->first_block = extend_first_block;
ffc10f60: 91 3e 00 20 stw r9,32(r30)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
ffc10f64: 2e 08 00 00 cmpwi cr4,r8,0
ffc10f68: 41 92 01 b0 beq- cr4,ffc11118 <_Heap_Extend+0x384>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
ffc10f6c: 80 1e 00 10 lwz r0,16(r30)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
ffc10f70: 3b ff 00 08 addi r31,r31,8
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
ffc10f74: 7d 3f 03 96 divwu r9,r31,r0
ffc10f78: 7d 29 01 d6 mullw r9,r9,r0
if ( remainder != 0 ) {
ffc10f7c: 7d 29 f8 51 subf. r9,r9,r31
ffc10f80: 41 82 00 0c beq- ffc10f8c <_Heap_Extend+0x1f8> <== NEVER TAKEN
return value - remainder + alignment;
ffc10f84: 7f ff 02 14 add r31,r31,r0
ffc10f88: 7f e9 f8 50 subf r31,r9,r31
uintptr_t const new_first_block_begin =
ffc10f8c: 38 9f ff f8 addi r4,r31,-8
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ffc10f90: 81 28 00 00 lwz r9,0(r8)
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
uintptr_t const new_first_block_begin =
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
ffc10f94: 7c 04 40 50 subf r0,r4,r8
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
ffc10f98: 60 00 00 01 ori r0,r0,1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
ffc10f9c: 91 3f ff f8 stw r9,-8(r31)
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Free_block( heap, new_first_block );
ffc10fa0: 7f c3 f3 78 mr r3,r30
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
ffc10fa4: 90 04 00 04 stw r0,4(r4)
_Heap_Free_block( heap, new_first_block );
ffc10fa8: 4b ff fd b1 bl ffc10d58 <_Heap_Free_block>
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
ffc10fac: 2d 9a 00 00 cmpwi cr3,r26,0
ffc10fb0: 41 8e 01 18 beq- cr3,ffc110c8 <_Heap_Extend+0x334>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc10fb4: 81 3e 00 10 lwz r9,16(r30)
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
ffc10fb8: 38 1d ff f8 addi r0,r29,-8
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
ffc10fbc: 7c 1a 00 50 subf r0,r26,r0
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ffc10fc0: 81 7a 00 04 lwz r11,4(r26)
ffc10fc4: 7c 00 4b 96 divwu r0,r0,r9
ffc10fc8: 7c 00 49 d6 mullw r0,r0,r9
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ffc10fcc: 7f c3 f3 78 mr r3,r30
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
ffc10fd0: 7d 60 58 50 subf r11,r0,r11
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc10fd4: 7d 20 d2 14 add r9,r0,r26
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
ffc10fd8: 61 6b 00 01 ori r11,r11,1
page_size
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
ffc10fdc: 91 69 00 04 stw r11,4(r9)
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
ffc10fe0: 7f 44 d3 78 mr r4,r26
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc10fe4: 81 3a 00 04 lwz r9,4(r26)
ffc10fe8: 55 29 07 fe clrlwi r9,r9,31
block->size_and_flag = size | flag;
ffc10fec: 7c 00 4b 78 or r0,r0,r9
ffc10ff0: 90 1a 00 04 stw r0,4(r26)
ffc10ff4: 4b ff fd 65 bl ffc10d58 <_Heap_Free_block>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc10ff8: 41 92 01 0c beq- cr4,ffc11104 <_Heap_Extend+0x370>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
ffc10ffc: 81 3e 00 24 lwz r9,36(r30)
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
ffc11000: 2f 99 00 00 cmpwi cr7,r25,0
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
ffc11004: 81 7e 00 20 lwz r11,32(r30)
*extended_size_ptr = extended_size;
return true;
ffc11008: 38 60 00 01 li r3,1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc1100c: 80 09 00 04 lwz r0,4(r9)
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
ffc11010: 7d 69 58 50 subf r11,r9,r11
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc11014: 54 00 07 fe clrlwi r0,r0,31
block->size_and_flag = size | flag;
ffc11018: 7c 00 5b 78 or r0,r0,r11
ffc1101c: 90 09 00 04 stw r0,4(r9)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
ffc11020: 81 3e 00 30 lwz r9,48(r30)
/* Statistics */
stats->size += extended_size;
ffc11024: 80 1e 00 2c lwz r0,44(r30)
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
ffc11028: 7f 18 48 50 subf r24,r24,r9
/* Statistics */
stats->size += extended_size;
ffc1102c: 7c 00 c2 14 add r0,r0,r24
ffc11030: 90 1e 00 2c stw r0,44(r30)
if ( extended_size_ptr != NULL )
ffc11034: 41 be fd d0 beq- cr7,ffc10e04 <_Heap_Extend+0x70> <== NEVER TAKEN
*extended_size_ptr = extended_size;
return true;
}
ffc11038: 80 01 00 44 lwz r0,68(r1)
ffc1103c: 81 81 00 18 lwz r12,24(r1)
ffc11040: 7c 08 03 a6 mtlr r0
/* Statistics */
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
ffc11044: 93 19 00 00 stw r24,0(r25)
return true;
}
ffc11048: 7d 81 81 20 mtcrf 24,r12
ffc1104c: 82 e1 00 1c lwz r23,28(r1)
ffc11050: 83 01 00 20 lwz r24,32(r1)
ffc11054: 83 21 00 24 lwz r25,36(r1)
ffc11058: 83 41 00 28 lwz r26,40(r1)
ffc1105c: 83 61 00 2c lwz r27,44(r1)
ffc11060: 83 81 00 30 lwz r28,48(r1)
ffc11064: 83 a1 00 34 lwz r29,52(r1)
ffc11068: 83 c1 00 38 lwz r30,56(r1)
ffc1106c: 83 e1 00 3c lwz r31,60(r1)
ffc11070: 38 21 00 40 addi r1,r1,64
ffc11074: 4e 80 00 20 blr
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
ffc11078: 81 5e 00 18 lwz r10,24(r30)
ffc1107c: 4b ff fe 48 b ffc10ec4 <_Heap_Extend+0x130>
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc11080: 81 5e 00 20 lwz r10,32(r30)
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
ffc11084: 81 21 00 0c lwz r9,12(r1)
ffc11088: 81 61 00 08 lwz r11,8(r1)
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc1108c: 7f 8a 48 40 cmplw cr7,r10,r9
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
ffc11090: 93 fe 00 18 stw r31,24(r30)
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
ffc11094: 7d 49 58 50 subf r10,r9,r11
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
ffc11098: 61 47 00 01 ori r7,r10,1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
ffc1109c: 93 a9 00 00 stw r29,0(r9)
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
ffc110a0: 91 4b 00 00 stw r10,0(r11)
extend_last_block->size_and_flag = 0;
ffc110a4: 39 40 00 00 li r10,0
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
ffc110a8: 90 e9 00 04 stw r7,4(r9)
extend_first_block_size | HEAP_PREV_BLOCK_USED;
_Heap_Protection_block_initialize( heap, extend_first_block );
extend_last_block->prev_size = extend_first_block_size;
extend_last_block->size_and_flag = 0;
ffc110ac: 91 4b 00 04 stw r10,4(r11)
_Heap_Protection_block_initialize( heap, extend_last_block );
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
ffc110b0: 41 bd fe b0 bgt- cr7,ffc10f60 <_Heap_Extend+0x1cc> <== ALWAYS TAKEN
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
ffc110b4: 81 3e 00 24 lwz r9,36(r30)
ffc110b8: 7f 89 58 40 cmplw cr7,r9,r11
ffc110bc: 40 bc fe a8 bge- cr7,ffc10f64 <_Heap_Extend+0x1d0>
heap->last_block = extend_last_block;
ffc110c0: 91 7e 00 24 stw r11,36(r30)
ffc110c4: 4b ff fe a0 b ffc10f64 <_Heap_Extend+0x1d0>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
ffc110c8: 2f 97 00 00 cmpwi cr7,r23,0
ffc110cc: 41 be ff 2c beq- cr7,ffc10ff8 <_Heap_Extend+0x264>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
ffc110d0: 81 37 00 04 lwz r9,4(r23)
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
ffc110d4: 80 01 00 0c lwz r0,12(r1)
ffc110d8: 55 29 07 fe clrlwi r9,r9,31
ffc110dc: 7c 17 00 50 subf r0,r23,r0
block->size_and_flag = size | flag;
ffc110e0: 7d 20 03 78 or r0,r9,r0
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
ffc110e4: 81 21 00 08 lwz r9,8(r1)
ffc110e8: 90 17 00 04 stw r0,4(r23)
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
ffc110ec: 80 09 00 04 lwz r0,4(r9)
ffc110f0: 60 00 00 01 ori r0,r0,1
ffc110f4: 90 09 00 04 stw r0,4(r9)
ffc110f8: 4b ff ff 00 b ffc10ff8 <_Heap_Extend+0x264>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
ffc110fc: 38 60 00 00 li r3,0
ffc11100: 4b ff fd 04 b ffc10e04 <_Heap_Extend+0x70>
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
ffc11104: 40 8e fe f8 bne+ cr3,ffc10ffc <_Heap_Extend+0x268>
_Heap_Free_block( heap, extend_first_block );
ffc11108: 80 81 00 0c lwz r4,12(r1)
ffc1110c: 7f c3 f3 78 mr r3,r30
ffc11110: 4b ff fc 49 bl ffc10d58 <_Heap_Free_block>
ffc11114: 4b ff fe e8 b ffc10ffc <_Heap_Extend+0x268>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
ffc11118: 2f 80 00 00 cmpwi cr7,r0,0
ffc1111c: 41 be fe 90 beq- cr7,ffc10fac <_Heap_Extend+0x218>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
ffc11120: 7c 0b 00 50 subf r0,r11,r0
ffc11124: 60 00 00 01 ori r0,r0,1
)
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
ffc11128: 90 0b 00 04 stw r0,4(r11)
ffc1112c: 4b ff fe 80 b ffc10fac <_Heap_Extend+0x218>
ffc111b8 <_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 ) {
ffc111b8: 2c 04 00 00 cmpwi r4,0
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc111bc: 94 21 ff f0 stwu r1,-16(r1)
ffc111c0: 7c 69 1b 78 mr r9,r3
ffc111c4: 93 e1 00 0c stw r31,12(r1)
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
return true;
ffc111c8: 38 60 00 01 li r3,1
/*
* If NULL return true so a free on NULL is considered a valid release. This
* is a special case that could be handled by the in heap check how-ever that
* would result in false being returned which is wrong.
*/
if ( alloc_begin_ptr == NULL ) {
ffc111cc: 41 82 01 44 beq- ffc11310 <_Heap_Free+0x158>
ffc111d0: 80 09 00 10 lwz r0,16(r9)
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;
ffc111d4: 38 60 00 00 li r3,0
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
ffc111d8: 81 69 00 20 lwz r11,32(r9)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc111dc: 7c 84 03 96 divwu r4,r4,r0
ffc111e0: 7c 84 01 d6 mullw r4,r4,r0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
ffc111e4: 38 84 ff f8 addi r4,r4,-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;
ffc111e8: 7f 84 58 40 cmplw cr7,r4,r11
ffc111ec: 41 9c 01 24 blt- cr7,ffc11310 <_Heap_Free+0x158>
ffc111f0: 80 09 00 24 lwz r0,36(r9)
ffc111f4: 7f 84 00 40 cmplw cr7,r4,r0
ffc111f8: 41 9d 01 18 bgt- cr7,ffc11310 <_Heap_Free+0x158>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc111fc: 81 04 00 04 lwz r8,4(r4)
- 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;
ffc11200: 55 07 00 3c rlwinm r7,r8,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);
ffc11204: 7d 47 22 14 add r10,r7,r4
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;
ffc11208: 7f 8b 50 40 cmplw cr7,r11,r10
ffc1120c: 41 9d 01 04 bgt- cr7,ffc11310 <_Heap_Free+0x158> <== NEVER TAKEN
ffc11210: 7f 80 50 40 cmplw cr7,r0,r10
ffc11214: 41 9c 00 fc blt- cr7,ffc11310 <_Heap_Free+0x158>
ffc11218: 80 ca 00 04 lwz r6,4(r10)
return false;
}
_Heap_Protection_block_check( heap, next_block );
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc1121c: 70 c5 00 01 andi. r5,r6,1
ffc11220: 41 82 00 f0 beq- ffc11310 <_Heap_Free+0x158>
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 ));
ffc11224: 7f 80 50 00 cmpw cr7,r0,r10
- 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;
ffc11228: 54 c5 00 3c rlwinm r5,r6,0,0,30
ffc1122c: 38 c0 00 00 li r6,0
ffc11230: 41 9e 00 18 beq- cr7,ffc11248 <_Heap_Free+0x90>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc11234: 7c ca 2a 14 add r6,r10,r5
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;
ffc11238: 80 c6 00 04 lwz r6,4(r6)
return do_free;
}
#endif
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
ffc1123c: 70 c3 00 01 andi. r3,r6,1
ffc11240: 7c c0 00 26 mfcr r6
ffc11244: 54 c6 1f fe rlwinm r6,r6,3,31,31
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
ffc11248: 71 08 00 01 andi. r8,r8,1
ffc1124c: 40 82 00 6c bne- ffc112b8 <_Heap_Free+0x100>
uintptr_t const prev_size = block->prev_size;
ffc11250: 83 e4 00 00 lwz r31,0(r4)
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
_HAssert( false );
return( false );
ffc11254: 38 60 00 00 li r3,0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc11258: 7d 9f 20 50 subf r12,r31,r4
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;
ffc1125c: 7f 8b 60 40 cmplw cr7,r11,r12
ffc11260: 41 9d 00 b0 bgt- cr7,ffc11310 <_Heap_Free+0x158> <== NEVER TAKEN
ffc11264: 7f 80 60 40 cmplw cr7,r0,r12
ffc11268: 7d 03 43 78 mr r3,r8
ffc1126c: 41 9c 00 a4 blt- cr7,ffc11310 <_Heap_Free+0x158> <== 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;
ffc11270: 80 0c 00 04 lwz r0,4(r12)
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
ffc11274: 70 0b 00 01 andi. r11,r0,1
ffc11278: 41 82 00 98 beq- ffc11310 <_Heap_Free+0x158> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc1127c: 2f 86 00 00 cmpwi cr7,r6,0
ffc11280: 41 9e 00 e8 beq- cr7,ffc11368 <_Heap_Free+0x1b0>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc11284: 81 09 00 38 lwz r8,56(r9)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc11288: 7f e7 fa 14 add r31,r7,r31
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc1128c: 81 6a 00 08 lwz r11,8(r10)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc11290: 7c bf 2a 14 add r5,r31,r5
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc11294: 81 4a 00 0c lwz r10,12(r10)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc11298: 39 08 ff ff addi r8,r8,-1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc1129c: 60 a0 00 01 ori r0,r5,1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
ffc112a0: 91 6a 00 08 stw r11,8(r10)
next->prev = prev;
ffc112a4: 91 4b 00 0c stw r10,12(r11)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc112a8: 91 09 00 38 stw r8,56(r9)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc112ac: 90 0c 00 04 stw r0,4(r12)
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
ffc112b0: 7c a5 61 2e stwx r5,r5,r12
ffc112b4: 48 00 00 34 b ffc112e8 <_Heap_Free+0x130>
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc112b8: 2f 86 00 00 cmpwi cr7,r6,0
ffc112bc: 41 9e 00 60 beq- cr7,ffc1131c <_Heap_Free+0x164>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc112c0: 81 6a 00 08 lwz r11,8(r10)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
ffc112c4: 7c a5 3a 14 add r5,r5,r7
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
ffc112c8: 81 4a 00 0c lwz r10,12(r10)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc112cc: 60 a0 00 01 ori r0,r5,1
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
ffc112d0: 91 64 00 08 stw r11,8(r4)
new_block->prev = prev;
ffc112d4: 91 44 00 0c stw r10,12(r4)
next->prev = new_block;
prev->next = new_block;
ffc112d8: 90 8a 00 08 stw r4,8(r10)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc112dc: 90 8b 00 0c stw r4,12(r11)
ffc112e0: 90 04 00 04 stw r0,4(r4)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc112e4: 7c a5 21 2e stwx r5,r5,r4
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc112e8: 81 69 00 40 lwz r11,64(r9)
++stats->frees;
stats->free_size += block_size;
return( true );
ffc112ec: 38 60 00 01 li r3,1
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc112f0: 81 09 00 50 lwz r8,80(r9)
stats->free_size += block_size;
ffc112f4: 81 49 00 30 lwz r10,48(r9)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc112f8: 39 6b ff ff addi r11,r11,-1
++stats->frees;
ffc112fc: 38 08 00 01 addi r0,r8,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc11300: 91 69 00 40 stw r11,64(r9)
++stats->frees;
stats->free_size += block_size;
ffc11304: 7c ea 3a 14 add r7,r10,r7
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc11308: 90 09 00 50 stw r0,80(r9)
stats->free_size += block_size;
ffc1130c: 90 e9 00 30 stw r7,48(r9)
return( true );
}
ffc11310: 83 e1 00 0c lwz r31,12(r1)
ffc11314: 38 21 00 10 addi r1,r1,16
ffc11318: 4e 80 00 20 blr
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;
ffc1131c: 81 09 00 38 lwz r8,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc11320: 81 69 00 3c lwz r11,60(r9)
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc11324: 38 08 00 01 addi r0,r8,1
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
ffc11328: 91 24 00 0c stw r9,12(r4)
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
ffc1132c: 60 e8 00 01 ori r8,r7,1
ffc11330: 91 04 00 04 stw r8,4(r4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc11334: 7f 80 58 40 cmplw cr7,r0,r11
} 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;
ffc11338: 81 0a 00 04 lwz r8,4(r10)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc1133c: 81 69 00 08 lwz r11,8(r9)
ffc11340: 55 08 00 3c rlwinm r8,r8,0,0,30
next_block->prev_size = block_size;
ffc11344: 7c e7 21 2e stwx r7,r7,r4
new_block->next = next;
ffc11348: 91 64 00 08 stw r11,8(r4)
} 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;
ffc1134c: 91 0a 00 04 stw r8,4(r10)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
ffc11350: 90 8b 00 0c stw r4,12(r11)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc11354: 90 89 00 08 stw r4,8(r9)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc11358: 90 09 00 38 stw r0,56(r9)
if ( stats->max_free_blocks < stats->free_blocks ) {
ffc1135c: 40 bd ff 8c ble- cr7,ffc112e8 <_Heap_Free+0x130>
stats->max_free_blocks = stats->free_blocks;
ffc11360: 90 09 00 3c stw r0,60(r9)
ffc11364: 4b ff ff 84 b ffc112e8 <_Heap_Free+0x130>
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
ffc11368: 7f e7 fa 14 add r31,r7,r31
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc1136c: 63 e0 00 01 ori r0,r31,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc11370: 7f e7 21 2e stwx r31,r7,r4
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;
ffc11374: 90 0c 00 04 stw r0,4(r12)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc11378: 80 0a 00 04 lwz r0,4(r10)
ffc1137c: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc11380: 90 0a 00 04 stw r0,4(r10)
ffc11384: 4b ff ff 64 b ffc112e8 <_Heap_Free+0x130>
ffc0b3f8 <_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;
ffc0b3f8: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc0b3fc: 94 21 ff 98 stwu r1,-104(r1)
ffc0b400: 7c 08 02 a6 mflr r0
ffc0b404: 92 e1 00 44 stw r23,68(r1)
ffc0b408: 90 01 00 6c stw r0,108(r1)
ffc0b40c: 93 01 00 48 stw r24,72(r1)
ffc0b410: 93 21 00 4c stw r25,76(r1)
ffc0b414: 7c 99 23 78 mr r25,r4
ffc0b418: 93 41 00 50 stw r26,80(r1)
ffc0b41c: 93 61 00 54 stw r27,84(r1)
ffc0b420: 93 e1 00 64 stw r31,100(r1)
ffc0b424: 7c 7f 1b 78 mr r31,r3
ffc0b428: 91 c1 00 20 stw r14,32(r1)
ffc0b42c: 91 e1 00 24 stw r15,36(r1)
ffc0b430: 92 01 00 28 stw r16,40(r1)
ffc0b434: 92 21 00 2c stw r17,44(r1)
ffc0b438: 92 41 00 30 stw r18,48(r1)
ffc0b43c: 92 61 00 34 stw r19,52(r1)
ffc0b440: 92 81 00 38 stw r20,56(r1)
ffc0b444: 92 a1 00 3c stw r21,60(r1)
ffc0b448: 92 c1 00 40 stw r22,64(r1)
ffc0b44c: 93 81 00 58 stw r28,88(r1)
ffc0b450: 93 a1 00 5c stw r29,92(r1)
ffc0b454: 93 c1 00 60 stw r30,96(r1)
uintptr_t const page_size = heap->page_size;
ffc0b458: 83 63 00 10 lwz r27,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0b45c: 83 03 00 14 lwz r24,20(r3)
Heap_Block *const first_block = heap->first_block;
ffc0b460: 83 43 00 20 lwz r26,32(r3)
Heap_Block *const last_block = heap->last_block;
ffc0b464: 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;
ffc0b468: 41 9e 00 7c beq- cr7,ffc0b4e4 <_Heap_Walk+0xec>
ffc0b46c: 3d 20 ff c1 lis r9,-63
ffc0b470: 39 29 b2 f8 addi r9,r9,-19720
ffc0b474: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b478: 3d 20 00 00 lis r9,0
return true;
ffc0b47c: 38 60 00 01 li r3,1
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b480: 80 09 28 24 lwz r0,10276(r9)
ffc0b484: 2f 80 00 03 cmpwi cr7,r0,3
ffc0b488: 41 9e 00 7c beq- cr7,ffc0b504 <_Heap_Walk+0x10c> <== ALWAYS TAKEN
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b48c: 80 01 00 6c lwz r0,108(r1)
ffc0b490: 81 c1 00 20 lwz r14,32(r1)
ffc0b494: 7c 08 03 a6 mtlr r0
ffc0b498: 81 e1 00 24 lwz r15,36(r1)
ffc0b49c: 82 01 00 28 lwz r16,40(r1)
ffc0b4a0: 82 21 00 2c lwz r17,44(r1)
ffc0b4a4: 82 41 00 30 lwz r18,48(r1)
ffc0b4a8: 82 61 00 34 lwz r19,52(r1)
ffc0b4ac: 82 81 00 38 lwz r20,56(r1)
ffc0b4b0: 82 a1 00 3c lwz r21,60(r1)
ffc0b4b4: 82 c1 00 40 lwz r22,64(r1)
ffc0b4b8: 82 e1 00 44 lwz r23,68(r1)
ffc0b4bc: 83 01 00 48 lwz r24,72(r1)
ffc0b4c0: 83 21 00 4c lwz r25,76(r1)
ffc0b4c4: 83 41 00 50 lwz r26,80(r1)
ffc0b4c8: 83 61 00 54 lwz r27,84(r1)
ffc0b4cc: 83 81 00 58 lwz r28,88(r1)
ffc0b4d0: 83 a1 00 5c lwz r29,92(r1)
ffc0b4d4: 83 c1 00 60 lwz r30,96(r1)
ffc0b4d8: 83 e1 00 64 lwz r31,100(r1)
ffc0b4dc: 38 21 00 68 addi r1,r1,104
ffc0b4e0: 4e 80 00 20 blr
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;
ffc0b4e4: 3d 20 ff c1 lis r9,-63
ffc0b4e8: 39 29 b2 f4 addi r9,r9,-19724
ffc0b4ec: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b4f0: 3d 20 00 00 lis r9,0
return true;
ffc0b4f4: 38 60 00 01 li r3,1
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0b4f8: 80 09 28 24 lwz r0,10276(r9)
ffc0b4fc: 2f 80 00 03 cmpwi cr7,r0,3
ffc0b500: 40 9e ff 8c bne+ cr7,ffc0b48c <_Heap_Walk+0x94>
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)(
ffc0b504: 80 1f 00 0c lwz r0,12(r31)
ffc0b508: 3c a0 ff c2 lis r5,-62
ffc0b50c: 81 1f 00 18 lwz r8,24(r31)
ffc0b510: 7f 23 cb 78 mr r3,r25
ffc0b514: 81 3f 00 1c lwz r9,28(r31)
ffc0b518: 38 80 00 00 li r4,0
ffc0b51c: 81 7f 00 08 lwz r11,8(r31)
ffc0b520: 38 a5 b9 9c addi r5,r5,-18020
ffc0b524: 90 01 00 10 stw r0,16(r1)
ffc0b528: 7f 66 db 78 mr r6,r27
ffc0b52c: 7f 07 c3 78 mr r7,r24
ffc0b530: 80 01 00 18 lwz r0,24(r1)
ffc0b534: 7f 4a d3 78 mr r10,r26
ffc0b538: 92 e1 00 08 stw r23,8(r1)
ffc0b53c: 7c 09 03 a6 mtctr r0
ffc0b540: 91 61 00 0c stw r11,12(r1)
ffc0b544: 4c c6 31 82 crclr 4*cr1+eq
ffc0b548: 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 ) {
ffc0b54c: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0b550: 41 9e 00 ac beq- cr7,ffc0b5fc <_Heap_Walk+0x204>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0b554: 73 67 00 07 andi. r7,r27,7
ffc0b558: 40 82 00 cc bne- ffc0b624 <_Heap_Walk+0x22c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b55c: 7c 18 db 96 divwu r0,r24,r27
ffc0b560: 7c 00 d9 d6 mullw r0,r0,r27
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0b564: 7f 98 00 00 cmpw cr7,r24,r0
ffc0b568: 40 9e 00 e8 bne- cr7,ffc0b650 <_Heap_Walk+0x258>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0b56c: 38 1a 00 08 addi r0,r26,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b570: 7d 20 db 96 divwu r9,r0,r27
ffc0b574: 7d 29 d9 d6 mullw r9,r9,r27
);
return false;
}
if (
ffc0b578: 7f 80 48 00 cmpw cr7,r0,r9
ffc0b57c: 40 9e 01 00 bne- cr7,ffc0b67c <_Heap_Walk+0x284>
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b580: 82 da 00 04 lwz r22,4(r26)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0b584: 72 c7 00 01 andi. r7,r22,1
ffc0b588: 41 82 01 20 beq- ffc0b6a8 <_Heap_Walk+0x2b0>
- 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;
ffc0b58c: 81 37 00 04 lwz r9,4(r23)
ffc0b590: 55 29 00 3c rlwinm r9,r9,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0b594: 7d 37 4a 14 add r9,r23,r9
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;
ffc0b598: 80 09 00 04 lwz r0,4(r9)
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc0b59c: 70 07 00 01 andi. r7,r0,1
ffc0b5a0: 41 82 00 34 beq- ffc0b5d4 <_Heap_Walk+0x1dc>
);
return false;
}
if (
ffc0b5a4: 7f 9a 48 00 cmpw cr7,r26,r9
ffc0b5a8: 41 9e 01 28 beq- cr7,ffc0b6d0 <_Heap_Walk+0x2d8>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
ffc0b5ac: 80 01 00 18 lwz r0,24(r1)
ffc0b5b0: 3c a0 ff c2 lis r5,-62
ffc0b5b4: 7f 23 cb 78 mr r3,r25
ffc0b5b8: 38 80 00 01 li r4,1
ffc0b5bc: 7c 09 03 a6 mtctr r0
ffc0b5c0: 38 a5 bb 04 addi r5,r5,-17660
ffc0b5c4: 4c c6 31 82 crclr 4*cr1+eq
ffc0b5c8: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b5cc: 38 60 00 00 li r3,0
ffc0b5d0: 4b ff fe bc b ffc0b48c <_Heap_Walk+0x94>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
ffc0b5d4: 80 01 00 18 lwz r0,24(r1)
ffc0b5d8: 3c a0 ff c2 lis r5,-62
ffc0b5dc: 7f 23 cb 78 mr r3,r25
ffc0b5e0: 38 80 00 01 li r4,1
ffc0b5e4: 7c 09 03 a6 mtctr r0
ffc0b5e8: 38 a5 ba ec addi r5,r5,-17684
ffc0b5ec: 4c c6 31 82 crclr 4*cr1+eq
ffc0b5f0: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b5f4: 38 60 00 00 li r3,0
ffc0b5f8: 4b ff fe 94 b ffc0b48c <_Heap_Walk+0x94>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
ffc0b5fc: 80 01 00 18 lwz r0,24(r1)
ffc0b600: 3c a0 ff c2 lis r5,-62
ffc0b604: 7f 23 cb 78 mr r3,r25
ffc0b608: 38 80 00 01 li r4,1
ffc0b60c: 7c 09 03 a6 mtctr r0
ffc0b610: 38 a5 ba 30 addi r5,r5,-17872
ffc0b614: 4c c6 31 82 crclr 4*cr1+eq
ffc0b618: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b61c: 38 60 00 00 li r3,0
ffc0b620: 4b ff fe 6c b ffc0b48c <_Heap_Walk+0x94>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
ffc0b624: 80 01 00 18 lwz r0,24(r1)
ffc0b628: 3c a0 ff c2 lis r5,-62
ffc0b62c: 7f 23 cb 78 mr r3,r25
ffc0b630: 38 80 00 01 li r4,1
ffc0b634: 7c 09 03 a6 mtctr r0
ffc0b638: 38 a5 ba 44 addi r5,r5,-17852
ffc0b63c: 7f 66 db 78 mr r6,r27
ffc0b640: 4c c6 31 82 crclr 4*cr1+eq
ffc0b644: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b648: 38 60 00 00 li r3,0
ffc0b64c: 4b ff fe 40 b ffc0b48c <_Heap_Walk+0x94>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
ffc0b650: 80 01 00 18 lwz r0,24(r1)
ffc0b654: 3c a0 ff c2 lis r5,-62
ffc0b658: 7f 23 cb 78 mr r3,r25
ffc0b65c: 38 80 00 01 li r4,1
ffc0b660: 7c 09 03 a6 mtctr r0
ffc0b664: 38 a5 ba 64 addi r5,r5,-17820
ffc0b668: 7f 06 c3 78 mr r6,r24
ffc0b66c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b670: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b674: 38 60 00 00 li r3,0
ffc0b678: 4b ff fe 14 b ffc0b48c <_Heap_Walk+0x94>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc0b67c: 80 01 00 18 lwz r0,24(r1)
ffc0b680: 3c a0 ff c2 lis r5,-62
ffc0b684: 7f 23 cb 78 mr r3,r25
ffc0b688: 38 80 00 01 li r4,1
ffc0b68c: 7c 09 03 a6 mtctr r0
ffc0b690: 38 a5 ba 88 addi r5,r5,-17784
ffc0b694: 7f 46 d3 78 mr r6,r26
ffc0b698: 4c c6 31 82 crclr 4*cr1+eq
ffc0b69c: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b6a0: 38 60 00 00 li r3,0
ffc0b6a4: 4b ff fd e8 b ffc0b48c <_Heap_Walk+0x94>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
ffc0b6a8: 80 01 00 18 lwz r0,24(r1)
ffc0b6ac: 3c a0 ff c2 lis r5,-62
ffc0b6b0: 7f 23 cb 78 mr r3,r25
ffc0b6b4: 38 80 00 01 li r4,1
ffc0b6b8: 7c 09 03 a6 mtctr r0
ffc0b6bc: 38 a5 ba bc addi r5,r5,-17732
ffc0b6c0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b6c4: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b6c8: 38 60 00 00 li r3,0
ffc0b6cc: 4b ff fd c0 b ffc0b48c <_Heap_Walk+0x94>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0b6d0: 80 df 00 08 lwz r6,8(r31)
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc0b6d4: 81 1f 00 10 lwz r8,16(r31)
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 ) {
ffc0b6d8: 7f 9f 30 00 cmpw cr7,r31,r6
block = next_block;
} while ( block != first_block );
return true;
}
ffc0b6dc: 80 1f 00 20 lwz r0,32(r31)
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 ) {
ffc0b6e0: 41 9e 00 34 beq- cr7,ffc0b714 <_Heap_Walk+0x31c>
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;
ffc0b6e4: 7f 80 30 40 cmplw cr7,r0,r6
ffc0b6e8: 40 9d 03 24 ble- cr7,ffc0ba0c <_Heap_Walk+0x614> <== ALWAYS TAKEN
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
(*printer)(
ffc0b6ec: 80 01 00 18 lwz r0,24(r1)
ffc0b6f0: 3c a0 ff c2 lis r5,-62
ffc0b6f4: 7f 23 cb 78 mr r3,r25
ffc0b6f8: 38 80 00 01 li r4,1
ffc0b6fc: 7c 09 03 a6 mtctr r0
ffc0b700: 38 a5 bb 34 addi r5,r5,-17612
ffc0b704: 4c c6 31 82 crclr 4*cr1+eq
ffc0b708: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0b70c: 38 60 00 00 li r3,0
ffc0b710: 4b ff fd 7c b ffc0b48c <_Heap_Walk+0x94>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b714: 3e 60 ff c2 lis r19,-62
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0b718: 3e 80 ff c2 lis r20,-62
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)(
ffc0b71c: 3e 40 ff c2 lis r18,-62
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0b720: 7f 5d d3 78 mr r29,r26
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b724: 3a 73 bd 50 addi r19,r19,-17072
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
(*printer)(
ffc0b728: 3a 94 bd 38 addi r20,r20,-17096
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)(
ffc0b72c: 3a 52 bc 94 addi r18,r18,-17260
ffc0b730: 3e 20 ff c2 lis r17,-62
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0b734: 3e a0 ff c2 lis r21,-62
ffc0b738: 3d e0 ff c2 lis r15,-62
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)(
ffc0b73c: 3e 00 ff c2 lis r16,-62
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0b740: 3d c0 ff c2 lis r14,-62
- 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;
ffc0b744: 56 dc 00 3c rlwinm r28,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);
ffc0b748: 7f dc ea 14 add r30,r28,r29
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
ffc0b74c: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0b750: 40 9d 00 34 ble- cr7,ffc0b784 <_Heap_Walk+0x38c> <== ALWAYS TAKEN
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
ffc0b754: 3c a0 ff c2 lis r5,-62
ffc0b758: 7f 23 cb 78 mr r3,r25
ffc0b75c: 38 80 00 01 li r4,1
ffc0b760: 38 a5 bb d4 addi r5,r5,-17452
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
ffc0b764: 80 01 00 18 lwz r0,24(r1)
ffc0b768: 7f a6 eb 78 mr r6,r29
ffc0b76c: 7f c7 f3 78 mr r7,r30
ffc0b770: 7c 09 03 a6 mtctr r0
ffc0b774: 4c c6 31 82 crclr 4*cr1+eq
ffc0b778: 4e 80 04 21 bctrl
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
ffc0b77c: 38 60 00 00 li r3,0
ffc0b780: 4b ff fd 0c b ffc0b48c <_Heap_Walk+0x94>
ffc0b784: 80 1f 00 24 lwz r0,36(r31)
ffc0b788: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0b78c: 41 bc ff c8 blt- cr7,ffc0b754 <_Heap_Walk+0x35c>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0b790: 7d 3c db 96 divwu r9,r28,r27
ffc0b794: 7d 29 d9 d6 mullw r9,r9,r27
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;
ffc0b798: 7f a0 ba 78 xor r0,r29,r23
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0b79c: 7f 9c 48 00 cmpw cr7,r28,r9
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
ffc0b7a0: 7c 00 00 34 cntlzw r0,r0
ffc0b7a4: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc0b7a8: 68 00 00 01 xori r0,r0,1
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
ffc0b7ac: 41 9e 00 0c beq- cr7,ffc0b7b8 <_Heap_Walk+0x3c0>
ffc0b7b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b7b4: 40 9e 01 e0 bne- cr7,ffc0b994 <_Heap_Walk+0x59c>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
ffc0b7b8: 7f 98 e0 40 cmplw cr7,r24,r28
ffc0b7bc: 40 9d 00 0c ble- cr7,ffc0b7c8 <_Heap_Walk+0x3d0>
ffc0b7c0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b7c4: 40 9e 02 00 bne- cr7,ffc0b9c4 <_Heap_Walk+0x5cc> <== ALWAYS TAKEN
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
ffc0b7c8: 7f 9d f0 40 cmplw cr7,r29,r30
ffc0b7cc: 41 9c 00 0c blt- cr7,ffc0b7d8 <_Heap_Walk+0x3e0>
ffc0b7d0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b7d4: 40 9e 02 24 bne- cr7,ffc0b9f8 <_Heap_Walk+0x600>
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;
ffc0b7d8: 80 1e 00 04 lwz r0,4(r30)
ffc0b7dc: 56 d6 07 fe clrlwi r22,r22,31
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0b7e0: 70 07 00 01 andi. r7,r0,1
ffc0b7e4: 41 82 00 74 beq- ffc0b858 <_Heap_Walk+0x460>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
ffc0b7e8: 2f 96 00 00 cmpwi cr7,r22,0
ffc0b7ec: 41 9e 00 40 beq- cr7,ffc0b82c <_Heap_Walk+0x434>
(*printer)(
ffc0b7f0: 80 01 00 18 lwz r0,24(r1)
ffc0b7f4: 7f 23 cb 78 mr r3,r25
ffc0b7f8: 38 80 00 00 li r4,0
ffc0b7fc: 7e 85 a3 78 mr r5,r20
ffc0b800: 7c 09 03 a6 mtctr r0
ffc0b804: 7f a6 eb 78 mr r6,r29
ffc0b808: 7f 87 e3 78 mr r7,r28
ffc0b80c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b810: 4e 80 04 21 bctrl
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
ffc0b814: 7f 9a f0 00 cmpw cr7,r26,r30
ffc0b818: 41 9e 01 0c beq- cr7,ffc0b924 <_Heap_Walk+0x52c>
ffc0b81c: 82 de 00 04 lwz r22,4(r30)
ffc0b820: 7f dd f3 78 mr r29,r30
ffc0b824: 80 1f 00 20 lwz r0,32(r31)
ffc0b828: 4b ff ff 1c b ffc0b744 <_Heap_Walk+0x34c>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0b82c: 80 01 00 18 lwz r0,24(r1)
ffc0b830: 7f a6 eb 78 mr r6,r29
ffc0b834: 7f 23 cb 78 mr r3,r25
ffc0b838: 81 1d 00 00 lwz r8,0(r29)
ffc0b83c: 38 80 00 00 li r4,0
ffc0b840: 7c 09 03 a6 mtctr r0
ffc0b844: 7e 65 9b 78 mr r5,r19
ffc0b848: 7f 87 e3 78 mr r7,r28
ffc0b84c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b850: 4e 80 04 21 bctrl
ffc0b854: 4b ff ff c0 b ffc0b814 <_Heap_Walk+0x41c>
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 ?
ffc0b858: 81 1d 00 0c lwz r8,12(r29)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc0b85c: 81 3f 00 08 lwz r9,8(r31)
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;
ffc0b860: 80 1f 00 0c lwz r0,12(r31)
ffc0b864: 7f 89 40 00 cmpw cr7,r9,r8
ffc0b868: 41 9e 00 f8 beq- cr7,ffc0b960 <_Heap_Walk+0x568>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0b86c: 7f 9f 40 00 cmpw cr7,r31,r8
ffc0b870: 41 9e 01 00 beq- cr7,ffc0b970 <_Heap_Walk+0x578>
ffc0b874: 39 35 bd 04 addi r9,r21,-17148
block->next,
block->next == last_free_block ?
ffc0b878: 81 5d 00 08 lwz r10,8(r29)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
ffc0b87c: 7f 80 50 00 cmpw cr7,r0,r10
ffc0b880: 41 9e 00 e8 beq- cr7,ffc0b968 <_Heap_Walk+0x570>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0b884: 7f 9f 50 00 cmpw cr7,r31,r10
ffc0b888: 41 9e 00 f0 beq- cr7,ffc0b978 <_Heap_Walk+0x580>
ffc0b88c: 38 15 bd 04 addi r0,r21,-17148
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)(
ffc0b890: 90 01 00 08 stw r0,8(r1)
ffc0b894: 7f 23 cb 78 mr r3,r25
ffc0b898: 38 80 00 00 li r4,0
ffc0b89c: 80 01 00 18 lwz r0,24(r1)
ffc0b8a0: 7e 45 93 78 mr r5,r18
ffc0b8a4: 7f a6 eb 78 mr r6,r29
ffc0b8a8: 7f 87 e3 78 mr r7,r28
ffc0b8ac: 7c 09 03 a6 mtctr r0
ffc0b8b0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b8b4: 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 ) {
ffc0b8b8: 81 1e 00 00 lwz r8,0(r30)
ffc0b8bc: 7f 9c 40 00 cmpw cr7,r28,r8
ffc0b8c0: 40 9e 00 6c bne- cr7,ffc0b92c <_Heap_Walk+0x534>
);
return false;
}
if ( !prev_used ) {
ffc0b8c4: 2f 96 00 00 cmpwi cr7,r22,0
ffc0b8c8: 41 9e 00 b8 beq- cr7,ffc0b980 <_Heap_Walk+0x588>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0b8cc: 81 3f 00 08 lwz r9,8(r31)
)
{
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 ) {
ffc0b8d0: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0b8d4: 41 9e 00 24 beq- cr7,ffc0b8f8 <_Heap_Walk+0x500> <== NEVER TAKEN
if ( free_block == block ) {
ffc0b8d8: 7f 9d 48 00 cmpw cr7,r29,r9
ffc0b8dc: 40 be 00 0c bne+ cr7,ffc0b8e8 <_Heap_Walk+0x4f0>
ffc0b8e0: 4b ff ff 34 b ffc0b814 <_Heap_Walk+0x41c>
ffc0b8e4: 41 ba ff 30 beq- cr6,ffc0b814 <_Heap_Walk+0x41c>
return true;
}
free_block = free_block->next;
ffc0b8e8: 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 ) {
ffc0b8ec: 7f 9f 48 00 cmpw cr7,r31,r9
if ( free_block == block ) {
ffc0b8f0: 7f 1d 48 00 cmpw cr6,r29,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 ) {
ffc0b8f4: 40 9e ff f0 bne+ cr7,ffc0b8e4 <_Heap_Walk+0x4ec>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0b8f8: 3c a0 ff c2 lis r5,-62
ffc0b8fc: 7f 23 cb 78 mr r3,r25
ffc0b900: 38 80 00 01 li r4,1
ffc0b904: 38 a5 bd 78 addi r5,r5,-17032
ffc0b908: 80 01 00 18 lwz r0,24(r1)
ffc0b90c: 7f a6 eb 78 mr r6,r29
ffc0b910: 7c 09 03 a6 mtctr r0
ffc0b914: 4c c6 31 82 crclr 4*cr1+eq
ffc0b918: 4e 80 04 21 bctrl
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
ffc0b91c: 38 60 00 00 li r3,0
ffc0b920: 4b ff fb 6c b ffc0b48c <_Heap_Walk+0x94>
}
block = next_block;
} while ( block != first_block );
return true;
ffc0b924: 38 60 00 01 li r3,1
ffc0b928: 4b ff fb 64 b ffc0b48c <_Heap_Walk+0x94>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
ffc0b92c: 80 01 00 18 lwz r0,24(r1)
ffc0b930: 3c a0 ff c2 lis r5,-62
ffc0b934: 7f 23 cb 78 mr r3,r25
ffc0b938: 38 80 00 01 li r4,1
ffc0b93c: 7c 09 03 a6 mtctr r0
ffc0b940: 38 a5 bc cc addi r5,r5,-17204
ffc0b944: 7f a6 eb 78 mr r6,r29
ffc0b948: 7f 87 e3 78 mr r7,r28
ffc0b94c: 7f c9 f3 78 mr r9,r30
ffc0b950: 4c c6 31 82 crclr 4*cr1+eq
ffc0b954: 4e 80 04 21 bctrl
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
ffc0b958: 38 60 00 00 li r3,0
ffc0b95c: 4b ff fb 30 b ffc0b48c <_Heap_Walk+0x94>
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)(
ffc0b960: 39 30 b9 64 addi r9,r16,-18076
ffc0b964: 4b ff ff 14 b ffc0b878 <_Heap_Walk+0x480>
ffc0b968: 38 11 b9 80 addi r0,r17,-18048
ffc0b96c: 4b ff ff 24 b ffc0b890 <_Heap_Walk+0x498>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0b970: 39 2e b9 74 addi r9,r14,-18060
ffc0b974: 4b ff ff 04 b ffc0b878 <_Heap_Walk+0x480>
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0b978: 38 0f b9 90 addi r0,r15,-18032
ffc0b97c: 4b ff ff 14 b ffc0b890 <_Heap_Walk+0x498>
return false;
}
if ( !prev_used ) {
(*printer)(
ffc0b980: 3c a0 ff c2 lis r5,-62
ffc0b984: 7f 23 cb 78 mr r3,r25
ffc0b988: 38 80 00 01 li r4,1
ffc0b98c: 38 a5 bd 08 addi r5,r5,-17144
ffc0b990: 4b ff ff 78 b ffc0b908 <_Heap_Walk+0x510>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
ffc0b994: 80 01 00 18 lwz r0,24(r1)
ffc0b998: 3c a0 ff c2 lis r5,-62
ffc0b99c: 7f 23 cb 78 mr r3,r25
ffc0b9a0: 38 80 00 01 li r4,1
ffc0b9a4: 7c 09 03 a6 mtctr r0
ffc0b9a8: 38 a5 bc 04 addi r5,r5,-17404
ffc0b9ac: 7f a6 eb 78 mr r6,r29
ffc0b9b0: 7f 87 e3 78 mr r7,r28
ffc0b9b4: 4c c6 31 82 crclr 4*cr1+eq
ffc0b9b8: 4e 80 04 21 bctrl
"block 0x%08x: block size %u not page aligned\n",
block,
block_size
);
return false;
ffc0b9bc: 38 60 00 00 li r3,0
ffc0b9c0: 4b ff fa cc b ffc0b48c <_Heap_Walk+0x94>
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
ffc0b9c4: 80 01 00 18 lwz r0,24(r1)
ffc0b9c8: 3c a0 ff c2 lis r5,-62
ffc0b9cc: 7f 23 cb 78 mr r3,r25
ffc0b9d0: 38 80 00 01 li r4,1
ffc0b9d4: 7c 09 03 a6 mtctr r0
ffc0b9d8: 38 a5 bc 34 addi r5,r5,-17356
ffc0b9dc: 7f a6 eb 78 mr r6,r29
ffc0b9e0: 7f 87 e3 78 mr r7,r28
ffc0b9e4: 7f 08 c3 78 mr r8,r24
ffc0b9e8: 4c c6 31 82 crclr 4*cr1+eq
ffc0b9ec: 4e 80 04 21 bctrl
block,
block_size,
min_block_size
);
return false;
ffc0b9f0: 38 60 00 00 li r3,0
ffc0b9f4: 4b ff fa 98 b ffc0b48c <_Heap_Walk+0x94>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
ffc0b9f8: 3c a0 ff c2 lis r5,-62
ffc0b9fc: 7f 23 cb 78 mr r3,r25
ffc0ba00: 38 80 00 01 li r4,1
ffc0ba04: 38 a5 bc 60 addi r5,r5,-17312
ffc0ba08: 4b ff fd 5c b ffc0b764 <_Heap_Walk+0x36c>
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;
ffc0ba0c: 81 5f 00 24 lwz r10,36(r31)
ffc0ba10: 7f 86 50 40 cmplw cr7,r6,r10
ffc0ba14: 41 bd fc d8 bgt- cr7,ffc0b6ec <_Heap_Walk+0x2f4> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0ba18: 39 26 00 08 addi r9,r6,8
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0ba1c: 7d 69 43 96 divwu r11,r9,r8
ffc0ba20: 7d 6b 41 d6 mullw r11,r11,r8
);
return false;
}
if (
ffc0ba24: 7f 89 58 00 cmpw cr7,r9,r11
ffc0ba28: 40 9e 00 d4 bne- cr7,ffc0bafc <_Heap_Walk+0x704> <== NEVER TAKEN
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc0ba2c: 81 26 00 04 lwz r9,4(r6)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0ba30: 7f eb fb 78 mr r11,r31
ffc0ba34: 7c c5 33 78 mr r5,r6
ffc0ba38: 55 29 00 3c rlwinm r9,r9,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0ba3c: 7d 26 4a 14 add r9,r6,r9
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;
ffc0ba40: 81 29 00 04 lwz r9,4(r9)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0ba44: 71 27 00 01 andi. r7,r9,1
ffc0ba48: 41 a2 00 58 beq+ ffc0baa0 <_Heap_Walk+0x6a8> <== ALWAYS TAKEN
ffc0ba4c: 48 00 00 88 b ffc0bad4 <_Heap_Walk+0x6dc> <== NOT EXECUTED
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0ba50: 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 ) {
ffc0ba54: 7f 9f 30 00 cmpw cr7,r31,r6
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;
ffc0ba58: 7f 06 00 40 cmplw cr6,r6,r0
ffc0ba5c: 7c 86 50 40 cmplw cr1,r6,r10
ffc0ba60: 41 be fc b4 beq- cr7,ffc0b714 <_Heap_Walk+0x31c>
ffc0ba64: 41 b8 fc 88 blt- cr6,ffc0b6ec <_Heap_Walk+0x2f4>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc0ba68: 39 26 00 08 addi r9,r6,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;
ffc0ba6c: 41 a5 fc 80 bgt- cr1,ffc0b6ec <_Heap_Walk+0x2f4> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
ffc0ba70: 7c e9 43 96 divwu r7,r9,r8
ffc0ba74: 7c e7 41 d6 mullw r7,r7,r8
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0ba78: 7c ab 2b 78 mr r11,r5
);
return false;
}
if (
ffc0ba7c: 7f 89 38 00 cmpw cr7,r9,r7
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0ba80: 7c c5 33 78 mr r5,r6
);
return false;
}
if (
ffc0ba84: 40 9e 00 78 bne- cr7,ffc0bafc <_Heap_Walk+0x704>
- 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;
ffc0ba88: 81 26 00 04 lwz r9,4(r6)
ffc0ba8c: 55 29 00 3c rlwinm r9,r9,0,0,30
block = next_block;
} while ( block != first_block );
return true;
}
ffc0ba90: 7d 26 4a 14 add r9,r6,r9
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;
ffc0ba94: 81 29 00 04 lwz r9,4(r9)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0ba98: 71 27 00 01 andi. r7,r9,1
ffc0ba9c: 40 82 00 38 bne- ffc0bad4 <_Heap_Walk+0x6dc>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0baa0: 80 e6 00 0c lwz r7,12(r6)
ffc0baa4: 7f 87 58 00 cmpw cr7,r7,r11
ffc0baa8: 41 9e ff a8 beq+ cr7,ffc0ba50 <_Heap_Walk+0x658>
(*printer)(
ffc0baac: 80 01 00 18 lwz r0,24(r1)
ffc0bab0: 3c a0 ff c2 lis r5,-62
ffc0bab4: 7f 23 cb 78 mr r3,r25
ffc0bab8: 38 80 00 01 li r4,1
ffc0babc: 7c 09 03 a6 mtctr r0
ffc0bac0: 38 a5 bb a0 addi r5,r5,-17504
ffc0bac4: 4c c6 31 82 crclr 4*cr1+eq
ffc0bac8: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0bacc: 38 60 00 00 li r3,0
ffc0bad0: 4b ff f9 bc b ffc0b48c <_Heap_Walk+0x94>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
ffc0bad4: 80 01 00 18 lwz r0,24(r1)
ffc0bad8: 3c a0 ff c2 lis r5,-62
ffc0badc: 7f 23 cb 78 mr r3,r25
ffc0bae0: 38 80 00 01 li r4,1
ffc0bae4: 7c 09 03 a6 mtctr r0
ffc0bae8: 38 a5 bb 84 addi r5,r5,-17532
ffc0baec: 4c c6 31 82 crclr 4*cr1+eq
ffc0baf0: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0baf4: 38 60 00 00 li r3,0
ffc0baf8: 4b ff f9 94 b ffc0b48c <_Heap_Walk+0x94>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc0bafc: 80 01 00 18 lwz r0,24(r1)
ffc0bb00: 3c a0 ff c2 lis r5,-62
ffc0bb04: 7f 23 cb 78 mr r3,r25
ffc0bb08: 38 80 00 01 li r4,1
ffc0bb0c: 7c 09 03 a6 mtctr r0
ffc0bb10: 38 a5 bb 54 addi r5,r5,-17580
ffc0bb14: 4c c6 31 82 crclr 4*cr1+eq
ffc0bb18: 4e 80 04 21 bctrl
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
ffc0bb1c: 38 60 00 00 li r3,0
ffc0bb20: 4b ff f9 6c b ffc0b48c <_Heap_Walk+0x94>
ffc0b2f8 <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b2f8: 94 21 ff 88 stwu r1,-120(r1)
ffc0b2fc: 7c 08 02 a6 mflr r0
ffc0b300: 93 e1 00 74 stw r31,116(r1)
ffc0b304: 90 01 00 7c stw r0,124(r1)
ffc0b308: 7c 60 1b 78 mr r0,r3
ffc0b30c: 90 c1 00 1c stw r6,28(r1)
ffc0b310: 90 e1 00 20 stw r7,32(r1)
ffc0b314: 91 01 00 24 stw r8,36(r1)
ffc0b318: 91 21 00 28 stw r9,40(r1)
ffc0b31c: 91 41 00 2c stw r10,44(r1)
ffc0b320: 40 86 00 24 bne- cr1,ffc0b344 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN
ffc0b324: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED
ffc0b328: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0b32c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0b330: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0b334: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0b338: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0b33c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0b340: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc0b344: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b348: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc0b34c: 40 9e 00 58 bne- cr7,ffc0b3a4 <_Heap_Walk_print+0xac>
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
ffc0b350: 3c 60 ff c2 lis r3,-62
ffc0b354: 7c 04 03 78 mr r4,r0
ffc0b358: 38 63 b9 58 addi r3,r3,-18088
ffc0b35c: 4c c6 31 82 crclr 4*cr1+eq
ffc0b360: 4b ff b1 d9 bl ffc06538 <printk>
}
va_start( ap, fmt );
ffc0b364: 38 00 00 03 li r0,3
ffc0b368: 98 01 00 08 stb r0,8(r1)
ffc0b36c: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b370: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b374: 98 01 00 09 stb r0,9(r1)
ffc0b378: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b37c: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b380: 90 01 00 0c stw r0,12(r1)
ffc0b384: 38 01 00 10 addi r0,r1,16
ffc0b388: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b38c: 4b ff d5 39 bl ffc088c4 <vprintk>
va_end( ap );
}
ffc0b390: 80 01 00 7c lwz r0,124(r1)
ffc0b394: 83 e1 00 74 lwz r31,116(r1)
ffc0b398: 38 21 00 78 addi r1,r1,120
ffc0b39c: 7c 08 03 a6 mtlr r0
ffc0b3a0: 4e 80 00 20 blr
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
va_list ap;
if ( error ) {
printk( "FAIL[%d]: ", source );
ffc0b3a4: 3c 60 ff c2 lis r3,-62
ffc0b3a8: 7c 04 03 78 mr r4,r0
ffc0b3ac: 38 63 b9 4c addi r3,r3,-18100
ffc0b3b0: 4c c6 31 82 crclr 4*cr1+eq
ffc0b3b4: 4b ff b1 85 bl ffc06538 <printk>
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b3b8: 38 00 00 03 li r0,3
ffc0b3bc: 98 01 00 08 stb r0,8(r1)
ffc0b3c0: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b3c4: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b3c8: 98 01 00 09 stb r0,9(r1)
ffc0b3cc: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b3d0: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b3d4: 90 01 00 0c stw r0,12(r1)
ffc0b3d8: 38 01 00 10 addi r0,r1,16
ffc0b3dc: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b3e0: 4b ff d4 e5 bl ffc088c4 <vprintk>
va_end( ap );
}
ffc0b3e4: 80 01 00 7c lwz r0,124(r1)
ffc0b3e8: 83 e1 00 74 lwz r31,116(r1)
ffc0b3ec: 38 21 00 78 addi r1,r1,120
ffc0b3f0: 7c 08 03 a6 mtlr r0
ffc0b3f4: 4e 80 00 20 blr
ffc09e6c <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc09e6c: 94 21 ff f0 stwu r1,-16(r1)
ffc09e70: 7c 08 02 a6 mflr r0
ffc09e74: 93 c1 00 08 stw r30,8(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09e78: 3f c0 00 00 lis r30,0
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc09e7c: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09e80: 80 1e 28 58 lwz r0,10328(r30)
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
ffc09e84: 93 e1 00 0c stw r31,12(r1)
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09e88: 2f 80 00 00 cmpwi cr7,r0,0
ffc09e8c: 41 9e 00 2c beq- cr7,ffc09eb8 <_IO_Initialize_all_drivers+0x4c><== NEVER TAKEN
ffc09e90: 3b e0 00 00 li r31,0
ffc09e94: 3b de 28 58 addi r30,r30,10328
(void) rtems_io_initialize( major, 0, NULL );
ffc09e98: 7f e3 fb 78 mr r3,r31
ffc09e9c: 38 80 00 00 li r4,0
ffc09ea0: 38 a0 00 00 li r5,0
ffc09ea4: 48 00 6e 35 bl ffc10cd8 <rtems_io_initialize>
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
ffc09ea8: 80 1e 00 00 lwz r0,0(r30)
ffc09eac: 3b ff 00 01 addi r31,r31,1
ffc09eb0: 7f 80 f8 40 cmplw cr7,r0,r31
ffc09eb4: 41 9d ff e4 bgt+ cr7,ffc09e98 <_IO_Initialize_all_drivers+0x2c>
(void) rtems_io_initialize( major, 0, NULL );
}
ffc09eb8: 80 01 00 14 lwz r0,20(r1)
ffc09ebc: 83 c1 00 08 lwz r30,8(r1)
ffc09ec0: 7c 08 03 a6 mtlr r0
ffc09ec4: 83 e1 00 0c lwz r31,12(r1)
ffc09ec8: 38 21 00 10 addi r1,r1,16
ffc09ecc: 4e 80 00 20 blr
ffc09d5c <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09d5c: 94 21 ff e0 stwu r1,-32(r1)
ffc09d60: 7c 08 02 a6 mflr r0
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
ffc09d64: 3d 20 00 00 lis r9,0
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09d68: 90 01 00 24 stw r0,36(r1)
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
ffc09d6c: 39 29 20 04 addi r9,r9,8196
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09d70: 93 a1 00 14 stw r29,20(r1)
ffc09d74: 93 c1 00 18 stw r30,24(r1)
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
number_of_drivers = Configuration.maximum_drivers;
ffc09d78: 83 a9 00 2c lwz r29,44(r9)
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
drivers_in_table = Configuration.number_of_device_drivers;
ffc09d7c: 83 c9 00 30 lwz r30,48(r9)
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09d80: 93 e1 00 1c stw r31,28(r1)
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
ffc09d84: 7f 9e e8 40 cmplw cr7,r30,r29
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc09d88: 93 61 00 0c stw r27,12(r1)
ffc09d8c: 93 81 00 10 stw r28,16(r1)
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
ffc09d90: 83 e9 00 34 lwz r31,52(r9)
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
ffc09d94: 40 9c 00 a4 bge- cr7,ffc09e38 <_IO_Manager_initialization+0xdc>
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
ffc09d98: 1f 7d 00 18 mulli r27,r29,24
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
ffc09d9c: 7f 63 db 78 mr r3,r27
ffc09da0: 48 00 3e b1 bl ffc0dc50 <_Workspace_Allocate_or_fatal_error>
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
ffc09da4: 3f 80 00 00 lis r28,0
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
ffc09da8: 3d 20 00 00 lis r9,0
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
ffc09dac: 90 7c 28 5c stw r3,10332(r28)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
ffc09db0: 38 80 00 00 li r4,0
ffc09db4: 7f 65 db 78 mr r5,r27
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
ffc09db8: 93 a9 28 58 stw r29,10328(r9)
memset(
ffc09dbc: 48 00 ad f1 bl ffc14bac <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc09dc0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09dc4: 41 9e 00 50 beq- cr7,ffc09e14 <_IO_Manager_initialization+0xb8><== NEVER TAKEN
ffc09dc8: 7f c9 03 a6 mtctr r30
ffc09dcc: 81 1c 28 5c lwz r8,10332(r28)
ffc09dd0: 39 40 00 00 li r10,0
_IO_Driver_address_table[index] = driver_table[index];
ffc09dd4: 7f e9 fb 78 mr r9,r31
ffc09dd8: 7c a9 50 6e lwzux r5,r9,r10
ffc09ddc: 7d 68 52 14 add r11,r8,r10
ffc09de0: 80 e9 00 08 lwz r7,8(r9)
ffc09de4: 80 09 00 0c lwz r0,12(r9)
ffc09de8: 80 c9 00 04 lwz r6,4(r9)
ffc09dec: 7c a8 51 2e stwx r5,r8,r10
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc09df0: 39 4a 00 18 addi r10,r10,24
_IO_Driver_address_table[index] = driver_table[index];
ffc09df4: 90 cb 00 04 stw r6,4(r11)
ffc09df8: 90 eb 00 08 stw r7,8(r11)
ffc09dfc: 90 0b 00 0c stw r0,12(r11)
ffc09e00: 80 e9 00 10 lwz r7,16(r9)
ffc09e04: 80 09 00 14 lwz r0,20(r9)
ffc09e08: 90 eb 00 10 stw r7,16(r11)
ffc09e0c: 90 0b 00 14 stw r0,20(r11)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc09e10: 42 00 ff c4 bdnz+ ffc09dd4 <_IO_Manager_initialization+0x78>
_IO_Driver_address_table[index] = driver_table[index];
}
ffc09e14: 80 01 00 24 lwz r0,36(r1)
ffc09e18: 83 61 00 0c lwz r27,12(r1)
ffc09e1c: 7c 08 03 a6 mtlr r0
ffc09e20: 83 81 00 10 lwz r28,16(r1)
ffc09e24: 83 a1 00 14 lwz r29,20(r1)
ffc09e28: 83 c1 00 18 lwz r30,24(r1)
ffc09e2c: 83 e1 00 1c lwz r31,28(r1)
ffc09e30: 38 21 00 20 addi r1,r1,32
ffc09e34: 4e 80 00 20 blr
ffc09e38: 80 01 00 24 lwz r0,36(r1)
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
ffc09e3c: 3d 20 00 00 lis r9,0
ffc09e40: 93 e9 28 5c stw r31,10332(r9)
_IO_Number_of_drivers = number_of_drivers;
ffc09e44: 3d 20 00 00 lis r9,0
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
ffc09e48: 7c 08 03 a6 mtlr r0
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
_IO_Number_of_drivers = number_of_drivers;
ffc09e4c: 93 c9 28 58 stw r30,10328(r9)
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
}
ffc09e50: 83 61 00 0c lwz r27,12(r1)
ffc09e54: 83 81 00 10 lwz r28,16(r1)
ffc09e58: 83 a1 00 14 lwz r29,20(r1)
ffc09e5c: 83 c1 00 18 lwz r30,24(r1)
ffc09e60: 83 e1 00 1c lwz r31,28(r1)
ffc09e64: 38 21 00 20 addi r1,r1,32
ffc09e68: 4e 80 00 20 blr
ffc0adc0 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0adc0: 94 21 ff f0 stwu r1,-16(r1)
ffc0adc4: 7c 08 02 a6 mflr r0
_Internal_errors_What_happened.the_source = the_source;
ffc0adc8: 3d 60 00 00 lis r11,0
ffc0adcc: 39 2b 2d 50 addi r9,r11,11600
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0add0: 90 01 00 14 stw r0,20(r1)
ffc0add4: 93 e1 00 0c stw r31,12(r1)
ffc0add8: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc0addc: 98 89 00 04 stb r4,4(r9)
_Internal_errors_What_happened.the_error = the_error;
ffc0ade0: 90 a9 00 08 stw r5,8(r9)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
ffc0ade4: 90 6b 2d 50 stw r3,11600(r11)
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
ffc0ade8: 48 00 27 41 bl ffc0d528 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc0adec: 38 00 00 05 li r0,5
ffc0adf0: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc0adf4: 7f e3 fb 78 mr r3,r31
ffc0adf8: 90 09 28 48 stw r0,10312(r9)
ffc0adfc: 4b ff 91 1d bl ffc03f18 <_BSP_Fatal_error>
ffc0ae00: 48 00 00 00 b ffc0ae00 <_Internal_error_Occurred+0x40><== NOT EXECUTED
ffc0ae18 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0ae18: 94 21 ff f0 stwu r1,-16(r1)
ffc0ae1c: 7c 08 02 a6 mflr r0
ffc0ae20: 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 )
ffc0ae24: 80 03 00 18 lwz r0,24(r3)
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0ae28: 93 e1 00 0c stw r31,12(r1)
ffc0ae2c: 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 )
ffc0ae30: 2f 80 00 00 cmpwi cr7,r0,0
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0ae34: 93 c1 00 08 stw r30,8(r1)
* 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 )
return NULL;
ffc0ae38: 38 60 00 00 li r3,0
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
ffc0ae3c: 41 9e 00 58 beq- cr7,ffc0ae94 <_Objects_Allocate+0x7c> <== NEVER TAKEN
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc0ae40: 3b df 00 20 addi r30,r31,32
ffc0ae44: 7f c3 f3 78 mr r3,r30
ffc0ae48: 4b ff f3 fd bl ffc0a244 <_Chain_Get>
if ( information->auto_extend ) {
ffc0ae4c: 88 1f 00 12 lbz r0,18(r31)
ffc0ae50: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ae54: 41 9e 00 40 beq- cr7,ffc0ae94 <_Objects_Allocate+0x7c>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc0ae58: 2f 83 00 00 cmpwi cr7,r3,0
ffc0ae5c: 41 9e 00 50 beq- cr7,ffc0aeac <_Objects_Allocate+0x94>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0ae60: a1 63 00 0a lhz r11,10(r3)
ffc0ae64: a0 1f 00 0a lhz r0,10(r31)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc0ae68: a1 3f 00 14 lhz r9,20(r31)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0ae6c: 7c 00 58 50 subf r0,r0,r11
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
ffc0ae70: a1 7f 00 2c lhz r11,44(r31)
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
ffc0ae74: 7c 00 4b 96 divwu r0,r0,r9
information->inactive_per_block[ block ]--;
ffc0ae78: 81 3f 00 30 lwz r9,48(r31)
ffc0ae7c: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0ae80: 7d 49 00 2e lwzx r10,r9,r0
information->inactive--;
ffc0ae84: 39 6b ff ff addi r11,r11,-1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc0ae88: 39 4a ff ff addi r10,r10,-1
ffc0ae8c: 7d 49 01 2e stwx r10,r9,r0
information->inactive--;
ffc0ae90: b1 7f 00 2c sth r11,44(r31)
);
}
#endif
return the_object;
}
ffc0ae94: 80 01 00 14 lwz r0,20(r1)
ffc0ae98: 83 c1 00 08 lwz r30,8(r1)
ffc0ae9c: 7c 08 03 a6 mtlr r0
ffc0aea0: 83 e1 00 0c lwz r31,12(r1)
ffc0aea4: 38 21 00 10 addi r1,r1,16
ffc0aea8: 4e 80 00 20 blr
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
ffc0aeac: 7f e3 fb 78 mr r3,r31
ffc0aeb0: 48 00 00 4d bl ffc0aefc <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc0aeb4: 7f c3 f3 78 mr r3,r30
ffc0aeb8: 4b ff f3 8d bl ffc0a244 <_Chain_Get>
}
if ( the_object ) {
ffc0aebc: 2c 03 00 00 cmpwi r3,0
ffc0aec0: 41 82 ff d4 beq+ ffc0ae94 <_Objects_Allocate+0x7c>
ffc0aec4: 4b ff ff 9c b ffc0ae60 <_Objects_Allocate+0x48>
ffc0aefc <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0aefc: 94 21 ff c0 stwu r1,-64(r1)
ffc0af00: 7c 08 02 a6 mflr r0
ffc0af04: 90 01 00 44 stw r0,68(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 )
ffc0af08: 81 23 00 34 lwz r9,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0af0c: 93 61 00 2c stw r27,44(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 )
ffc0af10: 2f 89 00 00 cmpwi cr7,r9,0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0af14: 93 81 00 30 stw r28,48(r1)
ffc0af18: 93 e1 00 3c stw r31,60(r1)
ffc0af1c: 7c 7f 1b 78 mr r31,r3
ffc0af20: 92 c1 00 18 stw r22,24(r1)
ffc0af24: 92 e1 00 1c stw r23,28(r1)
ffc0af28: 93 01 00 20 stw r24,32(r1)
ffc0af2c: 93 21 00 24 stw r25,36(r1)
ffc0af30: 93 41 00 28 stw r26,40(r1)
ffc0af34: 93 a1 00 34 stw r29,52(r1)
ffc0af38: 93 c1 00 38 stw r30,56(r1)
/*
* 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 );
ffc0af3c: a3 83 00 0a lhz r28,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0af40: a3 63 00 10 lhz r27,16(r3)
ffc0af44: 41 9e 02 80 beq- cr7,ffc0b1c4 <_Objects_Extend_information+0x2c8>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc0af48: a1 63 00 14 lhz r11,20(r3)
ffc0af4c: 7e db 5b 96 divwu r22,r27,r11
for ( ; block < block_count; block++ ) {
ffc0af50: 2f 96 00 00 cmpwi cr7,r22,0
ffc0af54: 41 9e 02 88 beq- cr7,ffc0b1dc <_Objects_Extend_information+0x2e0><== NEVER TAKEN
if ( information->object_blocks[ block ] == NULL ) {
ffc0af58: 80 09 00 00 lwz r0,0(r9)
ffc0af5c: 7d 6a 5b 78 mr r10,r11
/*
* 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 );
ffc0af60: 7f 9e e3 78 mr r30,r28
index_base = minimum_index;
block = 0;
ffc0af64: 7e c9 03 a6 mtctr r22
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
ffc0af68: 2f 80 00 00 cmpwi cr7,r0,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;
ffc0af6c: 3b a0 00 00 li r29,0
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
ffc0af70: 40 be 00 14 bne+ cr7,ffc0af84 <_Objects_Extend_information+0x88><== ALWAYS TAKEN
ffc0af74: 48 00 02 7c b ffc0b1f0 <_Objects_Extend_information+0x2f4><== NOT EXECUTED
ffc0af78: 84 09 00 04 lwzu r0,4(r9)
ffc0af7c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0af80: 41 9e 01 f4 beq- cr7,ffc0b174 <_Objects_Extend_information+0x278>
do_extend = false;
break;
} else
index_base += information->allocation_size;
ffc0af84: 7f de 5a 14 add r30,r30,r11
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc0af88: 3b bd 00 01 addi r29,r29,1
ffc0af8c: 42 00 ff ec bdnz+ ffc0af78 <_Objects_Extend_information+0x7c>
/*
* 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;
ffc0af90: 3b 20 00 01 li r25,1
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc0af94: 7f 7b 52 14 add r27,r27,r10
/*
* 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 ) {
ffc0af98: 2b 9b ff ff cmplwi cr7,r27,65535
ffc0af9c: 41 9d 01 a0 bgt- cr7,ffc0b13c <_Objects_Extend_information+0x240>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
ffc0afa0: 88 1f 00 12 lbz r0,18(r31)
/*
* 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;
ffc0afa4: 80 7f 00 18 lwz r3,24(r31)
if ( information->auto_extend ) {
ffc0afa8: 2f 80 00 00 cmpwi cr7,r0,0
/*
* 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;
ffc0afac: 7c 6a 19 d6 mullw r3,r10,r3
if ( information->auto_extend ) {
ffc0afb0: 41 9e 01 cc beq- cr7,ffc0b17c <_Objects_Extend_information+0x280>
new_object_block = _Workspace_Allocate( block_size );
ffc0afb4: 48 00 2c 3d bl ffc0dbf0 <_Workspace_Allocate>
if ( !new_object_block )
ffc0afb8: 7c 7a 1b 79 mr. r26,r3
ffc0afbc: 41 82 01 80 beq- ffc0b13c <_Objects_Extend_information+0x240>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
ffc0afc0: 2f 99 00 00 cmpwi cr7,r25,0
ffc0afc4: 41 9e 00 f4 beq- cr7,ffc0b0b8 <_Objects_Extend_information+0x1bc>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc0afc8: 3a f6 00 01 addi r23,r22,1
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc0afcc: 1c 77 00 03 mulli r3,r23,3
((maximum + minimum_index) * sizeof(Objects_Control *));
ffc0afd0: 7c 7b 1a 14 add r3,r27,r3
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
ffc0afd4: 7c 63 e2 14 add r3,r3,r28
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
ffc0afd8: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0afdc: 48 00 2c 15 bl ffc0dbf0 <_Workspace_Allocate>
if ( !object_blocks ) {
ffc0afe0: 7c 78 1b 79 mr. r24,r3
ffc0afe4: 41 82 02 18 beq- ffc0b1fc <_Objects_Extend_information+0x300>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0afe8: a0 1f 00 10 lhz r0,16(r31)
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc0afec: 56 f7 10 3a rlwinm r23,r23,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc0aff0: 7f 38 ba 14 add r25,r24,r23
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0aff4: 7f 9c 00 40 cmplw cr7,r28,r0
ffc0aff8: 7e f9 ba 14 add r23,r25,r23
ffc0affc: 41 9c 01 8c blt- cr7,ffc0b188 <_Objects_Extend_information+0x28c>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0b000: 2f 9c 00 00 cmpwi cr7,r28,0
local_table[ index ] = NULL;
ffc0b004: 7f 89 03 a6 mtctr r28
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0b008: 39 37 ff fc addi r9,r23,-4
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0b00c: 38 00 00 00 li r0,0
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0b010: 41 9e 00 0c beq- cr7,ffc0b01c <_Objects_Extend_information+0x120><== NEVER TAKEN
local_table[ index ] = NULL;
ffc0b014: 94 09 00 04 stwu r0,4(r9)
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0b018: 42 00 ff fc bdnz+ ffc0b014 <_Objects_Extend_information+0x118>
ffc0b01c: 56 d6 10 3a rlwinm r22,r22,2,0,29
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0b020: a1 7f 00 14 lhz r11,20(r31)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc0b024: 38 00 00 00 li r0,0
ffc0b028: 7c 18 b1 2e stwx r0,r24,r22
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0b02c: 7d 7e 5a 14 add r11,r30,r11
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0b030: 7f 9e 58 40 cmplw cr7,r30,r11
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
ffc0b034: 7c 19 b1 2e stwx r0,r25,r22
for ( index=index_base ;
ffc0b038: 40 9c 00 30 bge- cr7,ffc0b068 <_Objects_Extend_information+0x16c><== NEVER TAKEN
ffc0b03c: 38 1e 00 01 addi r0,r30,1
ffc0b040: 7f 80 58 40 cmplw cr7,r0,r11
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
ffc0b044: 57 c9 10 3a rlwinm r9,r30,2,0,29
ffc0b048: 39 29 ff fc addi r9,r9,-4
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0b04c: 7d 7e 58 50 subf r11,r30,r11
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0b050: 7d 29 ba 14 add r9,r9,r23
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0b054: 7d 69 03 a6 mtctr r11
ffc0b058: 38 00 00 00 li r0,0
ffc0b05c: 41 9d 01 ac bgt- cr7,ffc0b208 <_Objects_Extend_information+0x30c><== NEVER TAKEN
ffc0b060: 94 09 00 04 stwu r0,4(r9)
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0b064: 42 00 ff fc bdnz+ ffc0b060 <_Objects_Extend_information+0x164>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0b068: 7c 00 00 a6 mfmsr r0
ffc0b06c: 7d 30 42 a6 mfsprg r9,0
ffc0b070: 7c 09 48 78 andc r9,r0,r9
ffc0b074: 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) |
ffc0b078: 81 7f 00 00 lwz r11,0(r31)
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
ffc0b07c: 57 7b 04 3e clrlwi r27,r27,16
information->maximum_id = _Objects_Build_id(
ffc0b080: a1 3f 00 04 lhz r9,4(r31)
ffc0b084: 55 6b c0 0e rlwinm r11,r11,24,0,7
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc0b088: 80 7f 00 34 lwz r3,52(r31)
ffc0b08c: 65 6b 00 01 oris r11,r11,1
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
ffc0b090: 93 3f 00 30 stw r25,48(r31)
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0b094: 55 29 d8 08 rlwinm r9,r9,27,0,4
ffc0b098: 7d 69 4b 78 or r9,r11,r9
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
ffc0b09c: 93 1f 00 34 stw r24,52(r31)
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0b0a0: 7d 29 db 78 or r9,r9,r27
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
ffc0b0a4: 92 ff 00 1c stw r23,28(r31)
information->maximum = (Objects_Maximum) maximum;
ffc0b0a8: b3 7f 00 10 sth r27,16(r31)
information->maximum_id = _Objects_Build_id(
ffc0b0ac: 91 3f 00 0c stw r9,12(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0b0b0: 7c 00 01 24 mtmsr r0
information->maximum
);
_ISR_Enable( level );
_Workspace_Free( old_tables );
ffc0b0b4: 48 00 2b 71 bl ffc0dc24 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0b0b8: 81 3f 00 34 lwz r9,52(r31)
ffc0b0bc: 57 bd 10 3a rlwinm r29,r29,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0b0c0: a0 bf 00 14 lhz r5,20(r31)
ffc0b0c4: 38 61 00 08 addi r3,r1,8
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0b0c8: 7f 49 e9 2e stwx r26,r9,r29
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0b0cc: 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(
ffc0b0d0: 81 3f 00 34 lwz r9,52(r31)
ffc0b0d4: 80 df 00 18 lwz r6,24(r31)
ffc0b0d8: 7c 89 e8 2e lwzx r4,r9,r29
ffc0b0dc: 48 00 5c 6d bl ffc10d48 <_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 ) {
ffc0b0e0: 48 00 00 2c b ffc0b10c <_Objects_Extend_information+0x210>
ffc0b0e4: 81 7f 00 00 lwz r11,0(r31)
the_object->id = _Objects_Build_id(
ffc0b0e8: a0 1f 00 04 lhz r0,4(r31)
ffc0b0ec: 55 6b c0 0e rlwinm r11,r11,24,0,7
ffc0b0f0: 65 6b 00 01 oris r11,r11,1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
ffc0b0f4: 54 00 d8 08 rlwinm r0,r0,27,0,4
ffc0b0f8: 7d 60 03 78 or r0,r11,r0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
ffc0b0fc: 7c 00 f3 78 or r0,r0,r30
ffc0b100: 90 09 00 08 stw r0,8(r9)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc0b104: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0b108: 4b ff f0 e5 bl ffc0a1ec <_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 ) {
ffc0b10c: 38 61 00 08 addi r3,r1,8
ffc0b110: 4b ff f1 35 bl ffc0a244 <_Chain_Get>
ffc0b114: 7c 69 1b 79 mr. r9,r3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0b118: 7f 83 e3 78 mr r3,r28
ffc0b11c: 7d 24 4b 78 mr r4,r9
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
ffc0b120: 40 82 ff c4 bne+ ffc0b0e4 <_Objects_Extend_information+0x1e8>
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0b124: a1 3f 00 2c lhz r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0b128: a0 1f 00 14 lhz r0,20(r31)
ffc0b12c: 81 7f 00 30 lwz r11,48(r31)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
ffc0b130: 7d 20 4a 14 add r9,r0,r9
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0b134: 7c 0b e9 2e stwx r0,r11,r29
information->inactive =
ffc0b138: b1 3f 00 2c sth r9,44(r31)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc0b13c: 80 01 00 44 lwz r0,68(r1)
ffc0b140: 82 c1 00 18 lwz r22,24(r1)
ffc0b144: 7c 08 03 a6 mtlr r0
ffc0b148: 82 e1 00 1c lwz r23,28(r1)
ffc0b14c: 83 01 00 20 lwz r24,32(r1)
ffc0b150: 83 21 00 24 lwz r25,36(r1)
ffc0b154: 83 41 00 28 lwz r26,40(r1)
ffc0b158: 83 61 00 2c lwz r27,44(r1)
ffc0b15c: 83 81 00 30 lwz r28,48(r1)
ffc0b160: 83 a1 00 34 lwz r29,52(r1)
ffc0b164: 83 c1 00 38 lwz r30,56(r1)
ffc0b168: 83 e1 00 3c lwz r31,60(r1)
ffc0b16c: 38 21 00 40 addi r1,r1,64
ffc0b170: 4e 80 00 20 blr
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc0b174: 3b 20 00 00 li r25,0
ffc0b178: 4b ff fe 1c b ffc0af94 <_Objects_Extend_information+0x98>
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc0b17c: 48 00 2a d5 bl ffc0dc50 <_Workspace_Allocate_or_fatal_error>
ffc0b180: 7c 7a 1b 78 mr r26,r3
ffc0b184: 4b ff fe 3c b ffc0afc0 <_Objects_Extend_information+0xc4>
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc0b188: 56 d6 10 3a rlwinm r22,r22,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,
ffc0b18c: 80 9f 00 34 lwz r4,52(r31)
ffc0b190: 7e c5 b3 78 mr r5,r22
ffc0b194: 48 00 99 35 bl ffc14ac8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc0b198: 80 9f 00 30 lwz r4,48(r31)
ffc0b19c: 7e c5 b3 78 mr r5,r22
ffc0b1a0: 7f 23 cb 78 mr r3,r25
ffc0b1a4: 48 00 99 25 bl ffc14ac8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0b1a8: a0 bf 00 10 lhz r5,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,
ffc0b1ac: 80 9f 00 1c lwz r4,28(r31)
ffc0b1b0: 7e e3 bb 78 mr r3,r23
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
ffc0b1b4: 7c bc 2a 14 add r5,r28,r5
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0b1b8: 54 a5 10 3a rlwinm r5,r5,2,0,29
ffc0b1bc: 48 00 99 0d bl ffc14ac8 <memcpy>
ffc0b1c0: 4b ff fe 60 b ffc0b020 <_Objects_Extend_information+0x124>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0b1c4: a1 43 00 14 lhz r10,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 );
ffc0b1c8: 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;
ffc0b1cc: 3b 20 00 01 li r25,1
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc0b1d0: 3b a0 00 00 li r29,0
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
ffc0b1d4: 3a c0 00 00 li r22,0
ffc0b1d8: 4b ff fd bc b ffc0af94 <_Objects_Extend_information+0x98>
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc0b1dc: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
minimum_index = _Objects_Get_index( information->minimum_id );
ffc0b1e0: 7f 9e e3 78 mr r30,r28 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
ffc0b1e4: 3b 20 00 01 li r25,1 <== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
ffc0b1e8: 3b a0 00 00 li r29,0 <== NOT EXECUTED
ffc0b1ec: 4b ff fd a8 b ffc0af94 <_Objects_Extend_information+0x98><== NOT EXECUTED
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
do_extend = false;
ffc0b1f0: 3b 20 00 00 li r25,0 <== NOT EXECUTED
* 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;
ffc0b1f4: 3b a0 00 00 li r29,0 <== NOT EXECUTED
ffc0b1f8: 4b ff fd 9c b ffc0af94 <_Objects_Extend_information+0x98><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
ffc0b1fc: 7f 43 d3 78 mr r3,r26
ffc0b200: 48 00 2a 25 bl ffc0dc24 <_Workspace_Free>
return;
ffc0b204: 4b ff ff 38 b ffc0b13c <_Objects_Extend_information+0x240>
ffc0b208: 39 60 00 01 li r11,1 <== NOT EXECUTED
ffc0b20c: 7d 69 03 a6 mtctr r11 <== NOT EXECUTED
ffc0b210: 4b ff fe 50 b ffc0b060 <_Objects_Extend_information+0x164><== NOT EXECUTED
ffc0b300 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0b300: 94 21 ff e8 stwu r1,-24(r1)
ffc0b304: 7c 08 02 a6 mflr r0
ffc0b308: 93 c1 00 10 stw r30,16(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0b30c: 7c 9e 23 79 mr. r30,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0b310: 93 a1 00 0c stw r29,12(r1)
ffc0b314: 7c 7d 1b 78 mr r29,r3
ffc0b318: 93 e1 00 14 stw r31,20(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
return NULL;
ffc0b31c: 3b e0 00 00 li r31,0
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint16_t the_class
)
{
ffc0b320: 90 01 00 1c stw r0,28(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0b324: 41 82 00 4c beq- ffc0b370 <_Objects_Get_information+0x70>
/*
* 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 );
ffc0b328: 48 00 60 61 bl ffc11388 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc0b32c: 2c 03 00 00 cmpwi r3,0
ffc0b330: 41 82 00 40 beq- ffc0b370 <_Objects_Get_information+0x70>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc0b334: 7f 83 f0 40 cmplw cr7,r3,r30
ffc0b338: 41 9c 00 38 blt- cr7,ffc0b370 <_Objects_Get_information+0x70>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc0b33c: 3d 20 00 00 lis r9,0
ffc0b340: 57 bd 10 3a rlwinm r29,r29,2,0,29
ffc0b344: 39 29 2c 60 addi r9,r9,11360
ffc0b348: 7d 29 e8 2e lwzx r9,r9,r29
ffc0b34c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b350: 41 9e 00 20 beq- cr7,ffc0b370 <_Objects_Get_information+0x70><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc0b354: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0b358: 7f e9 f0 2e lwzx r31,r9,r30
if ( !info )
ffc0b35c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0b360: 41 9e 00 10 beq- cr7,ffc0b370 <_Objects_Get_information+0x70><== 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 )
ffc0b364: a0 1f 00 10 lhz r0,16(r31)
ffc0b368: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b36c: 41 9e 00 24 beq- cr7,ffc0b390 <_Objects_Get_information+0x90>
return NULL;
#endif
return info;
}
ffc0b370: 80 01 00 1c lwz r0,28(r1)
ffc0b374: 7f e3 fb 78 mr r3,r31
ffc0b378: 83 a1 00 0c lwz r29,12(r1)
ffc0b37c: 7c 08 03 a6 mtlr r0
ffc0b380: 83 c1 00 10 lwz r30,16(r1)
ffc0b384: 83 e1 00 14 lwz r31,20(r1)
ffc0b388: 38 21 00 18 addi r1,r1,24
ffc0b38c: 4e 80 00 20 blr
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
ffc0b390: 3b e0 00 00 li r31,0
ffc0b394: 4b ff ff dc b ffc0b370 <_Objects_Get_information+0x70>
ffc0cfbc <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
ffc0cfbc: 94 21 ff d8 stwu r1,-40(r1)
ffc0cfc0: 7c 08 02 a6 mflr r0
ffc0cfc4: 93 c1 00 20 stw r30,32(r1)
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
ffc0cfc8: 7c 9e 23 79 mr. r30,r4
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
ffc0cfcc: 93 e1 00 24 stw r31,36(r1)
ffc0cfd0: 7c bf 2b 78 mr r31,r5
ffc0cfd4: 90 01 00 2c stw r0,44(r1)
ffc0cfd8: 93 81 00 18 stw r28,24(r1)
ffc0cfdc: 93 a1 00 1c stw r29,28(r1)
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
ffc0cfe0: 41 82 01 0c beq- ffc0d0ec <_Objects_Get_name_as_string+0x130>
return NULL;
if ( name == NULL )
ffc0cfe4: 2f 85 00 00 cmpwi cr7,r5,0
ffc0cfe8: 41 9e 00 d0 beq- cr7,ffc0d0b8 <_Objects_Get_name_as_string+0xfc>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0cfec: 2f 83 00 00 cmpwi cr7,r3,0
ffc0cff0: 7c 7c 1b 78 mr r28,r3
ffc0cff4: 41 9e 00 e8 beq- cr7,ffc0d0dc <_Objects_Get_name_as_string+0x120>
information = _Objects_Get_information_id( tmpId );
ffc0cff8: 7f 83 e3 78 mr r3,r28
ffc0cffc: 4b ff fe 8d bl ffc0ce88 <_Objects_Get_information_id>
if ( !information )
ffc0d000: 7c 7d 1b 79 mr. r29,r3
ffc0d004: 41 82 00 e8 beq- ffc0d0ec <_Objects_Get_name_as_string+0x130>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
ffc0d008: 7f 84 e3 78 mr r4,r28
ffc0d00c: 38 a1 00 08 addi r5,r1,8
ffc0d010: 48 00 01 25 bl ffc0d134 <_Objects_Get>
switch ( location ) {
ffc0d014: 80 01 00 08 lwz r0,8(r1)
ffc0d018: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d01c: 40 9e 00 d0 bne- cr7,ffc0d0ec <_Objects_Get_name_as_string+0x130>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
ffc0d020: 88 1d 00 38 lbz r0,56(r29)
ffc0d024: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d028: 40 9e 00 ec bne- cr7,ffc0d114 <_Objects_Get_name_as_string+0x158>
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
ffc0d02c: 81 23 00 0c lwz r9,12(r3)
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
ffc0d030: 98 01 00 10 stb r0,16(r1)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
ffc0d034: 55 2b 84 3e rlwinm r11,r9,16,16,31
lname[ 2 ] = (u32_name >> 8) & 0xff;
ffc0d038: 55 20 c2 3e rlwinm r0,r9,24,8,31
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
ffc0d03c: 99 61 00 0d stb r11,13(r1)
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
ffc0d040: 55 2a 46 3e rlwinm r10,r9,8,24,31
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
ffc0d044: 98 01 00 0e stb r0,14(r1)
lname[ 3 ] = (u32_name >> 0) & 0xff;
ffc0d048: 99 21 00 0f stb r9,15(r1)
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
ffc0d04c: 99 41 00 0c stb r10,12(r1)
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
s = lname;
ffc0d050: 39 41 00 0c addi r10,r1,12
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d054: 34 1e ff ff addic. r0,r30,-1
ffc0d058: 7f e9 fb 78 mr r9,r31
ffc0d05c: 7c 09 03 a6 mtctr r0
ffc0d060: 41 82 00 4c beq- ffc0d0ac <_Objects_Get_name_as_string+0xf0><== NEVER TAKEN
ffc0d064: 88 0a 00 00 lbz r0,0(r10)
ffc0d068: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d06c: 41 9e 00 40 beq- cr7,ffc0d0ac <_Objects_Get_name_as_string+0xf0>
ffc0d070: 3d 00 00 00 lis r8,0
ffc0d074: 39 08 27 ec addi r8,r8,10220
ffc0d078: 48 00 00 10 b ffc0d088 <_Objects_Get_name_as_string+0xcc>
ffc0d07c: 8c 0a 00 01 lbzu r0,1(r10)
ffc0d080: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d084: 41 9e 00 28 beq- cr7,ffc0d0ac <_Objects_Get_name_as_string+0xf0>
*d = (isprint((unsigned char)*s)) ? *s : '*';
ffc0d088: 81 68 00 00 lwz r11,0(r8)
ffc0d08c: 7d 6b 02 14 add r11,r11,r0
ffc0d090: 89 6b 00 01 lbz r11,1(r11)
ffc0d094: 71 67 00 97 andi. r7,r11,151
ffc0d098: 40 82 00 08 bne- ffc0d0a0 <_Objects_Get_name_as_string+0xe4>
ffc0d09c: 38 00 00 2a li r0,42
ffc0d0a0: 98 09 00 00 stb r0,0(r9)
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
ffc0d0a4: 39 29 00 01 addi r9,r9,1
ffc0d0a8: 42 00 ff d4 bdnz+ ffc0d07c <_Objects_Get_name_as_string+0xc0>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
ffc0d0ac: 38 00 00 00 li r0,0
ffc0d0b0: 98 09 00 00 stb r0,0(r9)
_Thread_Enable_dispatch();
ffc0d0b4: 48 00 11 61 bl ffc0e214 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
ffc0d0b8: 80 01 00 2c lwz r0,44(r1)
ffc0d0bc: 7f e3 fb 78 mr r3,r31
ffc0d0c0: 83 81 00 18 lwz r28,24(r1)
ffc0d0c4: 7c 08 03 a6 mtlr r0
ffc0d0c8: 83 a1 00 1c lwz r29,28(r1)
ffc0d0cc: 83 c1 00 20 lwz r30,32(r1)
ffc0d0d0: 83 e1 00 24 lwz r31,36(r1)
ffc0d0d4: 38 21 00 28 addi r1,r1,40
ffc0d0d8: 4e 80 00 20 blr
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0d0dc: 3d 20 00 00 lis r9,0
ffc0d0e0: 81 29 35 b0 lwz r9,13744(r9)
ffc0d0e4: 83 89 00 08 lwz r28,8(r9)
ffc0d0e8: 4b ff ff 10 b ffc0cff8 <_Objects_Get_name_as_string+0x3c>
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
ffc0d0ec: 80 01 00 2c lwz r0,44(r1)
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
ffc0d0f0: 3b e0 00 00 li r31,0
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
ffc0d0f4: 7f e3 fb 78 mr r3,r31
ffc0d0f8: 83 81 00 18 lwz r28,24(r1)
ffc0d0fc: 7c 08 03 a6 mtlr r0
ffc0d100: 83 a1 00 1c lwz r29,28(r1)
ffc0d104: 83 c1 00 20 lwz r30,32(r1)
ffc0d108: 83 e1 00 24 lwz r31,36(r1)
ffc0d10c: 38 21 00 28 addi r1,r1,40
ffc0d110: 4e 80 00 20 blr
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
s = the_object->name.name_p;
ffc0d114: 81 43 00 0c lwz r10,12(r3)
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
ffc0d118: 7f e9 fb 78 mr r9,r31
ffc0d11c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d120: 40 9e ff 34 bne+ cr7,ffc0d054 <_Objects_Get_name_as_string+0x98>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
ffc0d124: 38 00 00 00 li r0,0
ffc0d128: 98 09 00 00 stb r0,0(r9)
_Thread_Enable_dispatch();
ffc0d12c: 48 00 10 e9 bl ffc0e214 <_Thread_Enable_dispatch>
ffc0d130: 4b ff ff 88 b ffc0d0b8 <_Objects_Get_name_as_string+0xfc>
ffc0af48 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
ffc0af48: 94 21 ff e8 stwu r1,-24(r1)
ffc0af4c: 7c 08 02 a6 mflr r0
ffc0af50: 93 c1 00 10 stw r30,16(r1)
Objects_Control *object;
Objects_Id next_id;
if ( !information )
ffc0af54: 7c 7e 1b 79 mr. r30,r3
return NULL;
ffc0af58: 38 60 00 00 li r3,0
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
ffc0af5c: 93 81 00 08 stw r28,8(r1)
ffc0af60: 7c dc 33 78 mr r28,r6
ffc0af64: 93 e1 00 14 stw r31,20(r1)
ffc0af68: 7c bf 2b 78 mr r31,r5
ffc0af6c: 90 01 00 1c stw r0,28(r1)
ffc0af70: 93 a1 00 0c stw r29,12(r1)
Objects_Control *object;
Objects_Id next_id;
if ( !information )
ffc0af74: 41 82 00 58 beq- ffc0afcc <_Objects_Get_next+0x84>
return NULL;
if ( !location_p )
ffc0af78: 2f 85 00 00 cmpwi cr7,r5,0
ffc0af7c: 41 9e 00 50 beq- cr7,ffc0afcc <_Objects_Get_next+0x84>
return NULL;
if ( !next_id_p )
ffc0af80: 2f 86 00 00 cmpwi cr7,r6,0
ffc0af84: 41 9e 00 48 beq- cr7,ffc0afcc <_Objects_Get_next+0x84>
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
ffc0af88: 54 80 04 3e clrlwi r0,r4,16
ffc0af8c: 2f 80 00 00 cmpwi cr7,r0,0
next_id = information->minimum_id;
else
next_id = id;
ffc0af90: 7c 9d 23 78 mr r29,r4
return NULL;
if ( !next_id_p )
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
ffc0af94: 41 9e 00 58 beq- cr7,ffc0afec <_Objects_Get_next+0xa4>
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
ffc0af98: a1 3e 00 10 lhz r9,16(r30)
ffc0af9c: 57 a0 04 3e clrlwi r0,r29,16
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
ffc0afa0: 7f a4 eb 78 mr r4,r29
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
ffc0afa4: 7f 89 00 40 cmplw cr7,r9,r0
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
ffc0afa8: 7f c3 f3 78 mr r3,r30
ffc0afac: 7f e5 fb 78 mr r5,r31
next_id++;
ffc0afb0: 3b bd 00 01 addi r29,r29,1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
ffc0afb4: 41 9c 00 5c blt- cr7,ffc0b010 <_Objects_Get_next+0xc8>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
ffc0afb8: 48 00 00 8d bl ffc0b044 <_Objects_Get>
next_id++;
} while (*location_p != OBJECTS_LOCAL);
ffc0afbc: 80 1f 00 00 lwz r0,0(r31)
ffc0afc0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0afc4: 40 9e ff d4 bne+ cr7,ffc0af98 <_Objects_Get_next+0x50>
*next_id_p = next_id;
ffc0afc8: 93 bc 00 00 stw r29,0(r28)
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
ffc0afcc: 80 01 00 1c lwz r0,28(r1)
ffc0afd0: 83 81 00 08 lwz r28,8(r1)
ffc0afd4: 7c 08 03 a6 mtlr r0
ffc0afd8: 83 a1 00 0c lwz r29,12(r1)
ffc0afdc: 83 c1 00 10 lwz r30,16(r1)
ffc0afe0: 83 e1 00 14 lwz r31,20(r1)
ffc0afe4: 38 21 00 18 addi r1,r1,24
ffc0afe8: 4e 80 00 20 blr
if ( !next_id_p )
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
next_id = information->minimum_id;
ffc0afec: 83 be 00 08 lwz r29,8(r30)
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
ffc0aff0: 7f c3 f3 78 mr r3,r30
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
ffc0aff4: a1 3e 00 10 lhz r9,16(r30)
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
ffc0aff8: 7f e5 fb 78 mr r5,r31
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
ffc0affc: 57 a0 04 3e clrlwi r0,r29,16
ffc0b000: 7f 89 00 40 cmplw cr7,r9,r0
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
ffc0b004: 7f a4 eb 78 mr r4,r29
next_id++;
ffc0b008: 3b bd 00 01 addi r29,r29,1
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
ffc0b00c: 40 9c ff ac bge+ cr7,ffc0afb8 <_Objects_Get_next+0x70> <== ALWAYS TAKEN
{
*location_p = OBJECTS_ERROR;
ffc0b010: 38 00 00 01 li r0,1
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
ffc0b014: 83 a1 00 0c lwz r29,12(r1)
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
ffc0b018: 90 1f 00 00 stw r0,0(r31)
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
ffc0b01c: 38 00 ff ff li r0,-1
return 0;
ffc0b020: 38 60 00 00 li r3,0
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
ffc0b024: 90 1c 00 00 stw r0,0(r28)
return 0;
}
ffc0b028: 80 01 00 1c lwz r0,28(r1)
ffc0b02c: 83 81 00 08 lwz r28,8(r1)
ffc0b030: 7c 08 03 a6 mtlr r0
ffc0b034: 83 c1 00 10 lwz r30,16(r1)
ffc0b038: 83 e1 00 14 lwz r31,20(r1)
ffc0b03c: 38 21 00 18 addi r1,r1,24
ffc0b040: 4e 80 00 20 blr
ffc0bf2c <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0bf2c: 94 21 ff e0 stwu r1,-32(r1)
ffc0bf30: 7c 08 02 a6 mflr r0
ffc0bf34: 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;
ffc0bf38: 7c 60 1b 79 mr. r0,r3
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0bf3c: 93 c1 00 18 stw r30,24(r1)
ffc0bf40: 7c 9e 23 78 mr r30,r4
ffc0bf44: 93 e1 00 1c stw r31,28(r1)
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0bf48: 40 82 00 10 bne- ffc0bf58 <_Objects_Id_to_name+0x2c>
ffc0bf4c: 3d 20 00 00 lis r9,0
ffc0bf50: 81 29 31 b0 lwz r9,12720(r9)
ffc0bf54: 80 09 00 08 lwz r0,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);
ffc0bf58: 54 09 47 7e rlwinm r9,r0,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0bf5c: 39 69 ff ff addi r11,r9,-1
ffc0bf60: 2b 8b 00 02 cmplwi cr7,r11,2
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
ffc0bf64: 3b e0 00 03 li r31,3
ffc0bf68: 41 9d 00 38 bgt- cr7,ffc0bfa0 <_Objects_Id_to_name+0x74>
if ( !_Objects_Information_table[ the_api ] )
ffc0bf6c: 3d 60 00 00 lis r11,0
ffc0bf70: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0bf74: 39 6b 2c c0 addi r11,r11,11456
ffc0bf78: 7d 2b 48 2e lwzx r9,r11,r9
ffc0bf7c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0bf80: 41 9e 00 20 beq- cr7,ffc0bfa0 <_Objects_Id_to_name+0x74>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0bf84: 54 0b 3e 7a rlwinm r11,r0,7,25,29
ffc0bf88: 7c 69 58 2e lwzx r3,r9,r11
if ( !information )
ffc0bf8c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0bf90: 41 9e 00 10 beq- cr7,ffc0bfa0 <_Objects_Id_to_name+0x74><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
ffc0bf94: 89 23 00 38 lbz r9,56(r3)
ffc0bf98: 2f 89 00 00 cmpwi cr7,r9,0
ffc0bf9c: 41 9e 00 20 beq- cr7,ffc0bfbc <_Objects_Id_to_name+0x90><== ALWAYS TAKEN
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
ffc0bfa0: 80 01 00 24 lwz r0,36(r1)
ffc0bfa4: 7f e3 fb 78 mr r3,r31
ffc0bfa8: 83 c1 00 18 lwz r30,24(r1)
ffc0bfac: 7c 08 03 a6 mtlr r0
ffc0bfb0: 83 e1 00 1c lwz r31,28(r1)
ffc0bfb4: 38 21 00 20 addi r1,r1,32
ffc0bfb8: 4e 80 00 20 blr
#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 );
ffc0bfbc: 7c 04 03 78 mr r4,r0
ffc0bfc0: 38 a1 00 08 addi r5,r1,8
ffc0bfc4: 4b ff fe c9 bl ffc0be8c <_Objects_Get>
if ( !the_object )
ffc0bfc8: 2c 03 00 00 cmpwi r3,0
ffc0bfcc: 41 a2 ff d4 beq- ffc0bfa0 <_Objects_Id_to_name+0x74>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0bfd0: 80 03 00 0c lwz r0,12(r3)
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0bfd4: 3b e0 00 00 li r31,0
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0bfd8: 90 1e 00 00 stw r0,0(r30)
_Thread_Enable_dispatch();
ffc0bfdc: 48 00 10 49 bl ffc0d024 <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0bfe0: 4b ff ff c0 b ffc0bfa0 <_Objects_Id_to_name+0x74>
ffc0b668 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b668: 94 21 ff e8 stwu r1,-24(r1)
ffc0b66c: 7c 08 02 a6 mflr r0
ffc0b670: 90 01 00 1c stw r0,28(r1)
ffc0b674: 93 e1 00 14 stw r31,20(r1)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
ffc0b678: a1 43 00 10 lhz r10,16(r3)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
ffc0b67c: a3 e3 00 0a lhz r31,10(r3)
block_count = (information->maximum - index_base) /
ffc0b680: a0 03 00 14 lhz r0,20(r3)
ffc0b684: 7d 5f 50 50 subf r10,r31,r10
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b688: 93 81 00 08 stw r28,8(r1)
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
ffc0b68c: 7d 4a 03 96 divwu r10,r10,r0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b690: 93 a1 00 0c stw r29,12(r1)
ffc0b694: 93 c1 00 10 stw r30,16(r1)
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0b698: 2f 8a 00 00 cmpwi cr7,r10,0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0b69c: 7c 7c 1b 78 mr r28,r3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0b6a0: 41 9e 00 3c beq- cr7,ffc0b6dc <_Objects_Shrink_information+0x74><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
ffc0b6a4: 81 63 00 30 lwz r11,48(r3)
ffc0b6a8: 81 2b 00 00 lwz r9,0(r11)
ffc0b6ac: 7f 80 48 00 cmpw cr7,r0,r9
ffc0b6b0: 41 9e 00 4c beq- cr7,ffc0b6fc <_Objects_Shrink_information+0x94><== NEVER TAKEN
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0b6b4: 39 20 00 00 li r9,0
ffc0b6b8: 7d 49 03 a6 mtctr r10
ffc0b6bc: 48 00 00 18 b ffc0b6d4 <_Objects_Shrink_information+0x6c>
if ( information->inactive_per_block[ block ] ==
ffc0b6c0: 85 4b 00 04 lwzu r10,4(r11)
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
ffc0b6c4: 7f ff 02 14 add r31,r31,r0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
ffc0b6c8: 55 3d 10 3a rlwinm r29,r9,2,0,29
ffc0b6cc: 7f 80 50 00 cmpw cr7,r0,r10
ffc0b6d0: 41 9e 00 30 beq- cr7,ffc0b700 <_Objects_Shrink_information+0x98>
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0b6d4: 39 29 00 01 addi r9,r9,1
ffc0b6d8: 42 00 ff e8 bdnz+ ffc0b6c0 <_Objects_Shrink_information+0x58>
return;
}
index_base += information->allocation_size;
}
}
ffc0b6dc: 80 01 00 1c lwz r0,28(r1)
ffc0b6e0: 83 81 00 08 lwz r28,8(r1)
ffc0b6e4: 7c 08 03 a6 mtlr r0
ffc0b6e8: 83 a1 00 0c lwz r29,12(r1)
ffc0b6ec: 83 c1 00 10 lwz r30,16(r1)
ffc0b6f0: 83 e1 00 14 lwz r31,20(r1)
ffc0b6f4: 38 21 00 18 addi r1,r1,24
ffc0b6f8: 4e 80 00 20 blr
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
ffc0b6fc: 3b a0 00 00 li r29,0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0b700: 80 7c 00 20 lwz r3,32(r28)
ffc0b704: 48 00 00 10 b ffc0b714 <_Objects_Shrink_information+0xac>
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
ffc0b708: 2f 9e 00 00 cmpwi cr7,r30,0
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
ffc0b70c: 7f c3 f3 78 mr r3,r30
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
ffc0b710: 41 9e 00 34 beq- cr7,ffc0b744 <_Objects_Shrink_information+0xdc>
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) _Chain_First( &information->Inactive );
do {
index = _Objects_Get_index( the_object->id );
ffc0b714: a0 03 00 0a lhz r0,10(r3)
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
ffc0b718: 83 c3 00 00 lwz r30,0(r3)
if ((index >= index_base) &&
ffc0b71c: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0b720: 41 bc ff e8 blt- cr7,ffc0b708 <_Objects_Shrink_information+0xa0>
(index < (index_base + information->allocation_size))) {
ffc0b724: a1 3c 00 14 lhz r9,20(r28)
ffc0b728: 7d 3f 4a 14 add r9,r31,r9
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
ffc0b72c: 7f 80 48 40 cmplw cr7,r0,r9
ffc0b730: 40 9c ff d8 bge+ cr7,ffc0b708 <_Objects_Shrink_information+0xa0>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
ffc0b734: 4b ff ea e9 bl ffc0a21c <_Chain_Extract>
}
}
while ( the_object );
ffc0b738: 2f 9e 00 00 cmpwi cr7,r30,0
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
ffc0b73c: 7f c3 f3 78 mr r3,r30
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
ffc0b740: 40 9e ff d4 bne+ cr7,ffc0b714 <_Objects_Shrink_information+0xac><== ALWAYS TAKEN
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
ffc0b744: 81 3c 00 34 lwz r9,52(r28)
ffc0b748: 7c 69 e8 2e lwzx r3,r9,r29
ffc0b74c: 48 00 24 d9 bl ffc0dc24 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
ffc0b750: 81 3c 00 34 lwz r9,52(r28)
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
ffc0b754: a1 7c 00 2c lhz r11,44(r28)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
ffc0b758: 7f c9 e9 2e stwx r30,r9,r29
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
ffc0b75c: a0 1c 00 14 lhz r0,20(r28)
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
ffc0b760: 81 3c 00 30 lwz r9,48(r28)
information->inactive -= information->allocation_size;
ffc0b764: 7c 00 58 50 subf r0,r0,r11
return;
}
index_base += information->allocation_size;
}
}
ffc0b768: 83 e1 00 14 lwz r31,20(r1)
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
ffc0b76c: 7f c9 e9 2e stwx r30,r9,r29
information->inactive -= information->allocation_size;
ffc0b770: b0 1c 00 2c sth r0,44(r28)
return;
}
index_base += information->allocation_size;
}
}
ffc0b774: 80 01 00 1c lwz r0,28(r1)
ffc0b778: 83 81 00 08 lwz r28,8(r1)
ffc0b77c: 7c 08 03 a6 mtlr r0
ffc0b780: 83 a1 00 0c lwz r29,12(r1)
ffc0b784: 83 c1 00 10 lwz r30,16(r1)
ffc0b788: 38 21 00 18 addi r1,r1,24
ffc0b78c: 4e 80 00 20 blr
ffc0b4e0 <_POSIX_Absolute_timeout_to_ticks>:
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
ffc0b4e0: 94 21 ff e0 stwu r1,-32(r1)
ffc0b4e4: 7c 08 02 a6 mflr r0
ffc0b4e8: 90 01 00 24 stw r0,36(r1)
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
ffc0b4ec: 38 00 00 00 li r0,0
*/
POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks(
const struct timespec *abstime,
Watchdog_Interval *ticks_out
)
{
ffc0b4f0: 93 c1 00 18 stw r30,24(r1)
ffc0b4f4: 7c 7e 1b 78 mr r30,r3
ffc0b4f8: 93 e1 00 1c stw r31,28(r1)
ffc0b4fc: 7c 9f 23 78 mr r31,r4
/*
* Make sure there is always a value returned.
*/
*ticks_out = 0;
ffc0b500: 90 04 00 00 stw r0,0(r4)
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
ffc0b504: 48 00 53 99 bl ffc1089c <_Timespec_Is_valid>
ffc0b508: 2f 83 00 00 cmpwi cr7,r3,0
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
ffc0b50c: 38 60 00 00 li r3,0
*ticks_out = 0;
/*
* Is the absolute time even valid?
*/
if ( !_Timespec_Is_valid(abstime) )
ffc0b510: 40 9e 00 1c bne- cr7,ffc0b52c <_POSIX_Absolute_timeout_to_ticks+0x4c>
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
}
ffc0b514: 80 01 00 24 lwz r0,36(r1)
ffc0b518: 83 c1 00 18 lwz r30,24(r1)
ffc0b51c: 7c 08 03 a6 mtlr r0
ffc0b520: 83 e1 00 1c lwz r31,28(r1)
ffc0b524: 38 21 00 20 addi r1,r1,32
ffc0b528: 4e 80 00 20 blr
return POSIX_ABSOLUTE_TIMEOUT_INVALID;
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
ffc0b52c: 38 61 00 10 addi r3,r1,16
ffc0b530: 48 00 27 69 bl ffc0dc98 <_TOD_Get>
if ( _Timespec_Less_than( abstime, ¤t_time ) )
ffc0b534: 7f c3 f3 78 mr r3,r30
ffc0b538: 38 81 00 10 addi r4,r1,16
ffc0b53c: 48 00 53 9d bl ffc108d8 <_Timespec_Less_than>
ffc0b540: 2f 83 00 00 cmpwi cr7,r3,0
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
ffc0b544: 38 60 00 01 li r3,1
/*
* Is the absolute time in the past?
*/
_TOD_Get( ¤t_time );
if ( _Timespec_Less_than( abstime, ¤t_time ) )
ffc0b548: 40 9e ff cc bne+ cr7,ffc0b514 <_POSIX_Absolute_timeout_to_ticks+0x34>
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST;
/*
* How long until the requested absolute time?
*/
_Timespec_Subtract( ¤t_time, abstime, &difference );
ffc0b54c: 7f c4 f3 78 mr r4,r30
ffc0b550: 38 a1 00 08 addi r5,r1,8
ffc0b554: 38 61 00 10 addi r3,r1,16
ffc0b558: 48 00 53 bd bl ffc10914 <_Timespec_Subtract>
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
ffc0b55c: 38 61 00 08 addi r3,r1,8
ffc0b560: 48 00 54 01 bl ffc10960 <_Timespec_To_ticks>
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
ffc0b564: 2f 83 00 00 cmpwi cr7,r3,0
_Timespec_Subtract( ¤t_time, abstime, &difference );
/*
* Internally the SuperCore uses ticks, so convert to them.
*/
*ticks_out = _Timespec_To_ticks( &difference );
ffc0b568: 90 7f 00 00 stw r3,0(r31)
/*
* This is the case we were expecting and it took this long to
* get here.
*/
return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE;
ffc0b56c: 38 60 00 03 li r3,3
/*
* If the difference was 0, then the future is now. It is so bright
* we better wear shades.
*/
if ( !*ticks_out )
ffc0b570: 40 be ff a4 bne- cr7,ffc0b514 <_POSIX_Absolute_timeout_to_ticks+0x34><== ALWAYS TAKEN
return POSIX_ABSOLUTE_TIMEOUT_IS_NOW;
ffc0b574: 38 60 00 02 li r3,2 <== NOT EXECUTED
ffc0b578: 4b ff ff 9c b ffc0b514 <_POSIX_Absolute_timeout_to_ticks+0x34><== NOT EXECUTED
ffc13228 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
ffc13228: 94 21 ff e0 stwu r1,-32(r1)
ffc1322c: 7c 08 02 a6 mflr r0
ffc13230: 90 01 00 24 stw r0,36(r1)
ffc13234: 93 81 00 10 stw r28,16(r1)
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
ffc13238: 83 83 00 08 lwz r28,8(r3)
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
ffc1323c: 93 61 00 0c stw r27,12(r1)
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
ffc13240: 57 9b 56 fa rlwinm r27,r28,10,27,29
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
ffc13244: 93 c1 00 18 stw r30,24(r1)
ffc13248: 3f c0 00 00 lis r30,0
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
ffc1324c: 57 9c 13 ba rlwinm r28,r28,2,14,29
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
ffc13250: 93 a1 00 14 stw r29,20(r1)
ffc13254: 3b de 30 24 addi r30,r30,12324
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
ffc13258: 3b 7b 00 10 addi r27,r27,16
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
ffc1325c: 93 e1 00 1c stw r31,28(r1)
ffc13260: 93 41 00 08 stw r26,8(r1)
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
ffc13264: 3b 40 00 00 li r26,0
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
ffc13268: a3 fe 00 10 lhz r31,16(r30)
done = true;
for ( index = 1 ; index <= max ; ++index ) {
ffc1326c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc13270: 40 9e 00 2c bne- cr7,ffc1329c <_POSIX_Keys_Run_destructors+0x74>
done = false;
}
}
}
}
}
ffc13274: 80 01 00 24 lwz r0,36(r1)
ffc13278: 83 41 00 08 lwz r26,8(r1)
ffc1327c: 7c 08 03 a6 mtlr r0
ffc13280: 83 61 00 0c lwz r27,12(r1)
ffc13284: 83 81 00 10 lwz r28,16(r1)
ffc13288: 83 a1 00 14 lwz r29,20(r1)
ffc1328c: 83 c1 00 18 lwz r30,24(r1)
ffc13290: 83 e1 00 1c lwz r31,28(r1)
ffc13294: 38 21 00 20 addi r1,r1,32
ffc13298: 4e 80 00 20 blr
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
ffc1329c: 3b a0 00 01 li r29,1
ffc132a0: 38 00 00 01 li r0,1
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
ffc132a4: 81 7e 00 1c lwz r11,28(r30)
ffc132a8: 57 a9 10 3a rlwinm r9,r29,2,0,29
ffc132ac: 7d 2b 48 2e lwzx r9,r11,r9
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
ffc132b0: 2f 89 00 00 cmpwi cr7,r9,0
void *value = key->Values [ thread_api ][ thread_index ];
ffc132b4: 7d 69 da 14 add r11,r9,r27
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
ffc132b8: 41 9e 00 34 beq- cr7,ffc132ec <_POSIX_Keys_Run_destructors+0xc4>
ffc132bc: 81 49 00 10 lwz r10,16(r9)
ffc132c0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc132c4: 41 9e 00 28 beq- cr7,ffc132ec <_POSIX_Keys_Run_destructors+0xc4>
void *value = key->Values [ thread_api ][ thread_index ];
ffc132c8: 81 6b 00 04 lwz r11,4(r11)
ffc132cc: 7c 6b e0 2e lwzx r3,r11,r28
if ( value != NULL ) {
ffc132d0: 2f 83 00 00 cmpwi cr7,r3,0
ffc132d4: 41 9e 00 18 beq- cr7,ffc132ec <_POSIX_Keys_Run_destructors+0xc4><== ALWAYS TAKEN
key->Values [ thread_api ][ thread_index ] = NULL;
ffc132d8: 7f 4b e1 2e stwx r26,r11,r28 <== NOT EXECUTED
(*key->destructor)( value );
ffc132dc: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED
ffc132e0: 7c 09 03 a6 mtctr r0 <== NOT EXECUTED
ffc132e4: 4e 80 04 21 bctrl <== NOT EXECUTED
done = false;
ffc132e8: 38 00 00 00 li r0,0 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
ffc132ec: 3b bd 00 01 addi r29,r29,1
ffc132f0: 57 bd 04 3e clrlwi r29,r29,16
ffc132f4: 7f 9f e8 40 cmplw cr7,r31,r29
ffc132f8: 40 bc ff ac bge- cr7,ffc132a4 <_POSIX_Keys_Run_destructors+0x7c>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
ffc132fc: 2f 80 00 00 cmpwi cr7,r0,0
ffc13300: 41 9e ff 68 beq+ cr7,ffc13268 <_POSIX_Keys_Run_destructors+0x40><== NEVER TAKEN
ffc13304: 4b ff ff 70 b ffc13274 <_POSIX_Keys_Run_destructors+0x4c>
ffc0ef8c <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
ffc0ef8c: 94 21 ff d0 stwu r1,-48(r1)
ffc0ef90: 7c 08 02 a6 mflr r0
ffc0ef94: 93 e1 00 2c stw r31,44(r1)
ffc0ef98: 7c 7f 1b 78 mr r31,r3
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
ffc0ef9c: 3c 60 00 00 lis r3,0
ffc0efa0: 93 81 00 20 stw r28,32(r1)
ffc0efa4: 38 63 36 18 addi r3,r3,13848
ffc0efa8: 7c 9c 23 78 mr r28,r4
ffc0efac: 93 a1 00 24 stw r29,36(r1)
ffc0efb0: 7f e4 fb 78 mr r4,r31
ffc0efb4: 7c bd 2b 78 mr r29,r5
ffc0efb8: 38 a1 00 0c addi r5,r1,12
ffc0efbc: 90 01 00 34 stw r0,52(r1)
ffc0efc0: 93 41 00 18 stw r26,24(r1)
ffc0efc4: 7c fa 3b 78 mr r26,r7
ffc0efc8: 93 61 00 1c stw r27,28(r1)
ffc0efcc: 7d 1b 43 78 mr r27,r8
ffc0efd0: 93 c1 00 28 stw r30,40(r1)
ffc0efd4: 7c de 33 78 mr r30,r6
ffc0efd8: 48 00 41 7d bl ffc13154 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
ffc0efdc: 80 01 00 0c lwz r0,12(r1)
ffc0efe0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0efe4: 41 9e 00 3c beq- cr7,ffc0f020 <_POSIX_Message_queue_Receive_support+0x94>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
ffc0efe8: 48 00 d4 45 bl ffc1c42c <__errno>
ffc0efec: 38 00 00 09 li r0,9
ffc0eff0: 90 03 00 00 stw r0,0(r3)
ffc0eff4: 38 60 ff ff li r3,-1
}
ffc0eff8: 80 01 00 34 lwz r0,52(r1)
ffc0effc: 83 41 00 18 lwz r26,24(r1)
ffc0f000: 7c 08 03 a6 mtlr r0
ffc0f004: 83 61 00 1c lwz r27,28(r1)
ffc0f008: 83 81 00 20 lwz r28,32(r1)
ffc0f00c: 83 a1 00 24 lwz r29,36(r1)
ffc0f010: 83 c1 00 28 lwz r30,40(r1)
ffc0f014: 83 e1 00 2c lwz r31,44(r1)
ffc0f018: 38 21 00 30 addi r1,r1,48
ffc0f01c: 4e 80 00 20 blr
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
ffc0f020: 80 03 00 14 lwz r0,20(r3)
ffc0f024: 54 09 07 be clrlwi r9,r0,30
ffc0f028: 2f 89 00 01 cmpwi cr7,r9,1
ffc0f02c: 41 9e 00 c4 beq- cr7,ffc0f0f0 <_POSIX_Message_queue_Receive_support+0x164>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
ffc0f030: 80 63 00 10 lwz r3,16(r3)
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
ffc0f034: 81 23 00 68 lwz r9,104(r3)
ffc0f038: 7f 89 e8 40 cmplw cr7,r9,r29
ffc0f03c: 41 9d 00 9c bgt- cr7,ffc0f0d8 <_POSIX_Message_queue_Receive_support+0x14c>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
ffc0f040: 2f 9a 00 00 cmpwi cr7,r26,0
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
ffc0f044: 39 20 ff ff li r9,-1
ffc0f048: 91 21 00 08 stw r9,8(r1)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
ffc0f04c: 38 e0 00 00 li r7,0
ffc0f050: 40 9e 00 78 bne- cr7,ffc0f0c8 <_POSIX_Message_queue_Receive_support+0x13c>
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
ffc0f054: 7f e4 fb 78 mr r4,r31
ffc0f058: 38 63 00 1c addi r3,r3,28
ffc0f05c: 7f 85 e3 78 mr r5,r28
ffc0f060: 38 c1 00 08 addi r6,r1,8
ffc0f064: 7f 68 db 78 mr r8,r27
ffc0f068: 48 00 2b d5 bl ffc11c3c <_CORE_message_queue_Seize>
);
_Thread_Enable_dispatch();
if (msg_prio) {
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
ffc0f06c: 3f e0 00 00 lis r31,0
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
ffc0f070: 48 00 52 85 bl ffc142f4 <_Thread_Enable_dispatch>
if (msg_prio) {
ffc0f074: 2f 9e 00 00 cmpwi cr7,r30,0
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
ffc0f078: 3b ff 36 84 addi r31,r31,13956
ffc0f07c: 81 3f 00 0c lwz r9,12(r31)
do_wait,
timeout
);
_Thread_Enable_dispatch();
if (msg_prio) {
ffc0f080: 41 9e 00 18 beq- cr7,ffc0f098 <_POSIX_Message_queue_Receive_support+0x10c><== NEVER TAKEN
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
ffc0f084: 80 09 00 24 lwz r0,36(r9)
ffc0f088: 7c 0b fe 70 srawi r11,r0,31
ffc0f08c: 7d 60 02 78 xor r0,r11,r0
ffc0f090: 7c 0b 00 50 subf r0,r11,r0
*msg_prio = _POSIX_Message_queue_Priority_from_core(
ffc0f094: 90 1e 00 00 stw r0,0(r30)
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
ffc0f098: 80 09 00 34 lwz r0,52(r9)
return length_out;
ffc0f09c: 80 61 00 08 lwz r3,8(r1)
*msg_prio = _POSIX_Message_queue_Priority_from_core(
_Thread_Executing->Wait.count
);
}
if ( !_Thread_Executing->Wait.return_code )
ffc0f0a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f0a4: 41 9e ff 54 beq+ cr7,ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c>
return length_out;
rtems_set_errno_and_return_minus_one(
ffc0f0a8: 48 00 d3 85 bl ffc1c42c <__errno>
ffc0f0ac: 81 3f 00 0c lwz r9,12(r31)
ffc0f0b0: 7c 7e 1b 78 mr r30,r3
ffc0f0b4: 80 69 00 34 lwz r3,52(r9)
ffc0f0b8: 48 00 03 99 bl ffc0f450 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
ffc0f0bc: 90 7e 00 00 stw r3,0(r30)
ffc0f0c0: 38 60 ff ff li r3,-1
ffc0f0c4: 4b ff ff 34 b ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c>
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
ffc0f0c8: 70 09 40 00 andi. r9,r0,16384
ffc0f0cc: 7c e0 00 26 mfcr r7
ffc0f0d0: 54 e7 1f fe rlwinm r7,r7,3,31,31
ffc0f0d4: 4b ff ff 80 b ffc0f054 <_POSIX_Message_queue_Receive_support+0xc8>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
ffc0f0d8: 48 00 52 1d bl ffc142f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
ffc0f0dc: 48 00 d3 51 bl ffc1c42c <__errno>
ffc0f0e0: 38 00 00 7a li r0,122
ffc0f0e4: 90 03 00 00 stw r0,0(r3)
ffc0f0e8: 38 60 ff ff li r3,-1
ffc0f0ec: 4b ff ff 0c b ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
ffc0f0f0: 48 00 52 05 bl ffc142f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
ffc0f0f4: 48 00 d3 39 bl ffc1c42c <__errno>
ffc0f0f8: 38 00 00 09 li r0,9
ffc0f0fc: 90 03 00 00 stw r0,0(r3)
ffc0f100: 38 60 ff ff li r3,-1
ffc0f104: 4b ff fe f4 b ffc0eff8 <_POSIX_Message_queue_Receive_support+0x6c>
ffc0f130 <_POSIX_Message_queue_Send_support>:
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
ffc0f130: 2b 86 00 20 cmplwi cr7,r6,32
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
ffc0f134: 94 21 ff d0 stwu r1,-48(r1)
ffc0f138: 7c 08 02 a6 mflr r0
ffc0f13c: 93 41 00 18 stw r26,24(r1)
ffc0f140: 7c fa 3b 78 mr r26,r7
ffc0f144: 93 61 00 1c stw r27,28(r1)
ffc0f148: 7c 9b 23 78 mr r27,r4
ffc0f14c: 93 81 00 20 stw r28,32(r1)
ffc0f150: 7c bc 2b 78 mr r28,r5
ffc0f154: 93 a1 00 24 stw r29,36(r1)
ffc0f158: 7c 7d 1b 78 mr r29,r3
ffc0f15c: 93 c1 00 28 stw r30,40(r1)
ffc0f160: 7c de 33 78 mr r30,r6
ffc0f164: 93 e1 00 2c stw r31,44(r1)
ffc0f168: 7d 1f 43 78 mr r31,r8
ffc0f16c: 90 01 00 34 stw r0,52(r1)
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
ffc0f170: 41 9d 01 04 bgt- cr7,ffc0f274 <_POSIX_Message_queue_Send_support+0x144>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
ffc0f174: 3c 60 00 00 lis r3,0
ffc0f178: 38 63 36 18 addi r3,r3,13848
ffc0f17c: 7f a4 eb 78 mr r4,r29
ffc0f180: 38 a1 00 08 addi r5,r1,8
ffc0f184: 48 00 3f d1 bl ffc13154 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
ffc0f188: 80 01 00 08 lwz r0,8(r1)
ffc0f18c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f190: 40 9e 00 d0 bne- cr7,ffc0f260 <_POSIX_Message_queue_Send_support+0x130>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
ffc0f194: 80 03 00 14 lwz r0,20(r3)
ffc0f198: 70 09 00 03 andi. r9,r0,3
ffc0f19c: 41 82 00 ec beq- ffc0f288 <_POSIX_Message_queue_Send_support+0x158>
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
ffc0f1a0: 2f 9a 00 00 cmpwi cr7,r26,0
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
ffc0f1a4: 81 63 00 10 lwz r11,16(r3)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
ffc0f1a8: 39 20 00 00 li r9,0
ffc0f1ac: 40 9e 00 68 bne- cr7,ffc0f214 <_POSIX_Message_queue_Send_support+0xe4>
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
ffc0f1b0: 7f ea fb 78 mr r10,r31
ffc0f1b4: 7f 64 db 78 mr r4,r27
ffc0f1b8: 7f 85 e3 78 mr r5,r28
ffc0f1bc: 7f a6 eb 78 mr r6,r29
ffc0f1c0: 38 e0 00 00 li r7,0
ffc0f1c4: 7d 1e 00 d0 neg r8,r30
ffc0f1c8: 38 6b 00 1c addi r3,r11,28
ffc0f1cc: 48 00 2c 05 bl ffc11dd0 <_CORE_message_queue_Submit>
ffc0f1d0: 7c 7f 1b 78 mr r31,r3
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
ffc0f1d4: 48 00 51 21 bl ffc142f4 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
ffc0f1d8: 2f 9f 00 07 cmpwi cr7,r31,7
ffc0f1dc: 41 9e 00 74 beq- cr7,ffc0f250 <_POSIX_Message_queue_Send_support+0x120><== NEVER TAKEN
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
ffc0f1e0: 2f 9f 00 00 cmpwi cr7,r31,0
return msg_status;
ffc0f1e4: 38 60 00 00 li r3,0
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
ffc0f1e8: 40 9e 00 b8 bne- cr7,ffc0f2a0 <_POSIX_Message_queue_Send_support+0x170>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
ffc0f1ec: 80 01 00 34 lwz r0,52(r1)
ffc0f1f0: 83 41 00 18 lwz r26,24(r1)
ffc0f1f4: 7c 08 03 a6 mtlr r0
ffc0f1f8: 83 61 00 1c lwz r27,28(r1)
ffc0f1fc: 83 81 00 20 lwz r28,32(r1)
ffc0f200: 83 a1 00 24 lwz r29,36(r1)
ffc0f204: 83 c1 00 28 lwz r30,40(r1)
ffc0f208: 83 e1 00 2c lwz r31,44(r1)
ffc0f20c: 38 21 00 30 addi r1,r1,48
ffc0f210: 4e 80 00 20 blr
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
ffc0f214: 70 09 40 00 andi. r9,r0,16384
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
ffc0f218: 7f ea fb 78 mr r10,r31
ffc0f21c: 7f 64 db 78 mr r4,r27
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
ffc0f220: 7d 20 00 26 mfcr r9
ffc0f224: 55 29 1f fe rlwinm r9,r9,3,31,31
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
ffc0f228: 7f 85 e3 78 mr r5,r28
ffc0f22c: 7f a6 eb 78 mr r6,r29
ffc0f230: 38 e0 00 00 li r7,0
ffc0f234: 7d 1e 00 d0 neg r8,r30
ffc0f238: 38 6b 00 1c addi r3,r11,28
ffc0f23c: 48 00 2b 95 bl ffc11dd0 <_CORE_message_queue_Submit>
ffc0f240: 7c 7f 1b 78 mr r31,r3
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
ffc0f244: 48 00 50 b1 bl ffc142f4 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
ffc0f248: 2f 9f 00 07 cmpwi cr7,r31,7
ffc0f24c: 40 9e ff 94 bne+ cr7,ffc0f1e0 <_POSIX_Message_queue_Send_support+0xb0>
msg_status = _Thread_Executing->Wait.return_code;
ffc0f250: 3d 20 00 00 lis r9,0
ffc0f254: 81 29 36 90 lwz r9,13968(r9)
ffc0f258: 83 e9 00 34 lwz r31,52(r9)
ffc0f25c: 4b ff ff 84 b ffc0f1e0 <_POSIX_Message_queue_Send_support+0xb0>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
ffc0f260: 48 00 d1 cd bl ffc1c42c <__errno>
ffc0f264: 38 00 00 09 li r0,9
ffc0f268: 90 03 00 00 stw r0,0(r3)
ffc0f26c: 38 60 ff ff li r3,-1
ffc0f270: 4b ff ff 7c b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc>
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0f274: 48 00 d1 b9 bl ffc1c42c <__errno>
ffc0f278: 38 00 00 16 li r0,22
ffc0f27c: 90 03 00 00 stw r0,0(r3)
ffc0f280: 38 60 ff ff li r3,-1
ffc0f284: 4b ff ff 68 b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc>
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
ffc0f288: 48 00 50 6d bl ffc142f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
ffc0f28c: 48 00 d1 a1 bl ffc1c42c <__errno>
ffc0f290: 38 00 00 09 li r0,9
ffc0f294: 90 03 00 00 stw r0,0(r3)
ffc0f298: 38 60 ff ff li r3,-1
ffc0f29c: 4b ff ff 50 b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
ffc0f2a0: 48 00 d1 8d bl ffc1c42c <__errno>
ffc0f2a4: 7c 7e 1b 78 mr r30,r3
ffc0f2a8: 7f e3 fb 78 mr r3,r31
ffc0f2ac: 48 00 01 a5 bl ffc0f450 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
ffc0f2b0: 90 7e 00 00 stw r3,0(r30)
ffc0f2b4: 38 60 ff ff li r3,-1
ffc0f2b8: 4b ff ff 34 b ffc0f1ec <_POSIX_Message_queue_Send_support+0xbc>
ffc0fae0 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
ffc0fae0: 7c 08 02 a6 mflr r0
ffc0fae4: 94 21 ff f8 stwu r1,-8(r1)
ffc0fae8: 90 01 00 0c stw r0,12(r1)
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0faec: 81 23 01 34 lwz r9,308(r3)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc0faf0: 80 09 00 d8 lwz r0,216(r9)
ffc0faf4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0faf8: 40 9e 00 10 bne- cr7,ffc0fb08 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28><== NEVER TAKEN
ffc0fafc: 80 09 00 dc lwz r0,220(r9)
ffc0fb00: 2f 80 00 01 cmpwi cr7,r0,1
ffc0fb04: 41 9e 00 18 beq- cr7,ffc0fb1c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x3c>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
ffc0fb08: 4b ff c8 81 bl ffc0c388 <_Thread_Enable_dispatch>
}
ffc0fb0c: 80 01 00 0c lwz r0,12(r1)
ffc0fb10: 38 21 00 08 addi r1,r1,8
ffc0fb14: 7c 08 03 a6 mtlr r0
ffc0fb18: 4e 80 00 20 blr
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
ffc0fb1c: 80 09 00 e0 lwz r0,224(r9)
ffc0fb20: 2f 80 00 00 cmpwi cr7,r0,0
ffc0fb24: 41 9e ff e4 beq+ cr7,ffc0fb08 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x28>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0fb28: 3d 20 00 00 lis r9,0
ffc0fb2c: 81 69 28 14 lwz r11,10260(r9)
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
ffc0fb30: 38 80 ff ff li r4,-1
ffc0fb34: 38 0b ff ff addi r0,r11,-1
ffc0fb38: 90 09 28 14 stw r0,10260(r9)
return _Thread_Dispatch_disable_level;
ffc0fb3c: 80 09 28 14 lwz r0,10260(r9)
ffc0fb40: 48 00 08 7d bl ffc103bc <_POSIX_Thread_Exit>
ffc0fb44: 4b ff ff c8 b ffc0fb0c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x2c>
ffc1137c <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
ffc1137c: 94 21 ff e0 stwu r1,-32(r1)
ffc11380: 7c 08 02 a6 mflr r0
ffc11384: 93 c1 00 18 stw r30,24(r1)
ffc11388: 7c 7e 1b 78 mr r30,r3
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
ffc1138c: 80 64 00 00 lwz r3,0(r4)
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
ffc11390: 93 61 00 0c stw r27,12(r1)
ffc11394: 7c db 33 78 mr r27,r6
ffc11398: 93 81 00 10 stw r28,16(r1)
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
return EINVAL;
ffc1139c: 3b 80 00 16 li r28,22
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
ffc113a0: 93 a1 00 14 stw r29,20(r1)
ffc113a4: 7c bd 2b 78 mr r29,r5
ffc113a8: 93 e1 00 1c stw r31,28(r1)
ffc113ac: 7c 9f 23 78 mr r31,r4
ffc113b0: 90 01 00 24 stw r0,36(r1)
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
ffc113b4: 4b ff ff a5 bl ffc11358 <_POSIX_Priority_Is_valid>
ffc113b8: 2f 83 00 00 cmpwi cr7,r3,0
ffc113bc: 40 9e 00 2c bne- cr7,ffc113e8 <_POSIX_Thread_Translate_sched_param+0x6c><== ALWAYS TAKEN
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
ffc113c0: 80 01 00 24 lwz r0,36(r1)
ffc113c4: 7f 83 e3 78 mr r3,r28
ffc113c8: 83 61 00 0c lwz r27,12(r1)
ffc113cc: 7c 08 03 a6 mtlr r0
ffc113d0: 83 81 00 10 lwz r28,16(r1)
ffc113d4: 83 a1 00 14 lwz r29,20(r1)
ffc113d8: 83 c1 00 18 lwz r30,24(r1)
ffc113dc: 83 e1 00 1c lwz r31,28(r1)
ffc113e0: 38 21 00 20 addi r1,r1,32
ffc113e4: 4e 80 00 20 blr
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
ffc113e8: 2f 9e 00 00 cmpwi cr7,r30,0
)
{
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc113ec: 38 00 00 00 li r0,0
ffc113f0: 90 1d 00 00 stw r0,0(r29)
*budget_callout = NULL;
ffc113f4: 90 1b 00 00 stw r0,0(r27)
if ( policy == SCHED_OTHER ) {
ffc113f8: 41 9e 00 a4 beq- cr7,ffc1149c <_POSIX_Thread_Translate_sched_param+0x120>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
ffc113fc: 2f 9e 00 01 cmpwi cr7,r30,1
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
ffc11400: 3b 80 00 00 li r28,0
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
ffc11404: 41 be ff bc beq- cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
ffc11408: 2f 9e 00 02 cmpwi cr7,r30,2
ffc1140c: 41 9e 00 c4 beq- cr7,ffc114d0 <_POSIX_Thread_Translate_sched_param+0x154>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
ffc11410: 2f 9e 00 04 cmpwi cr7,r30,4
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
ffc11414: 3b 80 00 16 li r28,22
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
ffc11418: 40 9e ff a8 bne+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
ffc1141c: 80 1f 00 08 lwz r0,8(r31)
ffc11420: 2f 80 00 00 cmpwi cr7,r0,0
ffc11424: 40 9e 00 10 bne- cr7,ffc11434 <_POSIX_Thread_Translate_sched_param+0xb8>
ffc11428: 80 1f 00 0c lwz r0,12(r31)
ffc1142c: 2f 80 00 00 cmpwi cr7,r0,0
ffc11430: 41 9e ff 90 beq+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
ffc11434: 80 1f 00 10 lwz r0,16(r31)
ffc11438: 2f 80 00 00 cmpwi cr7,r0,0
ffc1143c: 40 9e 00 14 bne- cr7,ffc11450 <_POSIX_Thread_Translate_sched_param+0xd4>
ffc11440: 80 1f 00 14 lwz r0,20(r31)
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
ffc11444: 3b 80 00 16 li r28,22
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
ffc11448: 2f 80 00 00 cmpwi cr7,r0,0
ffc1144c: 41 9e ff 74 beq+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
ffc11450: 38 7f 00 08 addi r3,r31,8
ffc11454: 4b ff cf 09 bl ffc0e35c <_Timespec_To_ticks>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
ffc11458: 3b 80 00 16 li r28,22
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
ffc1145c: 7c 7e 1b 78 mr r30,r3
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
ffc11460: 38 7f 00 10 addi r3,r31,16
ffc11464: 4b ff ce f9 bl ffc0e35c <_Timespec_To_ticks>
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
ffc11468: 7f 9e 18 40 cmplw cr7,r30,r3
ffc1146c: 41 9c ff 54 blt+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
ffc11470: 80 7f 00 04 lwz r3,4(r31)
ffc11474: 4b ff fe e5 bl ffc11358 <_POSIX_Priority_Is_valid>
ffc11478: 2f 83 00 00 cmpwi cr7,r3,0
ffc1147c: 41 9e ff 44 beq+ cr7,ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
ffc11480: 38 00 00 03 li r0,3
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
ffc11484: 3d 20 ff c1 lis r9,-63
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
ffc11488: 90 1d 00 00 stw r0,0(r29)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
ffc1148c: 38 09 97 7c addi r0,r9,-26756
return 0;
ffc11490: 3b 80 00 00 li r28,0
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
ffc11494: 90 1b 00 00 stw r0,0(r27)
return 0;
ffc11498: 4b ff ff 28 b ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc1149c: 38 00 00 01 li r0,1
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
ffc114a0: 83 61 00 0c lwz r27,12(r1)
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc114a4: 90 1d 00 00 stw r0,0(r29)
return 0;
ffc114a8: 3b 80 00 00 li r28,0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
ffc114ac: 7f 83 e3 78 mr r3,r28
ffc114b0: 80 01 00 24 lwz r0,36(r1)
ffc114b4: 83 81 00 10 lwz r28,16(r1)
ffc114b8: 7c 08 03 a6 mtlr r0
ffc114bc: 83 a1 00 14 lwz r29,20(r1)
ffc114c0: 83 c1 00 18 lwz r30,24(r1)
ffc114c4: 83 e1 00 1c lwz r31,28(r1)
ffc114c8: 38 21 00 20 addi r1,r1,32
ffc114cc: 4e 80 00 20 blr
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
ffc114d0: 93 dd 00 00 stw r30,0(r29)
return 0;
ffc114d4: 4b ff fe ec b ffc113c0 <_POSIX_Thread_Translate_sched_param+0x44>
ffc10274 <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ffc10274: 94 21 ff e8 stwu r1,-24(r1)
ffc10278: 7c 08 02 a6 mflr r0
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ffc1027c: 7c 83 23 78 mr r3,r4
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ffc10280: 93 81 00 08 stw r28,8(r1)
ffc10284: 93 a1 00 0c stw r29,12(r1)
ffc10288: 7c 9d 23 78 mr r29,r4
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
ffc1028c: 83 84 01 34 lwz r28,308(r4)
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ffc10290: 90 01 00 1c stw r0,28(r1)
ffc10294: 93 c1 00 10 stw r30,16(r1)
ffc10298: 93 e1 00 14 stw r31,20(r1)
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ffc1029c: 48 00 2e f1 bl ffc1318c <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
ffc102a0: 7f a3 eb 78 mr r3,r29
ffc102a4: 48 00 2f 85 bl ffc13228 <_POSIX_Keys_Run_destructors>
ffc102a8: 3b fc 00 44 addi r31,r28,68
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
ffc102ac: 83 dd 00 28 lwz r30,40(r29)
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
ffc102b0: 48 00 00 0c b ffc102bc <_POSIX_Threads_Delete_extension+0x48>
*(void **)the_thread->Wait.return_argument = value_ptr;
ffc102b4: 81 23 00 28 lwz r9,40(r3) <== NOT EXECUTED
ffc102b8: 93 c9 00 00 stw r30,0(r9) <== NOT EXECUTED
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
ffc102bc: 7f e3 fb 78 mr r3,r31
ffc102c0: 4b ff c6 69 bl ffc0c928 <_Thread_queue_Dequeue>
ffc102c4: 2c 03 00 00 cmpwi r3,0
ffc102c8: 40 82 ff ec bne+ ffc102b4 <_POSIX_Threads_Delete_extension+0x40><== NEVER TAKEN
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
ffc102cc: 80 1c 00 84 lwz r0,132(r28)
ffc102d0: 2f 80 00 04 cmpwi cr7,r0,4
ffc102d4: 41 9e 00 34 beq- cr7,ffc10308 <_POSIX_Threads_Delete_extension+0x94>
(void) _Watchdog_Remove( &api->Sporadic_timer );
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
ffc102d8: 38 00 00 00 li r0,0
ffc102dc: 90 1d 01 34 stw r0,308(r29)
_Workspace_Free( api );
ffc102e0: 7f 83 e3 78 mr r3,r28
ffc102e4: 4b ff d9 41 bl ffc0dc24 <_Workspace_Free>
}
ffc102e8: 80 01 00 1c lwz r0,28(r1)
ffc102ec: 83 81 00 08 lwz r28,8(r1)
ffc102f0: 7c 08 03 a6 mtlr r0
ffc102f4: 83 a1 00 0c lwz r29,12(r1)
ffc102f8: 83 c1 00 10 lwz r30,16(r1)
ffc102fc: 83 e1 00 14 lwz r31,20(r1)
ffc10300: 38 21 00 18 addi r1,r1,24
ffc10304: 4e 80 00 20 blr
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
ffc10308: 38 7c 00 a8 addi r3,r28,168
ffc1030c: 4b ff d6 b9 bl ffc0d9c4 <_Watchdog_Remove>
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
ffc10310: 38 00 00 00 li r0,0
ffc10314: 90 1d 01 34 stw r0,308(r29)
_Workspace_Free( api );
ffc10318: 7f 83 e3 78 mr r3,r28
ffc1031c: 4b ff d9 09 bl ffc0dc24 <_Workspace_Free>
}
ffc10320: 80 01 00 1c lwz r0,28(r1)
ffc10324: 83 81 00 08 lwz r28,8(r1)
ffc10328: 7c 08 03 a6 mtlr r0
ffc1032c: 83 a1 00 0c lwz r29,12(r1)
ffc10330: 83 c1 00 10 lwz r30,16(r1)
ffc10334: 83 e1 00 14 lwz r31,20(r1)
ffc10338: 38 21 00 18 addi r1,r1,24
ffc1033c: 4e 80 00 20 blr
ffc10230 <_POSIX_Threads_Exitted_extension>:
* This method is invoked each time a thread exits.
*/
void _POSIX_Threads_Exitted_extension(
Thread_Control *executing
)
{
ffc10230: 7c 08 02 a6 mflr r0
ffc10234: 94 21 ff f8 stwu r1,-8(r1)
ffc10238: 90 01 00 0c stw r0,12(r1)
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
ffc1023c: 88 03 00 08 lbz r0,8(r3)
ffc10240: 54 00 07 7e clrlwi r0,r0,29
/*
* If the executing thread was not created with the POSIX API, then this
* API do not get to define its exit behavior.
*/
if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API )
ffc10244: 2f 80 00 03 cmpwi cr7,r0,3
ffc10248: 41 9e 00 14 beq- cr7,ffc1025c <_POSIX_Threads_Exitted_extension+0x2c>
pthread_exit( executing->Wait.return_argument );
}
ffc1024c: 80 01 00 0c lwz r0,12(r1)
ffc10250: 38 21 00 08 addi r1,r1,8
ffc10254: 7c 08 03 a6 mtlr r0
ffc10258: 4e 80 00 20 blr
/*
* If the executing thread was not created with the POSIX API, then this
* API do not get to define its exit behavior.
*/
if ( _Objects_Get_API( executing->Object.id ) == OBJECTS_POSIX_API )
pthread_exit( executing->Wait.return_argument );
ffc1025c: 80 63 00 28 lwz r3,40(r3)
ffc10260: 48 00 34 45 bl ffc136a4 <pthread_exit>
}
ffc10264: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
ffc10268: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc1026c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc10270: 4e 80 00 20 blr <== NOT EXECUTED
ffc0935c <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc0935c: 94 21 ff 98 stwu r1,-104(r1)
ffc09360: 7c 08 02 a6 mflr r0
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
ffc09364: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc09368: 90 01 00 6c stw r0,108(r1)
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
ffc0936c: 39 29 20 44 addi r9,r9,8260
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc09370: 93 e1 00 64 stw r31,100(r1)
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
ffc09374: 83 e9 00 34 lwz r31,52(r9)
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc09378: 93 a1 00 5c stw r29,92(r1)
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
maximum = Configuration_POSIX_API.number_of_initialization_threads;
if ( !user_threads || maximum == 0 )
ffc0937c: 2f 9f 00 00 cmpwi cr7,r31,0
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc09380: 93 c1 00 60 stw r30,96(r1)
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
maximum = Configuration_POSIX_API.number_of_initialization_threads;
ffc09384: 83 a9 00 30 lwz r29,48(r9)
if ( !user_threads || maximum == 0 )
ffc09388: 41 9e 00 5c beq- cr7,ffc093e4 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN
ffc0938c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc09390: 41 9e 00 54 beq- cr7,ffc093e4 <_POSIX_Threads_Initialize_user_threads_body+0x88><== NEVER TAKEN
ffc09394: 3b c0 00 00 li r30,0
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
ffc09398: 38 61 00 0c addi r3,r1,12
ffc0939c: 48 00 81 3d bl ffc114d8 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
ffc093a0: 38 80 00 02 li r4,2
ffc093a4: 38 61 00 0c addi r3,r1,12
ffc093a8: 48 00 81 71 bl ffc11518 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
ffc093ac: 80 9f 00 04 lwz r4,4(r31)
ffc093b0: 38 61 00 0c addi r3,r1,12
ffc093b4: 48 00 81 99 bl ffc1154c <pthread_attr_setstacksize>
status = pthread_create(
ffc093b8: 80 bf 00 00 lwz r5,0(r31)
ffc093bc: 38 61 00 08 addi r3,r1,8
ffc093c0: 38 81 00 0c addi r4,r1,12
ffc093c4: 38 c0 00 00 li r6,0
ffc093c8: 4b ff fb 3d bl ffc08f04 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
ffc093cc: 7c 65 1b 79 mr. r5,r3
ffc093d0: 40 82 00 30 bne- ffc09400 <_POSIX_Threads_Initialize_user_threads_body+0xa4>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc093d4: 3b de 00 01 addi r30,r30,1
ffc093d8: 7f 9d f0 00 cmpw cr7,r29,r30
ffc093dc: 3b ff 00 08 addi r31,r31,8
ffc093e0: 40 9e ff b8 bne+ cr7,ffc09398 <_POSIX_Threads_Initialize_user_threads_body+0x3c><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
ffc093e4: 80 01 00 6c lwz r0,108(r1)
ffc093e8: 83 a1 00 5c lwz r29,92(r1)
ffc093ec: 7c 08 03 a6 mtlr r0
ffc093f0: 83 c1 00 60 lwz r30,96(r1)
ffc093f4: 83 e1 00 64 lwz r31,100(r1)
ffc093f8: 38 21 00 68 addi r1,r1,104
ffc093fc: 4e 80 00 20 blr
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
ffc09400: 38 60 00 02 li r3,2
ffc09404: 38 80 00 01 li r4,1
ffc09408: 48 00 29 91 bl ffc0bd98 <_Internal_error_Occurred>
ffc104a4 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
ffc104a4: 94 21 ff f0 stwu r1,-16(r1)
ffc104a8: 7c 08 02 a6 mflr r0
ffc104ac: 90 01 00 14 stw r0,20(r1)
ffc104b0: 93 e1 00 0c stw r31,12(r1)
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc104b4: 83 e4 01 34 lwz r31,308(r4)
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
ffc104b8: 93 c1 00 08 stw r30,8(r1)
ffc104bc: 7c 9e 23 78 mr r30,r4
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
ffc104c0: 38 7f 00 98 addi r3,r31,152
ffc104c4: 48 00 12 7d bl ffc11740 <_Timespec_To_ticks>
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
ffc104c8: 80 1e 00 1c lwz r0,28(r30)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
ffc104cc: 3d 20 00 00 lis r9,0
ffc104d0: 2f 80 00 00 cmpwi cr7,r0,0
ffc104d4: 88 89 27 24 lbz r4,10020(r9)
ffc104d8: 80 1f 00 88 lwz r0,136(r31)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
ffc104dc: 90 7e 00 78 stw r3,120(r30)
ffc104e0: 7c 80 20 50 subf r4,r0,r4
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
ffc104e4: 90 9e 00 18 stw r4,24(r30)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
ffc104e8: 40 9e 00 10 bne- cr7,ffc104f8 <_POSIX_Threads_Sporadic_budget_TSR+0x54><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
ffc104ec: 80 1e 00 14 lwz r0,20(r30)
ffc104f0: 7f 80 20 40 cmplw cr7,r0,r4
ffc104f4: 41 9d 00 38 bgt- cr7,ffc1052c <_POSIX_Threads_Sporadic_budget_TSR+0x88>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
ffc104f8: 38 7f 00 90 addi r3,r31,144
ffc104fc: 48 00 12 45 bl ffc11740 <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc10500: 38 9f 00 a8 addi r4,r31,168
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc10504: 90 7f 00 b4 stw r3,180(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc10508: 3c 60 00 00 lis r3,0
ffc1050c: 38 63 2d 68 addi r3,r3,11624
ffc10510: 4b ff d2 ed bl ffc0d7fc <_Watchdog_Insert>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
ffc10514: 80 01 00 14 lwz r0,20(r1)
ffc10518: 83 c1 00 08 lwz r30,8(r1)
ffc1051c: 7c 08 03 a6 mtlr r0
ffc10520: 83 e1 00 0c lwz r31,12(r1)
ffc10524: 38 21 00 10 addi r1,r1,16
ffc10528: 4e 80 00 20 blr
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
ffc1052c: 7f c3 f3 78 mr r3,r30
ffc10530: 38 a0 00 01 li r5,1
ffc10534: 4b ff b9 91 bl ffc0bec4 <_Thread_Change_priority>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
ffc10538: 38 7f 00 90 addi r3,r31,144
ffc1053c: 48 00 12 05 bl ffc11740 <_Timespec_To_ticks>
ffc10540: 38 9f 00 a8 addi r4,r31,168
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc10544: 90 7f 00 b4 stw r3,180(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc10548: 3c 60 00 00 lis r3,0
ffc1054c: 38 63 2d 68 addi r3,r3,11624
ffc10550: 4b ff d2 ad bl ffc0d7fc <_Watchdog_Insert>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
ffc10554: 80 01 00 14 lwz r0,20(r1)
ffc10558: 83 c1 00 08 lwz r30,8(r1)
ffc1055c: 7c 08 03 a6 mtlr r0
ffc10560: 83 e1 00 0c lwz r31,12(r1)
ffc10564: 38 21 00 10 addi r1,r1,16
ffc10568: 4e 80 00 20 blr
ffc1056c <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
ffc1056c: 7c 08 02 a6 mflr r0
ffc10570: 94 21 ff f8 stwu r1,-8(r1)
ffc10574: 90 01 00 0c stw r0,12(r1)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
ffc10578: 80 03 00 1c lwz r0,28(r3)
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1057c: 81 63 01 34 lwz r11,308(r3)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
ffc10580: 2f 80 00 00 cmpwi cr7,r0,0
ffc10584: 80 0b 00 8c lwz r0,140(r11)
ffc10588: 3d 60 00 00 lis r11,0
ffc1058c: 88 8b 27 24 lbz r4,10020(r11)
ffc10590: 7c 80 20 50 subf r4,r0,r4
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
ffc10594: 38 00 ff ff li r0,-1
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
ffc10598: 90 83 00 18 stw r4,24(r3)
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
ffc1059c: 90 03 00 78 stw r0,120(r3)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
ffc105a0: 40 9e 00 10 bne- cr7,ffc105b0 <_POSIX_Threads_Sporadic_budget_callout+0x44><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
ffc105a4: 80 03 00 14 lwz r0,20(r3)
ffc105a8: 7f 80 20 40 cmplw cr7,r0,r4
ffc105ac: 41 9c 00 14 blt- cr7,ffc105c0 <_POSIX_Threads_Sporadic_budget_callout+0x54><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
ffc105b0: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
ffc105b4: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc105b8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc105bc: 4e 80 00 20 blr <== NOT EXECUTED
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
ffc105c0: 38 a0 00 01 li r5,1
ffc105c4: 4b ff b9 01 bl ffc0bec4 <_Thread_Change_priority>
#if 0
printk( "lower priority\n" );
#endif
}
}
}
ffc105c8: 80 01 00 0c lwz r0,12(r1)
ffc105cc: 38 21 00 08 addi r1,r1,8
ffc105d0: 7c 08 03 a6 mtlr r0
ffc105d4: 4e 80 00 20 blr
ffc1318c <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
ffc1318c: 94 21 ff e8 stwu r1,-24(r1)
ffc13190: 7c 08 02 a6 mflr r0
ffc13194: 90 01 00 1c stw r0,28(r1)
ffc13198: 93 c1 00 10 stw r30,16(r1)
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1319c: 83 c3 01 34 lwz r30,308(r3)
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
ffc131a0: 93 a1 00 0c stw r29,12(r1)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc131a4: 3b be 00 e8 addi r29,r30,232
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
ffc131a8: 80 1e 00 e4 lwz r0,228(r30)
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
ffc131ac: 93 e1 00 14 stw r31,20(r1)
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
ffc131b0: 7f 80 e8 00 cmpw cr7,r0,r29
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
ffc131b4: 38 00 00 01 li r0,1
ffc131b8: 90 1e 00 d8 stw r0,216(r30)
while ( !_Chain_Is_empty( handler_stack ) ) {
ffc131bc: 41 9e 00 50 beq- cr7,ffc1320c <_POSIX_Threads_cancel_run+0x80>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc131c0: 7c 00 00 a6 mfmsr r0
ffc131c4: 7d 30 42 a6 mfsprg r9,0
ffc131c8: 7c 09 48 78 andc r9,r0,r9
ffc131cc: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
handler = (POSIX_Cancel_Handler_control *)
ffc131d0: 83 fe 00 ec lwz r31,236(r30)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc131d4: 81 7f 00 00 lwz r11,0(r31)
previous = the_node->previous;
ffc131d8: 81 3f 00 04 lwz r9,4(r31)
next->previous = previous;
ffc131dc: 91 2b 00 04 stw r9,4(r11)
previous->next = next;
ffc131e0: 91 69 00 00 stw r11,0(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc131e4: 7c 00 01 24 mtmsr r0
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
(*handler->routine)( handler->arg );
ffc131e8: 80 1f 00 08 lwz r0,8(r31)
ffc131ec: 80 7f 00 0c lwz r3,12(r31)
ffc131f0: 7c 09 03 a6 mtctr r0
ffc131f4: 4e 80 04 21 bctrl
_Workspace_Free( handler );
ffc131f8: 7f e3 fb 78 mr r3,r31
ffc131fc: 4b ff aa 29 bl ffc0dc24 <_Workspace_Free>
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
ffc13200: 80 1e 00 e4 lwz r0,228(r30)
ffc13204: 7f 80 e8 00 cmpw cr7,r0,r29
ffc13208: 40 9e ff b8 bne+ cr7,ffc131c0 <_POSIX_Threads_cancel_run+0x34><== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
ffc1320c: 80 01 00 1c lwz r0,28(r1)
ffc13210: 83 a1 00 0c lwz r29,12(r1)
ffc13214: 7c 08 03 a6 mtlr r0
ffc13218: 83 c1 00 10 lwz r30,16(r1)
ffc1321c: 83 e1 00 14 lwz r31,20(r1)
ffc13220: 38 21 00 18 addi r1,r1,24
ffc13224: 4e 80 00 20 blr
ffc090d8 <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
ffc090d8: 94 21 ff f0 stwu r1,-16(r1)
ffc090dc: 7c 08 02 a6 mflr r0
ffc090e0: 90 01 00 14 stw r0,20(r1)
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
ffc090e4: 80 04 00 54 lwz r0,84(r4)
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
ffc090e8: 81 24 00 68 lwz r9,104(r4)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
ffc090ec: 2f 80 00 00 cmpwi cr7,r0,0
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
ffc090f0: 93 e1 00 0c stw r31,12(r1)
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
ffc090f4: 38 09 00 01 addi r0,r9,1
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
ffc090f8: 7c 9f 23 78 mr r31,r4
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
ffc090fc: 90 04 00 68 stw r0,104(r4)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
ffc09100: 40 9e 00 40 bne- cr7,ffc09140 <_POSIX_Timer_TSR+0x68>
ffc09104: 80 04 00 58 lwz r0,88(r4)
ffc09108: 2f 80 00 00 cmpwi cr7,r0,0
ffc0910c: 40 9e 00 34 bne- cr7,ffc09140 <_POSIX_Timer_TSR+0x68> <== ALWAYS TAKEN
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
ffc09110: 38 00 00 04 li r0,4 <== NOT EXECUTED
ffc09114: 98 04 00 3c stb r0,60(r4) <== NOT EXECUTED
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
ffc09118: 80 7f 00 38 lwz r3,56(r31)
ffc0911c: 80 9f 00 44 lwz r4,68(r31)
ffc09120: 48 00 79 5d bl ffc10a7c <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
ffc09124: 38 00 00 00 li r0,0
ffc09128: 90 1f 00 68 stw r0,104(r31)
}
ffc0912c: 80 01 00 14 lwz r0,20(r1)
ffc09130: 83 e1 00 0c lwz r31,12(r1)
ffc09134: 38 21 00 10 addi r1,r1,16
ffc09138: 7c 08 03 a6 mtlr r0
ffc0913c: 4e 80 00 20 blr
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
ffc09140: 80 9f 00 64 lwz r4,100(r31)
ffc09144: 3c c0 ff c1 lis r6,-63
ffc09148: 80 bf 00 08 lwz r5,8(r31)
ffc0914c: 38 7f 00 10 addi r3,r31,16
ffc09150: 38 c6 90 d8 addi r6,r6,-28456
ffc09154: 7f e7 fb 78 mr r7,r31
ffc09158: 48 00 7f 31 bl ffc11088 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
ffc0915c: 2f 83 00 00 cmpwi cr7,r3,0
ffc09160: 41 9e ff cc beq+ cr7,ffc0912c <_POSIX_Timer_TSR+0x54> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
ffc09164: 38 7f 00 6c addi r3,r31,108
ffc09168: 48 00 1d e5 bl ffc0af4c <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
ffc0916c: 38 00 00 03 li r0,3
ffc09170: 98 1f 00 3c stb r0,60(r31)
ffc09174: 4b ff ff a4 b ffc09118 <_POSIX_Timer_TSR+0x40>
ffc13308 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc13308: 94 21 ff 98 stwu r1,-104(r1)
ffc1330c: 7c 08 02 a6 mflr r0
ffc13310: 7c a6 2b 78 mr r6,r5
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
ffc13314: 38 e0 00 01 li r7,1
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc13318: 93 c1 00 60 stw r30,96(r1)
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
ffc1331c: 38 a1 00 08 addi r5,r1,8
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc13320: 93 e1 00 64 stw r31,100(r1)
ffc13324: 7c 9e 23 78 mr r30,r4
ffc13328: 7c 7f 1b 78 mr r31,r3
ffc1332c: 90 01 00 6c stw r0,108(r1)
ffc13330: 93 21 00 4c stw r25,76(r1)
ffc13334: 93 41 00 50 stw r26,80(r1)
ffc13338: 93 61 00 54 stw r27,84(r1)
ffc1333c: 93 81 00 58 stw r28,88(r1)
ffc13340: 93 a1 00 5c stw r29,92(r1)
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
ffc13344: 48 00 00 cd bl ffc13410 <_POSIX_signals_Clear_signals>
ffc13348: 2f 83 00 00 cmpwi cr7,r3,0
is_global, true ) )
return false;
ffc1334c: 38 60 00 00 li r3,0
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
Thread_Wait_information stored_thread_wait_information;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
ffc13350: 41 9e 00 80 beq- cr7,ffc133d0 <_POSIX_signals_Check_signal+0xc8>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
ffc13354: 1f 9e 00 0c mulli r28,r30,12
ffc13358: 3f 60 00 00 lis r27,0
ffc1335c: 3b 7b 31 c0 addi r27,r27,12736
ffc13360: 7d 3b e2 14 add r9,r27,r28
ffc13364: 83 a9 00 08 lwz r29,8(r9)
ffc13368: 2f 9d 00 01 cmpwi cr7,r29,1
ffc1336c: 41 9e 00 64 beq- cr7,ffc133d0 <_POSIX_signals_Check_signal+0xc8><== NEVER TAKEN
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
ffc13370: 83 5f 00 d0 lwz r26,208(r31)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
ffc13374: 3f 20 00 00 lis r25,0
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
ffc13378: 80 09 00 04 lwz r0,4(r9)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
ffc1337c: 3b 39 31 44 addi r25,r25,12612
ffc13380: 80 99 00 0c lwz r4,12(r25)
ffc13384: 38 61 00 14 addi r3,r1,20
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
ffc13388: 7c 00 d3 78 or r0,r0,r26
ffc1338c: 90 1f 00 d0 stw r0,208(r31)
/*
* We have to save the blocking information of the current wait queue
* because the signal handler may subsequently go on and put the thread
* on a wait queue, for its own purposes.
*/
memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait,
ffc13390: 38 84 00 20 addi r4,r4,32
ffc13394: 38 a0 00 28 li r5,40
ffc13398: 48 00 17 31 bl ffc14ac8 <memcpy>
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
ffc1339c: 7c 1b e0 2e lwzx r0,r27,r28
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
ffc133a0: 7f c3 f3 78 mr r3,r30
sizeof( Thread_Wait_information ));
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
ffc133a4: 2f 80 00 02 cmpwi cr7,r0,2
ffc133a8: 41 9e 00 54 beq- cr7,ffc133fc <_POSIX_signals_Check_signal+0xf4>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
ffc133ac: 7f a9 03 a6 mtctr r29
ffc133b0: 4e 80 04 21 bctrl
}
/*
* Restore the blocking information
*/
memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information,
ffc133b4: 80 79 00 0c lwz r3,12(r25)
ffc133b8: 38 81 00 14 addi r4,r1,20
ffc133bc: 38 a0 00 28 li r5,40
ffc133c0: 38 63 00 20 addi r3,r3,32
ffc133c4: 48 00 17 05 bl ffc14ac8 <memcpy>
sizeof( Thread_Wait_information ));
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
ffc133c8: 93 5f 00 d0 stw r26,208(r31)
return true;
ffc133cc: 38 60 00 01 li r3,1
}
ffc133d0: 80 01 00 6c lwz r0,108(r1)
ffc133d4: 83 21 00 4c lwz r25,76(r1)
ffc133d8: 7c 08 03 a6 mtlr r0
ffc133dc: 83 41 00 50 lwz r26,80(r1)
ffc133e0: 83 61 00 54 lwz r27,84(r1)
ffc133e4: 83 81 00 58 lwz r28,88(r1)
ffc133e8: 83 a1 00 5c lwz r29,92(r1)
ffc133ec: 83 c1 00 60 lwz r30,96(r1)
ffc133f0: 83 e1 00 64 lwz r31,100(r1)
ffc133f4: 38 21 00 68 addi r1,r1,104
ffc133f8: 4e 80 00 20 blr
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
ffc133fc: 38 81 00 08 addi r4,r1,8
ffc13400: 7f a9 03 a6 mtctr r29
ffc13404: 38 a0 00 00 li r5,0
ffc13408: 4e 80 04 21 bctrl
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
ffc1340c: 4b ff ff a8 b ffc133b4 <_POSIX_signals_Check_signal+0xac>
ffc13d00 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc13d00: 7d 60 00 a6 mfmsr r11
ffc13d04: 7c 10 42 a6 mfsprg r0,0
ffc13d08: 7d 60 00 78 andc r0,r11,r0
ffc13d0c: 7c 00 01 24 mtmsr r0
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
ffc13d10: 3d 20 00 00 lis r9,0
ffc13d14: 1c 03 00 0c mulli r0,r3,12
ffc13d18: 39 29 31 c0 addi r9,r9,12736
ffc13d1c: 7d 29 00 2e lwzx r9,r9,r0
ffc13d20: 2f 89 00 02 cmpwi cr7,r9,2
ffc13d24: 41 9e 00 28 beq- cr7,ffc13d4c <_POSIX_signals_Clear_process_signals+0x4c>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
ffc13d28: 3d 20 00 00 lis r9,0
ffc13d2c: 80 09 28 50 lwz r0,10320(r9)
ffc13d30: 39 40 ff fe li r10,-2
ffc13d34: 38 63 ff ff addi r3,r3,-1
ffc13d38: 5d 43 18 3e rotlw r3,r10,r3
ffc13d3c: 7c 63 00 38 and r3,r3,r0
ffc13d40: 90 69 28 50 stw r3,10320(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc13d44: 7d 60 01 24 mtmsr r11
}
_ISR_Enable( level );
}
ffc13d48: 4e 80 00 20 blr
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
ffc13d4c: 3d 20 00 00 lis r9,0
ffc13d50: 39 29 33 b4 addi r9,r9,13236
ffc13d54: 7d 40 4a 14 add r10,r0,r9
ffc13d58: 7d 29 00 2e lwzx r9,r9,r0
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc13d5c: 38 0a 00 04 addi r0,r10,4
ffc13d60: 7f 89 00 00 cmpw cr7,r9,r0
ffc13d64: 41 be ff c4 beq- cr7,ffc13d28 <_POSIX_signals_Clear_process_signals+0x28><== ALWAYS TAKEN
ffc13d68: 7d 60 01 24 mtmsr r11 <== NOT EXECUTED
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
}
ffc13d6c: 4e 80 00 20 blr <== NOT EXECUTED
ffc09d90 <_POSIX_signals_Get_lowest>:
ffc09d90: 38 00 00 05 li r0,5
ffc09d94: 7c 09 03 a6 mtctr r0
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc09d98: 39 20 00 1b li r9,27
ffc09d9c: 39 60 00 01 li r11,1
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
ffc09da0: 38 09 ff ff addi r0,r9,-1
ffc09da4: 7d 60 00 30 slw r0,r11,r0
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc09da8: 7c 0a 18 39 and. r10,r0,r3
ffc09dac: 40 82 00 38 bne- ffc09de4 <_POSIX_signals_Get_lowest+0x54><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc09db0: 39 29 00 01 addi r9,r9,1
ffc09db4: 42 00 ff ec bdnz+ ffc09da0 <_POSIX_signals_Get_lowest+0x10>
ffc09db8: 38 00 00 1a li r0,26
ffc09dbc: 39 20 00 01 li r9,1
ffc09dc0: 7c 09 03 a6 mtctr r0
ffc09dc4: 39 60 00 01 li r11,1
ffc09dc8: 48 00 00 0c b ffc09dd4 <_POSIX_signals_Get_lowest+0x44>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
ffc09dcc: 39 29 00 01 addi r9,r9,1
ffc09dd0: 42 40 00 14 bdz- ffc09de4 <_POSIX_signals_Get_lowest+0x54>
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_lowest(
ffc09dd4: 38 09 ff ff addi r0,r9,-1
ffc09dd8: 7d 60 00 30 slw r0,r11,r0
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc09ddc: 7c 0a 18 39 and. r10,r0,r3
ffc09de0: 41 82 ff ec beq+ ffc09dcc <_POSIX_signals_Get_lowest+0x3c>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
ffc09de4: 7d 23 4b 78 mr r3,r9
ffc09de8: 4e 80 00 20 blr
ffc0ff74 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
ffc0ff74: 94 21 ff e0 stwu r1,-32(r1)
ffc0ff78: 7c 08 02 a6 mflr r0
ffc0ff7c: 90 01 00 24 stw r0,36(r1)
ffc0ff80: 93 c1 00 18 stw r30,24(r1)
POSIX_API_Control *api;
int signo;
ISR_Level level;
int hold_errno;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0ff84: 83 c3 01 34 lwz r30,308(r3)
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
ffc0ff88: 93 81 00 10 stw r28,16(r1)
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
ffc0ff8c: 3f 80 00 00 lis r28,0
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
ffc0ff90: 2f 9e 00 00 cmpwi cr7,r30,0
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
ffc0ff94: 3b 9c 31 44 addi r28,r28,12612
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
ffc0ff98: 93 61 00 0c stw r27,12(r1)
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
ffc0ff9c: 81 3c 00 0c lwz r9,12(r28)
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
ffc0ffa0: 93 a1 00 14 stw r29,20(r1)
ffc0ffa4: 93 e1 00 1c stw r31,28(r1)
/*
* We need to ensure that if the signal handler executes a call
* which overwrites the unblocking status, we restore it.
*/
hold_errno = _Thread_Executing->Wait.return_code;
ffc0ffa8: 83 69 00 34 lwz r27,52(r9)
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
ffc0ffac: 41 9e 00 cc beq- cr7,ffc10078 <_POSIX_signals_Post_switch_extension+0x104>
ffc0ffb0: 3f a0 00 00 lis r29,0
ffc0ffb4: 3b bd 28 50 addi r29,r29,10320
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0ffb8: 7c 00 00 a6 mfmsr r0
ffc0ffbc: 7d 30 42 a6 mfsprg r9,0
ffc0ffc0: 7c 09 48 78 andc r9,r0,r9
ffc0ffc4: 7d 20 01 24 mtmsr r9
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
ffc0ffc8: 81 5d 00 00 lwz r10,0(r29)
ffc0ffcc: 81 3e 00 d4 lwz r9,212(r30)
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
ffc0ffd0: 81 7e 00 d0 lwz r11,208(r30)
(api->signals_pending | _POSIX_signals_Pending)) ) {
ffc0ffd4: 7d 49 4b 78 or r9,r10,r9
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ffd8: 7c 00 01 24 mtmsr r0
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
ffc0ffdc: 7d 2a 58 79 andc. r10,r9,r11
ffc0ffe0: 41 82 00 90 beq- ffc10070 <_POSIX_signals_Post_switch_extension+0xfc>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc0ffe4: 3b e0 00 1b li r31,27
_POSIX_signals_Check_signal( api, signo, false );
ffc0ffe8: 7f e4 fb 78 mr r4,r31
ffc0ffec: 38 a0 00 00 li r5,0
ffc0fff0: 7f c3 f3 78 mr r3,r30
ffc0fff4: 48 00 33 15 bl ffc13308 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
ffc0fff8: 7f e4 fb 78 mr r4,r31
ffc0fffc: 7f c3 f3 78 mr r3,r30
ffc10000: 38 a0 00 01 li r5,1
ffc10004: 48 00 33 05 bl ffc13308 <_POSIX_signals_Check_signal>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc10008: 2f 9f 00 1f cmpwi cr7,r31,31
ffc1000c: 3b ff 00 01 addi r31,r31,1
ffc10010: 40 9e ff d8 bne+ cr7,ffc0ffe8 <_POSIX_signals_Post_switch_extension+0x74>
ffc10014: 3b e0 00 01 li r31,1
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
ffc10018: 7f e4 fb 78 mr r4,r31
ffc1001c: 38 a0 00 00 li r5,0
ffc10020: 7f c3 f3 78 mr r3,r30
ffc10024: 48 00 32 e5 bl ffc13308 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
ffc10028: 7f e4 fb 78 mr r4,r31
ffc1002c: 7f c3 f3 78 mr r3,r30
ffc10030: 38 a0 00 01 li r5,1
ffc10034: 48 00 32 d5 bl ffc13308 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
ffc10038: 2f 9f 00 1a cmpwi cr7,r31,26
ffc1003c: 3b ff 00 01 addi r31,r31,1
ffc10040: 40 9e ff d8 bne+ cr7,ffc10018 <_POSIX_signals_Post_switch_extension+0xa4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc10044: 7c 00 00 a6 mfmsr r0
ffc10048: 7d 30 42 a6 mfsprg r9,0
ffc1004c: 7c 09 48 78 andc r9,r0,r9
ffc10050: 7d 20 01 24 mtmsr r9
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
ffc10054: 81 5d 00 00 lwz r10,0(r29)
ffc10058: 81 3e 00 d4 lwz r9,212(r30)
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
ffc1005c: 81 7e 00 d0 lwz r11,208(r30)
(api->signals_pending | _POSIX_signals_Pending)) ) {
ffc10060: 7d 49 4b 78 or r9,r10,r9
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc10064: 7c 00 01 24 mtmsr r0
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
ffc10068: 7d 2a 58 79 andc. r10,r9,r11
ffc1006c: 40 82 ff 78 bne+ ffc0ffe4 <_POSIX_signals_Post_switch_extension+0x70><== NEVER TAKEN
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
_Thread_Executing->Wait.return_code = hold_errno;
ffc10070: 81 3c 00 0c lwz r9,12(r28)
ffc10074: 93 69 00 34 stw r27,52(r9)
}
ffc10078: 80 01 00 24 lwz r0,36(r1)
ffc1007c: 83 61 00 0c lwz r27,12(r1)
ffc10080: 7c 08 03 a6 mtlr r0
ffc10084: 83 81 00 10 lwz r28,16(r1)
ffc10088: 83 a1 00 14 lwz r29,20(r1)
ffc1008c: 83 c1 00 18 lwz r30,24(r1)
ffc10090: 83 e1 00 1c lwz r31,28(r1)
ffc10094: 38 21 00 20 addi r1,r1,32
ffc10098: 4e 80 00 20 blr
ffc1f298 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1f298: 94 21 ff f0 stwu r1,-16(r1)
ffc1f29c: 7c 08 02 a6 mflr r0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1f2a0: 3d 20 10 00 lis r9,4096
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1f2a4: 90 01 00 14 stw r0,20(r1)
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1f2a8: 61 29 80 00 ori r9,r9,32768
ffc1f2ac: 80 03 00 10 lwz r0,16(r3)
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1f2b0: 93 e1 00 0c stw r31,12(r1)
ffc1f2b4: 7c 7f 1b 78 mr r31,r3
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1f2b8: 7c 0b 48 38 and r11,r0,r9
ffc1f2bc: 7f 8b 48 00 cmpw cr7,r11,r9
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc1f2c0: 93 c1 00 08 stw r30,8(r1)
ffc1f2c4: 39 64 ff ff addi r11,r4,-1
ffc1f2c8: 39 20 00 01 li r9,1
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1f2cc: 81 43 01 34 lwz r10,308(r3)
ffc1f2d0: 7d 2b 58 30 slw r11,r9,r11
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc1f2d4: 41 9e 00 70 beq- cr7,ffc1f344 <_POSIX_signals_Unblock_thread+0xac>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
ffc1f2d8: 81 4a 00 d0 lwz r10,208(r10)
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
ffc1f2dc: 3b c0 00 00 li r30,0
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
ffc1f2e0: 7d 68 50 79 andc. r8,r11,r10
ffc1f2e4: 41 82 00 44 beq- ffc1f328 <_POSIX_signals_Unblock_thread+0x90>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
ffc1f2e8: 74 0b 10 00 andis. r11,r0,4096
ffc1f2ec: 41 82 00 b8 beq- ffc1f3a4 <_POSIX_signals_Unblock_thread+0x10c>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
ffc1f2f0: 3d 20 00 03 lis r9,3
ffc1f2f4: 61 29 be e0 ori r9,r9,48864
the_thread->Wait.return_code = EINTR;
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
ffc1f2f8: 7c 08 48 39 and. r8,r0,r9
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) {
the_thread->Wait.return_code = EINTR;
ffc1f2fc: 39 20 00 04 li r9,4
ffc1f300: 91 23 00 34 stw r9,52(r3)
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
ffc1f304: 40 82 00 e4 bne- ffc1f3e8 <_POSIX_signals_Unblock_thread+0x150>
_Thread_queue_Extract_with_proxy( the_thread );
else if ( _States_Is_delaying(the_thread->current_state) ) {
ffc1f308: 70 09 00 08 andi. r9,r0,8
ffc1f30c: 41 a2 00 1c beq+ ffc1f328 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
ffc1f310: 38 63 00 48 addi r3,r3,72
ffc1f314: 4b fe e6 b1 bl ffc0d9c4 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc1f318: 3c 80 10 03 lis r4,4099
ffc1f31c: 7f e3 fb 78 mr r3,r31
ffc1f320: 60 84 ff f8 ori r4,r4,65528
ffc1f324: 4b fe cd 3d bl ffc0c060 <_Thread_Clear_state>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
ffc1f328: 80 01 00 14 lwz r0,20(r1)
ffc1f32c: 7f c3 f3 78 mr r3,r30
ffc1f330: 83 e1 00 0c lwz r31,12(r1)
ffc1f334: 7c 08 03 a6 mtlr r0
ffc1f338: 83 c1 00 08 lwz r30,8(r1)
ffc1f33c: 38 21 00 10 addi r1,r1,16
ffc1f340: 4e 80 00 20 blr
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
ffc1f344: 80 03 00 30 lwz r0,48(r3)
ffc1f348: 7d 68 00 39 and. r8,r11,r0
ffc1f34c: 41 82 00 88 beq- ffc1f3d4 <_POSIX_signals_Unblock_thread+0x13c>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
ffc1f350: 2f 85 00 00 cmpwi cr7,r5,0
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
ffc1f354: 81 3f 00 28 lwz r9,40(r31)
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
ffc1f358: 38 00 00 04 li r0,4
ffc1f35c: 90 1f 00 34 stw r0,52(r31)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
ffc1f360: 41 9e 00 90 beq- cr7,ffc1f3f0 <_POSIX_signals_Unblock_thread+0x158>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
ffc1f364: 81 45 00 00 lwz r10,0(r5)
ffc1f368: 81 65 00 04 lwz r11,4(r5)
ffc1f36c: 80 05 00 08 lwz r0,8(r5)
ffc1f370: 91 49 00 00 stw r10,0(r9)
ffc1f374: 91 69 00 04 stw r11,4(r9)
ffc1f378: 90 09 00 08 stw r0,8(r9)
}
_Thread_queue_Extract_with_proxy( the_thread );
ffc1f37c: 7f e3 fb 78 mr r3,r31
ffc1f380: 4b fe da 49 bl ffc0cdc8 <_Thread_queue_Extract_with_proxy>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
ffc1f384: 80 01 00 14 lwz r0,20(r1)
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
return true;
ffc1f388: 3b c0 00 01 li r30,1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
}
}
return false;
}
ffc1f38c: 83 e1 00 0c lwz r31,12(r1)
ffc1f390: 7c 08 03 a6 mtlr r0
ffc1f394: 7f c3 f3 78 mr r3,r30
ffc1f398: 83 c1 00 08 lwz r30,8(r1)
ffc1f39c: 38 21 00 10 addi r1,r1,16
ffc1f3a0: 4e 80 00 20 blr
else if ( _States_Is_delaying(the_thread->current_state) ) {
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
ffc1f3a4: 2f 80 00 00 cmpwi cr7,r0,0
ffc1f3a8: 40 be ff 80 bne- cr7,ffc1f328 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1f3ac: 3d 60 00 00 lis r11,0
ffc1f3b0: 39 6b 31 44 addi r11,r11,12612
ffc1f3b4: 80 0b 00 08 lwz r0,8(r11)
ffc1f3b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc1f3bc: 41 be ff 6c beq- cr7,ffc1f328 <_POSIX_signals_Unblock_thread+0x90>
ffc1f3c0: 80 0b 00 0c lwz r0,12(r11)
ffc1f3c4: 7f 83 00 00 cmpw cr7,r3,r0
ffc1f3c8: 40 9e ff 60 bne+ cr7,ffc1f328 <_POSIX_signals_Unblock_thread+0x90><== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc1f3cc: 99 2b 00 18 stb r9,24(r11)
ffc1f3d0: 4b ff ff 58 b ffc1f328 <_POSIX_signals_Unblock_thread+0x90>
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
ffc1f3d4: 80 0a 00 d0 lwz r0,208(r10)
/*
* This should only be reached via pthread_kill().
*/
return false;
ffc1f3d8: 3b c0 00 00 li r30,0
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
ffc1f3dc: 7d 69 00 79 andc. r9,r11,r0
ffc1f3e0: 40 82 ff 70 bne+ ffc1f350 <_POSIX_signals_Unblock_thread+0xb8>
ffc1f3e4: 4b ff ff 44 b ffc1f328 <_POSIX_signals_Unblock_thread+0x90>
/*
* In pthread_cond_wait, a thread will be blocking on a thread
* queue, but is also interruptible by a POSIX signal.
*/
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
ffc1f3e8: 4b fe d9 e1 bl ffc0cdc8 <_Thread_queue_Extract_with_proxy>
ffc1f3ec: 4b ff ff 3c b ffc1f328 <_POSIX_signals_Unblock_thread+0x90>
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
ffc1f3f0: 38 00 00 01 li r0,1
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
ffc1f3f4: 90 89 00 00 stw r4,0(r9)
the_info->si_code = SI_USER;
ffc1f3f8: 90 09 00 04 stw r0,4(r9)
the_info->si_value.sival_int = 0;
ffc1f3fc: 90 a9 00 08 stw r5,8(r9)
ffc1f400: 4b ff ff 7c b ffc1f37c <_POSIX_signals_Unblock_thread+0xe4>
ffc12360 <_RBTree_Extract_unprotected>:
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc12360: 94 21 ff e8 stwu r1,-24(r1)
ffc12364: 7c 08 02 a6 mflr r0
ffc12368: 93 c1 00 10 stw r30,16(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
ffc1236c: 7c 9e 23 79 mr. r30,r4
*/
void _RBTree_Extract_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
ffc12370: 93 81 00 08 stw r28,8(r1)
ffc12374: 7c 7c 1b 78 mr r28,r3
ffc12378: 90 01 00 1c stw r0,28(r1)
ffc1237c: 93 a1 00 0c stw r29,12(r1)
ffc12380: 93 e1 00 14 stw r31,20(r1)
RBTree_Node *leaf, *target;
RBTree_Color victim_color;
RBTree_Direction dir;
if (!the_node) return;
ffc12384: 41 82 01 10 beq- ffc12494 <_RBTree_Extract_unprotected+0x134>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
ffc12388: 80 03 00 08 lwz r0,8(r3)
ffc1238c: 7f 80 f0 00 cmpw cr7,r0,r30
ffc12390: 41 9e 01 68 beq- cr7,ffc124f8 <_RBTree_Extract_unprotected+0x198>
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
ffc12394: 80 1c 00 0c lwz r0,12(r28)
ffc12398: 7f 80 f0 00 cmpw cr7,r0,r30
ffc1239c: 41 9e 01 28 beq- cr7,ffc124c4 <_RBTree_Extract_unprotected+0x164>
* 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]) {
ffc123a0: 83 fe 00 04 lwz r31,4(r30)
ffc123a4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc123a8: 41 9e 01 38 beq- cr7,ffc124e0 <_RBTree_Extract_unprotected+0x180>
ffc123ac: 80 1e 00 08 lwz r0,8(r30)
ffc123b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc123b4: 40 be 00 0c bne+ cr7,ffc123c0 <_RBTree_Extract_unprotected+0x60>
ffc123b8: 48 00 01 54 b ffc1250c <_RBTree_Extract_unprotected+0x1ac>
target = the_node->child[RBT_LEFT]; /* find max in node->child[RBT_LEFT] */
while (target->child[RBT_RIGHT]) target = target->child[RBT_RIGHT];
ffc123bc: 7c 1f 03 78 mr r31,r0
ffc123c0: 80 1f 00 08 lwz r0,8(r31)
ffc123c4: 2f 80 00 00 cmpwi cr7,r0,0
ffc123c8: 40 9e ff f4 bne+ cr7,ffc123bc <_RBTree_Extract_unprotected+0x5c>
* 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];
ffc123cc: 83 bf 00 04 lwz r29,4(r31)
if(leaf) {
ffc123d0: 2f 9d 00 00 cmpwi cr7,r29,0
ffc123d4: 41 9e 01 a0 beq- cr7,ffc12574 <_RBTree_Extract_unprotected+0x214>
leaf->parent = target->parent;
ffc123d8: 80 1f 00 00 lwz r0,0(r31)
ffc123dc: 90 1d 00 00 stw r0,0(r29)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
ffc123e0: 81 5f 00 00 lwz r10,0(r31)
target->parent->child[dir] = leaf;
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
ffc123e4: 81 7e 00 00 lwz r11,0(r30)
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
}
victim_color = target->color;
dir = target != target->parent->child[0];
ffc123e8: 80 0a 00 04 lwz r0,4(r10)
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;
ffc123ec: 81 3f 00 0c lwz r9,12(r31)
dir = target != target->parent->child[0];
ffc123f0: 7f e0 02 78 xor r0,r31,r0
ffc123f4: 7c 00 00 34 cntlzw r0,r0
ffc123f8: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc123fc: 68 00 00 01 xori r0,r0,1
target->parent->child[dir] = leaf;
ffc12400: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc12404: 7d 4a 02 14 add r10,r10,r0
ffc12408: 93 aa 00 04 stw r29,4(r10)
/* now replace the_node with target */
dir = the_node != the_node->parent->child[0];
ffc1240c: 80 0b 00 04 lwz r0,4(r11)
ffc12410: 7f c0 02 78 xor r0,r30,r0
ffc12414: 7c 00 00 34 cntlzw r0,r0
ffc12418: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc1241c: 68 00 00 01 xori r0,r0,1
the_node->parent->child[dir] = target;
ffc12420: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc12424: 7d 6b 02 14 add r11,r11,r0
ffc12428: 93 eb 00 04 stw r31,4(r11)
/* set target's new children to the original node's children */
target->child[RBT_RIGHT] = the_node->child[RBT_RIGHT];
ffc1242c: 80 1e 00 08 lwz r0,8(r30)
ffc12430: 90 1f 00 08 stw r0,8(r31)
if (the_node->child[RBT_RIGHT])
ffc12434: 81 7e 00 08 lwz r11,8(r30)
ffc12438: 2f 8b 00 00 cmpwi cr7,r11,0
ffc1243c: 41 9e 00 08 beq- cr7,ffc12444 <_RBTree_Extract_unprotected+0xe4><== NEVER TAKEN
the_node->child[RBT_RIGHT]->parent = target;
ffc12440: 93 eb 00 00 stw r31,0(r11)
target->child[RBT_LEFT] = the_node->child[RBT_LEFT];
ffc12444: 80 1e 00 04 lwz r0,4(r30)
ffc12448: 90 1f 00 04 stw r0,4(r31)
if (the_node->child[RBT_LEFT])
ffc1244c: 81 7e 00 04 lwz r11,4(r30)
ffc12450: 2f 8b 00 00 cmpwi cr7,r11,0
ffc12454: 41 9e 00 08 beq- cr7,ffc1245c <_RBTree_Extract_unprotected+0xfc>
the_node->child[RBT_LEFT]->parent = target;
ffc12458: 93 eb 00 00 stw r31,0(r11)
/* finally, update the parent node and recolor. target has completely
* replaced the_node, and target's child has moved up the tree if needed.
* the_node is no longer part of the tree, although it has valid pointers
* still.
*/
target->parent = the_node->parent;
ffc1245c: 81 7e 00 00 lwz r11,0(r30)
target->color = the_node->color;
ffc12460: 80 1e 00 0c lwz r0,12(r30)
/* 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;
ffc12464: 91 7f 00 00 stw r11,0(r31)
target->color = the_node->color;
ffc12468: 90 1f 00 0c stw r0,12(r31)
/* 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 */
ffc1246c: 2f 89 00 00 cmpwi cr7,r9,0
ffc12470: 41 9e 00 44 beq- cr7,ffc124b4 <_RBTree_Extract_unprotected+0x154>
/* 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;
ffc12474: 81 3c 00 04 lwz r9,4(r28)
*/
RTEMS_INLINE_ROUTINE void _RBTree_Set_off_rbtree(
RBTree_Node *node
)
{
node->parent = node->child[RBT_LEFT] = node->child[RBT_RIGHT] = NULL;
ffc12478: 38 00 00 00 li r0,0
ffc1247c: 90 1e 00 08 stw r0,8(r30)
ffc12480: 2f 89 00 00 cmpwi cr7,r9,0
ffc12484: 90 1e 00 04 stw r0,4(r30)
ffc12488: 90 1e 00 00 stw r0,0(r30)
ffc1248c: 41 9e 00 08 beq- cr7,ffc12494 <_RBTree_Extract_unprotected+0x134>
ffc12490: 90 09 00 0c stw r0,12(r9)
}
ffc12494: 80 01 00 1c lwz r0,28(r1)
ffc12498: 83 81 00 08 lwz r28,8(r1)
ffc1249c: 7c 08 03 a6 mtlr r0
ffc124a0: 83 a1 00 0c lwz r29,12(r1)
ffc124a4: 83 c1 00 10 lwz r30,16(r1)
ffc124a8: 83 e1 00 14 lwz r31,20(r1)
ffc124ac: 38 21 00 18 addi r1,r1,24
ffc124b0: 4e 80 00 20 blr
* 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 */
if (leaf) {
ffc124b4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc124b8: 41 be ff bc beq- cr7,ffc12474 <_RBTree_Extract_unprotected+0x114>
leaf->color = RBT_BLACK; /* case 2 */
ffc124bc: 91 3d 00 0c stw r9,12(r29)
ffc124c0: 4b ff ff b4 b ffc12474 <_RBTree_Extract_unprotected+0x114>
the_rbtree->first[RBT_LEFT] = NULL;
}
}
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
ffc124c4: 80 1e 00 04 lwz r0,4(r30)
ffc124c8: 2f 80 00 00 cmpwi cr7,r0,0
ffc124cc: 41 9e 00 90 beq- cr7,ffc1255c <_RBTree_Extract_unprotected+0x1fc>
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
ffc124d0: 90 1c 00 0c stw r0,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]) {
ffc124d4: 83 fe 00 04 lwz r31,4(r30)
ffc124d8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc124dc: 40 9e fe d0 bne+ cr7,ffc123ac <_RBTree_Extract_unprotected+0x4c>
* the_node's location in the tree. This may cause the coloring to be
* 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];
ffc124e0: 83 be 00 08 lwz r29,8(r30)
if( leaf ) {
ffc124e4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc124e8: 40 be 00 28 bne+ cr7,ffc12510 <_RBTree_Extract_unprotected+0x1b0>
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
ffc124ec: 7f c3 f3 78 mr r3,r30
ffc124f0: 4b ff fb 75 bl ffc12064 <_RBTree_Extract_validate_unprotected>
ffc124f4: 48 00 00 24 b ffc12518 <_RBTree_Extract_unprotected+0x1b8>
if (!the_node) return;
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
ffc124f8: 80 1e 00 08 lwz r0,8(r30)
ffc124fc: 2f 80 00 00 cmpwi cr7,r0,0
ffc12500: 41 9e 00 44 beq- cr7,ffc12544 <_RBTree_Extract_unprotected+0x1e4>
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
ffc12504: 90 1c 00 08 stw r0,8(r28)
ffc12508: 4b ff fe 8c b ffc12394 <_RBTree_Extract_unprotected+0x34>
* 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]) {
ffc1250c: 7f fd fb 78 mr r29,r31
* 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;
ffc12510: 80 1e 00 00 lwz r0,0(r30)
ffc12514: 90 1d 00 00 stw r0,0(r29)
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc12518: 81 7e 00 00 lwz r11,0(r30)
leaf->parent = the_node->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(the_node);
}
victim_color = the_node->color;
ffc1251c: 81 3e 00 0c lwz r9,12(r30)
/* remove the_node from the tree */
dir = the_node != the_node->parent->child[0];
ffc12520: 80 0b 00 04 lwz r0,4(r11)
ffc12524: 7f c0 02 78 xor r0,r30,r0
ffc12528: 7c 00 00 34 cntlzw r0,r0
ffc1252c: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc12530: 68 00 00 01 xori r0,r0,1
the_node->parent->child[dir] = leaf;
ffc12534: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc12538: 7d 6b 02 14 add r11,r11,r0
ffc1253c: 93 ab 00 04 stw r29,4(r11)
ffc12540: 4b ff ff 2c b ffc1246c <_RBTree_Extract_unprotected+0x10c>
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
ffc12544: 81 3e 00 00 lwz r9,0(r30)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc12548: 7f 83 48 00 cmpw cr7,r3,r9
/* check if min needs to be updated */
if (the_node == the_rbtree->first[RBT_LEFT]) {
if (the_node->child[RBT_RIGHT])
the_rbtree->first[RBT_LEFT] = the_node->child[RBT_RIGHT];
else {
the_rbtree->first[RBT_LEFT] = the_node->parent;
ffc1254c: 91 23 00 08 stw r9,8(r3)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc12550: 40 9e fe 44 bne+ cr7,ffc12394 <_RBTree_Extract_unprotected+0x34>
the_rbtree->first[RBT_LEFT]))
the_rbtree->first[RBT_LEFT] = NULL;
ffc12554: 90 1c 00 08 stw r0,8(r28)
ffc12558: 4b ff fe 3c b ffc12394 <_RBTree_Extract_unprotected+0x34>
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
ffc1255c: 81 3e 00 00 lwz r9,0(r30)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc12560: 7f 9c 48 00 cmpw cr7,r28,r9
/* check if max needs to be updated: note, min can equal max (1 element) */
if (the_node == the_rbtree->first[RBT_RIGHT]) {
if (the_node->child[RBT_LEFT])
the_rbtree->first[RBT_RIGHT] = the_node->child[RBT_LEFT];
else {
the_rbtree->first[RBT_RIGHT] = the_node->parent;
ffc12564: 91 3c 00 0c stw r9,12(r28)
if(_RBTree_Are_nodes_equal((RBTree_Node *)the_rbtree,
ffc12568: 40 9e fe 38 bne+ cr7,ffc123a0 <_RBTree_Extract_unprotected+0x40>
the_rbtree->first[RBT_RIGHT]))
the_rbtree->first[RBT_RIGHT] = NULL;
ffc1256c: 90 1c 00 0c stw r0,12(r28)
ffc12570: 4b ff ff 64 b ffc124d4 <_RBTree_Extract_unprotected+0x174>
leaf = target->child[RBT_LEFT];
if(leaf) {
leaf->parent = target->parent;
} else {
/* fix the tree here if the child is a null leaf. */
_RBTree_Extract_validate_unprotected(target);
ffc12574: 7f e3 fb 78 mr r3,r31
ffc12578: 4b ff fa ed bl ffc12064 <_RBTree_Extract_validate_unprotected>
ffc1257c: 4b ff fe 64 b ffc123e0 <_RBTree_Extract_unprotected+0x80>
ffc12064 <_RBTree_Extract_validate_unprotected>:
)
{
RBTree_Node *parent, *sibling;
RBTree_Direction dir;
parent = the_node->parent;
ffc12064: 81 23 00 00 lwz r9,0(r3)
if(!parent->parent) return;
ffc12068: 80 09 00 00 lwz r0,0(r9)
ffc1206c: 2f 80 00 00 cmpwi cr7,r0,0
ffc12070: 4d 9e 00 20 beqlr cr7
{
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])
ffc12074: 81 69 00 04 lwz r11,4(r9)
ffc12078: 7f 83 58 00 cmpw cr7,r3,r11
ffc1207c: 41 9e 02 dc beq- cr7,ffc12358 <_RBTree_Extract_validate_unprotected+0x2f4>
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
ffc12080: 38 80 00 00 li r4,0
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
ffc12084: 38 e0 00 01 li r7,1
ffc12088: 48 00 00 94 b ffc1211c <_RBTree_Extract_validate_unprotected+0xb8>
if(!parent->parent) return;
sibling = _RBTree_Sibling(the_node);
/* continue to correct tree as long as the_node is black and not the root */
while (!_RBTree_Is_red(the_node) && parent->parent) {
ffc1208c: 81 49 00 00 lwz r10,0(r9)
ffc12090: 2f 8a 00 00 cmpwi cr7,r10,0
ffc12094: 41 9e 00 94 beq- cr7,ffc12128 <_RBTree_Extract_validate_unprotected+0xc4>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc12098: 2f 8b 00 00 cmpwi cr7,r11,0
ffc1209c: 41 9e 00 10 beq- cr7,ffc120ac <_RBTree_Extract_validate_unprotected+0x48><== NEVER TAKEN
ffc120a0: 80 0b 00 0c lwz r0,12(r11)
ffc120a4: 2f 80 00 01 cmpwi cr7,r0,1
ffc120a8: 41 9e 00 98 beq- cr7,ffc12140 <_RBTree_Extract_validate_unprotected+0xdc>
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
}
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
ffc120ac: 81 4b 00 08 lwz r10,8(r11)
ffc120b0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc120b4: 41 9e 00 10 beq- cr7,ffc120c4 <_RBTree_Extract_validate_unprotected+0x60>
ffc120b8: 80 0a 00 0c lwz r0,12(r10)
ffc120bc: 2f 80 00 01 cmpwi cr7,r0,1
ffc120c0: 41 9e 01 40 beq- cr7,ffc12200 <_RBTree_Extract_validate_unprotected+0x19c>
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
ffc120c4: 81 4b 00 04 lwz r10,4(r11)
ffc120c8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc120cc: 41 9e 00 10 beq- cr7,ffc120dc <_RBTree_Extract_validate_unprotected+0x78>
ffc120d0: 80 0a 00 0c lwz r0,12(r10)
ffc120d4: 2f 80 00 01 cmpwi cr7,r0,1
ffc120d8: 41 9e 01 28 beq- cr7,ffc12200 <_RBTree_Extract_validate_unprotected+0x19c>
sibling->color = RBT_RED;
ffc120dc: 90 eb 00 0c stw r7,12(r11)
ffc120e0: 80 09 00 0c lwz r0,12(r9)
ffc120e4: 2f 80 00 01 cmpwi cr7,r0,1
ffc120e8: 41 9e 00 f4 beq- cr7,ffc121dc <_RBTree_Extract_validate_unprotected+0x178>
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
break;
}
the_node = parent; /* done if parent is red */
parent = the_node->parent;
ffc120ec: 81 49 00 00 lwz r10,0(r9)
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
ffc120f0: 39 60 00 00 li r11,0
ffc120f4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc120f8: 41 9e 00 1c beq- cr7,ffc12114 <_RBTree_Extract_validate_unprotected+0xb0><== NEVER TAKEN
if(!(the_node->parent->parent)) return NULL;
ffc120fc: 80 0a 00 00 lwz r0,0(r10)
ffc12100: 2f 80 00 00 cmpwi cr7,r0,0
ffc12104: 41 9e 00 10 beq- cr7,ffc12114 <_RBTree_Extract_validate_unprotected+0xb0>
if(the_node == the_node->parent->child[RBT_LEFT])
ffc12108: 81 6a 00 04 lwz r11,4(r10)
ffc1210c: 7f 89 58 00 cmpw cr7,r9,r11
ffc12110: 41 9e 00 e8 beq- cr7,ffc121f8 <_RBTree_Extract_validate_unprotected+0x194>
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
the_node->parent = c;
ffc12114: 7d 23 4b 78 mr r3,r9
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Sibling(
RBTree_Node *the_node
)
{
if(!the_node) return NULL;
if(!(the_node->parent)) return NULL;
ffc12118: 7d 49 53 78 mr r9,r10
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc1211c: 80 03 00 0c lwz r0,12(r3)
ffc12120: 2f 80 00 01 cmpwi cr7,r0,1
ffc12124: 40 9e ff 68 bne+ cr7,ffc1208c <_RBTree_Extract_validate_unprotected+0x28>
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
ffc12128: 81 23 00 00 lwz r9,0(r3)
ffc1212c: 80 09 00 00 lwz r0,0(r9)
ffc12130: 2f 80 00 00 cmpwi cr7,r0,0
ffc12134: 4c be 00 20 bnelr+ cr7
ffc12138: 90 03 00 0c stw r0,12(r3)
ffc1213c: 4e 80 00 20 blr
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
ffc12140: 81 09 00 04 lwz r8,4(r9)
* then rotate parent left, making the sibling be the_node's grandparent.
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
ffc12144: 90 09 00 0c stw r0,12(r9)
sibling->color = RBT_BLACK;
dir = the_node != parent->child[0];
ffc12148: 7c 60 42 78 xor r0,r3,r8
ffc1214c: 7c 00 00 34 cntlzw r0,r0
* Now the_node has a black sibling and red parent. After rotation,
* update sibling pointer.
*/
if (_RBTree_Is_red(sibling)) {
parent->color = RBT_RED;
sibling->color = RBT_BLACK;
ffc12150: 90 8b 00 0c stw r4,12(r11)
dir = the_node != parent->child[0];
ffc12154: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc12158: 68 00 00 01 xori r0,r0,1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
ffc1215c: 20 c0 00 01 subfic r6,r0,1
ffc12160: 54 c6 10 3a rlwinm r6,r6,2,0,29
ffc12164: 7c c9 32 14 add r6,r9,r6
ffc12168: 81 06 00 04 lwz r8,4(r6)
ffc1216c: 2f 88 00 00 cmpwi cr7,r8,0
ffc12170: 41 9e 00 58 beq- cr7,ffc121c8 <_RBTree_Extract_validate_unprotected+0x164><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
ffc12174: 54 0b 10 3a rlwinm r11,r0,2,0,29
ffc12178: 7c a8 5a 14 add r5,r8,r11
ffc1217c: 81 85 00 04 lwz r12,4(r5)
ffc12180: 91 86 00 04 stw r12,4(r6)
if (c->child[dir])
ffc12184: 80 c5 00 04 lwz r6,4(r5)
ffc12188: 2f 86 00 00 cmpwi cr7,r6,0
ffc1218c: 41 9e 00 0c beq- cr7,ffc12198 <_RBTree_Extract_validate_unprotected+0x134><== NEVER TAKEN
c->child[dir]->parent = the_node;
ffc12190: 91 26 00 00 stw r9,0(r6)
ffc12194: 81 49 00 00 lwz r10,0(r9)
c->child[dir] = the_node;
ffc12198: 7d 68 5a 14 add r11,r8,r11
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
ffc1219c: 91 48 00 00 stw r10,0(r8)
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
ffc121a0: 91 2b 00 04 stw r9,4(r11)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc121a4: 81 6a 00 04 lwz r11,4(r10)
c->parent = the_node->parent;
the_node->parent = c;
ffc121a8: 91 09 00 00 stw r8,0(r9)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc121ac: 7d 2b 5a 78 xor r11,r9,r11
ffc121b0: 7d 6b 00 34 cntlzw r11,r11
ffc121b4: 55 6b d9 7e rlwinm r11,r11,27,5,31
ffc121b8: 69 6b 00 01 xori r11,r11,1
ffc121bc: 55 6b 10 3a rlwinm r11,r11,2,0,29
ffc121c0: 7d 4a 5a 14 add r10,r10,r11
ffc121c4: 91 0a 00 04 stw r8,4(r10)
_RBTree_Rotate(parent, dir);
sibling = parent->child[!dir];
ffc121c8: 68 00 00 01 xori r0,r0,1
ffc121cc: 54 0b 10 3a rlwinm r11,r0,2,0,29
ffc121d0: 7d 69 5a 14 add r11,r9,r11
ffc121d4: 81 6b 00 04 lwz r11,4(r11)
ffc121d8: 4b ff fe d4 b ffc120ac <_RBTree_Extract_validate_unprotected+0x48>
/* sibling is black, see if both of its children are also black. */
if (!_RBTree_Is_red(sibling->child[RBT_RIGHT]) &&
!_RBTree_Is_red(sibling->child[RBT_LEFT])) {
sibling->color = RBT_RED;
if (_RBTree_Is_red(parent)) {
parent->color = RBT_BLACK;
ffc121dc: 38 00 00 00 li r0,0
ffc121e0: 90 09 00 0c stw r0,12(r9)
sibling->child[!dir]->color = RBT_BLACK;
_RBTree_Rotate(parent, dir);
break; /* done */
}
} /* while */
if(!the_node->parent->parent) the_node->color = RBT_BLACK;
ffc121e4: 81 23 00 00 lwz r9,0(r3)
ffc121e8: 80 09 00 00 lwz r0,0(r9)
ffc121ec: 2f 80 00 00 cmpwi cr7,r0,0
ffc121f0: 4c be 00 20 bnelr+ cr7
ffc121f4: 4b ff ff 44 b ffc12138 <_RBTree_Extract_validate_unprotected+0xd4><== NOT EXECUTED
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])
return the_node->parent->child[RBT_RIGHT];
ffc121f8: 81 6a 00 08 lwz r11,8(r10)
ffc121fc: 4b ff ff 18 b ffc12114 <_RBTree_Extract_validate_unprotected+0xb0>
* cases, either the_node is to the left or the right of the parent.
* In both cases, first check if one of sibling's children is black,
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
ffc12200: 80 09 00 04 lwz r0,4(r9)
ffc12204: 7c 60 02 78 xor r0,r3,r0
ffc12208: 7c 00 00 34 cntlzw r0,r0
ffc1220c: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc12210: 68 00 00 01 xori r0,r0,1
if (!_RBTree_Is_red(sibling->child[!dir])) {
ffc12214: 68 0a 00 01 xori r10,r0,1
ffc12218: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc1221c: 7d 0b 52 14 add r8,r11,r10
ffc12220: 81 08 00 04 lwz r8,4(r8)
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc12224: 2f 88 00 00 cmpwi cr7,r8,0
ffc12228: 41 9e 00 10 beq- cr7,ffc12238 <_RBTree_Extract_validate_unprotected+0x1d4>
ffc1222c: 80 e8 00 0c lwz r7,12(r8)
ffc12230: 2f 87 00 01 cmpwi cr7,r7,1
ffc12234: 41 9e 00 a0 beq- cr7,ffc122d4 <_RBTree_Extract_validate_unprotected+0x270>
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
_RBTree_Rotate(sibling, !dir);
ffc12238: 68 06 00 01 xori r6,r0,1
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
ffc1223c: 20 e6 00 01 subfic r7,r6,1
ffc12240: 54 e7 10 3a rlwinm r7,r7,2,0,29
ffc12244: 7c eb 3a 14 add r7,r11,r7
ffc12248: 81 07 00 04 lwz r8,4(r7)
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
sibling->child[dir]->color = RBT_BLACK;
ffc1224c: 54 05 10 3a rlwinm r5,r0,2,0,29
ffc12250: 7c ab 2a 14 add r5,r11,r5
ffc12254: 2f 88 00 00 cmpwi cr7,r8,0
ffc12258: 80 a5 00 04 lwz r5,4(r5)
* and if so rotate in the proper direction and update sibling pointer.
* Then switch the sibling and parent colors, and rotate through parent.
*/
dir = the_node != parent->child[0];
if (!_RBTree_Is_red(sibling->child[!dir])) {
sibling->color = RBT_RED;
ffc1225c: 38 80 00 01 li r4,1
ffc12260: 90 8b 00 0c stw r4,12(r11)
sibling->child[dir]->color = RBT_BLACK;
ffc12264: 38 80 00 00 li r4,0
ffc12268: 90 85 00 0c stw r4,12(r5)
ffc1226c: 41 9e 00 58 beq- cr7,ffc122c4 <_RBTree_Extract_validate_unprotected+0x260><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
ffc12270: 54 c6 10 3a rlwinm r6,r6,2,0,29
ffc12274: 7c a8 32 14 add r5,r8,r6
ffc12278: 80 85 00 04 lwz r4,4(r5)
ffc1227c: 90 87 00 04 stw r4,4(r7)
if (c->child[dir])
ffc12280: 80 e5 00 04 lwz r7,4(r5)
ffc12284: 2f 87 00 00 cmpwi cr7,r7,0
ffc12288: 41 9e 00 08 beq- cr7,ffc12290 <_RBTree_Extract_validate_unprotected+0x22c>
c->child[dir]->parent = the_node;
ffc1228c: 91 67 00 00 stw r11,0(r7)
c->child[dir] = the_node;
ffc12290: 7c e8 32 14 add r7,r8,r6
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12294: 80 cb 00 00 lwz r6,0(r11)
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
ffc12298: 91 67 00 04 stw r11,4(r7)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc1229c: 80 e6 00 04 lwz r7,4(r6)
c->parent = the_node->parent;
ffc122a0: 90 c8 00 00 stw r6,0(r8)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc122a4: 7d 67 3a 78 xor r7,r11,r7
ffc122a8: 7c e7 00 34 cntlzw r7,r7
c->parent = the_node->parent;
the_node->parent = c;
ffc122ac: 91 0b 00 00 stw r8,0(r11)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc122b0: 54 e7 d9 7e rlwinm r7,r7,27,5,31
ffc122b4: 68 e7 00 01 xori r7,r7,1
ffc122b8: 54 e7 10 3a rlwinm r7,r7,2,0,29
ffc122bc: 7c c6 3a 14 add r6,r6,r7
ffc122c0: 91 06 00 04 stw r8,4(r6)
_RBTree_Rotate(sibling, !dir);
sibling = parent->child[!dir];
ffc122c4: 7d 69 52 14 add r11,r9,r10
ffc122c8: 81 6b 00 04 lwz r11,4(r11)
ffc122cc: 7d 4b 52 14 add r10,r11,r10
ffc122d0: 81 0a 00 04 lwz r8,4(r10)
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
ffc122d4: 20 c0 00 01 subfic r6,r0,1
}
sibling->color = parent->color;
ffc122d8: 80 a9 00 0c lwz r5,12(r9)
ffc122dc: 54 c6 10 3a rlwinm r6,r6,2,0,29
ffc122e0: 7c c9 32 14 add r6,r9,r6
ffc122e4: 90 ab 00 0c stw r5,12(r11)
parent->color = RBT_BLACK;
ffc122e8: 38 e0 00 00 li r7,0
ffc122ec: 81 46 00 04 lwz r10,4(r6)
ffc122f0: 90 e9 00 0c stw r7,12(r9)
ffc122f4: 2f 8a 00 00 cmpwi cr7,r10,0
sibling->child[!dir]->color = RBT_BLACK;
ffc122f8: 90 e8 00 0c stw r7,12(r8)
ffc122fc: 41 be fe 2c beq- cr7,ffc12128 <_RBTree_Extract_validate_unprotected+0xc4><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
ffc12300: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc12304: 7d 6a 02 14 add r11,r10,r0
ffc12308: 81 0b 00 04 lwz r8,4(r11)
ffc1230c: 91 06 00 04 stw r8,4(r6)
if (c->child[dir])
ffc12310: 81 6b 00 04 lwz r11,4(r11)
ffc12314: 2f 8b 00 00 cmpwi cr7,r11,0
ffc12318: 41 9e 00 08 beq- cr7,ffc12320 <_RBTree_Extract_validate_unprotected+0x2bc>
c->child[dir]->parent = the_node;
ffc1231c: 91 2b 00 00 stw r9,0(r11)
c->child[dir] = the_node;
ffc12320: 7d 0a 02 14 add r8,r10,r0
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12324: 81 69 00 00 lwz r11,0(r9)
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
ffc12328: 91 28 00 04 stw r9,4(r8)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc1232c: 80 0b 00 04 lwz r0,4(r11)
c->parent = the_node->parent;
ffc12330: 91 6a 00 00 stw r11,0(r10)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12334: 7d 20 02 78 xor r0,r9,r0
ffc12338: 7c 00 00 34 cntlzw r0,r0
c->parent = the_node->parent;
the_node->parent = c;
ffc1233c: 91 49 00 00 stw r10,0(r9)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12340: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc12344: 68 00 00 01 xori r0,r0,1
ffc12348: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc1234c: 7d 6b 02 14 add r11,r11,r0
ffc12350: 91 4b 00 04 stw r10,4(r11)
ffc12354: 4b ff fd d4 b ffc12128 <_RBTree_Extract_validate_unprotected+0xc4>
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])
return the_node->parent->child[RBT_RIGHT];
ffc12358: 81 69 00 08 lwz r11,8(r9)
ffc1235c: 4b ff fd 24 b ffc12080 <_RBTree_Extract_validate_unprotected+0x1c>
ffc0c818 <_RBTree_Find>:
RBTree_Node *_RBTree_Find(
RBTree_Control *the_rbtree,
RBTree_Node *search_node
)
{
ffc0c818: 94 21 ff e0 stwu r1,-32(r1)
ffc0c81c: 7c 08 02 a6 mflr r0
ffc0c820: 90 01 00 24 stw r0,36(r1)
ffc0c824: 93 a1 00 14 stw r29,20(r1)
ffc0c828: 7c 9d 23 78 mr r29,r4
ffc0c82c: 93 c1 00 18 stw r30,24(r1)
ffc0c830: 7c 7e 1b 78 mr r30,r3
ffc0c834: 93 61 00 0c stw r27,12(r1)
ffc0c838: 93 81 00 10 stw r28,16(r1)
ffc0c83c: 93 e1 00 1c stw r31,28(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c840: 7f 60 00 a6 mfmsr r27
ffc0c844: 7c 10 42 a6 mfsprg r0,0
ffc0c848: 7f 60 00 78 andc r0,r27,r0
ffc0c84c: 7c 00 01 24 mtmsr r0
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Find_unprotected(
RBTree_Control *the_rbtree,
RBTree_Node *the_node
)
{
RBTree_Node* iter_node = the_rbtree->root;
ffc0c850: 83 e3 00 04 lwz r31,4(r3)
RBTree_Node* found = NULL;
ffc0c854: 3b 80 00 00 li r28,0
int compare_result;
while (iter_node) {
ffc0c858: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0c85c: 41 9e 00 50 beq- cr7,ffc0c8ac <_RBTree_Find+0x94> <== NEVER TAKEN
compare_result = the_rbtree->compare_function(the_node, iter_node);
ffc0c860: 80 1e 00 10 lwz r0,16(r30)
ffc0c864: 7f e4 fb 78 mr r4,r31
ffc0c868: 7f a3 eb 78 mr r3,r29
ffc0c86c: 7c 09 03 a6 mtctr r0
ffc0c870: 4e 80 04 21 bctrl
if (compare_result == 0) {
ffc0c874: 2c 03 00 00 cmpwi r3,0
found = iter_node;
if ( the_rbtree->is_unique )
break;
}
RBTree_Direction dir = (compare_result == 1);
ffc0c878: 68 63 00 01 xori r3,r3,1
ffc0c87c: 7c 63 00 34 cntlzw r3,r3
ffc0c880: 54 63 d9 7e rlwinm r3,r3,27,5,31
iter_node = iter_node->child[dir];
ffc0c884: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0c888: 7c 7f 1a 14 add r3,r31,r3
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
compare_result = the_rbtree->compare_function(the_node, iter_node);
if (compare_result == 0) {
ffc0c88c: 40 82 00 14 bne- ffc0c8a0 <_RBTree_Find+0x88>
found = iter_node;
if ( the_rbtree->is_unique )
ffc0c890: 88 1e 00 14 lbz r0,20(r30)
ffc0c894: 7f fc fb 78 mr r28,r31
ffc0c898: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c89c: 40 9e 00 3c bne- cr7,ffc0c8d8 <_RBTree_Find+0xc0>
break;
}
RBTree_Direction dir = (compare_result == 1);
iter_node = iter_node->child[dir];
ffc0c8a0: 83 e3 00 04 lwz r31,4(r3)
)
{
RBTree_Node* iter_node = the_rbtree->root;
RBTree_Node* found = NULL;
int compare_result;
while (iter_node) {
ffc0c8a4: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0c8a8: 40 9e ff b8 bne+ cr7,ffc0c860 <_RBTree_Find+0x48>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c8ac: 7f 60 01 24 mtmsr r27
return_node = NULL;
_ISR_Disable( level );
return_node = _RBTree_Find_unprotected( the_rbtree, search_node );
_ISR_Enable( level );
return return_node;
}
ffc0c8b0: 80 01 00 24 lwz r0,36(r1)
ffc0c8b4: 7f 83 e3 78 mr r3,r28
ffc0c8b8: 83 61 00 0c lwz r27,12(r1)
ffc0c8bc: 7c 08 03 a6 mtlr r0
ffc0c8c0: 83 81 00 10 lwz r28,16(r1)
ffc0c8c4: 83 a1 00 14 lwz r29,20(r1)
ffc0c8c8: 83 c1 00 18 lwz r30,24(r1)
ffc0c8cc: 83 e1 00 1c lwz r31,28(r1)
ffc0c8d0: 38 21 00 20 addi r1,r1,32
ffc0c8d4: 4e 80 00 20 blr
compare_result = the_rbtree->compare_function(the_node, iter_node);
if (compare_result == 0) {
found = iter_node;
if ( the_rbtree->is_unique )
ffc0c8d8: 7f fc fb 78 mr r28,r31
ffc0c8dc: 7f 60 01 24 mtmsr r27
ffc0c8e0: 80 01 00 24 lwz r0,36(r1)
ffc0c8e4: 7f 83 e3 78 mr r3,r28
ffc0c8e8: 83 61 00 0c lwz r27,12(r1)
ffc0c8ec: 7c 08 03 a6 mtlr r0
ffc0c8f0: 83 81 00 10 lwz r28,16(r1)
ffc0c8f4: 83 a1 00 14 lwz r29,20(r1)
ffc0c8f8: 83 c1 00 18 lwz r30,24(r1)
ffc0c8fc: 83 e1 00 1c lwz r31,28(r1)
ffc0c900: 38 21 00 20 addi r1,r1,32
ffc0c904: 4e 80 00 20 blr
ffc0cc74 <_RBTree_Initialize>:
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
ffc0cc74: 94 21 ff e0 stwu r1,-32(r1)
ffc0cc78: 7c 08 02 a6 mflr r0
ffc0cc7c: 93 e1 00 1c stw r31,28(r1)
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
ffc0cc80: 7c 7f 1b 79 mr. r31,r3
void *starting_address,
size_t number_nodes,
size_t node_size,
bool is_unique
)
{
ffc0cc84: 93 c1 00 18 stw r30,24(r1)
ffc0cc88: 7c fe 3b 78 mr r30,r7
ffc0cc8c: 90 01 00 24 stw r0,36(r1)
ffc0cc90: 93 a1 00 14 stw r29,20(r1)
ffc0cc94: 90 c1 00 08 stw r6,8(r1)
size_t count;
RBTree_Node *next;
/* TODO: Error message? */
if (!the_rbtree) return;
ffc0cc98: 41 82 00 4c beq- ffc0cce4 <_RBTree_Initialize+0x70> <== NEVER TAKEN
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
ffc0cc9c: 2f 86 00 00 cmpwi cr7,r6,0
{
the_rbtree->permanent_null = NULL;
the_rbtree->root = NULL;
the_rbtree->first[0] = NULL;
the_rbtree->first[1] = NULL;
the_rbtree->compare_function = compare_function;
ffc0cca0: 90 9f 00 10 stw r4,16(r31)
RBTree_Control *the_rbtree,
RBTree_Compare_function compare_function,
bool is_unique
)
{
the_rbtree->permanent_null = NULL;
ffc0cca4: 38 00 00 00 li r0,0
ffc0cca8: 90 1f 00 00 stw r0,0(r31)
the_rbtree->root = NULL;
ffc0ccac: 90 1f 00 04 stw r0,4(r31)
the_rbtree->first[0] = NULL;
ffc0ccb0: 90 1f 00 08 stw r0,8(r31)
the_rbtree->first[1] = NULL;
ffc0ccb4: 90 1f 00 0c stw r0,12(r31)
the_rbtree->compare_function = compare_function;
the_rbtree->is_unique = is_unique;
ffc0ccb8: 99 1f 00 14 stb r8,20(r31)
ffc0ccbc: 41 9e 00 28 beq- cr7,ffc0cce4 <_RBTree_Initialize+0x70> <== NEVER TAKEN
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
ffc0ccc0: 7c bd 2b 78 mr r29,r5
while ( count-- ) {
_RBTree_Insert(the_rbtree, next);
ffc0ccc4: 7f a4 eb 78 mr r4,r29
ffc0ccc8: 7f e3 fb 78 mr r3,r31
ffc0cccc: 4b ff ff 95 bl ffc0cc60 <_RBTree_Insert>
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
ffc0ccd0: 80 01 00 08 lwz r0,8(r1)
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _RBTree_Initialize(
ffc0ccd4: 7f bd f2 14 add r29,r29,r30
/* could do sanity checks here */
_RBTree_Initialize_empty(the_rbtree, compare_function, is_unique);
count = number_nodes;
next = starting_address;
while ( count-- ) {
ffc0ccd8: 35 20 ff ff addic. r9,r0,-1
ffc0ccdc: 91 21 00 08 stw r9,8(r1)
ffc0cce0: 40 82 ff e4 bne+ ffc0ccc4 <_RBTree_Initialize+0x50>
_RBTree_Insert(the_rbtree, next);
next = (RBTree_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
}
ffc0cce4: 80 01 00 24 lwz r0,36(r1)
ffc0cce8: 83 a1 00 14 lwz r29,20(r1)
ffc0ccec: 7c 08 03 a6 mtlr r0
ffc0ccf0: 83 c1 00 18 lwz r30,24(r1)
ffc0ccf4: 83 e1 00 1c lwz r31,28(r1)
ffc0ccf8: 38 21 00 20 addi r1,r1,32
ffc0ccfc: 4e 80 00 20 blr
ffc125bc <_RBTree_Validate_insert_unprotected>:
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
ffc125bc: 94 21 ff f0 stwu r1,-16(r1)
/* 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;
ffc125c0: 38 a0 00 00 li r5,0
g->color = RBT_RED;
ffc125c4: 39 80 00 01 li r12,1
* append operation.
*/
void _RBTree_Validate_insert_unprotected(
RBTree_Node *the_node
)
{
ffc125c8: 93 e1 00 0c stw r31,12(r1)
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
ffc125cc: 81 23 00 00 lwz r9,0(r3)
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
ffc125d0: 81 69 00 00 lwz r11,0(r9)
ffc125d4: 2f 8b 00 00 cmpwi cr7,r11,0
ffc125d8: 7d 68 5b 78 mr r8,r11
ffc125dc: 41 9e 01 70 beq- cr7,ffc1274c <_RBTree_Validate_insert_unprotected+0x190>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc125e0: 80 09 00 0c lwz r0,12(r9)
ffc125e4: 2f 80 00 01 cmpwi cr7,r0,1
ffc125e8: 41 9e 00 10 beq- cr7,ffc125f8 <_RBTree_Validate_insert_unprotected+0x3c>
/* 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;
}
ffc125ec: 83 e1 00 0c lwz r31,12(r1)
ffc125f0: 38 21 00 10 addi r1,r1,16
ffc125f4: 4e 80 00 20 blr
)
{
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;
ffc125f8: 80 0b 00 00 lwz r0,0(r11)
ffc125fc: 2f 80 00 00 cmpwi cr7,r0,0
ffc12600: 80 0b 00 04 lwz r0,4(r11)
ffc12604: 41 9e 00 24 beq- cr7,ffc12628 <_RBTree_Validate_insert_unprotected+0x6c><== 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])
ffc12608: 7f 89 00 00 cmpw cr7,r9,r0
ffc1260c: 7c 0a 03 78 mr r10,r0
ffc12610: 41 9e 01 6c beq- cr7,ffc1277c <_RBTree_Validate_insert_unprotected+0x1c0>
*/
RTEMS_INLINE_ROUTINE bool _RBTree_Is_red(
const RBTree_Node *the_node
)
{
return (the_node && the_node->color == RBT_RED);
ffc12614: 2f 8a 00 00 cmpwi cr7,r10,0
ffc12618: 41 9e 00 10 beq- cr7,ffc12628 <_RBTree_Validate_insert_unprotected+0x6c>
ffc1261c: 80 ea 00 0c lwz r7,12(r10)
ffc12620: 2f 87 00 01 cmpwi cr7,r7,1
ffc12624: 41 9e 01 38 beq- cr7,ffc1275c <_RBTree_Validate_insert_unprotected+0x1a0>
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];
ffc12628: 81 49 00 04 lwz r10,4(r9)
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc1262c: 7d 20 02 78 xor r0,r9,r0
ffc12630: 7c 00 00 34 cntlzw r0,r0
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];
ffc12634: 7c 6a 52 78 xor r10,r3,r10
ffc12638: 7d 4a 00 34 cntlzw r10,r10
ffc1263c: 55 4a d9 7e rlwinm r10,r10,27,5,31
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc12640: 54 00 d9 7e rlwinm r0,r0,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];
ffc12644: 69 4a 00 01 xori r10,r10,1
RBTree_Direction pdir = the_node->parent != g->child[0];
ffc12648: 68 00 00 01 xori r0,r0,1
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
ffc1264c: 7f 8a 00 00 cmpw cr7,r10,r0
ffc12650: 41 9e 01 20 beq- cr7,ffc12770 <_RBTree_Validate_insert_unprotected+0x1b4>
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
ffc12654: 20 c0 00 01 subfic r6,r0,1
ffc12658: 54 ca 10 3a rlwinm r10,r6,2,0,29
ffc1265c: 7d 49 52 14 add r10,r9,r10
ffc12660: 80 ea 00 04 lwz r7,4(r10)
ffc12664: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc12668: 2f 87 00 00 cmpwi cr7,r7,0
ffc1266c: 41 9e 00 54 beq- cr7,ffc126c0 <_RBTree_Validate_insert_unprotected+0x104><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
ffc12670: 7c 87 02 14 add r4,r7,r0
ffc12674: 83 e4 00 04 lwz r31,4(r4)
ffc12678: 93 ea 00 04 stw r31,4(r10)
if (c->child[dir])
ffc1267c: 81 44 00 04 lwz r10,4(r4)
ffc12680: 2f 8a 00 00 cmpwi cr7,r10,0
ffc12684: 41 9e 00 0c beq- cr7,ffc12690 <_RBTree_Validate_insert_unprotected+0xd4>
c->child[dir]->parent = the_node;
ffc12688: 91 2a 00 00 stw r9,0(r10)
ffc1268c: 81 69 00 00 lwz r11,0(r9)
c->child[dir] = the_node;
ffc12690: 7d 47 02 14 add r10,r7,r0
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
c->parent = the_node->parent;
ffc12694: 91 67 00 00 stw r11,0(r7)
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
ffc12698: 91 2a 00 04 stw r9,4(r10)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc1269c: 81 4b 00 04 lwz r10,4(r11)
c->parent = the_node->parent;
the_node->parent = c;
ffc126a0: 90 e9 00 00 stw r7,0(r9)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc126a4: 7d 2a 52 78 xor r10,r9,r10
ffc126a8: 7d 4a 00 34 cntlzw r10,r10
ffc126ac: 55 4a d9 7e rlwinm r10,r10,27,5,31
ffc126b0: 69 4a 00 01 xori r10,r10,1
ffc126b4: 55 4a 10 3a rlwinm r10,r10,2,0,29
ffc126b8: 7d 6b 52 14 add r11,r11,r10
ffc126bc: 90 eb 00 04 stw r7,4(r11)
_RBTree_Rotate(the_node->parent, pdir);
the_node = the_node->child[pdir];
ffc126c0: 7c 63 02 14 add r3,r3,r0
ffc126c4: 80 63 00 04 lwz r3,4(r3)
ffc126c8: 81 23 00 00 lwz r9,0(r3)
RBTree_Direction dir
)
{
RBTree_Node *c;
if (the_node == NULL) return;
if (the_node->child[(1-dir)] == NULL) return;
ffc126cc: 7d 48 02 14 add r10,r8,r0
}
the_node->parent->color = RBT_BLACK;
ffc126d0: 90 a9 00 0c stw r5,12(r9)
ffc126d4: 81 6a 00 04 lwz r11,4(r10)
g->color = RBT_RED;
ffc126d8: 91 88 00 0c stw r12,12(r8)
ffc126dc: 2f 8b 00 00 cmpwi cr7,r11,0
ffc126e0: 41 be fe ec beq- cr7,ffc125cc <_RBTree_Validate_insert_unprotected+0x10><== NEVER TAKEN
c = the_node->child[(1-dir)];
the_node->child[(1-dir)] = c->child[dir];
ffc126e4: 54 c6 10 3a rlwinm r6,r6,2,0,29
ffc126e8: 7d 2b 32 14 add r9,r11,r6
ffc126ec: 80 09 00 04 lwz r0,4(r9)
ffc126f0: 90 0a 00 04 stw r0,4(r10)
if (c->child[dir])
ffc126f4: 81 29 00 04 lwz r9,4(r9)
ffc126f8: 2f 89 00 00 cmpwi cr7,r9,0
ffc126fc: 41 9e 00 08 beq- cr7,ffc12704 <_RBTree_Validate_insert_unprotected+0x148>
c->child[dir]->parent = the_node;
ffc12700: 91 09 00 00 stw r8,0(r9)
c->child[dir] = the_node;
ffc12704: 7c cb 32 14 add r6,r11,r6
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12708: 81 28 00 00 lwz r9,0(r8)
the_node->child[(1-dir)] = c->child[dir];
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
ffc1270c: 91 06 00 04 stw r8,4(r6)
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12710: 80 09 00 04 lwz r0,4(r9)
c->parent = the_node->parent;
ffc12714: 91 2b 00 00 stw r9,0(r11)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12718: 7d 00 02 78 xor r0,r8,r0
ffc1271c: 7c 00 00 34 cntlzw r0,r0
c->parent = the_node->parent;
the_node->parent = c;
ffc12720: 91 68 00 00 stw r11,0(r8)
if (c->child[dir])
c->child[dir]->parent = the_node;
c->child[dir] = the_node;
the_node->parent->child[the_node != the_node->parent->child[0]] = c;
ffc12724: 54 00 d9 7e rlwinm r0,r0,27,5,31
ffc12728: 68 00 00 01 xori r0,r0,1
ffc1272c: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc12730: 7d 29 02 14 add r9,r9,r0
ffc12734: 91 69 00 04 stw r11,4(r9)
ISR_Level level;
_ISR_Disable( level );
return _RBTree_Insert_unprotected( tree, node );
_ISR_Enable( level );
}
ffc12738: 81 23 00 00 lwz r9,0(r3)
*/
RTEMS_INLINE_ROUTINE RBTree_Node *_RBTree_Parent(
RBTree_Node *the_node
)
{
if (!the_node->parent->parent) return NULL;
ffc1273c: 81 69 00 00 lwz r11,0(r9)
ffc12740: 2f 8b 00 00 cmpwi cr7,r11,0
ffc12744: 7d 68 5b 78 mr r8,r11
ffc12748: 40 9e fe 98 bne+ cr7,ffc125e0 <_RBTree_Validate_insert_unprotected+0x24><== ALWAYS TAKEN
/* 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;
}
ffc1274c: 83 e1 00 0c lwz r31,12(r1)
ffc12750: 38 21 00 10 addi r1,r1,16
/* 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;
ffc12754: 91 63 00 0c stw r11,12(r3)
}
ffc12758: 4e 80 00 20 blr
u = _RBTree_Parent_sibling(the_node);
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
ffc1275c: 90 a9 00 0c stw r5,12(r9)
u->color = RBT_BLACK;
g->color = RBT_RED;
ffc12760: 7d 63 5b 78 mr r3,r11
g = the_node->parent->parent;
/* if uncle is red, repaint uncle/parent black and grandparent red */
if(_RBTree_Is_red(u)) {
the_node->parent->color = RBT_BLACK;
u->color = RBT_BLACK;
ffc12764: 90 aa 00 0c stw r5,12(r10)
g->color = RBT_RED;
ffc12768: 90 eb 00 0c stw r7,12(r11)
ffc1276c: 4b ff fe 60 b ffc125cc <_RBTree_Validate_insert_unprotected+0x10>
} else { /* if uncle is black */
RBTree_Direction dir = the_node != the_node->parent->child[0];
RBTree_Direction pdir = the_node->parent != g->child[0];
/* ensure node is on the same branch direction as parent */
if (dir != pdir) {
ffc12770: 20 ca 00 01 subfic r6,r10,1
ffc12774: 55 40 10 3a rlwinm r0,r10,2,0,29
ffc12778: 4b ff ff 54 b ffc126cc <_RBTree_Validate_insert_unprotected+0x110>
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])
return the_node->parent->child[RBT_RIGHT];
ffc1277c: 81 4b 00 08 lwz r10,8(r11)
ffc12780: 4b ff fe 94 b ffc12614 <_RBTree_Validate_insert_unprotected+0x58>
ffc098e4 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc098e4: 94 21 ff d8 stwu r1,-40(r1)
ffc098e8: 7c 08 02 a6 mflr r0
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
ffc098ec: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc098f0: 90 01 00 2c stw r0,44(r1)
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
ffc098f4: 39 29 20 44 addi r9,r9,8260
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc098f8: 93 e1 00 24 stw r31,36(r1)
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
ffc098fc: 83 e9 00 2c lwz r31,44(r9)
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc09900: 93 a1 00 1c stw r29,28(r1)
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
ffc09904: 2f 9f 00 00 cmpwi cr7,r31,0
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
ffc09908: 93 c1 00 20 stw r30,32(r1)
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
ffc0990c: 83 a9 00 28 lwz r29,40(r9)
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
ffc09910: 41 9e 00 5c beq- cr7,ffc0996c <_RTEMS_tasks_Initialize_user_tasks_body+0x88>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc09914: 2f 9d 00 00 cmpwi cr7,r29,0
ffc09918: 41 9e 00 54 beq- cr7,ffc0996c <_RTEMS_tasks_Initialize_user_tasks_body+0x88><== NEVER TAKEN
ffc0991c: 3b c0 00 00 li r30,0
return_value = rtems_task_create(
ffc09920: 80 bf 00 04 lwz r5,4(r31)
ffc09924: 39 01 00 08 addi r8,r1,8
ffc09928: 80 7f 00 00 lwz r3,0(r31)
ffc0992c: 80 9f 00 08 lwz r4,8(r31)
ffc09930: 80 df 00 14 lwz r6,20(r31)
ffc09934: 80 ff 00 0c lwz r7,12(r31)
ffc09938: 4b ff fd 0d bl ffc09644 <rtems_task_create>
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
ffc0993c: 7c 65 1b 79 mr. r5,r3
ffc09940: 40 82 00 48 bne- ffc09988 <_RTEMS_tasks_Initialize_user_tasks_body+0xa4>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
ffc09944: 80 bf 00 18 lwz r5,24(r31)
ffc09948: 80 61 00 08 lwz r3,8(r1)
ffc0994c: 80 9f 00 10 lwz r4,16(r31)
ffc09950: 48 00 00 45 bl ffc09994 <rtems_task_start>
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
ffc09954: 7c 65 1b 79 mr. r5,r3
ffc09958: 40 82 00 30 bne- ffc09988 <_RTEMS_tasks_Initialize_user_tasks_body+0xa4>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc0995c: 3b de 00 01 addi r30,r30,1
ffc09960: 7f 9e e8 00 cmpw cr7,r30,r29
ffc09964: 3b ff 00 1c addi r31,r31,28
ffc09968: 40 9e ff b8 bne+ cr7,ffc09920 <_RTEMS_tasks_Initialize_user_tasks_body+0x3c><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
ffc0996c: 80 01 00 2c lwz r0,44(r1)
ffc09970: 83 a1 00 1c lwz r29,28(r1)
ffc09974: 7c 08 03 a6 mtlr r0
ffc09978: 83 c1 00 20 lwz r30,32(r1)
ffc0997c: 83 e1 00 24 lwz r31,36(r1)
ffc09980: 38 21 00 28 addi r1,r1,40
ffc09984: 4e 80 00 20 blr
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
ffc09988: 38 60 00 01 li r3,1
ffc0998c: 38 80 00 01 li r4,1
ffc09990: 48 00 14 31 bl ffc0adc0 <_Internal_error_Occurred>
ffc10958 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
ffc10958: 81 23 01 3c lwz r9,316(r3)
while (tvp) {
ffc1095c: 2f 89 00 00 cmpwi cr7,r9,0
ffc10960: 41 9e 00 24 beq- cr7,ffc10984 <_RTEMS_tasks_Switch_extension+0x2c>
tvp->tval = *tvp->ptr;
ffc10964: 81 69 00 04 lwz r11,4(r9)
*tvp->ptr = tvp->gval;
ffc10968: 80 09 00 08 lwz r0,8(r9)
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
ffc1096c: 81 4b 00 00 lwz r10,0(r11)
ffc10970: 91 49 00 0c stw r10,12(r9)
*tvp->ptr = tvp->gval;
ffc10974: 90 0b 00 00 stw r0,0(r11)
tvp = (rtems_task_variable_t *)tvp->next;
ffc10978: 81 29 00 00 lwz r9,0(r9)
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
ffc1097c: 2f 89 00 00 cmpwi cr7,r9,0
ffc10980: 40 9e ff e4 bne+ cr7,ffc10964 <_RTEMS_tasks_Switch_extension+0xc><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
ffc10984: 81 24 01 3c lwz r9,316(r4)
while (tvp) {
ffc10988: 2f 89 00 00 cmpwi cr7,r9,0
ffc1098c: 4d 9e 00 20 beqlr cr7
tvp->gval = *tvp->ptr;
ffc10990: 81 69 00 04 lwz r11,4(r9)
*tvp->ptr = tvp->tval;
ffc10994: 80 09 00 0c lwz r0,12(r9)
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
ffc10998: 81 4b 00 00 lwz r10,0(r11)
ffc1099c: 91 49 00 08 stw r10,8(r9)
*tvp->ptr = tvp->tval;
ffc109a0: 90 0b 00 00 stw r0,0(r11)
tvp = (rtems_task_variable_t *)tvp->next;
ffc109a4: 81 29 00 00 lwz r9,0(r9)
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
ffc109a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc109ac: 40 9e ff e4 bne+ cr7,ffc10990 <_RTEMS_tasks_Switch_extension+0x38><== NEVER TAKEN
ffc109b0: 4e 80 00 20 blr
ffc0a8c8 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0a8c8: 94 21 ff e0 stwu r1,-32(r1)
ffc0a8cc: 7c 08 02 a6 mflr r0
ffc0a8d0: 7c 64 1b 78 mr r4,r3
ffc0a8d4: 3c 60 00 00 lis r3,0
ffc0a8d8: 90 01 00 24 stw r0,36(r1)
ffc0a8dc: 38 63 2c 98 addi r3,r3,11416
ffc0a8e0: 38 a1 00 08 addi r5,r1,8
ffc0a8e4: 93 e1 00 1c stw r31,28(r1)
ffc0a8e8: 48 00 28 01 bl ffc0d0e8 <_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 ) {
ffc0a8ec: 80 01 00 08 lwz r0,8(r1)
ffc0a8f0: 7c 7f 1b 78 mr r31,r3
ffc0a8f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a8f8: 40 9e 00 4c bne- cr7,ffc0a944 <_Rate_monotonic_Timeout+0x7c><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc0a8fc: 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);
ffc0a900: 80 03 00 10 lwz r0,16(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc0a904: 70 09 40 00 andi. r9,r0,16384
ffc0a908: 41 82 00 14 beq- ffc0a91c <_Rate_monotonic_Timeout+0x54>
ffc0a90c: 81 23 00 20 lwz r9,32(r3)
ffc0a910: 80 1f 00 08 lwz r0,8(r31)
ffc0a914: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a918: 41 9e 00 6c beq- cr7,ffc0a984 <_Rate_monotonic_Timeout+0xbc>
_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 ) {
ffc0a91c: 80 1f 00 38 lwz r0,56(r31)
ffc0a920: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a924: 41 9e 00 34 beq- cr7,ffc0a958 <_Rate_monotonic_Timeout+0x90>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc0a928: 38 00 00 04 li r0,4
ffc0a92c: 90 1f 00 38 stw r0,56(r31)
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0a930: 3d 20 00 00 lis r9,0
ffc0a934: 81 69 28 6c lwz r11,10348(r9)
ffc0a938: 38 0b ff ff addi r0,r11,-1
ffc0a93c: 90 09 28 6c stw r0,10348(r9)
return _Thread_Dispatch_disable_level;
ffc0a940: 80 09 28 6c lwz r0,10348(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc0a944: 80 01 00 24 lwz r0,36(r1)
ffc0a948: 83 e1 00 1c lwz r31,28(r1)
ffc0a94c: 38 21 00 20 addi r1,r1,32
ffc0a950: 7c 08 03 a6 mtlr r0
ffc0a954: 4e 80 00 20 blr
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc0a958: 38 00 00 03 li r0,3
ffc0a95c: 90 1f 00 38 stw r0,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc0a960: 7f e3 fb 78 mr r3,r31
ffc0a964: 4b ff f7 89 bl ffc0a0ec <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a968: 80 1f 00 3c lwz r0,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a96c: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a970: 90 1f 00 1c stw r0,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a974: 38 63 2e 68 addi r3,r3,11880
ffc0a978: 38 9f 00 10 addi r4,r31,16
ffc0a97c: 48 00 4c 79 bl ffc0f5f4 <_Watchdog_Insert>
ffc0a980: 4b ff ff b0 b ffc0a930 <_Rate_monotonic_Timeout+0x68>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc0a984: 3c 80 10 03 lis r4,4099
ffc0a988: 60 84 ff f8 ori r4,r4,65528
ffc0a98c: 48 00 33 b5 bl ffc0dd40 <_Thread_Clear_state>
ffc0a990: 4b ff ff d0 b ffc0a960 <_Rate_monotonic_Timeout+0x98>
ffc0c2e8 <_Scheduler_EDF_Allocate>:
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
ffc0c2e8: 94 21 ff f0 stwu r1,-16(r1)
ffc0c2ec: 7c 08 02 a6 mflr r0
ffc0c2f0: 93 e1 00 0c stw r31,12(r1)
ffc0c2f4: 7c 7f 1b 78 mr r31,r3
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
ffc0c2f8: 38 60 00 18 li r3,24
#include <rtems/score/wkspace.h>
void *_Scheduler_EDF_Allocate(
Thread_Control *the_thread
)
{
ffc0c2fc: 90 01 00 14 stw r0,20(r1)
void *sched;
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
ffc0c300: 48 00 25 a9 bl ffc0e8a8 <_Workspace_Allocate>
if ( sched ) {
ffc0c304: 2c 03 00 00 cmpwi r3,0
ffc0c308: 41 82 00 14 beq- ffc0c31c <_Scheduler_EDF_Allocate+0x34><== 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;
ffc0c30c: 38 00 00 02 li r0,2
Scheduler_EDF_Per_thread *schinfo;
sched = _Workspace_Allocate( sizeof(Scheduler_EDF_Per_thread) );
if ( sched ) {
the_thread->scheduler_info = sched;
ffc0c310: 90 7f 00 8c stw r3,140(r31)
schinfo = (Scheduler_EDF_Per_thread *)(the_thread->scheduler_info);
schinfo->thread = the_thread;
ffc0c314: 93 e3 00 00 stw r31,0(r3)
schinfo->queue_state = SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN;
ffc0c318: 90 03 00 14 stw r0,20(r3)
}
return sched;
}
ffc0c31c: 80 01 00 14 lwz r0,20(r1)
ffc0c320: 83 e1 00 0c lwz r31,12(r1)
ffc0c324: 38 21 00 10 addi r1,r1,16
ffc0c328: 7c 08 03 a6 mtlr r0
ffc0c32c: 4e 80 00 20 blr
ffc0c330 <_Scheduler_EDF_Block>:
#include <rtems/score/thread.h>
void _Scheduler_EDF_Block(
Thread_Control *the_thread
)
{
ffc0c330: 94 21 ff f0 stwu r1,-16(r1)
ffc0c334: 7c 08 02 a6 mflr r0
ffc0c338: 93 c1 00 08 stw r30,8(r1)
RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Heir );
ffc0c33c: 3f c0 00 00 lis r30,0
ffc0c340: 3b de 31 c4 addi r30,r30,12740
ffc0c344: 90 01 00 14 stw r0,20(r1)
ffc0c348: 93 e1 00 0c stw r31,12(r1)
ffc0c34c: 7c 7f 1b 78 mr r31,r3
_Scheduler_EDF_Extract( the_thread );
ffc0c350: 48 00 00 bd bl ffc0c40c <_Scheduler_EDF_Extract>
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
ffc0c354: 80 1e 00 10 lwz r0,16(r30)
ffc0c358: 7f 9f 00 00 cmpw cr7,r31,r0
ffc0c35c: 41 9e 00 48 beq- cr7,ffc0c3a4 <_Scheduler_EDF_Block+0x74><== ALWAYS TAKEN
_Scheduler_EDF_Schedule();
if ( _Thread_Is_executing( the_thread ) )
ffc0c360: 80 1e 00 0c lwz r0,12(r30)
ffc0c364: 7f 9f 00 00 cmpw cr7,r31,r0
ffc0c368: 41 9e 00 1c beq- cr7,ffc0c384 <_Scheduler_EDF_Block+0x54><== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
}
ffc0c36c: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc0c370: 83 c1 00 08 lwz r30,8(r1) <== NOT EXECUTED
ffc0c374: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0c378: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc0c37c: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc0c380: 4e 80 00 20 blr <== NOT EXECUTED
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_EDF_Schedule();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
ffc0c384: 38 00 00 01 li r0,1
}
ffc0c388: 83 e1 00 0c lwz r31,12(r1)
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_EDF_Schedule();
if ( _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
ffc0c38c: 98 1e 00 18 stb r0,24(r30)
}
ffc0c390: 80 01 00 14 lwz r0,20(r1)
ffc0c394: 83 c1 00 08 lwz r30,8(r1)
ffc0c398: 38 21 00 10 addi r1,r1,16
ffc0c39c: 7c 08 03 a6 mtlr r0
ffc0c3a0: 4e 80 00 20 blr
_Scheduler_EDF_Extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_EDF_Schedule();
ffc0c3a4: 48 00 01 fd bl ffc0c5a0 <_Scheduler_EDF_Schedule>
ffc0c3a8: 4b ff ff b8 b ffc0c360 <_Scheduler_EDF_Block+0x30>
ffc0c5d8 <_Scheduler_EDF_Unblock>:
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
ffc0c5d8: 94 21 ff f0 stwu r1,-16(r1)
ffc0c5dc: 7c 08 02 a6 mflr r0
ffc0c5e0: 93 e1 00 0c stw r31,12(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(
ffc0c5e4: 3f e0 00 00 lis r31,0
ffc0c5e8: 3b ff 31 c4 addi r31,r31,12740
#include <rtems/score/scheduleredf.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
)
{
ffc0c5ec: 90 01 00 14 stw r0,20(r1)
ffc0c5f0: 93 c1 00 08 stw r30,8(r1)
ffc0c5f4: 7c 7e 1b 78 mr r30,r3
_Scheduler_EDF_Enqueue(the_thread);
ffc0c5f8: 4b ff fd d5 bl ffc0c3cc <_Scheduler_EDF_Enqueue>
ffc0c5fc: 3d 60 00 00 lis r11,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(
ffc0c600: 81 3f 00 10 lwz r9,16(r31)
ffc0c604: 80 0b 21 10 lwz r0,8464(r11)
ffc0c608: 80 69 00 14 lwz r3,20(r9)
ffc0c60c: 80 9e 00 14 lwz r4,20(r30)
ffc0c610: 7c 09 03 a6 mtctr r0
ffc0c614: 4e 80 04 21 bctrl
ffc0c618: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c61c: 41 9c 00 1c blt- cr7,ffc0c638 <_Scheduler_EDF_Unblock+0x60>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
ffc0c620: 80 01 00 14 lwz r0,20(r1)
ffc0c624: 83 c1 00 08 lwz r30,8(r1)
ffc0c628: 7c 08 03 a6 mtlr r0
ffc0c62c: 83 e1 00 0c lwz r31,12(r1)
ffc0c630: 38 21 00 10 addi r1,r1,16
ffc0c634: 4e 80 00 20 blr
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0c638: 81 3f 00 0c lwz r9,12(r31)
* 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;
ffc0c63c: 93 df 00 10 stw r30,16(r31)
if ( _Thread_Executing->is_preemptible ||
ffc0c640: 88 09 00 74 lbz r0,116(r9)
ffc0c644: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c648: 41 9e 00 24 beq- cr7,ffc0c66c <_Scheduler_EDF_Unblock+0x94><== NEVER TAKEN
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0c64c: 38 00 00 01 li r0,1
ffc0c650: 98 1f 00 18 stb r0,24(r31)
}
}
ffc0c654: 80 01 00 14 lwz r0,20(r1)
ffc0c658: 83 c1 00 08 lwz r30,8(r1)
ffc0c65c: 7c 08 03 a6 mtlr r0
ffc0c660: 83 e1 00 0c lwz r31,12(r1)
ffc0c664: 38 21 00 10 addi r1,r1,16
ffc0c668: 4e 80 00 20 blr
*/
if ( _Scheduler_Is_priority_lower_than(
_Thread_Heir->current_priority,
the_thread->current_priority )) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0c66c: 80 1e 00 14 lwz r0,20(r30) <== NOT EXECUTED
ffc0c670: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0c674: 40 be ff ac bne- cr7,ffc0c620 <_Scheduler_EDF_Unblock+0x48><== NOT EXECUTED
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0c678: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0c67c: 98 1f 00 18 stb r0,24(r31) <== NOT EXECUTED
ffc0c680: 4b ff ff d4 b ffc0c654 <_Scheduler_EDF_Unblock+0x7c> <== NOT EXECUTED
ffc0c684 <_Scheduler_EDF_Update>:
#include <rtems/score/thread.h>
void _Scheduler_EDF_Update(
Thread_Control *the_thread
)
{
ffc0c684: 94 21 ff e8 stwu r1,-24(r1)
ffc0c688: 7c 08 02 a6 mflr r0
ffc0c68c: 90 01 00 1c stw r0,28(r1)
ffc0c690: 93 c1 00 10 stw r30,16(r1)
Scheduler_EDF_Per_thread *sched_info =
ffc0c694: 83 c3 00 8c lwz r30,140(r3)
#include <rtems/score/thread.h>
void _Scheduler_EDF_Update(
Thread_Control *the_thread
)
{
ffc0c698: 93 e1 00 14 stw r31,20(r1)
ffc0c69c: 7c 7f 1b 78 mr r31,r3
Scheduler_EDF_Per_thread *sched_info =
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
ffc0c6a0: 80 1e 00 14 lwz r0,20(r30)
#include <rtems/score/thread.h>
void _Scheduler_EDF_Update(
Thread_Control *the_thread
)
{
ffc0c6a4: 93 a1 00 0c stw r29,12(r1)
Scheduler_EDF_Per_thread *sched_info =
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
ffc0c6a8: 2f 80 00 02 cmpwi cr7,r0,2
ffc0c6ac: 41 9e 00 28 beq- cr7,ffc0c6d4 <_Scheduler_EDF_Update+0x50>
the_thread->real_priority = the_thread->Start.initial_priority;
the_thread->current_priority = the_thread->Start.initial_priority;
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) {
ffc0c6b0: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c6b4: 41 9e 00 58 beq- cr7,ffc0c70c <_Scheduler_EDF_Update+0x88><== NEVER TAKEN
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
ffc0c6b8: 80 01 00 1c lwz r0,28(r1)
ffc0c6bc: 83 a1 00 0c lwz r29,12(r1)
ffc0c6c0: 7c 08 03 a6 mtlr r0
ffc0c6c4: 83 c1 00 10 lwz r30,16(r1)
ffc0c6c8: 83 e1 00 14 lwz r31,20(r1)
ffc0c6cc: 38 21 00 18 addi r1,r1,24
ffc0c6d0: 4e 80 00 20 blr
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
/* Shifts the priority to the region of background tasks. */
the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
ffc0c6d4: 80 03 00 b0 lwz r0,176(r3)
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
ffc0c6d8: 83 a1 00 0c lwz r29,12(r1)
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
/* Shifts the priority to the region of background tasks. */
the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
ffc0c6dc: 64 00 80 00 oris r0,r0,32768
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
ffc0c6e0: 83 e1 00 14 lwz r31,20(r1)
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
if (sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_NEVER_HAS_BEEN) {
/* Shifts the priority to the region of background tasks. */
the_thread->Start.initial_priority |= (SCHEDULER_EDF_PRIO_MSB);
ffc0c6e4: 90 03 00 b0 stw r0,176(r3)
the_thread->real_priority = the_thread->Start.initial_priority;
ffc0c6e8: 90 03 00 18 stw r0,24(r3)
the_thread->current_priority = the_thread->Start.initial_priority;
ffc0c6ec: 90 03 00 14 stw r0,20(r3)
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
ffc0c6f0: 38 00 00 00 li r0,0
ffc0c6f4: 90 1e 00 14 stw r0,20(r30)
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
}
}
}
ffc0c6f8: 80 01 00 1c lwz r0,28(r1)
ffc0c6fc: 83 c1 00 10 lwz r30,16(r1)
ffc0c700: 38 21 00 18 addi r1,r1,24
ffc0c704: 7c 08 03 a6 mtlr r0
ffc0c708: 4e 80 00 20 blr
the_thread->current_priority = the_thread->Start.initial_priority;
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) {
_RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node);
ffc0c70c: 3f a0 00 00 lis r29,0 <== NOT EXECUTED
Thread_Control *the_thread
)
{
Scheduler_EDF_Per_thread *sched_info =
(Scheduler_EDF_Per_thread*)the_thread->scheduler_info;
RBTree_Node *the_node = &(sched_info->Node);
ffc0c710: 3b de 00 04 addi r30,r30,4 <== NOT EXECUTED
the_thread->current_priority = the_thread->Start.initial_priority;
sched_info->queue_state = SCHEDULER_EDF_QUEUE_STATE_NOT_PRESENTLY;
}
if ( sched_info->queue_state == SCHEDULER_EDF_QUEUE_STATE_YES ) {
_RBTree_Extract(&_Scheduler_EDF_Ready_queue, the_node);
ffc0c714: 3b bd 31 e8 addi r29,r29,12776 <== NOT EXECUTED
ffc0c718: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0c71c: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc0c720: 48 00 5e 61 bl ffc12580 <_RBTree_Extract> <== NOT EXECUTED
_RBTree_Insert(&_Scheduler_EDF_Ready_queue, the_node);
ffc0c724: 7f c4 f3 78 mr r4,r30 <== NOT EXECUTED
ffc0c728: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0c72c: 48 00 61 91 bl ffc128bc <_RBTree_Insert> <== NOT EXECUTED
_Scheduler_EDF_Schedule();
ffc0c730: 4b ff fe 71 bl ffc0c5a0 <_Scheduler_EDF_Schedule> <== NOT EXECUTED
if ( _Thread_Executing != _Thread_Heir ) {
ffc0c734: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc0c738: 39 29 31 c4 addi r9,r9,12740 <== NOT EXECUTED
ffc0c73c: 81 69 00 0c lwz r11,12(r9) <== NOT EXECUTED
ffc0c740: 80 09 00 10 lwz r0,16(r9) <== NOT EXECUTED
ffc0c744: 7f 8b 00 00 cmpw cr7,r11,r0 <== NOT EXECUTED
ffc0c748: 41 be ff 70 beq- cr7,ffc0c6b8 <_Scheduler_EDF_Update+0x34><== NOT EXECUTED
if ( _Thread_Executing->is_preemptible ||
ffc0c74c: 88 0b 00 74 lbz r0,116(r11) <== NOT EXECUTED
ffc0c750: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0c754: 40 9e 00 10 bne- cr7,ffc0c764 <_Scheduler_EDF_Update+0xe0><== NOT EXECUTED
ffc0c758: 80 1f 00 14 lwz r0,20(r31) <== NOT EXECUTED
ffc0c75c: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0c760: 40 be ff 58 bne- cr7,ffc0c6b8 <_Scheduler_EDF_Update+0x34><== NOT EXECUTED
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0c764: 38 00 00 01 li r0,1 <== NOT EXECUTED
}
}
}
ffc0c768: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED
_Scheduler_EDF_Schedule();
if ( _Thread_Executing != _Thread_Heir ) {
if ( _Thread_Executing->is_preemptible ||
the_thread->current_priority == 0 )
_Thread_Dispatch_necessary = true;
ffc0c76c: 98 09 00 18 stb r0,24(r9) <== NOT EXECUTED
}
}
}
ffc0c770: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED
ffc0c774: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED
ffc0c778: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0c77c: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED
ffc0c780: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED
ffc0c784: 4e 80 00 20 blr <== NOT EXECUTED
ffc0c788 <_Scheduler_EDF_Yield>:
#include <rtems/score/scheduler.h>
#include <rtems/score/scheduleredf.h>
#include <rtems/score/thread.h>
void _Scheduler_EDF_Yield(void)
{
ffc0c788: 94 21 ff e0 stwu r1,-32(r1) <== NOT EXECUTED
ffc0c78c: 7c 08 02 a6 mflr r0 <== NOT EXECUTED
ffc0c790: 93 c1 00 18 stw r30,24(r1) <== NOT EXECUTED
Scheduler_EDF_Per_thread *first_info;
RBTree_Node *first_node;
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0c794: 3f c0 00 00 lis r30,0 <== NOT EXECUTED
ffc0c798: 3b de 31 c4 addi r30,r30,12740 <== NOT EXECUTED
#include <rtems/score/scheduler.h>
#include <rtems/score/scheduleredf.h>
#include <rtems/score/thread.h>
void _Scheduler_EDF_Yield(void)
{
ffc0c79c: 90 01 00 24 stw r0,36(r1) <== NOT EXECUTED
ffc0c7a0: 93 a1 00 14 stw r29,20(r1) <== NOT EXECUTED
Scheduler_EDF_Per_thread *first_info;
RBTree_Node *first_node;
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0c7a4: 83 be 00 0c lwz r29,12(r30) <== NOT EXECUTED
#include <rtems/score/scheduler.h>
#include <rtems/score/scheduleredf.h>
#include <rtems/score/thread.h>
void _Scheduler_EDF_Yield(void)
{
ffc0c7a8: 93 61 00 0c stw r27,12(r1) <== NOT EXECUTED
ffc0c7ac: 93 81 00 10 stw r28,16(r1) <== NOT EXECUTED
ffc0c7b0: 93 e1 00 1c stw r31,28(r1) <== NOT EXECUTED
Scheduler_EDF_Per_thread *first_info;
RBTree_Node *first_node;
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
Scheduler_EDF_Per_thread *executing_info =
ffc0c7b4: 83 7d 00 8c lwz r27,140(r29) <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c7b8: 7f 80 00 a6 mfmsr r28 <== NOT EXECUTED
ffc0c7bc: 7c 10 42 a6 mfsprg r0,0 <== NOT EXECUTED
ffc0c7c0: 7f 80 00 78 andc r0,r28,r0 <== NOT EXECUTED
ffc0c7c4: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE bool _RBTree_Has_only_one_node(
const RBTree_Control *the_rbtree
)
{
if(!the_rbtree) return NULL; /* TODO: expected behavior? */
return (the_rbtree->root->child[RBT_LEFT] == NULL && the_rbtree->root->child[RBT_RIGHT] == NULL);
ffc0c7c8: 3f e0 00 00 lis r31,0 <== NOT EXECUTED
ffc0c7cc: 3b ff 31 e8 addi r31,r31,12776 <== NOT EXECUTED
ffc0c7d0: 81 3f 00 04 lwz r9,4(r31) <== NOT EXECUTED
ffc0c7d4: 80 09 00 04 lwz r0,4(r9) <== NOT EXECUTED
ffc0c7d8: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0c7dc: 41 9e 00 68 beq- cr7,ffc0c844 <_Scheduler_EDF_Yield+0xbc><== NOT EXECUTED
(Scheduler_EDF_Per_thread *) executing->scheduler_info;
RBTree_Node *executing_node = &(executing_info->Node);
ffc0c7e0: 3b 7b 00 04 addi r27,r27,4 <== NOT EXECUTED
if ( !_RBTree_Has_only_one_node(&_Scheduler_EDF_Ready_queue) ) {
/*
* The RBTree has more than one node, enqueue behind the tasks
* with the same priority in case there are such ones.
*/
_RBTree_Extract( &_Scheduler_EDF_Ready_queue, executing_node );
ffc0c7e4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0c7e8: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc0c7ec: 48 00 5d 95 bl ffc12580 <_RBTree_Extract> <== NOT EXECUTED
_RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
ffc0c7f0: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0c7f4: 7f 64 db 78 mr r4,r27 <== NOT EXECUTED
ffc0c7f8: 48 00 60 c5 bl ffc128bc <_RBTree_Insert> <== NOT EXECUTED
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0c7fc: 7c 00 00 a6 mfmsr r0 <== NOT EXECUTED
ffc0c800: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED
ffc0c804: 7c 00 01 24 mtmsr r0 <== NOT EXECUTED
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) ) {
ffc0c808: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED
ffc0c80c: 7f 9d 00 00 cmpw cr7,r29,r0 <== NOT EXECUTED
ffc0c810: 41 9e 00 50 beq- cr7,ffc0c860 <_Scheduler_EDF_Yield+0xd8><== NOT EXECUTED
_Thread_Heir = first_info->thread;
}
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Thread_Dispatch_necessary = true;
ffc0c814: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0c818: 98 1e 00 18 stb r0,24(r30) <== NOT EXECUTED
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c81c: 7f 80 01 24 mtmsr r28 <== NOT EXECUTED
_ISR_Enable( level );
}
ffc0c820: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED
ffc0c824: 83 61 00 0c lwz r27,12(r1) <== NOT EXECUTED
ffc0c828: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0c82c: 83 81 00 10 lwz r28,16(r1) <== NOT EXECUTED
ffc0c830: 83 a1 00 14 lwz r29,20(r1) <== NOT EXECUTED
ffc0c834: 83 c1 00 18 lwz r30,24(r1) <== NOT EXECUTED
ffc0c838: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED
ffc0c83c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED
ffc0c840: 4e 80 00 20 blr <== NOT EXECUTED
ffc0c844: 80 09 00 08 lwz r0,8(r9) <== NOT EXECUTED
ffc0c848: 2f 80 00 00 cmpwi cr7,r0,0 <== NOT EXECUTED
ffc0c84c: 40 9e ff 94 bne+ cr7,ffc0c7e0 <_Scheduler_EDF_Yield+0x58><== NOT EXECUTED
_RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node);
_Thread_Heir = first_info->thread;
}
_Thread_Dispatch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
ffc0c850: 80 1e 00 10 lwz r0,16(r30) <== NOT EXECUTED
ffc0c854: 7f 9d 00 00 cmpw cr7,r29,r0 <== NOT EXECUTED
ffc0c858: 40 9e ff bc bne+ cr7,ffc0c814 <_Scheduler_EDF_Yield+0x8c><== NOT EXECUTED
ffc0c85c: 4b ff ff c0 b ffc0c81c <_Scheduler_EDF_Yield+0x94> <== NOT EXECUTED
_RBTree_Insert( &_Scheduler_EDF_Ready_queue, executing_node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) ) {
first_node = _RBTree_Peek( &_Scheduler_EDF_Ready_queue, RBT_LEFT );
ffc0c860: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0c864: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc0c868: 48 00 60 69 bl ffc128d0 <_RBTree_Peek> <== NOT EXECUTED
first_info =
_RBTree_Container_of(first_node, Scheduler_EDF_Per_thread, Node);
_Thread_Heir = first_info->thread;
ffc0c86c: 80 03 ff fc lwz r0,-4(r3) <== NOT EXECUTED
ffc0c870: 90 1e 00 10 stw r0,16(r30) <== NOT EXECUTED
ffc0c874: 4b ff ff a0 b ffc0c814 <_Scheduler_EDF_Yield+0x8c> <== NOT EXECUTED
ffc0b8c0 <_Scheduler_priority_Block>:
)
{
Scheduler_priority_Per_thread *sched_info;
Chain_Control *ready;
sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info;
ffc0b8c0: 81 63 00 8c lwz r11,140(r3)
ready = sched_info->ready_chain;
ffc0b8c4: 81 2b 00 00 lwz r9,0(r11)
if ( _Chain_Has_only_one_node( ready ) ) {
ffc0b8c8: 81 49 00 00 lwz r10,0(r9)
ffc0b8cc: 80 09 00 08 lwz r0,8(r9)
ffc0b8d0: 7f 8a 00 00 cmpw cr7,r10,r0
ffc0b8d4: 41 9e 00 a4 beq- cr7,ffc0b978 <_Scheduler_priority_Block+0xb8>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0b8d8: 81 63 00 00 lwz r11,0(r3)
previous = the_node->previous;
ffc0b8dc: 81 23 00 04 lwz r9,4(r3)
next->previous = previous;
ffc0b8e0: 91 2b 00 04 stw r9,4(r11)
previous->next = next;
ffc0b8e4: 91 69 00 00 stw r11,0(r9)
RTEMS_INLINE_ROUTINE bool _Thread_Is_heir (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Heir );
ffc0b8e8: 3d 20 00 00 lis r9,0
ffc0b8ec: 39 29 31 44 addi r9,r9,12612
{
_Scheduler_priority_Ready_queue_extract( the_thread );
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
ffc0b8f0: 80 09 00 10 lwz r0,16(r9)
ffc0b8f4: 7f 83 00 00 cmpw cr7,r3,r0
ffc0b8f8: 41 9e 00 1c beq- cr7,ffc0b914 <_Scheduler_priority_Block+0x54>
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc0b8fc: 80 09 00 0c lwz r0,12(r9)
ffc0b900: 7f 83 00 00 cmpw cr7,r3,r0
ffc0b904: 4c be 00 20 bnelr+ cr7
_Thread_Dispatch_necessary = true;
ffc0b908: 38 00 00 01 li r0,1
ffc0b90c: 98 09 00 18 stb r0,24(r9)
ffc0b910: 4e 80 00 20 blr
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 );
ffc0b914: 3c a0 00 00 lis r5,0
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc0b918: 3d 40 00 00 lis r10,0
ffc0b91c: 81 65 28 4c lwz r11,10316(r5)
ffc0b920: 81 4a 20 e0 lwz r10,8416(r10)
ffc0b924: 7d 66 00 34 cntlzw r6,r11
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b928: 3c e0 00 00 lis r7,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 );
ffc0b92c: 91 65 28 4c stw r11,10316(r5)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b930: 38 e7 31 80 addi r7,r7,12672
ffc0b934: 54 c8 10 3a rlwinm r8,r6,2,0,29
ffc0b938: 7c 07 40 2e lwzx r0,r7,r8
ffc0b93c: 7c 0b 00 34 cntlzw r11,r0
return (_Priority_Bits_index( major ) << 4) +
ffc0b940: 54 c6 20 36 rlwinm r6,r6,4,0,27
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0b944: 7c 07 41 2e stwx r0,r7,r8
return (_Priority_Bits_index( major ) << 4) +
ffc0b948: 7d 66 5a 14 add r11,r6,r11
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0b94c: 1d 6b 00 0c mulli r11,r11,12
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0b950: 7c 0a 58 2e lwzx r0,r10,r11
ffc0b954: 7d 0a 5a 14 add r8,r10,r11
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0b958: 39 68 00 04 addi r11,r8,4
ffc0b95c: 7f 80 58 00 cmpw cr7,r0,r11
ffc0b960: 41 9e 00 60 beq- cr7,ffc0b9c0 <_Scheduler_priority_Block+0x100><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0b964: 90 09 00 10 stw r0,16(r9)
/* TODO: flash critical section? */
if ( _Thread_Is_heir( the_thread ) )
_Scheduler_priority_Schedule_body();
if ( _Thread_Is_executing( the_thread ) )
ffc0b968: 80 09 00 0c lwz r0,12(r9)
ffc0b96c: 7f 83 00 00 cmpw cr7,r3,r0
ffc0b970: 4c be 00 20 bnelr+ cr7
ffc0b974: 4b ff ff 94 b ffc0b908 <_Scheduler_priority_Block+0x48>
RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove (
Priority_bit_map_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
ffc0b978: 81 4b 00 04 lwz r10,4(r11)
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 );
ffc0b97c: 39 09 00 04 addi r8,r9,4
ffc0b980: 80 0b 00 14 lwz r0,20(r11)
ffc0b984: 80 ea 00 00 lwz r7,0(r10)
head->next = tail;
ffc0b988: 91 09 00 00 stw r8,0(r9)
head->previous = NULL;
ffc0b98c: 39 00 00 00 li r8,0
ffc0b990: 7c e0 00 38 and r0,r7,r0
if ( *the_priority_map->minor == 0 )
ffc0b994: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b998: 91 09 00 04 stw r8,4(r9)
tail->previous = head;
ffc0b99c: 91 29 00 08 stw r9,8(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;
ffc0b9a0: 90 0a 00 00 stw r0,0(r10)
if ( *the_priority_map->minor == 0 )
ffc0b9a4: 40 be ff 44 bne- cr7,ffc0b8e8 <_Scheduler_priority_Block+0x28>
_Priority_Major_bit_map &= the_priority_map->block_major;
ffc0b9a8: 3d 20 00 00 lis r9,0
ffc0b9ac: 80 0b 00 10 lwz r0,16(r11)
ffc0b9b0: 81 49 28 4c lwz r10,10316(r9)
ffc0b9b4: 7d 40 00 38 and r0,r10,r0
ffc0b9b8: 90 09 28 4c stw r0,10316(r9)
ffc0b9bc: 4b ff ff 2c b ffc0b8e8 <_Scheduler_priority_Block+0x28>
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0b9c0: 38 00 00 00 li r0,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0b9c4: 90 09 00 10 stw r0,16(r9) <== NOT EXECUTED
ffc0b9c8: 4b ff ff a0 b ffc0b968 <_Scheduler_priority_Block+0xa8><== NOT EXECUTED
ffc0bba4 <_Scheduler_priority_Schedule>:
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0bba4: 3c c0 00 00 lis r6,0
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
(Chain_Control *) _Scheduler.information
ffc0bba8: 3d 60 00 00 lis r11,0
ffc0bbac: 81 26 28 4c lwz r9,10316(r6)
ffc0bbb0: 81 6b 20 e0 lwz r11,8416(r11)
ffc0bbb4: 7d 27 00 34 cntlzw r7,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0bbb8: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void )
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0bbbc: 91 26 28 4c stw r9,10316(r6)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0bbc0: 39 08 31 80 addi r8,r8,12672
ffc0bbc4: 54 ea 10 3a rlwinm r10,r7,2,0,29
ffc0bbc8: 7c 08 50 2e lwzx r0,r8,r10
ffc0bbcc: 7c 06 00 34 cntlzw r6,r0
return (_Priority_Bits_index( major ) << 4) +
ffc0bbd0: 54 e9 20 36 rlwinm r9,r7,4,0,27
{
Priority_bit_map_Control minor;
Priority_bit_map_Control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0bbd4: 7c 08 51 2e stwx r0,r8,r10
return (_Priority_Bits_index( major ) << 4) +
ffc0bbd8: 7d 29 32 14 add r9,r9,r6
Chain_Control *the_ready_queue
)
{
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
ffc0bbdc: 1d 29 00 0c mulli r9,r9,12
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0bbe0: 7c 0b 48 2e lwzx r0,r11,r9
ffc0bbe4: 7d 4b 4a 14 add r10,r11,r9
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0bbe8: 39 2a 00 04 addi r9,r10,4
ffc0bbec: 7f 80 48 00 cmpw cr7,r0,r9
ffc0bbf0: 41 9e 00 10 beq- cr7,ffc0bc00 <_Scheduler_priority_Schedule+0x5c><== NEVER TAKEN
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0bbf4: 3d 20 00 00 lis r9,0
ffc0bbf8: 90 09 31 54 stw r0,12628(r9)
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Schedule(void)
{
_Scheduler_priority_Schedule_body();
}
ffc0bbfc: 4e 80 00 20 blr
Priority_Control index = _Priority_bit_map_Get_highest();
if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
return NULL;
ffc0bc00: 38 00 00 00 li r0,0 <== NOT EXECUTED
*
* @param[in] the_thread - pointer to thread
*/
RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void)
{
_Thread_Heir = _Scheduler_priority_Ready_queue_first(
ffc0bc04: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc0bc08: 90 09 31 54 stw r0,12628(r9) <== NOT EXECUTED
ffc0bc0c: 4e 80 00 20 blr <== NOT EXECUTED
ffc0bc10 <_Scheduler_priority_Tick>:
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
ffc0bc10: 7c 08 02 a6 mflr r0
ffc0bc14: 94 21 ff f0 stwu r1,-16(r1)
Thread_Control *executing;
executing = _Thread_Executing;
ffc0bc18: 3d 20 00 00 lis r9,0
#include <rtems/system.h>
#include <rtems/score/schedulerpriority.h>
void _Scheduler_priority_Tick( void )
{
ffc0bc1c: 90 01 00 14 stw r0,20(r1)
Thread_Control *executing;
executing = _Thread_Executing;
ffc0bc20: 80 69 31 50 lwz r3,12624(r9)
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
ffc0bc24: 88 03 00 74 lbz r0,116(r3)
ffc0bc28: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc2c: 41 9e 00 2c beq- cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48>
return;
if ( !_States_Is_ready( executing->current_state ) )
ffc0bc30: 80 03 00 10 lwz r0,16(r3)
ffc0bc34: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc38: 40 9e 00 20 bne- cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
ffc0bc3c: 80 03 00 7c lwz r0,124(r3)
ffc0bc40: 2b 80 00 01 cmplwi cr7,r0,1
ffc0bc44: 41 9c 00 14 blt- cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48>
ffc0bc48: 2b 80 00 02 cmplwi cr7,r0,2
ffc0bc4c: 40 9d 00 40 ble- cr7,ffc0bc8c <_Scheduler_priority_Tick+0x7c>
ffc0bc50: 2f 80 00 03 cmpwi cr7,r0,3
ffc0bc54: 41 9e 00 14 beq- cr7,ffc0bc68 <_Scheduler_priority_Tick+0x58><== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
ffc0bc58: 80 01 00 14 lwz r0,20(r1)
ffc0bc5c: 38 21 00 10 addi r1,r1,16
ffc0bc60: 7c 08 03 a6 mtlr r0
ffc0bc64: 4e 80 00 20 blr
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
ffc0bc68: 81 23 00 78 lwz r9,120(r3)
ffc0bc6c: 38 09 ff ff addi r0,r9,-1
ffc0bc70: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc74: 90 03 00 78 stw r0,120(r3)
ffc0bc78: 40 9e ff e0 bne+ cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48>
(*executing->budget_callout)( executing );
ffc0bc7c: 80 03 00 80 lwz r0,128(r3)
ffc0bc80: 7c 09 03 a6 mtctr r0
ffc0bc84: 4e 80 04 21 bctrl
ffc0bc88: 4b ff ff d0 b ffc0bc58 <_Scheduler_priority_Tick+0x48>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
ffc0bc8c: 81 23 00 78 lwz r9,120(r3)
ffc0bc90: 38 09 ff ff addi r0,r9,-1
ffc0bc94: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bc98: 90 03 00 78 stw r0,120(r3)
ffc0bc9c: 41 9d ff bc bgt+ cr7,ffc0bc58 <_Scheduler_priority_Tick+0x48>
* always operates on the scheduler that 'owns' the currently executing
* thread.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void )
{
_Scheduler.Operations.yield();
ffc0bca0: 3d 20 00 00 lis r9,0
ffc0bca4: 90 61 00 08 stw r3,8(r1)
ffc0bca8: 80 09 20 ec lwz r0,8428(r9)
ffc0bcac: 7c 09 03 a6 mtctr r0
ffc0bcb0: 4e 80 04 21 bctrl
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Scheduler_Yield();
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0bcb4: 3d 20 00 00 lis r9,0
ffc0bcb8: 80 09 28 08 lwz r0,10248(r9)
ffc0bcbc: 80 61 00 08 lwz r3,8(r1)
ffc0bcc0: 90 03 00 78 stw r0,120(r3)
ffc0bcc4: 4b ff ff 94 b ffc0bc58 <_Scheduler_priority_Tick+0x48>
ffc0c5e8 <_Scheduler_simple_Ready_queue_enqueue_first>:
{
Chain_Control *ready;
Chain_Node *the_node;
Thread_Control *current;
ready = (Chain_Control *)_Scheduler.information;
ffc0c5e8: 3d 20 00 00 lis r9,0
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
ffc0c5ec: 81 63 00 14 lwz r11,20(r3)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0c5f0: 81 29 20 e0 lwz r9,8416(r9)
ffc0c5f4: 81 29 00 00 lwz r9,0(r9)
ffc0c5f8: 80 09 00 14 lwz r0,20(r9)
ffc0c5fc: 7f 80 58 40 cmplw cr7,r0,r11
ffc0c600: 40 9c 00 14 bge- cr7,ffc0c614 <_Scheduler_simple_Ready_queue_enqueue_first+0x2c>
* Do NOT need to check for end of chain because there is always
* at least one task on the ready chain -- the IDLE task. It can
* never block, should never attempt to obtain a semaphore or mutex,
* and thus will always be there.
*/
for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) {
ffc0c604: 81 29 00 00 lwz r9,0(r9)
current = (Thread_Control *) the_node;
/* break when AT HEAD OF (or PAST) our priority */
if ( the_thread->current_priority <= current->current_priority ) {
ffc0c608: 80 09 00 14 lwz r0,20(r9)
ffc0c60c: 7f 80 58 40 cmplw cr7,r0,r11
ffc0c610: 41 9c ff f4 blt+ cr7,ffc0c604 <_Scheduler_simple_Ready_queue_enqueue_first+0x1c><== NEVER TAKEN
current = (Thread_Control *)current->Object.Node.previous;
ffc0c614: 81 29 00 04 lwz r9,4(r9)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0c618: 81 69 00 00 lwz r11,0(r9)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0c61c: 91 23 00 04 stw r9,4(r3)
before_node = after_node->next;
after_node->next = the_node;
ffc0c620: 90 69 00 00 stw r3,0(r9)
the_node->next = before_node;
before_node->previous = the_node;
ffc0c624: 90 6b 00 04 stw r3,4(r11)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0c628: 91 63 00 00 stw r11,0(r3)
}
}
/* enqueue */
_Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node );
}
ffc0c62c: 4e 80 00 20 blr
ffc0bec4 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0bec4: 94 21 ff e8 stwu r1,-24(r1)
ffc0bec8: 7c 08 02 a6 mflr r0
ffc0becc: 90 01 00 1c stw r0,28(r1)
ffc0bed0: 93 e1 00 14 stw r31,20(r1)
ffc0bed4: 7c 7f 1b 78 mr r31,r3
ffc0bed8: 93 81 00 08 stw r28,8(r1)
ffc0bedc: 7c bc 2b 78 mr r28,r5
ffc0bee0: 93 a1 00 0c stw r29,12(r1)
ffc0bee4: 93 c1 00 10 stw r30,16(r1)
ffc0bee8: 7c 9e 23 78 mr r30,r4
States_Control state, original_state;
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0beec: 83 a3 00 10 lwz r29,16(r3)
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
ffc0bef0: 48 00 11 71 bl ffc0d060 <_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 )
ffc0bef4: 80 1f 00 14 lwz r0,20(r31)
ffc0bef8: 7f 80 f0 00 cmpw cr7,r0,r30
ffc0befc: 41 9e 00 10 beq- cr7,ffc0bf0c <_Thread_Change_priority+0x48>
_Thread_Set_priority( the_thread, new_priority );
ffc0bf00: 7f e3 fb 78 mr r3,r31
ffc0bf04: 7f c4 f3 78 mr r4,r30
ffc0bf08: 48 00 10 b1 bl ffc0cfb8 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0bf0c: 7f c0 00 a6 mfmsr r30
ffc0bf10: 7c 10 42 a6 mfsprg r0,0
ffc0bf14: 7f c0 00 78 andc r0,r30,r0
ffc0bf18: 7c 00 01 24 mtmsr r0
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
ffc0bf1c: 80 1f 00 10 lwz r0,16(r31)
if ( state != STATES_TRANSIENT ) {
ffc0bf20: 2f 80 00 04 cmpwi cr7,r0,4
ffc0bf24: 41 9e 00 88 beq- cr7,ffc0bfac <_Thread_Change_priority+0xe8>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0bf28: 73 a9 00 04 andi. r9,r29,4
ffc0bf2c: 41 82 00 38 beq- ffc0bf64 <_Thread_Change_priority+0xa0><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0bf30: 7f c0 01 24 mtmsr r30 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
ffc0bf34: 3d 20 00 03 lis r9,3 <== NOT EXECUTED
ffc0bf38: 61 29 be e0 ori r9,r9,48864 <== NOT EXECUTED
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0bf3c: 7c 0b 48 39 and. r11,r0,r9 <== NOT EXECUTED
ffc0bf40: 40 82 00 40 bne- ffc0bf80 <_Thread_Change_priority+0xbc><== NOT EXECUTED
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0bf44: 80 01 00 1c lwz r0,28(r1)
ffc0bf48: 83 81 00 08 lwz r28,8(r1)
ffc0bf4c: 7c 08 03 a6 mtlr r0
ffc0bf50: 83 a1 00 0c lwz r29,12(r1)
ffc0bf54: 83 c1 00 10 lwz r30,16(r1)
ffc0bf58: 83 e1 00 14 lwz r31,20(r1)
ffc0bf5c: 38 21 00 18 addi r1,r1,24
ffc0bf60: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc0bf64: 54 09 07 b8 rlwinm r9,r0,0,30,28
*/
state = the_thread->current_state;
if ( state != STATES_TRANSIENT ) {
/* 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 );
ffc0bf68: 91 3f 00 10 stw r9,16(r31)
ffc0bf6c: 7f c0 01 24 mtmsr r30
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
ffc0bf70: 3d 20 00 03 lis r9,3
ffc0bf74: 61 29 be e0 ori r9,r9,48864
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0bf78: 7c 0b 48 39 and. r11,r0,r9
ffc0bf7c: 41 82 ff c8 beq+ ffc0bf44 <_Thread_Change_priority+0x80>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0bf80: 80 7f 00 44 lwz r3,68(r31)
ffc0bf84: 7f e4 fb 78 mr r4,r31
ffc0bf88: 48 00 0f 35 bl ffc0cebc <_Thread_queue_Requeue>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
_ISR_Enable( level );
}
ffc0bf8c: 80 01 00 1c lwz r0,28(r1)
ffc0bf90: 83 81 00 08 lwz r28,8(r1)
ffc0bf94: 7c 08 03 a6 mtlr r0
ffc0bf98: 83 a1 00 0c lwz r29,12(r1)
ffc0bf9c: 83 c1 00 10 lwz r30,16(r1)
ffc0bfa0: 83 e1 00 14 lwz r31,20(r1)
ffc0bfa4: 38 21 00 18 addi r1,r1,24
ffc0bfa8: 4e 80 00 20 blr
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0bfac: 73 bd 00 04 andi. r29,r29,4
ffc0bfb0: 41 82 00 74 beq- ffc0c024 <_Thread_Change_priority+0x160><== ALWAYS TAKEN
ffc0bfb4: 3f a0 00 00 lis r29,0 <== NOT EXECUTED
ffc0bfb8: 3b bd 20 e0 addi r29,r29,8416 <== NOT EXECUTED
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0bfbc: 7c 00 00 a6 mfmsr r0
ffc0bfc0: 7f c0 01 24 mtmsr r30
ffc0bfc4: 7c 00 01 24 mtmsr r0
* This kernel routine implements the scheduling decision logic for
* the scheduler. It does NOT dispatch.
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void )
{
_Scheduler.Operations.schedule();
ffc0bfc8: 80 1d 00 08 lwz r0,8(r29)
ffc0bfcc: 7c 09 03 a6 mtctr r0
ffc0bfd0: 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 );
ffc0bfd4: 3d 20 00 00 lis r9,0
ffc0bfd8: 39 29 31 44 addi r9,r9,12612
ffc0bfdc: 81 69 00 0c lwz r11,12(r9)
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Scheduler_Schedule();
if ( !_Thread_Is_executing_also_the_heir() &&
ffc0bfe0: 80 09 00 10 lwz r0,16(r9)
ffc0bfe4: 7f 8b 00 00 cmpw cr7,r11,r0
ffc0bfe8: 41 9e 00 18 beq- cr7,ffc0c000 <_Thread_Change_priority+0x13c>
ffc0bfec: 88 0b 00 74 lbz r0,116(r11)
ffc0bff0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0bff4: 41 9e 00 0c beq- cr7,ffc0c000 <_Thread_Change_priority+0x13c>
_Thread_Executing->is_preemptible )
_Thread_Dispatch_necessary = true;
ffc0bff8: 38 00 00 01 li r0,1
ffc0bffc: 98 09 00 18 stb r0,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c000: 7f c0 01 24 mtmsr r30
_ISR_Enable( level );
}
ffc0c004: 80 01 00 1c lwz r0,28(r1)
ffc0c008: 83 81 00 08 lwz r28,8(r1)
ffc0c00c: 7c 08 03 a6 mtlr r0
ffc0c010: 83 a1 00 0c lwz r29,12(r1)
ffc0c014: 83 c1 00 10 lwz r30,16(r1)
ffc0c018: 83 e1 00 14 lwz r31,20(r1)
ffc0c01c: 38 21 00 18 addi r1,r1,24
ffc0c020: 4e 80 00 20 blr
* 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 )
ffc0c024: 2f 9c 00 00 cmpwi cr7,r28,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 );
ffc0c028: 93 bf 00 10 stw r29,16(r31)
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue_first( the_thread );
ffc0c02c: 3f a0 00 00 lis r29,0
ffc0c030: 3b bd 20 e0 addi r29,r29,8416
if ( prepend_it )
ffc0c034: 41 9e 00 18 beq- cr7,ffc0c04c <_Thread_Change_priority+0x188>
ffc0c038: 80 1d 00 28 lwz r0,40(r29)
ffc0c03c: 7f e3 fb 78 mr r3,r31
ffc0c040: 7c 09 03 a6 mtctr r0
ffc0c044: 4e 80 04 21 bctrl
ffc0c048: 4b ff ff 74 b ffc0bfbc <_Thread_Change_priority+0xf8>
*/
RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue(
Thread_Control *the_thread
)
{
_Scheduler.Operations.enqueue( the_thread );
ffc0c04c: 80 1d 00 24 lwz r0,36(r29)
ffc0c050: 7f e3 fb 78 mr r3,r31
ffc0c054: 7c 09 03 a6 mtctr r0
ffc0c058: 4e 80 04 21 bctrl
ffc0c05c: 4b ff ff 60 b ffc0bfbc <_Thread_Change_priority+0xf8>
ffc0c2d8 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c2d8: 94 21 ff e8 stwu r1,-24(r1)
ffc0c2dc: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c2e0: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c2e4: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c2e8: 48 00 02 3d bl ffc0c524 <_Thread_Get>
switch ( location ) {
ffc0c2ec: 80 01 00 08 lwz r0,8(r1)
ffc0c2f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c2f4: 40 9e 00 24 bne- cr7,ffc0c318 <_Thread_Delay_ended+0x40><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0c2f8: 3c 80 10 00 lis r4,4096
ffc0c2fc: 60 84 00 18 ori r4,r4,24
ffc0c300: 4b ff fd 61 bl ffc0c060 <_Thread_Clear_state>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0c304: 3d 20 00 00 lis r9,0
ffc0c308: 81 69 28 0c lwz r11,10252(r9)
ffc0c30c: 38 0b ff ff addi r0,r11,-1
ffc0c310: 90 09 28 0c stw r0,10252(r9)
return _Thread_Dispatch_disable_level;
ffc0c314: 80 09 28 0c lwz r0,10252(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0c318: 80 01 00 1c lwz r0,28(r1)
ffc0c31c: 38 21 00 18 addi r1,r1,24
ffc0c320: 7c 08 03 a6 mtlr r0
ffc0c324: 4e 80 00 20 blr
ffc0c328 <_Thread_Dispatch>:
* INTERRUPT LATENCY:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0c328: 94 21 ff c8 stwu r1,-56(r1)
ffc0c32c: 7c 08 02 a6 mflr r0
ffc0c330: 93 21 00 1c stw r25,28(r1)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0c334: 3f 20 00 00 lis r25,0
ffc0c338: 81 39 28 0c lwz r9,10252(r25)
ffc0c33c: 90 01 00 3c stw r0,60(r1)
ffc0c340: 38 09 00 01 addi r0,r9,1
ffc0c344: 90 19 28 0c stw r0,10252(r25)
ffc0c348: 93 01 00 18 stw r24,24(r1)
return _Thread_Dispatch_disable_level;
ffc0c34c: 80 19 28 0c lwz r0,10252(r25)
ffc0c350: 93 41 00 20 stw r26,32(r1)
ffc0c354: 93 61 00 24 stw r27,36(r1)
ffc0c358: 93 81 00 28 stw r28,40(r1)
ffc0c35c: 93 a1 00 2c stw r29,44(r1)
ffc0c360: 93 c1 00 30 stw r30,48(r1)
ffc0c364: 93 e1 00 34 stw r31,52(r1)
#endif
/*
* Now determine if we need to perform a dispatch on the current CPU.
*/
executing = _Thread_Executing;
ffc0c368: 3f a0 00 00 lis r29,0
ffc0c36c: 3b bd 31 44 addi r29,r29,12612
ffc0c370: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c374: 7c 00 00 a6 mfmsr r0
ffc0c378: 7d 30 42 a6 mfsprg r9,0
ffc0c37c: 7c 09 48 78 andc r9,r0,r9
ffc0c380: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
ffc0c384: 89 3d 00 18 lbz r9,24(r29)
ffc0c388: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c38c: 41 9e 01 14 beq- cr7,ffc0c4a0 <_Thread_Dispatch+0x178>
heir = _Thread_Heir;
ffc0c390: 83 dd 00 10 lwz r30,16(r29)
_Thread_Dispatch_necessary = false;
ffc0c394: 39 20 00 00 li r9,0
ffc0c398: 99 3d 00 18 stb r9,24(r29)
/*
* 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 )
ffc0c39c: 7f 9f f0 00 cmpw cr7,r31,r30
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
ffc0c3a0: 93 dd 00 0c stw r30,12(r29)
/*
* 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 )
ffc0c3a4: 41 9e 00 fc beq- cr7,ffc0c4a0 <_Thread_Dispatch+0x178>
ffc0c3a8: 3f 80 00 00 lis r28,0
ffc0c3ac: 3b 7d 00 1c addi r27,r29,28
ffc0c3b0: 3b 9c 28 20 addi r28,r28,10272
#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;
ffc0c3b4: 3f 00 00 00 lis r24,0
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
ffc0c3b8: 3b 40 00 00 li r26,0
ffc0c3bc: 48 00 00 cc b ffc0c488 <_Thread_Dispatch+0x160>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c3c0: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0c3c4: 38 61 00 10 addi r3,r1,16
ffc0c3c8: 48 00 4b 35 bl ffc10efc <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc0c3cc: 7f 63 db 78 mr r3,r27
ffc0c3d0: 38 81 00 10 addi r4,r1,16
ffc0c3d4: 38 a1 00 08 addi r5,r1,8
ffc0c3d8: 48 00 0f 15 bl ffc0d2ec <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
ffc0c3dc: 38 81 00 08 addi r4,r1,8
ffc0c3e0: 38 7f 00 84 addi r3,r31,132
ffc0c3e4: 48 00 0e ad bl ffc0d290 <_Timespec_Add_to>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c3e8: 81 3c 00 00 lwz r9,0(r28)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0c3ec: 81 41 00 10 lwz r10,16(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0c3f0: 7f e3 fb 78 mr r3,r31
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c3f4: 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;
ffc0c3f8: 81 61 00 14 lwz r11,20(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0c3fc: 7f c4 f3 78 mr r4,r30
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0c400: 91 5d 00 1c stw r10,28(r29)
ffc0c404: 91 7d 00 20 stw r11,32(r29)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c408: 41 9e 00 14 beq- cr7,ffc0c41c <_Thread_Dispatch+0xf4> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0c40c: 80 09 00 00 lwz r0,0(r9)
ffc0c410: 90 1f 01 2c stw r0,300(r31)
*_Thread_libc_reent = heir->libc_reent;
ffc0c414: 80 1e 01 2c lwz r0,300(r30)
ffc0c418: 90 09 00 00 stw r0,0(r9)
}
_User_extensions_Thread_switch( executing, heir );
ffc0c41c: 48 00 13 65 bl ffc0d780 <_User_extensions_Thread_switch>
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0c420: 80 1f 01 28 lwz r0,296(r31)
_Context_Save_fp( &executing->fp_context );
ffc0c424: 38 7f 01 28 addi r3,r31,296
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0c428: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c42c: 41 9e 00 08 beq- cr7,ffc0c434 <_Thread_Dispatch+0x10c>
_Context_Save_fp( &executing->fp_context );
ffc0c430: 48 01 21 91 bl ffc1e5c0 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0c434: 38 7f 00 c8 addi r3,r31,200
ffc0c438: 38 9e 00 c8 addi r4,r30,200
ffc0c43c: 48 01 23 05 bl ffc1e740 <_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 )
ffc0c440: 80 1f 01 28 lwz r0,296(r31)
_Context_Restore_fp( &executing->fp_context );
ffc0c444: 38 7f 01 28 addi r3,r31,296
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
_Thread_Allocated_fp = executing;
}
#else
if ( executing->fp_context != NULL )
ffc0c448: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c44c: 41 9e 00 08 beq- cr7,ffc0c454 <_Thread_Dispatch+0x12c>
_Context_Restore_fp( &executing->fp_context );
ffc0c450: 48 01 22 31 bl ffc1e680 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0c454: 83 fd 00 0c lwz r31,12(r29)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0c458: 7c 00 00 a6 mfmsr r0
ffc0c45c: 7d 30 42 a6 mfsprg r9,0
ffc0c460: 7c 09 48 78 andc r9,r0,r9
ffc0c464: 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 ) {
ffc0c468: 89 3d 00 18 lbz r9,24(r29)
ffc0c46c: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c470: 41 9e 00 30 beq- cr7,ffc0c4a0 <_Thread_Dispatch+0x178>
heir = _Thread_Heir;
ffc0c474: 83 dd 00 10 lwz r30,16(r29)
_Thread_Dispatch_necessary = false;
ffc0c478: 9b 5d 00 18 stb r26,24(r29)
/*
* 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 )
ffc0c47c: 7f 9e f8 00 cmpw cr7,r30,r31
_ISR_Disable( level );
while ( _Thread_Dispatch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_necessary = false;
_Thread_Executing = heir;
ffc0c480: 93 dd 00 0c stw r30,12(r29)
/*
* 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 )
ffc0c484: 41 9e 00 1c beq- cr7,ffc0c4a0 <_Thread_Dispatch+0x178> <== NEVER TAKEN
*/
#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 )
ffc0c488: 81 3e 00 7c lwz r9,124(r30)
ffc0c48c: 2f 89 00 01 cmpwi cr7,r9,1
ffc0c490: 40 9e ff 30 bne+ cr7,ffc0c3c0 <_Thread_Dispatch+0x98>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0c494: 81 38 28 08 lwz r9,10248(r24)
ffc0c498: 91 3e 00 78 stw r9,120(r30)
ffc0c49c: 4b ff ff 24 b ffc0c3c0 <_Thread_Dispatch+0x98>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0c4a0: 7c 00 01 24 mtmsr r0
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0c4a4: 81 39 28 0c lwz r9,10252(r25)
ffc0c4a8: 38 09 ff ff addi r0,r9,-1
ffc0c4ac: 90 19 28 0c stw r0,10252(r25)
return _Thread_Dispatch_disable_level;
ffc0c4b0: 80 19 28 0c lwz r0,10252(r25)
_ISR_Enable( level );
_Thread_Unnest_dispatch();
_API_extensions_Run_postswitch();
ffc0c4b4: 4b ff db 75 bl ffc0a028 <_API_extensions_Run_postswitch>
}
ffc0c4b8: 80 01 00 3c lwz r0,60(r1)
ffc0c4bc: 83 01 00 18 lwz r24,24(r1)
ffc0c4c0: 7c 08 03 a6 mtlr r0
ffc0c4c4: 83 21 00 1c lwz r25,28(r1)
ffc0c4c8: 83 41 00 20 lwz r26,32(r1)
ffc0c4cc: 83 61 00 24 lwz r27,36(r1)
ffc0c4d0: 83 81 00 28 lwz r28,40(r1)
ffc0c4d4: 83 a1 00 2c lwz r29,44(r1)
ffc0c4d8: 83 c1 00 30 lwz r30,48(r1)
ffc0c4dc: 83 e1 00 34 lwz r31,52(r1)
ffc0c4e0: 38 21 00 38 addi r1,r1,56
ffc0c4e4: 4e 80 00 20 blr
ffc13b2c <_Thread_Handler>:
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc13b2c: 94 21 ff f0 stwu r1,-16(r1)
ffc13b30: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
ffc13b34: 3d 20 00 00 lis r9,0
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc13b38: 90 01 00 14 stw r0,20(r1)
ffc13b3c: 93 e1 00 0c stw r31,12(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static bool doneConstructors;
bool doCons;
#endif
executing = _Thread_Executing;
ffc13b40: 83 e9 31 50 lwz r31,12624(r9)
* Input parameters: NONE
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc13b44: 93 c1 00 08 stw r30,8(r1)
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
ffc13b48: 81 3f 00 ac lwz r9,172(r31)
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc13b4c: 38 00 00 00 li r0,0
ffc13b50: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc13b54: 71 2b 00 01 andi. r11,r9,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc13b58: 7d 30 42 a6 mfsprg r9,0
ffc13b5c: 40 82 00 5c bne- ffc13bb8 <_Thread_Handler+0x8c>
msr |= ppc_interrupt_get_disable_mask();
ffc13b60: 7d 20 03 78 or r0,r9,r0
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
}
_CPU_MSR_SET(msr);
ffc13b64: 7c 00 01 24 mtmsr r0
doCons = !doneConstructors
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
ffc13b68: 3d 20 00 00 lis r9,0
ffc13b6c: 8b c9 29 f8 lbz r30,10744(r9)
doneConstructors = true;
ffc13b70: 38 00 00 01 li r0,1
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
ffc13b74: 7f e3 fb 78 mr r3,r31
&& _Objects_Get_API( executing->Object.id ) != OBJECTS_INTERNAL_API;
if (doCons)
doneConstructors = true;
#else
doCons = !doneConstructors;
doneConstructors = true;
ffc13b78: 98 09 29 f8 stb r0,10744(r9)
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
ffc13b7c: 4b ff 98 c9 bl ffc0d444 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc13b80: 4b ff 89 69 bl ffc0c4e8 <_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) */ {
ffc13b84: 2f 9e 00 00 cmpwi cr7,r30,0
ffc13b88: 41 9e 00 38 beq- cr7,ffc13bc0 <_Thread_Handler+0x94>
_Thread_Enable_dispatch();
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc13b8c: 80 1f 00 94 lwz r0,148(r31)
ffc13b90: 2f 80 00 00 cmpwi cr7,r0,0
ffc13b94: 41 9e 00 34 beq- cr7,ffc13bc8 <_Thread_Handler+0x9c>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
ffc13b98: 2f 80 00 01 cmpwi cr7,r0,1
ffc13b9c: 41 9e 00 44 beq- cr7,ffc13be0 <_Thread_Handler+0xb4> <== ALWAYS TAKEN
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
ffc13ba0: 7f e3 fb 78 mr r3,r31
ffc13ba4: 4b ff 99 15 bl ffc0d4b8 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
ffc13ba8: 38 60 00 00 li r3,0
ffc13bac: 38 80 00 01 li r4,1
ffc13bb0: 38 a0 00 05 li r5,5
ffc13bb4: 4b ff 72 0d bl ffc0adc0 <_Internal_error_Occurred>
_CPU_MSR_GET(msr);
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
msr |= ppc_interrupt_get_disable_mask();
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc13bb8: 7c 00 48 78 andc r0,r0,r9
ffc13bbc: 4b ff ff a8 b ffc13b64 <_Thread_Handler+0x38>
* _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) */ {
INIT_NAME ();
ffc13bc0: 48 00 bd bd bl ffc1f97c <_init>
ffc13bc4: 4b ff ff c8 b ffc13b8c <_Thread_Handler+0x60>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc13bc8: 80 1f 00 90 lwz r0,144(r31)
ffc13bcc: 80 7f 00 9c lwz r3,156(r31)
ffc13bd0: 7c 09 03 a6 mtctr r0
ffc13bd4: 4e 80 04 21 bctrl
#endif
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
ffc13bd8: 90 7f 00 28 stw r3,40(r31)
ffc13bdc: 4b ff ff c4 b ffc13ba0 <_Thread_Handler+0x74>
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
ffc13be0: 80 1f 00 90 lwz r0,144(r31)
ffc13be4: 80 7f 00 98 lwz r3,152(r31)
ffc13be8: 7c 09 03 a6 mtctr r0
ffc13bec: 4e 80 04 21 bctrl
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
ffc13bf0: 90 7f 00 28 stw r3,40(r31)
ffc13bf4: 4b ff ff ac b ffc13ba0 <_Thread_Handler+0x74>
ffc0c5f4 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0c5f4: 94 21 ff c8 stwu r1,-56(r1)
ffc0c5f8: 7c 08 02 a6 mflr r0
ffc0c5fc: 93 c1 00 30 stw r30,48(r1)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
ffc0c600: 7c be 2b 79 mr. r30,r5
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0c604: 90 01 00 3c stw r0,60(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0c608: 38 00 00 00 li r0,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0c60c: 93 61 00 24 stw r27,36(r1)
ffc0c610: 7d 3b 4b 78 mr r27,r9
ffc0c614: 81 21 00 48 lwz r9,72(r1)
ffc0c618: 92 e1 00 14 stw r23,20(r1)
ffc0c61c: 93 21 00 1c stw r25,28(r1)
ffc0c620: 7d 59 53 78 mr r25,r10
ffc0c624: 93 81 00 28 stw r28,40(r1)
ffc0c628: 7d 1c 43 78 mr r28,r8
ffc0c62c: 93 a1 00 2c stw r29,44(r1)
ffc0c630: 7c 7d 1b 78 mr r29,r3
ffc0c634: 93 e1 00 34 stw r31,52(r1)
ffc0c638: 7c 9f 23 78 mr r31,r4
ffc0c63c: 93 01 00 18 stw r24,24(r1)
ffc0c640: 93 41 00 20 stw r26,32(r1)
ffc0c644: 82 e9 00 00 lwz r23,0(r9)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0c648: 90 04 01 30 stw r0,304(r4)
ffc0c64c: 90 04 01 34 stw r0,308(r4)
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0c650: 90 04 01 2c stw r0,300(r4)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
ffc0c654: 41 82 01 d0 beq- ffc0c824 <_Thread_Initialize+0x230>
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
ffc0c658: 98 04 00 b4 stb r0,180(r4)
ffc0c65c: 7c c0 33 78 mr r0,r6
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0c660: 2f 87 00 00 cmpwi cr7,r7,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0c664: 93 df 00 bc stw r30,188(r31)
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
ffc0c668: 3b 40 00 00 li r26,0
the_stack->size = size;
ffc0c66c: 90 1f 00 b8 stw r0,184(r31)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0c670: 40 9e 01 48 bne- cr7,ffc0c7b8 <_Thread_Initialize+0x1c4>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0c674: 3f c0 00 00 lis r30,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;
ffc0c678: 93 5f 01 28 stw r26,296(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0c67c: 38 00 00 00 li r0,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0c680: 81 3e 28 2c lwz r9,10284(r30)
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;
ffc0c684: 93 5f 00 c0 stw r26,192(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0c688: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c68c: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0c690: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0c694: 90 1f 00 68 stw r0,104(r31)
the_watchdog->user_data = user_data;
ffc0c698: 90 1f 00 6c stw r0,108(r31)
ffc0c69c: 40 9e 01 38 bne- cr7,ffc0c7d4 <_Thread_Initialize+0x1e0>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0c6a0: 91 3f 01 38 stw r9,312(r31)
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0c6a4: 3b 00 00 00 li r24,0
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
ffc0c6a8: 2f 99 00 02 cmpwi cr7,r25,2
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0c6ac: 80 01 00 40 lwz r0,64(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0c6b0: 9b 7f 00 a0 stb r27,160(r31)
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0c6b4: 93 3f 00 a4 stw r25,164(r31)
the_thread->Start.budget_callout = budget_callout;
ffc0c6b8: 90 1f 00 a8 stw r0,168(r31)
switch ( budget_algorithm ) {
ffc0c6bc: 40 be 00 10 bne+ cr7,ffc0c6cc <_Thread_Initialize+0xd8>
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0c6c0: 3d 20 00 00 lis r9,0
ffc0c6c4: 80 09 28 08 lwz r0,10248(r9)
ffc0c6c8: 90 1f 00 78 stw r0,120(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0c6cc: 80 01 00 44 lwz r0,68(r1)
*/
RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate(
Thread_Control *the_thread
)
{
return _Scheduler.Operations.allocate( the_thread );
ffc0c6d0: 3d 20 00 00 lis r9,0
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0c6d4: 3b c0 00 00 li r30,0
the_thread->resource_count = 0;
the_thread->real_priority = priority;
ffc0c6d8: 93 9f 00 18 stw r28,24(r31)
ffc0c6dc: 7f e3 fb 78 mr r3,r31
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0c6e0: 90 1f 00 ac stw r0,172(r31)
the_thread->current_state = STATES_DORMANT;
ffc0c6e4: 38 00 00 01 li r0,1
ffc0c6e8: 90 1f 00 10 stw r0,16(r31)
ffc0c6ec: 80 09 20 f8 lwz r0,8440(r9)
the_thread->Wait.queue = NULL;
ffc0c6f0: 93 df 00 44 stw r30,68(r31)
ffc0c6f4: 7c 09 03 a6 mtctr r0
the_thread->resource_count = 0;
ffc0c6f8: 93 df 00 1c stw r30,28(r31)
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
ffc0c6fc: 93 9f 00 b0 stw r28,176(r31)
ffc0c700: 4e 80 04 21 bctrl
sched =_Scheduler_Allocate( the_thread );
if ( !sched )
ffc0c704: 7c 7b 1b 79 mr. r27,r3
ffc0c708: 41 82 00 40 beq- ffc0c748 <_Thread_Initialize+0x154>
goto failed;
_Thread_Set_priority( the_thread, priority );
ffc0c70c: 7f e3 fb 78 mr r3,r31
ffc0c710: 7f 84 e3 78 mr r4,r28
ffc0c714: 48 00 08 a5 bl ffc0cfb8 <_Thread_Set_priority>
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
ffc0c718: a0 1f 00 0a lhz r0,10(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0c71c: 81 3d 00 1c lwz r9,28(r29)
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
ffc0c720: 7f e3 fb 78 mr r3,r31
ffc0c724: 54 00 10 3a rlwinm r0,r0,2,0,29
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
ffc0c728: 93 df 00 84 stw r30,132(r31)
ffc0c72c: 93 df 00 88 stw r30,136(r31)
ffc0c730: 7f e9 01 2e stwx r31,r9,r0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0c734: 92 ff 00 0c stw r23,12(r31)
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
ffc0c738: 48 00 0e 81 bl ffc0d5b8 <_User_extensions_Thread_create>
if ( extension_status )
ffc0c73c: 2f 83 00 00 cmpwi cr7,r3,0
return true;
ffc0c740: 38 60 00 01 li r3,1
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
ffc0c744: 40 9e 00 40 bne- cr7,ffc0c784 <_Thread_Initialize+0x190>
return true;
failed:
_Workspace_Free( the_thread->libc_reent );
ffc0c748: 80 7f 01 2c lwz r3,300(r31)
ffc0c74c: 48 00 14 d9 bl ffc0dc24 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0c750: 80 7f 01 30 lwz r3,304(r31)
ffc0c754: 48 00 14 d1 bl ffc0dc24 <_Workspace_Free>
ffc0c758: 80 7f 01 34 lwz r3,308(r31)
ffc0c75c: 48 00 14 c9 bl ffc0dc24 <_Workspace_Free>
_Workspace_Free( extensions_area );
ffc0c760: 7f 03 c3 78 mr r3,r24
ffc0c764: 48 00 14 c1 bl ffc0dc24 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
_Workspace_Free( fp_area );
ffc0c768: 7f 43 d3 78 mr r3,r26
ffc0c76c: 48 00 14 b9 bl ffc0dc24 <_Workspace_Free>
#endif
_Workspace_Free( sched );
ffc0c770: 7f 63 db 78 mr r3,r27
ffc0c774: 48 00 14 b1 bl ffc0dc24 <_Workspace_Free>
_Thread_Stack_Free( the_thread );
ffc0c778: 7f e3 fb 78 mr r3,r31
ffc0c77c: 48 00 09 e9 bl ffc0d164 <_Thread_Stack_Free>
return false;
ffc0c780: 38 60 00 00 li r3,0
}
ffc0c784: 80 01 00 3c lwz r0,60(r1)
ffc0c788: 82 e1 00 14 lwz r23,20(r1)
ffc0c78c: 7c 08 03 a6 mtlr r0
ffc0c790: 83 01 00 18 lwz r24,24(r1)
ffc0c794: 83 21 00 1c lwz r25,28(r1)
ffc0c798: 83 41 00 20 lwz r26,32(r1)
ffc0c79c: 83 61 00 24 lwz r27,36(r1)
ffc0c7a0: 83 81 00 28 lwz r28,40(r1)
ffc0c7a4: 83 a1 00 2c lwz r29,44(r1)
ffc0c7a8: 83 c1 00 30 lwz r30,48(r1)
ffc0c7ac: 83 e1 00 34 lwz r31,52(r1)
ffc0c7b0: 38 21 00 38 addi r1,r1,56
ffc0c7b4: 4e 80 00 20 blr
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0c7b8: 38 60 01 08 li r3,264
ffc0c7bc: 48 00 14 35 bl ffc0dbf0 <_Workspace_Allocate>
if ( !fp_area )
ffc0c7c0: 7c 7a 1b 79 mr. r26,r3
ffc0c7c4: 40 82 fe b0 bne+ ffc0c674 <_Thread_Initialize+0x80>
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
ffc0c7c8: 3b 00 00 00 li r24,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;
ffc0c7cc: 3b 60 00 00 li r27,0
ffc0c7d0: 4b ff ff 78 b ffc0c748 <_Thread_Initialize+0x154>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
ffc0c7d4: 39 29 00 01 addi r9,r9,1
ffc0c7d8: 55 23 10 3a rlwinm r3,r9,2,0,29
ffc0c7dc: 48 00 14 15 bl ffc0dbf0 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0c7e0: 7c 78 1b 79 mr. r24,r3
ffc0c7e4: 41 82 00 84 beq- ffc0c868 <_Thread_Initialize+0x274>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0c7e8: 93 1f 01 38 stw r24,312(r31)
ffc0c7ec: 7f 0b c3 78 mr r11,r24
* 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++ )
ffc0c7f0: 38 00 00 00 li r0,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0c7f4: 81 1e 28 2c lwz r8,10284(r30)
ffc0c7f8: 39 20 00 00 li r9,0
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
ffc0c7fc: 39 40 00 00 li r10,0
ffc0c800: 48 00 00 08 b ffc0c808 <_Thread_Initialize+0x214>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0c804: 81 7f 01 38 lwz r11,312(r31)
* 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++ )
ffc0c808: 39 29 00 01 addi r9,r9,1
ffc0c80c: 7f 89 40 40 cmplw cr7,r9,r8
the_thread->extensions[i] = NULL;
ffc0c810: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0c814: 7d 4b 01 2e stwx r10,r11,r0
* 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++ )
ffc0c818: 7d 20 4b 78 mr r0,r9
ffc0c81c: 40 9d ff e8 ble+ cr7,ffc0c804 <_Thread_Initialize+0x210>
ffc0c820: 4b ff fe 88 b ffc0c6a8 <_Thread_Initialize+0xb4>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
ffc0c824: 7c 83 23 78 mr r3,r4
ffc0c828: 90 c1 00 08 stw r6,8(r1)
ffc0c82c: 7c c4 33 78 mr r4,r6
ffc0c830: 90 e1 00 0c stw r7,12(r1)
ffc0c834: 48 00 08 89 bl ffc0d0bc <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0c838: 7c 60 1b 79 mr. r0,r3
ffc0c83c: 80 c1 00 08 lwz r6,8(r1)
return false; /* stack allocation failed */
ffc0c840: 38 60 00 00 li r3,0
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0c844: 80 e1 00 0c lwz r7,12(r1)
ffc0c848: 41 a2 ff 3c beq- ffc0c784 <_Thread_Initialize+0x190>
ffc0c84c: 7f 86 00 40 cmplw cr7,r6,r0
return false; /* stack allocation failed */
ffc0c850: 7f c3 f3 78 mr r3,r30
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0c854: 41 bd ff 30 bgt- cr7,ffc0c784 <_Thread_Initialize+0x190><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
ffc0c858: 39 20 00 01 li r9,1
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
ffc0c85c: 83 df 00 c4 lwz r30,196(r31)
the_thread->Start.core_allocated_stack = true;
ffc0c860: 99 3f 00 b4 stb r9,180(r31)
ffc0c864: 4b ff fd fc b ffc0c660 <_Thread_Initialize+0x6c>
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;
ffc0c868: 3b 60 00 00 li r27,0
ffc0c86c: 4b ff fe dc b ffc0c748 <_Thread_Initialize+0x154>
ffc0da84 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0da84: 94 21 ff e8 stwu r1,-24(r1)
ffc0da88: 7c 08 02 a6 mflr r0
ffc0da8c: 90 01 00 1c stw r0,28(r1)
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
ffc0da90: 80 03 00 10 lwz r0,16(r3)
ffc0da94: 93 e1 00 14 stw r31,20(r1)
ffc0da98: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0da9c: 70 09 00 01 andi. r9,r0,1
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0daa0: 93 c1 00 10 stw r30,16(r1)
_Thread_Restart_self();
return true;
}
return false;
ffc0daa4: 38 00 00 00 li r0,0
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0daa8: 41 82 00 20 beq- ffc0dac8 <_Thread_Restart+0x44>
return true;
}
return false;
}
ffc0daac: 7c 03 03 78 mr r3,r0
ffc0dab0: 80 01 00 1c lwz r0,28(r1)
ffc0dab4: 83 c1 00 10 lwz r30,16(r1)
ffc0dab8: 7c 08 03 a6 mtlr r0
ffc0dabc: 83 e1 00 14 lwz r31,20(r1)
ffc0dac0: 38 21 00 18 addi r1,r1,24
ffc0dac4: 4e 80 00 20 blr
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
ffc0dac8: 90 81 00 08 stw r4,8(r1)
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0dacc: 3f c0 00 00 lis r30,0
ffc0dad0: 3b de 31 64 addi r30,r30,12644
ffc0dad4: 90 a1 00 0c stw r5,12(r1)
ffc0dad8: 48 00 01 05 bl ffc0dbdc <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0dadc: 7f e3 fb 78 mr r3,r31
ffc0dae0: 80 81 00 08 lwz r4,8(r1)
ffc0dae4: 80 a1 00 0c lwz r5,12(r1)
ffc0dae8: 48 00 48 5d bl ffc12344 <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0daec: 7f e3 fb 78 mr r3,r31
ffc0daf0: 48 00 44 c1 bl ffc11fb0 <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0daf4: 7f e3 fb 78 mr r3,r31
ffc0daf8: 48 00 47 fd bl ffc122f4 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0dafc: 7f e3 fb 78 mr r3,r31
ffc0db00: 48 00 07 75 bl ffc0e274 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0db04: 81 3e 00 0c lwz r9,12(r30)
_Thread_Restart_self();
return true;
ffc0db08: 38 00 00 01 li r0,1
_Thread_Ready( the_thread );
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
ffc0db0c: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0db10: 40 9e ff 9c bne+ cr7,ffc0daac <_Thread_Restart+0x28>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0db14: 80 1f 01 28 lwz r0,296(r31)
ffc0db18: 2f 80 00 00 cmpwi cr7,r0,0
ffc0db1c: 41 9e 00 0c beq- cr7,ffc0db28 <_Thread_Restart+0xa4> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0db20: 38 7f 01 28 addi r3,r31,296
ffc0db24: 48 01 17 fd bl ffc1f320 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0db28: 80 7e 00 0c lwz r3,12(r30)
ffc0db2c: 38 63 00 c8 addi r3,r3,200
ffc0db30: 48 01 19 b1 bl ffc1f4e0 <_CPU_Context_restore>
ffc0d164 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
ffc0d164: 7c 08 02 a6 mflr r0
ffc0d168: 94 21 ff f8 stwu r1,-8(r1)
ffc0d16c: 90 01 00 0c stw r0,12(r1)
#if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
/*
* If the API provided the stack space, then don't free it.
*/
if ( !the_thread->Start.core_allocated_stack )
ffc0d170: 88 03 00 b4 lbz r0,180(r3)
ffc0d174: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d178: 41 9e 00 20 beq- cr7,ffc0d198 <_Thread_Stack_Free+0x34> <== NEVER TAKEN
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
ffc0d17c: 3d 20 00 00 lis r9,0
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
ffc0d180: 80 63 00 bc lwz r3,188(r3)
* Call ONLY the CPU table stack free hook, or the
* the RTEMS workspace free. This is so the free
* routine properly matches the allocation of the stack.
*/
if ( Configuration.stack_free_hook )
ffc0d184: 80 09 20 28 lwz r0,8232(r9)
ffc0d188: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d18c: 41 9e 00 1c beq- cr7,ffc0d1a8 <_Thread_Stack_Free+0x44>
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
ffc0d190: 7c 09 03 a6 mtctr r0
ffc0d194: 4e 80 04 21 bctrl
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
}
ffc0d198: 80 01 00 0c lwz r0,12(r1)
ffc0d19c: 38 21 00 08 addi r1,r1,8
ffc0d1a0: 7c 08 03 a6 mtlr r0
ffc0d1a4: 4e 80 00 20 blr
*/
if ( Configuration.stack_free_hook )
(*Configuration.stack_free_hook)( the_thread->Start.Initial_stack.area );
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
ffc0d1a8: 48 00 0a 7d bl ffc0dc24 <_Workspace_Free>
}
ffc0d1ac: 80 01 00 0c lwz r0,12(r1)
ffc0d1b0: 38 21 00 08 addi r1,r1,8
ffc0d1b4: 7c 08 03 a6 mtlr r0
ffc0d1b8: 4e 80 00 20 blr
ffc11688 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
ffc11688: 7c 08 02 a6 mflr r0
ffc1168c: 94 21 ff f8 stwu r1,-8(r1)
ffc11690: 7c 64 1b 78 mr r4,r3
ffc11694: 90 01 00 0c stw r0,12(r1)
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
ffc11698: 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 &&
ffc1169c: 80 03 00 30 lwz r0,48(r3)
ffc116a0: 2f 80 00 00 cmpwi cr7,r0,0
ffc116a4: 41 9e 00 14 beq- cr7,ffc116b8 <_Thread_queue_Process_timeout+0x30>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc116a8: 3d 20 00 00 lis r9,0
ffc116ac: 81 29 31 50 lwz r9,12624(r9)
ffc116b0: 7f 84 48 00 cmpw cr7,r4,r9
ffc116b4: 41 9e 00 20 beq- cr7,ffc116d4 <_Thread_queue_Process_timeout+0x4c><== ALWAYS TAKEN
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
ffc116b8: 80 03 00 3c lwz r0,60(r3)
ffc116bc: 90 04 00 34 stw r0,52(r4)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
ffc116c0: 4b ff fe 85 bl ffc11544 <_Thread_queue_Extract>
}
}
ffc116c4: 80 01 00 0c lwz r0,12(r1)
ffc116c8: 38 21 00 08 addi r1,r1,8
ffc116cc: 7c 08 03 a6 mtlr r0
ffc116d0: 4e 80 00 20 blr
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
ffc116d4: 2f 80 00 03 cmpwi cr7,r0,3
ffc116d8: 41 be ff ec beq- cr7,ffc116c4 <_Thread_queue_Process_timeout+0x3c>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
ffc116dc: 80 03 00 3c lwz r0,60(r3)
ffc116e0: 90 04 00 34 stw r0,52(r4)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc116e4: 38 00 00 02 li r0,2
ffc116e8: 90 03 00 30 stw r0,48(r3)
ffc116ec: 4b ff ff d8 b ffc116c4 <_Thread_queue_Process_timeout+0x3c>
ffc0cebc <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0cebc: 94 21 ff d8 stwu r1,-40(r1)
ffc0cec0: 7c 08 02 a6 mflr r0
ffc0cec4: 93 e1 00 24 stw r31,36(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0cec8: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0cecc: 93 c1 00 20 stw r30,32(r1)
ffc0ced0: 7c 9e 23 78 mr r30,r4
ffc0ced4: 90 01 00 2c stw r0,44(r1)
ffc0ced8: 93 a1 00 1c stw r29,28(r1)
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
ffc0cedc: 41 82 00 10 beq- ffc0ceec <_Thread_queue_Requeue+0x30> <== 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 ) {
ffc0cee0: 80 1f 00 34 lwz r0,52(r31)
ffc0cee4: 2f 80 00 01 cmpwi cr7,r0,1
ffc0cee8: 41 9e 00 20 beq- cr7,ffc0cf08 <_Thread_queue_Requeue+0x4c><== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
ffc0ceec: 80 01 00 2c lwz r0,44(r1) <== NOT EXECUTED
ffc0cef0: 83 a1 00 1c lwz r29,28(r1) <== NOT EXECUTED
ffc0cef4: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0cef8: 83 c1 00 20 lwz r30,32(r1) <== NOT EXECUTED
ffc0cefc: 83 e1 00 24 lwz r31,36(r1) <== NOT EXECUTED
ffc0cf00: 38 21 00 28 addi r1,r1,40 <== NOT EXECUTED
ffc0cf04: 4e 80 00 20 blr <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0cf08: 7f a0 00 a6 mfmsr r29
ffc0cf0c: 7d 30 42 a6 mfsprg r9,0
ffc0cf10: 7f a9 48 78 andc r9,r29,r9
ffc0cf14: 7d 20 01 24 mtmsr r9
ffc0cf18: 3d 60 00 03 lis r11,3
ffc0cf1c: 81 24 00 10 lwz r9,16(r4)
ffc0cf20: 61 6b be e0 ori r11,r11,48864
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 ) ) {
ffc0cf24: 7d 6a 48 39 and. r10,r11,r9
ffc0cf28: 40 82 00 24 bne- ffc0cf4c <_Thread_queue_Requeue+0x90> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0cf2c: 7f a0 01 24 mtmsr r29 <== NOT EXECUTED
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
ffc0cf30: 80 01 00 2c lwz r0,44(r1)
ffc0cf34: 83 a1 00 1c lwz r29,28(r1)
ffc0cf38: 7c 08 03 a6 mtlr r0
ffc0cf3c: 83 c1 00 20 lwz r30,32(r1)
ffc0cf40: 83 e1 00 24 lwz r31,36(r1)
ffc0cf44: 38 21 00 28 addi r1,r1,40
ffc0cf48: 4e 80 00 20 blr
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;
ffc0cf4c: 90 1f 00 30 stw r0,48(r31)
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0cf50: 38 a0 00 01 li r5,1
ffc0cf54: 48 00 46 35 bl ffc11588 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0cf58: 7f e3 fb 78 mr r3,r31
ffc0cf5c: 7f c4 f3 78 mr r4,r30
ffc0cf60: 38 a1 00 08 addi r5,r1,8
ffc0cf64: 4b ff fc 81 bl ffc0cbe4 <_Thread_queue_Enqueue_priority>
ffc0cf68: 7f a0 01 24 mtmsr r29
ffc0cf6c: 4b ff ff c4 b ffc0cf30 <_Thread_queue_Requeue+0x74>
ffc0cf70 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0cf70: 94 21 ff e8 stwu r1,-24(r1)
ffc0cf74: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0cf78: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0cf7c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0cf80: 4b ff f5 a5 bl ffc0c524 <_Thread_Get>
switch ( location ) {
ffc0cf84: 80 01 00 08 lwz r0,8(r1)
ffc0cf88: 2f 80 00 00 cmpwi cr7,r0,0
ffc0cf8c: 40 9e 00 1c bne- cr7,ffc0cfa8 <_Thread_queue_Timeout+0x38><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0cf90: 48 00 46 f9 bl ffc11688 <_Thread_queue_Process_timeout>
*
* This routine decrements the thread dispatch level.
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_decrement_disable_level(void)
{
_Thread_Dispatch_disable_level--;
ffc0cf94: 3d 20 00 00 lis r9,0
ffc0cf98: 81 69 28 0c lwz r11,10252(r9)
ffc0cf9c: 38 0b ff ff addi r0,r11,-1
ffc0cfa0: 90 09 28 0c stw r0,10252(r9)
return _Thread_Dispatch_disable_level;
ffc0cfa4: 80 09 28 0c lwz r0,10252(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0cfa8: 80 01 00 1c lwz r0,28(r1)
ffc0cfac: 38 21 00 18 addi r1,r1,24
ffc0cfb0: 7c 08 03 a6 mtlr r0
ffc0cfb4: 4e 80 00 20 blr
ffc1c4a8 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1c4a8: 94 21 ff 98 stwu r1,-104(r1)
ffc1c4ac: 7c 08 02 a6 mflr r0
ffc1c4b0: 92 a1 00 3c stw r21,60(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc1c4b4: 3a a1 00 14 addi r21,r1,20
ffc1c4b8: 90 01 00 6c stw r0,108(r1)
head->previous = NULL;
ffc1c4bc: 38 00 00 00 li r0,0
ffc1c4c0: 92 e1 00 44 stw r23,68(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc1c4c4: 3a e1 00 0c addi r23,r1,12
ffc1c4c8: 93 41 00 50 stw r26,80(r1)
ffc1c4cc: 3b 41 00 18 addi r26,r1,24
ffc1c4d0: 93 81 00 58 stw r28,88(r1)
head->previous = NULL;
tail->previous = head;
ffc1c4d4: 3b 81 00 08 addi r28,r1,8
ffc1c4d8: 92 81 00 38 stw r20,56(r1)
ffc1c4dc: 3e 80 00 00 lis r20,0
ffc1c4e0: 3a 94 28 e0 addi r20,r20,10464
ffc1c4e4: 93 01 00 48 stw r24,72(r1)
ffc1c4e8: 3f 00 00 00 lis r24,0
ffc1c4ec: 3b 18 29 14 addi r24,r24,10516
ffc1c4f0: 93 21 00 4c stw r25,76(r1)
ffc1c4f4: 3f 20 00 00 lis r25,0
ffc1c4f8: 3b 39 28 f8 addi r25,r25,10488
ffc1c4fc: 93 c1 00 60 stw r30,96(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc1c500: 93 41 00 14 stw r26,20(r1)
head->previous = NULL;
ffc1c504: 90 01 00 18 stw r0,24(r1)
tail->previous = head;
ffc1c508: 92 a1 00 1c stw r21,28(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc1c50c: 92 e1 00 08 stw r23,8(r1)
head->previous = NULL;
ffc1c510: 90 01 00 0c stw r0,12(r1)
tail->previous = head;
ffc1c514: 93 81 00 10 stw r28,16(r1)
ffc1c518: 92 01 00 28 stw r16,40(r1)
ffc1c51c: 3a 03 00 08 addi r16,r3,8
ffc1c520: 92 21 00 2c stw r17,44(r1)
ffc1c524: 3a 23 00 40 addi r17,r3,64
ffc1c528: 92 41 00 30 stw r18,48(r1)
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc1c52c: 3a 40 00 00 li r18,0
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1c530: 92 61 00 34 stw r19,52(r1)
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
ffc1c534: 3a 60 00 01 li r19,1
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1c538: 92 c1 00 40 stw r22,64(r1)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc1c53c: 3a c0 00 00 li r22,0
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1c540: 93 61 00 54 stw r27,84(r1)
ffc1c544: 3b 63 00 68 addi r27,r3,104
ffc1c548: 93 a1 00 5c stw r29,92(r1)
ffc1c54c: 3b a3 00 30 addi r29,r3,48
ffc1c550: 93 e1 00 64 stw r31,100(r1)
ffc1c554: 7c 7f 1b 78 mr r31,r3
{
/*
* 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;
ffc1c558: 92 bf 00 78 stw r21,120(r31)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1c55c: 7f 85 e3 78 mr r5,r28
ffc1c560: 7f a3 eb 78 mr r3,r29
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1c564: 80 18 00 00 lwz r0,0(r24)
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1c568: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
ffc1c56c: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1c570: 7c 84 00 50 subf r4,r4,r0
ffc1c574: 48 00 5a 0d bl ffc21f80 <_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();
ffc1c578: 83 d9 00 00 lwz r30,0(r25)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1c57c: 80 bf 00 74 lwz r5,116(r31)
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
ffc1c580: 7f 9e 28 40 cmplw cr7,r30,r5
ffc1c584: 41 9d 00 98 bgt- cr7,ffc1c61c <_Timer_server_Body+0x174>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
ffc1c588: 41 9c 00 a8 blt- cr7,ffc1c630 <_Timer_server_Body+0x188>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
ffc1c58c: 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 );
ffc1c590: 80 7f 00 78 lwz r3,120(r31)
ffc1c594: 48 00 0e 91 bl ffc1d424 <_Chain_Get>
if ( timer == NULL ) {
ffc1c598: 7c 64 1b 79 mr. r4,r3
ffc1c59c: 41 82 00 34 beq- ffc1c5d0 <_Timer_server_Body+0x128> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1c5a0: 80 04 00 38 lwz r0,56(r4) <== NOT EXECUTED
ffc1c5a4: 2f 80 00 01 cmpwi cr7,r0,1 <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1c5a8: 2f 00 00 03 cmpwi cr6,r0,3 <== NOT EXECUTED
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1c5ac: 41 9e 00 98 beq- cr7,ffc1c644 <_Timer_server_Body+0x19c><== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1c5b0: 40 9a ff e0 bne+ cr6,ffc1c590 <_Timer_server_Body+0xe8> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1c5b4: 38 84 00 10 addi r4,r4,16 <== NOT EXECUTED
ffc1c5b8: 7f 63 db 78 mr r3,r27 <== NOT EXECUTED
ffc1c5bc: 48 00 5a 7d bl ffc22038 <_Watchdog_Insert> <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc1c5c0: 80 7f 00 78 lwz r3,120(r31) <== NOT EXECUTED
ffc1c5c4: 48 00 0e 61 bl ffc1d424 <_Chain_Get> <== NOT EXECUTED
if ( timer == NULL ) {
ffc1c5c8: 7c 64 1b 79 mr. r4,r3 <== NOT EXECUTED
ffc1c5cc: 40 82 ff d4 bne+ ffc1c5a0 <_Timer_server_Body+0xf8> <== NOT EXECUTED
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1c5d0: 7d 20 00 a6 mfmsr r9
ffc1c5d4: 7c 10 42 a6 mfsprg r0,0
ffc1c5d8: 7d 20 00 78 andc r0,r9,r0
ffc1c5dc: 7c 00 01 24 mtmsr r0
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ffc1c5e0: 80 01 00 14 lwz r0,20(r1)
ffc1c5e4: 7f 80 d0 00 cmpw cr7,r0,r26
ffc1c5e8: 41 9e 00 6c beq- cr7,ffc1c654 <_Timer_server_Body+0x1ac><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1c5ec: 7d 20 01 24 mtmsr r9 <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1c5f0: 80 18 00 00 lwz r0,0(r24) <== NOT EXECUTED
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1c5f4: 7f 85 e3 78 mr r5,r28 <== NOT EXECUTED
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1c5f8: 80 9f 00 3c lwz r4,60(r31) <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1c5fc: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc1c600: 90 1f 00 3c stw r0,60(r31) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1c604: 7c 84 00 50 subf r4,r4,r0 <== NOT EXECUTED
ffc1c608: 48 00 59 79 bl ffc21f80 <_Watchdog_Adjust_to_chain> <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc1c60c: 83 d9 00 00 lwz r30,0(r25) <== NOT EXECUTED
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1c610: 80 bf 00 74 lwz r5,116(r31) <== NOT EXECUTED
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
ffc1c614: 7f 9e 28 40 cmplw cr7,r30,r5 <== NOT EXECUTED
ffc1c618: 40 9d ff 70 ble+ cr7,ffc1c588 <_Timer_server_Body+0xe0> <== NOT EXECUTED
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1c61c: 7c 85 f0 50 subf r4,r5,r30
ffc1c620: 7f 63 db 78 mr r3,r27
ffc1c624: 7f 85 e3 78 mr r5,r28
ffc1c628: 48 00 59 59 bl ffc21f80 <_Watchdog_Adjust_to_chain>
ffc1c62c: 4b ff ff 60 b ffc1c58c <_Timer_server_Body+0xe4>
/*
* 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 );
ffc1c630: 7f 63 db 78 mr r3,r27
ffc1c634: 38 80 00 01 li r4,1
ffc1c638: 7c be 28 50 subf r5,r30,r5
ffc1c63c: 48 00 58 29 bl ffc21e64 <_Watchdog_Adjust>
ffc1c640: 4b ff ff 4c b ffc1c58c <_Timer_server_Body+0xe4>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1c644: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc1c648: 38 84 00 10 addi r4,r4,16 <== NOT EXECUTED
ffc1c64c: 48 00 59 ed bl ffc22038 <_Watchdog_Insert> <== NOT EXECUTED
ffc1c650: 4b ff ff 40 b ffc1c590 <_Timer_server_Body+0xe8> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
ffc1c654: 90 9f 00 78 stw r4,120(r31)
ffc1c658: 7d 20 01 24 mtmsr r9
_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 ) ) {
ffc1c65c: 80 01 00 08 lwz r0,8(r1)
ffc1c660: 7f 80 b8 00 cmpw cr7,r0,r23
ffc1c664: 40 be 00 30 bne+ cr7,ffc1c694 <_Timer_server_Body+0x1ec>
ffc1c668: 48 00 00 50 b ffc1c6b8 <_Timer_server_Body+0x210>
Chain_Control *the_chain
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
ffc1c66c: 81 69 00 00 lwz r11,0(r9)
head->next = new_first;
new_first->previous = head;
ffc1c670: 93 8b 00 04 stw r28,4(r11)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *old_first = head->next;
Chain_Node *new_first = old_first->next;
head->next = new_first;
ffc1c674: 91 61 00 08 stw r11,8(r1)
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
ffc1c678: 92 c9 00 08 stw r22,8(r9)
ffc1c67c: 7c 00 01 24 mtmsr r0
/*
* 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 );
ffc1c680: 80 09 00 1c lwz r0,28(r9)
ffc1c684: 80 69 00 20 lwz r3,32(r9)
ffc1c688: 80 89 00 24 lwz r4,36(r9)
ffc1c68c: 7c 09 03 a6 mtctr r0
ffc1c690: 4e 80 04 21 bctrl
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1c694: 7c 00 00 a6 mfmsr r0
ffc1c698: 7d 30 42 a6 mfsprg r9,0
ffc1c69c: 7c 09 48 78 andc r9,r0,r9
ffc1c6a0: 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;
ffc1c6a4: 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))
ffc1c6a8: 7f 89 b8 00 cmpw cr7,r9,r23
ffc1c6ac: 40 9e ff c0 bne+ cr7,ffc1c66c <_Timer_server_Body+0x1c4>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1c6b0: 7c 00 01 24 mtmsr r0
ffc1c6b4: 4b ff fe a4 b ffc1c558 <_Timer_server_Body+0xb0>
}
} else {
ts->active = false;
ffc1c6b8: 9a 5f 00 7c stb r18,124(r31)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc1c6bc: 80 14 00 00 lwz r0,0(r20)
ffc1c6c0: 30 00 00 01 addic r0,r0,1
ffc1c6c4: 90 14 00 00 stw r0,0(r20)
return _Thread_Dispatch_disable_level;
ffc1c6c8: 80 14 00 00 lwz r0,0(r20)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc1c6cc: 80 7f 00 00 lwz r3,0(r31)
ffc1c6d0: 38 80 00 08 li r4,8
ffc1c6d4: 48 00 4e 7d bl ffc21550 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1c6d8: 7f e3 fb 78 mr r3,r31
ffc1c6dc: 4b ff fc a5 bl ffc1c380 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1c6e0: 7f e3 fb 78 mr r3,r31
ffc1c6e4: 4b ff fd 31 bl ffc1c414 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc1c6e8: 48 00 42 b9 bl ffc209a0 <_Thread_Enable_dispatch>
ts->active = true;
ffc1c6ec: 9a 7f 00 7c stb r19,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc1c6f0: 7e 03 83 78 mr r3,r16
ffc1c6f4: 48 00 5b 0d bl ffc22200 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc1c6f8: 7e 23 8b 78 mr r3,r17
ffc1c6fc: 48 00 5b 05 bl ffc22200 <_Watchdog_Remove>
ffc1c700: 4b ff fe 58 b ffc1c558 <_Timer_server_Body+0xb0>
ffc1c704 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc1c704: 94 21 ff f0 stwu r1,-16(r1)
ffc1c708: 7c 08 02 a6 mflr r0
ffc1c70c: 7c 89 23 78 mr r9,r4
ffc1c710: 90 01 00 14 stw r0,20(r1)
if ( ts->insert_chain == NULL ) {
ffc1c714: 80 03 00 78 lwz r0,120(r3)
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
ffc1c718: 93 e1 00 0c stw r31,12(r1)
ffc1c71c: 7c 7f 1b 78 mr r31,r3
if ( ts->insert_chain == NULL ) {
ffc1c720: 2f 80 00 00 cmpwi cr7,r0,0
ffc1c724: 41 9e 00 20 beq- cr7,ffc1c744 <_Timer_server_Schedule_operation_method+0x40><== ALWAYS TAKEN
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
ffc1c728: 80 63 00 78 lwz r3,120(r3) <== NOT EXECUTED
ffc1c72c: 48 00 0c a1 bl ffc1d3cc <_Chain_Append> <== NOT EXECUTED
}
}
ffc1c730: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc1c734: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc1c738: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc1c73c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc1c740: 4e 80 00 20 blr <== NOT EXECUTED
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc1c744: 3d 60 00 00 lis r11,0
ffc1c748: 81 4b 28 e0 lwz r10,10464(r11)
ffc1c74c: 38 0a 00 01 addi r0,r10,1
ffc1c750: 90 0b 28 e0 stw r0,10464(r11)
return _Thread_Dispatch_disable_level;
ffc1c754: 80 0b 28 e0 lwz r0,10464(r11)
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1c758: 80 04 00 38 lwz r0,56(r4)
ffc1c75c: 2f 80 00 01 cmpwi cr7,r0,1
ffc1c760: 41 9e 00 ac beq- cr7,ffc1c80c <_Timer_server_Schedule_operation_method+0x108>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1c764: 2f 80 00 03 cmpwi cr7,r0,3
ffc1c768: 41 9e 00 1c beq- cr7,ffc1c784 <_Timer_server_Schedule_operation_method+0x80>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1c76c: 48 00 42 35 bl ffc209a0 <_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 );
}
}
ffc1c770: 80 01 00 14 lwz r0,20(r1)
ffc1c774: 83 e1 00 0c lwz r31,12(r1)
ffc1c778: 38 21 00 10 addi r1,r1,16
ffc1c77c: 7c 08 03 a6 mtlr r0
ffc1c780: 4e 80 00 20 blr
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1c784: 7c c0 00 a6 mfmsr r6
ffc1c788: 7c 10 42 a6 mfsprg r0,0
ffc1c78c: 7c c0 00 78 andc r0,r6,r0
ffc1c790: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc1c794: 81 63 00 68 lwz r11,104(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc1c798: 38 03 00 6c addi r0,r3,108
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc1c79c: 3d 40 00 00 lis r10,0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc1c7a0: 7f 8b 00 00 cmpw cr7,r11,r0
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc1c7a4: 80 0a 28 f8 lwz r0,10488(r10)
last_snapshot = ts->TOD_watchdogs.last_snapshot;
ffc1c7a8: 81 43 00 74 lwz r10,116(r3)
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
ffc1c7ac: 41 9e 00 30 beq- cr7,ffc1c7dc <_Timer_server_Schedule_operation_method+0xd8>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc1c7b0: 7f 80 50 40 cmplw cr7,r0,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;
ffc1c7b4: 80 eb 00 10 lwz r7,16(r11)
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
ffc1c7b8: 7d 07 52 14 add r8,r7,r10
delta_interval += delta;
ffc1c7bc: 7d 00 40 50 subf r8,r0,r8
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
last_snapshot = ts->TOD_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
if ( snapshot > last_snapshot ) {
ffc1c7c0: 40 9d 00 18 ble- cr7,ffc1c7d8 <_Timer_server_Schedule_operation_method+0xd4>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
ffc1c7c4: 7d 4a 00 50 subf r10,r10,r0
if (delta_interval > delta) {
ffc1c7c8: 7f 87 50 40 cmplw cr7,r7,r10
delta_interval -= delta;
} else {
delta_interval = 0;
ffc1c7cc: 39 00 00 00 li r8,0
if ( snapshot > last_snapshot ) {
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
ffc1c7d0: 40 9d 00 08 ble- cr7,ffc1c7d8 <_Timer_server_Schedule_operation_method+0xd4><== NEVER TAKEN
delta_interval -= delta;
ffc1c7d4: 7d 0a 38 50 subf r8,r10,r7
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
ffc1c7d8: 91 0b 00 10 stw r8,16(r11)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
ffc1c7dc: 90 1f 00 74 stw r0,116(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1c7e0: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1c7e4: 38 7f 00 68 addi r3,r31,104
ffc1c7e8: 38 89 00 10 addi r4,r9,16
ffc1c7ec: 48 00 58 4d bl ffc22038 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1c7f0: 88 1f 00 7c lbz r0,124(r31)
ffc1c7f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc1c7f8: 40 9e ff 74 bne+ cr7,ffc1c76c <_Timer_server_Schedule_operation_method+0x68>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1c7fc: 7f e3 fb 78 mr r3,r31
ffc1c800: 4b ff fc 15 bl ffc1c414 <_Timer_server_Reset_tod_system_watchdog>
}
}
_Thread_Enable_dispatch();
ffc1c804: 48 00 41 9d bl ffc209a0 <_Thread_Enable_dispatch>
ffc1c808: 4b ff ff 68 b ffc1c770 <_Timer_server_Schedule_operation_method+0x6c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1c80c: 7c c0 00 a6 mfmsr r6
ffc1c810: 7c 10 42 a6 mfsprg r0,0
ffc1c814: 7c c0 00 78 andc r0,r6,r0
ffc1c818: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc1c81c: 81 63 00 30 lwz r11,48(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc1c820: 38 03 00 34 addi r0,r3,52
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
ffc1c824: 3d 40 00 00 lis r10,0
last_snapshot = ts->Interval_watchdogs.last_snapshot;
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc1c828: 7f 8b 00 00 cmpw cr7,r11,r0
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
snapshot = _Watchdog_Ticks_since_boot;
ffc1c82c: 80 0a 29 14 lwz r0,10516(r10)
last_snapshot = ts->Interval_watchdogs.last_snapshot;
ffc1c830: 81 03 00 3c lwz r8,60(r3)
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
ffc1c834: 41 9e 00 20 beq- cr7,ffc1c854 <_Timer_server_Schedule_operation_method+0x150>
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
ffc1c838: 80 eb 00 10 lwz r7,16(r11)
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
ffc1c83c: 7d 08 00 50 subf r8,r8,r0
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
ffc1c840: 39 40 00 00 li r10,0
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
ffc1c844: 7f 88 38 40 cmplw cr7,r8,r7
ffc1c848: 40 9c 00 08 bge- cr7,ffc1c850 <_Timer_server_Schedule_operation_method+0x14c>
delta_interval -= delta;
ffc1c84c: 7d 48 38 50 subf r10,r8,r7
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
ffc1c850: 91 4b 00 10 stw r10,16(r11)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
ffc1c854: 90 1f 00 3c stw r0,60(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1c858: 7c c0 01 24 mtmsr r6
_ISR_Enable( level );
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1c85c: 38 7f 00 30 addi r3,r31,48
ffc1c860: 38 89 00 10 addi r4,r9,16
ffc1c864: 48 00 57 d5 bl ffc22038 <_Watchdog_Insert>
if ( !ts->active ) {
ffc1c868: 88 1f 00 7c lbz r0,124(r31)
ffc1c86c: 2f 80 00 00 cmpwi cr7,r0,0
ffc1c870: 40 9e fe fc bne+ cr7,ffc1c76c <_Timer_server_Schedule_operation_method+0x68>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1c874: 7f e3 fb 78 mr r3,r31
ffc1c878: 4b ff fb 09 bl ffc1c380 <_Timer_server_Reset_interval_system_watchdog>
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
ffc1c87c: 48 00 41 25 bl ffc209a0 <_Thread_Enable_dispatch>
ffc1c880: 4b ff fe f0 b ffc1c770 <_Timer_server_Schedule_operation_method+0x6c>
ffc0d528 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0d528: 94 21 ff e0 stwu r1,-32(r1)
ffc0d52c: 7c 08 02 a6 mflr r0
ffc0d530: 93 c1 00 18 stw r30,24(r1)
ffc0d534: 3f c0 00 00 lis r30,0
ffc0d538: 3b de 2d f4 addi r30,r30,11764
ffc0d53c: 93 e1 00 1c stw r31,28(r1)
ffc0d540: 83 fe 00 08 lwz r31,8(r30)
ffc0d544: 93 61 00 0c stw r27,12(r1)
ffc0d548: 7c 7b 1b 78 mr r27,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d54c: 7f 9f f0 00 cmpw cr7,r31,r30
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0d550: 93 81 00 10 stw r28,16(r1)
ffc0d554: 7c 9c 23 78 mr r28,r4
ffc0d558: 93 a1 00 14 stw r29,20(r1)
ffc0d55c: 7c bd 2b 78 mr r29,r5
ffc0d560: 90 01 00 24 stw r0,36(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d564: 41 9e 00 30 beq- cr7,ffc0d594 <_User_extensions_Fatal+0x6c><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
ffc0d568: 80 1f 00 30 lwz r0,48(r31)
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0d56c: 7f 63 db 78 mr r3,r27
ffc0d570: 7f 84 e3 78 mr r4,r28
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
ffc0d574: 2f 80 00 00 cmpwi cr7,r0,0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0d578: 7f a5 eb 78 mr r5,r29
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
ffc0d57c: 41 9e 00 0c beq- cr7,ffc0d588 <_User_extensions_Fatal+0x60>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
ffc0d580: 7c 09 03 a6 mtctr r0
ffc0d584: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
ffc0d588: 83 ff 00 04 lwz r31,4(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d58c: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d590: 40 9e ff d8 bne+ cr7,ffc0d568 <_User_extensions_Fatal+0x40>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
ffc0d594: 80 01 00 24 lwz r0,36(r1)
ffc0d598: 83 61 00 0c lwz r27,12(r1)
ffc0d59c: 7c 08 03 a6 mtlr r0
ffc0d5a0: 83 81 00 10 lwz r28,16(r1)
ffc0d5a4: 83 a1 00 14 lwz r29,20(r1)
ffc0d5a8: 83 c1 00 18 lwz r30,24(r1)
ffc0d5ac: 83 e1 00 1c lwz r31,28(r1)
ffc0d5b0: 38 21 00 20 addi r1,r1,32
ffc0d5b4: 4e 80 00 20 blr
ffc0d338 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0d338: 94 21 ff e8 stwu r1,-24(r1)
ffc0d33c: 7c 08 02 a6 mflr r0
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
ffc0d340: 3c e0 00 00 lis r7,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0d344: 90 01 00 1c stw r0,28(r1)
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
ffc0d348: 38 e7 20 04 addi r7,r7,8196
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0d34c: 3d 00 00 00 lis r8,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0d350: 93 a1 00 0c stw r29,12(r1)
ffc0d354: 3d 40 00 00 lis r10,0
ffc0d358: 39 68 2d f4 addi r11,r8,11764
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
initial_extensions = Configuration.User_extension_table;
ffc0d35c: 83 a7 00 3c lwz r29,60(r7)
ffc0d360: 39 2a 2c d0 addi r9,r10,11472
head->previous = NULL;
ffc0d364: 38 00 00 00 li r0,0
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0d368: 93 c1 00 10 stw r30,16(r1)
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
ffc0d36c: 2f 9d 00 00 cmpwi cr7,r29,0
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0d370: 38 ab 00 04 addi r5,r11,4
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
ffc0d374: 93 81 00 08 stw r28,8(r1)
ffc0d378: 38 c9 00 04 addi r6,r9,4
ffc0d37c: 93 e1 00 14 stw r31,20(r1)
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
ffc0d380: 83 c7 00 38 lwz r30,56(r7)
ffc0d384: 90 a8 2d f4 stw r5,11764(r8)
head->previous = NULL;
ffc0d388: 90 0b 00 04 stw r0,4(r11)
tail->previous = head;
ffc0d38c: 91 6b 00 08 stw r11,8(r11)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc0d390: 90 ca 2c d0 stw r6,11472(r10)
head->previous = NULL;
ffc0d394: 90 09 00 04 stw r0,4(r9)
tail->previous = head;
ffc0d398: 91 29 00 08 stw r9,8(r9)
initial_extensions = Configuration.User_extension_table;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
ffc0d39c: 41 9e 00 88 beq- cr7,ffc0d424 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
ffc0d3a0: 1f 9e 00 34 mulli r28,r30,52
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
ffc0d3a4: 7f 83 e3 78 mr r3,r28
ffc0d3a8: 48 00 08 a9 bl ffc0dc50 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0d3ac: 38 80 00 00 li r4,0
ffc0d3b0: 7f 85 e3 78 mr r5,r28
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
ffc0d3b4: 7c 7f 1b 78 mr r31,r3
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
ffc0d3b8: 48 00 77 f5 bl ffc14bac <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0d3bc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0d3c0: 41 9e 00 64 beq- cr7,ffc0d424 <_User_extensions_Handler_initialization+0xec><== NEVER TAKEN
ffc0d3c4: 3b 80 00 00 li r28,0
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
ffc0d3c8: 81 5d 00 00 lwz r10,0(r29)
_User_extensions_Add_set( extension );
ffc0d3cc: 7f e3 fb 78 mr r3,r31
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
ffc0d3d0: 81 7d 00 04 lwz r11,4(r29)
ffc0d3d4: 3b 9c 00 01 addi r28,r28,1
ffc0d3d8: 81 3d 00 08 lwz r9,8(r29)
ffc0d3dc: 80 1d 00 0c lwz r0,12(r29)
ffc0d3e0: 91 5f 00 14 stw r10,20(r31)
ffc0d3e4: 91 7f 00 18 stw r11,24(r31)
ffc0d3e8: 91 3f 00 1c stw r9,28(r31)
ffc0d3ec: 90 1f 00 20 stw r0,32(r31)
ffc0d3f0: 81 5d 00 10 lwz r10,16(r29)
ffc0d3f4: 81 7d 00 14 lwz r11,20(r29)
ffc0d3f8: 81 3d 00 18 lwz r9,24(r29)
ffc0d3fc: 80 1d 00 1c lwz r0,28(r29)
ffc0d400: 3b bd 00 20 addi r29,r29,32
ffc0d404: 91 5f 00 24 stw r10,36(r31)
ffc0d408: 91 7f 00 28 stw r11,40(r31)
ffc0d40c: 91 3f 00 2c stw r9,44(r31)
ffc0d410: 90 1f 00 30 stw r0,48(r31)
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
ffc0d414: 3b ff 00 34 addi r31,r31,52
_User_extensions_Add_set( extension );
ffc0d418: 48 00 43 a5 bl ffc117bc <_User_extensions_Add_set>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
ffc0d41c: 7f 9c f0 00 cmpw cr7,r28,r30
ffc0d420: 40 9e ff a8 bne+ cr7,ffc0d3c8 <_User_extensions_Handler_initialization+0x90>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
ffc0d424: 80 01 00 1c lwz r0,28(r1)
ffc0d428: 83 81 00 08 lwz r28,8(r1)
ffc0d42c: 7c 08 03 a6 mtlr r0
ffc0d430: 83 a1 00 0c lwz r29,12(r1)
ffc0d434: 83 c1 00 10 lwz r30,16(r1)
ffc0d438: 83 e1 00 14 lwz r31,20(r1)
ffc0d43c: 38 21 00 18 addi r1,r1,24
ffc0d440: 4e 80 00 20 blr
ffc0d444 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0d444: 94 21 ff e8 stwu r1,-24(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d448: 3d 20 00 00 lis r9,0
ffc0d44c: 7c 08 02 a6 mflr r0
ffc0d450: 93 c1 00 10 stw r30,16(r1)
ffc0d454: 3b c9 2d f4 addi r30,r9,11764
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d458: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0d45c: 93 e1 00 14 stw r31,20(r1)
ffc0d460: 83 e9 2d f4 lwz r31,11764(r9)
ffc0d464: 93 a1 00 0c stw r29,12(r1)
ffc0d468: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d46c: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
ffc0d470: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d474: 41 9e 00 28 beq- cr7,ffc0d49c <_User_extensions_Thread_begin+0x58><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
ffc0d478: 80 1f 00 28 lwz r0,40(r31)
(*the_extension->Callouts.thread_begin)( executing );
ffc0d47c: 7f a3 eb 78 mr r3,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
ffc0d480: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d484: 41 9e 00 0c beq- cr7,ffc0d490 <_User_extensions_Thread_begin+0x4c>
(*the_extension->Callouts.thread_begin)( executing );
ffc0d488: 7c 09 03 a6 mtctr r0
ffc0d48c: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0d490: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d494: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d498: 40 9e ff e0 bne+ cr7,ffc0d478 <_User_extensions_Thread_begin+0x34>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
ffc0d49c: 80 01 00 1c lwz r0,28(r1)
ffc0d4a0: 83 a1 00 0c lwz r29,12(r1)
ffc0d4a4: 7c 08 03 a6 mtlr r0
ffc0d4a8: 83 c1 00 10 lwz r30,16(r1)
ffc0d4ac: 83 e1 00 14 lwz r31,20(r1)
ffc0d4b0: 38 21 00 18 addi r1,r1,24
ffc0d4b4: 4e 80 00 20 blr
ffc0d5b8 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0d5b8: 94 21 ff e8 stwu r1,-24(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d5bc: 3d 20 00 00 lis r9,0
ffc0d5c0: 7c 08 02 a6 mflr r0
ffc0d5c4: 93 c1 00 10 stw r30,16(r1)
ffc0d5c8: 3b c9 2d f4 addi r30,r9,11764
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d5cc: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0d5d0: 93 e1 00 14 stw r31,20(r1)
ffc0d5d4: 83 e9 2d f4 lwz r31,11764(r9)
ffc0d5d8: 93 a1 00 0c stw r29,12(r1)
ffc0d5dc: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d5e0: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0d5e4: 90 01 00 1c stw r0,28(r1)
if ( !status )
return false;
}
}
return true;
ffc0d5e8: 38 60 00 01 li r3,1
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
ffc0d5ec: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d5f0: 41 9e 00 40 beq- cr7,ffc0d630 <_User_extensions_Thread_create+0x78><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
ffc0d5f4: 3f 80 00 00 lis r28,0
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
ffc0d5f8: 80 1f 00 14 lwz r0,20(r31)
status = (*the_extension->Callouts.thread_create)(
ffc0d5fc: 39 3c 31 44 addi r9,r28,12612
ffc0d600: 7f a4 eb 78 mr r4,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
ffc0d604: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d608: 41 9e 00 18 beq- cr7,ffc0d620 <_User_extensions_Thread_create+0x68>
status = (*the_extension->Callouts.thread_create)(
ffc0d60c: 80 69 00 0c lwz r3,12(r9)
ffc0d610: 7c 09 03 a6 mtctr r0
ffc0d614: 4e 80 04 21 bctrl
_Thread_Executing,
the_thread
);
if ( !status )
ffc0d618: 2f 83 00 00 cmpwi cr7,r3,0
ffc0d61c: 41 9e 00 34 beq- cr7,ffc0d650 <_User_extensions_Thread_create+0x98>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0d620: 83 ff 00 00 lwz r31,0(r31)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d624: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d628: 40 9e ff d0 bne+ cr7,ffc0d5f8 <_User_extensions_Thread_create+0x40>
if ( !status )
return false;
}
}
return true;
ffc0d62c: 38 60 00 01 li r3,1
}
ffc0d630: 80 01 00 1c lwz r0,28(r1)
ffc0d634: 83 81 00 08 lwz r28,8(r1)
ffc0d638: 7c 08 03 a6 mtlr r0
ffc0d63c: 83 a1 00 0c lwz r29,12(r1)
ffc0d640: 83 c1 00 10 lwz r30,16(r1)
ffc0d644: 83 e1 00 14 lwz r31,20(r1)
ffc0d648: 38 21 00 18 addi r1,r1,24
ffc0d64c: 4e 80 00 20 blr
ffc0d650: 80 01 00 1c lwz r0,28(r1)
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
ffc0d654: 38 60 00 00 li r3,0
}
}
return true;
}
ffc0d658: 83 81 00 08 lwz r28,8(r1)
ffc0d65c: 7c 08 03 a6 mtlr r0
ffc0d660: 83 a1 00 0c lwz r29,12(r1)
ffc0d664: 83 c1 00 10 lwz r30,16(r1)
ffc0d668: 83 e1 00 14 lwz r31,20(r1)
ffc0d66c: 38 21 00 18 addi r1,r1,24
ffc0d670: 4e 80 00 20 blr
ffc0d674 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0d674: 94 21 ff e8 stwu r1,-24(r1)
ffc0d678: 7c 08 02 a6 mflr r0
ffc0d67c: 93 c1 00 10 stw r30,16(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
ffc0d680: 3f c0 00 00 lis r30,0
ffc0d684: 3b de 2d f4 addi r30,r30,11764
ffc0d688: 93 e1 00 14 stw r31,20(r1)
ffc0d68c: 83 fe 00 08 lwz r31,8(r30)
ffc0d690: 93 a1 00 0c stw r29,12(r1)
ffc0d694: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d698: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
ffc0d69c: 90 01 00 1c stw r0,28(r1)
ffc0d6a0: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d6a4: 41 9e 00 34 beq- cr7,ffc0d6d8 <_User_extensions_Thread_delete+0x64><== NEVER TAKEN
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
ffc0d6a8: 3f 80 00 00 lis r28,0
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
ffc0d6ac: 80 1f 00 20 lwz r0,32(r31)
(*the_extension->Callouts.thread_delete)(
ffc0d6b0: 39 3c 31 44 addi r9,r28,12612
ffc0d6b4: 7f a4 eb 78 mr r4,r29
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
ffc0d6b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d6bc: 41 9e 00 10 beq- cr7,ffc0d6cc <_User_extensions_Thread_delete+0x58>
(*the_extension->Callouts.thread_delete)(
ffc0d6c0: 80 69 00 0c lwz r3,12(r9)
ffc0d6c4: 7c 09 03 a6 mtctr r0
ffc0d6c8: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
ffc0d6cc: 83 ff 00 04 lwz r31,4(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d6d0: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d6d4: 40 9e ff d8 bne+ cr7,ffc0d6ac <_User_extensions_Thread_delete+0x38>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
ffc0d6d8: 80 01 00 1c lwz r0,28(r1)
ffc0d6dc: 83 81 00 08 lwz r28,8(r1)
ffc0d6e0: 7c 08 03 a6 mtlr r0
ffc0d6e4: 83 a1 00 0c lwz r29,12(r1)
ffc0d6e8: 83 c1 00 10 lwz r30,16(r1)
ffc0d6ec: 83 e1 00 14 lwz r31,20(r1)
ffc0d6f0: 38 21 00 18 addi r1,r1,24
ffc0d6f4: 4e 80 00 20 blr
ffc0d4b8 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0d4b8: 94 21 ff e8 stwu r1,-24(r1)
ffc0d4bc: 7c 08 02 a6 mflr r0
ffc0d4c0: 93 c1 00 10 stw r30,16(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return _Chain_Tail( the_chain )->previous;
ffc0d4c4: 3f c0 00 00 lis r30,0
ffc0d4c8: 3b de 2d f4 addi r30,r30,11764
ffc0d4cc: 93 e1 00 14 stw r31,20(r1)
ffc0d4d0: 83 fe 00 08 lwz r31,8(r30)
ffc0d4d4: 93 a1 00 0c stw r29,12(r1)
ffc0d4d8: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d4dc: 7f 9f f0 00 cmpw cr7,r31,r30
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
ffc0d4e0: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d4e4: 41 9e 00 28 beq- cr7,ffc0d50c <_User_extensions_Thread_exitted+0x54><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
ffc0d4e8: 80 1f 00 2c lwz r0,44(r31)
(*the_extension->Callouts.thread_exitted)( executing );
ffc0d4ec: 7f a3 eb 78 mr r3,r29
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
ffc0d4f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d4f4: 41 9e 00 0c beq- cr7,ffc0d500 <_User_extensions_Thread_exitted+0x48>
(*the_extension->Callouts.thread_exitted)( executing );
ffc0d4f8: 7c 09 03 a6 mtctr r0
ffc0d4fc: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
ffc0d500: 83 ff 00 04 lwz r31,4(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_Last( &_User_extensions_List );
ffc0d504: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d508: 40 9e ff e0 bne+ cr7,ffc0d4e8 <_User_extensions_Thread_exitted+0x30>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
ffc0d50c: 80 01 00 1c lwz r0,28(r1)
ffc0d510: 83 a1 00 0c lwz r29,12(r1)
ffc0d514: 7c 08 03 a6 mtlr r0
ffc0d518: 83 c1 00 10 lwz r30,16(r1)
ffc0d51c: 83 e1 00 14 lwz r31,20(r1)
ffc0d520: 38 21 00 18 addi r1,r1,24
ffc0d524: 4e 80 00 20 blr
ffc0e274 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e274: 94 21 ff e8 stwu r1,-24(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0e278: 3d 20 00 00 lis r9,0
ffc0e27c: 7c 08 02 a6 mflr r0
ffc0e280: 93 c1 00 10 stw r30,16(r1)
ffc0e284: 3b c9 2e 14 addi r30,r9,11796
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e288: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e28c: 93 e1 00 14 stw r31,20(r1)
ffc0e290: 83 e9 2e 14 lwz r31,11796(r9)
ffc0e294: 93 a1 00 0c stw r29,12(r1)
ffc0e298: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e29c: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
ffc0e2a0: 90 01 00 1c stw r0,28(r1)
ffc0e2a4: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e2a8: 41 9e 00 34 beq- cr7,ffc0e2dc <_User_extensions_Thread_restart+0x68><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)(
ffc0e2ac: 3f 80 00 00 lis r28,0
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
ffc0e2b0: 80 1f 00 1c lwz r0,28(r31)
(*the_extension->Callouts.thread_restart)(
ffc0e2b4: 39 3c 31 64 addi r9,r28,12644
ffc0e2b8: 7f a4 eb 78 mr r4,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
ffc0e2bc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e2c0: 41 9e 00 10 beq- cr7,ffc0e2d0 <_User_extensions_Thread_restart+0x5c>
(*the_extension->Callouts.thread_restart)(
ffc0e2c4: 80 69 00 0c lwz r3,12(r9)
ffc0e2c8: 7c 09 03 a6 mtctr r0
ffc0e2cc: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0e2d0: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0e2d4: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0e2d8: 40 9e ff d8 bne+ cr7,ffc0e2b0 <_User_extensions_Thread_restart+0x3c>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
ffc0e2dc: 80 01 00 1c lwz r0,28(r1)
ffc0e2e0: 83 81 00 08 lwz r28,8(r1)
ffc0e2e4: 7c 08 03 a6 mtlr r0
ffc0e2e8: 83 a1 00 0c lwz r29,12(r1)
ffc0e2ec: 83 c1 00 10 lwz r30,16(r1)
ffc0e2f0: 83 e1 00 14 lwz r31,20(r1)
ffc0e2f4: 38 21 00 18 addi r1,r1,24
ffc0e2f8: 4e 80 00 20 blr
ffc0d6f8 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d6f8: 94 21 ff e8 stwu r1,-24(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0d6fc: 3d 20 00 00 lis r9,0
ffc0d700: 7c 08 02 a6 mflr r0
ffc0d704: 93 c1 00 10 stw r30,16(r1)
ffc0d708: 3b c9 2d f4 addi r30,r9,11764
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d70c: 3b de 00 04 addi r30,r30,4
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d710: 93 e1 00 14 stw r31,20(r1)
ffc0d714: 83 e9 2d f4 lwz r31,11764(r9)
ffc0d718: 93 a1 00 0c stw r29,12(r1)
ffc0d71c: 7c 7d 1b 78 mr r29,r3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d720: 7f 9f f0 00 cmpw cr7,r31,r30
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
ffc0d724: 90 01 00 1c stw r0,28(r1)
ffc0d728: 93 81 00 08 stw r28,8(r1)
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d72c: 41 9e 00 34 beq- cr7,ffc0d760 <_User_extensions_Thread_start+0x68><== NEVER TAKEN
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
ffc0d730: 3f 80 00 00 lis r28,0
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
ffc0d734: 80 1f 00 18 lwz r0,24(r31)
(*the_extension->Callouts.thread_start)(
ffc0d738: 39 3c 31 44 addi r9,r28,12612
ffc0d73c: 7f a4 eb 78 mr r4,r29
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
ffc0d740: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d744: 41 9e 00 10 beq- cr7,ffc0d754 <_User_extensions_Thread_start+0x5c>
(*the_extension->Callouts.thread_start)(
ffc0d748: 80 69 00 0c lwz r3,12(r9)
ffc0d74c: 7c 09 03 a6 mtctr r0
ffc0d750: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
ffc0d754: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _Chain_First( &_User_extensions_List );
ffc0d758: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d75c: 40 9e ff d8 bne+ cr7,ffc0d734 <_User_extensions_Thread_start+0x3c>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
ffc0d760: 80 01 00 1c lwz r0,28(r1)
ffc0d764: 83 81 00 08 lwz r28,8(r1)
ffc0d768: 7c 08 03 a6 mtlr r0
ffc0d76c: 83 a1 00 0c lwz r29,12(r1)
ffc0d770: 83 c1 00 10 lwz r30,16(r1)
ffc0d774: 83 e1 00 14 lwz r31,20(r1)
ffc0d778: 38 21 00 18 addi r1,r1,24
ffc0d77c: 4e 80 00 20 blr
ffc0d780 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d780: 94 21 ff e8 stwu r1,-24(r1)
ffc0d784: 3d 20 00 00 lis r9,0
ffc0d788: 7c 08 02 a6 mflr r0
ffc0d78c: 93 c1 00 10 stw r30,16(r1)
ffc0d790: 3b c9 2c d0 addi r30,r9,11472
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0d794: 3b de 00 04 addi r30,r30,4
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d798: 93 e1 00 14 stw r31,20(r1)
ffc0d79c: 83 e9 2c d0 lwz r31,11472(r9)
ffc0d7a0: 93 81 00 08 stw r28,8(r1)
ffc0d7a4: 7c 7c 1b 78 mr r28,r3
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0d7a8: 7f 9f f0 00 cmpw cr7,r31,r30
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
ffc0d7ac: 93 a1 00 0c stw r29,12(r1)
ffc0d7b0: 7c 9d 23 78 mr r29,r4
ffc0d7b4: 90 01 00 1c stw r0,28(r1)
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0d7b8: 41 9e 00 24 beq- cr7,ffc0d7dc <_User_extensions_Thread_switch+0x5c><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
ffc0d7bc: 80 1f 00 08 lwz r0,8(r31)
ffc0d7c0: 7f 83 e3 78 mr r3,r28
ffc0d7c4: 7f a4 eb 78 mr r4,r29
ffc0d7c8: 7c 09 03 a6 mtctr r0
ffc0d7cc: 4e 80 04 21 bctrl
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
ffc0d7d0: 83 ff 00 00 lwz r31,0(r31)
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _Chain_First( &_User_extensions_Switches_list );
ffc0d7d4: 7f 9f f0 00 cmpw cr7,r31,r30
ffc0d7d8: 40 9e ff e4 bne+ cr7,ffc0d7bc <_User_extensions_Thread_switch+0x3c>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
ffc0d7dc: 80 01 00 1c lwz r0,28(r1)
ffc0d7e0: 83 81 00 08 lwz r28,8(r1)
ffc0d7e4: 7c 08 03 a6 mtlr r0
ffc0d7e8: 83 a1 00 0c lwz r29,12(r1)
ffc0d7ec: 83 c1 00 10 lwz r30,16(r1)
ffc0d7f0: 83 e1 00 14 lwz r31,20(r1)
ffc0d7f4: 38 21 00 18 addi r1,r1,24
ffc0d7f8: 4e 80 00 20 blr
ffc0f68c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0f68c: 94 21 ff e0 stwu r1,-32(r1)
ffc0f690: 7c 08 02 a6 mflr r0
ffc0f694: 90 01 00 24 stw r0,36(r1)
ffc0f698: 93 c1 00 18 stw r30,24(r1)
ffc0f69c: 7c be 2b 78 mr r30,r5
ffc0f6a0: 93 e1 00 1c stw r31,28(r1)
ffc0f6a4: 7c 7f 1b 78 mr r31,r3
ffc0f6a8: 93 61 00 0c stw r27,12(r1)
ffc0f6ac: 93 81 00 10 stw r28,16(r1)
ffc0f6b0: 93 a1 00 14 stw r29,20(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0f6b4: 7c 00 00 a6 mfmsr r0
ffc0f6b8: 7d 30 42 a6 mfsprg r9,0
ffc0f6bc: 7c 09 48 78 andc r9,r0,r9
ffc0f6c0: 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;
ffc0f6c4: 81 23 00 00 lwz r9,0(r3)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0f6c8: 3b 83 00 04 addi r28,r3,4
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
ffc0f6cc: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0f6d0: 41 9e 00 68 beq- cr7,ffc0f738 <_Watchdog_Adjust+0xac>
switch ( direction ) {
ffc0f6d4: 2f 84 00 00 cmpwi cr7,r4,0
ffc0f6d8: 40 9e 00 88 bne- cr7,ffc0f760 <_Watchdog_Adjust+0xd4>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f6dc: 2f 85 00 00 cmpwi cr7,r5,0
ffc0f6e0: 41 9e 00 58 beq- cr7,ffc0f738 <_Watchdog_Adjust+0xac> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f6e4: 83 a9 00 10 lwz r29,16(r9)
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0f6e8: 3b 60 00 01 li r27,1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f6ec: 7f 85 e8 40 cmplw cr7,r5,r29
ffc0f6f0: 40 bc 00 18 bge+ cr7,ffc0f708 <_Watchdog_Adjust+0x7c> <== ALWAYS TAKEN
ffc0f6f4: 48 00 00 a8 b ffc0f79c <_Watchdog_Adjust+0x110> <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f6f8: 41 82 00 40 beq- ffc0f738 <_Watchdog_Adjust+0xac> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0f6fc: 83 a9 00 10 lwz r29,16(r9)
ffc0f700: 7f 9d f0 40 cmplw cr7,r29,r30
ffc0f704: 41 9d 00 98 bgt- cr7,ffc0f79c <_Watchdog_Adjust+0x110>
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0f708: 93 69 00 10 stw r27,16(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0f70c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0f710: 7f e3 fb 78 mr r3,r31
ffc0f714: 48 00 03 2d bl ffc0fa40 <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0f718: 7c 00 00 a6 mfmsr r0
ffc0f71c: 7d 30 42 a6 mfsprg r9,0
ffc0f720: 7c 09 48 78 andc r9,r0,r9
ffc0f724: 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;
ffc0f728: 81 3f 00 00 lwz r9,0(r31)
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0f72c: 7f dd f0 51 subf. r30,r29,r30
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0f730: 7f 9c 48 00 cmpw cr7,r28,r9
ffc0f734: 40 9e ff c4 bne+ cr7,ffc0f6f8 <_Watchdog_Adjust+0x6c>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0f738: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0f73c: 80 01 00 24 lwz r0,36(r1)
ffc0f740: 83 61 00 0c lwz r27,12(r1)
ffc0f744: 7c 08 03 a6 mtlr r0
ffc0f748: 83 81 00 10 lwz r28,16(r1)
ffc0f74c: 83 a1 00 14 lwz r29,20(r1)
ffc0f750: 83 c1 00 18 lwz r30,24(r1)
ffc0f754: 83 e1 00 1c lwz r31,28(r1)
ffc0f758: 38 21 00 20 addi r1,r1,32
ffc0f75c: 4e 80 00 20 blr
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
ffc0f760: 2f 84 00 01 cmpwi cr7,r4,1
ffc0f764: 40 9e ff d4 bne+ cr7,ffc0f738 <_Watchdog_Adjust+0xac> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0f768: 81 69 00 10 lwz r11,16(r9)
ffc0f76c: 7f cb 2a 14 add r30,r11,r5
ffc0f770: 93 c9 00 10 stw r30,16(r9)
ffc0f774: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0f778: 80 01 00 24 lwz r0,36(r1)
ffc0f77c: 83 61 00 0c lwz r27,12(r1)
ffc0f780: 7c 08 03 a6 mtlr r0
ffc0f784: 83 81 00 10 lwz r28,16(r1)
ffc0f788: 83 a1 00 14 lwz r29,20(r1)
ffc0f78c: 83 c1 00 18 lwz r30,24(r1)
ffc0f790: 83 e1 00 1c lwz r31,28(r1)
ffc0f794: 38 21 00 20 addi r1,r1,32
ffc0f798: 4e 80 00 20 blr
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
ffc0f79c: 7f de e8 50 subf r30,r30,r29
ffc0f7a0: 93 c9 00 10 stw r30,16(r9)
break;
ffc0f7a4: 4b ff ff 94 b ffc0f738 <_Watchdog_Adjust+0xac>
ffc0d7fc <_Watchdog_Insert>:
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
ffc0d7fc: 3d 20 00 00 lis r9,0
ffc0d800: 80 09 31 4c lwz r0,12620(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d804: 7d 00 00 a6 mfmsr r8
ffc0d808: 7d 30 42 a6 mfsprg r9,0
ffc0d80c: 7d 09 48 78 andc r9,r8,r9
ffc0d810: 7d 20 01 24 mtmsr r9
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
ffc0d814: 81 24 00 08 lwz r9,8(r4)
ffc0d818: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d81c: 40 9e 01 04 bne- cr7,ffc0d920 <_Watchdog_Insert+0x124>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
ffc0d820: 3c c0 00 00 lis r6,0
ffc0d824: 81 26 28 3c lwz r9,10300(r6)
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
ffc0d828: 39 60 00 01 li r11,1
ffc0d82c: 91 64 00 08 stw r11,8(r4)
ffc0d830: 3c a0 00 00 lis r5,0
_Watchdog_Sync_count++;
ffc0d834: 39 29 00 01 addi r9,r9,1
ffc0d838: 91 26 28 3c stw r9,10300(r6)
restart:
delta_interval = the_watchdog->initial;
ffc0d83c: 81 24 00 0c lwz r9,12(r4)
ffc0d840: 81 63 00 00 lwz r11,0(r3)
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d844: 2f 89 00 00 cmpwi cr7,r9,0
ffc0d848: 41 9e 00 98 beq- cr7,ffc0d8e0 <_Watchdog_Insert+0xe4>
ffc0d84c: 81 4b 00 00 lwz r10,0(r11)
ffc0d850: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d854: 41 9e 00 8c beq- cr7,ffc0d8e0 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
ffc0d858: 81 4b 00 10 lwz r10,16(r11)
ffc0d85c: 7f 89 50 40 cmplw cr7,r9,r10
ffc0d860: 41 9c 00 c8 blt- cr7,ffc0d928 <_Watchdog_Insert+0x12c>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
__asm__ volatile (
ffc0d864: 7c e0 00 a6 mfmsr r7
ffc0d868: 7d 00 01 24 mtmsr r8
ffc0d86c: 7c e0 01 24 mtmsr r7
delta_interval -= after->delta_interval;
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d870: 80 e4 00 08 lwz r7,8(r4)
ffc0d874: 2f 87 00 01 cmpwi cr7,r7,1
ffc0d878: 40 9e 00 98 bne- cr7,ffc0d910 <_Watchdog_Insert+0x114>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d87c: 81 85 28 34 lwz r12,10292(r5)
ffc0d880: 38 e5 28 34 addi r7,r5,10292
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
ffc0d884: 7d 2a 48 50 subf r9,r10,r9
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d888: 7f 80 60 40 cmplw cr7,r0,r12
ffc0d88c: 40 bc 00 48 bge+ cr7,ffc0d8d4 <_Watchdog_Insert+0xd8>
ffc0d890: 48 00 00 d4 b ffc0d964 <_Watchdog_Insert+0x168>
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d894: 81 4b 00 00 lwz r10,0(r11)
ffc0d898: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0d89c: 41 9e 00 44 beq- cr7,ffc0d8e0 <_Watchdog_Insert+0xe4>
break;
if ( delta_interval < after->delta_interval ) {
ffc0d8a0: 81 4b 00 10 lwz r10,16(r11)
ffc0d8a4: 7f 8a 48 40 cmplw cr7,r10,r9
ffc0d8a8: 41 9d 00 80 bgt- cr7,ffc0d928 <_Watchdog_Insert+0x12c>
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
ffc0d8ac: 7d 2a 48 50 subf r9,r10,r9
ffc0d8b0: 7d 40 00 a6 mfmsr r10
ffc0d8b4: 7d 00 01 24 mtmsr r8
ffc0d8b8: 7d 40 01 24 mtmsr r10
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
ffc0d8bc: 81 44 00 08 lwz r10,8(r4)
ffc0d8c0: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0d8c4: 40 9e 00 4c bne- cr7,ffc0d910 <_Watchdog_Insert+0x114> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
ffc0d8c8: 81 47 00 00 lwz r10,0(r7)
ffc0d8cc: 7f 80 50 40 cmplw cr7,r0,r10
ffc0d8d0: 41 9c 00 94 blt- cr7,ffc0d964 <_Watchdog_Insert+0x168> <== NEVER TAKEN
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d8d4: 2f 89 00 00 cmpwi cr7,r9,0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
ffc0d8d8: 81 6b 00 00 lwz r11,0(r11)
for ( after = _Watchdog_First( header ) ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
ffc0d8dc: 40 9e ff b8 bne+ cr7,ffc0d894 <_Watchdog_Insert+0x98>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
ffc0d8e0: 81 6b 00 04 lwz r11,4(r11)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d8e4: 3c e0 00 00 lis r7,0
ffc0d8e8: 80 e7 28 40 lwz r7,10304(r7)
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
ffc0d8ec: 38 60 00 02 li r3,2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0d8f0: 81 4b 00 00 lwz r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0d8f4: 91 64 00 04 stw r11,4(r4)
ffc0d8f8: 90 64 00 08 stw r3,8(r4)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
ffc0d8fc: 91 24 00 10 stw r9,16(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc0d900: 90 8b 00 00 stw r4,0(r11)
the_node->next = before_node;
before_node->previous = the_node;
ffc0d904: 90 8a 00 04 stw r4,4(r10)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0d908: 91 44 00 00 stw r10,0(r4)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d90c: 90 e4 00 14 stw r7,20(r4)
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
ffc0d910: 90 05 28 34 stw r0,10292(r5)
_Watchdog_Sync_count--;
ffc0d914: 81 26 28 3c lwz r9,10300(r6)
ffc0d918: 38 09 ff ff addi r0,r9,-1
ffc0d91c: 90 06 28 3c stw r0,10300(r6)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d920: 7d 00 01 24 mtmsr r8
ffc0d924: 4e 80 00 20 blr
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
ffc0d928: 7d 49 50 50 subf r10,r9,r10
ffc0d92c: 91 4b 00 10 stw r10,16(r11)
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d930: 3c e0 00 00 lis r7,0
ffc0d934: 38 60 00 02 li r3,2
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
ffc0d938: 81 6b 00 04 lwz r11,4(r11)
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d93c: 80 e7 28 40 lwz r7,10304(r7)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0d940: 81 4b 00 00 lwz r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0d944: 91 64 00 04 stw r11,4(r4)
ffc0d948: 90 64 00 08 stw r3,8(r4)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
ffc0d94c: 91 24 00 10 stw r9,16(r4)
before_node = after_node->next;
after_node->next = the_node;
ffc0d950: 90 8b 00 00 stw r4,0(r11)
the_node->next = before_node;
before_node->previous = the_node;
ffc0d954: 90 8a 00 04 stw r4,4(r10)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
ffc0d958: 91 44 00 00 stw r10,0(r4)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
ffc0d95c: 90 e4 00 14 stw r7,20(r4)
ffc0d960: 4b ff ff b0 b ffc0d910 <_Watchdog_Insert+0x114>
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
_Watchdog_Sync_level = insert_isr_nest_level;
ffc0d964: 90 05 28 34 stw r0,10292(r5)
goto restart;
ffc0d968: 4b ff fe d4 b ffc0d83c <_Watchdog_Insert+0x40>
ffc0d9c4 <_Watchdog_Remove>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0d9c4: 7d 20 00 a6 mfmsr r9
ffc0d9c8: 7c 10 42 a6 mfsprg r0,0
ffc0d9cc: 7d 20 00 78 andc r0,r9,r0
ffc0d9d0: 7c 00 01 24 mtmsr r0
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0d9d4: 80 03 00 08 lwz r0,8(r3)
switch ( previous_state ) {
ffc0d9d8: 2f 80 00 01 cmpwi cr7,r0,1
ffc0d9dc: 41 9e 00 98 beq- cr7,ffc0da74 <_Watchdog_Remove+0xb0>
ffc0d9e0: 2b 80 00 01 cmplwi cr7,r0,1
ffc0d9e4: 40 9c 00 1c bge- cr7,ffc0da00 <_Watchdog_Remove+0x3c>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0d9e8: 3d 60 00 00 lis r11,0
ffc0d9ec: 81 6b 28 40 lwz r11,10304(r11)
ffc0d9f0: 91 63 00 18 stw r11,24(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0d9f4: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0d9f8: 7c 03 03 78 mr r3,r0
ffc0d9fc: 4e 80 00 20 blr
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
ffc0da00: 2b 80 00 03 cmplwi cr7,r0,3
ffc0da04: 41 bd ff e4 bgt- cr7,ffc0d9e8 <_Watchdog_Remove+0x24> <== NEVER TAKEN
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0da08: 39 60 00 00 li r11,0
ffc0da0c: 91 63 00 08 stw r11,8(r3)
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
ffc0da10: 81 63 00 00 lwz r11,0(r3)
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0da14: 81 4b 00 00 lwz r10,0(r11)
ffc0da18: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0da1c: 41 9e 00 14 beq- cr7,ffc0da30 <_Watchdog_Remove+0x6c>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0da20: 81 0b 00 10 lwz r8,16(r11)
ffc0da24: 81 43 00 10 lwz r10,16(r3)
ffc0da28: 7d 48 52 14 add r10,r8,r10
ffc0da2c: 91 4b 00 10 stw r10,16(r11)
if ( _Watchdog_Sync_count )
ffc0da30: 3d 40 00 00 lis r10,0
ffc0da34: 81 4a 28 3c lwz r10,10300(r10)
ffc0da38: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0da3c: 41 9e 00 14 beq- cr7,ffc0da50 <_Watchdog_Remove+0x8c>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0da40: 3d 40 00 00 lis r10,0
ffc0da44: 81 0a 31 4c lwz r8,12620(r10)
ffc0da48: 3d 40 00 00 lis r10,0
ffc0da4c: 91 0a 28 34 stw r8,10292(r10)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0da50: 81 43 00 04 lwz r10,4(r3)
next->previous = previous;
ffc0da54: 91 4b 00 04 stw r10,4(r11)
previous->next = next;
ffc0da58: 91 6a 00 00 stw r11,0(r10)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0da5c: 3d 60 00 00 lis r11,0
ffc0da60: 81 6b 28 40 lwz r11,10304(r11)
ffc0da64: 91 63 00 18 stw r11,24(r3)
ffc0da68: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0da6c: 7c 03 03 78 mr r3,r0
ffc0da70: 4e 80 00 20 blr
/*
* 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;
ffc0da74: 39 60 00 00 li r11,0
ffc0da78: 91 63 00 08 stw r11,8(r3)
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0da7c: 3d 60 00 00 lis r11,0
ffc0da80: 81 6b 28 40 lwz r11,10304(r11)
ffc0da84: 91 63 00 18 stw r11,24(r3)
ffc0da88: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return( previous_state );
}
ffc0da8c: 7c 03 03 78 mr r3,r0
ffc0da90: 4e 80 00 20 blr
ffc0edb8 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
ffc0edb8: 94 21 ff e8 stwu r1,-24(r1)
ffc0edbc: 7c 08 02 a6 mflr r0
ffc0edc0: 93 c1 00 10 stw r30,16(r1)
ffc0edc4: 7c 7e 1b 78 mr r30,r3
ffc0edc8: 93 e1 00 14 stw r31,20(r1)
ffc0edcc: 7c 9f 23 78 mr r31,r4
ffc0edd0: 90 01 00 1c stw r0,28(r1)
ffc0edd4: 93 81 00 08 stw r28,8(r1)
ffc0edd8: 93 a1 00 0c stw r29,12(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0eddc: 7f a0 00 a6 mfmsr r29
ffc0ede0: 7c 10 42 a6 mfsprg r0,0
ffc0ede4: 7f a0 00 78 andc r0,r29,r0
ffc0ede8: 7c 00 01 24 mtmsr r0
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
ffc0edec: 3c 60 ff c2 lis r3,-62
ffc0edf0: 7f e5 fb 78 mr r5,r31
ffc0edf4: 38 63 2e 30 addi r3,r3,11824
ffc0edf8: 7f c4 f3 78 mr r4,r30
ffc0edfc: 4c c6 31 82 crclr 4*cr1+eq
ffc0ee00: 4b ff 80 09 bl ffc06e08 <printk>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0ee04: 83 9f 00 00 lwz r28,0(r31)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0ee08: 3b ff 00 04 addi r31,r31,4
if ( !_Chain_Is_empty( header ) ) {
ffc0ee0c: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0ee10: 41 9e 00 54 beq- cr7,ffc0ee64 <_Watchdog_Report_chain+0xac>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
ffc0ee14: 7f 84 e3 78 mr r4,r28
ffc0ee18: 38 60 00 00 li r3,0
ffc0ee1c: 48 00 00 5d bl ffc0ee78 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
node != _Chain_Tail(header) ;
node = node->next )
ffc0ee20: 83 9c 00 00 lwz r28,0(r28)
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = _Chain_First( header ) ;
ffc0ee24: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0ee28: 40 9e ff ec bne+ cr7,ffc0ee14 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
ffc0ee2c: 3c 60 ff c2 lis r3,-62
ffc0ee30: 38 63 2e 48 addi r3,r3,11848
ffc0ee34: 7f c4 f3 78 mr r4,r30
ffc0ee38: 4c c6 31 82 crclr 4*cr1+eq
ffc0ee3c: 4b ff 7f cd bl ffc06e08 <printk>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0ee40: 7f a0 01 24 mtmsr r29
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
}
ffc0ee44: 80 01 00 1c lwz r0,28(r1)
ffc0ee48: 83 81 00 08 lwz r28,8(r1)
ffc0ee4c: 7c 08 03 a6 mtlr r0
ffc0ee50: 83 a1 00 0c lwz r29,12(r1)
ffc0ee54: 83 c1 00 10 lwz r30,16(r1)
ffc0ee58: 83 e1 00 14 lwz r31,20(r1)
ffc0ee5c: 38 21 00 18 addi r1,r1,24
ffc0ee60: 4e 80 00 20 blr
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
ffc0ee64: 3c 60 ff c2 lis r3,-62
ffc0ee68: 38 63 2e 58 addi r3,r3,11864
ffc0ee6c: 4c c6 31 82 crclr 4*cr1+eq
ffc0ee70: 4b ff 7f 99 bl ffc06e08 <printk>
ffc0ee74: 4b ff ff cc b ffc0ee40 <_Watchdog_Report_chain+0x88>
ffc0da94 <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
ffc0da94: 94 21 ff e8 stwu r1,-24(r1)
ffc0da98: 7c 08 02 a6 mflr r0
ffc0da9c: 90 01 00 1c stw r0,28(r1)
ffc0daa0: 93 e1 00 14 stw r31,20(r1)
ffc0daa4: 7c 7f 1b 78 mr r31,r3
ffc0daa8: 93 81 00 08 stw r28,8(r1)
ffc0daac: 93 a1 00 0c stw r29,12(r1)
ffc0dab0: 93 c1 00 10 stw r30,16(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0dab4: 7f 80 00 a6 mfmsr r28
ffc0dab8: 7c 10 42 a6 mfsprg r0,0
ffc0dabc: 7f 80 00 78 andc r0,r28,r0
ffc0dac0: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0dac4: 83 a3 00 00 lwz r29,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 );
ffc0dac8: 3b c3 00 04 addi r30,r3,4
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0dacc: 7f 9d f0 00 cmpw cr7,r29,r30
ffc0dad0: 41 9e 00 20 beq- cr7,ffc0daf0 <_Watchdog_Tickle+0x5c>
* 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) {
ffc0dad4: 81 3d 00 10 lwz r9,16(r29)
ffc0dad8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0dadc: 41 9e 00 74 beq- cr7,ffc0db50 <_Watchdog_Tickle+0xbc>
the_watchdog->delta_interval--;
ffc0dae0: 39 29 ff ff addi r9,r9,-1
if ( the_watchdog->delta_interval != 0 )
ffc0dae4: 2f 89 00 00 cmpwi cr7,r9,0
* 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) {
the_watchdog->delta_interval--;
ffc0dae8: 91 3d 00 10 stw r9,16(r29)
if ( the_watchdog->delta_interval != 0 )
ffc0daec: 41 be 00 64 beq+ cr7,ffc0db50 <_Watchdog_Tickle+0xbc>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0daf0: 7f 80 01 24 mtmsr r28
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
ffc0daf4: 80 01 00 1c lwz r0,28(r1)
ffc0daf8: 83 81 00 08 lwz r28,8(r1)
ffc0dafc: 7c 08 03 a6 mtlr r0
ffc0db00: 83 a1 00 0c lwz r29,12(r1)
ffc0db04: 83 c1 00 10 lwz r30,16(r1)
ffc0db08: 83 e1 00 14 lwz r31,20(r1)
ffc0db0c: 38 21 00 18 addi r1,r1,24
ffc0db10: 4e 80 00 20 blr
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
ffc0db14: 80 1d 00 1c lwz r0,28(r29)
ffc0db18: 80 7d 00 20 lwz r3,32(r29)
ffc0db1c: 80 9d 00 24 lwz r4,36(r29)
ffc0db20: 7c 09 03 a6 mtctr r0
ffc0db24: 4e 80 04 21 bctrl
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0db28: 7f 80 00 a6 mfmsr r28
ffc0db2c: 7c 10 42 a6 mfsprg r0,0
ffc0db30: 7f 80 00 78 andc r0,r28,r0
ffc0db34: 7c 00 01 24 mtmsr r0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0db38: 83 bf 00 00 lwz r29,0(r31)
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
ffc0db3c: 7f 9e e8 00 cmpw cr7,r30,r29
ffc0db40: 41 be ff b0 beq- cr7,ffc0daf0 <_Watchdog_Tickle+0x5c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
ffc0db44: 80 1d 00 10 lwz r0,16(r29)
ffc0db48: 2f 80 00 00 cmpwi cr7,r0,0
ffc0db4c: 40 be ff a4 bne- cr7,ffc0daf0 <_Watchdog_Tickle+0x5c>
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
ffc0db50: 7f a3 eb 78 mr r3,r29
ffc0db54: 4b ff fe 71 bl ffc0d9c4 <_Watchdog_Remove>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0db58: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
switch( watchdog_state ) {
ffc0db5c: 2f 83 00 02 cmpwi cr7,r3,2
ffc0db60: 40 9e ff c8 bne+ cr7,ffc0db28 <_Watchdog_Tickle+0x94> <== NEVER TAKEN
ffc0db64: 4b ff ff b0 b ffc0db14 <_Watchdog_Tickle+0x80>
ffc08da8 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
ffc08da8: 94 21 ff d8 stwu r1,-40(r1)
ffc08dac: 7d 80 00 26 mfcr r12
ffc08db0: 7c 08 02 a6 mflr r0
ffc08db4: 93 e1 00 24 stw r31,36(r1)
long adjustment;
/*
* Simple validations
*/
if ( !delta )
ffc08db8: 7c 7f 1b 79 mr. r31,r3
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
ffc08dbc: 93 c1 00 20 stw r30,32(r1)
ffc08dc0: 7c 9e 23 78 mr r30,r4
ffc08dc4: 90 01 00 2c stw r0,44(r1)
ffc08dc8: 91 81 00 1c stw r12,28(r1)
long adjustment;
/*
* Simple validations
*/
if ( !delta )
ffc08dcc: 41 82 01 70 beq- ffc08f3c <adjtime+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
ffc08dd0: 81 3f 00 04 lwz r9,4(r31)
ffc08dd4: 3c 00 00 0f lis r0,15
ffc08dd8: 60 00 42 3f ori r0,r0,16959
ffc08ddc: 7f 89 00 40 cmplw cr7,r9,r0
ffc08de0: 41 9d 01 5c bgt- cr7,ffc08f3c <adjtime+0x194>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
ffc08de4: 2e 04 00 00 cmpwi cr4,r4,0
ffc08de8: 41 92 00 14 beq- cr4,ffc08dfc <adjtime+0x54>
olddelta->tv_sec = 0;
ffc08dec: 38 00 00 00 li r0,0
olddelta->tv_usec = 0;
ffc08df0: 90 04 00 04 stw r0,4(r4)
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
ffc08df4: 90 04 00 00 stw r0,0(r4)
olddelta->tv_usec = 0;
ffc08df8: 81 3f 00 04 lwz r9,4(r31)
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
ffc08dfc: 80 1f 00 00 lwz r0,0(r31)
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
return 0;
ffc08e00: 38 60 00 00 li r3,0
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
ffc08e04: 54 0a 40 2e rlwinm r10,r0,8,0,23
ffc08e08: 54 0b 18 38 rlwinm r11,r0,3,0,28
ffc08e0c: 7d 6b 50 50 subf r11,r11,r10
ffc08e10: 55 6a 30 32 rlwinm r10,r11,6,0,25
ffc08e14: 7d 6b 50 50 subf r11,r11,r10
ffc08e18: 7c 0b 02 14 add r0,r11,r0
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
ffc08e1c: 3d 60 00 00 lis r11,0
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
ffc08e20: 54 00 30 32 rlwinm r0,r0,6,0,25
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
ffc08e24: 81 4b 20 10 lwz r10,8208(r11)
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
adjustment += delta->tv_usec;
ffc08e28: 7d 20 4a 14 add r9,r0,r9
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
ffc08e2c: 7f 89 50 40 cmplw cr7,r9,r10
ffc08e30: 40 9c 00 24 bge- cr7,ffc08e54 <adjtime+0xac>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
ffc08e34: 80 01 00 2c lwz r0,44(r1)
ffc08e38: 81 81 00 1c lwz r12,28(r1)
ffc08e3c: 7c 08 03 a6 mtlr r0
ffc08e40: 83 c1 00 20 lwz r30,32(r1)
ffc08e44: 83 e1 00 24 lwz r31,36(r1)
ffc08e48: 7d 80 81 20 mtcrf 8,r12
ffc08e4c: 38 21 00 28 addi r1,r1,40
ffc08e50: 4e 80 00 20 blr
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc08e54: 3d 20 00 00 lis r9,0
ffc08e58: 81 69 29 28 lwz r11,10536(r9)
ffc08e5c: 38 0b 00 01 addi r0,r11,1
ffc08e60: 90 09 29 28 stw r0,10536(r9)
return _Thread_Dispatch_disable_level;
ffc08e64: 80 09 29 28 lwz r0,10536(r9)
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ffc08e68: 38 61 00 08 addi r3,r1,8
ffc08e6c: 48 00 1f 6d bl ffc0add8 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
ffc08e70: 81 3f 00 04 lwz r9,4(r31)
ffc08e74: 80 01 00 0c lwz r0,12(r1)
ffc08e78: 1d 29 03 e8 mulli r9,r9,1000
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ffc08e7c: 81 41 00 08 lwz r10,8(r1)
ffc08e80: 81 7f 00 00 lwz r11,0(r31)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
ffc08e84: 7d 29 02 14 add r9,r9,r0
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc08e88: 3c 00 3b 9a lis r0,15258
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
ffc08e8c: 91 21 00 0c stw r9,12(r1)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc08e90: 60 00 c9 ff ori r0,r0,51711
ffc08e94: 7f 89 00 40 cmplw cr7,r9,r0
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ffc08e98: 7d 6a 5a 14 add r11,r10,r11
ffc08e9c: 91 61 00 08 stw r11,8(r1)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc08ea0: 40 9d 00 20 ble- cr7,ffc08ec0 <adjtime+0x118>
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ffc08ea4: 3d 29 c4 65 addis r9,r9,-15259
ffc08ea8: 39 29 36 00 addi r9,r9,13824
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc08eac: 7f 89 00 40 cmplw cr7,r9,r0
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
ffc08eb0: 39 6b 00 01 addi r11,r11,1
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc08eb4: 41 9d ff f0 bgt+ cr7,ffc08ea4 <adjtime+0xfc> <== NEVER TAKEN
ffc08eb8: 91 21 00 0c stw r9,12(r1)
ffc08ebc: 91 61 00 08 stw r11,8(r1)
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
ffc08ec0: 3c 00 c4 65 lis r0,-15259
ffc08ec4: 60 00 36 00 ori r0,r0,13824
ffc08ec8: 7f 89 00 40 cmplw cr7,r9,r0
ffc08ecc: 41 9d 00 24 bgt- cr7,ffc08ef0 <adjtime+0x148> <== NEVER TAKEN
ffc08ed0: 81 61 00 08 lwz r11,8(r1)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ffc08ed4: 3d 29 3b 9b addis r9,r9,15259
ffc08ed8: 39 29 ca 00 addi r9,r9,-13824
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
ffc08edc: 7f 89 00 40 cmplw cr7,r9,r0
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
ffc08ee0: 39 6b ff ff addi r11,r11,-1
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
ffc08ee4: 40 9d ff f0 ble+ cr7,ffc08ed4 <adjtime+0x12c>
ffc08ee8: 91 21 00 0c stw r9,12(r1)
ffc08eec: 91 61 00 08 stw r11,8(r1)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
ffc08ef0: 38 61 00 08 addi r3,r1,8
ffc08ef4: 48 00 1f b5 bl ffc0aea8 <_TOD_Set>
_Thread_Enable_dispatch();
ffc08ef8: 48 00 3c e1 bl ffc0cbd8 <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
ffc08efc: 41 92 00 38 beq- cr4,ffc08f34 <adjtime+0x18c>
*olddelta = *delta;
return 0;
}
ffc08f00: 80 01 00 2c lwz r0,44(r1)
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
ffc08f04: 38 60 00 00 li r3,0
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
ffc08f08: 81 5f 00 00 lwz r10,0(r31)
return 0;
}
ffc08f0c: 7c 08 03 a6 mtlr r0
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
ffc08f10: 81 7f 00 04 lwz r11,4(r31)
return 0;
}
ffc08f14: 81 81 00 1c lwz r12,28(r1)
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
ffc08f18: 91 5e 00 00 stw r10,0(r30)
return 0;
}
ffc08f1c: 7d 80 81 20 mtcrf 8,r12
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
ffc08f20: 91 7e 00 04 stw r11,4(r30)
return 0;
}
ffc08f24: 83 e1 00 24 lwz r31,36(r1)
ffc08f28: 83 c1 00 20 lwz r30,32(r1)
ffc08f2c: 38 21 00 28 addi r1,r1,40
ffc08f30: 4e 80 00 20 blr
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
ffc08f34: 38 60 00 00 li r3,0
ffc08f38: 4b ff fe fc b ffc08e34 <adjtime+0x8c>
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08f3c: 48 00 b5 ed bl ffc14528 <__errno>
ffc08f40: 38 00 00 16 li r0,22
ffc08f44: 90 03 00 00 stw r0,0(r3)
ffc08f48: 38 60 ff ff li r3,-1
ffc08f4c: 4b ff fe e8 b ffc08e34 <adjtime+0x8c>
ffc098b0 <aio_cancel>:
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
ffc098b0: 94 21 ff e8 stwu r1,-24(r1)
ffc098b4: 7c 08 02 a6 mflr r0
ffc098b8: 93 e1 00 14 stw r31,20(r1)
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
ffc098bc: 3f e0 00 00 lis r31,0
ffc098c0: 3b ff 2c 70 addi r31,r31,11376
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
ffc098c4: 93 a1 00 0c stw r29,12(r1)
ffc098c8: 7c 7d 1b 78 mr r29,r3
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
ffc098cc: 7f e3 fb 78 mr r3,r31
* operation(s) cannot be canceled
*/
int aio_cancel(int fildes, struct aiocb *aiocbp)
{
ffc098d0: 90 01 00 1c stw r0,28(r1)
ffc098d4: 93 c1 00 10 stw r30,16(r1)
ffc098d8: 7c 9e 23 78 mr r30,r4
ffc098dc: 93 81 00 08 stw r28,8(r1)
rtems_aio_request_chain *r_chain;
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
ffc098e0: 48 00 16 45 bl ffc0af24 <pthread_mutex_lock>
if (fcntl (fildes, F_GETFD) < 0) {
ffc098e4: 7f a3 eb 78 mr r3,r29
ffc098e8: 38 80 00 01 li r4,1
ffc098ec: 4c c6 31 82 crclr 4*cr1+eq
ffc098f0: 48 00 8f 75 bl ffc12864 <fcntl>
ffc098f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc098f8: 41 9c 01 bc blt- cr7,ffc09ab4 <aio_cancel+0x204>
pthread_mutex_unlock(&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EBADF);
}
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
ffc098fc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09900: 41 9e 01 08 beq- cr7,ffc09a08 <aio_cancel+0x158>
pthread_mutex_unlock (&aio_request_queue.mutex);
return AIO_CANCELED;
} else {
AIO_printf ("Cancel request\n");
if (aiocbp->aio_fildes != fildes) {
ffc09904: 83 9e 00 00 lwz r28,0(r30)
ffc09908: 7f 9c e8 00 cmpw cr7,r28,r29
ffc0990c: 40 9e 00 e0 bne- cr7,ffc099ec <aio_cancel+0x13c>
pthread_mutex_unlock (&aio_request_queue.mutex);
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
ffc09910: 38 7f 00 48 addi r3,r31,72
ffc09914: 7f 84 e3 78 mr r4,r28
ffc09918: 38 a0 00 00 li r5,0
ffc0991c: 48 00 03 bd bl ffc09cd8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc09920: 7c 7d 1b 79 mr. r29,r3
ffc09924: 41 82 00 54 beq- ffc09978 <aio_cancel+0xc8>
return AIO_ALLDONE;
}
}
AIO_printf ("Request on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
ffc09928: 3b 9d 00 1c addi r28,r29,28
ffc0992c: 7f 83 e3 78 mr r3,r28
ffc09930: 48 00 15 f5 bl ffc0af24 <pthread_mutex_lock>
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
ffc09934: 7f c4 f3 78 mr r4,r30
ffc09938: 38 7d 00 08 addi r3,r29,8
ffc0993c: 48 00 09 19 bl ffc0a254 <rtems_aio_remove_req>
ffc09940: 7c 7e 1b 78 mr r30,r3
pthread_mutex_unlock (&r_chain->mutex);
ffc09944: 7f 83 e3 78 mr r3,r28
ffc09948: 48 00 16 a9 bl ffc0aff0 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc0994c: 7f e3 fb 78 mr r3,r31
ffc09950: 48 00 16 a1 bl ffc0aff0 <pthread_mutex_unlock>
return result;
}
return AIO_ALLDONE;
}
ffc09954: 80 01 00 1c lwz r0,28(r1)
ffc09958: 7f c3 f3 78 mr r3,r30
ffc0995c: 83 81 00 08 lwz r28,8(r1)
ffc09960: 7c 08 03 a6 mtlr r0
ffc09964: 83 a1 00 0c lwz r29,12(r1)
ffc09968: 83 c1 00 10 lwz r30,16(r1)
ffc0996c: 83 e1 00 14 lwz r31,20(r1)
ffc09970: 38 21 00 18 addi r1,r1,24
ffc09974: 4e 80 00 20 blr
rtems_set_errno_and_return_minus_one (EINVAL);
}
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
ffc09978: 81 3f 00 54 lwz r9,84(r31)
ffc0997c: 38 1f 00 58 addi r0,r31,88
ffc09980: 7f 89 00 00 cmpw cr7,r9,r0
ffc09984: 41 9e 00 58 beq- cr7,ffc099dc <aio_cancel+0x12c> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
ffc09988: 38 7f 00 54 addi r3,r31,84
ffc0998c: 7f 84 e3 78 mr r4,r28
ffc09990: 38 a0 00 00 li r5,0
ffc09994: 48 00 03 45 bl ffc09cd8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc09998: 2c 03 00 00 cmpwi r3,0
ffc0999c: 41 82 00 50 beq- ffc099ec <aio_cancel+0x13c>
rtems_set_errno_and_return_minus_one (EINVAL);
}
AIO_printf ("Request on [IQ]\n");
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
ffc099a0: 7f c4 f3 78 mr r4,r30
ffc099a4: 38 63 00 08 addi r3,r3,8
ffc099a8: 48 00 08 ad bl ffc0a254 <rtems_aio_remove_req>
ffc099ac: 7c 7e 1b 78 mr r30,r3
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc099b0: 7f e3 fb 78 mr r3,r31
ffc099b4: 48 00 16 3d bl ffc0aff0 <pthread_mutex_unlock>
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
return AIO_ALLDONE;
}
ffc099b8: 80 01 00 1c lwz r0,28(r1)
ffc099bc: 7f c3 f3 78 mr r3,r30
ffc099c0: 83 81 00 08 lwz r28,8(r1)
ffc099c4: 7c 08 03 a6 mtlr r0
ffc099c8: 83 a1 00 0c lwz r29,12(r1)
ffc099cc: 83 c1 00 10 lwz r30,16(r1)
ffc099d0: 83 e1 00 14 lwz r31,20(r1)
ffc099d4: 38 21 00 18 addi r1,r1,24
ffc099d8: 4e 80 00 20 blr
result = rtems_aio_remove_req (&r_chain->perfd, aiocbp);
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
} else {
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc099dc: 7f e3 fb 78 mr r3,r31
ffc099e0: 48 00 16 11 bl ffc0aff0 <pthread_mutex_unlock>
return AIO_ALLDONE;
ffc099e4: 3b c0 00 02 li r30,2
ffc099e8: 4b ff ff 6c b ffc09954 <aio_cancel+0xa4>
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
if (r_chain == NULL) {
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc099ec: 7f e3 fb 78 mr r3,r31
ffc099f0: 48 00 16 01 bl ffc0aff0 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EINVAL);
ffc099f4: 3b c0 ff ff li r30,-1
ffc099f8: 48 00 d2 d1 bl ffc16cc8 <__errno>
ffc099fc: 38 00 00 16 li r0,22
ffc09a00: 90 03 00 00 stw r0,0(r3)
ffc09a04: 4b ff ff 50 b ffc09954 <aio_cancel+0xa4>
/* if aiocbp is NULL remove all request for given file descriptor */
if (aiocbp == NULL) {
AIO_printf ("Cancel all requests\n");
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
ffc09a08: 38 7f 00 48 addi r3,r31,72
ffc09a0c: 7f a4 eb 78 mr r4,r29
ffc09a10: 38 a0 00 00 li r5,0
ffc09a14: 48 00 02 c5 bl ffc09cd8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc09a18: 7c 7e 1b 79 mr. r30,r3
ffc09a1c: 41 82 00 38 beq- ffc09a54 <aio_cancel+0x1a4>
return AIO_ALLDONE;
}
AIO_printf ("Request chain on [WQ]\n");
pthread_mutex_lock (&r_chain->mutex);
ffc09a20: 3b be 00 1c addi r29,r30,28
ffc09a24: 7f a3 eb 78 mr r3,r29
ffc09a28: 48 00 14 fd bl ffc0af24 <pthread_mutex_lock>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc09a2c: 7f c3 f3 78 mr r3,r30
ffc09a30: 48 00 37 5d bl ffc0d18c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
ffc09a34: 7f c3 f3 78 mr r3,r30
ffc09a38: 48 00 07 95 bl ffc0a1cc <rtems_aio_remove_fd>
pthread_mutex_unlock (&r_chain->mutex);
ffc09a3c: 7f a3 eb 78 mr r3,r29
ffc09a40: 48 00 15 b1 bl ffc0aff0 <pthread_mutex_unlock>
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc09a44: 7f e3 fb 78 mr r3,r31
ffc09a48: 48 00 15 a9 bl ffc0aff0 <pthread_mutex_unlock>
return AIO_CANCELED;
ffc09a4c: 3b c0 00 00 li r30,0
ffc09a50: 4b ff ff 04 b ffc09954 <aio_cancel+0xa4>
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0);
if (r_chain == NULL) {
AIO_printf ("Request chain not on [WQ]\n");
if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) {
ffc09a54: 81 3f 00 54 lwz r9,84(r31)
ffc09a58: 38 1f 00 58 addi r0,r31,88
ffc09a5c: 7f 89 00 00 cmpw cr7,r9,r0
ffc09a60: 41 be ff 7c beq- cr7,ffc099dc <aio_cancel+0x12c> <== NEVER TAKEN
r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0);
ffc09a64: 38 7f 00 54 addi r3,r31,84
ffc09a68: 7f a4 eb 78 mr r4,r29
ffc09a6c: 38 a0 00 00 li r5,0
ffc09a70: 48 00 02 69 bl ffc09cd8 <rtems_aio_search_fd>
if (r_chain == NULL) {
ffc09a74: 7c 7e 1b 79 mr. r30,r3
ffc09a78: 41 a2 ff 64 beq- ffc099dc <aio_cancel+0x12c>
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
pthread_mutex_destroy (&r_chain->mutex);
ffc09a7c: 3b be 00 1c addi r29,r30,28
ffc09a80: 48 00 37 0d bl ffc0d18c <_Chain_Extract>
}
AIO_printf ("Request chain on [IQ]\n");
rtems_chain_extract (&r_chain->next_fd);
rtems_aio_remove_fd (r_chain);
ffc09a84: 7f c3 f3 78 mr r3,r30
ffc09a88: 48 00 07 45 bl ffc0a1cc <rtems_aio_remove_fd>
pthread_mutex_destroy (&r_chain->mutex);
ffc09a8c: 7f a3 eb 78 mr r3,r29
ffc09a90: 48 00 11 49 bl ffc0abd8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->mutex);
ffc09a94: 7f a3 eb 78 mr r3,r29
ffc09a98: 48 00 0c 89 bl ffc0a720 <pthread_cond_destroy>
free (r_chain);
ffc09a9c: 7f c3 f3 78 mr r3,r30
ffc09aa0: 4b ff bf 71 bl ffc05a10 <free>
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc09aa4: 7f e3 fb 78 mr r3,r31
ffc09aa8: 48 00 15 49 bl ffc0aff0 <pthread_mutex_unlock>
return AIO_CANCELED;
ffc09aac: 3b c0 00 00 li r30,0
ffc09ab0: 4b ff fe a4 b ffc09954 <aio_cancel+0xa4>
int result;
pthread_mutex_lock (&aio_request_queue.mutex);
if (fcntl (fildes, F_GETFD) < 0) {
pthread_mutex_unlock(&aio_request_queue.mutex);
ffc09ab4: 7f e3 fb 78 mr r3,r31
ffc09ab8: 48 00 15 39 bl ffc0aff0 <pthread_mutex_unlock>
rtems_set_errno_and_return_minus_one (EBADF);
ffc09abc: 3b c0 ff ff li r30,-1
ffc09ac0: 48 00 d2 09 bl ffc16cc8 <__errno>
ffc09ac4: 38 00 00 09 li r0,9
ffc09ac8: 90 03 00 00 stw r0,0(r3)
ffc09acc: 4b ff fe 88 b ffc09954 <aio_cancel+0xa4>
ffc09ad8 <aio_fsync>:
)
{
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
ffc09ad8: 2f 83 20 00 cmpwi cr7,r3,8192
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
ffc09adc: 94 21 ff f0 stwu r1,-16(r1)
ffc09ae0: 7c 08 02 a6 mflr r0
ffc09ae4: 93 c1 00 08 stw r30,8(r1)
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
ffc09ae8: 3b c0 00 16 li r30,22
int aio_fsync(
int op,
struct aiocb *aiocbp
)
{
ffc09aec: 93 e1 00 0c stw r31,12(r1)
ffc09af0: 7c 9f 23 78 mr r31,r4
ffc09af4: 90 01 00 14 stw r0,20(r1)
rtems_aio_request *req;
int mode;
if (op != O_SYNC)
ffc09af8: 40 9e 00 64 bne- cr7,ffc09b5c <aio_fsync+0x84>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc09afc: 80 64 00 00 lwz r3,0(r4)
ffc09b00: 38 80 00 03 li r4,3
ffc09b04: 4c c6 31 82 crclr 4*cr1+eq
ffc09b08: 48 00 8d 5d bl ffc12864 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc09b0c: 54 63 07 be clrlwi r3,r3,30
ffc09b10: 38 63 ff ff addi r3,r3,-1
ffc09b14: 2b 83 00 01 cmplwi cr7,r3,1
ffc09b18: 41 9d 00 40 bgt- cr7,ffc09b58 <aio_fsync+0x80>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
ffc09b1c: 38 60 00 18 li r3,24
ffc09b20: 4b ff c6 95 bl ffc061b4 <malloc>
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
ffc09b24: 3b c0 00 0b li r30,11
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
ffc09b28: 7c 69 1b 79 mr. r9,r3
ffc09b2c: 41 82 00 30 beq- ffc09b5c <aio_fsync+0x84> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
ffc09b30: 38 00 00 03 li r0,3
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
ffc09b34: 93 e9 00 14 stw r31,20(r9)
req->aiocbp->aio_lio_opcode = LIO_SYNC;
ffc09b38: 90 1f 00 30 stw r0,48(r31)
return rtems_aio_enqueue (req);
ffc09b3c: 48 00 07 ad bl ffc0a2e8 <rtems_aio_enqueue>
}
ffc09b40: 80 01 00 14 lwz r0,20(r1)
ffc09b44: 83 c1 00 08 lwz r30,8(r1)
ffc09b48: 7c 08 03 a6 mtlr r0
ffc09b4c: 83 e1 00 0c lwz r31,12(r1)
ffc09b50: 38 21 00 10 addi r1,r1,16
ffc09b54: 4e 80 00 20 blr
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
ffc09b58: 3b c0 00 09 li r30,9
ffc09b5c: 38 00 ff ff li r0,-1
ffc09b60: 93 df 00 34 stw r30,52(r31)
ffc09b64: 90 1f 00 38 stw r0,56(r31)
ffc09b68: 48 00 d1 61 bl ffc16cc8 <__errno>
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
ffc09b6c: 80 01 00 14 lwz r0,20(r1)
if (op != O_SYNC)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
ffc09b70: 93 c3 00 00 stw r30,0(r3)
ffc09b74: 38 60 ff ff li r3,-1
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_SYNC;
return rtems_aio_enqueue (req);
}
ffc09b78: 7c 08 03 a6 mtlr r0
ffc09b7c: 83 c1 00 08 lwz r30,8(r1)
ffc09b80: 83 e1 00 0c lwz r31,12(r1)
ffc09b84: 38 21 00 10 addi r1,r1,16
ffc09b88: 4e 80 00 20 blr
ffc0a518 <aio_read>:
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
ffc0a518: 94 21 ff f0 stwu r1,-16(r1)
ffc0a51c: 7c 08 02 a6 mflr r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0a520: 38 80 00 03 li r4,3
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
ffc0a524: 90 01 00 14 stw r0,20(r1)
ffc0a528: 93 e1 00 0c stw r31,12(r1)
ffc0a52c: 7c 7f 1b 78 mr r31,r3
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0a530: 80 63 00 00 lwz r3,0(r3)
* 0 - otherwise
*/
int
aio_read (struct aiocb *aiocbp)
{
ffc0a534: 93 c1 00 08 stw r30,8(r1)
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0a538: 4c c6 31 82 crclr 4*cr1+eq
ffc0a53c: 48 00 83 29 bl ffc12864 <fcntl>
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc0a540: 70 63 00 03 andi. r3,r3,3
ffc0a544: 41 82 00 10 beq- ffc0a554 <aio_read+0x3c> <== NEVER TAKEN
ffc0a548: 2f 83 00 02 cmpwi cr7,r3,2
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
ffc0a54c: 3b c0 00 09 li r30,9
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc0a550: 40 9e 00 5c bne- cr7,ffc0a5ac <aio_read+0x94>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
ffc0a554: 80 1f 00 18 lwz r0,24(r31)
ffc0a558: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a55c: 40 9e 00 4c bne- cr7,ffc0a5a8 <aio_read+0x90>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
ffc0a560: 80 1f 00 08 lwz r0,8(r31)
ffc0a564: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a568: 41 9c 00 40 blt- cr7,ffc0a5a8 <aio_read+0x90>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
ffc0a56c: 38 60 00 18 li r3,24
ffc0a570: 4b ff bc 45 bl ffc061b4 <malloc>
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
ffc0a574: 3b c0 00 0b li r30,11
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
ffc0a578: 7c 69 1b 79 mr. r9,r3
ffc0a57c: 41 82 00 30 beq- ffc0a5ac <aio_read+0x94> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_READ;
ffc0a580: 38 00 00 01 li r0,1
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
ffc0a584: 93 e9 00 14 stw r31,20(r9)
req->aiocbp->aio_lio_opcode = LIO_READ;
ffc0a588: 90 1f 00 30 stw r0,48(r31)
return rtems_aio_enqueue (req);
ffc0a58c: 4b ff fd 5d bl ffc0a2e8 <rtems_aio_enqueue>
}
ffc0a590: 80 01 00 14 lwz r0,20(r1)
ffc0a594: 83 c1 00 08 lwz r30,8(r1)
ffc0a598: 7c 08 03 a6 mtlr r0
ffc0a59c: 83 e1 00 0c lwz r31,12(r1)
ffc0a5a0: 38 21 00 10 addi r1,r1,16
ffc0a5a4: 4e 80 00 20 blr
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
ffc0a5a8: 3b c0 00 16 li r30,22
ffc0a5ac: 38 00 ff ff li r0,-1
ffc0a5b0: 93 df 00 34 stw r30,52(r31)
ffc0a5b4: 90 1f 00 38 stw r0,56(r31)
ffc0a5b8: 48 00 c7 11 bl ffc16cc8 <__errno>
ffc0a5bc: 93 c3 00 00 stw r30,0(r3)
ffc0a5c0: 38 60 ff ff li r3,-1
ffc0a5c4: 4b ff ff cc b ffc0a590 <aio_read+0x78>
ffc0a5d0 <aio_write>:
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
ffc0a5d0: 94 21 ff f0 stwu r1,-16(r1)
ffc0a5d4: 7c 08 02 a6 mflr r0
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0a5d8: 38 80 00 03 li r4,3
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
ffc0a5dc: 90 01 00 14 stw r0,20(r1)
ffc0a5e0: 93 e1 00 0c stw r31,12(r1)
ffc0a5e4: 7c 7f 1b 78 mr r31,r3
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0a5e8: 80 63 00 00 lwz r3,0(r3)
* 0 - otherwise
*/
int
aio_write (struct aiocb *aiocbp)
{
ffc0a5ec: 93 c1 00 08 stw r30,8(r1)
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
ffc0a5f0: 3b c0 00 09 li r30,9
aio_write (struct aiocb *aiocbp)
{
rtems_aio_request *req;
int mode;
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
ffc0a5f4: 4c c6 31 82 crclr 4*cr1+eq
ffc0a5f8: 48 00 82 6d bl ffc12864 <fcntl>
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
ffc0a5fc: 54 63 07 be clrlwi r3,r3,30
ffc0a600: 38 63 ff ff addi r3,r3,-1
ffc0a604: 2b 83 00 01 cmplwi cr7,r3,1
ffc0a608: 41 9d 00 5c bgt- cr7,ffc0a664 <aio_write+0x94>
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
ffc0a60c: 80 1f 00 18 lwz r0,24(r31)
ffc0a610: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a614: 40 9e 00 4c bne- cr7,ffc0a660 <aio_write+0x90>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
if (aiocbp->aio_offset < 0)
ffc0a618: 80 1f 00 08 lwz r0,8(r31)
ffc0a61c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a620: 41 9c 00 40 blt- cr7,ffc0a660 <aio_write+0x90>
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
ffc0a624: 38 60 00 18 li r3,24
ffc0a628: 4b ff bb 8d bl ffc061b4 <malloc>
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
ffc0a62c: 3b c0 00 0b li r30,11
if (aiocbp->aio_offset < 0)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
ffc0a630: 7c 69 1b 79 mr. r9,r3
ffc0a634: 41 82 00 30 beq- ffc0a664 <aio_write+0x94> <== NEVER TAKEN
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
req->aiocbp->aio_lio_opcode = LIO_WRITE;
ffc0a638: 38 00 00 02 li r0,2
req = malloc (sizeof (rtems_aio_request));
if (req == NULL)
rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp);
req->aiocbp = aiocbp;
ffc0a63c: 93 e9 00 14 stw r31,20(r9)
req->aiocbp->aio_lio_opcode = LIO_WRITE;
ffc0a640: 90 1f 00 30 stw r0,48(r31)
return rtems_aio_enqueue (req);
ffc0a644: 4b ff fc a5 bl ffc0a2e8 <rtems_aio_enqueue>
}
ffc0a648: 80 01 00 14 lwz r0,20(r1)
ffc0a64c: 83 c1 00 08 lwz r30,8(r1)
ffc0a650: 7c 08 03 a6 mtlr r0
ffc0a654: 83 e1 00 0c lwz r31,12(r1)
ffc0a658: 38 21 00 10 addi r1,r1,16
ffc0a65c: 4e 80 00 20 blr
mode = fcntl (aiocbp->aio_fildes, F_GETFL);
if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR)))
rtems_aio_set_errno_return_minus_one (EBADF, aiocbp);
if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX)
rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp);
ffc0a660: 3b c0 00 16 li r30,22
ffc0a664: 38 00 ff ff li r0,-1
ffc0a668: 93 df 00 34 stw r30,52(r31)
ffc0a66c: 90 1f 00 38 stw r0,56(r31)
ffc0a670: 48 00 c6 59 bl ffc16cc8 <__errno>
ffc0a674: 93 c3 00 00 stw r30,0(r3)
ffc0a678: 38 60 ff ff li r3,-1
ffc0a67c: 4b ff ff cc b ffc0a648 <aio_write+0x78>
ffc08be8 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
if ( !tp )
ffc08be8: 2c 04 00 00 cmpwi r4,0
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
ffc08bec: 94 21 ff f8 stwu r1,-8(r1)
ffc08bf0: 7c 08 02 a6 mflr r0
ffc08bf4: 90 01 00 0c stw r0,12(r1)
if ( !tp )
ffc08bf8: 41 82 00 24 beq- ffc08c1c <clock_gettime+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
ffc08bfc: 2f 83 00 01 cmpwi cr7,r3,1
ffc08c00: 41 9e 00 78 beq- cr7,ffc08c78 <clock_gettime+0x90>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
ffc08c04: 2f 83 00 04 cmpwi cr7,r3,4
ffc08c08: 41 9e 00 54 beq- cr7,ffc08c5c <clock_gettime+0x74> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
ffc08c0c: 2f 83 00 02 cmpwi cr7,r3,2
ffc08c10: 41 9e 00 4c beq- cr7,ffc08c5c <clock_gettime+0x74>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
ffc08c14: 2f 83 00 03 cmpwi cr7,r3,3
ffc08c18: 41 9e 00 24 beq- cr7,ffc08c3c <clock_gettime+0x54>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08c1c: 48 00 c0 95 bl ffc14cb0 <__errno>
ffc08c20: 38 00 00 16 li r0,22
ffc08c24: 90 03 00 00 stw r0,0(r3)
ffc08c28: 38 60 ff ff li r3,-1
return 0;
}
ffc08c2c: 80 01 00 0c lwz r0,12(r1)
ffc08c30: 38 21 00 08 addi r1,r1,8
ffc08c34: 7c 08 03 a6 mtlr r0
ffc08c38: 4e 80 00 20 blr
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
ffc08c3c: 48 00 c0 75 bl ffc14cb0 <__errno>
ffc08c40: 38 00 00 58 li r0,88
ffc08c44: 90 03 00 00 stw r0,0(r3)
ffc08c48: 38 60 ff ff li r3,-1
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
ffc08c4c: 80 01 00 0c lwz r0,12(r1)
ffc08c50: 38 21 00 08 addi r1,r1,8
ffc08c54: 7c 08 03 a6 mtlr r0
ffc08c58: 4e 80 00 20 blr
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
ffc08c5c: 7c 83 23 78 mr r3,r4
ffc08c60: 48 00 29 45 bl ffc0b5a4 <_TOD_Get_uptime_as_timespec>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
ffc08c64: 80 01 00 0c lwz r0,12(r1)
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
return 0;
ffc08c68: 38 60 00 00 li r3,0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
ffc08c6c: 7c 08 03 a6 mtlr r0
ffc08c70: 38 21 00 08 addi r1,r1,8
ffc08c74: 4e 80 00 20 blr
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
ffc08c78: 7c 83 23 78 mr r3,r4
ffc08c7c: 48 00 28 91 bl ffc0b50c <_TOD_Get>
return 0;
ffc08c80: 38 60 00 00 li r3,0
ffc08c84: 4b ff ff a8 b ffc08c2c <clock_gettime+0x44>
ffc08c88 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
if ( !tp )
ffc08c88: 2c 04 00 00 cmpwi r4,0
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
ffc08c8c: 94 21 ff f8 stwu r1,-8(r1)
ffc08c90: 7c 08 02 a6 mflr r0
ffc08c94: 90 01 00 0c stw r0,12(r1)
if ( !tp )
ffc08c98: 41 82 00 1c beq- ffc08cb4 <clock_settime+0x2c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
ffc08c9c: 2f 83 00 01 cmpwi cr7,r3,1
ffc08ca0: 41 9e 00 34 beq- cr7,ffc08cd4 <clock_settime+0x4c>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
ffc08ca4: 2f 83 00 02 cmpwi cr7,r3,2
ffc08ca8: 41 9e 00 74 beq- cr7,ffc08d1c <clock_settime+0x94>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
ffc08cac: 2f 83 00 03 cmpwi cr7,r3,3
ffc08cb0: 41 9e 00 6c beq- cr7,ffc08d1c <clock_settime+0x94>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08cb4: 48 00 bf fd bl ffc14cb0 <__errno>
ffc08cb8: 38 00 00 16 li r0,22
ffc08cbc: 90 03 00 00 stw r0,0(r3)
ffc08cc0: 38 60 ff ff li r3,-1
return 0;
}
ffc08cc4: 80 01 00 0c lwz r0,12(r1)
ffc08cc8: 38 21 00 08 addi r1,r1,8
ffc08ccc: 7c 08 03 a6 mtlr r0
ffc08cd0: 4e 80 00 20 blr
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
ffc08cd4: 81 24 00 00 lwz r9,0(r4)
ffc08cd8: 3c 00 21 da lis r0,8666
ffc08cdc: 60 00 e4 ff ori r0,r0,58623
ffc08ce0: 7f 89 00 40 cmplw cr7,r9,r0
ffc08ce4: 40 bd ff d0 ble- cr7,ffc08cb4 <clock_settime+0x2c>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc08ce8: 3d 20 00 00 lis r9,0
ffc08cec: 81 69 28 78 lwz r11,10360(r9)
ffc08cf0: 38 0b 00 01 addi r0,r11,1
ffc08cf4: 90 09 28 78 stw r0,10360(r9)
return _Thread_Dispatch_disable_level;
ffc08cf8: 80 09 28 78 lwz r0,10360(r9)
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
ffc08cfc: 7c 83 23 78 mr r3,r4
ffc08d00: 48 00 29 1d bl ffc0b61c <_TOD_Set>
_Thread_Enable_dispatch();
ffc08d04: 48 00 46 49 bl ffc0d34c <_Thread_Enable_dispatch>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
ffc08d08: 80 01 00 0c lwz r0,12(r1)
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
ffc08d0c: 38 60 00 00 li r3,0
}
ffc08d10: 7c 08 03 a6 mtlr r0
ffc08d14: 38 21 00 08 addi r1,r1,8
ffc08d18: 4e 80 00 20 blr
else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
ffc08d1c: 48 00 bf 95 bl ffc14cb0 <__errno>
ffc08d20: 38 00 00 58 li r0,88
ffc08d24: 90 03 00 00 stw r0,0(r3)
ffc08d28: 38 60 ff ff li r3,-1
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
ffc08d2c: 80 01 00 0c lwz r0,12(r1)
ffc08d30: 38 21 00 08 addi r1,r1,8
ffc08d34: 7c 08 03 a6 mtlr r0
ffc08d38: 4e 80 00 20 blr
ffc1ef60 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
ffc1ef60: 94 21 ff d0 stwu r1,-48(r1)
ffc1ef64: 7c 08 02 a6 mflr r0
ffc1ef68: 93 61 00 1c stw r27,28(r1)
ffc1ef6c: 7c bb 2b 78 mr r27,r5
ffc1ef70: 93 81 00 20 stw r28,32(r1)
ffc1ef74: 7c 9c 23 78 mr r28,r4
ffc1ef78: 93 e1 00 2c stw r31,44(r1)
ffc1ef7c: 7c 7f 1b 78 mr r31,r3
ffc1ef80: 90 01 00 34 stw r0,52(r1)
ffc1ef84: 93 41 00 18 stw r26,24(r1)
ffc1ef88: 93 a1 00 24 stw r29,36(r1)
ffc1ef8c: 93 c1 00 28 stw r30,40(r1)
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
ffc1ef90: 4b ff fa 2d bl ffc1e9bc <getpid>
ffc1ef94: 7f 83 f8 00 cmpw cr7,r3,r31
ffc1ef98: 40 9e 02 98 bne- cr7,ffc1f230 <killinfo+0x2d0>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
ffc1ef9c: 2f 9c 00 00 cmpwi cr7,r28,0
ffc1efa0: 41 9e 02 a4 beq- cr7,ffc1f244 <killinfo+0x2e4>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc1efa4: 3b fc ff ff addi r31,r28,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
ffc1efa8: 2b 9f 00 1f cmplwi cr7,r31,31
ffc1efac: 41 9d 02 98 bgt- cr7,ffc1f244 <killinfo+0x2e4>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
ffc1efb0: 1f dc 00 0c mulli r30,r28,12
ffc1efb4: 3f a0 00 00 lis r29,0
ffc1efb8: 3b bd 31 c0 addi r29,r29,12736
ffc1efbc: 7d 3d f2 14 add r9,r29,r30
ffc1efc0: 80 09 00 08 lwz r0,8(r9)
return 0;
ffc1efc4: 38 60 00 00 li r3,0
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
ffc1efc8: 2f 80 00 01 cmpwi cr7,r0,1
ffc1efcc: 41 9e 01 a8 beq- cr7,ffc1f174 <killinfo+0x214>
/*
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
ffc1efd0: 2f 9c 00 08 cmpwi cr7,r28,8
ffc1efd4: 41 9e 01 c8 beq- cr7,ffc1f19c <killinfo+0x23c>
ffc1efd8: 2f 9c 00 04 cmpwi cr7,r28,4
ffc1efdc: 41 9e 01 c0 beq- cr7,ffc1f19c <killinfo+0x23c>
ffc1efe0: 2f 9c 00 0b cmpwi cr7,r28,11
ffc1efe4: 41 9e 01 b8 beq- cr7,ffc1f19c <killinfo+0x23c>
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
ffc1efe8: 2f 9b 00 00 cmpwi cr7,r27,0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
ffc1efec: 93 81 00 08 stw r28,8(r1)
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
ffc1eff0: 38 00 00 01 li r0,1
ffc1eff4: 7c 1f f8 30 slw r31,r0,r31
siginfo->si_code = SI_USER;
ffc1eff8: 90 01 00 0c stw r0,12(r1)
if ( !value ) {
ffc1effc: 41 9e 02 18 beq- cr7,ffc1f214 <killinfo+0x2b4>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
ffc1f000: 80 1b 00 00 lwz r0,0(r27)
ffc1f004: 90 01 00 10 stw r0,16(r1)
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc1f008: 3d 20 00 00 lis r9,0
ffc1f00c: 81 69 28 0c lwz r11,10252(r9)
ffc1f010: 38 0b 00 01 addi r0,r11,1
ffc1f014: 90 09 28 0c stw r0,10252(r9)
return _Thread_Dispatch_disable_level;
ffc1f018: 80 09 28 0c lwz r0,10252(r9)
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
ffc1f01c: 3d 20 00 00 lis r9,0
ffc1f020: 80 69 31 50 lwz r3,12624(r9)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
ffc1f024: 81 23 01 34 lwz r9,308(r3)
ffc1f028: 80 09 00 d0 lwz r0,208(r9)
ffc1f02c: 7f e6 00 79 andc. r6,r31,r0
ffc1f030: 40 82 01 14 bne- ffc1f144 <killinfo+0x1e4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc1f034: 3d 20 00 00 lis r9,0
ffc1f038: 39 69 33 4c addi r11,r9,13132
ffc1f03c: 80 69 33 4c lwz r3,13132(r9)
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
ffc1f040: 39 6b 00 04 addi r11,r11,4
ffc1f044: 7f 83 58 00 cmpw cr7,r3,r11
ffc1f048: 41 9e 00 4c beq- cr7,ffc1f094 <killinfo+0x134>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc1f04c: 80 03 00 30 lwz r0,48(r3)
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1f050: 81 23 01 34 lwz r9,308(r3)
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc1f054: 7f ea 00 39 and. r10,r31,r0
ffc1f058: 40 82 00 ec bne- ffc1f144 <killinfo+0x1e4>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
ffc1f05c: 80 09 00 d0 lwz r0,208(r9)
ffc1f060: 7f fa 00 79 andc. r26,r31,r0
ffc1f064: 41 a2 00 24 beq+ ffc1f088 <killinfo+0x128>
ffc1f068: 48 00 00 dc b ffc1f144 <killinfo+0x1e4>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc1f06c: 80 03 00 30 lwz r0,48(r3) <== NOT EXECUTED
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1f070: 81 23 01 34 lwz r9,308(r3) <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc1f074: 7f fb 00 39 and. r27,r31,r0 <== NOT EXECUTED
ffc1f078: 40 82 00 cc bne- ffc1f144 <killinfo+0x1e4> <== NOT EXECUTED
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
ffc1f07c: 80 09 00 d0 lwz r0,208(r9) <== NOT EXECUTED
ffc1f080: 7f e6 00 79 andc. r6,r31,r0 <== NOT EXECUTED
ffc1f084: 40 82 00 c0 bne- ffc1f144 <killinfo+0x1e4> <== NOT EXECUTED
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
ffc1f088: 80 63 00 00 lwz r3,0(r3)
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = _Chain_First( the_chain );
ffc1f08c: 7f 83 58 00 cmpw cr7,r3,r11
ffc1f090: 40 9e ff dc bne+ cr7,ffc1f06c <killinfo+0x10c> <== NEVER TAKEN
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
ffc1f094: 3d 20 00 00 lis r9,0
ffc1f098: 88 e9 27 24 lbz r7,10020(r9)
ffc1f09c: 3c a0 00 00 lis r5,0
ffc1f0a0: 38 a5 2c 64 addi r5,r5,11364
ffc1f0a4: 38 e7 00 01 addi r7,r7,1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
ffc1f0a8: 38 85 00 08 addi r4,r5,8
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
ffc1f0ac: 38 60 00 00 li r3,0
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
ffc1f0b0: 85 25 00 04 lwzu r9,4(r5)
ffc1f0b4: 2f 89 00 00 cmpwi cr7,r9,0
ffc1f0b8: 41 9e 00 7c beq- cr7,ffc1f134 <killinfo+0x1d4> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
ffc1f0bc: 81 29 00 04 lwz r9,4(r9)
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
ffc1f0c0: a1 09 00 10 lhz r8,16(r9)
object_table = the_info->local_table;
ffc1f0c4: 81 49 00 1c lwz r10,28(r9)
for ( index = 1 ; index <= maximum ; index++ ) {
ffc1f0c8: 2f 88 00 00 cmpwi cr7,r8,0
ffc1f0cc: 41 9e 00 68 beq- cr7,ffc1f134 <killinfo+0x1d4>
ffc1f0d0: 39 60 00 01 li r11,1
the_thread = (Thread_Control *) object_table[ index ];
ffc1f0d4: 85 2a 00 04 lwzu r9,4(r10)
if ( !the_thread )
ffc1f0d8: 2f 89 00 00 cmpwi cr7,r9,0
ffc1f0dc: 41 9e 00 4c beq- cr7,ffc1f128 <killinfo+0x1c8>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
ffc1f0e0: 80 09 00 14 lwz r0,20(r9)
ffc1f0e4: 7f 80 38 40 cmplw cr7,r0,r7
ffc1f0e8: 41 9d 00 40 bgt- cr7,ffc1f128 <killinfo+0x1c8>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
ffc1f0ec: 80 c9 01 34 lwz r6,308(r9)
ffc1f0f0: 80 c6 00 d0 lwz r6,208(r6)
ffc1f0f4: 7f fa 30 79 andc. r26,r31,r6
ffc1f0f8: 41 82 00 30 beq- ffc1f128 <killinfo+0x1c8>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
ffc1f0fc: 41 9c 00 24 blt- cr7,ffc1f120 <killinfo+0x1c0>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( interested && !_States_Is_ready( interested->current_state ) ) {
ffc1f100: 2f 83 00 00 cmpwi cr7,r3,0
ffc1f104: 41 9e 00 24 beq- cr7,ffc1f128 <killinfo+0x1c8> <== NEVER TAKEN
ffc1f108: 80 c3 00 10 lwz r6,16(r3)
ffc1f10c: 2f 86 00 00 cmpwi cr7,r6,0
ffc1f110: 41 9e 00 18 beq- cr7,ffc1f128 <killinfo+0x1c8> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
ffc1f114: 83 69 00 10 lwz r27,16(r9)
ffc1f118: 2f 9b 00 00 cmpwi cr7,r27,0
ffc1f11c: 40 9e 01 00 bne- cr7,ffc1f21c <killinfo+0x2bc>
ffc1f120: 7c 07 03 78 mr r7,r0
ffc1f124: 7d 23 4b 78 mr r3,r9
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
ffc1f128: 39 6b 00 01 addi r11,r11,1
ffc1f12c: 7f 88 58 40 cmplw cr7,r8,r11
ffc1f130: 40 9c ff a4 bge+ cr7,ffc1f0d4 <killinfo+0x174>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
ffc1f134: 7f 85 20 00 cmpw cr7,r5,r4
ffc1f138: 40 be ff 78 bne- cr7,ffc1f0b0 <killinfo+0x150>
}
}
}
}
if ( interested ) {
ffc1f13c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1f140: 41 9e 00 18 beq- cr7,ffc1f158 <killinfo+0x1f8>
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
ffc1f144: 7f 84 e3 78 mr r4,r28
ffc1f148: 38 a1 00 08 addi r5,r1,8
ffc1f14c: 48 00 01 4d bl ffc1f298 <_POSIX_signals_Unblock_thread>
ffc1f150: 2f 83 00 00 cmpwi cr7,r3,0
ffc1f154: 40 9e 00 18 bne- cr7,ffc1f16c <killinfo+0x20c>
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
ffc1f158: 7f e3 fb 78 mr r3,r31
ffc1f15c: 48 00 01 15 bl ffc1f270 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
ffc1f160: 7c 1d f0 2e lwzx r0,r29,r30
ffc1f164: 2f 80 00 02 cmpwi cr7,r0,2
ffc1f168: 41 9e 00 68 beq- cr7,ffc1f1d0 <killinfo+0x270>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
ffc1f16c: 4b fe d3 7d bl ffc0c4e8 <_Thread_Enable_dispatch>
return 0;
ffc1f170: 38 60 00 00 li r3,0
}
ffc1f174: 80 01 00 34 lwz r0,52(r1)
ffc1f178: 83 41 00 18 lwz r26,24(r1)
ffc1f17c: 7c 08 03 a6 mtlr r0
ffc1f180: 83 61 00 1c lwz r27,28(r1)
ffc1f184: 83 81 00 20 lwz r28,32(r1)
ffc1f188: 83 a1 00 24 lwz r29,36(r1)
ffc1f18c: 83 c1 00 28 lwz r30,40(r1)
ffc1f190: 83 e1 00 2c lwz r31,44(r1)
ffc1f194: 38 21 00 30 addi r1,r1,48
ffc1f198: 4e 80 00 20 blr
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
ffc1f19c: 48 00 03 69 bl ffc1f504 <pthread_self>
ffc1f1a0: 7f 84 e3 78 mr r4,r28
ffc1f1a4: 48 00 02 61 bl ffc1f404 <pthread_kill>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
ffc1f1a8: 80 01 00 34 lwz r0,52(r1)
ffc1f1ac: 83 41 00 18 lwz r26,24(r1)
ffc1f1b0: 7c 08 03 a6 mtlr r0
ffc1f1b4: 83 61 00 1c lwz r27,28(r1)
ffc1f1b8: 83 81 00 20 lwz r28,32(r1)
ffc1f1bc: 83 a1 00 24 lwz r29,36(r1)
ffc1f1c0: 83 c1 00 28 lwz r30,40(r1)
ffc1f1c4: 83 e1 00 2c lwz r31,44(r1)
ffc1f1c8: 38 21 00 30 addi r1,r1,48
ffc1f1cc: 4e 80 00 20 blr
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
ffc1f1d0: 3c 60 00 00 lis r3,0
ffc1f1d4: 38 63 33 40 addi r3,r3,13120
ffc1f1d8: 4b fe b0 6d bl ffc0a244 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
ffc1f1dc: 7c 69 1b 79 mr. r9,r3
ffc1f1e0: 41 82 00 78 beq- ffc1f258 <killinfo+0x2f8>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ffc1f1e4: 80 01 00 08 lwz r0,8(r1)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc1f1e8: 3c 60 00 00 lis r3,0
ffc1f1ec: 38 63 33 b4 addi r3,r3,13236
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ffc1f1f0: 90 09 00 08 stw r0,8(r9)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc1f1f4: 7c 63 f2 14 add r3,r3,r30
ffc1f1f8: 7d 24 4b 78 mr r4,r9
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ffc1f1fc: 80 01 00 0c lwz r0,12(r1)
ffc1f200: 90 09 00 0c stw r0,12(r9)
ffc1f204: 80 01 00 10 lwz r0,16(r1)
ffc1f208: 90 09 00 10 stw r0,16(r9)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc1f20c: 4b fe af e1 bl ffc0a1ec <_Chain_Append>
ffc1f210: 4b ff ff 5c b ffc1f16c <killinfo+0x20c>
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
ffc1f214: 93 61 00 10 stw r27,16(r1)
ffc1f218: 4b ff fd f0 b ffc1f008 <killinfo+0xa8>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
ffc1f21c: 74 da 10 00 andis. r26,r6,4096
ffc1f220: 40 a2 ff 08 bne- ffc1f128 <killinfo+0x1c8>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
ffc1f224: 77 66 10 00 andis. r6,r27,4096
ffc1f228: 41 a2 ff 00 beq- ffc1f128 <killinfo+0x1c8>
ffc1f22c: 4b ff fe f4 b ffc1f120 <killinfo+0x1c0>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
ffc1f230: 4b ff 4b 5d bl ffc13d8c <__errno>
ffc1f234: 38 00 00 03 li r0,3
ffc1f238: 90 03 00 00 stw r0,0(r3)
ffc1f23c: 38 60 ff ff li r3,-1
ffc1f240: 4b ff ff 34 b ffc1f174 <killinfo+0x214>
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc1f244: 4b ff 4b 49 bl ffc13d8c <__errno>
ffc1f248: 38 00 00 16 li r0,22
ffc1f24c: 90 03 00 00 stw r0,0(r3)
ffc1f250: 38 60 ff ff li r3,-1
ffc1f254: 4b ff ff 20 b ffc1f174 <killinfo+0x214>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
ffc1f258: 4b fe d2 91 bl ffc0c4e8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
ffc1f25c: 4b ff 4b 31 bl ffc13d8c <__errno>
ffc1f260: 38 00 00 0b li r0,11
ffc1f264: 90 03 00 00 stw r0,0(r3)
ffc1f268: 38 60 ff ff li r3,-1
ffc1f26c: 4b ff ff 08 b ffc1f174 <killinfo+0x214>
ffc0ecd0 <mq_open>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0ecd0: 3d 20 00 00 lis r9,0
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
ffc0ecd4: 94 21 ff b0 stwu r1,-80(r1)
ffc0ecd8: 7c 08 02 a6 mflr r0
ffc0ecdc: 81 69 2a 70 lwz r11,10864(r9)
ffc0ece0: 7d 80 00 26 mfcr r12
ffc0ece4: 90 01 00 54 stw r0,84(r1)
ffc0ece8: 39 6b 00 01 addi r11,r11,1
ffc0ecec: 91 69 2a 70 stw r11,10864(r9)
ffc0ecf0: 93 81 00 40 stw r28,64(r1)
ffc0ecf4: 7c 7c 1b 78 mr r28,r3
ffc0ecf8: 93 c1 00 48 stw r30,72(r1)
ffc0ecfc: 7c 9e 23 78 mr r30,r4
ffc0ed00: 93 41 00 38 stw r26,56(r1)
ffc0ed04: 93 61 00 3c stw r27,60(r1)
ffc0ed08: 93 a1 00 44 stw r29,68(r1)
ffc0ed0c: 93 e1 00 4c stw r31,76(r1)
ffc0ed10: 91 81 00 34 stw r12,52(r1)
ffc0ed14: 90 a1 00 28 stw r5,40(r1)
ffc0ed18: 90 c1 00 2c stw r6,44(r1)
return _Thread_Dispatch_disable_level;
ffc0ed1c: 80 09 2a 70 lwz r0,10864(r9)
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
ffc0ed20: 54 80 bf fe rlwinm r0,r4,23,31,31
ffc0ed24: 2e 00 00 00 cmpwi cr4,r0,0
/* struct mq_attr attr */
)
{
va_list arg;
mode_t mode;
struct mq_attr *attr = NULL;
ffc0ed28: 3b 40 00 00 li r26,0
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
ffc0ed2c: 40 92 01 0c bne- cr4,ffc0ee38 <mq_open+0x168>
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
ffc0ed30: 3f a0 00 00 lis r29,0
ffc0ed34: 3b bd 36 18 addi r29,r29,13848
ffc0ed38: 7f a3 eb 78 mr r3,r29
ffc0ed3c: 48 00 3e 29 bl ffc12b64 <_Objects_Allocate>
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
ffc0ed40: 7c 7f 1b 79 mr. r31,r3
ffc0ed44: 41 82 01 28 beq- ffc0ee6c <mq_open+0x19c> <== NEVER TAKEN
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
ffc0ed48: 93 df 00 14 stw r30,20(r31)
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
ffc0ed4c: 7f 83 e3 78 mr r3,r28
ffc0ed50: 38 81 00 10 addi r4,r1,16
ffc0ed54: 48 00 92 49 bl ffc17f9c <_POSIX_Message_queue_Name_to_id>
* If the name to id translation worked, then the message queue exists
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "message queue does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
ffc0ed58: 7c 7b 1b 79 mr. r27,r3
ffc0ed5c: 40 82 00 88 bne- ffc0ede4 <mq_open+0x114>
} else { /* name -> ID translation succeeded */
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
ffc0ed60: 73 de 0a 00 andi. r30,r30,2560
ffc0ed64: 2f 9e 0a 00 cmpwi cr7,r30,2560
ffc0ed68: 41 9e 01 48 beq- cr7,ffc0eeb0 <mq_open+0x1e0>
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
ffc0ed6c: 80 81 00 10 lwz r4,16(r1)
ffc0ed70: 3c 60 00 00 lis r3,0
ffc0ed74: 38 a1 00 08 addi r5,r1,8
ffc0ed78: 38 63 34 8c addi r3,r3,13452
ffc0ed7c: 48 00 43 d9 bl ffc13154 <_Objects_Get>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
ffc0ed80: a0 1f 00 0a lhz r0,10(r31)
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
the_mq->open_count += 1;
ffc0ed84: 81 63 00 18 lwz r11,24(r3)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0ed88: 81 3d 00 1c lwz r9,28(r29)
ffc0ed8c: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0ed90: 39 6b 00 01 addi r11,r11,1
/*
* In this case we need to do an ID->pointer conversion to
* check the mode.
*/
the_mq = _POSIX_Message_queue_Get( the_mq_id, &location );
ffc0ed94: 90 61 00 0c stw r3,12(r1)
the_mq->open_count += 1;
ffc0ed98: 91 63 00 18 stw r11,24(r3)
the_mq_fd->Queue = the_mq;
ffc0ed9c: 90 7f 00 10 stw r3,16(r31)
ffc0eda0: 7f e9 01 2e stwx r31,r9,r0
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
ffc0eda4: 93 7f 00 0c stw r27,12(r31)
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
ffc0eda8: 48 00 55 4d bl ffc142f4 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
ffc0edac: 48 00 55 49 bl ffc142f4 <_Thread_Enable_dispatch>
return (mqd_t)the_mq_fd->Object.id;
ffc0edb0: 80 7f 00 08 lwz r3,8(r31)
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
ffc0edb4: 80 01 00 54 lwz r0,84(r1)
ffc0edb8: 81 81 00 34 lwz r12,52(r1)
ffc0edbc: 7c 08 03 a6 mtlr r0
ffc0edc0: 83 41 00 38 lwz r26,56(r1)
ffc0edc4: 83 61 00 3c lwz r27,60(r1)
ffc0edc8: 7d 80 81 20 mtcrf 8,r12
ffc0edcc: 83 81 00 40 lwz r28,64(r1)
ffc0edd0: 83 a1 00 44 lwz r29,68(r1)
ffc0edd4: 83 c1 00 48 lwz r30,72(r1)
ffc0edd8: 83 e1 00 4c lwz r31,76(r1)
ffc0eddc: 38 21 00 50 addi r1,r1,80
ffc0ede0: 4e 80 00 20 blr
if ( status ) {
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
ffc0ede4: 2f 9b 00 02 cmpwi cr7,r27,2
ffc0ede8: 41 9e 01 18 beq- cr7,ffc0ef00 <mq_open+0x230>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
ffc0edec: 7f a3 eb 78 mr r3,r29
ffc0edf0: 7f e4 fb 78 mr r4,r31
ffc0edf4: 48 00 41 6d bl ffc12f60 <_Objects_Free>
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
ffc0edf8: 48 00 54 fd bl ffc142f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
ffc0edfc: 48 00 d6 31 bl ffc1c42c <__errno>
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
ffc0ee00: 80 01 00 54 lwz r0,84(r1)
ffc0ee04: 81 81 00 34 lwz r12,52(r1)
ffc0ee08: 7c 08 03 a6 mtlr r0
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
ffc0ee0c: 93 63 00 00 stw r27,0(r3)
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
ffc0ee10: 7d 80 81 20 mtcrf 8,r12
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
ffc0ee14: 38 60 ff ff li r3,-1
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
ffc0ee18: 83 41 00 38 lwz r26,56(r1)
ffc0ee1c: 83 61 00 3c lwz r27,60(r1)
ffc0ee20: 83 81 00 40 lwz r28,64(r1)
ffc0ee24: 83 a1 00 44 lwz r29,68(r1)
ffc0ee28: 83 c1 00 48 lwz r30,72(r1)
ffc0ee2c: 83 e1 00 4c lwz r31,76(r1)
ffc0ee30: 38 21 00 50 addi r1,r1,80
ffc0ee34: 4e 80 00 20 blr
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
ffc0ee38: 38 01 00 58 addi r0,r1,88
mode = (mode_t) va_arg( arg, unsigned int );
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
ffc0ee3c: 83 41 00 2c lwz r26,44(r1)
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
ffc0ee40: 3f a0 00 00 lis r29,0
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
ffc0ee44: 90 01 00 18 stw r0,24(r1)
ffc0ee48: 3b bd 36 18 addi r29,r29,13848
ffc0ee4c: 38 01 00 20 addi r0,r1,32
ffc0ee50: 90 01 00 1c stw r0,28(r1)
ffc0ee54: 7f a3 eb 78 mr r3,r29
mode = (mode_t) va_arg( arg, unsigned int );
attr = (struct mq_attr *) va_arg( arg, struct mq_attr * );
ffc0ee58: 38 00 00 04 li r0,4
ffc0ee5c: 98 01 00 14 stb r0,20(r1)
ffc0ee60: 48 00 3d 05 bl ffc12b64 <_Objects_Allocate>
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
ffc0ee64: 7c 7f 1b 79 mr. r31,r3
ffc0ee68: 40 82 fe e0 bne+ ffc0ed48 <mq_open+0x78>
_Thread_Enable_dispatch();
ffc0ee6c: 48 00 54 89 bl ffc142f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENFILE );
ffc0ee70: 48 00 d5 bd bl ffc1c42c <__errno>
ffc0ee74: 38 00 00 17 li r0,23
ffc0ee78: 90 03 00 00 stw r0,0(r3)
ffc0ee7c: 38 60 ff ff li r3,-1
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
ffc0ee80: 80 01 00 54 lwz r0,84(r1)
ffc0ee84: 81 81 00 34 lwz r12,52(r1)
ffc0ee88: 7c 08 03 a6 mtlr r0
ffc0ee8c: 83 41 00 38 lwz r26,56(r1)
ffc0ee90: 83 61 00 3c lwz r27,60(r1)
ffc0ee94: 7d 80 81 20 mtcrf 8,r12
ffc0ee98: 83 81 00 40 lwz r28,64(r1)
ffc0ee9c: 83 a1 00 44 lwz r29,68(r1)
ffc0eea0: 83 c1 00 48 lwz r30,72(r1)
ffc0eea4: 83 e1 00 4c lwz r31,76(r1)
ffc0eea8: 38 21 00 50 addi r1,r1,80
ffc0eeac: 4e 80 00 20 blr
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
ffc0eeb0: 7f a3 eb 78 mr r3,r29
ffc0eeb4: 7f e4 fb 78 mr r4,r31
ffc0eeb8: 48 00 40 a9 bl ffc12f60 <_Objects_Free>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
ffc0eebc: 48 00 54 39 bl ffc142f4 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
ffc0eec0: 48 00 d5 6d bl ffc1c42c <__errno>
ffc0eec4: 38 00 00 11 li r0,17
ffc0eec8: 90 03 00 00 stw r0,0(r3)
ffc0eecc: 38 60 ff ff li r3,-1
);
_Thread_Enable_dispatch();
return (mqd_t) the_mq_fd->Object.id;
}
ffc0eed0: 80 01 00 54 lwz r0,84(r1)
ffc0eed4: 81 81 00 34 lwz r12,52(r1)
ffc0eed8: 7c 08 03 a6 mtlr r0
ffc0eedc: 83 41 00 38 lwz r26,56(r1)
ffc0eee0: 83 61 00 3c lwz r27,60(r1)
ffc0eee4: 7d 80 81 20 mtcrf 8,r12
ffc0eee8: 83 81 00 40 lwz r28,64(r1)
ffc0eeec: 83 a1 00 44 lwz r29,68(r1)
ffc0eef0: 83 c1 00 48 lwz r30,72(r1)
ffc0eef4: 83 e1 00 4c lwz r31,76(r1)
ffc0eef8: 38 21 00 50 addi r1,r1,80
ffc0eefc: 4e 80 00 20 blr
if ( status ) {
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
ffc0ef00: 41 92 fe ec beq+ cr4,ffc0edec <mq_open+0x11c>
/*
* At this point, the message queue does not exist and everything has been
* checked. We should go ahead and create a message queue.
*/
status = _POSIX_Message_queue_Create_support(
ffc0ef04: 7f 83 e3 78 mr r3,r28
ffc0ef08: 38 80 00 01 li r4,1
ffc0ef0c: 7f 45 d3 78 mr r5,r26
ffc0ef10: 38 c1 00 0c addi r6,r1,12
ffc0ef14: 48 00 8e bd bl ffc17dd0 <_POSIX_Message_queue_Create_support>
);
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
ffc0ef18: 2f 83 ff ff cmpwi cr7,r3,-1
ffc0ef1c: 41 9e 00 30 beq- cr7,ffc0ef4c <mq_open+0x27c>
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
_Objects_Set_local_object(
ffc0ef20: a0 1f 00 0a lhz r0,10(r31)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0ef24: 81 3d 00 1c lwz r9,28(r29)
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
ffc0ef28: 81 61 00 0c lwz r11,12(r1)
ffc0ef2c: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0ef30: 91 7f 00 10 stw r11,16(r31)
ffc0ef34: 7f e9 01 2e stwx r31,r9,r0
the_object
);
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
/* ASSERT: information->is_string */
the_object->name.name_p = name;
ffc0ef38: 38 00 00 00 li r0,0
ffc0ef3c: 90 1f 00 0c stw r0,12(r31)
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
ffc0ef40: 48 00 53 b5 bl ffc142f4 <_Thread_Enable_dispatch>
return (mqd_t) the_mq_fd->Object.id;
ffc0ef44: 80 7f 00 08 lwz r3,8(r31)
ffc0ef48: 4b ff fe 6c b ffc0edb4 <mq_open+0xe4>
ffc0ef4c: 7f a3 eb 78 mr r3,r29
ffc0ef50: 7f e4 fb 78 mr r4,r31
ffc0ef54: 48 00 40 0d bl ffc12f60 <_Objects_Free>
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
ffc0ef58: 48 00 53 9d bl ffc142f4 <_Thread_Enable_dispatch>
return (mqd_t) -1;
ffc0ef5c: 38 60 ff ff li r3,-1
ffc0ef60: 4b ff fe 54 b ffc0edb4 <mq_open+0xe4>
ffc0ea54 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
ffc0ea54: 7c 69 1b 79 mr. r9,r3
return EINVAL;
ffc0ea58: 38 60 00 16 li r3,22
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
ffc0ea5c: 4d 82 00 20 beqlr
ffc0ea60: 80 09 00 00 lwz r0,0(r9)
ffc0ea64: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ea68: 4d be 00 20 beqlr+ cr7
return EINVAL;
switch ( policy ) {
ffc0ea6c: 2b 84 00 04 cmplwi cr7,r4,4
ffc0ea70: 41 9d 00 20 bgt- cr7,ffc0ea90 <pthread_attr_setschedpolicy+0x3c>
ffc0ea74: 38 00 00 01 li r0,1
ffc0ea78: 7c 00 20 30 slw r0,r0,r4
ffc0ea7c: 70 0b 00 17 andi. r11,r0,23
ffc0ea80: 41 82 00 10 beq- ffc0ea90 <pthread_attr_setschedpolicy+0x3c><== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
ffc0ea84: 90 89 00 14 stw r4,20(r9)
return 0;
ffc0ea88: 38 60 00 00 li r3,0
ffc0ea8c: 4e 80 00 20 blr
default:
return ENOTSUP;
ffc0ea90: 38 60 00 86 li r3,134
}
}
ffc0ea94: 4e 80 00 20 blr
ffc0923c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
ffc0923c: 94 21 ff d0 stwu r1,-48(r1)
ffc09240: 7c 08 02 a6 mflr r0
ffc09244: 93 e1 00 2c stw r31,44(r1)
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
ffc09248: 7c 7f 1b 79 mr. r31,r3
return EINVAL;
ffc0924c: 38 60 00 16 li r3,22
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
ffc09250: 90 01 00 34 stw r0,52(r1)
ffc09254: 93 81 00 20 stw r28,32(r1)
ffc09258: 93 a1 00 24 stw r29,36(r1)
ffc0925c: 93 c1 00 28 stw r30,40(r1)
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
ffc09260: 41 82 00 0c beq- ffc0926c <pthread_barrier_init+0x30>
return EINVAL;
if ( count == 0 )
ffc09264: 2f 85 00 00 cmpwi cr7,r5,0
ffc09268: 40 9e 00 24 bne- cr7,ffc0928c <pthread_barrier_init+0x50>
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
ffc0926c: 80 01 00 34 lwz r0,52(r1)
ffc09270: 83 81 00 20 lwz r28,32(r1)
ffc09274: 7c 08 03 a6 mtlr r0
ffc09278: 83 a1 00 24 lwz r29,36(r1)
ffc0927c: 83 c1 00 28 lwz r30,40(r1)
ffc09280: 83 e1 00 2c lwz r31,44(r1)
ffc09284: 38 21 00 30 addi r1,r1,48
ffc09288: 4e 80 00 20 blr
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
ffc0928c: 2f 84 00 00 cmpwi cr7,r4,0
ffc09290: 41 9e 00 84 beq- cr7,ffc09314 <pthread_barrier_init+0xd8>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc09294: 80 04 00 00 lwz r0,0(r4)
return EINVAL;
ffc09298: 38 60 00 16 li r3,22
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc0929c: 2f 80 00 00 cmpwi cr7,r0,0
ffc092a0: 41 9e ff cc beq+ cr7,ffc0926c <pthread_barrier_init+0x30>
return EINVAL;
switch ( the_attr->process_shared ) {
ffc092a4: 83 c4 00 04 lwz r30,4(r4)
ffc092a8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc092ac: 40 be ff c0 bne- cr7,ffc0926c <pthread_barrier_init+0x30><== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc092b0: 3d 20 00 00 lis r9,0
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
ffc092b4: 93 c1 00 10 stw r30,16(r1)
ffc092b8: 81 69 28 34 lwz r11,10292(r9)
the_attributes.maximum_count = count;
ffc092bc: 90 a1 00 14 stw r5,20(r1)
ffc092c0: 38 0b 00 01 addi r0,r11,1
ffc092c4: 90 09 28 34 stw r0,10292(r9)
return _Thread_Dispatch_disable_level;
ffc092c8: 80 09 28 34 lwz r0,10292(r9)
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
ffc092cc: 3f 80 00 00 lis r28,0
ffc092d0: 3b 9c 2f ac addi r28,r28,12204
ffc092d4: 7f 83 e3 78 mr r3,r28
ffc092d8: 48 00 2b 11 bl ffc0bde8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
ffc092dc: 7c 7d 1b 79 mr. r29,r3
ffc092e0: 41 82 00 4c beq- ffc0932c <pthread_barrier_init+0xf0>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
ffc092e4: 38 7d 00 10 addi r3,r29,16
ffc092e8: 38 81 00 10 addi r4,r1,16
ffc092ec: 48 00 1e 89 bl ffc0b174 <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc092f0: 80 1d 00 08 lwz r0,8(r29)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc092f4: 81 7c 00 1c lwz r11,28(r28)
ffc092f8: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc092fc: 7f ab 49 2e stwx r29,r11,r9
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc09300: 93 dd 00 0c stw r30,12(r29)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
ffc09304: 90 1f 00 00 stw r0,0(r31)
_Thread_Enable_dispatch();
ffc09308: 48 00 41 b1 bl ffc0d4b8 <_Thread_Enable_dispatch>
return 0;
ffc0930c: 38 60 00 00 li r3,0
ffc09310: 4b ff ff 5c b ffc0926c <pthread_barrier_init+0x30>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
ffc09314: 38 61 00 08 addi r3,r1,8
ffc09318: 90 a1 00 18 stw r5,24(r1)
ffc0931c: 4b ff fe 2d bl ffc09148 <pthread_barrierattr_init>
the_attr = &my_attr;
ffc09320: 38 81 00 08 addi r4,r1,8
ffc09324: 80 a1 00 18 lwz r5,24(r1)
ffc09328: 4b ff ff 6c b ffc09294 <pthread_barrier_init+0x58>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
ffc0932c: 48 00 41 8d bl ffc0d4b8 <_Thread_Enable_dispatch>
return EAGAIN;
ffc09330: 38 60 00 0b li r3,11
ffc09334: 4b ff ff 38 b ffc0926c <pthread_barrier_init+0x30>
ffc08a0c <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
ffc08a0c: 94 21 ff f0 stwu r1,-16(r1)
ffc08a10: 7c 08 02 a6 mflr r0
ffc08a14: 93 c1 00 08 stw r30,8(r1)
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
ffc08a18: 7c 7e 1b 79 mr. r30,r3
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
ffc08a1c: 93 e1 00 0c stw r31,12(r1)
ffc08a20: 7c 9f 23 78 mr r31,r4
ffc08a24: 90 01 00 14 stw r0,20(r1)
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
ffc08a28: 41 82 00 4c beq- ffc08a74 <pthread_cleanup_push+0x68>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc08a2c: 3d 20 00 00 lis r9,0
ffc08a30: 81 69 28 0c lwz r11,10252(r9)
ffc08a34: 38 0b 00 01 addi r0,r11,1
ffc08a38: 90 09 28 0c stw r0,10252(r9)
return _Thread_Dispatch_disable_level;
ffc08a3c: 80 09 28 0c lwz r0,10252(r9)
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
ffc08a40: 38 60 00 10 li r3,16
ffc08a44: 48 00 5b 7d bl ffc0e5c0 <_Workspace_Allocate>
if ( handler ) {
ffc08a48: 7c 69 1b 79 mr. r9,r3
ffc08a4c: 41 82 00 24 beq- ffc08a70 <pthread_cleanup_push+0x64> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc08a50: 3d 60 00 00 lis r11,0
ffc08a54: 81 6b 31 10 lwz r11,12560(r11)
handler_stack = &thread_support->Cancellation_Handlers;
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
ffc08a58: 7d 24 4b 78 mr r4,r9
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
ffc08a5c: 80 6b 01 34 lwz r3,308(r11)
handler->routine = routine;
ffc08a60: 93 c9 00 08 stw r30,8(r9)
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
ffc08a64: 38 63 00 e4 addi r3,r3,228
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
handler->routine = routine;
handler->arg = arg;
ffc08a68: 93 e9 00 0c stw r31,12(r9)
_Chain_Append( handler_stack, &handler->Node );
ffc08a6c: 48 00 20 7d bl ffc0aae8 <_Chain_Append>
}
_Thread_Enable_dispatch();
ffc08a70: 48 00 43 75 bl ffc0cde4 <_Thread_Enable_dispatch>
}
ffc08a74: 80 01 00 14 lwz r0,20(r1)
ffc08a78: 83 c1 00 08 lwz r30,8(r1)
ffc08a7c: 7c 08 03 a6 mtlr r0
ffc08a80: 83 e1 00 0c lwz r31,12(r1)
ffc08a84: 38 21 00 10 addi r1,r1,16
ffc08a88: 4e 80 00 20 blr
ffc09bc4 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
ffc09bc4: 94 21 ff e8 stwu r1,-24(r1)
ffc09bc8: 7c 08 02 a6 mflr r0
ffc09bcc: 93 81 00 08 stw r28,8(r1)
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
ffc09bd0: 7c 9c 23 79 mr. r28,r4
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
ffc09bd4: 93 e1 00 14 stw r31,20(r1)
ffc09bd8: 7c 7f 1b 78 mr r31,r3
ffc09bdc: 90 01 00 1c stw r0,28(r1)
ffc09be0: 93 a1 00 0c stw r29,12(r1)
ffc09be4: 93 c1 00 10 stw r30,16(r1)
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
ffc09be8: 41 82 00 b8 beq- ffc09ca0 <pthread_cond_init+0xdc>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
ffc09bec: 80 1c 00 04 lwz r0,4(r28)
return EINVAL;
ffc09bf0: 38 60 00 16 li r3,22
else the_attr = &_POSIX_Condition_variables_Default_attributes;
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
ffc09bf4: 2f 80 00 01 cmpwi cr7,r0,1
ffc09bf8: 41 9e 00 10 beq- cr7,ffc09c08 <pthread_cond_init+0x44> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
ffc09bfc: 80 1c 00 00 lwz r0,0(r28)
ffc09c00: 2f 80 00 00 cmpwi cr7,r0,0
ffc09c04: 40 9e 00 24 bne- cr7,ffc09c28 <pthread_cond_init+0x64>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
ffc09c08: 80 01 00 1c lwz r0,28(r1)
ffc09c0c: 83 81 00 08 lwz r28,8(r1)
ffc09c10: 7c 08 03 a6 mtlr r0
ffc09c14: 83 a1 00 0c lwz r29,12(r1)
ffc09c18: 83 c1 00 10 lwz r30,16(r1)
ffc09c1c: 83 e1 00 14 lwz r31,20(r1)
ffc09c20: 38 21 00 18 addi r1,r1,24
ffc09c24: 4e 80 00 20 blr
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc09c28: 3d 20 00 00 lis r9,0
ffc09c2c: 81 69 28 40 lwz r11,10304(r9)
ffc09c30: 38 0b 00 01 addi r0,r11,1
ffc09c34: 90 09 28 40 stw r0,10304(r9)
return _Thread_Dispatch_disable_level;
ffc09c38: 80 09 28 40 lwz r0,10304(r9)
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
ffc09c3c: 3f a0 00 00 lis r29,0
ffc09c40: 3b bd 30 64 addi r29,r29,12388
ffc09c44: 7f a3 eb 78 mr r3,r29
ffc09c48: 48 00 33 55 bl ffc0cf9c <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
ffc09c4c: 7c 7e 1b 79 mr. r30,r3
ffc09c50: 41 82 00 5c beq- ffc09cac <pthread_cond_init+0xe8>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
ffc09c54: 80 1c 00 04 lwz r0,4(r28)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
ffc09c58: 3b 80 00 00 li r28,0
ffc09c5c: 93 9e 00 14 stw r28,20(r30)
_Thread_queue_Initialize(
ffc09c60: 3c a0 10 00 lis r5,4096
ffc09c64: 38 7e 00 18 addi r3,r30,24
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
ffc09c68: 90 1e 00 10 stw r0,16(r30)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
_Thread_queue_Initialize(
ffc09c6c: 38 80 00 00 li r4,0
ffc09c70: 60 a5 08 00 ori r5,r5,2048
ffc09c74: 38 c0 00 74 li r6,116
ffc09c78: 48 00 53 f5 bl ffc0f06c <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc09c7c: 80 1e 00 08 lwz r0,8(r30)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc09c80: 81 7d 00 1c lwz r11,28(r29)
ffc09c84: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc09c88: 7f cb 49 2e stwx r30,r11,r9
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc09c8c: 93 9e 00 0c stw r28,12(r30)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
ffc09c90: 90 1f 00 00 stw r0,0(r31)
_Thread_Enable_dispatch();
ffc09c94: 48 00 49 d9 bl ffc0e66c <_Thread_Enable_dispatch>
return 0;
ffc09c98: 38 60 00 00 li r3,0
ffc09c9c: 4b ff ff 6c b ffc09c08 <pthread_cond_init+0x44>
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
ffc09ca0: 3f 80 00 00 lis r28,0
ffc09ca4: 3b 9c 27 88 addi r28,r28,10120
ffc09ca8: 4b ff ff 44 b ffc09bec <pthread_cond_init+0x28>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
ffc09cac: 48 00 49 c1 bl ffc0e66c <_Thread_Enable_dispatch>
return ENOMEM;
ffc09cb0: 38 60 00 0c li r3,12
ffc09cb4: 4b ff ff 54 b ffc09c08 <pthread_cond_init+0x44>
ffc08f04 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc08f04: 94 21 ff 80 stwu r1,-128(r1)
ffc08f08: 7c 08 02 a6 mflr r0
ffc08f0c: 93 61 00 6c stw r27,108(r1)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
ffc08f10: 7c bb 2b 79 mr. r27,r5
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc08f14: 93 81 00 70 stw r28,112(r1)
ffc08f18: 7c dc 33 78 mr r28,r6
ffc08f1c: 93 a1 00 74 stw r29,116(r1)
ffc08f20: 7c 7d 1b 78 mr r29,r3
ffc08f24: 93 e1 00 7c stw r31,124(r1)
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
ffc08f28: 3b e0 00 0e li r31,14
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc08f2c: 90 01 00 84 stw r0,132(r1)
ffc08f30: 92 81 00 50 stw r20,80(r1)
ffc08f34: 92 a1 00 54 stw r21,84(r1)
ffc08f38: 92 c1 00 58 stw r22,88(r1)
ffc08f3c: 92 e1 00 5c stw r23,92(r1)
ffc08f40: 93 01 00 60 stw r24,96(r1)
ffc08f44: 93 21 00 64 stw r25,100(r1)
ffc08f48: 93 41 00 68 stw r26,104(r1)
ffc08f4c: 93 c1 00 78 stw r30,120(r1)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
ffc08f50: 41 82 00 20 beq- ffc08f70 <pthread_create+0x6c>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
ffc08f54: 2f 84 00 00 cmpwi cr7,r4,0
ffc08f58: 7c 9e 23 78 mr r30,r4
ffc08f5c: 41 9e 01 bc beq- cr7,ffc09118 <pthread_create+0x214>
if ( !the_attr->is_initialized )
ffc08f60: 80 1e 00 00 lwz r0,0(r30)
return EINVAL;
ffc08f64: 3b e0 00 16 li r31,22
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
if ( !the_attr->is_initialized )
ffc08f68: 2f 80 00 00 cmpwi cr7,r0,0
ffc08f6c: 40 9e 00 48 bne- cr7,ffc08fb4 <pthread_create+0xb0>
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
ffc08f70: 80 01 00 84 lwz r0,132(r1)
ffc08f74: 7f e3 fb 78 mr r3,r31
ffc08f78: 82 81 00 50 lwz r20,80(r1)
ffc08f7c: 7c 08 03 a6 mtlr r0
ffc08f80: 82 a1 00 54 lwz r21,84(r1)
ffc08f84: 82 c1 00 58 lwz r22,88(r1)
ffc08f88: 82 e1 00 5c lwz r23,92(r1)
ffc08f8c: 83 01 00 60 lwz r24,96(r1)
ffc08f90: 83 21 00 64 lwz r25,100(r1)
ffc08f94: 83 41 00 68 lwz r26,104(r1)
ffc08f98: 83 61 00 6c lwz r27,108(r1)
ffc08f9c: 83 81 00 70 lwz r28,112(r1)
ffc08fa0: 83 a1 00 74 lwz r29,116(r1)
ffc08fa4: 83 c1 00 78 lwz r30,120(r1)
ffc08fa8: 83 e1 00 7c lwz r31,124(r1)
ffc08fac: 38 21 00 80 addi r1,r1,128
ffc08fb0: 4e 80 00 20 blr
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
ffc08fb4: 80 1e 00 04 lwz r0,4(r30)
ffc08fb8: 2f 80 00 00 cmpwi cr7,r0,0
ffc08fbc: 41 9e 00 18 beq- cr7,ffc08fd4 <pthread_create+0xd0>
ffc08fc0: 3d 60 00 00 lis r11,0
ffc08fc4: 81 3e 00 08 lwz r9,8(r30)
ffc08fc8: 80 0b 27 28 lwz r0,10024(r11)
ffc08fcc: 7f 89 00 40 cmplw cr7,r9,r0
ffc08fd0: 41 9c ff a0 blt+ cr7,ffc08f70 <pthread_create+0x6c>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
ffc08fd4: 80 1e 00 10 lwz r0,16(r30)
ffc08fd8: 2f 80 00 01 cmpwi cr7,r0,1
ffc08fdc: 41 9e 01 48 beq- cr7,ffc09124 <pthread_create+0x220>
ffc08fe0: 2f 80 00 02 cmpwi cr7,r0,2
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
break;
default:
return EINVAL;
ffc08fe4: 3b e0 00 16 li r31,22
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
ffc08fe8: 40 9e ff 88 bne+ cr7,ffc08f70 <pthread_create+0x6c>
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
ffc08fec: 80 de 00 18 lwz r6,24(r30)
ffc08ff0: 80 fe 00 1c lwz r7,28(r30)
ffc08ff4: 81 1e 00 20 lwz r8,32(r30)
ffc08ff8: 81 5e 00 24 lwz r10,36(r30)
ffc08ffc: 81 7e 00 28 lwz r11,40(r30)
ffc09000: 81 3e 00 2c lwz r9,44(r30)
ffc09004: 80 1e 00 30 lwz r0,48(r30)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
ffc09008: 83 5e 00 14 lwz r26,20(r30)
schedparam = the_attr->schedparam;
ffc0900c: 90 c1 00 20 stw r6,32(r1)
ffc09010: 90 e1 00 24 stw r7,36(r1)
ffc09014: 91 01 00 28 stw r8,40(r1)
ffc09018: 91 41 00 2c stw r10,44(r1)
ffc0901c: 91 61 00 30 stw r11,48(r1)
ffc09020: 91 21 00 34 stw r9,52(r1)
ffc09024: 90 01 00 38 stw r0,56(r1)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
ffc09028: 80 1e 00 0c lwz r0,12(r30)
return ENOTSUP;
ffc0902c: 3b e0 00 86 li r31,134
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
ffc09030: 2f 80 00 00 cmpwi cr7,r0,0
ffc09034: 40 9e ff 3c bne+ cr7,ffc08f70 <pthread_create+0x6c>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
ffc09038: 80 61 00 20 lwz r3,32(r1)
return EINVAL;
ffc0903c: 3b e0 00 16 li r31,22
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
ffc09040: 48 00 83 19 bl ffc11358 <_POSIX_Priority_Is_valid>
ffc09044: 2f 83 00 00 cmpwi cr7,r3,0
ffc09048: 41 9e ff 28 beq+ cr7,ffc08f70 <pthread_create+0x6c> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
ffc0904c: 7c 24 0b 78 mr r4,r1
ffc09050: 86 c4 00 20 lwzu r22,32(r4)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
ffc09054: 3d 20 00 00 lis r9,0
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
ffc09058: 7f 43 d3 78 mr r3,r26
ffc0905c: 8a a9 27 24 lbz r21,10020(r9)
ffc09060: 38 a1 00 1c addi r5,r1,28
ffc09064: 38 c1 00 18 addi r6,r1,24
ffc09068: 48 00 83 15 bl ffc1137c <_POSIX_Thread_Translate_sched_param>
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
ffc0906c: 7c 7f 1b 79 mr. r31,r3
ffc09070: 40 82 ff 00 bne+ ffc08f70 <pthread_create+0x6c>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
ffc09074: 3f 00 00 00 lis r24,0
ffc09078: 80 78 28 34 lwz r3,10292(r24)
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
ffc0907c: 3e e0 00 00 lis r23,0
ffc09080: 3a f7 2e 0c addi r23,r23,11788
ffc09084: 48 00 20 7d bl ffc0b100 <_API_Mutex_Lock>
ffc09088: 7e e3 bb 78 mr r3,r23
ffc0908c: 48 00 2d 65 bl ffc0bdf0 <_Objects_Allocate>
ffc09090: 7e f4 bb 78 mr r20,r23
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
ffc09094: 7c 79 1b 79 mr. r25,r3
ffc09098: 41 82 00 70 beq- ffc09108 <pthread_create+0x204>
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
ffc0909c: 3d 20 00 00 lis r9,0
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
ffc090a0: 80 1e 00 08 lwz r0,8(r30)
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
ffc090a4: 80 c9 27 28 lwz r6,10024(r9)
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
ffc090a8: 93 e1 00 48 stw r31,72(r1)
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
ffc090ac: 54 c6 08 3c rlwinm r6,r6,1,0,30
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
ffc090b0: 7f 86 00 40 cmplw cr7,r6,r0
ffc090b4: 80 be 00 04 lwz r5,4(r30)
ffc090b8: 40 9c 00 08 bge- cr7,ffc090c0 <pthread_create+0x1bc>
ffc090bc: 7c 06 03 78 mr r6,r0
ffc090c0: 80 01 00 18 lwz r0,24(r1)
ffc090c4: 7e 83 a3 78 mr r3,r20
ffc090c8: 81 41 00 1c lwz r10,28(r1)
ffc090cc: 7f 24 cb 78 mr r4,r25
ffc090d0: 90 01 00 08 stw r0,8(r1)
ffc090d4: 38 00 00 00 li r0,0
ffc090d8: 38 e0 00 01 li r7,1
ffc090dc: 90 01 00 0c stw r0,12(r1)
ffc090e0: 7d 16 a8 50 subf r8,r22,r21
ffc090e4: 38 01 00 48 addi r0,r1,72
ffc090e8: 39 20 00 01 li r9,1
ffc090ec: 90 01 00 10 stw r0,16(r1)
ffc090f0: 48 00 44 dd bl ffc0d5cc <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
ffc090f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc090f8: 40 9e 00 78 bne- cr7,ffc09170 <pthread_create+0x26c>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
ffc090fc: 7e e3 bb 78 mr r3,r23
ffc09100: 7f 24 cb 78 mr r4,r25
ffc09104: 48 00 30 e9 bl ffc0c1ec <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
ffc09108: 80 78 28 34 lwz r3,10292(r24)
return EAGAIN;
ffc0910c: 3b e0 00 0b li r31,11
name /* posix threads don't have a name */
);
if ( !status ) {
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
ffc09110: 48 00 20 71 bl ffc0b180 <_API_Mutex_Unlock>
return EAGAIN;
ffc09114: 4b ff fe 5c b ffc08f70 <pthread_create+0x6c>
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
ffc09118: 3f c0 ff c2 lis r30,-62
ffc0911c: 3b de 24 14 addi r30,r30,9236
ffc09120: 4b ff fe 40 b ffc08f60 <pthread_create+0x5c>
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc09124: 3d 20 00 00 lis r9,0
ffc09128: 81 29 31 10 lwz r9,12560(r9)
ffc0912c: 81 29 01 34 lwz r9,308(r9)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
ffc09130: 80 a9 00 88 lwz r5,136(r9)
ffc09134: 80 c9 00 8c lwz r6,140(r9)
ffc09138: 80 e9 00 90 lwz r7,144(r9)
ffc0913c: 81 09 00 94 lwz r8,148(r9)
ffc09140: 81 49 00 98 lwz r10,152(r9)
ffc09144: 81 69 00 9c lwz r11,156(r9)
ffc09148: 80 09 00 a0 lwz r0,160(r9)
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
ffc0914c: 83 49 00 84 lwz r26,132(r9)
schedparam = api->schedparam;
ffc09150: 90 a1 00 20 stw r5,32(r1)
ffc09154: 90 c1 00 24 stw r6,36(r1)
ffc09158: 90 e1 00 28 stw r7,40(r1)
ffc0915c: 91 01 00 2c stw r8,44(r1)
ffc09160: 91 41 00 30 stw r10,48(r1)
ffc09164: 91 61 00 34 stw r11,52(r1)
ffc09168: 90 01 00 38 stw r0,56(r1)
break;
ffc0916c: 4b ff fe bc b ffc09028 <pthread_create+0x124>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc09170: 82 f9 01 34 lwz r23,308(r25)
api->Attributes = *the_attr;
ffc09174: 7f c4 f3 78 mr r4,r30
ffc09178: 38 a0 00 40 li r5,64
ffc0917c: 7e e3 bb 78 mr r3,r23
ffc09180: 48 00 c1 c9 bl ffc15348 <memcpy>
api->detachstate = the_attr->detachstate;
ffc09184: 80 1e 00 3c lwz r0,60(r30)
api->schedpolicy = schedpolicy;
ffc09188: 93 57 00 84 stw r26,132(r23)
api->schedparam = schedparam;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc0918c: 7f 23 cb 78 mr r3,r25
ffc09190: 38 80 00 01 li r4,1
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
ffc09194: 90 17 00 40 stw r0,64(r23)
api->schedparam = schedparam;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc09198: 7f 65 db 78 mr r5,r27
ffc0919c: 7f 86 e3 78 mr r6,r28
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
ffc091a0: 80 01 00 20 lwz r0,32(r1)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc091a4: 38 e0 00 00 li r7,0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
ffc091a8: 90 17 00 88 stw r0,136(r23)
ffc091ac: 80 01 00 24 lwz r0,36(r1)
ffc091b0: 90 17 00 8c stw r0,140(r23)
ffc091b4: 80 01 00 28 lwz r0,40(r1)
ffc091b8: 90 17 00 90 stw r0,144(r23)
ffc091bc: 80 01 00 2c lwz r0,44(r1)
ffc091c0: 90 17 00 94 stw r0,148(r23)
ffc091c4: 80 01 00 30 lwz r0,48(r1)
ffc091c8: 90 17 00 98 stw r0,152(r23)
ffc091cc: 80 01 00 34 lwz r0,52(r1)
ffc091d0: 90 17 00 9c stw r0,156(r23)
ffc091d4: 80 01 00 38 lwz r0,56(r1)
ffc091d8: 90 17 00 a0 stw r0,160(r23)
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc091dc: 48 00 50 29 bl ffc0e204 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
ffc091e0: 2f 9a 00 04 cmpwi cr7,r26,4
ffc091e4: 41 9e 00 18 beq- cr7,ffc091fc <pthread_create+0x2f8>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
ffc091e8: 80 19 00 08 lwz r0,8(r25)
_RTEMS_Unlock_allocator();
ffc091ec: 80 78 28 34 lwz r3,10292(r24)
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
ffc091f0: 90 1d 00 00 stw r0,0(r29)
_RTEMS_Unlock_allocator();
ffc091f4: 48 00 1f 8d bl ffc0b180 <_API_Mutex_Unlock>
return 0;
ffc091f8: 4b ff fd 78 b ffc08f70 <pthread_create+0x6c>
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
ffc091fc: 38 77 00 90 addi r3,r23,144
ffc09200: 48 00 51 5d bl ffc0e35c <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc09204: 38 97 00 a8 addi r4,r23,168
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc09208: 90 77 00 b4 stw r3,180(r23)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0920c: 3c 60 00 00 lis r3,0
ffc09210: 38 63 2d 28 addi r3,r3,11560
ffc09214: 48 00 56 e1 bl ffc0e8f4 <_Watchdog_Insert>
ffc09218: 4b ff ff d0 b ffc091e8 <pthread_create+0x2e4>
ffc1f404 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
ffc1f404: 94 21 ff d8 stwu r1,-40(r1)
ffc1f408: 7c 08 02 a6 mflr r0
ffc1f40c: 93 a1 00 1c stw r29,28(r1)
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
ffc1f410: 7c 9d 23 79 mr. r29,r4
int pthread_kill(
pthread_t thread,
int sig
)
{
ffc1f414: 90 01 00 2c stw r0,44(r1)
ffc1f418: 93 81 00 18 stw r28,24(r1)
ffc1f41c: 93 c1 00 20 stw r30,32(r1)
ffc1f420: 93 e1 00 24 stw r31,36(r1)
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
ffc1f424: 41 82 00 b8 beq- ffc1f4dc <pthread_kill+0xd8>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc1f428: 3b 9d ff ff addi r28,r29,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
ffc1f42c: 2b 9c 00 1f cmplwi cr7,r28,31
ffc1f430: 41 9d 00 ac bgt- cr7,ffc1f4dc <pthread_kill+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
ffc1f434: 38 81 00 08 addi r4,r1,8
ffc1f438: 4b fe d0 ed bl ffc0c524 <_Thread_Get>
switch ( location ) {
ffc1f43c: 80 01 00 08 lwz r0,8(r1)
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
ffc1f440: 7c 7f 1b 78 mr r31,r3
switch ( location ) {
ffc1f444: 2f 80 00 00 cmpwi cr7,r0,0
ffc1f448: 40 9e 00 a8 bne- cr7,ffc1f4f0 <pthread_kill+0xec> <== NEVER TAKEN
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
ffc1f44c: 1c 1d 00 0c mulli r0,r29,12
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc1f450: 81 23 01 34 lwz r9,308(r3)
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
ffc1f454: 3d 60 00 00 lis r11,0
ffc1f458: 39 6b 31 c0 addi r11,r11,12736
ffc1f45c: 7d 6b 02 14 add r11,r11,r0
ffc1f460: 80 0b 00 08 lwz r0,8(r11)
ffc1f464: 2f 80 00 01 cmpwi cr7,r0,1
ffc1f468: 41 9e 00 44 beq- cr7,ffc1f4ac <pthread_kill+0xa8>
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
ffc1f46c: 80 09 00 d4 lwz r0,212(r9)
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
ffc1f470: 3b c0 00 01 li r30,1
ffc1f474: 7f dc e0 30 slw r28,r30,r28
ffc1f478: 7c 1c e3 78 or r28,r0,r28
ffc1f47c: 93 89 00 d4 stw r28,212(r9)
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
ffc1f480: 7f a4 eb 78 mr r4,r29
ffc1f484: 38 a0 00 00 li r5,0
ffc1f488: 4b ff fe 11 bl ffc1f298 <_POSIX_signals_Unblock_thread>
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1f48c: 3d 20 00 00 lis r9,0
ffc1f490: 39 29 31 44 addi r9,r9,12612
ffc1f494: 80 09 00 08 lwz r0,8(r9)
ffc1f498: 2f 80 00 00 cmpwi cr7,r0,0
ffc1f49c: 41 9e 00 10 beq- cr7,ffc1f4ac <pthread_kill+0xa8>
ffc1f4a0: 80 09 00 0c lwz r0,12(r9)
ffc1f4a4: 7f 9f 00 00 cmpw cr7,r31,r0
ffc1f4a8: 41 9e 00 2c beq- cr7,ffc1f4d4 <pthread_kill+0xd0>
_Thread_Dispatch_necessary = true;
}
_Thread_Enable_dispatch();
ffc1f4ac: 4b fe d0 3d bl ffc0c4e8 <_Thread_Enable_dispatch>
return 0;
ffc1f4b0: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
}
ffc1f4b4: 80 01 00 2c lwz r0,44(r1)
ffc1f4b8: 83 81 00 18 lwz r28,24(r1)
ffc1f4bc: 7c 08 03 a6 mtlr r0
ffc1f4c0: 83 a1 00 1c lwz r29,28(r1)
ffc1f4c4: 83 c1 00 20 lwz r30,32(r1)
ffc1f4c8: 83 e1 00 24 lwz r31,36(r1)
ffc1f4cc: 38 21 00 28 addi r1,r1,40
ffc1f4d0: 4e 80 00 20 blr
api->signals_pending |= signo_to_mask( sig );
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
ffc1f4d4: 9b c9 00 18 stb r30,24(r9)
ffc1f4d8: 4b ff ff d4 b ffc1f4ac <pthread_kill+0xa8>
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc1f4dc: 4b ff 48 b1 bl ffc13d8c <__errno>
ffc1f4e0: 38 00 00 16 li r0,22
ffc1f4e4: 90 03 00 00 stw r0,0(r3)
ffc1f4e8: 38 60 ff ff li r3,-1
ffc1f4ec: 4b ff ff c8 b ffc1f4b4 <pthread_kill+0xb0>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
ffc1f4f0: 4b ff 48 9d bl ffc13d8c <__errno> <== NOT EXECUTED
ffc1f4f4: 38 00 00 03 li r0,3 <== NOT EXECUTED
ffc1f4f8: 90 03 00 00 stw r0,0(r3) <== NOT EXECUTED
ffc1f4fc: 38 60 ff ff li r3,-1 <== NOT EXECUTED
ffc1f500: 4b ff ff b4 b ffc1f4b4 <pthread_kill+0xb0> <== NOT EXECUTED
ffc0b39c <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
ffc0b39c: 94 21 ff e0 stwu r1,-32(r1)
ffc0b3a0: 7c 08 02 a6 mflr r0
ffc0b3a4: 93 c1 00 18 stw r30,24(r1)
ffc0b3a8: 7c 7e 1b 78 mr r30,r3
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
ffc0b3ac: 7c 83 23 78 mr r3,r4
ffc0b3b0: 38 81 00 08 addi r4,r1,8
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
ffc0b3b4: 93 e1 00 1c stw r31,28(r1)
ffc0b3b8: 90 01 00 24 stw r0,36(r1)
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
ffc0b3bc: 48 00 01 25 bl ffc0b4e0 <_POSIX_Absolute_timeout_to_ticks>
ffc0b3c0: 7c 7f 1b 78 mr r31,r3
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
ffc0b3c4: 2f 9f 00 03 cmpwi cr7,r31,3
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
ffc0b3c8: 80 a1 00 08 lwz r5,8(r1)
ffc0b3cc: 7f c3 f3 78 mr r3,r30
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
ffc0b3d0: 41 9e 00 2c beq- cr7,ffc0b3fc <pthread_mutex_timedlock+0x60>
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
ffc0b3d4: 38 80 00 00 li r4,0
ffc0b3d8: 4b ff fe 65 bl ffc0b23c <_POSIX_Mutex_Lock_support>
* This service only gives us the option to block. We used a polling
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
ffc0b3dc: 2f 83 00 10 cmpwi cr7,r3,16
ffc0b3e0: 41 9e 00 3c beq- cr7,ffc0b41c <pthread_mutex_timedlock+0x80>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
ffc0b3e4: 80 01 00 24 lwz r0,36(r1)
ffc0b3e8: 83 c1 00 18 lwz r30,24(r1)
ffc0b3ec: 7c 08 03 a6 mtlr r0
ffc0b3f0: 83 e1 00 1c lwz r31,28(r1)
ffc0b3f4: 38 21 00 20 addi r1,r1,32
ffc0b3f8: 4e 80 00 20 blr
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks );
ffc0b3fc: 38 80 00 01 li r4,1
ffc0b400: 4b ff fe 3d bl ffc0b23c <_POSIX_Mutex_Lock_support>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return lock_status;
}
ffc0b404: 80 01 00 24 lwz r0,36(r1)
ffc0b408: 83 c1 00 18 lwz r30,24(r1)
ffc0b40c: 7c 08 03 a6 mtlr r0
ffc0b410: 83 e1 00 1c lwz r31,28(r1)
ffc0b414: 38 21 00 20 addi r1,r1,32
ffc0b418: 4e 80 00 20 blr
* attempt to lock if the abstime was not in the future. If we did
* not obtain the mutex, then not look at the status immediately,
* make sure the right reason is returned.
*/
if ( !do_wait && (lock_status == EBUSY) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
ffc0b41c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0b420: 40 9e 00 0c bne- cr7,ffc0b42c <pthread_mutex_timedlock+0x90><== ALWAYS TAKEN
return EINVAL;
ffc0b424: 38 60 00 16 li r3,22 <== NOT EXECUTED
ffc0b428: 4b ff ff bc b ffc0b3e4 <pthread_mutex_timedlock+0x48><== NOT EXECUTED
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc0b42c: 3b ff ff ff addi r31,r31,-1
ffc0b430: 2b 9f 00 01 cmplwi cr7,r31,1
ffc0b434: 41 9d ff b0 bgt+ cr7,ffc0b3e4 <pthread_mutex_timedlock+0x48><== NEVER TAKEN
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
ffc0b438: 38 60 00 74 li r3,116
ffc0b43c: 4b ff ff a8 b ffc0b3e4 <pthread_mutex_timedlock+0x48>
ffc0984c <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
ffc0984c: 94 21 ff e0 stwu r1,-32(r1)
ffc09850: 7c 08 02 a6 mflr r0
ffc09854: 93 e1 00 1c stw r31,28(r1)
if ( !once_control || !init_routine )
ffc09858: 7c 7f 1b 79 mr. r31,r3
return EINVAL;
ffc0985c: 38 60 00 16 li r3,22
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
ffc09860: 93 c1 00 18 stw r30,24(r1)
ffc09864: 7c 9e 23 78 mr r30,r4
ffc09868: 90 01 00 24 stw r0,36(r1)
if ( !once_control || !init_routine )
ffc0986c: 41 82 00 1c beq- ffc09888 <pthread_once+0x3c>
ffc09870: 2f 84 00 00 cmpwi cr7,r4,0
ffc09874: 41 9e 00 14 beq- cr7,ffc09888 <pthread_once+0x3c>
return EINVAL;
if ( !once_control->init_executed ) {
ffc09878: 80 1f 00 04 lwz r0,4(r31)
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
ffc0987c: 38 60 00 00 li r3,0
)
{
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
ffc09880: 2f 80 00 00 cmpwi cr7,r0,0
ffc09884: 41 9e 00 1c beq- cr7,ffc098a0 <pthread_once+0x54>
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
ffc09888: 80 01 00 24 lwz r0,36(r1)
ffc0988c: 83 c1 00 18 lwz r30,24(r1)
ffc09890: 7c 08 03 a6 mtlr r0
ffc09894: 83 e1 00 1c lwz r31,28(r1)
ffc09898: 38 21 00 20 addi r1,r1,32
ffc0989c: 4e 80 00 20 blr
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
ffc098a0: 38 60 01 00 li r3,256
ffc098a4: 38 80 01 00 li r4,256
ffc098a8: 38 a1 00 08 addi r5,r1,8
ffc098ac: 48 00 0e f1 bl ffc0a79c <rtems_task_mode>
if ( !once_control->init_executed ) {
ffc098b0: 80 1f 00 04 lwz r0,4(r31)
ffc098b4: 2f 80 00 00 cmpwi cr7,r0,0
ffc098b8: 41 9e 00 30 beq- cr7,ffc098e8 <pthread_once+0x9c> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc098bc: 80 61 00 08 lwz r3,8(r1)
ffc098c0: 38 a1 00 08 addi r5,r1,8
ffc098c4: 38 80 01 00 li r4,256
ffc098c8: 48 00 0e d5 bl ffc0a79c <rtems_task_mode>
}
return 0;
}
ffc098cc: 80 01 00 24 lwz r0,36(r1)
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
ffc098d0: 38 60 00 00 li r3,0
}
ffc098d4: 83 c1 00 18 lwz r30,24(r1)
ffc098d8: 7c 08 03 a6 mtlr r0
ffc098dc: 83 e1 00 1c lwz r31,28(r1)
ffc098e0: 38 21 00 20 addi r1,r1,32
ffc098e4: 4e 80 00 20 blr
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
ffc098e8: 38 00 00 01 li r0,1
once_control->init_executed = true;
(*init_routine)();
ffc098ec: 7f c9 03 a6 mtctr r30
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
ffc098f0: 90 1f 00 00 stw r0,0(r31)
once_control->init_executed = true;
ffc098f4: 90 1f 00 04 stw r0,4(r31)
(*init_routine)();
ffc098f8: 4e 80 04 21 bctrl
ffc098fc: 4b ff ff c0 b ffc098bc <pthread_once+0x70>
ffc09fbc <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
ffc09fbc: 94 21 ff d8 stwu r1,-40(r1)
ffc09fc0: 7c 08 02 a6 mflr r0
ffc09fc4: 93 e1 00 24 stw r31,36(r1)
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
ffc09fc8: 7c 7f 1b 79 mr. r31,r3
return EINVAL;
ffc09fcc: 38 60 00 16 li r3,22
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
ffc09fd0: 90 01 00 2c stw r0,44(r1)
ffc09fd4: 93 81 00 18 stw r28,24(r1)
ffc09fd8: 93 a1 00 1c stw r29,28(r1)
ffc09fdc: 93 c1 00 20 stw r30,32(r1)
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
ffc09fe0: 41 82 00 1c beq- ffc09ffc <pthread_rwlock_init+0x40>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
ffc09fe4: 2f 84 00 00 cmpwi cr7,r4,0
ffc09fe8: 41 9e 00 a0 beq- cr7,ffc0a088 <pthread_rwlock_init+0xcc>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc09fec: 80 04 00 00 lwz r0,0(r4)
return EINVAL;
ffc09ff0: 38 60 00 16 li r3,22
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc09ff4: 2f 80 00 00 cmpwi cr7,r0,0
ffc09ff8: 40 9e 00 24 bne- cr7,ffc0a01c <pthread_rwlock_init+0x60><== ALWAYS TAKEN
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
ffc09ffc: 80 01 00 2c lwz r0,44(r1)
ffc0a000: 83 81 00 18 lwz r28,24(r1)
ffc0a004: 7c 08 03 a6 mtlr r0
ffc0a008: 83 a1 00 1c lwz r29,28(r1)
ffc0a00c: 83 c1 00 20 lwz r30,32(r1)
ffc0a010: 83 e1 00 24 lwz r31,36(r1)
ffc0a014: 38 21 00 28 addi r1,r1,40
ffc0a018: 4e 80 00 20 blr
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
return EINVAL;
switch ( the_attr->process_shared ) {
ffc0a01c: 83 c4 00 04 lwz r30,4(r4)
ffc0a020: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a024: 40 be ff d8 bne- cr7,ffc09ffc <pthread_rwlock_init+0x40><== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0a028: 3d 20 00 00 lis r9,0
*/
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes(
CORE_RWLock_Attributes *the_attributes
)
{
the_attributes->XXX = 0;
ffc0a02c: 93 c1 00 08 stw r30,8(r1)
ffc0a030: 81 69 28 34 lwz r11,10292(r9)
ffc0a034: 38 0b 00 01 addi r0,r11,1
ffc0a038: 90 09 28 34 stw r0,10292(r9)
return _Thread_Dispatch_disable_level;
ffc0a03c: 80 09 28 34 lwz r0,10292(r9)
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
ffc0a040: 3f 80 00 00 lis r28,0
ffc0a044: 3b 9c 2d ec addi r28,r28,11756
ffc0a048: 7f 83 e3 78 mr r3,r28
ffc0a04c: 48 00 33 09 bl ffc0d354 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
ffc0a050: 7c 7d 1b 79 mr. r29,r3
ffc0a054: 41 82 00 44 beq- ffc0a098 <pthread_rwlock_init+0xdc>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
ffc0a058: 38 7d 00 10 addi r3,r29,16
ffc0a05c: 38 81 00 08 addi r4,r1,8
ffc0a060: 48 00 27 cd bl ffc0c82c <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc0a064: 80 1d 00 08 lwz r0,8(r29)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0a068: 81 7c 00 1c lwz r11,28(r28)
ffc0a06c: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc0a070: 7f ab 49 2e stwx r29,r11,r9
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc0a074: 93 dd 00 0c stw r30,12(r29)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
ffc0a078: 90 1f 00 00 stw r0,0(r31)
_Thread_Enable_dispatch();
ffc0a07c: 48 00 49 a9 bl ffc0ea24 <_Thread_Enable_dispatch>
return 0;
ffc0a080: 38 60 00 00 li r3,0
ffc0a084: 4b ff ff 78 b ffc09ffc <pthread_rwlock_init+0x40>
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
ffc0a088: 38 61 00 0c addi r3,r1,12
ffc0a08c: 48 00 0c a1 bl ffc0ad2c <pthread_rwlockattr_init>
the_attr = &default_attr;
ffc0a090: 38 81 00 0c addi r4,r1,12
ffc0a094: 4b ff ff 58 b ffc09fec <pthread_rwlock_init+0x30>
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
ffc0a098: 48 00 49 8d bl ffc0ea24 <_Thread_Enable_dispatch>
return EAGAIN;
ffc0a09c: 38 60 00 0b li r3,11
ffc0a0a0: 4b ff ff 5c b ffc09ffc <pthread_rwlock_init+0x40>
ffc0a130 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc0a130: 94 21 ff d8 stwu r1,-40(r1)
ffc0a134: 7c 08 02 a6 mflr r0
ffc0a138: 93 81 00 18 stw r28,24(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc0a13c: 7c 7c 1b 79 mr. r28,r3
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc0a140: 7c 83 23 78 mr r3,r4
ffc0a144: 93 e1 00 24 stw r31,36(r1)
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
return EINVAL;
ffc0a148: 3b e0 00 16 li r31,22
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc0a14c: 90 01 00 2c stw r0,44(r1)
ffc0a150: 93 a1 00 1c stw r29,28(r1)
ffc0a154: 93 c1 00 20 stw r30,32(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc0a158: 41 82 00 7c beq- ffc0a1d4 <pthread_rwlock_timedrdlock+0xa4>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
ffc0a15c: 38 81 00 08 addi r4,r1,8
ffc0a160: 48 00 86 6d bl ffc127cc <_POSIX_Absolute_timeout_to_ticks>
ffc0a164: 80 9c 00 00 lwz r4,0(r28)
ffc0a168: 7c 7e 1b 78 mr r30,r3
ffc0a16c: 3c 60 00 00 lis r3,0
ffc0a170: 38 63 2d ec addi r3,r3,11756
ffc0a174: 38 a1 00 0c addi r5,r1,12
ffc0a178: 48 00 37 cd bl ffc0d944 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
ffc0a17c: 80 01 00 0c lwz r0,12(r1)
ffc0a180: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a184: 40 9e 00 50 bne- cr7,ffc0a1d4 <pthread_rwlock_timedrdlock+0xa4>
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
ffc0a188: 6b dd 00 03 xori r29,r30,3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
ffc0a18c: 80 9c 00 00 lwz r4,0(r28)
ffc0a190: 7f bd 00 34 cntlzw r29,r29
ffc0a194: 80 c1 00 08 lwz r6,8(r1)
ffc0a198: 57 bd d9 7e rlwinm r29,r29,27,5,31
ffc0a19c: 38 63 00 10 addi r3,r3,16
ffc0a1a0: 7f a5 eb 78 mr r5,r29
ffc0a1a4: 38 e0 00 00 li r7,0
ffc0a1a8: 48 00 26 c5 bl ffc0c86c <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
ffc0a1ac: 48 00 48 79 bl ffc0ea24 <_Thread_Enable_dispatch>
if ( !do_wait ) {
ffc0a1b0: 2f 9d 00 00 cmpwi cr7,r29,0
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
ffc0a1b4: 3d 20 00 00 lis r9,0
ffc0a1b8: 81 29 31 30 lwz r9,12592(r9)
ffc0a1bc: 80 69 00 34 lwz r3,52(r9)
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
ffc0a1c0: 40 9e 00 0c bne- cr7,ffc0a1cc <pthread_rwlock_timedrdlock+0x9c>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
ffc0a1c4: 2f 83 00 02 cmpwi cr7,r3,2
ffc0a1c8: 41 9e 00 30 beq- cr7,ffc0a1f8 <pthread_rwlock_timedrdlock+0xc8>
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
ffc0a1cc: 48 00 01 2d bl ffc0a2f8 <_POSIX_RWLock_Translate_core_RWLock_return_code>
ffc0a1d0: 7c 7f 1b 78 mr r31,r3
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
ffc0a1d4: 80 01 00 2c lwz r0,44(r1)
ffc0a1d8: 7f e3 fb 78 mr r3,r31
ffc0a1dc: 83 81 00 18 lwz r28,24(r1)
ffc0a1e0: 7c 08 03 a6 mtlr r0
ffc0a1e4: 83 a1 00 1c lwz r29,28(r1)
ffc0a1e8: 83 c1 00 20 lwz r30,32(r1)
ffc0a1ec: 83 e1 00 24 lwz r31,36(r1)
ffc0a1f0: 38 21 00 28 addi r1,r1,40
ffc0a1f4: 4e 80 00 20 blr
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
ffc0a1f8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a1fc: 41 9e ff d8 beq+ cr7,ffc0a1d4 <pthread_rwlock_timedrdlock+0xa4><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc0a200: 3b de ff ff addi r30,r30,-1
ffc0a204: 2b 9e 00 01 cmplwi cr7,r30,1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
ffc0a208: 3b e0 00 74 li r31,116
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc0a20c: 41 9d ff c0 bgt+ cr7,ffc0a1cc <pthread_rwlock_timedrdlock+0x9c><== NEVER TAKEN
ffc0a210: 4b ff ff c4 b ffc0a1d4 <pthread_rwlock_timedrdlock+0xa4>
ffc0a214 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc0a214: 94 21 ff d8 stwu r1,-40(r1)
ffc0a218: 7c 08 02 a6 mflr r0
ffc0a21c: 93 81 00 18 stw r28,24(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc0a220: 7c 7c 1b 79 mr. r28,r3
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc0a224: 7c 83 23 78 mr r3,r4
ffc0a228: 93 e1 00 24 stw r31,36(r1)
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
return EINVAL;
ffc0a22c: 3b e0 00 16 li r31,22
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc0a230: 90 01 00 2c stw r0,44(r1)
ffc0a234: 93 a1 00 1c stw r29,28(r1)
ffc0a238: 93 c1 00 20 stw r30,32(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc0a23c: 41 82 00 7c beq- ffc0a2b8 <pthread_rwlock_timedwrlock+0xa4>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
ffc0a240: 38 81 00 08 addi r4,r1,8
ffc0a244: 48 00 85 89 bl ffc127cc <_POSIX_Absolute_timeout_to_ticks>
ffc0a248: 80 9c 00 00 lwz r4,0(r28)
ffc0a24c: 7c 7e 1b 78 mr r30,r3
ffc0a250: 3c 60 00 00 lis r3,0
ffc0a254: 38 63 2d ec addi r3,r3,11756
ffc0a258: 38 a1 00 0c addi r5,r1,12
ffc0a25c: 48 00 36 e9 bl ffc0d944 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
ffc0a260: 80 01 00 0c lwz r0,12(r1)
ffc0a264: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a268: 40 9e 00 50 bne- cr7,ffc0a2b8 <pthread_rwlock_timedwrlock+0xa4>
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
ffc0a26c: 6b dd 00 03 xori r29,r30,3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
ffc0a270: 80 9c 00 00 lwz r4,0(r28)
ffc0a274: 7f bd 00 34 cntlzw r29,r29
ffc0a278: 80 c1 00 08 lwz r6,8(r1)
ffc0a27c: 57 bd d9 7e rlwinm r29,r29,27,5,31
ffc0a280: 38 63 00 10 addi r3,r3,16
ffc0a284: 7f a5 eb 78 mr r5,r29
ffc0a288: 38 e0 00 00 li r7,0
ffc0a28c: 48 00 27 15 bl ffc0c9a0 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
ffc0a290: 48 00 47 95 bl ffc0ea24 <_Thread_Enable_dispatch>
if ( !do_wait &&
ffc0a294: 2f 9d 00 00 cmpwi cr7,r29,0
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
ffc0a298: 3d 20 00 00 lis r9,0
ffc0a29c: 81 29 31 30 lwz r9,12592(r9)
ffc0a2a0: 80 69 00 34 lwz r3,52(r9)
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
ffc0a2a4: 40 9e 00 0c bne- cr7,ffc0a2b0 <pthread_rwlock_timedwrlock+0x9c>
ffc0a2a8: 2f 83 00 02 cmpwi cr7,r3,2
ffc0a2ac: 41 9e 00 30 beq- cr7,ffc0a2dc <pthread_rwlock_timedwrlock+0xc8>
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
ffc0a2b0: 48 00 00 49 bl ffc0a2f8 <_POSIX_RWLock_Translate_core_RWLock_return_code>
ffc0a2b4: 7c 7f 1b 78 mr r31,r3
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
ffc0a2b8: 80 01 00 2c lwz r0,44(r1)
ffc0a2bc: 7f e3 fb 78 mr r3,r31
ffc0a2c0: 83 81 00 18 lwz r28,24(r1)
ffc0a2c4: 7c 08 03 a6 mtlr r0
ffc0a2c8: 83 a1 00 1c lwz r29,28(r1)
ffc0a2cc: 83 c1 00 20 lwz r30,32(r1)
ffc0a2d0: 83 e1 00 24 lwz r31,36(r1)
ffc0a2d4: 38 21 00 28 addi r1,r1,40
ffc0a2d8: 4e 80 00 20 blr
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
ffc0a2dc: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a2e0: 41 9e ff d8 beq+ cr7,ffc0a2b8 <pthread_rwlock_timedwrlock+0xa4><== NEVER TAKEN
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc0a2e4: 3b de ff ff addi r30,r30,-1
ffc0a2e8: 2b 9e 00 01 cmplwi cr7,r30,1
status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
return ETIMEDOUT;
ffc0a2ec: 3b e0 00 74 li r31,116
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID )
return EINVAL;
if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST ||
ffc0a2f0: 41 9d ff c0 bgt+ cr7,ffc0a2b0 <pthread_rwlock_timedwrlock+0x9c><== NEVER TAKEN
ffc0a2f4: 4b ff ff c4 b ffc0a2b8 <pthread_rwlock_timedwrlock+0xa4>
ffc0bfbc <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0bfbc: 94 21 ff d0 stwu r1,-48(r1)
ffc0bfc0: 7c 08 02 a6 mflr r0
ffc0bfc4: 93 e1 00 2c stw r31,44(r1)
int rc;
/*
* Check all the parameters
*/
if ( !param )
ffc0bfc8: 7c bf 2b 79 mr. r31,r5
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0bfcc: 93 81 00 20 stw r28,32(r1)
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
ffc0bfd0: 3b 80 00 16 li r28,22
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0bfd4: 93 a1 00 24 stw r29,36(r1)
ffc0bfd8: 7c 7d 1b 78 mr r29,r3
ffc0bfdc: 93 c1 00 28 stw r30,40(r1)
ffc0bfe0: 7c 9e 23 78 mr r30,r4
ffc0bfe4: 90 01 00 34 stw r0,52(r1)
ffc0bfe8: 93 61 00 1c stw r27,28(r1)
int rc;
/*
* Check all the parameters
*/
if ( !param )
ffc0bfec: 41 82 00 20 beq- ffc0c00c <pthread_setschedparam+0x50>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
ffc0bff0: 7c 83 23 78 mr r3,r4
ffc0bff4: 38 a1 00 10 addi r5,r1,16
ffc0bff8: 7f e4 fb 78 mr r4,r31
ffc0bffc: 38 c1 00 0c addi r6,r1,12
ffc0c000: 48 00 7a 79 bl ffc13a78 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
ffc0c004: 7c 7c 1b 79 mr. r28,r3
ffc0c008: 41 82 00 2c beq- ffc0c034 <pthread_setschedparam+0x78>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
ffc0c00c: 80 01 00 34 lwz r0,52(r1)
ffc0c010: 7f 83 e3 78 mr r3,r28
ffc0c014: 83 61 00 1c lwz r27,28(r1)
ffc0c018: 7c 08 03 a6 mtlr r0
ffc0c01c: 83 81 00 20 lwz r28,32(r1)
ffc0c020: 83 a1 00 24 lwz r29,36(r1)
ffc0c024: 83 c1 00 28 lwz r30,40(r1)
ffc0c028: 83 e1 00 2c lwz r31,44(r1)
ffc0c02c: 38 21 00 30 addi r1,r1,48
ffc0c030: 4e 80 00 20 blr
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
ffc0c034: 7f a3 eb 78 mr r3,r29
ffc0c038: 38 81 00 08 addi r4,r1,8
ffc0c03c: 48 00 3a 99 bl ffc0fad4 <_Thread_Get>
switch ( location ) {
ffc0c040: 80 01 00 08 lwz r0,8(r1)
return rc;
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _Thread_Get( thread, &location );
ffc0c044: 7c 7b 1b 78 mr r27,r3
switch ( location ) {
ffc0c048: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c04c: 40 9e 00 98 bne- cr7,ffc0c0e4 <pthread_setschedparam+0x128>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0c050: 83 a3 01 34 lwz r29,308(r3)
if ( api->schedpolicy == SCHED_SPORADIC )
ffc0c054: 80 1d 00 84 lwz r0,132(r29)
ffc0c058: 2f 80 00 04 cmpwi cr7,r0,4
ffc0c05c: 41 9e 00 e4 beq- cr7,ffc0c140 <pthread_setschedparam+0x184>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
ffc0c060: 93 dd 00 84 stw r30,132(r29)
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
ffc0c064: 2f 9e 00 00 cmpwi cr7,r30,0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
ffc0c068: 81 5f 00 04 lwz r10,4(r31)
ffc0c06c: 81 7f 00 08 lwz r11,8(r31)
ffc0c070: 81 3f 00 0c lwz r9,12(r31)
ffc0c074: 80 1f 00 00 lwz r0,0(r31)
ffc0c078: 91 5d 00 8c stw r10,140(r29)
ffc0c07c: 90 1d 00 88 stw r0,136(r29)
ffc0c080: 91 7d 00 90 stw r11,144(r29)
ffc0c084: 91 3d 00 94 stw r9,148(r29)
ffc0c088: 81 3f 00 18 lwz r9,24(r31)
ffc0c08c: 81 5f 00 10 lwz r10,16(r31)
ffc0c090: 81 7f 00 14 lwz r11,20(r31)
ffc0c094: 91 3d 00 a0 stw r9,160(r29)
the_thread->budget_algorithm = budget_algorithm;
ffc0c098: 81 21 00 10 lwz r9,16(r1)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
ffc0c09c: 91 5d 00 98 stw r10,152(r29)
ffc0c0a0: 91 7d 00 9c stw r11,156(r29)
the_thread->budget_algorithm = budget_algorithm;
ffc0c0a4: 91 3b 00 7c stw r9,124(r27)
the_thread->budget_callout = budget_callout;
ffc0c0a8: 81 21 00 0c lwz r9,12(r1)
ffc0c0ac: 91 3b 00 80 stw r9,128(r27)
switch ( api->schedpolicy ) {
ffc0c0b0: 41 9c 00 2c blt- cr7,ffc0c0dc <pthread_setschedparam+0x120><== NEVER TAKEN
ffc0c0b4: 2f 9e 00 02 cmpwi cr7,r30,2
ffc0c0b8: 40 9d 00 58 ble- cr7,ffc0c110 <pthread_setschedparam+0x154>
ffc0c0bc: 2f 9e 00 04 cmpwi cr7,r30,4
ffc0c0c0: 40 be 00 1c bne+ cr7,ffc0c0dc <pthread_setschedparam+0x120><== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
ffc0c0c4: 90 1d 00 a4 stw r0,164(r29)
_Watchdog_Remove( &api->Sporadic_timer );
ffc0c0c8: 38 7d 00 a8 addi r3,r29,168
ffc0c0cc: 48 00 51 11 bl ffc111dc <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
ffc0c0d0: 38 60 00 00 li r3,0
ffc0c0d4: 7f 64 db 78 mr r4,r27
ffc0c0d8: 4b ff fd 3d bl ffc0be14 <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
ffc0c0dc: 48 00 39 bd bl ffc0fa98 <_Thread_Enable_dispatch>
return 0;
ffc0c0e0: 4b ff ff 2c b ffc0c00c <pthread_setschedparam+0x50>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
ffc0c0e4: 80 01 00 34 lwz r0,52(r1)
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
ffc0c0e8: 3b 80 00 03 li r28,3
}
ffc0c0ec: 7f 83 e3 78 mr r3,r28
ffc0c0f0: 83 61 00 1c lwz r27,28(r1)
ffc0c0f4: 7c 08 03 a6 mtlr r0
ffc0c0f8: 83 81 00 20 lwz r28,32(r1)
ffc0c0fc: 83 a1 00 24 lwz r29,36(r1)
ffc0c100: 83 c1 00 28 lwz r30,40(r1)
ffc0c104: 83 e1 00 2c lwz r31,44(r1)
ffc0c108: 38 21 00 30 addi r1,r1,48
ffc0c10c: 4e 80 00 20 blr
ffc0c110: 3d 20 00 00 lis r9,0
ffc0c114: 88 89 27 64 lbz r4,10084(r9)
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0c118: 3d 20 00 00 lis r9,0
ffc0c11c: 81 29 28 84 lwz r9,10372(r9)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0c120: 7f 63 db 78 mr r3,r27
ffc0c124: 7c 80 20 50 subf r4,r0,r4
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0c128: 91 3b 00 78 stw r9,120(r27)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0c12c: 38 a0 00 01 li r5,1
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
the_thread->real_priority =
ffc0c130: 90 9b 00 18 stw r4,24(r27)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0c134: 48 00 33 41 bl ffc0f474 <_Thread_Change_priority>
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
ffc0c138: 48 00 39 61 bl ffc0fa98 <_Thread_Enable_dispatch>
ffc0c13c: 4b ff fe d0 b ffc0c00c <pthread_setschedparam+0x50>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
ffc0c140: 38 7d 00 a8 addi r3,r29,168
ffc0c144: 48 00 50 99 bl ffc111dc <_Watchdog_Remove>
ffc0c148: 4b ff ff 18 b ffc0c060 <pthread_setschedparam+0xa4>
ffc11880 <pthread_sigmask>:
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
ffc11880: 2c 04 00 00 cmpwi r4,0
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
ffc11884: 94 21 ff f0 stwu r1,-16(r1)
ffc11888: 7c 08 02 a6 mflr r0
POSIX_API_Control *api;
if ( !set && !oset )
ffc1188c: 2f 85 00 00 cmpwi cr7,r5,0
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
ffc11890: 90 01 00 14 stw r0,20(r1)
POSIX_API_Control *api;
if ( !set && !oset )
ffc11894: 41 82 00 c0 beq- ffc11954 <pthread_sigmask+0xd4>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc11898: 3d 20 00 00 lis r9,0
ffc1189c: 81 29 31 90 lwz r9,12688(r9)
ffc118a0: 81 29 01 34 lwz r9,308(r9)
if ( oset )
ffc118a4: 41 9e 00 10 beq- cr7,ffc118b4 <pthread_sigmask+0x34>
*oset = api->signals_blocked;
ffc118a8: 80 09 00 d0 lwz r0,208(r9)
ffc118ac: 90 05 00 00 stw r0,0(r5)
if ( !set )
ffc118b0: 41 82 00 c0 beq- ffc11970 <pthread_sigmask+0xf0> <== NEVER TAKEN
return 0;
switch ( how ) {
ffc118b4: 2f 83 00 01 cmpwi cr7,r3,1
ffc118b8: 41 9e 00 88 beq- cr7,ffc11940 <pthread_sigmask+0xc0>
ffc118bc: 2f 83 00 02 cmpwi cr7,r3,2
ffc118c0: 41 9e 00 4c beq- cr7,ffc1190c <pthread_sigmask+0x8c>
ffc118c4: 2f 83 00 00 cmpwi cr7,r3,0
ffc118c8: 40 9e 00 58 bne- cr7,ffc11920 <pthread_sigmask+0xa0>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
ffc118cc: 80 04 00 00 lwz r0,0(r4)
ffc118d0: 90 09 00 d0 stw r0,208(r9)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
ffc118d4: 3d 60 00 00 lis r11,0
ffc118d8: 81 29 00 d4 lwz r9,212(r9)
ffc118dc: 81 6b 28 bc lwz r11,10428(r11)
_Thread_Dispatch();
}
return 0;
ffc118e0: 38 60 00 00 li r3,0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
ffc118e4: 7d 69 4b 78 or r9,r11,r9
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
ffc118e8: 7d 2b 00 79 andc. r11,r9,r0
ffc118ec: 41 a2 00 10 beq+ ffc118fc <pthread_sigmask+0x7c>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
ffc118f0: 90 61 00 08 stw r3,8(r1)
ffc118f4: 4b ff b8 99 bl ffc0d18c <_Thread_Dispatch>
ffc118f8: 80 61 00 08 lwz r3,8(r1)
}
return 0;
}
ffc118fc: 80 01 00 14 lwz r0,20(r1)
ffc11900: 38 21 00 10 addi r1,r1,16
ffc11904: 7c 08 03 a6 mtlr r0
ffc11908: 4e 80 00 20 blr
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
ffc1190c: 81 64 00 00 lwz r11,0(r4)
ffc11910: 80 09 00 d0 lwz r0,208(r9)
ffc11914: 7c 00 58 78 andc r0,r0,r11
ffc11918: 90 09 00 d0 stw r0,208(r9)
break;
ffc1191c: 4b ff ff b8 b ffc118d4 <pthread_sigmask+0x54>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc11920: 48 00 33 91 bl ffc14cb0 <__errno>
ffc11924: 38 00 00 16 li r0,22
ffc11928: 90 03 00 00 stw r0,0(r3)
ffc1192c: 38 60 ff ff li r3,-1
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
ffc11930: 80 01 00 14 lwz r0,20(r1)
ffc11934: 38 21 00 10 addi r1,r1,16
ffc11938: 7c 08 03 a6 mtlr r0
ffc1193c: 4e 80 00 20 blr
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
ffc11940: 80 09 00 d0 lwz r0,208(r9)
ffc11944: 81 64 00 00 lwz r11,0(r4)
ffc11948: 7c 00 5b 78 or r0,r0,r11
ffc1194c: 90 09 00 d0 stw r0,208(r9)
break;
ffc11950: 4b ff ff 84 b ffc118d4 <pthread_sigmask+0x54>
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
ffc11954: 41 be ff cc beq- cr7,ffc11920 <pthread_sigmask+0xa0>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc11958: 3d 20 00 00 lis r9,0
ffc1195c: 81 29 31 90 lwz r9,12688(r9)
ffc11960: 81 29 01 34 lwz r9,308(r9)
if ( oset )
*oset = api->signals_blocked;
ffc11964: 80 09 00 d0 lwz r0,208(r9)
ffc11968: 90 05 00 00 stw r0,0(r5)
if ( !set )
ffc1196c: 40 82 ff 48 bne+ ffc118b4 <pthread_sigmask+0x34> <== NEVER TAKEN
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
ffc11970: 80 01 00 14 lwz r0,20(r1)
if ( oset )
*oset = api->signals_blocked;
if ( !set )
return 0;
ffc11974: 38 60 00 00 li r3,0
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
ffc11978: 38 21 00 10 addi r1,r1,16
ffc1197c: 7c 08 03 a6 mtlr r0
ffc11980: 4e 80 00 20 blr
ffc0953c <pthread_testcancel>:
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
ffc0953c: 94 21 ff f0 stwu r1,-16(r1)
ffc09540: 7c 08 02 a6 mflr r0
ffc09544: 93 e1 00 0c stw r31,12(r1)
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
ffc09548: 3f e0 00 00 lis r31,0
ffc0954c: 3b ff 31 04 addi r31,r31,12548
/*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
ffc09550: 90 01 00 14 stw r0,20(r1)
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
ffc09554: 80 1f 00 08 lwz r0,8(r31)
ffc09558: 2f 80 00 00 cmpwi cr7,r0,0
ffc0955c: 40 9e 00 48 bne- cr7,ffc095a4 <pthread_testcancel+0x68> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc09560: 3d 20 00 00 lis r9,0
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc09564: 81 7f 00 0c lwz r11,12(r31)
ffc09568: 81 49 28 0c lwz r10,10252(r9)
ffc0956c: 81 6b 01 34 lwz r11,308(r11)
ffc09570: 38 0a 00 01 addi r0,r10,1
ffc09574: 90 09 28 0c stw r0,10252(r9)
return _Thread_Dispatch_disable_level;
ffc09578: 80 09 28 0c lwz r0,10252(r9)
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc0957c: 80 0b 00 d8 lwz r0,216(r11)
ffc09580: 2f 80 00 00 cmpwi cr7,r0,0
ffc09584: 40 9e 00 34 bne- cr7,ffc095b8 <pthread_testcancel+0x7c> <== NEVER TAKEN
ffc09588: 80 0b 00 e0 lwz r0,224(r11)
ffc0958c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09590: 41 9e 00 28 beq- cr7,ffc095b8 <pthread_testcancel+0x7c>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
ffc09594: 48 00 38 51 bl ffc0cde4 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
ffc09598: 80 7f 00 0c lwz r3,12(r31)
ffc0959c: 38 80 ff ff li r4,-1
ffc095a0: 48 00 79 31 bl ffc10ed0 <_POSIX_Thread_Exit>
}
ffc095a4: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
ffc095a8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc095ac: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc095b0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc095b4: 4e 80 00 20 blr <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
ffc095b8: 48 00 38 2d bl ffc0cde4 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
}
ffc095bc: 80 01 00 14 lwz r0,20(r1)
ffc095c0: 83 e1 00 0c lwz r31,12(r1)
ffc095c4: 38 21 00 10 addi r1,r1,16
ffc095c8: 7c 08 03 a6 mtlr r0
ffc095cc: 4e 80 00 20 blr
ffc0a2e8 <rtems_aio_enqueue>:
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
ffc0a2e8: 94 21 ff b0 stwu r1,-80(r1)
ffc0a2ec: 7c 08 02 a6 mflr r0
ffc0a2f0: 93 e1 00 4c stw r31,76(r1)
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
ffc0a2f4: 3f e0 00 00 lis r31,0
ffc0a2f8: 3b ff 2c 70 addi r31,r31,11376
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
ffc0a2fc: 93 a1 00 44 stw r29,68(r1)
ffc0a300: 7c 7d 1b 78 mr r29,r3
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
ffc0a304: 7f e3 fb 78 mr r3,r31
* errno - otherwise
*/
int
rtems_aio_enqueue (rtems_aio_request *req)
{
ffc0a308: 93 c1 00 48 stw r30,72(r1)
ffc0a30c: 90 01 00 54 stw r0,84(r1)
ffc0a310: 93 61 00 3c stw r27,60(r1)
ffc0a314: 93 81 00 40 stw r28,64(r1)
struct sched_param param;
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
ffc0a318: 48 00 0c 0d bl ffc0af24 <pthread_mutex_lock>
if (result != 0) {
ffc0a31c: 7c 7e 1b 79 mr. r30,r3
ffc0a320: 40 82 00 d4 bne- ffc0a3f4 <rtems_aio_enqueue+0x10c> <== NEVER TAKEN
return result;
}
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
ffc0a324: 48 00 17 61 bl ffc0ba84 <pthread_self>
ffc0a328: 38 81 00 08 addi r4,r1,8
ffc0a32c: 38 a1 00 10 addi r5,r1,16
ffc0a330: 48 00 11 91 bl ffc0b4c0 <pthread_getschedparam>
req->caller_thread = pthread_self ();
ffc0a334: 48 00 17 51 bl ffc0ba84 <pthread_self>
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
ffc0a338: 80 1f 00 68 lwz r0,104(r31)
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
ffc0a33c: 81 3d 00 14 lwz r9,20(r29)
req->policy = policy;
req->aiocbp->error_code = EINPROGRESS;
req->aiocbp->return_value = 0;
if ((aio_request_queue.idle_threads == 0) &&
ffc0a340: 2f 80 00 00 cmpwi cr7,r0,0
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
ffc0a344: 81 61 00 10 lwz r11,16(r1)
ffc0a348: 80 09 00 18 lwz r0,24(r9)
/* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined,
we can use aio_reqprio to lower the priority of the request */
pthread_getschedparam (pthread_self(), &policy, ¶m);
req->caller_thread = pthread_self ();
ffc0a34c: 90 7d 00 10 stw r3,16(r29)
req->priority = param.sched_priority - req->aiocbp->aio_reqprio;
ffc0a350: 7c 00 58 50 subf r0,r0,r11
ffc0a354: 90 1d 00 0c stw r0,12(r29)
req->policy = policy;
ffc0a358: 80 01 00 08 lwz r0,8(r1)
ffc0a35c: 90 1d 00 08 stw r0,8(r29)
req->aiocbp->error_code = EINPROGRESS;
ffc0a360: 38 00 00 77 li r0,119
ffc0a364: 90 09 00 34 stw r0,52(r9)
req->aiocbp->return_value = 0;
ffc0a368: 93 c9 00 38 stw r30,56(r9)
if ((aio_request_queue.idle_threads == 0) &&
ffc0a36c: 40 9e 00 10 bne- cr7,ffc0a37c <rtems_aio_enqueue+0x94> <== NEVER TAKEN
ffc0a370: 80 1f 00 64 lwz r0,100(r31)
ffc0a374: 2f 80 00 04 cmpwi cr7,r0,4
ffc0a378: 40 9d 00 ac ble- cr7,ffc0a424 <rtems_aio_enqueue+0x13c>
else
{
/* the maximum number of threads has been already created
even though some of them might be idle.
The request belongs to one of the active fd chain */
r_chain = rtems_aio_search_fd (&aio_request_queue.work_req,
ffc0a37c: 3f 60 00 00 lis r27,0
ffc0a380: 80 89 00 00 lwz r4,0(r9)
ffc0a384: 3b 7b 2c b8 addi r27,r27,11448
ffc0a388: 7f 63 db 78 mr r3,r27
ffc0a38c: 38 a0 00 00 li r5,0
ffc0a390: 4b ff f9 49 bl ffc09cd8 <rtems_aio_search_fd>
req->aiocbp->aio_fildes, 0);
if (r_chain != NULL)
ffc0a394: 7c 7c 1b 79 mr. r28,r3
ffc0a398: 41 82 01 04 beq- ffc0a49c <rtems_aio_enqueue+0x1b4>
{
pthread_mutex_lock (&r_chain->mutex);
ffc0a39c: 3b 7c 00 1c addi r27,r28,28
ffc0a3a0: 7f 63 db 78 mr r3,r27
ffc0a3a4: 48 00 0b 81 bl ffc0af24 <pthread_mutex_lock>
rtems_aio_insert_prio (&r_chain->perfd, req);
ffc0a3a8: 38 7c 00 08 addi r3,r28,8
ffc0a3ac: 7f a4 eb 78 mr r4,r29
ffc0a3b0: 4b ff fd a9 bl ffc0a158 <rtems_aio_insert_prio>
pthread_cond_signal (&r_chain->cond);
ffc0a3b4: 38 7c 00 20 addi r3,r28,32
ffc0a3b8: 48 00 05 6d bl ffc0a924 <pthread_cond_signal>
pthread_mutex_unlock (&r_chain->mutex);
ffc0a3bc: 7f 63 db 78 mr r3,r27
ffc0a3c0: 48 00 0c 31 bl ffc0aff0 <pthread_mutex_unlock>
if (aio_request_queue.idle_threads > 0)
pthread_cond_signal (&aio_request_queue.new_req);
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc0a3c4: 7f e3 fb 78 mr r3,r31
ffc0a3c8: 48 00 0c 29 bl ffc0aff0 <pthread_mutex_unlock>
return 0;
}
ffc0a3cc: 80 01 00 54 lwz r0,84(r1)
ffc0a3d0: 7f c3 f3 78 mr r3,r30
ffc0a3d4: 83 61 00 3c lwz r27,60(r1)
ffc0a3d8: 7c 08 03 a6 mtlr r0
ffc0a3dc: 83 81 00 40 lwz r28,64(r1)
ffc0a3e0: 83 a1 00 44 lwz r29,68(r1)
ffc0a3e4: 83 c1 00 48 lwz r30,72(r1)
ffc0a3e8: 83 e1 00 4c lwz r31,76(r1)
ffc0a3ec: 38 21 00 50 addi r1,r1,80
ffc0a3f0: 4e 80 00 20 blr
/* The queue should be initialized */
AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED);
result = pthread_mutex_lock (&aio_request_queue.mutex);
if (result != 0) {
free (req);
ffc0a3f4: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc0a3f8: 4b ff b6 19 bl ffc05a10 <free> <== NOT EXECUTED
}
}
pthread_mutex_unlock (&aio_request_queue.mutex);
return 0;
}
ffc0a3fc: 80 01 00 54 lwz r0,84(r1) <== NOT EXECUTED
ffc0a400: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc0a404: 83 61 00 3c lwz r27,60(r1) <== NOT EXECUTED
ffc0a408: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0a40c: 83 81 00 40 lwz r28,64(r1) <== NOT EXECUTED
ffc0a410: 83 a1 00 44 lwz r29,68(r1) <== NOT EXECUTED
ffc0a414: 83 c1 00 48 lwz r30,72(r1) <== NOT EXECUTED
ffc0a418: 83 e1 00 4c lwz r31,76(r1) <== NOT EXECUTED
ffc0a41c: 38 21 00 50 addi r1,r1,80 <== NOT EXECUTED
ffc0a420: 4e 80 00 20 blr <== NOT EXECUTED
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
ffc0a424: 80 89 00 00 lwz r4,0(r9)
ffc0a428: 38 7f 00 48 addi r3,r31,72
ffc0a42c: 38 a0 00 01 li r5,1
ffc0a430: 4b ff f8 a9 bl ffc09cd8 <rtems_aio_search_fd>
if (r_chain->new_fd == 1) {
ffc0a434: 80 03 00 18 lwz r0,24(r3)
if ((aio_request_queue.idle_threads == 0) &&
aio_request_queue.active_threads < AIO_MAX_THREADS)
/* we still have empty places on the active_threads chain */
{
chain = &aio_request_queue.work_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
ffc0a438: 7c 7c 1b 78 mr r28,r3
if (r_chain->new_fd == 1) {
ffc0a43c: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a440: 40 9e ff 5c bne+ cr7,ffc0a39c <rtems_aio_enqueue+0xb4>
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
ffc0a444: 7f a4 eb 78 mr r4,r29
ffc0a448: 38 63 00 08 addi r3,r3,8
ffc0a44c: 48 00 2d a9 bl ffc0d1f4 <_Chain_Insert>
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
ffc0a450: 93 dc 00 18 stw r30,24(r28)
pthread_mutex_init (&r_chain->mutex, NULL);
ffc0a454: 38 80 00 00 li r4,0
ffc0a458: 38 7c 00 1c addi r3,r28,28
ffc0a45c: 48 00 09 41 bl ffc0ad9c <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
ffc0a460: 38 80 00 00 li r4,0
ffc0a464: 38 7c 00 20 addi r3,r28,32
ffc0a468: 48 00 03 c9 bl ffc0a830 <pthread_cond_init>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
ffc0a46c: 3c a0 ff c1 lis r5,-63
ffc0a470: 38 61 00 0c addi r3,r1,12
ffc0a474: 38 9f 00 08 addi r4,r31,8
ffc0a478: 38 a5 9e a4 addi r5,r5,-24924
ffc0a47c: 7f 86 e3 78 mr r6,r28
ffc0a480: 48 00 0d 29 bl ffc0b1a8 <pthread_create>
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
ffc0a484: 7c 7d 1b 79 mr. r29,r3
ffc0a488: 40 82 00 80 bne- ffc0a508 <rtems_aio_enqueue+0x220> <== NEVER TAKEN
pthread_mutex_unlock (&aio_request_queue.mutex);
return result;
}
++aio_request_queue.active_threads;
ffc0a48c: 81 3f 00 64 lwz r9,100(r31)
ffc0a490: 38 09 00 01 addi r0,r9,1
ffc0a494: 90 1f 00 64 stw r0,100(r31)
ffc0a498: 4b ff ff 2c b ffc0a3c4 <rtems_aio_enqueue+0xdc>
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
ffc0a49c: 81 3d 00 14 lwz r9,20(r29)
ffc0a4a0: 38 7b 00 0c addi r3,r27,12
ffc0a4a4: 38 a0 00 01 li r5,1
ffc0a4a8: 80 89 00 00 lwz r4,0(r9)
ffc0a4ac: 4b ff f8 2d bl ffc09cd8 <rtems_aio_search_fd>
ffc0a4b0: 7f a4 eb 78 mr r4,r29
if (r_chain->new_fd == 1) {
ffc0a4b4: 80 03 00 18 lwz r0,24(r3)
} else {
/* or to the idle chain */
chain = &aio_request_queue.idle_req;
r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1);
ffc0a4b8: 7c 7b 1b 78 mr r27,r3
ffc0a4bc: 38 63 00 08 addi r3,r3,8
if (r_chain->new_fd == 1) {
ffc0a4c0: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a4c4: 41 9e 00 20 beq- cr7,ffc0a4e4 <rtems_aio_enqueue+0x1fc>
r_chain->new_fd = 0;
pthread_mutex_init (&r_chain->mutex, NULL);
pthread_cond_init (&r_chain->cond, NULL);
} else
/* just insert the request in the existing fd chain */
rtems_aio_insert_prio (&r_chain->perfd, req);
ffc0a4c8: 4b ff fc 91 bl ffc0a158 <rtems_aio_insert_prio>
if (aio_request_queue.idle_threads > 0)
ffc0a4cc: 80 1f 00 68 lwz r0,104(r31)
ffc0a4d0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a4d4: 40 bd fe f0 ble- cr7,ffc0a3c4 <rtems_aio_enqueue+0xdc> <== ALWAYS TAKEN
pthread_cond_signal (&aio_request_queue.new_req);
ffc0a4d8: 38 7f 00 04 addi r3,r31,4 <== NOT EXECUTED
ffc0a4dc: 48 00 04 49 bl ffc0a924 <pthread_cond_signal> <== NOT EXECUTED
ffc0a4e0: 4b ff fe e4 b ffc0a3c4 <rtems_aio_enqueue+0xdc> <== NOT EXECUTED
ffc0a4e4: 48 00 2d 11 bl ffc0d1f4 <_Chain_Insert>
if (r_chain->new_fd == 1) {
/* If this is a new fd chain we signal the idle threads that
might be waiting for requests */
AIO_printf (" New chain on waiting queue \n ");
rtems_chain_prepend (&r_chain->perfd, &req->next_prio);
r_chain->new_fd = 0;
ffc0a4e8: 93 9b 00 18 stw r28,24(r27)
pthread_mutex_init (&r_chain->mutex, NULL);
ffc0a4ec: 38 7b 00 1c addi r3,r27,28
ffc0a4f0: 38 80 00 00 li r4,0
ffc0a4f4: 48 00 08 a9 bl ffc0ad9c <pthread_mutex_init>
pthread_cond_init (&r_chain->cond, NULL);
ffc0a4f8: 38 7b 00 20 addi r3,r27,32
ffc0a4fc: 38 80 00 00 li r4,0
ffc0a500: 48 00 03 31 bl ffc0a830 <pthread_cond_init>
ffc0a504: 4b ff ff c8 b ffc0a4cc <rtems_aio_enqueue+0x1e4>
AIO_printf ("New thread \n");
result = pthread_create (&thid, &aio_request_queue.attr,
rtems_aio_handle, (void *) r_chain);
if (result != 0) {
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc0a508: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc0a50c: 48 00 0a e5 bl ffc0aff0 <pthread_mutex_unlock> <== NOT EXECUTED
return result;
ffc0a510: 7f be eb 78 mr r30,r29 <== NOT EXECUTED
ffc0a514: 4b ff fe b8 b ffc0a3cc <rtems_aio_enqueue+0xe4> <== NOT EXECUTED
ffc09ea4 <rtems_aio_handle>:
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc09ea4: 94 21 ff a0 stwu r1,-96(r1)
ffc09ea8: 7c 08 02 a6 mflr r0
ffc09eac: 93 41 00 48 stw r26,72(r1)
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
ffc09eb0: 3f 40 00 00 lis r26,0
ffc09eb4: 3b 5a 2c 70 addi r26,r26,11376
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc09eb8: 90 01 00 64 stw r0,100(r1)
ffc09ebc: 92 c1 00 38 stw r22,56(r1)
ffc09ec0: 93 e1 00 5c stw r31,92(r1)
ffc09ec4: 92 e1 00 3c stw r23,60(r1)
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc09ec8: 3a fa 00 04 addi r23,r26,4
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc09ecc: 93 01 00 40 stw r24,64(r1)
pthread_cond_destroy (&r_chain->cond);
free (r_chain);
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
ffc09ed0: 3b 1a 00 58 addi r24,r26,88
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc09ed4: 93 21 00 44 stw r25,68(r1)
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
ffc09ed8: 3b 20 ff ff li r25,-1
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc09edc: 93 61 00 4c stw r27,76(r1)
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
ffc09ee0: 7f 5b d3 78 mr r27,r26
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc09ee4: 93 81 00 50 stw r28,80(r1)
if (result == -1) {
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
req->aiocbp->error_code = 0;
ffc09ee8: 3b 80 00 00 li r28,0
* NULL - if error
*/
static void *
rtems_aio_handle (void *arg)
{
ffc09eec: 93 a1 00 54 stw r29,84(r1)
ffc09ef0: 3b a3 00 1c addi r29,r3,28
ffc09ef4: 93 c1 00 58 stw r30,88(r1)
ffc09ef8: 7c 7e 1b 78 mr r30,r3
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
ffc09efc: 7f a3 eb 78 mr r3,r29
ffc09f00: 48 00 10 25 bl ffc0af24 <pthread_mutex_lock>
if (result != 0)
ffc09f04: 7c 76 1b 79 mr. r22,r3
ffc09f08: 40 82 00 8c bne- ffc09f94 <rtems_aio_handle+0xf0> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc09f0c: 83 fe 00 08 lwz r31,8(r30)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc09f10: 38 1e 00 0c addi r0,r30,12
/* If the locked chain is not empty, take the first
request extract it, unlock the chain and process
the request, in this way the user can supply more
requests to this fd chain */
if (!rtems_chain_is_empty (chain)) {
ffc09f14: 7f 9f 00 00 cmpw cr7,r31,r0
ffc09f18: 41 9e 01 10 beq- cr7,ffc0a028 <rtems_aio_handle+0x184>
node = rtems_chain_first (chain);
req = (rtems_aio_request *) node;
/* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING
discussion in rtems_aio_enqueue () */
pthread_getschedparam (pthread_self(), &policy, ¶m);
ffc09f1c: 48 00 1b 69 bl ffc0ba84 <pthread_self>
ffc09f20: 38 81 00 08 addi r4,r1,8
ffc09f24: 38 a1 00 14 addi r5,r1,20
ffc09f28: 48 00 15 99 bl ffc0b4c0 <pthread_getschedparam>
param.sched_priority = req->priority;
ffc09f2c: 80 1f 00 0c lwz r0,12(r31)
ffc09f30: 90 01 00 14 stw r0,20(r1)
pthread_setschedparam (pthread_self(), req->policy, ¶m);
ffc09f34: 48 00 1b 51 bl ffc0ba84 <pthread_self>
ffc09f38: 38 a1 00 14 addi r5,r1,20
ffc09f3c: 80 9f 00 08 lwz r4,8(r31)
ffc09f40: 48 00 1b 55 bl ffc0ba94 <pthread_setschedparam>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc09f44: 7f e3 fb 78 mr r3,r31
ffc09f48: 48 00 32 45 bl ffc0d18c <_Chain_Extract>
rtems_chain_extract (node);
pthread_mutex_unlock (&r_chain->mutex);
ffc09f4c: 7f a3 eb 78 mr r3,r29
ffc09f50: 48 00 10 a1 bl ffc0aff0 <pthread_mutex_unlock>
switch (req->aiocbp->aio_lio_opcode) {
ffc09f54: 82 df 00 14 lwz r22,20(r31)
ffc09f58: 80 16 00 30 lwz r0,48(r22)
ffc09f5c: 2f 80 00 02 cmpwi cr7,r0,2
ffc09f60: 41 9e 00 ac beq- cr7,ffc0a00c <rtems_aio_handle+0x168>
ffc09f64: 2f 80 00 03 cmpwi cr7,r0,3
ffc09f68: 41 9e 00 98 beq- cr7,ffc0a000 <rtems_aio_handle+0x15c> <== NEVER TAKEN
ffc09f6c: 2f 80 00 01 cmpwi cr7,r0,1
ffc09f70: 41 9e 00 60 beq- cr7,ffc09fd0 <rtems_aio_handle+0x12c> <== ALWAYS TAKEN
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
ffc09f74: 93 36 00 38 stw r25,56(r22) <== NOT EXECUTED
req->aiocbp->error_code = errno;
ffc09f78: 48 00 cd 51 bl ffc16cc8 <__errno> <== NOT EXECUTED
ffc09f7c: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
ffc09f80: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
default:
result = -1;
}
if (result == -1) {
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
ffc09f84: 90 16 00 34 stw r0,52(r22) <== NOT EXECUTED
/* acquire the mutex of the current fd chain.
we don't need to lock the queue mutex since we can
add requests to idle fd chains or even active ones
if the working request has been extracted from the
chain */
result = pthread_mutex_lock (&r_chain->mutex);
ffc09f88: 48 00 0f 9d bl ffc0af24 <pthread_mutex_lock> <== NOT EXECUTED
if (result != 0)
ffc09f8c: 7c 76 1b 79 mr. r22,r3 <== NOT EXECUTED
ffc09f90: 41 82 ff 7c beq+ ffc09f0c <rtems_aio_handle+0x68> <== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc09f94: 80 01 00 64 lwz r0,100(r1)
ffc09f98: 38 60 00 00 li r3,0
ffc09f9c: 82 c1 00 38 lwz r22,56(r1)
ffc09fa0: 7c 08 03 a6 mtlr r0
ffc09fa4: 82 e1 00 3c lwz r23,60(r1)
ffc09fa8: 83 01 00 40 lwz r24,64(r1)
ffc09fac: 83 21 00 44 lwz r25,68(r1)
ffc09fb0: 83 41 00 48 lwz r26,72(r1)
ffc09fb4: 83 61 00 4c lwz r27,76(r1)
ffc09fb8: 83 81 00 50 lwz r28,80(r1)
ffc09fbc: 83 a1 00 54 lwz r29,84(r1)
ffc09fc0: 83 c1 00 58 lwz r30,88(r1)
ffc09fc4: 83 e1 00 5c lwz r31,92(r1)
ffc09fc8: 38 21 00 60 addi r1,r1,96
ffc09fcc: 4e 80 00 20 blr
pthread_mutex_unlock (&r_chain->mutex);
switch (req->aiocbp->aio_lio_opcode) {
case LIO_READ:
AIO_printf ("read\n");
result = pread (req->aiocbp->aio_fildes,
ffc09fd0: 80 76 00 00 lwz r3,0(r22)
ffc09fd4: 80 96 00 10 lwz r4,16(r22)
ffc09fd8: 80 b6 00 14 lwz r5,20(r22)
ffc09fdc: 80 f6 00 08 lwz r7,8(r22)
ffc09fe0: 81 16 00 0c lwz r8,12(r22)
ffc09fe4: 48 00 dc 19 bl ffc17bfc <pread>
break;
default:
result = -1;
}
if (result == -1) {
ffc09fe8: 2f 83 ff ff cmpwi cr7,r3,-1
ffc09fec: 41 9e 01 4c beq- cr7,ffc0a138 <rtems_aio_handle+0x294> <== NEVER TAKEN
req->aiocbp->return_value = -1;
req->aiocbp->error_code = errno;
} else {
req->aiocbp->return_value = result;
ffc09ff0: 81 3f 00 14 lwz r9,20(r31)
ffc09ff4: 90 69 00 38 stw r3,56(r9)
req->aiocbp->error_code = 0;
ffc09ff8: 93 89 00 34 stw r28,52(r9)
ffc09ffc: 4b ff ff 00 b ffc09efc <rtems_aio_handle+0x58>
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_SYNC:
AIO_printf ("sync\n");
result = fsync (req->aiocbp->aio_fildes);
ffc0a000: 80 76 00 00 lwz r3,0(r22) <== NOT EXECUTED
ffc0a004: 48 00 8b 09 bl ffc12b0c <fsync> <== NOT EXECUTED
break;
ffc0a008: 4b ff ff e0 b ffc09fe8 <rtems_aio_handle+0x144> <== NOT EXECUTED
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
case LIO_WRITE:
AIO_printf ("write\n");
result = pwrite (req->aiocbp->aio_fildes,
ffc0a00c: 80 76 00 00 lwz r3,0(r22)
ffc0a010: 80 96 00 10 lwz r4,16(r22)
ffc0a014: 80 b6 00 14 lwz r5,20(r22)
ffc0a018: 80 f6 00 08 lwz r7,8(r22)
ffc0a01c: 81 16 00 0c lwz r8,12(r22)
ffc0a020: 48 00 dd 19 bl ffc17d38 <pwrite>
(void *) req->aiocbp->aio_buf,
req->aiocbp->aio_nbytes, req->aiocbp->aio_offset);
break;
ffc0a024: 4b ff ff c4 b ffc09fe8 <rtems_aio_handle+0x144>
struct timespec timeout;
AIO_printf ("Chain is empty [WQ], wait for work\n");
pthread_mutex_unlock (&r_chain->mutex);
ffc0a028: 7f a3 eb 78 mr r3,r29
ffc0a02c: 48 00 0f c5 bl ffc0aff0 <pthread_mutex_unlock>
pthread_mutex_lock (&aio_request_queue.mutex);
ffc0a030: 7f 63 db 78 mr r3,r27
ffc0a034: 48 00 0e f1 bl ffc0af24 <pthread_mutex_lock>
if (rtems_chain_is_empty (chain))
ffc0a038: 80 1e 00 08 lwz r0,8(r30)
ffc0a03c: 7f 9f 00 00 cmpw cr7,r31,r0
ffc0a040: 41 9e 00 10 beq- cr7,ffc0a050 <rtems_aio_handle+0x1ac> <== ALWAYS TAKEN
}
}
/* If there was a request added in the initial fd chain then release
the mutex and process it */
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc0a044: 7f 63 db 78 mr r3,r27
ffc0a048: 48 00 0f a9 bl ffc0aff0 <pthread_mutex_unlock>
ffc0a04c: 4b ff fe b0 b ffc09efc <rtems_aio_handle+0x58>
pthread_mutex_unlock (&r_chain->mutex);
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
ffc0a050: 38 81 00 0c addi r4,r1,12
ffc0a054: 38 60 00 01 li r3,1
ffc0a058: 48 00 06 29 bl ffc0a680 <clock_gettime>
timeout.tv_sec += 3;
ffc0a05c: 81 21 00 0c lwz r9,12(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
ffc0a060: 3b fe 00 20 addi r31,r30,32
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
ffc0a064: 92 c1 00 10 stw r22,16(r1)
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc0a068: 38 09 00 03 addi r0,r9,3
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
ffc0a06c: 7f e3 fb 78 mr r3,r31
pthread_mutex_lock (&aio_request_queue.mutex);
if (rtems_chain_is_empty (chain))
{
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc0a070: 90 01 00 0c stw r0,12(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&r_chain->cond,
ffc0a074: 7f 64 db 78 mr r4,r27
ffc0a078: 38 a1 00 0c addi r5,r1,12
ffc0a07c: 48 00 09 85 bl ffc0aa00 <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no requests were added to the chain we delete the fd chain from
the queue and start working with idle fd chains */
if (result == ETIMEDOUT) {
ffc0a080: 2f 83 00 74 cmpwi cr7,r3,116
ffc0a084: 40 9e ff c0 bne+ cr7,ffc0a044 <rtems_aio_handle+0x1a0> <== NEVER TAKEN
ffc0a088: 7f c3 f3 78 mr r3,r30
ffc0a08c: 48 00 31 01 bl ffc0d18c <_Chain_Extract>
rtems_chain_extract (&r_chain->next_fd);
pthread_mutex_destroy (&r_chain->mutex);
ffc0a090: 7f a3 eb 78 mr r3,r29
ffc0a094: 48 00 0b 45 bl ffc0abd8 <pthread_mutex_destroy>
pthread_cond_destroy (&r_chain->cond);
ffc0a098: 7f e3 fb 78 mr r3,r31
ffc0a09c: 48 00 06 85 bl ffc0a720 <pthread_cond_destroy>
free (r_chain);
ffc0a0a0: 7f c3 f3 78 mr r3,r30
ffc0a0a4: 4b ff b9 6d bl ffc05a10 <free>
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a0a8: 83 db 00 54 lwz r30,84(r27)
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
ffc0a0ac: 7f 9e c0 00 cmpw cr7,r30,r24
ffc0a0b0: 41 9e 00 34 beq- cr7,ffc0a0e4 <rtems_aio_handle+0x240>
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
ffc0a0b4: 81 3a 00 68 lwz r9,104(r26)
ffc0a0b8: 7f c3 f3 78 mr r3,r30
++aio_request_queue.active_threads;
ffc0a0bc: 81 7a 00 64 lwz r11,100(r26)
ffc0a0c0: 3b be 00 1c addi r29,r30,28
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
ffc0a0c4: 39 29 ff ff addi r9,r9,-1
++aio_request_queue.active_threads;
ffc0a0c8: 38 0b 00 01 addi r0,r11,1
}
}
/* Otherwise move this chain to the working chain and
start the loop all over again */
AIO_printf ("Work on idle\n");
--aio_request_queue.idle_threads;
ffc0a0cc: 91 3a 00 68 stw r9,104(r26)
++aio_request_queue.active_threads;
ffc0a0d0: 90 1a 00 64 stw r0,100(r26)
ffc0a0d4: 48 00 30 b9 bl ffc0d18c <_Chain_Extract>
node = rtems_chain_first (&aio_request_queue.idle_req);
rtems_chain_extract (node);
r_chain = (rtems_aio_request_chain *) node;
rtems_aio_move_to_work (r_chain);
ffc0a0d8: 7f c3 f3 78 mr r3,r30
ffc0a0dc: 4b ff fd 39 bl ffc09e14 <rtems_aio_move_to_work>
ffc0a0e0: 4b ff ff 64 b ffc0a044 <rtems_aio_handle+0x1a0>
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
ffc0a0e4: 81 3b 00 68 lwz r9,104(r27)
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
ffc0a0e8: 38 81 00 0c addi r4,r1,12
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
ffc0a0ec: 80 1b 00 64 lwz r0,100(r27)
clock_gettime (CLOCK_REALTIME, &timeout);
ffc0a0f0: 38 60 00 01 li r3,1
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
ffc0a0f4: 39 29 00 01 addi r9,r9,1
--aio_request_queue.active_threads;
ffc0a0f8: 30 00 ff ff addic r0,r0,-1
/* If the idle chain is empty sleep for 3 seconds and wait for a
signal. The thread now becomes idle. */
if (rtems_chain_is_empty (&aio_request_queue.idle_req)) {
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
ffc0a0fc: 91 3b 00 68 stw r9,104(r27)
--aio_request_queue.active_threads;
ffc0a100: 90 1b 00 64 stw r0,100(r27)
clock_gettime (CLOCK_REALTIME, &timeout);
ffc0a104: 48 00 05 7d bl ffc0a680 <clock_gettime>
timeout.tv_sec += 3;
ffc0a108: 80 01 00 0c lwz r0,12(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc0a10c: 7e e3 bb 78 mr r3,r23
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
timeout.tv_nsec = 0;
ffc0a110: 92 c1 00 10 stw r22,16(r1)
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc0a114: 30 00 00 03 addic r0,r0,3
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc0a118: 7f 64 db 78 mr r4,r27
AIO_printf ("Chain is empty [IQ], wait for work\n");
++aio_request_queue.idle_threads;
--aio_request_queue.active_threads;
clock_gettime (CLOCK_REALTIME, &timeout);
timeout.tv_sec += 3;
ffc0a11c: 90 01 00 0c stw r0,12(r1)
timeout.tv_nsec = 0;
result = pthread_cond_timedwait (&aio_request_queue.new_req,
ffc0a120: 38 a1 00 0c addi r5,r1,12
ffc0a124: 48 00 08 dd bl ffc0aa00 <pthread_cond_timedwait>
&aio_request_queue.mutex,
&timeout);
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
ffc0a128: 2f 83 00 74 cmpwi cr7,r3,116
ffc0a12c: 41 9e 00 14 beq- cr7,ffc0a140 <rtems_aio_handle+0x29c> <== ALWAYS TAKEN
ffc0a130: 83 db 00 54 lwz r30,84(r27) <== NOT EXECUTED
ffc0a134: 4b ff ff 80 b ffc0a0b4 <rtems_aio_handle+0x210> <== NOT EXECUTED
break;
default:
result = -1;
}
if (result == -1) {
ffc0a138: 82 df 00 14 lwz r22,20(r31) <== NOT EXECUTED
ffc0a13c: 4b ff fe 38 b ffc09f74 <rtems_aio_handle+0xd0> <== NOT EXECUTED
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
ffc0a140: 80 1b 00 68 lwz r0,104(r27)
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc0a144: 7f 63 db 78 mr r3,r27
/* If no new fd chain was added in the idle requests
then this thread is finished */
if (result == ETIMEDOUT) {
AIO_printf ("Etimeout\n");
--aio_request_queue.idle_threads;
ffc0a148: 30 00 ff ff addic r0,r0,-1
ffc0a14c: 90 1b 00 68 stw r0,104(r27)
pthread_mutex_unlock (&aio_request_queue.mutex);
ffc0a150: 48 00 0e a1 bl ffc0aff0 <pthread_mutex_unlock>
return NULL;
ffc0a154: 4b ff fe 40 b ffc09f94 <rtems_aio_handle+0xf0>
ffc09b8c <rtems_aio_init>:
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
ffc09b8c: 94 21 ff e8 stwu r1,-24(r1)
ffc09b90: 7c 08 02 a6 mflr r0
ffc09b94: 93 c1 00 10 stw r30,16(r1)
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
ffc09b98: 3f c0 00 00 lis r30,0
ffc09b9c: 3b de 2c 78 addi r30,r30,11384
ffc09ba0: 7f c3 f3 78 mr r3,r30
* 0 - if initialization succeeded
*/
int
rtems_aio_init (void)
{
ffc09ba4: 93 a1 00 0c stw r29,12(r1)
ffc09ba8: 90 01 00 1c stw r0,28(r1)
ffc09bac: 93 e1 00 14 stw r31,20(r1)
int result = 0;
result = pthread_attr_init (&aio_request_queue.attr);
ffc09bb0: 48 00 15 8d bl ffc0b13c <pthread_attr_init>
if (result != 0)
ffc09bb4: 7c 7d 1b 79 mr. r29,r3
ffc09bb8: 41 82 00 24 beq- ffc09bdc <rtems_aio_init+0x50> <== ALWAYS TAKEN
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
ffc09bbc: 80 01 00 1c lwz r0,28(r1) <== NOT EXECUTED
ffc09bc0: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED
ffc09bc4: 83 c1 00 10 lwz r30,16(r1) <== NOT EXECUTED
ffc09bc8: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc09bcc: 83 a1 00 0c lwz r29,12(r1) <== NOT EXECUTED
ffc09bd0: 83 e1 00 14 lwz r31,20(r1) <== NOT EXECUTED
ffc09bd4: 38 21 00 18 addi r1,r1,24 <== NOT EXECUTED
ffc09bd8: 4e 80 00 20 blr <== NOT EXECUTED
result = pthread_attr_init (&aio_request_queue.attr);
if (result != 0)
return result;
result =
ffc09bdc: 7f c3 f3 78 mr r3,r30
ffc09be0: 38 80 00 00 li r4,0
ffc09be4: 48 00 15 99 bl ffc0b17c <pthread_attr_setdetachstate>
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
ffc09be8: 2f 83 00 00 cmpwi cr7,r3,0
ffc09bec: 40 9e 00 94 bne- cr7,ffc09c80 <rtems_aio_init+0xf4> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
ffc09bf0: 3f e0 00 00 lis r31,0
ffc09bf4: 3b ff 2c 70 addi r31,r31,11376
ffc09bf8: 7f e3 fb 78 mr r3,r31
ffc09bfc: 38 80 00 00 li r4,0
ffc09c00: 48 00 11 9d bl ffc0ad9c <pthread_mutex_init>
if (result != 0)
ffc09c04: 2f 83 00 00 cmpwi cr7,r3,0
ffc09c08: 40 9e 00 9c bne- cr7,ffc09ca4 <rtems_aio_init+0x118> <== NEVER TAKEN
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
ffc09c0c: 3c 60 00 00 lis r3,0
ffc09c10: 38 63 2c 74 addi r3,r3,11380
ffc09c14: 38 80 00 00 li r4,0
ffc09c18: 48 00 0c 19 bl ffc0a830 <pthread_cond_init>
if (result != 0) {
ffc09c1c: 7c 7d 1b 79 mr. r29,r3
ffc09c20: 40 82 00 a4 bne- ffc09cc4 <rtems_aio_init+0x138> <== NEVER TAKEN
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc09c24: 38 00 00 00 li r0,0
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
ffc09c28: 83 c1 00 10 lwz r30,16(r1)
ffc09c2c: 90 1f 00 4c stw r0,76(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc09c30: 39 1f 00 4c addi r8,r31,76
head->previous = NULL;
tail->previous = head;
ffc09c34: 39 5f 00 48 addi r10,r31,72
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
head->previous = NULL;
ffc09c38: 90 1f 00 58 stw r0,88(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc09c3c: 39 7f 00 58 addi r11,r31,88
head->previous = NULL;
tail->previous = head;
ffc09c40: 39 3f 00 54 addi r9,r31,84
}
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
ffc09c44: 90 1f 00 64 stw r0,100(r31)
aio_request_queue.idle_threads = 0;
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
return result;
}
ffc09c48: 7f a3 eb 78 mr r3,r29
rtems_chain_initialize_empty (&aio_request_queue.work_req);
rtems_chain_initialize_empty (&aio_request_queue.idle_req);
aio_request_queue.active_threads = 0;
aio_request_queue.idle_threads = 0;
ffc09c4c: 90 1f 00 68 stw r0,104(r31)
aio_request_queue.initialized = AIO_QUEUE_INITIALIZED;
ffc09c50: 60 00 b0 0b ori r0,r0,45067
ffc09c54: 90 1f 00 60 stw r0,96(r31)
return result;
}
ffc09c58: 80 01 00 1c lwz r0,28(r1)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc09c5c: 91 1f 00 48 stw r8,72(r31)
ffc09c60: 7c 08 03 a6 mtlr r0
head->previous = NULL;
tail->previous = head;
ffc09c64: 91 5f 00 50 stw r10,80(r31)
)
{
Chain_Node *head = _Chain_Head( the_chain );
Chain_Node *tail = _Chain_Tail( the_chain );
head->next = tail;
ffc09c68: 91 7f 00 54 stw r11,84(r31)
head->previous = NULL;
tail->previous = head;
ffc09c6c: 91 3f 00 5c stw r9,92(r31)
ffc09c70: 83 a1 00 0c lwz r29,12(r1)
ffc09c74: 83 e1 00 14 lwz r31,20(r1)
ffc09c78: 38 21 00 18 addi r1,r1,24
ffc09c7c: 4e 80 00 20 blr
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
ffc09c80: 3f e0 00 00 lis r31,0 <== NOT EXECUTED
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
ffc09c84: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
ffc09c88: 3b ff 2c 70 addi r31,r31,11376 <== NOT EXECUTED
result =
pthread_attr_setdetachstate (&aio_request_queue.attr,
PTHREAD_CREATE_DETACHED);
if (result != 0)
pthread_attr_destroy (&aio_request_queue.attr);
ffc09c8c: 48 00 14 89 bl ffc0b114 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_mutex_init (&aio_request_queue.mutex, NULL);
ffc09c90: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09c94: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc09c98: 48 00 11 05 bl ffc0ad9c <pthread_mutex_init> <== NOT EXECUTED
if (result != 0)
ffc09c9c: 2f 83 00 00 cmpwi cr7,r3,0 <== NOT EXECUTED
ffc09ca0: 41 9e ff 6c beq+ cr7,ffc09c0c <rtems_aio_init+0x80> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
ffc09ca4: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc09ca8: 48 00 14 6d bl ffc0b114 <pthread_attr_destroy> <== NOT EXECUTED
result = pthread_cond_init (&aio_request_queue.new_req, NULL);
ffc09cac: 3c 60 00 00 lis r3,0 <== NOT EXECUTED
ffc09cb0: 38 63 2c 74 addi r3,r3,11380 <== NOT EXECUTED
ffc09cb4: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc09cb8: 48 00 0b 79 bl ffc0a830 <pthread_cond_init> <== NOT EXECUTED
if (result != 0) {
ffc09cbc: 7c 7d 1b 79 mr. r29,r3 <== NOT EXECUTED
ffc09cc0: 41 82 ff 64 beq+ ffc09c24 <rtems_aio_init+0x98> <== NOT EXECUTED
pthread_mutex_destroy (&aio_request_queue.mutex);
ffc09cc4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED
ffc09cc8: 48 00 0f 11 bl ffc0abd8 <pthread_mutex_destroy> <== NOT EXECUTED
pthread_attr_destroy (&aio_request_queue.attr);
ffc09ccc: 7f c3 f3 78 mr r3,r30 <== NOT EXECUTED
ffc09cd0: 48 00 14 45 bl ffc0b114 <pthread_attr_destroy> <== NOT EXECUTED
ffc09cd4: 4b ff ff 50 b ffc09c24 <rtems_aio_init+0x98> <== NOT EXECUTED
ffc0a158 <rtems_aio_insert_prio>:
* NONE
*/
void
rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req)
{
ffc0a158: 7c 08 02 a6 mflr r0
ffc0a15c: 94 21 ff f8 stwu r1,-8(r1)
ffc0a160: 7c 8b 23 78 mr r11,r4
ffc0a164: 90 01 00 0c stw r0,12(r1)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a168: 38 03 00 04 addi r0,r3,4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc0a16c: 81 23 00 00 lwz r9,0(r3)
rtems_chain_node *node;
AIO_printf ("FD exists \n");
node = rtems_chain_first (chain);
if (rtems_chain_is_empty (chain)) {
ffc0a170: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a174: 41 9e 00 44 beq- cr7,ffc0a1b8 <rtems_aio_insert_prio+0x60><== NEVER TAKEN
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
ffc0a178: 81 04 00 14 lwz r8,20(r4)
if (rtems_chain_is_empty (chain)) {
AIO_printf ("First in chain \n");
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
ffc0a17c: 81 49 00 14 lwz r10,20(r9)
while (req->aiocbp->aio_reqprio > prio &&
ffc0a180: 81 08 00 18 lwz r8,24(r8)
ffc0a184: 81 4a 00 18 lwz r10,24(r10)
ffc0a188: 7f 8a 40 00 cmpw cr7,r10,r8
ffc0a18c: 41 bc 00 0c blt+ cr7,ffc0a198 <rtems_aio_insert_prio+0x40><== NEVER TAKEN
ffc0a190: 48 00 00 20 b ffc0a1b0 <rtems_aio_insert_prio+0x58>
ffc0a194: 41 9a 00 1c beq- cr6,ffc0a1b0 <rtems_aio_insert_prio+0x58><== NOT EXECUTED
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc0a198: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
!rtems_chain_is_tail (chain, node)) {
node = rtems_chain_next (node);
prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
ffc0a19c: 81 49 00 14 lwz r10,20(r9) <== NOT EXECUTED
rtems_chain_prepend (chain, &req->next_prio);
} else {
AIO_printf ("Add by priority \n");
int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio;
while (req->aiocbp->aio_reqprio > prio &&
ffc0a1a0: 7f 09 00 00 cmpw cr6,r9,r0 <== NOT EXECUTED
ffc0a1a4: 81 4a 00 18 lwz r10,24(r10) <== NOT EXECUTED
ffc0a1a8: 7f 8a 40 00 cmpw cr7,r10,r8 <== NOT EXECUTED
ffc0a1ac: 41 9c ff e8 blt+ cr7,ffc0a194 <rtems_aio_insert_prio+0x3c><== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_insert(
rtems_chain_node *after_node,
rtems_chain_node *the_node
)
{
_Chain_Insert( after_node, the_node );
ffc0a1b0: 80 69 00 04 lwz r3,4(r9)
ffc0a1b4: 7d 64 5b 78 mr r4,r11
ffc0a1b8: 48 00 30 3d bl ffc0d1f4 <_Chain_Insert>
}
rtems_chain_insert (node->previous, &req->next_prio);
}
}
ffc0a1bc: 80 01 00 0c lwz r0,12(r1)
ffc0a1c0: 38 21 00 08 addi r1,r1,8
ffc0a1c4: 7c 08 03 a6 mtlr r0
ffc0a1c8: 4e 80 00 20 blr
ffc09e14 <rtems_aio_move_to_work>:
* NONE
*/
void
rtems_aio_move_to_work (rtems_aio_request_chain *r_chain)
{
ffc09e14: 7c 08 02 a6 mflr r0
ffc09e18: 94 21 ff f8 stwu r1,-8(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return _Chain_Head( the_chain )->next;
ffc09e1c: 3d 60 00 00 lis r11,0
ffc09e20: 90 01 00 0c stw r0,12(r1)
ffc09e24: 39 6b 2c 70 addi r11,r11,11376
ffc09e28: 7c 64 1b 78 mr r4,r3
ffc09e2c: 81 2b 00 48 lwz r9,72(r11)
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
ffc09e30: 81 03 00 14 lwz r8,20(r3)
ffc09e34: 80 09 00 14 lwz r0,20(r9)
ffc09e38: 7d 2a 4b 78 mr r10,r9
ffc09e3c: 7f 80 40 00 cmpw cr7,r0,r8
ffc09e40: 40 9c 00 30 bge- cr7,ffc09e70 <rtems_aio_move_to_work+0x5c><== NEVER TAKEN
ffc09e44: 39 6b 00 4c addi r11,r11,76
ffc09e48: 7f 89 58 00 cmpw cr7,r9,r11
ffc09e4c: 40 be 00 0c bne+ cr7,ffc09e58 <rtems_aio_move_to_work+0x44><== ALWAYS TAKEN
ffc09e50: 48 00 00 20 b ffc09e70 <rtems_aio_move_to_work+0x5c> <== NOT EXECUTED
ffc09e54: 41 9a 00 34 beq- cr6,ffc09e88 <rtems_aio_move_to_work+0x74><== NEVER TAKEN
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc09e58: 81 49 00 00 lwz r10,0(r9)
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
ffc09e5c: 80 0a 00 14 lwz r0,20(r10)
ffc09e60: 7f 0a 58 00 cmpw cr6,r10,r11
ffc09e64: 7d 49 53 78 mr r9,r10
ffc09e68: 7f 80 40 00 cmpw cr7,r0,r8
ffc09e6c: 41 9c ff e8 blt+ cr7,ffc09e54 <rtems_aio_move_to_work+0x40>
ffc09e70: 80 6a 00 04 lwz r3,4(r10)
ffc09e74: 48 00 33 81 bl ffc0d1f4 <_Chain_Insert>
node = rtems_chain_next (node);
temp = (rtems_aio_request_chain *) node;
}
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
}
ffc09e78: 80 01 00 0c lwz r0,12(r1)
ffc09e7c: 38 21 00 08 addi r1,r1,8
ffc09e80: 7c 08 03 a6 mtlr r0
ffc09e84: 4e 80 00 20 blr
rtems_chain_node *node;
node = rtems_chain_first (&aio_request_queue.work_req);
temp = (rtems_aio_request_chain *) node;
while (temp->fildes < r_chain->fildes &&
ffc09e88: 7d 6a 5b 78 mr r10,r11 <== NOT EXECUTED
ffc09e8c: 80 6a 00 04 lwz r3,4(r10) <== NOT EXECUTED
ffc09e90: 48 00 33 65 bl ffc0d1f4 <_Chain_Insert> <== NOT EXECUTED
node = rtems_chain_next (node);
temp = (rtems_aio_request_chain *) node;
}
rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd);
}
ffc09e94: 80 01 00 0c lwz r0,12(r1) <== NOT EXECUTED
ffc09e98: 38 21 00 08 addi r1,r1,8 <== NOT EXECUTED
ffc09e9c: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc09ea0: 4e 80 00 20 blr <== NOT EXECUTED
ffc0a1cc <rtems_aio_remove_fd>:
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
ffc0a1cc: 94 21 ff e0 stwu r1,-32(r1)
ffc0a1d0: 7c 08 02 a6 mflr r0
ffc0a1d4: 90 01 00 24 stw r0,36(r1)
ffc0a1d8: 93 e1 00 1c stw r31,28(r1)
ffc0a1dc: 83 e3 00 08 lwz r31,8(r3)
ffc0a1e0: 93 a1 00 14 stw r29,20(r1)
RTEMS_INLINE_ROUTINE bool _Chain_Is_tail(
Chain_Control *the_chain,
const Chain_Node *the_node
)
{
return (the_node == _Chain_Tail(the_chain));
ffc0a1e4: 3b a3 00 0c addi r29,r3,12
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
ffc0a1e8: 7f 9f e8 00 cmpw cr7,r31,r29
* Output parameters:
* NONE
*/
void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain)
{
ffc0a1ec: 93 61 00 0c stw r27,12(r1)
ffc0a1f0: 93 81 00 10 stw r28,16(r1)
ffc0a1f4: 93 c1 00 18 stw r30,24(r1)
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
ffc0a1f8: 41 9e 00 38 beq- cr7,ffc0a230 <rtems_aio_remove_fd+0x64><== NEVER TAKEN
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
ffc0a1fc: 3b 60 00 8c li r27,140
req->aiocbp->return_value = -1;
ffc0a200: 3b 80 ff ff li r28,-1
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ffc0a204: 7f e3 fb 78 mr r3,r31
ffc0a208: 48 00 2f 85 bl ffc0d18c <_Chain_Extract>
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
ffc0a20c: 81 3f 00 14 lwz r9,20(r31)
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc0a210: 83 df 00 00 lwz r30,0(r31)
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
ffc0a214: 7f e3 fb 78 mr r3,r31
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
ffc0a218: 93 69 00 34 stw r27,52(r9)
while (!rtems_chain_is_tail (chain, node))
{
rtems_chain_extract (node);
rtems_aio_request *req = (rtems_aio_request *) node;
node = rtems_chain_next (node);
ffc0a21c: 7f df f3 78 mr r31,r30
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
ffc0a220: 93 89 00 38 stw r28,56(r9)
free (req);
ffc0a224: 4b ff b7 ed bl ffc05a10 <free>
rtems_chain_control *chain;
rtems_chain_node *node;
chain = &r_chain->perfd;
node = rtems_chain_first (chain);
while (!rtems_chain_is_tail (chain, node))
ffc0a228: 7f 9e e8 00 cmpw cr7,r30,r29
ffc0a22c: 40 9e ff d8 bne+ cr7,ffc0a204 <rtems_aio_remove_fd+0x38>
node = rtems_chain_next (node);
req->aiocbp->error_code = ECANCELED;
req->aiocbp->return_value = -1;
free (req);
}
}
ffc0a230: 80 01 00 24 lwz r0,36(r1)
ffc0a234: 83 61 00 0c lwz r27,12(r1)
ffc0a238: 7c 08 03 a6 mtlr r0
ffc0a23c: 83 81 00 10 lwz r28,16(r1)
ffc0a240: 83 a1 00 14 lwz r29,20(r1)
ffc0a244: 83 c1 00 18 lwz r30,24(r1)
ffc0a248: 83 e1 00 1c lwz r31,28(r1)
ffc0a24c: 38 21 00 20 addi r1,r1,32
ffc0a250: 4e 80 00 20 blr
ffc0a254 <rtems_aio_remove_req>:
* AIO_NOTCANCELED - if request was not canceled
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
ffc0a254: 94 21 ff f0 stwu r1,-16(r1)
ffc0a258: 7c 08 02 a6 mflr r0
ffc0a25c: 90 01 00 14 stw r0,20(r1)
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_first( the_chain )
== _Chain_Immutable_tail( the_chain );
ffc0a260: 38 03 00 04 addi r0,r3,4
ffc0a264: 93 e1 00 0c stw r31,12(r1)
*/
RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_first(
const Chain_Control *the_chain
)
{
return _Chain_Immutable_head( the_chain )->next;
ffc0a268: 83 e3 00 00 lwz r31,0(r3)
if (rtems_chain_is_empty (chain))
return AIO_ALLDONE;
ffc0a26c: 38 60 00 02 li r3,2
* AIO_CANCELED - if request was canceled
*/
int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp)
{
if (rtems_chain_is_empty (chain))
ffc0a270: 7f 9f 00 00 cmpw cr7,r31,r0
ffc0a274: 40 be 00 14 bne+ cr7,ffc0a288 <rtems_aio_remove_req+0x34>
ffc0a278: 48 00 00 44 b ffc0a2bc <rtems_aio_remove_req+0x68>
}
}
AIO_printf ("Thread finished\n");
return NULL;
}
ffc0a27c: 83 ff 00 00 lwz r31,0(r31) <== NOT EXECUTED
rtems_chain_node *node = rtems_chain_first (chain);
rtems_aio_request *current;
current = (rtems_aio_request *) node;
while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) {
ffc0a280: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED
ffc0a284: 41 9e 00 4c beq- cr7,ffc0a2d0 <rtems_aio_remove_req+0x7c><== NOT EXECUTED
ffc0a288: 81 3f 00 14 lwz r9,20(r31)
ffc0a28c: 7f 89 20 00 cmpw cr7,r9,r4
ffc0a290: 40 9e ff ec bne+ cr7,ffc0a27c <rtems_aio_remove_req+0x28><== NEVER TAKEN
ffc0a294: 7f e3 fb 78 mr r3,r31
ffc0a298: 48 00 2e f5 bl ffc0d18c <_Chain_Extract>
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
ffc0a29c: 81 3f 00 14 lwz r9,20(r31)
ffc0a2a0: 38 00 00 8c li r0,140
ffc0a2a4: 90 09 00 34 stw r0,52(r9)
current->aiocbp->return_value = -1;
ffc0a2a8: 38 00 ff ff li r0,-1
free (current);
ffc0a2ac: 7f e3 fb 78 mr r3,r31
return AIO_NOTCANCELED;
else
{
rtems_chain_extract (node);
current->aiocbp->error_code = ECANCELED;
current->aiocbp->return_value = -1;
ffc0a2b0: 90 09 00 38 stw r0,56(r9)
free (current);
ffc0a2b4: 4b ff b7 5d bl ffc05a10 <free>
}
return AIO_CANCELED;
ffc0a2b8: 38 60 00 00 li r3,0
}
ffc0a2bc: 80 01 00 14 lwz r0,20(r1)
ffc0a2c0: 83 e1 00 0c lwz r31,12(r1)
ffc0a2c4: 38 21 00 10 addi r1,r1,16
ffc0a2c8: 7c 08 03 a6 mtlr r0
ffc0a2cc: 4e 80 00 20 blr
ffc0a2d0: 80 01 00 14 lwz r0,20(r1) <== NOT EXECUTED
node = rtems_chain_next (node);
current = (rtems_aio_request *) node;
}
if (rtems_chain_is_tail (chain, node))
return AIO_NOTCANCELED;
ffc0a2d4: 38 60 00 01 li r3,1 <== NOT EXECUTED
current->aiocbp->return_value = -1;
free (current);
}
return AIO_CANCELED;
}
ffc0a2d8: 83 e1 00 0c lwz r31,12(r1) <== NOT EXECUTED
ffc0a2dc: 38 21 00 10 addi r1,r1,16 <== NOT EXECUTED
ffc0a2e0: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0a2e4: 4e 80 00 20 blr <== NOT EXECUTED
ffc09e40 <rtems_chain_get_with_wait>:
rtems_chain_control *chain,
rtems_event_set events,
rtems_interval timeout,
rtems_chain_node **node_ptr
)
{
ffc09e40: 94 21 ff d0 stwu r1,-48(r1)
ffc09e44: 7c 08 02 a6 mflr r0
ffc09e48: 93 e1 00 2c stw r31,44(r1)
ffc09e4c: 90 01 00 34 stw r0,52(r1)
ffc09e50: 93 61 00 1c stw r27,28(r1)
ffc09e54: 7c db 33 78 mr r27,r6
ffc09e58: 93 81 00 20 stw r28,32(r1)
ffc09e5c: 7c 7c 1b 78 mr r28,r3
ffc09e60: 93 a1 00 24 stw r29,36(r1)
ffc09e64: 7c 9d 23 78 mr r29,r4
ffc09e68: 93 c1 00 28 stw r30,40(r1)
ffc09e6c: 7c be 2b 78 mr r30,r5
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ffc09e70: 7f 83 e3 78 mr r3,r28
ffc09e74: 48 00 07 e5 bl ffc0a658 <_Chain_Get>
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09e78: 38 80 00 00 li r4,0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc09e7c: 7c 7f 1b 79 mr. r31,r3
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09e80: 7f c5 f3 78 mr r5,r30
ffc09e84: 38 c1 00 08 addi r6,r1,8
ffc09e88: 7f a3 eb 78 mr r3,r29
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc09e8c: 40 82 00 38 bne- ffc09ec4 <rtems_chain_get_with_wait+0x84>
) {
rtems_event_set out;
sc = rtems_event_receive(
ffc09e90: 4b ff ef f9 bl ffc08e88 <rtems_event_receive>
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
ffc09e94: 2c 03 00 00 cmpwi r3,0
ffc09e98: 41 82 ff d8 beq+ ffc09e70 <rtems_chain_get_with_wait+0x30><== NEVER TAKEN
}
*node_ptr = node;
return sc;
}
ffc09e9c: 80 01 00 34 lwz r0,52(r1)
timeout,
&out
);
}
*node_ptr = node;
ffc09ea0: 93 fb 00 00 stw r31,0(r27)
return sc;
}
ffc09ea4: 7c 08 03 a6 mtlr r0
ffc09ea8: 83 61 00 1c lwz r27,28(r1)
ffc09eac: 83 81 00 20 lwz r28,32(r1)
ffc09eb0: 83 a1 00 24 lwz r29,36(r1)
ffc09eb4: 83 c1 00 28 lwz r30,40(r1)
ffc09eb8: 83 e1 00 2c lwz r31,44(r1)
ffc09ebc: 38 21 00 30 addi r1,r1,48
ffc09ec0: 4e 80 00 20 blr
ffc09ec4: 80 01 00 34 lwz r0,52(r1)
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_chain_node *node = NULL;
while (
sc == RTEMS_SUCCESSFUL
&& (node = rtems_chain_get( chain )) == NULL
ffc09ec8: 38 60 00 00 li r3,0
timeout,
&out
);
}
*node_ptr = node;
ffc09ecc: 93 fb 00 00 stw r31,0(r27)
return sc;
}
ffc09ed0: 7c 08 03 a6 mtlr r0
ffc09ed4: 83 61 00 1c lwz r27,28(r1)
ffc09ed8: 83 81 00 20 lwz r28,32(r1)
ffc09edc: 83 a1 00 24 lwz r29,36(r1)
ffc09ee0: 83 c1 00 28 lwz r30,40(r1)
ffc09ee4: 83 e1 00 2c lwz r31,44(r1)
ffc09ee8: 38 21 00 30 addi r1,r1,48
ffc09eec: 4e 80 00 20 blr
ffc0ac40 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
ffc0ac40: 94 21 ff f0 stwu r1,-16(r1)
ffc0ac44: 7c 08 02 a6 mflr r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ac48: 3d 20 00 00 lis r9,0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
ffc0ac4c: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ac50: 80 09 31 ec lwz r0,12780(r9)
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
ffc0ac54: 3d 20 00 00 lis r9,0
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
ffc0ac58: 93 e1 00 0c stw r31,12(r1)
ffc0ac5c: 7c 7f 1b 78 mr r31,r3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0ac60: 2f 80 00 00 cmpwi cr7,r0,0
return RTEMS_CALLED_FROM_ISR;
ffc0ac64: 38 60 00 12 li r3,18
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
ffc0ac68: 80 09 28 50 lwz r0,10320(r9)
if ( rtems_interrupt_is_in_progress() )
ffc0ac6c: 41 9e 00 18 beq- cr7,ffc0ac84 <rtems_io_register_driver+0x44>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
ffc0ac70: 80 01 00 14 lwz r0,20(r1)
ffc0ac74: 83 e1 00 0c lwz r31,12(r1)
ffc0ac78: 38 21 00 10 addi r1,r1,16
ffc0ac7c: 7c 08 03 a6 mtlr r0
ffc0ac80: 4e 80 00 20 blr
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
ffc0ac84: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc0ac88: 38 60 00 09 li r3,9
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
ffc0ac8c: 41 be ff e4 beq- cr7,ffc0ac70 <rtems_io_register_driver+0x30>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
ffc0ac90: 2f 84 00 00 cmpwi cr7,r4,0
if ( registered_major == NULL )
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
ffc0ac94: 90 05 00 00 stw r0,0(r5)
if ( driver_table == NULL )
ffc0ac98: 41 be ff d8 beq- cr7,ffc0ac70 <rtems_io_register_driver+0x30>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ac9c: 81 64 00 00 lwz r11,0(r4)
ffc0aca0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0aca4: 41 9e 00 f4 beq- cr7,ffc0ad98 <rtems_io_register_driver+0x158>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
ffc0aca8: 7f 80 f8 40 cmplw cr7,r0,r31
return RTEMS_INVALID_NUMBER;
ffc0acac: 38 60 00 0a li r3,10
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
ffc0acb0: 40 9d ff c0 ble+ cr7,ffc0ac70 <rtems_io_register_driver+0x30>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0acb4: 3d 60 00 00 lis r11,0
ffc0acb8: 81 4b 28 04 lwz r10,10244(r11)
ffc0acbc: 38 0a 00 01 addi r0,r10,1
ffc0acc0: 90 0b 28 04 stw r0,10244(r11)
return _Thread_Dispatch_disable_level;
ffc0acc4: 80 0b 28 04 lwz r0,10244(r11)
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
ffc0acc8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0accc: 40 9e 00 a4 bne- cr7,ffc0ad70 <rtems_io_register_driver+0x130>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
ffc0acd0: 81 49 28 50 lwz r10,10320(r9)
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
ffc0acd4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0acd8: 41 9e 00 d0 beq- cr7,ffc0ada8 <rtems_io_register_driver+0x168><== NEVER TAKEN
ffc0acdc: 3d 60 00 00 lis r11,0
ffc0ace0: 7d 49 03 a6 mtctr r10
ffc0ace4: 81 2b 28 54 lwz r9,10324(r11)
ffc0ace8: 48 00 00 10 b ffc0acf8 <rtems_io_register_driver+0xb8>
ffc0acec: 3b ff 00 01 addi r31,r31,1
ffc0acf0: 39 29 00 18 addi r9,r9,24
ffc0acf4: 42 40 00 b4 bdz- ffc0ada8 <rtems_io_register_driver+0x168>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0acf8: 80 09 00 00 lwz r0,0(r9)
ffc0acfc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ad00: 40 9e ff ec bne+ cr7,ffc0acec <rtems_io_register_driver+0xac>
ffc0ad04: 80 09 00 04 lwz r0,4(r9)
ffc0ad08: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ad0c: 40 9e ff e0 bne+ cr7,ffc0acec <rtems_io_register_driver+0xac>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
ffc0ad10: 7f 8a f8 00 cmpw cr7,r10,r31
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
ffc0ad14: 93 e5 00 00 stw r31,0(r5)
ffc0ad18: 1c 1f 00 18 mulli r0,r31,24
if ( m != n )
ffc0ad1c: 41 9e 00 90 beq- cr7,ffc0adac <rtems_io_register_driver+0x16c><== NEVER TAKEN
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
ffc0ad20: 81 6b 28 54 lwz r11,10324(r11)
ffc0ad24: 80 c4 00 00 lwz r6,0(r4)
ffc0ad28: 80 e4 00 04 lwz r7,4(r4)
ffc0ad2c: 7d 2b 02 14 add r9,r11,r0
ffc0ad30: 81 04 00 08 lwz r8,8(r4)
ffc0ad34: 81 44 00 0c lwz r10,12(r4)
ffc0ad38: 7c cb 01 2e stwx r6,r11,r0
ffc0ad3c: 90 e9 00 04 stw r7,4(r9)
ffc0ad40: 91 09 00 08 stw r8,8(r9)
ffc0ad44: 91 49 00 0c stw r10,12(r9)
ffc0ad48: 81 64 00 10 lwz r11,16(r4)
ffc0ad4c: 80 04 00 14 lwz r0,20(r4)
ffc0ad50: 91 69 00 10 stw r11,16(r9)
ffc0ad54: 90 09 00 14 stw r0,20(r9)
_Thread_Enable_dispatch();
ffc0ad58: 48 00 27 59 bl ffc0d4b0 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
ffc0ad5c: 7f e3 fb 78 mr r3,r31
ffc0ad60: 38 80 00 00 li r4,0
ffc0ad64: 38 a0 00 00 li r5,0
ffc0ad68: 48 00 a7 6d bl ffc154d4 <rtems_io_initialize>
ffc0ad6c: 4b ff ff 04 b ffc0ac70 <rtems_io_register_driver+0x30>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0ad70: 3d 60 00 00 lis r11,0
ffc0ad74: 1c 1f 00 18 mulli r0,r31,24
ffc0ad78: 81 2b 28 54 lwz r9,10324(r11)
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ad7c: 7d 49 00 2e lwzx r10,r9,r0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0ad80: 7d 29 02 14 add r9,r9,r0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ad84: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0ad88: 41 9e 00 30 beq- cr7,ffc0adb8 <rtems_io_register_driver+0x178>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
ffc0ad8c: 48 00 27 25 bl ffc0d4b0 <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
ffc0ad90: 38 60 00 0c li r3,12
ffc0ad94: 4b ff fe dc b ffc0ac70 <rtems_io_register_driver+0x30>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0ad98: 81 64 00 04 lwz r11,4(r4)
ffc0ad9c: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0ada0: 40 9e ff 08 bne+ cr7,ffc0aca8 <rtems_io_register_driver+0x68>
ffc0ada4: 4b ff fe cc b ffc0ac70 <rtems_io_register_driver+0x30>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
ffc0ada8: 93 e5 00 00 stw r31,0(r5)
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
ffc0adac: 48 00 27 05 bl ffc0d4b0 <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
ffc0adb0: 38 60 00 05 li r3,5
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
return sc;
ffc0adb4: 4b ff fe bc b ffc0ac70 <rtems_io_register_driver+0x30>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0adb8: 81 29 00 04 lwz r9,4(r9)
ffc0adbc: 2f 89 00 00 cmpwi cr7,r9,0
ffc0adc0: 40 9e ff cc bne+ cr7,ffc0ad8c <rtems_io_register_driver+0x14c>
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
ffc0adc4: 93 e5 00 00 stw r31,0(r5)
ffc0adc8: 4b ff ff 58 b ffc0ad20 <rtems_io_register_driver+0xe0>
ffc0c91c <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)
{
ffc0c91c: 94 21 ff e0 stwu r1,-32(r1)
ffc0c920: 7c 08 02 a6 mflr r0
ffc0c924: 90 01 00 24 stw r0,36(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0c928: 7c 60 1b 79 mr. r0,r3
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0c92c: 93 81 00 10 stw r28,16(r1)
ffc0c930: 93 a1 00 14 stw r29,20(r1)
ffc0c934: 93 c1 00 18 stw r30,24(r1)
ffc0c938: 93 e1 00 1c stw r31,28(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0c93c: 90 01 00 08 stw r0,8(r1)
ffc0c940: 41 82 00 6c beq- ffc0c9ac <rtems_iterate_over_all_threads+0x90><== NEVER TAKEN
ffc0c944: 3f a0 00 00 lis r29,0
ffc0c948: 3b bd 30 80 addi r29,r29,12416
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0c94c: 3b 9d 00 0c addi r28,r29,12
#if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG)
if ( !_Objects_Information_table[ api_index ] )
continue;
#endif
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0c950: 85 3d 00 04 lwzu r9,4(r29)
ffc0c954: 83 c9 00 04 lwz r30,4(r9)
if ( !information )
ffc0c958: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0c95c: 41 9e 00 48 beq- cr7,ffc0c9a4 <rtems_iterate_over_all_threads+0x88>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0c960: a0 1e 00 10 lhz r0,16(r30)
ffc0c964: 70 09 ff ff andi. r9,r0,65535
ffc0c968: 41 82 00 3c beq- ffc0c9a4 <rtems_iterate_over_all_threads+0x88>
ffc0c96c: 3b e0 00 01 li r31,1
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0c970: 81 7e 00 1c lwz r11,28(r30)
ffc0c974: 57 e9 10 3a rlwinm r9,r31,2,0,29
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0c978: 3b ff 00 01 addi r31,r31,1
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0c97c: 7c 6b 48 2e lwzx r3,r11,r9
if ( !the_thread )
ffc0c980: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c984: 41 9e 00 14 beq- cr7,ffc0c998 <rtems_iterate_over_all_threads+0x7c>
continue;
(*routine)(the_thread);
ffc0c988: 80 01 00 08 lwz r0,8(r1)
ffc0c98c: 7c 09 03 a6 mtctr r0
ffc0c990: 4e 80 04 21 bctrl
ffc0c994: a0 1e 00 10 lhz r0,16(r30)
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0c998: 54 09 04 3e clrlwi r9,r0,16
ffc0c99c: 7f 89 f8 40 cmplw cr7,r9,r31
ffc0c9a0: 40 9c ff d0 bge+ cr7,ffc0c970 <rtems_iterate_over_all_threads+0x54>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0c9a4: 7f 9d e0 00 cmpw cr7,r29,r28
ffc0c9a8: 40 9e ff a8 bne+ cr7,ffc0c950 <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
ffc0c9ac: 80 01 00 24 lwz r0,36(r1)
ffc0c9b0: 83 81 00 10 lwz r28,16(r1)
ffc0c9b4: 7c 08 03 a6 mtlr r0
ffc0c9b8: 83 a1 00 14 lwz r29,20(r1)
ffc0c9bc: 83 c1 00 18 lwz r30,24(r1)
ffc0c9c0: 83 e1 00 1c lwz r31,28(r1)
ffc0c9c4: 38 21 00 20 addi r1,r1,32
ffc0c9c8: 4e 80 00 20 blr
ffc0b05c <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
ffc0b05c: 94 21 ff f0 stwu r1,-16(r1)
ffc0b060: 7c 08 02 a6 mflr r0
ffc0b064: 93 e1 00 0c stw r31,12(r1)
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
ffc0b068: 7c bf 2b 79 mr. r31,r5
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
ffc0b06c: 90 01 00 14 stw r0,20(r1)
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
ffc0b070: 38 00 00 09 li r0,9
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
ffc0b074: 41 82 00 7c beq- ffc0b0f0 <rtems_object_get_class_information+0x94>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
ffc0b078: 54 84 04 3e clrlwi r4,r4,16
ffc0b07c: 48 00 24 a5 bl ffc0d520 <_Objects_Get_information>
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
ffc0b080: 38 00 00 0a li r0,10
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
ffc0b084: 2c 03 00 00 cmpwi r3,0
ffc0b088: 41 82 00 68 beq- ffc0b0f0 <rtems_object_get_class_information+0x94>
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
ffc0b08c: a1 03 00 10 lhz r8,16(r3)
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
ffc0b090: 80 03 00 08 lwz r0,8(r3)
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0b094: 2f 88 00 00 cmpwi cr7,r8,0
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
ffc0b098: 81 63 00 0c lwz r11,12(r3)
info->auto_extend = obj_info->auto_extend;
ffc0b09c: 89 23 00 12 lbz r9,18(r3)
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
ffc0b0a0: 90 1f 00 00 stw r0,0(r31)
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0b0a4: 38 00 00 00 li r0,0
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
ffc0b0a8: 91 7f 00 04 stw r11,4(r31)
info->auto_extend = obj_info->auto_extend;
ffc0b0ac: 99 3f 00 0c stb r9,12(r31)
info->maximum = obj_info->maximum;
ffc0b0b0: 91 1f 00 08 stw r8,8(r31)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0b0b4: 41 9e 00 34 beq- cr7,ffc0b0e8 <rtems_object_get_class_information+0x8c><== NEVER TAKEN
ffc0b0b8: 80 e3 00 1c lwz r7,28(r3)
ffc0b0bc: 39 60 00 01 li r11,1
ffc0b0c0: 39 20 00 01 li r9,1
ffc0b0c4: 39 29 00 01 addi r9,r9,1
ffc0b0c8: 7f 88 48 40 cmplw cr7,r8,r9
if ( !obj_info->local_table[i] )
ffc0b0cc: 55 6b 10 3a rlwinm r11,r11,2,0,29
ffc0b0d0: 7d 47 58 2e lwzx r10,r7,r11
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0b0d4: 7d 2b 4b 78 mr r11,r9
if ( !obj_info->local_table[i] )
unallocated++;
ffc0b0d8: 20 ca 00 00 subfic r6,r10,0
ffc0b0dc: 7c c0 01 94 addze r6,r0
ffc0b0e0: 7c c0 33 78 mr r0,r6
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
ffc0b0e4: 40 9c ff e0 bge+ cr7,ffc0b0c4 <rtems_object_get_class_information+0x68>
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
ffc0b0e8: 90 1f 00 10 stw r0,16(r31)
return RTEMS_SUCCESSFUL;
ffc0b0ec: 38 00 00 00 li r0,0
}
ffc0b0f0: 7c 03 03 78 mr r3,r0
ffc0b0f4: 80 01 00 14 lwz r0,20(r1)
ffc0b0f8: 83 e1 00 0c lwz r31,12(r1)
ffc0b0fc: 38 21 00 10 addi r1,r1,16
ffc0b100: 7c 08 03 a6 mtlr r0
ffc0b104: 4e 80 00 20 blr
ffc19120 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc19120: 94 21 ff d0 stwu r1,-48(r1)
ffc19124: 7c 08 02 a6 mflr r0
ffc19128: 93 e1 00 2c stw r31,44(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc1912c: 7c 7f 1b 79 mr. r31,r3
return RTEMS_INVALID_NAME;
ffc19130: 38 60 00 03 li r3,3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc19134: 93 c1 00 28 stw r30,40(r1)
ffc19138: 7c be 2b 78 mr r30,r5
ffc1913c: 90 01 00 34 stw r0,52(r1)
ffc19140: 93 61 00 1c stw r27,28(r1)
ffc19144: 93 81 00 20 stw r28,32(r1)
ffc19148: 93 a1 00 24 stw r29,36(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc1914c: 40 82 00 28 bne- ffc19174 <rtems_partition_create+0x54>
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
ffc19150: 80 01 00 34 lwz r0,52(r1)
ffc19154: 83 61 00 1c lwz r27,28(r1)
ffc19158: 7c 08 03 a6 mtlr r0
ffc1915c: 83 81 00 20 lwz r28,32(r1)
ffc19160: 83 a1 00 24 lwz r29,36(r1)
ffc19164: 83 c1 00 28 lwz r30,40(r1)
ffc19168: 83 e1 00 2c lwz r31,44(r1)
ffc1916c: 38 21 00 30 addi r1,r1,48
ffc19170: 4e 80 00 20 blr
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc19174: 2f 84 00 00 cmpwi cr7,r4,0
return RTEMS_INVALID_ADDRESS;
ffc19178: 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 )
ffc1917c: 41 be ff d4 beq- cr7,ffc19150 <rtems_partition_create+0x30>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc19180: 2f 88 00 00 cmpwi cr7,r8,0
ffc19184: 41 be ff cc beq- cr7,ffc19150 <rtems_partition_create+0x30><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc19188: 2f 85 00 00 cmpwi cr7,r5,0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
ffc1918c: 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 ||
ffc19190: 41 9e ff c0 beq+ cr7,ffc19150 <rtems_partition_create+0x30>
ffc19194: 2f 86 00 00 cmpwi cr7,r6,0
ffc19198: 41 9e ff b8 beq+ cr7,ffc19150 <rtems_partition_create+0x30>
ffc1919c: 7f 85 30 40 cmplw cr7,r5,r6
ffc191a0: 41 9c ff b0 blt+ cr7,ffc19150 <rtems_partition_create+0x30>
ffc191a4: 70 c0 00 07 andi. r0,r6,7
ffc191a8: 40 82 ff a8 bne+ ffc19150 <rtems_partition_create+0x30>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc191ac: 70 9b 00 07 andi. r27,r4,7
return RTEMS_INVALID_ADDRESS;
ffc191b0: 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 ) )
ffc191b4: 40 82 ff 9c bne+ ffc19150 <rtems_partition_create+0x30>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc191b8: 3d 20 00 00 lis r9,0
ffc191bc: 80 09 28 e0 lwz r0,10464(r9)
ffc191c0: 30 00 00 01 addic r0,r0,1
ffc191c4: 90 09 28 e0 stw r0,10464(r9)
return _Thread_Dispatch_disable_level;
ffc191c8: 80 09 28 e0 lwz r0,10464(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 );
ffc191cc: 3f 80 00 00 lis r28,0
ffc191d0: 90 81 00 08 stw r4,8(r1)
ffc191d4: 3b 9c 6f 20 addi r28,r28,28448
ffc191d8: 7f 83 e3 78 mr r3,r28
ffc191dc: 90 c1 00 0c stw r6,12(r1)
ffc191e0: 90 e1 00 10 stw r7,16(r1)
ffc191e4: 91 01 00 14 stw r8,20(r1)
ffc191e8: 48 00 60 a9 bl ffc1f290 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc191ec: 7c 7d 1b 79 mr. r29,r3
ffc191f0: 80 81 00 08 lwz r4,8(r1)
ffc191f4: 80 c1 00 0c lwz r6,12(r1)
ffc191f8: 80 e1 00 10 lwz r7,16(r1)
ffc191fc: 81 01 00 14 lwz r8,20(r1)
ffc19200: 41 82 00 50 beq- ffc19250 <rtems_partition_create+0x130>
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,
ffc19204: 7c be 33 96 divwu r5,r30,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc19208: 90 9d 00 10 stw r4,16(r29)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc1920c: 90 dd 00 18 stw r6,24(r29)
the_partition->attribute_set = attribute_set;
ffc19210: 90 fd 00 1c stw r7,28(r29)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc19214: 93 dd 00 14 stw r30,20(r29)
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
ffc19218: 93 7d 00 20 stw r27,32(r29)
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc1921c: 91 01 00 14 stw r8,20(r1)
ffc19220: 38 7d 00 24 addi r3,r29,36
ffc19224: 48 00 42 41 bl ffc1d464 <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc19228: 80 1d 00 08 lwz r0,8(r29)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc1922c: 81 7c 00 1c lwz r11,28(r28)
ffc19230: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc19234: 7f ab 49 2e stwx r29,r11,r9
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc19238: 93 fd 00 0c stw r31,12(r29)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc1923c: 81 01 00 14 lwz r8,20(r1)
ffc19240: 90 08 00 00 stw r0,0(r8)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc19244: 48 00 77 5d bl ffc209a0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc19248: 38 60 00 00 li r3,0
ffc1924c: 4b ff ff 04 b ffc19150 <rtems_partition_create+0x30>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
ffc19250: 48 00 77 51 bl ffc209a0 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
ffc19254: 38 60 00 05 li r3,5
ffc19258: 4b ff fe f8 b ffc19150 <rtems_partition_create+0x30>
ffc193e8 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
ffc193e8: 94 21 ff e0 stwu r1,-32(r1)
ffc193ec: 7c 08 02 a6 mflr r0
ffc193f0: 90 01 00 24 stw r0,36(r1)
ffc193f4: 7c 60 1b 78 mr r0,r3
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
ffc193f8: 3c 60 00 00 lis r3,0
ffc193fc: 93 e1 00 1c stw r31,28(r1)
ffc19400: 38 63 6f 20 addi r3,r3,28448
ffc19404: 7c 9f 23 78 mr r31,r4
ffc19408: 38 a1 00 08 addi r5,r1,8
ffc1940c: 93 c1 00 18 stw r30,24(r1)
ffc19410: 7c 04 03 78 mr r4,r0
ffc19414: 48 00 64 ad bl ffc1f8c0 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc19418: 80 01 00 08 lwz r0,8(r1)
ffc1941c: 7c 7e 1b 78 mr r30,r3
ffc19420: 2f 80 00 00 cmpwi cr7,r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc19424: 38 60 00 04 li r3,4
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc19428: 40 9e 00 58 bne- cr7,ffc19480 <rtems_partition_return_buffer+0x98>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
ffc1942c: 80 1e 00 10 lwz r0,16(r30)
ending = _Addresses_Add_offset( starting, the_partition->length );
ffc19430: 81 3e 00 14 lwz r9,20(r30)
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc19434: 7f 9f 00 40 cmplw cr7,r31,r0
ffc19438: 41 9c 00 60 blt- cr7,ffc19498 <rtems_partition_return_buffer+0xb0>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc1943c: 7d 20 4a 14 add r9,r0,r9
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc19440: 7f 9f 48 40 cmplw cr7,r31,r9
ffc19444: 41 9d 00 54 bgt- cr7,ffc19498 <rtems_partition_return_buffer+0xb0><== NEVER TAKEN
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
ffc19448: 81 3e 00 18 lwz r9,24(r30)
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
ffc1944c: 7c 00 f8 50 subf r0,r0,r31
ffc19450: 7d 60 4b 96 divwu r11,r0,r9
ffc19454: 7d 2b 49 d6 mullw r9,r11,r9
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
ffc19458: 7f 80 48 00 cmpw cr7,r0,r9
ffc1945c: 40 9e 00 3c bne- cr7,ffc19498 <rtems_partition_return_buffer+0xb0>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
ffc19460: 38 7e 00 24 addi r3,r30,36
ffc19464: 7f e4 fb 78 mr r4,r31
ffc19468: 48 00 3f 65 bl ffc1d3cc <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
ffc1946c: 81 3e 00 20 lwz r9,32(r30)
ffc19470: 38 09 ff ff addi r0,r9,-1
ffc19474: 90 1e 00 20 stw r0,32(r30)
_Thread_Enable_dispatch();
ffc19478: 48 00 75 29 bl ffc209a0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc1947c: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc19480: 80 01 00 24 lwz r0,36(r1)
ffc19484: 83 c1 00 18 lwz r30,24(r1)
ffc19488: 7c 08 03 a6 mtlr r0
ffc1948c: 83 e1 00 1c lwz r31,28(r1)
ffc19490: 38 21 00 20 addi r1,r1,32
ffc19494: 4e 80 00 20 blr
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
ffc19498: 48 00 75 09 bl ffc209a0 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1949c: 80 01 00 24 lwz r0,36(r1)
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
ffc194a0: 38 60 00 09 li r3,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc194a4: 83 c1 00 18 lwz r30,24(r1)
ffc194a8: 7c 08 03 a6 mtlr r0
ffc194ac: 83 e1 00 1c lwz r31,28(r1)
ffc194b0: 38 21 00 20 addi r1,r1,32
ffc194b4: 4e 80 00 20 blr
ffc0a2e8 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc0a2e8: 94 21 ff d0 stwu r1,-48(r1)
ffc0a2ec: 7c 08 02 a6 mflr r0
ffc0a2f0: 93 e1 00 2c stw r31,44(r1)
ffc0a2f4: 7c 7f 1b 78 mr r31,r3
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
ffc0a2f8: 3c 60 00 00 lis r3,0
ffc0a2fc: 93 c1 00 28 stw r30,40(r1)
ffc0a300: 38 63 2c 98 addi r3,r3,11416
ffc0a304: 7c 9e 23 78 mr r30,r4
ffc0a308: 38 a1 00 08 addi r5,r1,8
ffc0a30c: 90 01 00 34 stw r0,52(r1)
ffc0a310: 7f e4 fb 78 mr r4,r31
ffc0a314: 93 a1 00 24 stw r29,36(r1)
ffc0a318: 93 61 00 1c stw r27,28(r1)
ffc0a31c: 93 81 00 20 stw r28,32(r1)
ffc0a320: 48 00 2d c9 bl ffc0d0e8 <_Objects_Get>
ffc0a324: 7c 7d 1b 78 mr r29,r3
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
ffc0a328: 80 01 00 08 lwz r0,8(r1)
ffc0a32c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a330: 40 9e 00 4c bne- cr7,ffc0a37c <rtems_rate_monotonic_period+0x94>
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Executing );
ffc0a334: 3f 80 00 00 lis r28,0
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc0a338: 81 23 00 40 lwz r9,64(r3)
ffc0a33c: 3b 9c 32 44 addi r28,r28,12868
ffc0a340: 80 1c 00 0c lwz r0,12(r28)
ffc0a344: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a348: 41 9e 00 60 beq- cr7,ffc0a3a8 <rtems_rate_monotonic_period+0xc0>
_Thread_Enable_dispatch();
ffc0a34c: 48 00 3e 7d bl ffc0e1c8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a350: 80 01 00 34 lwz r0,52(r1)
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc0a354: 3b e0 00 17 li r31,23
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a358: 83 61 00 1c lwz r27,28(r1)
ffc0a35c: 7c 08 03 a6 mtlr r0
ffc0a360: 7f e3 fb 78 mr r3,r31
ffc0a364: 83 81 00 20 lwz r28,32(r1)
ffc0a368: 83 a1 00 24 lwz r29,36(r1)
ffc0a36c: 83 c1 00 28 lwz r30,40(r1)
ffc0a370: 83 e1 00 2c lwz r31,44(r1)
ffc0a374: 38 21 00 30 addi r1,r1,48
ffc0a378: 4e 80 00 20 blr
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a37c: 3b e0 00 04 li r31,4
}
ffc0a380: 80 01 00 34 lwz r0,52(r1)
ffc0a384: 7f e3 fb 78 mr r3,r31
ffc0a388: 83 61 00 1c lwz r27,28(r1)
ffc0a38c: 7c 08 03 a6 mtlr r0
ffc0a390: 83 81 00 20 lwz r28,32(r1)
ffc0a394: 83 a1 00 24 lwz r29,36(r1)
ffc0a398: 83 c1 00 28 lwz r30,40(r1)
ffc0a39c: 83 e1 00 2c lwz r31,44(r1)
ffc0a3a0: 38 21 00 30 addi r1,r1,48
ffc0a3a4: 4e 80 00 20 blr
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc0a3a8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0a3ac: 41 9e 00 80 beq- cr7,ffc0a42c <rtems_rate_monotonic_period+0x144>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a3b0: 7f 60 00 a6 mfmsr r27
ffc0a3b4: 7c 10 42 a6 mfsprg r0,0
ffc0a3b8: 7f 60 00 78 andc r0,r27,r0
ffc0a3bc: 7c 00 01 24 mtmsr r0
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
ffc0a3c0: 80 03 00 38 lwz r0,56(r3)
ffc0a3c4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a3c8: 41 9e 00 8c beq- cr7,ffc0a454 <rtems_rate_monotonic_period+0x16c>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
ffc0a3cc: 2f 80 00 02 cmpwi cr7,r0,2
ffc0a3d0: 41 9e 00 d4 beq- cr7,ffc0a4a4 <rtems_rate_monotonic_period+0x1bc>
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc0a3d4: 2f 80 00 04 cmpwi cr7,r0,4
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a3d8: 3b e0 00 04 li r31,4
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
if ( the_period->state == RATE_MONOTONIC_EXPIRED ) {
ffc0a3dc: 40 9e ff a4 bne+ cr7,ffc0a380 <rtems_rate_monotonic_period+0x98><== NEVER TAKEN
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc0a3e0: 4b ff fd e1 bl ffc0a1c0 <_Rate_monotonic_Update_statistics>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a3e4: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a3e8: 38 00 00 02 li r0,2
the_period->next_length = length;
ffc0a3ec: 93 dd 00 3c stw r30,60(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a3f0: 3c 60 00 00 lis r3,0
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a3f4: 90 1d 00 38 stw r0,56(r29)
ffc0a3f8: 38 63 2e 68 addi r3,r3,11880
ffc0a3fc: 38 9d 00 10 addi r4,r29,16
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a400: 93 dd 00 1c stw r30,28(r29)
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;
ffc0a404: 3b e0 00 06 li r31,6
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a408: 48 00 51 ed bl ffc0f5f4 <_Watchdog_Insert>
ffc0a40c: 3d 20 00 00 lis r9,0
ffc0a410: 80 09 21 14 lwz r0,8468(r9)
ffc0a414: 80 7d 00 40 lwz r3,64(r29)
ffc0a418: 80 9d 00 3c lwz r4,60(r29)
ffc0a41c: 7c 09 03 a6 mtctr r0
ffc0a420: 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();
ffc0a424: 48 00 3d a5 bl ffc0e1c8 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc0a428: 4b ff ff 58 b ffc0a380 <rtems_rate_monotonic_period+0x98>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
ffc0a42c: 80 03 00 38 lwz r0,56(r3)
ffc0a430: 3b e0 00 00 li r31,0
ffc0a434: 2b 80 00 04 cmplwi cr7,r0,4
ffc0a438: 41 9d 00 14 bgt- cr7,ffc0a44c <rtems_rate_monotonic_period+0x164><== NEVER TAKEN
ffc0a43c: 3d 20 ff c2 lis r9,-62
ffc0a440: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0a444: 39 29 2c 98 addi r9,r9,11416
ffc0a448: 7f e9 00 2e lwzx r31,r9,r0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
ffc0a44c: 48 00 3d 7d bl ffc0e1c8 <_Thread_Enable_dispatch>
return( return_value );
ffc0a450: 4b ff ff 30 b ffc0a380 <rtems_rate_monotonic_period+0x98>
ffc0a454: 7f 60 01 24 mtmsr r27
_ISR_Disable( level );
if ( the_period->state == RATE_MONOTONIC_INACTIVE ) {
_ISR_Enable( level );
the_period->next_length = length;
ffc0a458: 93 c3 00 3c stw r30,60(r3)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc0a45c: 4b ff fc 91 bl ffc0a0ec <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a460: 39 20 00 02 li r9,2
ffc0a464: 91 3d 00 38 stw r9,56(r29)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc0a468: 3d 20 ff c1 lis r9,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a46c: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc0a470: 39 29 a8 c8 addi r9,r9,-22328
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0a474: 90 1d 00 18 stw r0,24(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a478: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc0a47c: 91 3d 00 2c stw r9,44(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a480: 38 63 2e 68 addi r3,r3,11880
ffc0a484: 38 9d 00 10 addi r4,r29,16
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc0a488: 93 fd 00 30 stw r31,48(r29)
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc0a48c: 3b e0 00 00 li r31,0
the_watchdog->user_data = user_data;
ffc0a490: 90 1d 00 34 stw r0,52(r29)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a494: 93 dd 00 1c stw r30,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a498: 48 00 51 5d bl ffc0f5f4 <_Watchdog_Insert>
id,
NULL
);
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc0a49c: 48 00 3d 2d bl ffc0e1c8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a4a0: 4b ff fe e0 b ffc0a380 <rtems_rate_monotonic_period+0x98>
if ( the_period->state == RATE_MONOTONIC_ACTIVE ) {
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc0a4a4: 4b ff fd 1d bl ffc0a1c0 <_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;
ffc0a4a8: 38 00 00 01 li r0,1
ffc0a4ac: 90 1d 00 38 stw r0,56(r29)
the_period->next_length = length;
ffc0a4b0: 93 dd 00 3c stw r30,60(r29)
ffc0a4b4: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc0a4b8: 81 3c 00 0c lwz r9,12(r28)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a4bc: 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;
ffc0a4c0: 80 1d 00 08 lwz r0,8(r29)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a4c4: 7d 23 4b 78 mr r3,r9
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc0a4c8: 90 09 00 20 stw r0,32(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a4cc: 48 00 47 fd bl ffc0ecc8 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc0a4d0: 7d 20 00 a6 mfmsr r9
ffc0a4d4: 7c 10 42 a6 mfsprg r0,0
ffc0a4d8: 7d 20 00 78 andc r0,r9,r0
ffc0a4dc: 7c 00 01 24 mtmsr r0
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a4e0: 39 60 00 02 li r11,2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
ffc0a4e4: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc0a4e8: 91 7d 00 38 stw r11,56(r29)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a4ec: 7d 20 01 24 mtmsr r9
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
ffc0a4f0: 2f 80 00 03 cmpwi cr7,r0,3
ffc0a4f4: 41 9e 00 10 beq- cr7,ffc0a504 <rtems_rate_monotonic_period+0x21c><== NEVER TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
ffc0a4f8: 48 00 3c d1 bl ffc0e1c8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a4fc: 3b e0 00 00 li r31,0
ffc0a500: 4b ff fe 80 b ffc0a380 <rtems_rate_monotonic_period+0x98>
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc0a504: 80 7c 00 0c lwz r3,12(r28) <== NOT EXECUTED
ffc0a508: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc0a50c: 48 00 38 35 bl ffc0dd40 <_Thread_Clear_state> <== NOT EXECUTED
ffc0a510: 4b ff ff e8 b ffc0a4f8 <rtems_rate_monotonic_period+0x210><== NOT EXECUTED
ffc0a514 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc0a514: 94 21 ff 70 stwu r1,-144(r1)
ffc0a518: 7c 08 02 a6 mflr r0
ffc0a51c: 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 )
ffc0a520: 7c 80 23 79 mr. r0,r4
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc0a524: 93 a1 00 84 stw r29,132(r1)
ffc0a528: 7c 7d 1b 78 mr r29,r3
ffc0a52c: 93 01 00 70 stw r24,112(r1)
ffc0a530: 93 21 00 74 stw r25,116(r1)
ffc0a534: 93 41 00 78 stw r26,120(r1)
ffc0a538: 93 61 00 7c stw r27,124(r1)
ffc0a53c: 93 81 00 80 stw r28,128(r1)
ffc0a540: 93 c1 00 88 stw r30,136(r1)
ffc0a544: 93 e1 00 8c stw r31,140(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc0a548: 90 01 00 68 stw r0,104(r1)
ffc0a54c: 41 82 01 70 beq- ffc0a6bc <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
ffc0a550: 3c 80 ff c2 lis r4,-62
ffc0a554: 7c 09 03 a6 mtctr r0
ffc0a558: 38 84 2c ac addi r4,r4,11436
/*
* 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 ;
ffc0a55c: 3f c0 00 00 lis r30,0
ffc0a560: 3b de 2c 98 addi r30,r30,11416
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc0a564: 4c c6 31 82 crclr 4*cr1+eq
ffc0a568: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc0a56c: 80 01 00 68 lwz r0,104(r1)
ffc0a570: 3c 80 ff c2 lis r4,-62
ffc0a574: 7c 09 03 a6 mtctr r0
ffc0a578: 38 84 2c cc addi r4,r4,11468
ffc0a57c: 7f a3 eb 78 mr r3,r29
ffc0a580: 4c c6 31 82 crclr 4*cr1+eq
ffc0a584: 4e 80 04 21 bctrl
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc0a588: 80 01 00 68 lwz r0,104(r1)
ffc0a58c: 3c 80 ff c2 lis r4,-62
ffc0a590: 7c 09 03 a6 mtctr r0
ffc0a594: 38 84 2c f0 addi r4,r4,11504
ffc0a598: 7f a3 eb 78 mr r3,r29
ffc0a59c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a5a0: 4e 80 04 21 bctrl
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc0a5a4: 80 01 00 68 lwz r0,104(r1)
ffc0a5a8: 3c 80 ff c2 lis r4,-62
ffc0a5ac: 7c 09 03 a6 mtctr r0
ffc0a5b0: 38 84 2d 14 addi r4,r4,11540
ffc0a5b4: 7f a3 eb 78 mr r3,r29
ffc0a5b8: 4c c6 31 82 crclr 4*cr1+eq
ffc0a5bc: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc0a5c0: 80 01 00 68 lwz r0,104(r1)
ffc0a5c4: 3c 80 ff c2 lis r4,-62
ffc0a5c8: 7c 09 03 a6 mtctr r0
ffc0a5cc: 7f a3 eb 78 mr r3,r29
ffc0a5d0: 38 84 2d 60 addi r4,r4,11616
ffc0a5d4: 4c c6 31 82 crclr 4*cr1+eq
ffc0a5d8: 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 ;
ffc0a5dc: 83 fe 00 08 lwz r31,8(r30)
ffc0a5e0: 80 1e 00 0c lwz r0,12(r30)
ffc0a5e4: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a5e8: 41 9d 00 d4 bgt- cr7,ffc0a6bc <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8><== NEVER TAKEN
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a5ec: 3f 40 ff c2 lis r26,-62
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,
ffc0a5f0: 3f 00 ff c2 lis r24,-62
ffc0a5f4: 3f 80 10 62 lis r28,4194
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,
ffc0a5f8: 3f 20 ff c2 lis r25,-62
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a5fc: 3f 60 ff c2 lis r27,-62
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a600: 3b 5a 2d ac addi r26,r26,11692
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,
ffc0a604: 3b 18 2d c4 addi r24,r24,11716
ffc0a608: 63 9c 4d d3 ori r28,r28,19923
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,
ffc0a60c: 3b 39 2d e4 addi r25,r25,11748
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a610: 3b 7b 19 00 addi r27,r27,6400
ffc0a614: 48 00 00 14 b ffc0a628 <rtems_rate_monotonic_report_statistics_with_plugin+0x114>
/*
* 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 ;
ffc0a618: 80 1e 00 0c lwz r0,12(r30)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc0a61c: 3b ff 00 01 addi r31,r31,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 ;
ffc0a620: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a624: 41 9c 00 98 blt- cr7,ffc0a6bc <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc0a628: 7f e3 fb 78 mr r3,r31
ffc0a62c: 38 81 00 30 addi r4,r1,48
ffc0a630: 48 00 80 79 bl ffc126a8 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
ffc0a634: 2f 83 00 00 cmpwi cr7,r3,0
ffc0a638: 40 9e ff e0 bne+ cr7,ffc0a618 <rtems_rate_monotonic_report_statistics_with_plugin+0x104>
#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 );
ffc0a63c: 38 81 00 18 addi r4,r1,24
ffc0a640: 7f e3 fb 78 mr r3,r31
ffc0a644: 48 00 81 75 bl ffc127b8 <rtems_rate_monotonic_get_status>
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc0a648: 80 61 00 18 lwz r3,24(r1)
ffc0a64c: 38 a1 00 08 addi r5,r1,8
ffc0a650: 38 80 00 05 li r4,5
ffc0a654: 48 00 03 41 bl ffc0a994 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc0a658: 80 01 00 68 lwz r0,104(r1)
ffc0a65c: 7f 44 d3 78 mr r4,r26
ffc0a660: 80 e1 00 30 lwz r7,48(r1)
ffc0a664: 7f e5 fb 78 mr r5,r31
ffc0a668: 7c 09 03 a6 mtctr r0
ffc0a66c: 7f a3 eb 78 mr r3,r29
ffc0a670: 81 01 00 34 lwz r8,52(r1)
ffc0a674: 38 c1 00 08 addi r6,r1,8
ffc0a678: 4c c6 31 82 crclr 4*cr1+eq
ffc0a67c: 4e 80 04 21 bctrl
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a680: 80 01 00 30 lwz r0,48(r1)
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 );
ffc0a684: 38 61 00 48 addi r3,r1,72
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a688: 2f 80 00 00 cmpwi cr7,r0,0
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 );
ffc0a68c: 38 a1 00 10 addi r5,r1,16
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a690: 7f 64 db 78 mr r4,r27
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc0a694: 40 9e 00 58 bne- cr7,ffc0a6ec <rtems_rate_monotonic_report_statistics_with_plugin+0x1d8>
(*print)( context, "\n" );
ffc0a698: 80 01 00 68 lwz r0,104(r1)
ffc0a69c: 7f a3 eb 78 mr r3,r29
* 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++ ) {
ffc0a6a0: 3b ff 00 01 addi r31,r31,1
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc0a6a4: 7c 09 03 a6 mtctr r0
ffc0a6a8: 4c c6 31 82 crclr 4*cr1+eq
ffc0a6ac: 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 ;
ffc0a6b0: 80 1e 00 0c lwz r0,12(r30)
ffc0a6b4: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a6b8: 40 9c ff 70 bge+ cr7,ffc0a628 <rtems_rate_monotonic_report_statistics_with_plugin+0x114><== ALWAYS TAKEN
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc0a6bc: 80 01 00 94 lwz r0,148(r1)
ffc0a6c0: 83 01 00 70 lwz r24,112(r1)
ffc0a6c4: 7c 08 03 a6 mtlr r0
ffc0a6c8: 83 21 00 74 lwz r25,116(r1)
ffc0a6cc: 83 41 00 78 lwz r26,120(r1)
ffc0a6d0: 83 61 00 7c lwz r27,124(r1)
ffc0a6d4: 83 81 00 80 lwz r28,128(r1)
ffc0a6d8: 83 a1 00 84 lwz r29,132(r1)
ffc0a6dc: 83 c1 00 88 lwz r30,136(r1)
ffc0a6e0: 83 e1 00 8c lwz r31,140(r1)
ffc0a6e4: 38 21 00 90 addi r1,r1,144
ffc0a6e8: 4e 80 00 20 blr
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 );
ffc0a6ec: 7c 04 03 78 mr r4,r0
ffc0a6f0: 48 00 48 dd bl ffc0efcc <_Timespec_Divide_by_integer>
(*print)( context,
ffc0a6f4: 80 01 00 14 lwz r0,20(r1)
ffc0a6f8: 80 81 00 3c lwz r4,60(r1)
ffc0a6fc: 7f a3 eb 78 mr r3,r29
ffc0a700: 81 61 00 44 lwz r11,68(r1)
ffc0a704: 7d 40 e0 96 mulhw r10,r0,r28
ffc0a708: 80 e1 00 40 lwz r7,64(r1)
ffc0a70c: 7c c4 e0 96 mulhw r6,r4,r28
ffc0a710: 81 21 00 10 lwz r9,16(r1)
ffc0a714: 80 a1 00 38 lwz r5,56(r1)
ffc0a718: 7d 0b e0 96 mulhw r8,r11,r28
ffc0a71c: 7c 00 fe 70 srawi r0,r0,31
ffc0a720: 7d 4a 36 70 srawi r10,r10,6
ffc0a724: 7d 40 50 50 subf r10,r0,r10
ffc0a728: 80 01 00 68 lwz r0,104(r1)
ffc0a72c: 7d 6b fe 70 srawi r11,r11,31
ffc0a730: 7c 84 fe 70 srawi r4,r4,31
ffc0a734: 7c 09 03 a6 mtctr r0
ffc0a738: 7c c6 36 70 srawi r6,r6,6
ffc0a73c: 7d 08 36 70 srawi r8,r8,6
ffc0a740: 7c c4 30 50 subf r6,r4,r6
ffc0a744: 7d 0b 40 50 subf r8,r11,r8
ffc0a748: 7f 04 c3 78 mr r4,r24
ffc0a74c: 4c c6 31 82 crclr 4*cr1+eq
ffc0a750: 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);
ffc0a754: 80 81 00 30 lwz r4,48(r1)
ffc0a758: 38 61 00 60 addi r3,r1,96
ffc0a75c: 38 a1 00 10 addi r5,r1,16
ffc0a760: 48 00 48 6d bl ffc0efcc <_Timespec_Divide_by_integer>
(*print)( context,
ffc0a764: 80 01 00 14 lwz r0,20(r1)
ffc0a768: 80 c1 00 54 lwz r6,84(r1)
ffc0a76c: 7f a3 eb 78 mr r3,r29
ffc0a770: 81 61 00 5c lwz r11,92(r1)
ffc0a774: 7d 40 e0 96 mulhw r10,r0,r28
ffc0a778: 80 a1 00 50 lwz r5,80(r1)
ffc0a77c: 7d 86 e0 96 mulhw r12,r6,r28
ffc0a780: 80 e1 00 58 lwz r7,88(r1)
ffc0a784: 81 21 00 10 lwz r9,16(r1)
ffc0a788: 7d 0b e0 96 mulhw r8,r11,r28
ffc0a78c: 7c 00 fe 70 srawi r0,r0,31
ffc0a790: 7d 4a 36 70 srawi r10,r10,6
ffc0a794: 7d 40 50 50 subf r10,r0,r10
ffc0a798: 80 01 00 68 lwz r0,104(r1)
ffc0a79c: 7d 8c 36 70 srawi r12,r12,6
ffc0a7a0: 7d 6b fe 70 srawi r11,r11,31
ffc0a7a4: 7c 09 03 a6 mtctr r0
ffc0a7a8: 7c c6 fe 70 srawi r6,r6,31
ffc0a7ac: 7d 08 36 70 srawi r8,r8,6
ffc0a7b0: 7f 24 cb 78 mr r4,r25
ffc0a7b4: 7c c6 60 50 subf r6,r6,r12
ffc0a7b8: 7d 0b 40 50 subf r8,r11,r8
ffc0a7bc: 4c c6 31 82 crclr 4*cr1+eq
ffc0a7c0: 4e 80 04 21 bctrl
ffc0a7c4: 4b ff fe 54 b ffc0a618 <rtems_rate_monotonic_report_statistics_with_plugin+0x104>
ffc0a7d8 <rtems_rate_monotonic_reset_all_statistics>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0a7d8: 3d 20 00 00 lis r9,0
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
ffc0a7dc: 94 21 ff f0 stwu r1,-16(r1)
ffc0a7e0: 7c 08 02 a6 mflr r0
ffc0a7e4: 81 69 28 6c lwz r11,10348(r9)
ffc0a7e8: 90 01 00 14 stw r0,20(r1)
ffc0a7ec: 38 0b 00 01 addi r0,r11,1
ffc0a7f0: 90 09 28 6c stw r0,10348(r9)
ffc0a7f4: 93 c1 00 08 stw r30,8(r1)
ffc0a7f8: 93 e1 00 0c stw r31,12(r1)
return _Thread_Dispatch_disable_level;
ffc0a7fc: 80 09 28 6c lwz r0,10348(r9)
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
ffc0a800: 3f c0 00 00 lis r30,0
ffc0a804: 3b de 2c 98 addi r30,r30,11416
ffc0a808: 83 fe 00 08 lwz r31,8(r30)
ffc0a80c: 80 1e 00 0c lwz r0,12(r30)
ffc0a810: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a814: 41 9d 00 1c bgt- cr7,ffc0a830 <rtems_rate_monotonic_reset_all_statistics+0x58><== NEVER TAKEN
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
(void) rtems_rate_monotonic_reset_statistics( id );
ffc0a818: 7f e3 fb 78 mr r3,r31
ffc0a81c: 48 00 00 31 bl ffc0a84c <rtems_rate_monotonic_reset_statistics>
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
ffc0a820: 80 1e 00 0c lwz r0,12(r30)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc0a824: 3b ff 00 01 addi r31,r31,1
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
ffc0a828: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0a82c: 40 9c ff ec bge+ cr7,ffc0a818 <rtems_rate_monotonic_reset_all_statistics+0x40>
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
ffc0a830: 48 00 39 99 bl ffc0e1c8 <_Thread_Enable_dispatch>
}
ffc0a834: 80 01 00 14 lwz r0,20(r1)
ffc0a838: 83 c1 00 08 lwz r30,8(r1)
ffc0a83c: 7c 08 03 a6 mtlr r0
ffc0a840: 83 e1 00 0c lwz r31,12(r1)
ffc0a844: 38 21 00 10 addi r1,r1,16
ffc0a848: 4e 80 00 20 blr
ffc1ae38 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc1ae38: 94 21 ff e0 stwu r1,-32(r1)
ffc1ae3c: 7c 08 02 a6 mflr r0
ffc1ae40: 93 e1 00 1c stw r31,28(r1)
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc1ae44: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc1ae48: 90 01 00 24 stw r0,36(r1)
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
ffc1ae4c: 38 00 00 0a li r0,10
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc1ae50: 40 82 00 1c bne- ffc1ae6c <rtems_signal_send+0x34>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1ae54: 7c 03 03 78 mr r3,r0
ffc1ae58: 80 01 00 24 lwz r0,36(r1)
ffc1ae5c: 83 e1 00 1c lwz r31,28(r1)
ffc1ae60: 38 21 00 20 addi r1,r1,32
ffc1ae64: 7c 08 03 a6 mtlr r0
ffc1ae68: 4e 80 00 20 blr
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc1ae6c: 38 81 00 08 addi r4,r1,8
ffc1ae70: 48 00 5b 6d bl ffc209dc <_Thread_Get>
switch ( location ) {
ffc1ae74: 80 01 00 08 lwz r0,8(r1)
ffc1ae78: 2f 80 00 00 cmpwi cr7,r0,0
ffc1ae7c: 40 9e 00 6c bne- cr7,ffc1aee8 <rtems_signal_send+0xb0>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc1ae80: 81 23 01 30 lwz r9,304(r3)
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
ffc1ae84: 80 09 00 0c lwz r0,12(r9)
ffc1ae88: 2f 80 00 00 cmpwi cr7,r0,0
ffc1ae8c: 41 9e 00 78 beq- cr7,ffc1af04 <rtems_signal_send+0xcc>
if ( asr->is_enabled ) {
ffc1ae90: 88 09 00 08 lbz r0,8(r9)
ffc1ae94: 2f 80 00 00 cmpwi cr7,r0,0
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc1ae98: 7c 00 00 a6 mfmsr r0
ffc1ae9c: 7d 70 42 a6 mfsprg r11,0
ffc1aea0: 7c 0b 58 78 andc r11,r0,r11
ffc1aea4: 7d 60 01 24 mtmsr r11
ffc1aea8: 41 9e 00 68 beq- cr7,ffc1af10 <rtems_signal_send+0xd8>
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc1aeac: 81 69 00 14 lwz r11,20(r9)
ffc1aeb0: 7d 7f fb 78 or r31,r11,r31
ffc1aeb4: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc1aeb8: 7c 00 01 24 mtmsr r0
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc1aebc: 3d 20 00 00 lis r9,0
ffc1aec0: 39 29 75 44 addi r9,r9,30020
ffc1aec4: 80 09 00 08 lwz r0,8(r9)
ffc1aec8: 2f 80 00 00 cmpwi cr7,r0,0
ffc1aecc: 41 9e 00 10 beq- cr7,ffc1aedc <rtems_signal_send+0xa4>
ffc1aed0: 80 09 00 0c lwz r0,12(r9)
ffc1aed4: 7f 83 00 00 cmpw cr7,r3,r0
ffc1aed8: 41 9e 00 4c beq- cr7,ffc1af24 <rtems_signal_send+0xec> <== ALWAYS TAKEN
_Thread_Dispatch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc1aedc: 48 00 5a c5 bl ffc209a0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc1aee0: 38 00 00 00 li r0,0
ffc1aee4: 4b ff ff 70 b ffc1ae54 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1aee8: 38 00 00 04 li r0,4
}
ffc1aeec: 83 e1 00 1c lwz r31,28(r1)
ffc1aef0: 7c 03 03 78 mr r3,r0
ffc1aef4: 80 01 00 24 lwz r0,36(r1)
ffc1aef8: 38 21 00 20 addi r1,r1,32
ffc1aefc: 7c 08 03 a6 mtlr r0
ffc1af00: 4e 80 00 20 blr
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
ffc1af04: 48 00 5a 9d bl ffc209a0 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
ffc1af08: 38 00 00 0b li r0,11
ffc1af0c: 4b ff ff 48 b ffc1ae54 <rtems_signal_send+0x1c>
ffc1af10: 81 69 00 18 lwz r11,24(r9)
ffc1af14: 7d 7f fb 78 or r31,r11,r31
ffc1af18: 93 e9 00 18 stw r31,24(r9)
ffc1af1c: 7c 00 01 24 mtmsr r0
ffc1af20: 4b ff ff bc b ffc1aedc <rtems_signal_send+0xa4>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Thread_Dispatch_necessary = true;
ffc1af24: 38 00 00 01 li r0,1
ffc1af28: 98 09 00 18 stb r0,24(r9)
ffc1af2c: 4b ff ff b0 b ffc1aedc <rtems_signal_send+0xa4>
ffc136b4 <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc136b4: 2c 05 00 00 cmpwi r5,0
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
ffc136b8: 7c 08 02 a6 mflr r0
ffc136bc: 94 21 ff f8 stwu r1,-8(r1)
ffc136c0: 90 01 00 0c stw r0,12(r1)
ffc136c4: 7c 60 1b 78 mr r0,r3
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
ffc136c8: 38 60 00 09 li r3,9
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc136cc: 41 82 01 34 beq- ffc13800 <rtems_task_mode+0x14c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc136d0: 3c c0 00 00 lis r6,0
ffc136d4: 38 c6 31 44 addi r6,r6,12612
ffc136d8: 81 26 00 0c lwz r9,12(r6)
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 )
ffc136dc: 81 69 00 7c lwz r11,124(r9)
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc136e0: 89 09 00 74 lbz r8,116(r9)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc136e4: 2f 8b 00 00 cmpwi cr7,r11,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc136e8: 81 69 01 30 lwz r11,304(r9)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc136ec: 7d 08 00 34 cntlzw r8,r8
ffc136f0: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc136f4: 55 07 40 2e rlwinm r7,r8,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc136f8: 40 9e 01 18 bne- cr7,ffc13810 <rtems_task_mode+0x15c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc136fc: 89 0b 00 08 lbz r8,8(r11)
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc13700: 39 40 00 00 li r10,0
ffc13704: 7d 08 00 34 cntlzw r8,r8
ffc13708: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc1370c: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc13710: 7d 07 3b 78 or r7,r8,r7
ffc13714: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc13718: 55 48 8f fe rlwinm r8,r10,17,31,31
ffc1371c: 2f 88 00 00 cmpwi cr7,r8,0
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc13720: 70 8a 01 00 andi. r10,r4,256
ffc13724: 7d 40 00 26 mfcr r10
ffc13728: 55 4a ff fe rlwinm r10,r10,31,31,31
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
ffc1372c: 7c e7 53 78 or r7,r7,r10
*previous_mode_set = old_mode;
ffc13730: 90 e5 00 00 stw r7,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc13734: 41 82 00 14 beq- ffc13748 <rtems_task_mode+0x94>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc13738: 70 08 01 00 andi. r8,r0,256
ffc1373c: 7d 40 00 26 mfcr r10
ffc13740: 55 4a 1f fe rlwinm r10,r10,3,31,31
ffc13744: 99 49 00 74 stb r10,116(r9)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc13748: 70 8a 02 00 andi. r10,r4,512
ffc1374c: 41 82 00 20 beq- ffc1376c <rtems_task_mode+0xb8>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc13750: 70 0a 02 00 andi. r10,r0,512
ffc13754: 41 82 01 44 beq- ffc13898 <rtems_task_mode+0x1e4>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc13758: 3d 40 00 00 lis r10,0
ffc1375c: 81 4a 28 08 lwz r10,10248(r10)
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc13760: 39 00 00 01 li r8,1
ffc13764: 91 09 00 7c stw r8,124(r9)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc13768: 91 49 00 78 stw r10,120(r9)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc1376c: 70 88 00 01 andi. r8,r4,1
ffc13770: 41 82 00 20 beq- ffc13790 <rtems_task_mode+0xdc>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc13774: 39 20 00 00 li r9,0
ffc13778: 7d 20 00 a6 mfmsr r9
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc1377c: 70 0a 00 01 andi. r10,r0,1
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
__asm__ volatile (
ffc13780: 7d 50 42 a6 mfsprg r10,0
ffc13784: 40 82 01 24 bne- ffc138a8 <rtems_task_mode+0x1f4>
msr |= ppc_interrupt_get_disable_mask();
ffc13788: 7d 49 4b 78 or r9,r10,r9
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
}
_CPU_MSR_SET(msr);
ffc1378c: 7d 20 01 24 mtmsr r9
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc13790: 70 88 04 00 andi. r8,r4,1024
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc13794: 39 40 00 00 li r10,0
if ( mask & RTEMS_ASR_MASK ) {
ffc13798: 41 82 00 54 beq- ffc137ec <rtems_task_mode+0x138>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc1379c: 70 09 04 00 andi. r9,r0,1024
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
ffc137a0: 89 2b 00 08 lbz r9,8(r11)
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc137a4: 7c 00 00 26 mfcr r0
ffc137a8: 54 00 1f fe rlwinm r0,r0,3,31,31
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
ffc137ac: 7f 89 00 00 cmpw cr7,r9,r0
ffc137b0: 41 9e 00 3c beq- cr7,ffc137ec <rtems_task_mode+0x138>
asr->is_enabled = is_asr_enabled;
ffc137b4: 98 0b 00 08 stb r0,8(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc137b8: 7c 00 00 a6 mfmsr r0
ffc137bc: 7d 30 42 a6 mfsprg r9,0
ffc137c0: 7c 09 48 78 andc r9,r0,r9
ffc137c4: 7d 20 01 24 mtmsr r9
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc137c8: 81 4b 00 18 lwz r10,24(r11)
information->signals_pending = information->signals_posted;
ffc137cc: 81 2b 00 14 lwz r9,20(r11)
information->signals_posted = _signals;
ffc137d0: 91 4b 00 14 stw r10,20(r11)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc137d4: 91 2b 00 18 stw r9,24(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc137d8: 7c 00 01 24 mtmsr r0
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc137dc: 80 0b 00 14 lwz r0,20(r11)
needs_asr_dispatching = true;
ffc137e0: 39 40 00 01 li r10,1
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
ffc137e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc137e8: 41 9e 00 cc beq- cr7,ffc138b4 <rtems_task_mode+0x200>
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc137ec: 3d 20 00 00 lis r9,0
ffc137f0: 80 09 28 48 lwz r0,10312(r9)
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc137f4: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc137f8: 2f 80 00 03 cmpwi cr7,r0,3
ffc137fc: 41 9e 00 58 beq- cr7,ffc13854 <rtems_task_mode+0x1a0>
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
}
ffc13800: 80 01 00 0c lwz r0,12(r1)
ffc13804: 38 21 00 08 addi r1,r1,8
ffc13808: 7c 08 03 a6 mtlr r0
ffc1380c: 4e 80 00 20 blr
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc13810: 89 0b 00 08 lbz r8,8(r11)
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc13814: 60 e7 02 00 ori r7,r7,512
#ifndef ASM
static inline uint32_t _CPU_ISR_Get_level( void )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc13818: 39 40 00 00 li r10,0
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
ffc1381c: 7d 08 00 34 cntlzw r8,r8
ffc13820: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc13824: 55 08 50 2a rlwinm r8,r8,10,0,21
ffc13828: 7d 07 3b 78 or r7,r8,r7
ffc1382c: 7d 40 00 a6 mfmsr r10
if (msr & MSR_EE) return 0;
ffc13830: 55 48 8f fe rlwinm r8,r10,17,31,31
ffc13834: 2f 88 00 00 cmpwi cr7,r8,0
*previous_mode_set = old_mode;
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc13838: 70 8a 01 00 andi. r10,r4,256
ffc1383c: 7d 40 00 26 mfcr r10
ffc13840: 55 4a ff fe rlwinm r10,r10,31,31,31
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
ffc13844: 7c e7 53 78 or r7,r7,r10
*previous_mode_set = old_mode;
ffc13848: 90 e5 00 00 stw r7,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc1384c: 41 a2 fe fc beq- ffc13748 <rtems_task_mode+0x94>
ffc13850: 4b ff fe e8 b ffc13738 <rtems_task_mode+0x84>
{
Thread_Control *executing;
executing = _Thread_Executing;
if ( are_signals_pending ||
ffc13854: 2f 8a 00 00 cmpwi cr7,r10,0
bool are_signals_pending
)
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc13858: 81 26 00 0c lwz r9,12(r6)
if ( are_signals_pending ||
ffc1385c: 40 9e 00 1c bne- cr7,ffc13878 <rtems_task_mode+0x1c4>
ffc13860: 80 06 00 10 lwz r0,16(r6)
ffc13864: 7f 89 00 00 cmpw cr7,r9,r0
ffc13868: 41 be ff 98 beq- cr7,ffc13800 <rtems_task_mode+0x14c>
(!_Thread_Is_heir( executing ) && executing->is_preemptible) ) {
ffc1386c: 88 09 00 74 lbz r0,116(r9)
ffc13870: 2f 80 00 00 cmpwi cr7,r0,0
ffc13874: 41 be ff 8c beq- cr7,ffc13800 <rtems_task_mode+0x14c> <== NEVER TAKEN
_Thread_Dispatch_necessary = true;
ffc13878: 38 00 00 01 li r0,1
ffc1387c: 98 06 00 18 stb r0,24(r6)
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
ffc13880: 4b ff 8a a9 bl ffc0c328 <_Thread_Dispatch>
}
return RTEMS_SUCCESSFUL;
}
ffc13884: 80 01 00 0c lwz r0,12(r1)
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc13888: 38 60 00 00 li r3,0
}
ffc1388c: 7c 08 03 a6 mtlr r0
ffc13890: 38 21 00 08 addi r1,r1,8
ffc13894: 4e 80 00 20 blr
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc13898: 70 88 00 01 andi. r8,r4,1
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc1389c: 91 49 00 7c stw r10,124(r9)
}
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc138a0: 41 a2 fe f0 beq- ffc13790 <rtems_task_mode+0xdc>
ffc138a4: 4b ff fe d0 b ffc13774 <rtems_task_mode+0xc0>
_CPU_MSR_GET(msr);
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
msr |= ppc_interrupt_get_disable_mask();
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc138a8: 7d 29 50 78 andc r9,r9,r10
}
_CPU_MSR_SET(msr);
ffc138ac: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
ffc138b0: 4b ff fe e0 b ffc13790 <rtems_task_mode+0xdc>
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc138b4: 3d 20 00 00 lis r9,0
ffc138b8: 80 09 28 48 lwz r0,10312(r9)
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
ffc138bc: 39 40 00 00 li r10,0
if ( _System_state_Is_up( _System_state_Get() ) ) {
if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) )
_Thread_Dispatch();
}
return RTEMS_SUCCESSFUL;
ffc138c0: 38 60 00 00 li r3,0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) ) {
ffc138c4: 2f 80 00 03 cmpwi cr7,r0,3
ffc138c8: 40 9e ff 38 bne+ cr7,ffc13800 <rtems_task_mode+0x14c> <== NEVER TAKEN
ffc138cc: 4b ff ff 88 b ffc13854 <rtems_task_mode+0x1a0>
ffc0e944 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0e944: 7d 80 00 26 mfcr r12
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0e948: 2e 04 00 00 cmpwi cr4,r4,0
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0e94c: 94 21 ff d8 stwu r1,-40(r1)
ffc0e950: 7c 08 02 a6 mflr r0
ffc0e954: 93 e1 00 24 stw r31,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0e958: 7c 9f 23 78 mr r31,r4
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0e95c: 90 01 00 2c stw r0,44(r1)
ffc0e960: 91 81 00 20 stw r12,32(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0e964: 41 92 00 18 beq- cr4,ffc0e97c <rtems_task_set_priority+0x38>
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 ) );
ffc0e968: 3d 20 00 00 lis r9,0
ffc0e96c: 89 29 27 44 lbz r9,10052(r9)
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
ffc0e970: 38 00 00 13 li r0,19
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
ffc0e974: 7f 84 48 40 cmplw cr7,r4,r9
ffc0e978: 41 9d 00 68 bgt- cr7,ffc0e9e0 <rtems_task_set_priority+0x9c>
if ( !old_priority )
ffc0e97c: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc0e980: 38 00 00 09 li r0,9
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0e984: 41 9e 00 5c beq- cr7,ffc0e9e0 <rtems_task_set_priority+0x9c>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0e988: 38 81 00 08 addi r4,r1,8
ffc0e98c: 90 a1 00 18 stw r5,24(r1)
ffc0e990: 48 00 2e 65 bl ffc117f4 <_Thread_Get>
switch ( location ) {
ffc0e994: 80 01 00 08 lwz r0,8(r1)
ffc0e998: 80 a1 00 18 lwz r5,24(r1)
ffc0e99c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e9a0: 40 9e 00 60 bne- cr7,ffc0ea00 <rtems_task_set_priority+0xbc>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0e9a4: 80 03 00 14 lwz r0,20(r3)
ffc0e9a8: 90 05 00 00 stw r0,0(r5)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0e9ac: 41 92 00 2c beq- cr4,ffc0e9d8 <rtems_task_set_priority+0x94>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0e9b0: 80 03 00 1c lwz r0,28(r3)
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
the_thread->real_priority = new_priority;
ffc0e9b4: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0e9b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e9bc: 41 9e 00 10 beq- cr7,ffc0e9cc <rtems_task_set_priority+0x88>
ffc0e9c0: 80 03 00 14 lwz r0,20(r3)
ffc0e9c4: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0e9c8: 40 9c 00 10 bge- cr7,ffc0e9d8 <rtems_task_set_priority+0x94><== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
ffc0e9cc: 7f e4 fb 78 mr r4,r31
ffc0e9d0: 38 a0 00 00 li r5,0
ffc0e9d4: 48 00 27 c1 bl ffc11194 <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0e9d8: 48 00 2d e1 bl ffc117b8 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0e9dc: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0e9e0: 7c 03 03 78 mr r3,r0
ffc0e9e4: 80 01 00 2c lwz r0,44(r1)
ffc0e9e8: 81 81 00 20 lwz r12,32(r1)
ffc0e9ec: 7c 08 03 a6 mtlr r0
ffc0e9f0: 83 e1 00 24 lwz r31,36(r1)
ffc0e9f4: 7d 80 81 20 mtcrf 8,r12
ffc0e9f8: 38 21 00 28 addi r1,r1,40
ffc0e9fc: 4e 80 00 20 blr
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0ea00: 38 00 00 04 li r0,4
}
ffc0ea04: 81 81 00 20 lwz r12,32(r1)
ffc0ea08: 7c 03 03 78 mr r3,r0
ffc0ea0c: 80 01 00 2c lwz r0,44(r1)
ffc0ea10: 83 e1 00 24 lwz r31,36(r1)
ffc0ea14: 7d 80 81 20 mtcrf 8,r12
ffc0ea18: 7c 08 03 a6 mtlr r0
ffc0ea1c: 38 21 00 28 addi r1,r1,40
ffc0ea20: 4e 80 00 20 blr
ffc0a574 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
ffc0a574: 94 21 ff e0 stwu r1,-32(r1)
ffc0a578: 7c 08 02 a6 mflr r0
ffc0a57c: 93 e1 00 1c stw r31,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
ffc0a580: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
ffc0a584: 90 01 00 24 stw r0,36(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
ffc0a588: 38 00 00 09 li r0,9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
ffc0a58c: 41 82 00 58 beq- ffc0a5e4 <rtems_task_variable_delete+0x70>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
ffc0a590: 38 81 00 08 addi r4,r1,8
ffc0a594: 48 00 2b f9 bl ffc0d18c <_Thread_Get>
switch (location) {
ffc0a598: 80 01 00 08 lwz r0,8(r1)
ffc0a59c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a5a0: 40 9e 00 5c bne- cr7,ffc0a5fc <rtems_task_variable_delete+0x88>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
ffc0a5a4: 81 23 01 3c lwz r9,316(r3)
while (tvp) {
ffc0a5a8: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a5ac: 41 9e 00 30 beq- cr7,ffc0a5dc <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
ffc0a5b0: 80 09 00 04 lwz r0,4(r9)
ffc0a5b4: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a5b8: 40 be 00 18 bne+ cr7,ffc0a5d0 <rtems_task_variable_delete+0x5c>
ffc0a5bc: 48 00 00 74 b ffc0a630 <rtems_task_variable_delete+0xbc>
ffc0a5c0: 80 04 00 04 lwz r0,4(r4)
ffc0a5c4: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a5c8: 41 9e 00 50 beq- cr7,ffc0a618 <rtems_task_variable_delete+0xa4>
ffc0a5cc: 7c 89 23 78 mr r9,r4
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
ffc0a5d0: 80 89 00 00 lwz r4,0(r9)
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
ffc0a5d4: 2f 84 00 00 cmpwi cr7,r4,0
ffc0a5d8: 40 9e ff e8 bne+ cr7,ffc0a5c0 <rtems_task_variable_delete+0x4c><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
ffc0a5dc: 48 00 2b 75 bl ffc0d150 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc0a5e0: 38 00 00 09 li r0,9
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a5e4: 7c 03 03 78 mr r3,r0
ffc0a5e8: 80 01 00 24 lwz r0,36(r1)
ffc0a5ec: 83 e1 00 1c lwz r31,28(r1)
ffc0a5f0: 38 21 00 20 addi r1,r1,32
ffc0a5f4: 7c 08 03 a6 mtlr r0
ffc0a5f8: 4e 80 00 20 blr
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a5fc: 38 00 00 04 li r0,4
}
ffc0a600: 83 e1 00 1c lwz r31,28(r1)
ffc0a604: 7c 03 03 78 mr r3,r0
ffc0a608: 80 01 00 24 lwz r0,36(r1)
ffc0a60c: 38 21 00 20 addi r1,r1,32
ffc0a610: 7c 08 03 a6 mtlr r0
ffc0a614: 4e 80 00 20 blr
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
ffc0a618: 80 04 00 00 lwz r0,0(r4)
ffc0a61c: 90 09 00 00 stw r0,0(r9)
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
ffc0a620: 48 00 00 d9 bl ffc0a6f8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
ffc0a624: 48 00 2b 2d bl ffc0d150 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a628: 38 00 00 00 li r0,0
ffc0a62c: 4b ff ff b8 b ffc0a5e4 <rtems_task_variable_delete+0x70>
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
ffc0a630: 80 09 00 00 lwz r0,0(r9)
ffc0a634: 7d 24 4b 78 mr r4,r9
ffc0a638: 90 03 01 3c stw r0,316(r3)
ffc0a63c: 4b ff ff e4 b ffc0a620 <rtems_task_variable_delete+0xac>
ffc0a640 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a640: 94 21 ff d8 stwu r1,-40(r1)
ffc0a644: 7c 08 02 a6 mflr r0
ffc0a648: 93 e1 00 24 stw r31,36(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
ffc0a64c: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
ffc0a650: 90 01 00 2c stw r0,44(r1)
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
ffc0a654: 38 00 00 09 li r0,9
{
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
ffc0a658: 41 82 00 60 beq- ffc0a6b8 <rtems_task_variable_get+0x78>
return RTEMS_INVALID_ADDRESS;
if ( !result )
ffc0a65c: 2f 85 00 00 cmpwi cr7,r5,0
ffc0a660: 41 9e 00 58 beq- cr7,ffc0a6b8 <rtems_task_variable_get+0x78>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
ffc0a664: 38 81 00 08 addi r4,r1,8
ffc0a668: 90 a1 00 18 stw r5,24(r1)
ffc0a66c: 48 00 2b 21 bl ffc0d18c <_Thread_Get>
switch (location) {
ffc0a670: 80 01 00 08 lwz r0,8(r1)
ffc0a674: 80 a1 00 18 lwz r5,24(r1)
ffc0a678: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a67c: 40 9e 00 54 bne- cr7,ffc0a6d0 <rtems_task_variable_get+0x90>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
ffc0a680: 81 23 01 3c lwz r9,316(r3)
while (tvp) {
ffc0a684: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a688: 40 be 00 14 bne+ cr7,ffc0a69c <rtems_task_variable_get+0x5c>
ffc0a68c: 48 00 00 60 b ffc0a6ec <rtems_task_variable_get+0xac>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
ffc0a690: 81 29 00 00 lwz r9,0(r9)
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
ffc0a694: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a698: 41 9e 00 54 beq- cr7,ffc0a6ec <rtems_task_variable_get+0xac><== NEVER TAKEN
if (tvp->ptr == ptr) {
ffc0a69c: 80 09 00 04 lwz r0,4(r9)
ffc0a6a0: 7f 80 f8 00 cmpw cr7,r0,r31
ffc0a6a4: 40 9e ff ec bne+ cr7,ffc0a690 <rtems_task_variable_get+0x50>
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
ffc0a6a8: 80 09 00 0c lwz r0,12(r9)
ffc0a6ac: 90 05 00 00 stw r0,0(r5)
_Thread_Enable_dispatch();
ffc0a6b0: 48 00 2a a1 bl ffc0d150 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc0a6b4: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0a6b8: 7c 03 03 78 mr r3,r0
ffc0a6bc: 80 01 00 2c lwz r0,44(r1)
ffc0a6c0: 83 e1 00 24 lwz r31,36(r1)
ffc0a6c4: 38 21 00 28 addi r1,r1,40
ffc0a6c8: 7c 08 03 a6 mtlr r0
ffc0a6cc: 4e 80 00 20 blr
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc0a6d0: 38 00 00 04 li r0,4
}
ffc0a6d4: 83 e1 00 24 lwz r31,36(r1)
ffc0a6d8: 7c 03 03 78 mr r3,r0
ffc0a6dc: 80 01 00 2c lwz r0,44(r1)
ffc0a6e0: 38 21 00 28 addi r1,r1,40
ffc0a6e4: 7c 08 03 a6 mtlr r0
ffc0a6e8: 4e 80 00 20 blr
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
ffc0a6ec: 48 00 2a 65 bl ffc0d150 <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
ffc0a6f0: 38 00 00 09 li r0,9
ffc0a6f4: 4b ff ff c4 b ffc0a6b8 <rtems_task_variable_get+0x78>
ffc1bb78 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc1bb78: 94 21 ff e8 stwu r1,-24(r1)
ffc1bb7c: 7c 08 02 a6 mflr r0
ffc1bb80: 7c 64 1b 78 mr r4,r3
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
ffc1bb84: 3c 60 00 00 lis r3,0
ffc1bb88: 90 01 00 1c stw r0,28(r1)
ffc1bb8c: 38 63 79 9c addi r3,r3,31132
ffc1bb90: 38 a1 00 08 addi r5,r1,8
ffc1bb94: 48 00 3d 2d bl ffc1f8c0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1bb98: 80 01 00 08 lwz r0,8(r1)
ffc1bb9c: 2f 80 00 00 cmpwi cr7,r0,0
ffc1bba0: 40 9e 00 30 bne- cr7,ffc1bbd0 <rtems_timer_cancel+0x58>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc1bba4: 80 03 00 38 lwz r0,56(r3)
ffc1bba8: 2f 80 00 04 cmpwi cr7,r0,4
ffc1bbac: 41 9e 00 0c beq- cr7,ffc1bbb8 <rtems_timer_cancel+0x40> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc1bbb0: 38 63 00 10 addi r3,r3,16
ffc1bbb4: 48 00 66 4d bl ffc22200 <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc1bbb8: 48 00 4d e9 bl ffc209a0 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1bbbc: 80 01 00 1c lwz r0,28(r1)
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
(void) _Watchdog_Remove( &the_timer->Ticker );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc1bbc0: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1bbc4: 7c 08 03 a6 mtlr r0
ffc1bbc8: 38 21 00 18 addi r1,r1,24
ffc1bbcc: 4e 80 00 20 blr
ffc1bbd0: 80 01 00 1c lwz r0,28(r1)
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1bbd4: 38 60 00 04 li r3,4
}
ffc1bbd8: 38 21 00 18 addi r1,r1,24
ffc1bbdc: 7c 08 03 a6 mtlr r0
ffc1bbe0: 4e 80 00 20 blr
ffc1c234 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1c234: 94 21 ff c0 stwu r1,-64(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc1c238: 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
)
{
ffc1c23c: 7c 08 02 a6 mflr r0
ffc1c240: 93 e1 00 3c stw r31,60(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc1c244: 83 e9 29 34 lwz r31,10548(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1c248: 93 41 00 28 stw r26,40(r1)
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
ffc1c24c: 3b 40 00 0e li r26,14
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc1c250: 2f 9f 00 00 cmpwi cr7,r31,0
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1c254: 93 a1 00 34 stw r29,52(r1)
ffc1c258: 7c 7d 1b 78 mr r29,r3
ffc1c25c: 93 c1 00 38 stw r30,56(r1)
ffc1c260: 7c be 2b 78 mr r30,r5
ffc1c264: 90 01 00 44 stw r0,68(r1)
ffc1c268: 93 21 00 24 stw r25,36(r1)
ffc1c26c: 93 61 00 2c stw r27,44(r1)
ffc1c270: 93 81 00 30 stw r28,48(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc1c274: 41 9e 00 18 beq- cr7,ffc1c28c <rtems_timer_server_fire_when+0x58>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc1c278: 3d 20 00 00 lis r9,0
ffc1c27c: 88 09 28 e4 lbz r0,10468(r9)
return RTEMS_NOT_DEFINED;
ffc1c280: 3b 40 00 0b li r26,11
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc1c284: 2f 80 00 00 cmpwi cr7,r0,0
ffc1c288: 40 9e 00 34 bne- cr7,ffc1c2bc <rtems_timer_server_fire_when+0x88><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1c28c: 80 01 00 44 lwz r0,68(r1)
ffc1c290: 7f 43 d3 78 mr r3,r26
ffc1c294: 83 21 00 24 lwz r25,36(r1)
ffc1c298: 7c 08 03 a6 mtlr r0
ffc1c29c: 83 41 00 28 lwz r26,40(r1)
ffc1c2a0: 83 61 00 2c lwz r27,44(r1)
ffc1c2a4: 83 81 00 30 lwz r28,48(r1)
ffc1c2a8: 83 a1 00 34 lwz r29,52(r1)
ffc1c2ac: 83 c1 00 38 lwz r30,56(r1)
ffc1c2b0: 83 e1 00 3c lwz r31,60(r1)
ffc1c2b4: 38 21 00 40 addi r1,r1,64
ffc1c2b8: 4e 80 00 20 blr
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc1c2bc: 2f 85 00 00 cmpwi cr7,r5,0
return RTEMS_INVALID_ADDRESS;
ffc1c2c0: 3b 40 00 09 li r26,9
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc1c2c4: 41 be ff c8 beq- cr7,ffc1c28c <rtems_timer_server_fire_when+0x58>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc1c2c8: 7c 83 23 78 mr r3,r4
ffc1c2cc: 90 81 00 18 stw r4,24(r1)
return RTEMS_INVALID_CLOCK;
ffc1c2d0: 3b 40 00 14 li r26,20
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc1c2d4: 90 c1 00 1c stw r6,28(r1)
ffc1c2d8: 4b ff c0 49 bl ffc18320 <_TOD_Validate>
ffc1c2dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc1c2e0: 80 81 00 18 lwz r4,24(r1)
ffc1c2e4: 41 9e ff a8 beq+ cr7,ffc1c28c <rtems_timer_server_fire_when+0x58>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1c2e8: 7c 83 23 78 mr r3,r4
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1c2ec: 3f 60 00 00 lis r27,0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1c2f0: 4b ff bf 95 bl ffc18284 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1c2f4: 80 1b 28 f8 lwz r0,10488(r27)
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1c2f8: 7c 7c 1b 78 mr r28,r3
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1c2fc: 7f 83 00 40 cmplw cr7,r3,r0
ffc1c300: 40 9d ff 8c ble+ cr7,ffc1c28c <rtems_timer_server_fire_when+0x58>
ffc1c304: 3c 60 00 00 lis r3,0
ffc1c308: 38 63 79 9c addi r3,r3,31132
ffc1c30c: 7f a4 eb 78 mr r4,r29
ffc1c310: 38 a1 00 08 addi r5,r1,8
ffc1c314: 48 00 35 ad bl ffc1f8c0 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1c318: 83 21 00 08 lwz r25,8(r1)
ffc1c31c: 7c 7a 1b 78 mr r26,r3
ffc1c320: 2f 99 00 00 cmpwi cr7,r25,0
ffc1c324: 40 9e 00 54 bne- cr7,ffc1c378 <rtems_timer_server_fire_when+0x144>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc1c328: 38 63 00 10 addi r3,r3,16
ffc1c32c: 48 00 5e d5 bl ffc22200 <_Watchdog_Remove>
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();
ffc1c330: 80 1b 28 f8 lwz r0,10488(r27)
ffc1c334: 80 c1 00 1c lwz r6,28(r1)
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc1c338: 39 20 00 03 li r9,3
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
ffc1c33c: 7f 80 e0 50 subf r28,r0,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1c340: 80 1f 00 04 lwz r0,4(r31)
ffc1c344: 7f 44 d3 78 mr r4,r26
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc1c348: 91 3a 00 38 stw r9,56(r26)
_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 );
ffc1c34c: 7f e3 fb 78 mr r3,r31
ffc1c350: 7c 09 03 a6 mtctr r0
ffc1c354: 90 da 00 34 stw r6,52(r26)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc1c358: 93 3a 00 18 stw r25,24(r26)
the_watchdog->routine = routine;
ffc1c35c: 93 da 00 2c stw r30,44(r26)
the_watchdog->id = id;
ffc1c360: 93 ba 00 30 stw r29,48(r26)
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();
ffc1c364: 93 9a 00 1c stw r28,28(r26)
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
ffc1c368: 3b 40 00 00 li r26,0
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1c36c: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc1c370: 48 00 46 31 bl ffc209a0 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
ffc1c374: 4b ff ff 18 b ffc1c28c <rtems_timer_server_fire_when+0x58>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
ffc1c378: 3b 40 00 04 li r26,4
ffc1c37c: 4b ff ff 10 b ffc1c28c <rtems_timer_server_fire_when+0x58>
ffc09910 <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
ffc09910: 2b 83 00 04 cmplwi cr7,r3,4
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
ffc09914: 94 21 ff f8 stwu r1,-8(r1)
ffc09918: 7c 08 02 a6 mflr r0
ffc0991c: 90 01 00 0c stw r0,12(r1)
switch ( policy ) {
ffc09920: 40 9d 00 24 ble- cr7,ffc09944 <sched_get_priority_max+0x34>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09924: 48 00 ad f9 bl ffc1471c <__errno>
ffc09928: 38 00 00 16 li r0,22
ffc0992c: 90 03 00 00 stw r0,0(r3)
ffc09930: 38 60 ff ff li r3,-1
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
ffc09934: 80 01 00 0c lwz r0,12(r1)
ffc09938: 38 21 00 08 addi r1,r1,8
ffc0993c: 7c 08 03 a6 mtlr r0
ffc09940: 4e 80 00 20 blr
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
ffc09944: 38 00 00 01 li r0,1
ffc09948: 7c 03 18 30 slw r3,r0,r3
ffc0994c: 70 60 00 17 andi. r0,r3,23
ffc09950: 41 a2 ff d4 beq- ffc09924 <sched_get_priority_max+0x14> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
ffc09954: 80 01 00 0c lwz r0,12(r1)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
ffc09958: 3d 20 00 00 lis r9,0
ffc0995c: 88 69 27 24 lbz r3,10020(r9)
}
ffc09960: 38 21 00 08 addi r1,r1,8
ffc09964: 7c 08 03 a6 mtlr r0
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
ffc09968: 38 63 ff ff addi r3,r3,-1
}
ffc0996c: 4e 80 00 20 blr
ffc09970 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
ffc09970: 2b 83 00 04 cmplwi cr7,r3,4
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
ffc09974: 94 21 ff f8 stwu r1,-8(r1)
ffc09978: 7c 08 02 a6 mflr r0
ffc0997c: 90 01 00 0c stw r0,12(r1)
switch ( policy ) {
ffc09980: 40 9d 00 24 ble- cr7,ffc099a4 <sched_get_priority_min+0x34>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09984: 48 00 ad 99 bl ffc1471c <__errno>
ffc09988: 38 00 00 16 li r0,22
ffc0998c: 90 03 00 00 stw r0,0(r3)
ffc09990: 38 60 ff ff li r3,-1
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
ffc09994: 80 01 00 0c lwz r0,12(r1)
ffc09998: 38 21 00 08 addi r1,r1,8
ffc0999c: 7c 08 03 a6 mtlr r0
ffc099a0: 4e 80 00 20 blr
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
ffc099a4: 38 00 00 01 li r0,1
ffc099a8: 7c 03 18 30 slw r3,r0,r3
ffc099ac: 70 60 00 17 andi. r0,r3,23
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
ffc099b0: 38 60 00 01 li r3,1
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
ffc099b4: 41 a2 ff d0 beq- ffc09984 <sched_get_priority_min+0x14> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
ffc099b8: 80 01 00 0c lwz r0,12(r1)
ffc099bc: 38 21 00 08 addi r1,r1,8
ffc099c0: 7c 08 03 a6 mtlr r0
ffc099c4: 4e 80 00 20 blr
ffc099c8 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
ffc099c8: 94 21 ff e8 stwu r1,-24(r1)
ffc099cc: 7c 08 02 a6 mflr r0
ffc099d0: 93 e1 00 14 stw r31,20(r1)
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
ffc099d4: 7c 7f 1b 79 mr. r31,r3
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
ffc099d8: 90 01 00 1c stw r0,28(r1)
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
ffc099dc: 40 82 00 30 bne- ffc09a0c <sched_rr_get_interval+0x44> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
ffc099e0: 2f 84 00 00 cmpwi cr7,r4,0
ffc099e4: 41 9e 00 50 beq- cr7,ffc09a34 <sched_rr_get_interval+0x6c>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
ffc099e8: 3d 20 00 00 lis r9,0
ffc099ec: 80 69 28 0c lwz r3,10252(r9)
ffc099f0: 48 00 48 d5 bl ffc0e2c4 <_Timespec_From_ticks>
return 0;
ffc099f4: 38 60 00 00 li r3,0
}
ffc099f8: 80 01 00 1c lwz r0,28(r1)
ffc099fc: 83 e1 00 14 lwz r31,20(r1)
ffc09a00: 38 21 00 18 addi r1,r1,24
ffc09a04: 7c 08 03 a6 mtlr r0
ffc09a08: 4e 80 00 20 blr
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
ffc09a0c: 90 81 00 08 stw r4,8(r1)
ffc09a10: 4b ff bb 69 bl ffc05578 <getpid>
ffc09a14: 7f 83 f8 00 cmpw cr7,r3,r31
ffc09a18: 80 81 00 08 lwz r4,8(r1)
ffc09a1c: 41 9e ff c4 beq+ cr7,ffc099e0 <sched_rr_get_interval+0x18>
rtems_set_errno_and_return_minus_one( ESRCH );
ffc09a20: 48 00 ac fd bl ffc1471c <__errno>
ffc09a24: 38 00 00 03 li r0,3
ffc09a28: 90 03 00 00 stw r0,0(r3)
ffc09a2c: 38 60 ff ff li r3,-1
ffc09a30: 4b ff ff c8 b ffc099f8 <sched_rr_get_interval+0x30>
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09a34: 48 00 ac e9 bl ffc1471c <__errno>
ffc09a38: 38 00 00 16 li r0,22
ffc09a3c: 90 03 00 00 stw r0,0(r3)
ffc09a40: 38 60 ff ff li r3,-1
ffc09a44: 4b ff ff b4 b ffc099f8 <sched_rr_get_interval+0x30>
ffc0c50c <sem_open>:
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc0c50c: 3d 20 00 00 lis r9,0
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
ffc0c510: 94 21 ff b8 stwu r1,-72(r1)
ffc0c514: 7c 08 02 a6 mflr r0
ffc0c518: 81 69 28 08 lwz r11,10248(r9)
ffc0c51c: 7d 80 00 26 mfcr r12
ffc0c520: 90 01 00 4c stw r0,76(r1)
ffc0c524: 39 6b 00 01 addi r11,r11,1
ffc0c528: 91 69 28 08 stw r11,10248(r9)
ffc0c52c: 93 c1 00 40 stw r30,64(r1)
ffc0c530: 7c 7e 1b 78 mr r30,r3
ffc0c534: 93 e1 00 44 stw r31,68(r1)
ffc0c538: 7c 9f 23 78 mr r31,r4
ffc0c53c: 93 81 00 38 stw r28,56(r1)
ffc0c540: 93 a1 00 3c stw r29,60(r1)
ffc0c544: 91 81 00 34 stw r12,52(r1)
ffc0c548: 90 a1 00 28 stw r5,40(r1)
ffc0c54c: 90 c1 00 2c stw r6,44(r1)
return _Thread_Dispatch_disable_level;
ffc0c550: 80 09 28 08 lwz r0,10248(r9)
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
ffc0c554: 54 80 bf fe rlwinm r0,r4,23,31,31
ffc0c558: 2e 00 00 00 cmpwi cr4,r0,0
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
ffc0c55c: 3b a0 00 00 li r29,0
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
ffc0c560: 40 92 00 c4 bne- cr4,ffc0c624 <sem_open+0x118>
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
ffc0c564: 7f c3 f3 78 mr r3,r30
ffc0c568: 38 81 00 10 addi r4,r1,16
ffc0c56c: 48 00 83 75 bl ffc148e0 <_POSIX_Semaphore_Name_to_id>
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
ffc0c570: 7c 7c 1b 79 mr. r28,r3
ffc0c574: 41 82 00 48 beq- ffc0c5bc <sem_open+0xb0>
/*
* Unless provided a valid name that did not already exist
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
ffc0c578: 2f 9c 00 02 cmpwi cr7,r28,2
ffc0c57c: 40 9e 00 08 bne- cr7,ffc0c584 <sem_open+0x78> <== NEVER TAKEN
ffc0c580: 40 92 00 c4 bne- cr4,ffc0c644 <sem_open+0x138>
_Thread_Enable_dispatch();
ffc0c584: 48 00 3c 85 bl ffc10208 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
ffc0c588: 48 00 c0 05 bl ffc1858c <__errno>
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
ffc0c58c: 80 01 00 4c lwz r0,76(r1)
ffc0c590: 81 81 00 34 lwz r12,52(r1)
ffc0c594: 7c 08 03 a6 mtlr r0
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
ffc0c598: 93 83 00 00 stw r28,0(r3)
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
ffc0c59c: 7d 80 81 20 mtcrf 8,r12
* and we are willing to create then it is an error.
*/
if ( !( status == ENOENT && (oflag & O_CREAT) ) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
ffc0c5a0: 38 60 ff ff li r3,-1
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
ffc0c5a4: 83 81 00 38 lwz r28,56(r1)
ffc0c5a8: 83 a1 00 3c lwz r29,60(r1)
ffc0c5ac: 83 c1 00 40 lwz r30,64(r1)
ffc0c5b0: 83 e1 00 44 lwz r31,68(r1)
ffc0c5b4: 38 21 00 48 addi r1,r1,72
ffc0c5b8: 4e 80 00 20 blr
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
ffc0c5bc: 73 ff 0a 00 andi. r31,r31,2560
ffc0c5c0: 2f 9f 0a 00 cmpwi cr7,r31,2560
ffc0c5c4: 41 9e 00 ac beq- cr7,ffc0c670 <sem_open+0x164>
ffc0c5c8: 80 81 00 10 lwz r4,16(r1)
ffc0c5cc: 3c 60 00 00 lis r3,0
ffc0c5d0: 38 a1 00 08 addi r5,r1,8
ffc0c5d4: 38 63 30 ac addi r3,r3,12460
ffc0c5d8: 48 00 2a 91 bl ffc0f068 <_Objects_Get>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
ffc0c5dc: 81 23 00 18 lwz r9,24(r3)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
ffc0c5e0: 90 61 00 0c stw r3,12(r1)
the_semaphore->open_count += 1;
ffc0c5e4: 38 09 00 01 addi r0,r9,1
ffc0c5e8: 90 03 00 18 stw r0,24(r3)
_Thread_Enable_dispatch();
ffc0c5ec: 48 00 3c 1d bl ffc10208 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
ffc0c5f0: 48 00 3c 19 bl ffc10208 <_Thread_Enable_dispatch>
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
ffc0c5f4: 80 61 00 0c lwz r3,12(r1)
ffc0c5f8: 38 63 00 08 addi r3,r3,8
}
ffc0c5fc: 80 01 00 4c lwz r0,76(r1)
ffc0c600: 81 81 00 34 lwz r12,52(r1)
ffc0c604: 7c 08 03 a6 mtlr r0
ffc0c608: 83 81 00 38 lwz r28,56(r1)
ffc0c60c: 83 a1 00 3c lwz r29,60(r1)
ffc0c610: 7d 80 81 20 mtcrf 8,r12
ffc0c614: 83 c1 00 40 lwz r30,64(r1)
ffc0c618: 83 e1 00 44 lwz r31,68(r1)
ffc0c61c: 38 21 00 48 addi r1,r1,72
ffc0c620: 4e 80 00 20 blr
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
ffc0c624: 38 01 00 50 addi r0,r1,80
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
ffc0c628: 83 a1 00 2c lwz r29,44(r1)
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
ffc0c62c: 90 01 00 18 stw r0,24(r1)
ffc0c630: 38 01 00 20 addi r0,r1,32
ffc0c634: 90 01 00 1c stw r0,28(r1)
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
ffc0c638: 38 00 00 04 li r0,4
ffc0c63c: 98 01 00 14 stb r0,20(r1)
ffc0c640: 4b ff ff 24 b ffc0c564 <sem_open+0x58>
/*
* At this point, the semaphore does not exist and everything has been
* checked. We should go ahead and create a semaphore.
*/
status =_POSIX_Semaphore_Create_support(
ffc0c644: 38 80 00 00 li r4,0
ffc0c648: 7f a5 eb 78 mr r5,r29
ffc0c64c: 38 c1 00 0c addi r6,r1,12
ffc0c650: 7f c3 f3 78 mr r3,r30
ffc0c654: 48 00 80 a1 bl ffc146f4 <_POSIX_Semaphore_Create_support>
ffc0c658: 7c 7f 1b 78 mr r31,r3
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
ffc0c65c: 48 00 3b ad bl ffc10208 <_Thread_Enable_dispatch>
if ( status == -1 )
ffc0c660: 2f 9f ff ff cmpwi cr7,r31,-1
return SEM_FAILED;
ffc0c664: 38 60 ff ff li r3,-1
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
if ( status == -1 )
ffc0c668: 40 9e ff 8c bne+ cr7,ffc0c5f4 <sem_open+0xe8>
ffc0c66c: 4b ff ff 90 b ffc0c5fc <sem_open+0xf0>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
ffc0c670: 48 00 3b 99 bl ffc10208 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
ffc0c674: 48 00 bf 19 bl ffc1858c <__errno>
ffc0c678: 38 00 00 11 li r0,17
ffc0c67c: 90 03 00 00 stw r0,0(r3)
ffc0c680: 38 60 ff ff li r3,-1
ffc0c684: 4b ff ff 78 b ffc0c5fc <sem_open+0xf0>
ffc0c6fc <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
ffc0c6fc: 94 21 ff e0 stwu r1,-32(r1)
ffc0c700: 7c 08 02 a6 mflr r0
ffc0c704: 93 e1 00 1c stw r31,28(r1)
ffc0c708: 7c 7f 1b 78 mr r31,r3
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
ffc0c70c: 7c 83 23 78 mr r3,r4
ffc0c710: 38 81 00 08 addi r4,r1,8
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
ffc0c714: 90 01 00 24 stw r0,36(r1)
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
ffc0c718: 48 00 74 0d bl ffc13b24 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
ffc0c71c: 2f 83 00 03 cmpwi cr7,r3,3
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
ffc0c720: 80 a1 00 08 lwz r5,8(r1)
ffc0c724: 7f e3 fb 78 mr r3,r31
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
ffc0c728: 41 9e 00 20 beq- cr7,ffc0c748 <sem_timedwait+0x4c> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
ffc0c72c: 38 80 00 00 li r4,0 <== NOT EXECUTED
ffc0c730: 48 00 82 65 bl ffc14994 <_POSIX_Semaphore_Wait_support><== NOT EXECUTED
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
ffc0c734: 80 01 00 24 lwz r0,36(r1) <== NOT EXECUTED
ffc0c738: 83 e1 00 1c lwz r31,28(r1) <== NOT EXECUTED
ffc0c73c: 38 21 00 20 addi r1,r1,32 <== NOT EXECUTED
ffc0c740: 7c 08 03 a6 mtlr r0 <== NOT EXECUTED
ffc0c744: 4e 80 00 20 blr <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
ffc0c748: 38 80 00 01 li r4,1
ffc0c74c: 48 00 82 49 bl ffc14994 <_POSIX_Semaphore_Wait_support>
lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW )
rtems_set_errno_and_return_minus_one( ETIMEDOUT );
}
return lock_status;
}
ffc0c750: 80 01 00 24 lwz r0,36(r1)
ffc0c754: 83 e1 00 1c lwz r31,28(r1)
ffc0c758: 38 21 00 20 addi r1,r1,32
ffc0c75c: 7c 08 03 a6 mtlr r0
ffc0c760: 4e 80 00 20 blr
ffc097c8 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
ffc097c8: 2c 05 00 00 cmpwi r5,0
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
ffc097cc: 94 21 ff e8 stwu r1,-24(r1)
ffc097d0: 7c 08 02 a6 mflr r0
ffc097d4: 93 c1 00 10 stw r30,16(r1)
ffc097d8: 7c 9e 23 78 mr r30,r4
ffc097dc: 93 e1 00 14 stw r31,20(r1)
ffc097e0: 7c 7f 1b 78 mr r31,r3
ffc097e4: 90 01 00 1c stw r0,28(r1)
ffc097e8: 93 a1 00 0c stw r29,12(r1)
ISR_Level level;
if ( oact )
ffc097ec: 41 82 00 2c beq- ffc09818 <sigaction+0x50>
*oact = _POSIX_signals_Vectors[ sig ];
ffc097f0: 1c 03 00 0c mulli r0,r3,12
ffc097f4: 3d 60 00 00 lis r11,0
ffc097f8: 39 6b 32 00 addi r11,r11,12800
ffc097fc: 7d 2b 02 14 add r9,r11,r0
ffc09800: 7d 4b 00 2e lwzx r10,r11,r0
ffc09804: 81 69 00 04 lwz r11,4(r9)
ffc09808: 80 09 00 08 lwz r0,8(r9)
ffc0980c: 91 45 00 00 stw r10,0(r5)
ffc09810: 91 65 00 04 stw r11,4(r5)
ffc09814: 90 05 00 08 stw r0,8(r5)
if ( !sig )
ffc09818: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0981c: 41 9e 00 cc beq- cr7,ffc098e8 <sigaction+0x120>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc09820: 38 1f ff ff addi r0,r31,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
ffc09824: 2b 80 00 1f cmplwi cr7,r0,31
ffc09828: 41 9d 00 c0 bgt- cr7,ffc098e8 <sigaction+0x120>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
ffc0982c: 2f 9f 00 09 cmpwi cr7,r31,9
ffc09830: 41 9e 00 b8 beq- cr7,ffc098e8 <sigaction+0x120>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
ffc09834: 2f 9e 00 00 cmpwi cr7,r30,0
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
ffc09838: 38 60 00 00 li r3,0
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
ffc0983c: 41 9e 00 58 beq- cr7,ffc09894 <sigaction+0xcc> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09840: 7f a0 00 a6 mfmsr r29
ffc09844: 7c 10 42 a6 mfsprg r0,0
ffc09848: 7f a0 00 78 andc r0,r29,r0
ffc0984c: 7c 00 01 24 mtmsr r0
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
ffc09850: 80 1e 00 08 lwz r0,8(r30)
ffc09854: 2f 80 00 00 cmpwi cr7,r0,0
ffc09858: 41 9e 00 58 beq- cr7,ffc098b0 <sigaction+0xe8>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
ffc0985c: 7f e3 fb 78 mr r3,r31
ffc09860: 48 00 78 41 bl ffc110a0 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
ffc09864: 1f ff 00 0c mulli r31,r31,12
ffc09868: 81 1e 00 00 lwz r8,0(r30)
ffc0986c: 3d 60 00 00 lis r11,0
ffc09870: 81 5e 00 04 lwz r10,4(r30)
ffc09874: 80 1e 00 08 lwz r0,8(r30)
ffc09878: 39 6b 32 00 addi r11,r11,12800
ffc0987c: 7d 2b fa 14 add r9,r11,r31
ffc09880: 7d 0b f9 2e stwx r8,r11,r31
ffc09884: 91 49 00 04 stw r10,4(r9)
ffc09888: 90 09 00 08 stw r0,8(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0988c: 7f a0 01 24 mtmsr r29
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
ffc09890: 38 60 00 00 li r3,0
}
ffc09894: 80 01 00 1c lwz r0,28(r1)
ffc09898: 83 a1 00 0c lwz r29,12(r1)
ffc0989c: 7c 08 03 a6 mtlr r0
ffc098a0: 83 c1 00 10 lwz r30,16(r1)
ffc098a4: 83 e1 00 14 lwz r31,20(r1)
ffc098a8: 38 21 00 18 addi r1,r1,24
ffc098ac: 4e 80 00 20 blr
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
ffc098b0: 1f ff 00 0c mulli r31,r31,12
ffc098b4: 3d 40 ff c2 lis r10,-62
ffc098b8: 39 4a e8 00 addi r10,r10,-6144
ffc098bc: 7d 2a fa 14 add r9,r10,r31
ffc098c0: 7d 0a f8 2e lwzx r8,r10,r31
ffc098c4: 3d 60 00 00 lis r11,0
ffc098c8: 81 49 00 04 lwz r10,4(r9)
ffc098cc: 39 6b 32 00 addi r11,r11,12800
ffc098d0: 80 09 00 08 lwz r0,8(r9)
ffc098d4: 7d 2b fa 14 add r9,r11,r31
ffc098d8: 7d 0b f9 2e stwx r8,r11,r31
ffc098dc: 91 49 00 04 stw r10,4(r9)
ffc098e0: 90 09 00 08 stw r0,8(r9)
ffc098e4: 4b ff ff a8 b ffc0988c <sigaction+0xc4>
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc098e8: 48 00 b3 c9 bl ffc14cb0 <__errno>
ffc098ec: 38 00 00 16 li r0,22
ffc098f0: 90 03 00 00 stw r0,0(r3)
ffc098f4: 38 60 ff ff li r3,-1
ffc098f8: 4b ff ff 9c b ffc09894 <sigaction+0xcc>
ffc09dec <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
ffc09dec: 94 21 ff d0 stwu r1,-48(r1)
ffc09df0: 7c 08 02 a6 mflr r0
ffc09df4: 93 a1 00 24 stw r29,36(r1)
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
ffc09df8: 7c 7d 1b 79 mr. r29,r3
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
ffc09dfc: 93 c1 00 28 stw r30,40(r1)
ffc09e00: 7c be 2b 78 mr r30,r5
ffc09e04: 93 e1 00 2c stw r31,44(r1)
ffc09e08: 7c 9f 23 78 mr r31,r4
ffc09e0c: 90 01 00 34 stw r0,52(r1)
ffc09e10: 93 41 00 18 stw r26,24(r1)
ffc09e14: 93 61 00 1c stw r27,28(r1)
ffc09e18: 93 81 00 20 stw r28,32(r1)
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
ffc09e1c: 41 82 02 4c beq- ffc0a068 <sigtimedwait+0x27c>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
ffc09e20: 2f 85 00 00 cmpwi cr7,r5,0
ffc09e24: 41 9e 01 a0 beq- cr7,ffc09fc4 <sigtimedwait+0x1d8>
if ( !_Timespec_Is_valid( timeout ) )
ffc09e28: 7c a3 2b 78 mr r3,r5
ffc09e2c: 48 00 49 99 bl ffc0e7c4 <_Timespec_Is_valid>
ffc09e30: 2f 83 00 00 cmpwi cr7,r3,0
ffc09e34: 41 9e 02 34 beq- cr7,ffc0a068 <sigtimedwait+0x27c>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
ffc09e38: 7f c3 f3 78 mr r3,r30
ffc09e3c: 48 00 4a 11 bl ffc0e84c <_Timespec_To_ticks>
if ( !interval )
ffc09e40: 7c 64 1b 79 mr. r4,r3
ffc09e44: 41 82 02 24 beq- ffc0a068 <sigtimedwait+0x27c> <== NEVER TAKEN
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
ffc09e48: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09e4c: 41 9e 01 84 beq- cr7,ffc09fd0 <sigtimedwait+0x1e4> <== NEVER TAKEN
the_thread = _Thread_Executing;
ffc09e50: 3f 80 00 00 lis r28,0
ffc09e54: 3b 9c 31 84 addi r28,r28,12676
ffc09e58: 81 3c 00 0c lwz r9,12(r28)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc09e5c: 83 49 01 34 lwz r26,308(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09e60: 7f 60 00 a6 mfmsr r27
ffc09e64: 7c 10 42 a6 mfsprg r0,0
ffc09e68: 7f 60 00 78 andc r0,r27,r0
ffc09e6c: 7c 00 01 24 mtmsr r0
*/
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
ffc09e70: 80 1d 00 00 lwz r0,0(r29)
ffc09e74: 80 7a 00 d4 lwz r3,212(r26)
ffc09e78: 7c 0b 18 39 and. r11,r0,r3
ffc09e7c: 40 82 01 88 bne- ffc0a004 <sigtimedwait+0x218>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
ffc09e80: 3d 60 00 00 lis r11,0
ffc09e84: 80 6b 28 bc lwz r3,10428(r11)
ffc09e88: 7c 0b 18 39 and. r11,r0,r3
ffc09e8c: 40 82 00 d4 bne- ffc09f60 <sigtimedwait+0x174>
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc09e90: 3d 60 00 00 lis r11,0
ffc09e94: 81 4b 28 78 lwz r10,10360(r11)
ffc09e98: 38 0a 00 01 addi r0,r10,1
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
ffc09e9c: 39 40 ff ff li r10,-1
ffc09ea0: 91 5f 00 00 stw r10,0(r31)
ffc09ea4: 90 0b 28 78 stw r0,10360(r11)
return _Thread_Dispatch_disable_level;
ffc09ea8: 80 0b 28 78 lwz r0,10360(r11)
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
ffc09eac: 38 00 00 04 li r0,4
ffc09eb0: 90 09 00 34 stw r0,52(r9)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
ffc09eb4: 3d 60 00 00 lis r11,0
ffc09eb8: 39 6b 33 8c addi r11,r11,13196
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
ffc09ebc: 80 1d 00 00 lwz r0,0(r29)
the_thread->Wait.return_argument = the_info;
ffc09ec0: 93 e9 00 28 stw r31,40(r9)
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
ffc09ec4: 90 09 00 30 stw r0,48(r9)
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;
ffc09ec8: 38 00 00 01 li r0,1
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
ffc09ecc: 91 69 00 44 stw r11,68(r9)
ffc09ed0: 90 0b 00 30 stw r0,48(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc09ed4: 7f 60 01 24 mtmsr r27
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
ffc09ed8: 3c a0 ff c1 lis r5,-63
ffc09edc: 3c 60 00 00 lis r3,0
ffc09ee0: 38 a5 e4 48 addi r5,r5,-7096
ffc09ee4: 38 63 33 8c addi r3,r3,13196
ffc09ee8: 48 00 40 f1 bl ffc0dfd8 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
ffc09eec: 48 00 3a d5 bl ffc0d9c0 <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
ffc09ef0: 80 9f 00 00 lwz r4,0(r31)
ffc09ef4: 7f 43 d3 78 mr r3,r26
ffc09ef8: 7f e5 fb 78 mr r5,r31
ffc09efc: 38 c0 00 00 li r6,0
ffc09f00: 38 e0 00 00 li r7,0
ffc09f04: 48 00 7b 45 bl ffc11a48 <_POSIX_signals_Clear_signals>
/* Set errno only if return code is not EINTR or
* if EINTR was caused by a signal being caught, which
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
ffc09f08: 81 3c 00 0c lwz r9,12(r28)
ffc09f0c: 80 09 00 34 lwz r0,52(r9)
ffc09f10: 2f 80 00 04 cmpwi cr7,r0,4
ffc09f14: 40 9e 01 68 bne- cr7,ffc0a07c <sigtimedwait+0x290>
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
ffc09f18: 83 df 00 00 lwz r30,0(r31)
ffc09f1c: 39 60 00 01 li r11,1
ffc09f20: 80 1d 00 00 lwz r0,0(r29)
ffc09f24: 39 3e ff ff addi r9,r30,-1
ffc09f28: 7d 69 48 30 slw r9,r11,r9
ffc09f2c: 7d 2b 00 39 and. r11,r9,r0
ffc09f30: 41 82 01 4c beq- ffc0a07c <sigtimedwait+0x290>
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
ffc09f34: 80 01 00 34 lwz r0,52(r1)
ffc09f38: 7f c3 f3 78 mr r3,r30
ffc09f3c: 83 41 00 18 lwz r26,24(r1)
ffc09f40: 7c 08 03 a6 mtlr r0
ffc09f44: 83 61 00 1c lwz r27,28(r1)
ffc09f48: 83 81 00 20 lwz r28,32(r1)
ffc09f4c: 83 a1 00 24 lwz r29,36(r1)
ffc09f50: 83 c1 00 28 lwz r30,40(r1)
ffc09f54: 83 e1 00 2c lwz r31,44(r1)
ffc09f58: 38 21 00 30 addi r1,r1,48
ffc09f5c: 4e 80 00 20 blr
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
ffc09f60: 4b ff fe 31 bl ffc09d90 <_POSIX_signals_Get_lowest>
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
ffc09f64: 7f e5 fb 78 mr r5,r31
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
ffc09f68: 7c 7e 1b 78 mr r30,r3
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
ffc09f6c: 7f c4 f3 78 mr r4,r30
ffc09f70: 7f 43 d3 78 mr r3,r26
ffc09f74: 38 c0 00 01 li r6,1
ffc09f78: 38 e0 00 00 li r7,0
ffc09f7c: 48 00 7a cd bl ffc11a48 <_POSIX_signals_Clear_signals>
ffc09f80: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
the_info->si_signo = signo;
the_info->si_code = SI_USER;
ffc09f84: 38 00 00 01 li r0,1
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
ffc09f88: 93 df 00 00 stw r30,0(r31)
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
ffc09f8c: 7f c3 f3 78 mr r3,r30
signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
the_info->si_code = SI_USER;
ffc09f90: 90 1f 00 04 stw r0,4(r31)
the_info->si_value.sival_int = 0;
ffc09f94: 38 00 00 00 li r0,0
ffc09f98: 90 1f 00 08 stw r0,8(r31)
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
ffc09f9c: 80 01 00 34 lwz r0,52(r1)
ffc09fa0: 83 41 00 18 lwz r26,24(r1)
ffc09fa4: 7c 08 03 a6 mtlr r0
ffc09fa8: 83 61 00 1c lwz r27,28(r1)
ffc09fac: 83 81 00 20 lwz r28,32(r1)
ffc09fb0: 83 a1 00 24 lwz r29,36(r1)
ffc09fb4: 83 c1 00 28 lwz r30,40(r1)
ffc09fb8: 83 e1 00 2c lwz r31,44(r1)
ffc09fbc: 38 21 00 30 addi r1,r1,48
ffc09fc0: 4e 80 00 20 blr
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
ffc09fc4: 2f 9f 00 00 cmpwi cr7,r31,0
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
ffc09fc8: 38 80 00 00 li r4,0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
ffc09fcc: 40 9e fe 84 bne+ cr7,ffc09e50 <sigtimedwait+0x64>
the_thread = _Thread_Executing;
ffc09fd0: 3f 80 00 00 lis r28,0
ffc09fd4: 3b 9c 31 84 addi r28,r28,12676
ffc09fd8: 81 3c 00 0c lwz r9,12(r28)
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
ffc09fdc: 3b e1 00 08 addi r31,r1,8
the_thread = _Thread_Executing;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc09fe0: 83 49 01 34 lwz r26,308(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
__asm__ volatile (
ffc09fe4: 7f 60 00 a6 mfmsr r27
ffc09fe8: 7c 10 42 a6 mfsprg r0,0
ffc09fec: 7f 60 00 78 andc r0,r27,r0
ffc09ff0: 7c 00 01 24 mtmsr r0
*/
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
ffc09ff4: 80 1d 00 00 lwz r0,0(r29)
ffc09ff8: 80 7a 00 d4 lwz r3,212(r26)
ffc09ffc: 7c 0b 18 39 and. r11,r0,r3
ffc0a000: 41 82 fe 80 beq+ ffc09e80 <sigtimedwait+0x94>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
ffc0a004: 4b ff fd 8d bl ffc09d90 <_POSIX_signals_Get_lowest>
_POSIX_signals_Clear_signals(
ffc0a008: 7f e5 fb 78 mr r5,r31
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending );
ffc0a00c: 90 7f 00 00 stw r3,0(r31)
ffc0a010: 7c 64 1b 78 mr r4,r3
_POSIX_signals_Clear_signals(
ffc0a014: 38 c0 00 00 li r6,0
ffc0a018: 7f 43 d3 78 mr r3,r26
ffc0a01c: 38 e0 00 00 li r7,0
ffc0a020: 48 00 7a 29 bl ffc11a48 <_POSIX_signals_Clear_signals>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
__asm__ volatile (
ffc0a024: 7f 60 01 24 mtmsr r27
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
ffc0a028: 38 00 00 01 li r0,1
the_info->si_value.sival_int = 0;
return the_info->si_signo;
ffc0a02c: 83 df 00 00 lwz r30,0(r31)
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
ffc0a030: 90 1f 00 04 stw r0,4(r31)
the_info->si_value.sival_int = 0;
ffc0a034: 38 00 00 00 li r0,0
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
ffc0a038: 7f c3 f3 78 mr r3,r30
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
ffc0a03c: 90 1f 00 08 stw r0,8(r31)
errno = _Thread_Executing->Wait.return_code;
return -1;
}
return the_info->si_signo;
}
ffc0a040: 80 01 00 34 lwz r0,52(r1)
ffc0a044: 83 41 00 18 lwz r26,24(r1)
ffc0a048: 7c 08 03 a6 mtlr r0
ffc0a04c: 83 61 00 1c lwz r27,28(r1)
ffc0a050: 83 81 00 20 lwz r28,32(r1)
ffc0a054: 83 a1 00 24 lwz r29,36(r1)
ffc0a058: 83 c1 00 28 lwz r30,40(r1)
ffc0a05c: 83 e1 00 2c lwz r31,44(r1)
ffc0a060: 38 21 00 30 addi r1,r1,48
ffc0a064: 4e 80 00 20 blr
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc0a068: 48 00 b4 79 bl ffc154e0 <__errno>
ffc0a06c: 38 00 00 16 li r0,22
ffc0a070: 90 03 00 00 stw r0,0(r3)
ffc0a074: 3b c0 ff ff li r30,-1
ffc0a078: 4b ff fe bc b ffc09f34 <sigtimedwait+0x148>
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
ffc0a07c: 48 00 b4 65 bl ffc154e0 <__errno>
ffc0a080: 81 3c 00 0c lwz r9,12(r28)
return -1;
ffc0a084: 3b c0 ff ff li r30,-1
* was not in our set.
*/
if ( (_Thread_Executing->Wait.return_code != EINTR)
|| !(*set & signo_to_mask( the_info->si_signo )) ) {
errno = _Thread_Executing->Wait.return_code;
ffc0a088: 80 09 00 34 lwz r0,52(r9)
ffc0a08c: 90 03 00 00 stw r0,0(r3)
return -1;
ffc0a090: 4b ff fe a4 b ffc09f34 <sigtimedwait+0x148>
ffc0c0f4 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0c0f4: 94 21 ff f0 stwu r1,-16(r1)
ffc0c0f8: 7c 08 02 a6 mflr r0
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0c0fc: 38 a0 00 00 li r5,0
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0c100: 93 e1 00 0c stw r31,12(r1)
ffc0c104: 7c 9f 23 78 mr r31,r4
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0c108: 38 80 00 00 li r4,0
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0c10c: 90 01 00 14 stw r0,20(r1)
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0c110: 4b ff fd 19 bl ffc0be28 <sigtimedwait>
if ( status != -1 ) {
ffc0c114: 2f 83 ff ff cmpwi cr7,r3,-1
int *sig
)
{
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0c118: 7c 60 1b 78 mr r0,r3
if ( status != -1 ) {
ffc0c11c: 41 9e 00 28 beq- cr7,ffc0c144 <sigwait+0x50>
if ( sig )
ffc0c120: 2f 9f 00 00 cmpwi cr7,r31,0
*sig = status;
return 0;
ffc0c124: 38 60 00 00 li r3,0
int status;
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
ffc0c128: 41 9e 00 08 beq- cr7,ffc0c130 <sigwait+0x3c> <== NEVER TAKEN
*sig = status;
ffc0c12c: 90 1f 00 00 stw r0,0(r31)
return 0;
}
return errno;
}
ffc0c130: 80 01 00 14 lwz r0,20(r1)
ffc0c134: 83 e1 00 0c lwz r31,12(r1)
ffc0c138: 38 21 00 10 addi r1,r1,16
ffc0c13c: 7c 08 03 a6 mtlr r0
ffc0c140: 4e 80 00 20 blr
if ( sig )
*sig = status;
return 0;
}
return errno;
ffc0c144: 48 00 b0 95 bl ffc171d8 <__errno>
}
ffc0c148: 80 01 00 14 lwz r0,20(r1)
if ( sig )
*sig = status;
return 0;
}
return errno;
ffc0c14c: 80 63 00 00 lwz r3,0(r3)
}
ffc0c150: 7c 08 03 a6 mtlr r0
ffc0c154: 83 e1 00 0c lwz r31,12(r1)
ffc0c158: 38 21 00 10 addi r1,r1,16
ffc0c15c: 4e 80 00 20 blr
ffc08ce0 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
ffc08ce0: 7d 80 00 26 mfcr r12
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
ffc08ce4: 2f 83 00 01 cmpwi cr7,r3,1
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
ffc08ce8: 94 21 ff e8 stwu r1,-24(r1)
ffc08cec: 7c 08 02 a6 mflr r0
ffc08cf0: 93 c1 00 10 stw r30,16(r1)
ffc08cf4: 7c be 2b 78 mr r30,r5
ffc08cf8: 93 e1 00 14 stw r31,20(r1)
ffc08cfc: 7c 9f 23 78 mr r31,r4
ffc08d00: 90 01 00 1c stw r0,28(r1)
ffc08d04: 93 a1 00 0c stw r29,12(r1)
ffc08d08: 91 81 00 08 stw r12,8(r1)
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
ffc08d0c: 40 9e 01 08 bne- cr7,ffc08e14 <timer_create+0x134>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
ffc08d10: 2f 85 00 00 cmpwi cr7,r5,0
ffc08d14: 41 9e 01 00 beq- cr7,ffc08e14 <timer_create+0x134>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
ffc08d18: 2e 04 00 00 cmpwi cr4,r4,0
ffc08d1c: 41 92 00 2c beq- cr4,ffc08d48 <timer_create+0x68>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
ffc08d20: 81 24 00 00 lwz r9,0(r4)
ffc08d24: 38 09 ff ff addi r0,r9,-1
ffc08d28: 2b 80 00 01 cmplwi cr7,r0,1
ffc08d2c: 41 9d 00 e8 bgt- cr7,ffc08e14 <timer_create+0x134> <== NEVER TAKEN
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
ffc08d30: 81 24 00 04 lwz r9,4(r4)
ffc08d34: 2f 89 00 00 cmpwi cr7,r9,0
ffc08d38: 41 9e 00 dc beq- cr7,ffc08e14 <timer_create+0x134> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc08d3c: 39 29 ff ff addi r9,r9,-1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
ffc08d40: 2b 89 00 1f cmplwi cr7,r9,31
ffc08d44: 41 9d 00 d0 bgt- cr7,ffc08e14 <timer_create+0x134> <== NEVER TAKEN
*
* This rountine increments the thread dispatch level
*/
RTEMS_INLINE_ROUTINE uint32_t _Thread_Dispatch_increment_disable_level(void)
{
_Thread_Dispatch_disable_level++;
ffc08d48: 3d 20 00 00 lis r9,0
ffc08d4c: 81 69 28 54 lwz r11,10324(r9)
ffc08d50: 38 0b 00 01 addi r0,r11,1
ffc08d54: 90 09 28 54 stw r0,10324(r9)
return _Thread_Dispatch_disable_level;
ffc08d58: 80 09 28 54 lwz r0,10324(r9)
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
ffc08d5c: 3f a0 00 00 lis r29,0
ffc08d60: 3b bd 2f 2c addi r29,r29,12076
ffc08d64: 7f a3 eb 78 mr r3,r29
ffc08d68: 48 00 28 3d bl ffc0b5a4 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
ffc08d6c: 2c 03 00 00 cmpwi r3,0
ffc08d70: 41 82 00 d8 beq- ffc08e48 <timer_create+0x168>
rtems_set_errno_and_return_minus_one( EAGAIN );
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ffc08d74: 38 00 00 02 li r0,2
ffc08d78: 98 03 00 3c stb r0,60(r3)
ptimer->thread_id = _Thread_Executing->Object.id;
ffc08d7c: 3d 20 00 00 lis r9,0
ffc08d80: 81 29 31 70 lwz r9,12656(r9)
ffc08d84: 80 09 00 08 lwz r0,8(r9)
ffc08d88: 90 03 00 38 stw r0,56(r3)
if ( evp != NULL ) {
ffc08d8c: 41 92 00 1c beq- cr4,ffc08da8 <timer_create+0xc8>
ptimer->inf.sigev_notify = evp->sigev_notify;
ffc08d90: 81 7f 00 00 lwz r11,0(r31)
ptimer->inf.sigev_signo = evp->sigev_signo;
ffc08d94: 81 3f 00 04 lwz r9,4(r31)
ptimer->inf.sigev_value = evp->sigev_value;
ffc08d98: 80 1f 00 08 lwz r0,8(r31)
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
if ( evp != NULL ) {
ptimer->inf.sigev_notify = evp->sigev_notify;
ffc08d9c: 91 63 00 40 stw r11,64(r3)
ptimer->inf.sigev_signo = evp->sigev_signo;
ffc08da0: 91 23 00 44 stw r9,68(r3)
ptimer->inf.sigev_value = evp->sigev_value;
ffc08da4: 90 03 00 48 stw r0,72(r3)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
ffc08da8: 81 23 00 08 lwz r9,8(r3)
}
ptimer->overrun = 0;
ffc08dac: 38 00 00 00 li r0,0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc08db0: 81 5d 00 1c lwz r10,28(r29)
ffc08db4: 55 2b 13 ba rlwinm r11,r9,2,14,29
ffc08db8: 90 03 00 68 stw r0,104(r3)
ptimer->timer_data.it_value.tv_sec = 0;
ffc08dbc: 90 03 00 5c stw r0,92(r3)
ptimer->timer_data.it_value.tv_nsec = 0;
ffc08dc0: 90 03 00 60 stw r0,96(r3)
ptimer->timer_data.it_interval.tv_sec = 0;
ffc08dc4: 90 03 00 54 stw r0,84(r3)
ptimer->timer_data.it_interval.tv_nsec = 0;
ffc08dc8: 90 03 00 58 stw r0,88(r3)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc08dcc: 90 03 00 18 stw r0,24(r3)
the_watchdog->routine = routine;
ffc08dd0: 90 03 00 2c stw r0,44(r3)
the_watchdog->id = id;
ffc08dd4: 90 03 00 30 stw r0,48(r3)
the_watchdog->user_data = user_data;
ffc08dd8: 90 03 00 34 stw r0,52(r3)
ffc08ddc: 7c 6a 59 2e stwx r3,r10,r11
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc08de0: 90 03 00 0c stw r0,12(r3)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
ffc08de4: 91 3e 00 00 stw r9,0(r30)
_Thread_Enable_dispatch();
ffc08de8: 48 00 3e 8d bl ffc0cc74 <_Thread_Enable_dispatch>
return 0;
ffc08dec: 38 60 00 00 li r3,0
}
ffc08df0: 80 01 00 1c lwz r0,28(r1)
ffc08df4: 81 81 00 08 lwz r12,8(r1)
ffc08df8: 7c 08 03 a6 mtlr r0
ffc08dfc: 83 a1 00 0c lwz r29,12(r1)
ffc08e00: 83 c1 00 10 lwz r30,16(r1)
ffc08e04: 7d 80 81 20 mtcrf 8,r12
ffc08e08: 83 e1 00 14 lwz r31,20(r1)
ffc08e0c: 38 21 00 18 addi r1,r1,24
ffc08e10: 4e 80 00 20 blr
if ( !evp->sigev_signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08e14: 48 00 ba c5 bl ffc148d8 <__errno>
ffc08e18: 38 00 00 16 li r0,22
ffc08e1c: 90 03 00 00 stw r0,0(r3)
ffc08e20: 38 60 ff ff li r3,-1
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
_Thread_Enable_dispatch();
return 0;
}
ffc08e24: 80 01 00 1c lwz r0,28(r1)
ffc08e28: 81 81 00 08 lwz r12,8(r1)
ffc08e2c: 7c 08 03 a6 mtlr r0
ffc08e30: 83 a1 00 0c lwz r29,12(r1)
ffc08e34: 83 c1 00 10 lwz r30,16(r1)
ffc08e38: 7d 80 81 20 mtcrf 8,r12
ffc08e3c: 83 e1 00 14 lwz r31,20(r1)
ffc08e40: 38 21 00 18 addi r1,r1,24
ffc08e44: 4e 80 00 20 blr
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
ffc08e48: 48 00 3e 2d bl ffc0cc74 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
ffc08e4c: 48 00 ba 8d bl ffc148d8 <__errno>
ffc08e50: 38 00 00 0b li r0,11
ffc08e54: 90 03 00 00 stw r0,0(r3)
ffc08e58: 38 60 ff ff li r3,-1
ffc08e5c: 4b ff ff 94 b ffc08df0 <timer_create+0x110>
ffc08e60 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
ffc08e60: 94 21 ff c8 stwu r1,-56(r1)
ffc08e64: 7c 08 02 a6 mflr r0
ffc08e68: 93 a1 00 2c stw r29,44(r1)
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
ffc08e6c: 7c bd 2b 79 mr. r29,r5
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
ffc08e70: 93 81 00 28 stw r28,40(r1)
ffc08e74: 7c 9c 23 78 mr r28,r4
ffc08e78: 93 c1 00 30 stw r30,48(r1)
ffc08e7c: 7c de 33 78 mr r30,r6
ffc08e80: 93 e1 00 34 stw r31,52(r1)
ffc08e84: 7c 7f 1b 78 mr r31,r3
ffc08e88: 90 01 00 3c stw r0,60(r1)
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
ffc08e8c: 41 82 01 b8 beq- ffc09044 <timer_settime+0x1e4> <== NEVER TAKEN
/*
* First, it verifies if the structure "value" is correct
* if the number of nanoseconds is not correct return EINVAL
*/
if ( !_Timespec_Is_valid( &(value->it_value) ) ) {
ffc08e90: 38 7d 00 08 addi r3,r29,8
ffc08e94: 48 00 4c 21 bl ffc0dab4 <_Timespec_Is_valid>
ffc08e98: 2f 83 00 00 cmpwi cr7,r3,0
ffc08e9c: 41 9e 01 a8 beq- cr7,ffc09044 <timer_settime+0x1e4>
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !_Timespec_Is_valid( &(value->it_interval) ) ) {
ffc08ea0: 7f a3 eb 78 mr r3,r29
ffc08ea4: 48 00 4c 11 bl ffc0dab4 <_Timespec_Is_valid>
ffc08ea8: 2f 83 00 00 cmpwi cr7,r3,0
ffc08eac: 41 9e 01 98 beq- cr7,ffc09044 <timer_settime+0x1e4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
ffc08eb0: 2f 9c 00 04 cmpwi cr7,r28,4
ffc08eb4: 41 9e 01 20 beq- cr7,ffc08fd4 <timer_settime+0x174>
ffc08eb8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc08ebc: 40 9e 01 88 bne- cr7,ffc09044 <timer_settime+0x1e4>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
ffc08ec0: 80 1d 00 0c lwz r0,12(r29)
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
ffc08ec4: 3c 60 00 00 lis r3,0
ffc08ec8: 81 5d 00 00 lwz r10,0(r29)
ffc08ecc: 7f e4 fb 78 mr r4,r31
ffc08ed0: 81 7d 00 04 lwz r11,4(r29)
ffc08ed4: 38 63 2f 2c addi r3,r3,12076
ffc08ed8: 81 3d 00 08 lwz r9,8(r29)
ffc08edc: 38 a1 00 08 addi r5,r1,8
ffc08ee0: 90 01 00 20 stw r0,32(r1)
ffc08ee4: 91 41 00 14 stw r10,20(r1)
ffc08ee8: 91 61 00 18 stw r11,24(r1)
ffc08eec: 91 21 00 1c stw r9,28(r1)
ffc08ef0: 48 00 2c a5 bl ffc0bb94 <_Objects_Get>
ffc08ef4: 7c 7f 1b 78 mr r31,r3
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
ffc08ef8: 80 01 00 08 lwz r0,8(r1)
ffc08efc: 2f 80 00 00 cmpwi cr7,r0,0
ffc08f00: 40 9e 01 44 bne- cr7,ffc09044 <timer_settime+0x1e4> <== NEVER TAKEN
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
ffc08f04: 80 01 00 1c lwz r0,28(r1)
ffc08f08: 2f 80 00 00 cmpwi cr7,r0,0
ffc08f0c: 40 9e 00 10 bne- cr7,ffc08f1c <timer_settime+0xbc>
ffc08f10: 80 01 00 20 lwz r0,32(r1)
ffc08f14: 2f 80 00 00 cmpwi cr7,r0,0
ffc08f18: 41 9e 01 40 beq- cr7,ffc09058 <timer_settime+0x1f8>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
ffc08f1c: 7f a3 eb 78 mr r3,r29
ffc08f20: 48 00 4c 1d bl ffc0db3c <_Timespec_To_ticks>
ffc08f24: 90 7f 00 64 stw r3,100(r31)
initial_period = _Timespec_To_ticks( &normalize.it_value );
ffc08f28: 38 61 00 1c addi r3,r1,28
ffc08f2c: 48 00 4c 11 bl ffc0db3c <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
ffc08f30: 80 bf 00 08 lwz r5,8(r31)
ffc08f34: 3c c0 ff c1 lis r6,-63
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
ffc08f38: 7c 64 1b 78 mr r4,r3
activated = _POSIX_Timer_Insert_helper(
ffc08f3c: 38 c6 90 d8 addi r6,r6,-28456
ffc08f40: 38 7f 00 10 addi r3,r31,16
ffc08f44: 7f e7 fb 78 mr r7,r31
ffc08f48: 48 00 81 41 bl ffc11088 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
ffc08f4c: 2f 83 00 00 cmpwi cr7,r3,0
ffc08f50: 41 9e 00 5c beq- cr7,ffc08fac <timer_settime+0x14c>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
ffc08f54: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08f58: 41 9e 00 24 beq- cr7,ffc08f7c <timer_settime+0x11c>
*ovalue = ptimer->timer_data;
ffc08f5c: 81 5f 00 54 lwz r10,84(r31)
ffc08f60: 81 7f 00 58 lwz r11,88(r31)
ffc08f64: 81 3f 00 5c lwz r9,92(r31)
ffc08f68: 80 1f 00 60 lwz r0,96(r31)
ffc08f6c: 91 5e 00 00 stw r10,0(r30)
ffc08f70: 91 7e 00 04 stw r11,4(r30)
ffc08f74: 91 3e 00 08 stw r9,8(r30)
ffc08f78: 90 1e 00 0c stw r0,12(r30)
ptimer->timer_data = normalize;
ffc08f7c: 80 01 00 14 lwz r0,20(r1)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
ffc08f80: 38 7f 00 6c addi r3,r31,108
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
ffc08f84: 90 1f 00 54 stw r0,84(r31)
ffc08f88: 80 01 00 18 lwz r0,24(r1)
ffc08f8c: 90 1f 00 58 stw r0,88(r31)
ffc08f90: 80 01 00 1c lwz r0,28(r1)
ffc08f94: 90 1f 00 5c stw r0,92(r31)
ffc08f98: 80 01 00 20 lwz r0,32(r1)
ffc08f9c: 90 1f 00 60 stw r0,96(r31)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
ffc08fa0: 38 00 00 03 li r0,3
ffc08fa4: 98 1f 00 3c stb r0,60(r31)
_TOD_Get( &ptimer->time );
ffc08fa8: 48 00 1f a5 bl ffc0af4c <_TOD_Get>
_Thread_Enable_dispatch();
ffc08fac: 48 00 3c c9 bl ffc0cc74 <_Thread_Enable_dispatch>
return 0;
ffc08fb0: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
ffc08fb4: 80 01 00 3c lwz r0,60(r1)
ffc08fb8: 83 81 00 28 lwz r28,40(r1)
ffc08fbc: 7c 08 03 a6 mtlr r0
ffc08fc0: 83 a1 00 2c lwz r29,44(r1)
ffc08fc4: 83 c1 00 30 lwz r30,48(r1)
ffc08fc8: 83 e1 00 34 lwz r31,52(r1)
ffc08fcc: 38 21 00 38 addi r1,r1,56
ffc08fd0: 4e 80 00 20 blr
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
ffc08fd4: 81 5d 00 00 lwz r10,0(r29)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
ffc08fd8: 38 61 00 0c addi r3,r1,12
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
ffc08fdc: 81 7d 00 04 lwz r11,4(r29)
ffc08fe0: 81 3d 00 08 lwz r9,8(r29)
ffc08fe4: 80 1d 00 0c lwz r0,12(r29)
ffc08fe8: 91 41 00 14 stw r10,20(r1)
ffc08fec: 91 61 00 18 stw r11,24(r1)
ffc08ff0: 91 21 00 1c stw r9,28(r1)
ffc08ff4: 90 01 00 20 stw r0,32(r1)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
ffc08ff8: 48 00 1f 55 bl ffc0af4c <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
ffc08ffc: 38 61 00 0c addi r3,r1,12
ffc09000: 38 81 00 1c addi r4,r1,28
ffc09004: 48 00 4a 75 bl ffc0da78 <_Timespec_Greater_than>
ffc09008: 2f 83 00 00 cmpwi cr7,r3,0
ffc0900c: 40 9e 00 38 bne- cr7,ffc09044 <timer_settime+0x1e4>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
ffc09010: 38 81 00 1c addi r4,r1,28
ffc09014: 7c 85 23 78 mr r5,r4
ffc09018: 38 61 00 0c addi r3,r1,12
ffc0901c: 48 00 4a d5 bl ffc0daf0 <_Timespec_Subtract>
ffc09020: 3c 60 00 00 lis r3,0
ffc09024: 7f e4 fb 78 mr r4,r31
ffc09028: 38 63 2f 2c addi r3,r3,12076
ffc0902c: 38 a1 00 08 addi r5,r1,8
ffc09030: 48 00 2b 65 bl ffc0bb94 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
ffc09034: 80 01 00 08 lwz r0,8(r1)
ffc09038: 7c 7f 1b 78 mr r31,r3
ffc0903c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09040: 41 be fe c4 beq- cr7,ffc08f04 <timer_settime+0xa4>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09044: 48 00 b8 95 bl ffc148d8 <__errno>
ffc09048: 38 00 00 16 li r0,22
ffc0904c: 90 03 00 00 stw r0,0(r3)
ffc09050: 38 60 ff ff li r3,-1
ffc09054: 4b ff ff 60 b ffc08fb4 <timer_settime+0x154>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
ffc09058: 38 63 00 10 addi r3,r3,16
ffc0905c: 48 00 51 e9 bl ffc0e244 <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
ffc09060: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09064: 41 9e 00 24 beq- cr7,ffc09088 <timer_settime+0x228>
*ovalue = ptimer->timer_data;
ffc09068: 81 5f 00 54 lwz r10,84(r31)
ffc0906c: 81 7f 00 58 lwz r11,88(r31)
ffc09070: 81 3f 00 5c lwz r9,92(r31)
ffc09074: 80 1f 00 60 lwz r0,96(r31)
ffc09078: 91 5e 00 00 stw r10,0(r30)
ffc0907c: 91 7e 00 04 stw r11,4(r30)
ffc09080: 91 3e 00 08 stw r9,8(r30)
ffc09084: 90 1e 00 0c stw r0,12(r30)
/* The new data are set */
ptimer->timer_data = normalize;
ffc09088: 80 01 00 14 lwz r0,20(r1)
ffc0908c: 90 1f 00 54 stw r0,84(r31)
ffc09090: 80 01 00 18 lwz r0,24(r1)
ffc09094: 90 1f 00 58 stw r0,88(r31)
ffc09098: 80 01 00 1c lwz r0,28(r1)
ffc0909c: 90 1f 00 5c stw r0,92(r31)
ffc090a0: 80 01 00 20 lwz r0,32(r1)
ffc090a4: 90 1f 00 60 stw r0,96(r31)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
ffc090a8: 38 00 00 04 li r0,4
ffc090ac: 98 1f 00 3c stb r0,60(r31)
/* Returns with success */
_Thread_Enable_dispatch();
ffc090b0: 48 00 3b c5 bl ffc0cc74 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
ffc090b4: 80 01 00 3c lwz r0,60(r1)
ptimer->timer_data = normalize;
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
/* Returns with success */
_Thread_Enable_dispatch();
return 0;
ffc090b8: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
ffc090bc: 83 81 00 28 lwz r28,40(r1)
ffc090c0: 7c 08 03 a6 mtlr r0
ffc090c4: 83 a1 00 2c lwz r29,44(r1)
ffc090c8: 83 c1 00 30 lwz r30,48(r1)
ffc090cc: 83 e1 00 34 lwz r31,52(r1)
ffc090d0: 38 21 00 38 addi r1,r1,56
ffc090d4: 4e 80 00 20 blr
ffc08c28 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc08c28: 94 21 ff d8 stwu r1,-40(r1)
ffc08c2c: 7c 08 02 a6 mflr r0
ffc08c30: 93 e1 00 24 stw r31,36(r1)
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc08c34: 3f e0 00 00 lis r31,0
ffc08c38: 3b ff 35 74 addi r31,r31,13684
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc08c3c: 90 01 00 2c stw r0,44(r1)
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc08c40: 80 1f 00 1c lwz r0,28(r31)
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc08c44: 93 c1 00 20 stw r30,32(r1)
ffc08c48: 7c 7e 1b 78 mr r30,r3
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc08c4c: 2f 80 00 00 cmpwi cr7,r0,0
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc08c50: 93 a1 00 1c stw r29,28(r1)
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc08c54: 41 9e 00 a4 beq- cr7,ffc08cf8 <ualarm+0xd0>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
ffc08c58: 7f e3 fb 78 mr r3,r31
ffc08c5c: 48 00 50 c9 bl ffc0dd24 <_Watchdog_Remove>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
ffc08c60: 3b a0 00 00 li r29,0
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
ffc08c64: 38 63 ff fe addi r3,r3,-2
ffc08c68: 2b 83 00 01 cmplwi cr7,r3,1
ffc08c6c: 40 9d 00 ac ble- cr7,ffc08d18 <ualarm+0xf0> <== ALWAYS TAKEN
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
ffc08c70: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08c74: 41 be 00 64 beq+ cr7,ffc08cd8 <ualarm+0xb0>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
ffc08c78: 3c 00 43 1b lis r0,17179
ffc08c7c: 60 00 de 83 ori r0,r0,56963
ffc08c80: 7c 1e 00 16 mulhwu r0,r30,r0
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
ffc08c84: 38 61 00 08 addi r3,r1,8
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
ffc08c88: 54 00 74 be rlwinm r0,r0,14,18,31
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ffc08c8c: 54 0b 40 2e rlwinm r11,r0,8,0,23
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
ffc08c90: 90 01 00 08 stw r0,8(r1)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ffc08c94: 54 09 18 38 rlwinm r9,r0,3,0,28
ffc08c98: 7d 29 58 50 subf r9,r9,r11
ffc08c9c: 55 2b 30 32 rlwinm r11,r9,6,0,25
ffc08ca0: 7d 29 58 50 subf r9,r9,r11
ffc08ca4: 7d 29 02 14 add r9,r9,r0
ffc08ca8: 55 29 30 32 rlwinm r9,r9,6,0,25
ffc08cac: 7f c9 f0 50 subf r30,r9,r30
ffc08cb0: 1f de 03 e8 mulli r30,r30,1000
ffc08cb4: 93 c1 00 0c stw r30,12(r1)
ticks = _Timespec_To_ticks( &tp );
ffc08cb8: 48 00 48 49 bl ffc0d500 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
ffc08cbc: 38 61 00 08 addi r3,r1,8
ffc08cc0: 48 00 48 41 bl ffc0d500 <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08cc4: 7f e4 fb 78 mr r4,r31
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc08cc8: 90 7f 00 0c stw r3,12(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08ccc: 3c 60 00 00 lis r3,0
ffc08cd0: 38 63 2d a8 addi r3,r3,11688
ffc08cd4: 48 00 4e 89 bl ffc0db5c <_Watchdog_Insert>
}
return remaining;
}
ffc08cd8: 80 01 00 2c lwz r0,44(r1)
ffc08cdc: 7f a3 eb 78 mr r3,r29
ffc08ce0: 83 c1 00 20 lwz r30,32(r1)
ffc08ce4: 7c 08 03 a6 mtlr r0
ffc08ce8: 83 a1 00 1c lwz r29,28(r1)
ffc08cec: 83 e1 00 24 lwz r31,36(r1)
ffc08cf0: 38 21 00 28 addi r1,r1,40
ffc08cf4: 4e 80 00 20 blr
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc08cf8: 3d 20 ff c1 lis r9,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc08cfc: 90 1f 00 08 stw r0,8(r31)
the_watchdog->routine = routine;
ffc08d00: 39 29 8b d8 addi r9,r9,-29736
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
ffc08d04: 3b a0 00 00 li r29,0
ffc08d08: 91 3f 00 1c stw r9,28(r31)
the_watchdog->id = id;
ffc08d0c: 90 1f 00 20 stw r0,32(r31)
the_watchdog->user_data = user_data;
ffc08d10: 90 1f 00 24 stw r0,36(r31)
ffc08d14: 4b ff ff 5c b ffc08c70 <ualarm+0x48>
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
ffc08d18: 81 3f 00 0c lwz r9,12(r31)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
ffc08d1c: 38 81 00 08 addi r4,r1,8
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
ffc08d20: 80 7f 00 14 lwz r3,20(r31)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
ffc08d24: 3f a0 10 62 lis r29,4194
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
ffc08d28: 80 1f 00 18 lwz r0,24(r31)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
ffc08d2c: 63 bd 4d d3 ori r29,r29,19923
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
ffc08d30: 7c 63 4a 14 add r3,r3,r9
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
ffc08d34: 7c 60 18 50 subf r3,r0,r3
ffc08d38: 48 00 47 31 bl ffc0d468 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
ffc08d3c: 80 01 00 08 lwz r0,8(r1)
remaining += tp.tv_nsec / 1000;
ffc08d40: 81 21 00 0c lwz r9,12(r1)
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
ffc08d44: 54 0a 40 2e rlwinm r10,r0,8,0,23
ffc08d48: 54 0b 18 38 rlwinm r11,r0,3,0,28
ffc08d4c: 7d 6b 50 50 subf r11,r11,r10
remaining += tp.tv_nsec / 1000;
ffc08d50: 7f a9 e8 96 mulhw r29,r9,r29
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
ffc08d54: 55 6a 30 32 rlwinm r10,r11,6,0,25
ffc08d58: 7d 6b 50 50 subf r11,r11,r10
ffc08d5c: 7c 0b 02 14 add r0,r11,r0
remaining += tp.tv_nsec / 1000;
ffc08d60: 7f bd 36 70 srawi r29,r29,6
ffc08d64: 7d 29 fe 70 srawi r9,r9,31
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
ffc08d68: 54 00 30 32 rlwinm r0,r0,6,0,25
remaining += tp.tv_nsec / 1000;
ffc08d6c: 7f a9 e8 50 subf r29,r9,r29
ffc08d70: 7f bd 02 14 add r29,r29,r0
ffc08d74: 4b ff fe fc b ffc08c70 <ualarm+0x48>