RTEMS 4.10Annotated Report
Wed Feb 9 04:53:07 2011
ffc0c0d4 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
ffc0c0d4: 94 21 ff e0 stwu r1,-32(r1)
ffc0c0d8: 7c 08 02 a6 mflr r0
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0c0dc: 3d 20 00 00 lis r9,0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
ffc0c0e0: 90 01 00 24 stw r0,36(r1)
ffc0c0e4: 93 41 00 08 stw r26,8(r1)
ffc0c0e8: 7c da 33 78 mr r26,r6
ffc0c0ec: 93 81 00 10 stw r28,16(r1)
ffc0c0f0: 7c 7c 1b 78 mr r28,r3
ffc0c0f4: 93 a1 00 14 stw r29,20(r1)
ffc0c0f8: 7c bd 2b 78 mr r29,r5
ffc0c0fc: 93 c1 00 18 stw r30,24(r1)
ffc0c100: 7c 9e 23 78 mr r30,r4
ffc0c104: 93 e1 00 1c stw r31,28(r1)
ffc0c108: 93 61 00 0c stw r27,12(r1)
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0c10c: 83 e9 28 20 lwz r31,10272(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c110: 7f 60 00 a6 mfmsr r27
ffc0c114: 7c 10 42 a6 mfsprg r0,0
ffc0c118: 7f 60 00 78 andc r0,r27,r0
ffc0c11c: 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 );
switch ( the_rwlock->current_state ) {
ffc0c120: 80 03 00 44 lwz r0,68(r3)
ffc0c124: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c128: 41 9e 00 10 beq- cr7,ffc0c138 <_CORE_RWLock_Obtain_for_reading+0x64>
ffc0c12c: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c130: 40 be 00 44 bne+ cr7,ffc0c174 <_CORE_RWLock_Obtain_for_reading+0xa0>
ffc0c134: 48 00 00 1c b ffc0c150 <_CORE_RWLock_Obtain_for_reading+0x7c>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
ffc0c138: 81 23 00 48 lwz r9,72(r3)
ffc0c13c: 38 09 00 01 addi r0,r9,1
ffc0c140: 90 03 00 48 stw r0,72(r3)
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
ffc0c144: 38 00 00 01 li r0,1
ffc0c148: 90 03 00 44 stw r0,68(r3)
the_rwlock->number_of_readers += 1;
_ISR_Enable( level );
ffc0c14c: 48 00 00 1c b ffc0c168 <_CORE_RWLock_Obtain_for_reading+0x94>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
ffc0c150: 48 00 23 f1 bl ffc0e540 <_Thread_queue_First>
if ( !waiter ) {
ffc0c154: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c158: 40 be 00 1c bne+ cr7,ffc0c174 <_CORE_RWLock_Obtain_for_reading+0xa0><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
ffc0c15c: 81 3c 00 48 lwz r9,72(r28)
ffc0c160: 38 09 00 01 addi r0,r9,1
ffc0c164: 90 1c 00 48 stw r0,72(r28)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c168: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
ffc0c16c: 38 00 00 00 li r0,0
ffc0c170: 48 00 00 14 b ffc0c184 <_CORE_RWLock_Obtain_for_reading+0xb0>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
ffc0c174: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0c178: 40 9e 00 14 bne- cr7,ffc0c18c <_CORE_RWLock_Obtain_for_reading+0xb8>
ffc0c17c: 7f 60 01 24 mtmsr r27
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
ffc0c180: 38 00 00 02 li r0,2
ffc0c184: 90 1f 00 34 stw r0,52(r31)
return;
ffc0c188: 48 00 00 38 b ffc0c1c0 <_CORE_RWLock_Obtain_for_reading+0xec>
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
ffc0c18c: 38 00 00 00 li r0,0
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
ffc0c190: 93 df 00 20 stw r30,32(r31)
ffc0c194: 39 20 00 01 li r9,1
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
ffc0c198: 90 1f 00 34 stw r0,52(r31)
ffc0c19c: 91 3c 00 30 stw r9,48(r28)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
ffc0c1a0: 93 9f 00 44 stw r28,68(r31)
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
ffc0c1a4: 90 1f 00 30 stw r0,48(r31)
ffc0c1a8: 7f 60 01 24 mtmsr r27
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
ffc0c1ac: 3c a0 ff c1 lis r5,-63
ffc0c1b0: 7f 83 e3 78 mr r3,r28
ffc0c1b4: 7f 44 d3 78 mr r4,r26
ffc0c1b8: 38 a5 c3 8c addi r5,r5,-15476
ffc0c1bc: 48 00 1f 89 bl ffc0e144 <_Thread_queue_Enqueue_with_handler>
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
ffc0c1c0: 80 01 00 24 lwz r0,36(r1)
ffc0c1c4: 83 41 00 08 lwz r26,8(r1)
ffc0c1c8: 7c 08 03 a6 mtlr r0
ffc0c1cc: 83 61 00 0c lwz r27,12(r1)
ffc0c1d0: 83 81 00 10 lwz r28,16(r1)
ffc0c1d4: 83 a1 00 14 lwz r29,20(r1)
ffc0c1d8: 83 c1 00 18 lwz r30,24(r1)
ffc0c1dc: 83 e1 00 1c lwz r31,28(r1)
ffc0c1e0: 38 21 00 20 addi r1,r1,32
ffc0c1e4: 4e 80 00 20 blr
ffc0c284 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ffc0c284: 94 21 ff f0 stwu r1,-16(r1)
ffc0c288: 7c 08 02 a6 mflr r0
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0c28c: 3d 20 00 00 lis r9,0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
ffc0c290: 90 01 00 14 stw r0,20(r1)
ffc0c294: 93 e1 00 0c stw r31,12(r1)
ffc0c298: 7c 7f 1b 78 mr r31,r3
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
ffc0c29c: 81 29 28 20 lwz r9,10272(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c2a0: 7c 00 00 a6 mfmsr r0
ffc0c2a4: 7d 70 42 a6 mfsprg r11,0
ffc0c2a8: 7c 0b 58 78 andc r11,r0,r11
ffc0c2ac: 7d 60 01 24 mtmsr r11
* 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){
ffc0c2b0: 81 63 00 44 lwz r11,68(r3)
ffc0c2b4: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0c2b8: 40 be 00 14 bne+ cr7,ffc0c2cc <_CORE_RWLock_Release+0x48>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c2bc: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
ffc0c2c0: 38 00 00 02 li r0,2
ffc0c2c4: 90 09 00 34 stw r0,52(r9)
return CORE_RWLOCK_SUCCESSFUL;
ffc0c2c8: 48 00 00 ac b ffc0c374 <_CORE_RWLock_Release+0xf0>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
ffc0c2cc: 2f 8b 00 01 cmpwi cr7,r11,1
ffc0c2d0: 40 9e 00 20 bne- cr7,ffc0c2f0 <_CORE_RWLock_Release+0x6c>
the_rwlock->number_of_readers -= 1;
ffc0c2d4: 81 63 00 48 lwz r11,72(r3)
ffc0c2d8: 39 6b ff ff addi r11,r11,-1
if ( the_rwlock->number_of_readers != 0 ) {
ffc0c2dc: 2f 8b 00 00 cmpwi cr7,r11,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;
ffc0c2e0: 91 63 00 48 stw r11,72(r3)
if ( the_rwlock->number_of_readers != 0 ) {
ffc0c2e4: 41 be 00 0c beq+ cr7,ffc0c2f0 <_CORE_RWLock_Release+0x6c>
ffc0c2e8: 7c 00 01 24 mtmsr r0
/* must be unlocked again */
_ISR_Enable( level );
return CORE_RWLOCK_SUCCESSFUL;
ffc0c2ec: 48 00 00 88 b ffc0c374 <_CORE_RWLock_Release+0xf0>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
ffc0c2f0: 39 60 00 00 li r11,0
ffc0c2f4: 91 69 00 34 stw r11,52(r9)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
ffc0c2f8: 91 7f 00 44 stw r11,68(r31)
ffc0c2fc: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
ffc0c300: 7f e3 fb 78 mr r3,r31
ffc0c304: 48 00 1c 85 bl ffc0df88 <_Thread_queue_Dequeue>
if ( next ) {
ffc0c308: 2c 03 00 00 cmpwi r3,0
ffc0c30c: 41 82 00 68 beq- ffc0c374 <_CORE_RWLock_Release+0xf0>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
ffc0c310: 80 03 00 30 lwz r0,48(r3)
ffc0c314: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c318: 40 be 00 10 bne+ cr7,ffc0c328 <_CORE_RWLock_Release+0xa4>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
ffc0c31c: 38 00 00 02 li r0,2
ffc0c320: 90 1f 00 44 stw r0,68(r31)
return CORE_RWLOCK_SUCCESSFUL;
ffc0c324: 48 00 00 50 b ffc0c374 <_CORE_RWLock_Release+0xf0>
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
ffc0c328: 81 3f 00 48 lwz r9,72(r31)
ffc0c32c: 38 09 00 01 addi r0,r9,1
ffc0c330: 90 1f 00 48 stw r0,72(r31)
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
ffc0c334: 38 00 00 01 li r0,1
ffc0c338: 90 1f 00 44 stw r0,68(r31)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
ffc0c33c: 7f e3 fb 78 mr r3,r31
ffc0c340: 48 00 22 01 bl ffc0e540 <_Thread_queue_First>
if ( !next ||
ffc0c344: 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 );
ffc0c348: 7f e3 fb 78 mr r3,r31
ffc0c34c: 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 ||
ffc0c350: 41 82 00 24 beq- ffc0c374 <_CORE_RWLock_Release+0xf0>
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
ffc0c354: 80 09 00 30 lwz r0,48(r9)
ffc0c358: 2f 80 00 01 cmpwi cr7,r0,1
ffc0c35c: 41 9e 00 18 beq- cr7,ffc0c374 <_CORE_RWLock_Release+0xf0><== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
ffc0c360: 81 3f 00 48 lwz r9,72(r31)
ffc0c364: 38 09 00 01 addi r0,r9,1
ffc0c368: 90 1f 00 48 stw r0,72(r31)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
ffc0c36c: 48 00 20 5d bl ffc0e3c8 <_Thread_queue_Extract>
}
ffc0c370: 4b ff ff cc b ffc0c33c <_CORE_RWLock_Release+0xb8>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
ffc0c374: 80 01 00 14 lwz r0,20(r1)
ffc0c378: 38 60 00 00 li r3,0
ffc0c37c: 83 e1 00 0c lwz r31,12(r1)
ffc0c380: 38 21 00 10 addi r1,r1,16
ffc0c384: 7c 08 03 a6 mtlr r0
ffc0c388: 4e 80 00 20 blr
ffc0c38c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0c38c: 94 21 ff e8 stwu r1,-24(r1)
ffc0c390: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c394: 38 81 00 08 addi r4,r1,8
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0c398: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c39c: 48 00 17 c9 bl ffc0db64 <_Thread_Get>
switch ( location ) {
ffc0c3a0: 80 01 00 08 lwz r0,8(r1)
ffc0c3a4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c3a8: 40 9e 00 18 bne- cr7,ffc0c3c0 <_CORE_RWLock_Timeout+0x34><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0c3ac: 48 00 22 b9 bl ffc0e664 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0c3b0: 3d 20 00 00 lis r9,0
ffc0c3b4: 81 69 27 e0 lwz r11,10208(r9)
ffc0c3b8: 38 0b ff ff addi r0,r11,-1
ffc0c3bc: 90 09 27 e0 stw r0,10208(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0c3c0: 80 01 00 1c lwz r0,28(r1)
ffc0c3c4: 38 21 00 18 addi r1,r1,24
ffc0c3c8: 7c 08 03 a6 mtlr r0
ffc0c3cc: 4e 80 00 20 blr
ffc1b34c <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1b34c: 94 21 ff e0 stwu r1,-32(r1)
ffc1b350: 7c 08 02 a6 mflr r0
ffc1b354: 90 01 00 24 stw r0,36(r1)
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1b358: 80 03 00 4c lwz r0,76(r3)
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1b35c: 93 61 00 0c stw r27,12(r1)
ffc1b360: 7d 1b 43 78 mr r27,r8
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1b364: 7f 85 00 40 cmplw cr7,r5,r0
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1b368: 93 a1 00 14 stw r29,20(r1)
ffc1b36c: 7c 9d 23 78 mr r29,r4
ffc1b370: 93 c1 00 18 stw r30,24(r1)
ffc1b374: 7c be 2b 78 mr r30,r5
ffc1b378: 93 e1 00 1c stw r31,28(r1)
ffc1b37c: 7c 7f 1b 78 mr r31,r3
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1b380: 38 60 00 01 li r3,1
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
ffc1b384: 93 41 00 08 stw r26,8(r1)
ffc1b388: 93 81 00 10 stw r28,16(r1)
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
ffc1b38c: 41 9d 00 54 bgt- cr7,ffc1b3e0 <_CORE_message_queue_Broadcast+0x94><== NEVER TAKEN
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
ffc1b390: 80 1f 00 48 lwz r0,72(r31)
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
ffc1b394: 3b 80 00 00 li r28,0
* NOTE: This check is critical because threads can block on
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
ffc1b398: 2f 80 00 00 cmpwi cr7,r0,0
ffc1b39c: 41 be 00 28 beq+ cr7,ffc1b3c4 <_CORE_message_queue_Broadcast+0x78>
*count = 0;
ffc1b3a0: 38 00 00 00 li r0,0
ffc1b3a4: 90 08 00 00 stw r0,0(r8)
ffc1b3a8: 38 60 00 00 li r3,0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
ffc1b3ac: 48 00 00 34 b ffc1b3e0 <_CORE_message_queue_Broadcast+0x94>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
ffc1b3b0: 80 7a 00 2c lwz r3,44(r26)
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
ffc1b3b4: 3b 9c 00 01 addi r28,r28,1
ffc1b3b8: 48 00 c3 6d bl ffc27724 <memcpy>
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
ffc1b3bc: 81 3a 00 28 lwz r9,40(r26)
ffc1b3c0: 93 c9 00 00 stw r30,0(r9)
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
ffc1b3c4: 7f e3 fb 78 mr r3,r31
ffc1b3c8: 48 00 2e 31 bl ffc1e1f8 <_Thread_queue_Dequeue>
ffc1b3cc: 7f a4 eb 78 mr r4,r29
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
ffc1b3d0: 7c 7a 1b 79 mr. r26,r3
ffc1b3d4: 7f c5 f3 78 mr r5,r30
ffc1b3d8: 40 82 ff d8 bne+ ffc1b3b0 <_CORE_message_queue_Broadcast+0x64>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
ffc1b3dc: 93 9b 00 00 stw r28,0(r27)
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
ffc1b3e0: 80 01 00 24 lwz r0,36(r1)
ffc1b3e4: 83 41 00 08 lwz r26,8(r1)
ffc1b3e8: 7c 08 03 a6 mtlr r0
ffc1b3ec: 83 61 00 0c lwz r27,12(r1)
ffc1b3f0: 83 81 00 10 lwz r28,16(r1)
ffc1b3f4: 83 a1 00 14 lwz r29,20(r1)
ffc1b3f8: 83 c1 00 18 lwz r30,24(r1)
ffc1b3fc: 83 e1 00 1c lwz r31,28(r1)
ffc1b400: 38 21 00 20 addi r1,r1,32
ffc1b404: 4e 80 00 20 blr
ffc137d8 <_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
)
{
ffc137d8: 94 21 ff e0 stwu r1,-32(r1)
ffc137dc: 7c 08 02 a6 mflr r0
/*
* 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)) {
ffc137e0: 7c c9 33 78 mr r9,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
)
{
ffc137e4: 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)) {
ffc137e8: 70 c0 00 03 andi. r0,r6,3
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
ffc137ec: 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
)
{
ffc137f0: 93 c1 00 18 stw r30,24(r1)
ffc137f4: 7c 9e 23 78 mr r30,r4
ffc137f8: 93 e1 00 1c stw r31,28(r1)
ffc137fc: 7c 7f 1b 78 mr r31,r3
ffc13800: 93 a1 00 14 stw r29,20(r1)
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
the_message_queue->notify_argument = the_argument;
ffc13804: 90 03 00 64 stw r0,100(r3)
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
ffc13808: 90 a3 00 44 stw r5,68(r3)
the_message_queue->number_of_pending_messages = 0;
ffc1380c: 90 03 00 48 stw r0,72(r3)
the_message_queue->maximum_message_size = maximum_message_size;
ffc13810: 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;
ffc13814: 90 03 00 60 stw r0,96(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)) {
ffc13818: 41 82 00 14 beq- ffc1382c <_CORE_message_queue_Initialize+0x54>
allocated_message_size += sizeof(uint32_t);
ffc1381c: 39 26 00 04 addi r9,r6,4
allocated_message_size &= ~(sizeof(uint32_t) - 1);
ffc13820: 55 29 00 3a rlwinm r9,r9,0,0,29
}
if (allocated_message_size < maximum_message_size)
ffc13824: 7f 89 30 40 cmplw cr7,r9,r6
ffc13828: 41 bc 00 7c blt+ cr7,ffc138a4 <_CORE_message_queue_Initialize+0xcc><== NEVER TAKEN
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
ffc1382c: 3b a9 00 14 addi r29,r9,20
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
ffc13830: 7c 7d 29 d6 mullw r3,r29,r5
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
ffc13834: 7f 83 48 40 cmplw cr7,r3,r9
ffc13838: 41 bc 00 6c blt+ cr7,ffc138a4 <_CORE_message_queue_Initialize+0xcc><== NEVER TAKEN
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
ffc1383c: 90 a1 00 08 stw r5,8(r1)
ffc13840: 48 00 38 11 bl ffc17050 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
ffc13844: 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 *)
ffc13848: 7c 64 1b 78 mr r4,r3
ffc1384c: 90 7f 00 5c stw r3,92(r31)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
ffc13850: 80 a1 00 08 lwz r5,8(r1)
ffc13854: 41 9e 00 50 beq- cr7,ffc138a4 <_CORE_message_queue_Initialize+0xcc>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
ffc13858: 7f a6 eb 78 mr r6,r29
ffc1385c: 38 7f 00 68 addi r3,r31,104
ffc13860: 48 00 72 0d bl ffc1aa6c <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
ffc13864: 80 9e 00 00 lwz r4,0(r30)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc13868: 39 3f 00 54 addi r9,r31,84
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc1386c: 38 1f 00 50 addi r0,r31,80
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc13870: 91 3f 00 50 stw r9,80(r31)
ffc13874: 68 84 00 01 xori r4,r4,1
the_chain->permanent_null = NULL;
ffc13878: 39 20 00 00 li r9,0
the_chain->last = _Chain_Head(the_chain);
ffc1387c: 90 1f 00 58 stw r0,88(r31)
ffc13880: 7c 84 00 34 cntlzw r4,r4
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
ffc13884: 91 3f 00 54 stw r9,84(r31)
ffc13888: 7f e3 fb 78 mr r3,r31
ffc1388c: 54 84 d9 7e rlwinm r4,r4,27,5,31
ffc13890: 38 a0 00 80 li r5,128
ffc13894: 38 c0 00 06 li r6,6
ffc13898: 48 00 28 35 bl ffc160cc <_Thread_queue_Initialize>
ffc1389c: 38 60 00 01 li r3,1
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
ffc138a0: 48 00 00 08 b ffc138a8 <_CORE_message_queue_Initialize+0xd0>
ffc138a4: 38 60 00 00 li r3,0
}
ffc138a8: 80 01 00 24 lwz r0,36(r1)
ffc138ac: 83 a1 00 14 lwz r29,20(r1)
ffc138b0: 7c 08 03 a6 mtlr r0
ffc138b4: 83 c1 00 18 lwz r30,24(r1)
ffc138b8: 83 e1 00 1c lwz r31,28(r1)
ffc138bc: 38 21 00 20 addi r1,r1,32
ffc138c0: 4e 80 00 20 blr
ffc138c4 <_CORE_message_queue_Seize>:
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc138c4: 94 21 ff e8 stwu r1,-24(r1)
ffc138c8: 7c 08 02 a6 mflr r0
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
ffc138cc: 3d 20 00 00 lis r9,0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc138d0: 90 01 00 1c stw r0,28(r1)
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
ffc138d4: 38 00 00 00 li r0,0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc138d8: 7c 8b 23 78 mr r11,r4
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
ffc138dc: 81 29 28 74 lwz r9,10356(r9)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc138e0: 93 e1 00 14 stw r31,20(r1)
ffc138e4: 7c 7f 1b 78 mr r31,r3
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
ffc138e8: 90 09 00 34 stw r0,52(r9)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
ffc138ec: 7c a0 2b 78 mr r0,r5
ffc138f0: 93 a1 00 0c stw r29,12(r1)
ffc138f4: 93 c1 00 10 stw r30,16(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc138f8: 7d 40 00 a6 mfmsr r10
ffc138fc: 7c b0 42 a6 mfsprg r5,0
ffc13900: 7d 45 28 78 andc r5,r10,r5
ffc13904: 7c a0 01 24 mtmsr r5
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc13908: 83 c3 00 50 lwz r30,80(r3)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc1390c: 38 a3 00 54 addi r5,r3,84
ffc13910: 7f 9e 28 00 cmpw cr7,r30,r5
ffc13914: 41 9e 00 a4 beq- cr7,ffc139b8 <_CORE_message_queue_Seize+0xf4>
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
ffc13918: 2f 9e 00 00 cmpwi cr7,r30,0
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
ffc1391c: 80 9e 00 00 lwz r4,0(r30)
the_chain->first = new_first;
ffc13920: 7c 65 1b 78 mr r5,r3
ffc13924: 94 85 00 50 stwu r4,80(r5)
new_first->previous = _Chain_Head(the_chain);
ffc13928: 90 a4 00 04 stw r5,4(r4)
ffc1392c: 41 9e 00 8c beq- cr7,ffc139b8 <_CORE_message_queue_Seize+0xf4><== NEVER TAKEN
the_message_queue->number_of_pending_messages -= 1;
ffc13930: 81 23 00 48 lwz r9,72(r3)
ffc13934: 39 29 ff ff addi r9,r9,-1
ffc13938: 91 23 00 48 stw r9,72(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1393c: 7d 40 01 24 mtmsr r10
_ISR_Enable( level );
*size_p = the_message->Contents.size;
ffc13940: 80 be 00 0c lwz r5,12(r30)
_Thread_Executing->Wait.count =
ffc13944: 3d 20 00 00 lis r9,0
ffc13948: 81 29 28 74 lwz r9,10356(r9)
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
ffc1394c: 3b be 00 10 addi r29,r30,16
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
ffc13950: 90 a6 00 00 stw r5,0(r6)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
ffc13954: 7c 03 03 78 mr r3,r0
ffc13958: 7f a4 eb 78 mr r4,r29
_Thread_Executing->Wait.count =
ffc1395c: 81 7e 00 08 lwz r11,8(r30)
ffc13960: 91 69 00 24 stw r11,36(r9)
ffc13964: 48 00 b5 2d bl ffc1ee90 <memcpy>
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
ffc13968: 7f e3 fb 78 mr r3,r31
ffc1396c: 48 00 22 91 bl ffc15bfc <_Thread_queue_Dequeue>
if ( !the_thread ) {
ffc13970: 7c 69 1b 79 mr. r9,r3
ffc13974: 40 a2 00 14 bne+ ffc13988 <_CORE_message_queue_Seize+0xc4>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
ffc13978: 38 7f 00 68 addi r3,r31,104
ffc1397c: 7f c4 f3 78 mr r4,r30
ffc13980: 4b ff fd 95 bl ffc13714 <_Chain_Append>
_CORE_message_queue_Free_message_buffer(
the_message_queue,
the_message
);
return;
ffc13984: 48 00 00 7c b ffc13a00 <_CORE_message_queue_Seize+0x13c>
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
ffc13988: 80 a9 00 30 lwz r5,48(r9)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
ffc1398c: 7f a3 eb 78 mr r3,r29
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
ffc13990: 80 09 00 24 lwz r0,36(r9)
ffc13994: 90 be 00 0c stw r5,12(r30)
ffc13998: 90 1e 00 08 stw r0,8(r30)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
ffc1399c: 80 89 00 2c lwz r4,44(r9)
ffc139a0: 48 00 b4 f1 bl ffc1ee90 <memcpy>
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
ffc139a4: 80 be 00 08 lwz r5,8(r30)
ffc139a8: 7f e3 fb 78 mr r3,r31
ffc139ac: 7f c4 f3 78 mr r4,r30
ffc139b0: 48 00 72 2d bl ffc1abdc <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
_CORE_message_queue_Get_message_priority( the_message )
);
return;
ffc139b4: 48 00 00 4c b ffc13a00 <_CORE_message_queue_Seize+0x13c>
}
#endif
}
if ( !wait ) {
ffc139b8: 2f 87 00 00 cmpwi cr7,r7,0
ffc139bc: 40 9e 00 14 bne- cr7,ffc139d0 <_CORE_message_queue_Seize+0x10c>
ffc139c0: 7d 40 01 24 mtmsr r10
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
ffc139c4: 38 00 00 04 li r0,4
ffc139c8: 90 09 00 34 stw r0,52(r9)
return;
ffc139cc: 48 00 00 34 b ffc13a00 <_CORE_message_queue_Seize+0x13c>
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;
ffc139d0: 38 e0 00 01 li r7,1
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
ffc139d4: 90 c9 00 28 stw r6,40(r9)
ffc139d8: 90 ff 00 30 stw r7,48(r31)
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
ffc139dc: 91 69 00 20 stw r11,32(r9)
executing->Wait.return_argument_second.mutable_object = buffer;
ffc139e0: 90 09 00 2c stw r0,44(r9)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
ffc139e4: 93 e9 00 44 stw r31,68(r9)
ffc139e8: 7d 40 01 24 mtmsr r10
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
ffc139ec: 3c a0 ff c1 lis r5,-63
ffc139f0: 7f e3 fb 78 mr r3,r31
ffc139f4: 7d 04 43 78 mr r4,r8
ffc139f8: 38 a5 61 b0 addi r5,r5,25008
ffc139fc: 48 00 23 bd bl ffc15db8 <_Thread_queue_Enqueue_with_handler>
}
ffc13a00: 80 01 00 1c lwz r0,28(r1)
ffc13a04: 83 a1 00 0c lwz r29,12(r1)
ffc13a08: 7c 08 03 a6 mtlr r0
ffc13a0c: 83 c1 00 10 lwz r30,16(r1)
ffc13a10: 83 e1 00 14 lwz r31,20(r1)
ffc13a14: 38 21 00 18 addi r1,r1,24
ffc13a18: 4e 80 00 20 blr
ffc0ac50 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc0ac50: 94 21 ff e0 stwu r1,-32(r1)
ffc0ac54: 7c 08 02 a6 mflr r0
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc0ac58: 3d 20 00 00 lis r9,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc0ac5c: 90 01 00 24 stw r0,36(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc0ac60: 80 09 27 b0 lwz r0,10160(r9)
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc0ac64: 93 81 00 10 stw r28,16(r1)
ffc0ac68: 7c dc 33 78 mr r28,r6
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc0ac6c: 2f 80 00 00 cmpwi cr7,r0,0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
ffc0ac70: 93 a1 00 14 stw r29,20(r1)
ffc0ac74: 7c bd 2b 78 mr r29,r5
ffc0ac78: 93 c1 00 18 stw r30,24(r1)
ffc0ac7c: 7c 9e 23 78 mr r30,r4
ffc0ac80: 93 e1 00 1c stw r31,28(r1)
ffc0ac84: 7c 7f 1b 78 mr r31,r3
ffc0ac88: 90 e1 00 08 stw r7,8(r1)
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
ffc0ac8c: 41 9e 00 2c beq- cr7,ffc0acb8 <_CORE_mutex_Seize+0x68>
ffc0ac90: 2f 85 00 00 cmpwi cr7,r5,0
ffc0ac94: 41 9e 00 24 beq- cr7,ffc0acb8 <_CORE_mutex_Seize+0x68> <== NEVER TAKEN
ffc0ac98: 3d 20 00 00 lis r9,0
ffc0ac9c: 80 09 28 14 lwz r0,10260(r9)
ffc0aca0: 2b 80 00 01 cmplwi cr7,r0,1
ffc0aca4: 40 bd 00 14 ble+ cr7,ffc0acb8 <_CORE_mutex_Seize+0x68>
ffc0aca8: 38 60 00 00 li r3,0
ffc0acac: 38 80 00 00 li r4,0
ffc0acb0: 38 a0 00 13 li r5,19
ffc0acb4: 48 00 07 65 bl ffc0b418 <_Internal_error_Occurred>
ffc0acb8: 7f e3 fb 78 mr r3,r31
ffc0acbc: 38 81 00 08 addi r4,r1,8
ffc0acc0: 48 00 a1 f5 bl ffc14eb4 <_CORE_mutex_Seize_interrupt_trylock>
ffc0acc4: 2f 83 00 00 cmpwi cr7,r3,0
ffc0acc8: 41 9e 00 60 beq- cr7,ffc0ad28 <_CORE_mutex_Seize+0xd8>
ffc0accc: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0acd0: 3d 60 00 00 lis r11,0
ffc0acd4: 40 9e 00 1c bne- cr7,ffc0acf0 <_CORE_mutex_Seize+0xa0>
ffc0acd8: 80 01 00 08 lwz r0,8(r1)
ffc0acdc: 7c 00 01 24 mtmsr r0
ffc0ace0: 81 2b 27 f0 lwz r9,10224(r11)
ffc0ace4: 38 00 00 01 li r0,1
ffc0ace8: 90 09 00 34 stw r0,52(r9)
ffc0acec: 48 00 00 3c b ffc0ad28 <_CORE_mutex_Seize+0xd8>
ffc0acf0: 3d 20 00 00 lis r9,0
ffc0acf4: 81 6b 27 f0 lwz r11,10224(r11)
ffc0acf8: 81 49 27 b0 lwz r10,10160(r9)
ffc0acfc: 93 cb 00 20 stw r30,32(r11)
ffc0ad00: 38 0a 00 01 addi r0,r10,1
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;
ffc0ad04: 39 40 00 01 li r10,1
ffc0ad08: 93 eb 00 44 stw r31,68(r11)
ffc0ad0c: 91 5f 00 30 stw r10,48(r31)
ffc0ad10: 90 09 27 b0 stw r0,10160(r9)
ffc0ad14: 80 01 00 08 lwz r0,8(r1)
ffc0ad18: 7c 00 01 24 mtmsr r0
ffc0ad1c: 7f e3 fb 78 mr r3,r31
ffc0ad20: 7f 84 e3 78 mr r4,r28
ffc0ad24: 4b ff fe a5 bl ffc0abc8 <_CORE_mutex_Seize_interrupt_blocking>
}
ffc0ad28: 80 01 00 24 lwz r0,36(r1)
ffc0ad2c: 83 81 00 10 lwz r28,16(r1)
ffc0ad30: 7c 08 03 a6 mtlr r0
ffc0ad34: 83 a1 00 14 lwz r29,20(r1)
ffc0ad38: 83 c1 00 18 lwz r30,24(r1)
ffc0ad3c: 83 e1 00 1c lwz r31,28(r1)
ffc0ad40: 38 21 00 20 addi r1,r1,32
ffc0ad44: 4e 80 00 20 blr
ffc0af08 <_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
)
{
ffc0af08: 94 21 ff f0 stwu r1,-16(r1)
ffc0af0c: 7c 08 02 a6 mflr r0
ffc0af10: 93 e1 00 0c stw r31,12(r1)
ffc0af14: 7c 7f 1b 78 mr r31,r3
ffc0af18: 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)) ) {
ffc0af1c: 48 00 1b 31 bl ffc0ca4c <_Thread_queue_Dequeue>
ffc0af20: 2f 83 00 00 cmpwi cr7,r3,0
ffc0af24: 38 60 00 00 li r3,0
ffc0af28: 40 be 00 38 bne+ cr7,ffc0af60 <_CORE_semaphore_Surrender+0x58>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0af2c: 7c 00 00 a6 mfmsr r0
ffc0af30: 7d 30 42 a6 mfsprg r9,0
ffc0af34: 7c 09 48 78 andc r9,r0,r9
ffc0af38: 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 )
ffc0af3c: 81 3f 00 48 lwz r9,72(r31)
ffc0af40: 38 60 00 04 li r3,4
ffc0af44: 81 7f 00 40 lwz r11,64(r31)
ffc0af48: 7f 89 58 40 cmplw cr7,r9,r11
ffc0af4c: 40 9c 00 10 bge- cr7,ffc0af5c <_CORE_semaphore_Surrender+0x54><== NEVER TAKEN
the_semaphore->count += 1;
ffc0af50: 39 29 00 01 addi r9,r9,1
ffc0af54: 91 3f 00 48 stw r9,72(r31)
ffc0af58: 38 60 00 00 li r3,0
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0af5c: 7c 00 01 24 mtmsr r0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
ffc0af60: 80 01 00 14 lwz r0,20(r1)
ffc0af64: 83 e1 00 0c lwz r31,12(r1)
ffc0af68: 38 21 00 10 addi r1,r1,16
ffc0af6c: 7c 08 03 a6 mtlr r0
ffc0af70: 4e 80 00 20 blr
ffc09508 <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc09508: 94 21 ff f0 stwu r1,-16(r1)
ffc0950c: 7c 08 02 a6 mflr r0
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
ffc09510: 3d 20 00 00 lis r9,0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc09514: 93 e1 00 0c stw r31,12(r1)
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
ffc09518: 83 e9 27 f0 lwz r31,10224(r9)
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
ffc0951c: 90 01 00 14 stw r0,20(r1)
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
ffc09520: 38 00 00 00 li r0,0
ffc09524: 90 1f 00 34 stw r0,52(r31)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc09528: 81 5f 01 44 lwz r10,324(r31)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0952c: 7d 20 00 a6 mfmsr r9
ffc09530: 7c 10 42 a6 mfsprg r0,0
ffc09534: 7d 20 00 78 andc r0,r9,r0
ffc09538: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
pending_events = api->pending_events;
ffc0953c: 81 6a 00 00 lwz r11,0(r10)
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
ffc09540: 7c 60 58 39 and. r0,r3,r11
ffc09544: 41 82 00 24 beq- ffc09568 <_Event_Seize+0x60>
ffc09548: 7f 80 18 00 cmpw cr7,r0,r3
ffc0954c: 41 9e 00 0c beq- cr7,ffc09558 <_Event_Seize+0x50>
ffc09550: 70 88 00 02 andi. r8,r4,2
ffc09554: 41 a2 00 14 beq+ ffc09568 <_Event_Seize+0x60> <== NEVER TAKEN
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
ffc09558: 7d 6b 00 78 andc r11,r11,r0
ffc0955c: 91 6a 00 00 stw r11,0(r10)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09560: 7d 20 01 24 mtmsr r9
ffc09564: 48 00 00 18 b ffc0957c <_Event_Seize+0x74>
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
ffc09568: 70 8b 00 01 andi. r11,r4,1
ffc0956c: 41 a2 00 18 beq+ ffc09584 <_Event_Seize+0x7c>
ffc09570: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
ffc09574: 39 20 00 0d li r9,13
ffc09578: 91 3f 00 34 stw r9,52(r31)
*event_out = seized_events;
ffc0957c: 90 06 00 00 stw r0,0(r6)
return;
ffc09580: 48 00 00 a0 b ffc09620 <_Event_Seize+0x118>
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc09584: 38 00 00 01 li r0,1
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
ffc09588: 90 9f 00 30 stw r4,48(r31)
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc0958c: 3d 60 00 00 lis r11,0
ffc09590: 90 0b 28 24 stw r0,10276(r11)
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
ffc09594: 90 7f 00 24 stw r3,36(r31)
executing->Wait.return_argument = event_out;
ffc09598: 90 df 00 28 stw r6,40(r31)
ffc0959c: 7d 20 01 24 mtmsr r9
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
ffc095a0: 2f 85 00 00 cmpwi cr7,r5,0
ffc095a4: 41 be 00 38 beq+ cr7,ffc095dc <_Event_Seize+0xd4>
_Watchdog_Initialize(
ffc095a8: 81 3f 00 08 lwz r9,8(r31)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc095ac: 3d 60 ff c1 lis r11,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc095b0: 38 00 00 00 li r0,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc095b4: 90 bf 00 54 stw r5,84(r31)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc095b8: 39 6b 97 f0 addi r11,r11,-26640
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc095bc: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc095c0: 91 7f 00 64 stw r11,100(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc095c4: 38 63 2e 08 addi r3,r3,11784
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc095c8: 91 3f 00 68 stw r9,104(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc095cc: 38 9f 00 48 addi r4,r31,72
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc095d0: 90 1f 00 6c stw r0,108(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc095d4: 90 1f 00 50 stw r0,80(r31)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc095d8: 48 00 44 f9 bl ffc0dad0 <_Watchdog_Insert>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
ffc095dc: 7f e3 fb 78 mr r3,r31
ffc095e0: 38 80 01 00 li r4,256
ffc095e4: 48 00 3a bd bl ffc0d0a0 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc095e8: 7c a0 00 a6 mfmsr r5
ffc095ec: 7c 10 42 a6 mfsprg r0,0
ffc095f0: 7c a0 00 78 andc r0,r5,r0
ffc095f4: 7c 00 01 24 mtmsr r0
_ISR_Disable( level );
sync_state = _Event_Sync_state;
ffc095f8: 3d 20 00 00 lis r9,0
ffc095fc: 80 69 28 24 lwz r3,10276(r9)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc09600: 38 00 00 00 li r0,0
ffc09604: 90 09 28 24 stw r0,10276(r9)
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
ffc09608: 2f 83 00 01 cmpwi cr7,r3,1
ffc0960c: 40 be 00 0c bne+ cr7,ffc09618 <_Event_Seize+0x110>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09610: 7c a0 01 24 mtmsr r5
ffc09614: 48 00 00 0c b ffc09620 <_Event_Seize+0x118>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
ffc09618: 7f e4 fb 78 mr r4,r31
ffc0961c: 48 00 28 fd bl ffc0bf18 <_Thread_blocking_operation_Cancel>
}
ffc09620: 80 01 00 14 lwz r0,20(r1)
ffc09624: 83 e1 00 0c lwz r31,12(r1)
ffc09628: 38 21 00 10 addi r1,r1,16
ffc0962c: 7c 08 03 a6 mtlr r0
ffc09630: 4e 80 00 20 blr
ffc096a8 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
ffc096a8: 94 21 ff f0 stwu r1,-16(r1)
ffc096ac: 7c 08 02 a6 mflr r0
ffc096b0: 90 01 00 14 stw r0,20(r1)
ffc096b4: 93 e1 00 0c stw r31,12(r1)
ffc096b8: 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 ];
ffc096bc: 81 03 01 44 lwz r8,324(r3)
option_set = (rtems_option) the_thread->Wait.option;
ffc096c0: 80 e3 00 30 lwz r7,48(r3)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc096c4: 7c 00 00 a6 mfmsr r0
ffc096c8: 7d 30 42 a6 mfsprg r9,0
ffc096cc: 7c 09 48 78 andc r9,r0,r9
ffc096d0: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
pending_events = api->pending_events;
ffc096d4: 81 68 00 00 lwz r11,0(r8)
event_condition = (rtems_event_set) the_thread->Wait.count;
ffc096d8: 81 43 00 24 lwz r10,36(r3)
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
ffc096dc: 7d 49 58 39 and. r9,r10,r11
ffc096e0: 40 a2 00 08 bne+ ffc096e8 <_Event_Surrender+0x40>
_ISR_Enable( level );
ffc096e4: 48 00 00 f4 b ffc097d8 <_Event_Surrender+0x130>
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
ffc096e8: 3c c0 00 00 lis r6,0
ffc096ec: 80 c6 27 d8 lwz r6,10200(r6)
ffc096f0: 2f 86 00 00 cmpwi cr7,r6,0
ffc096f4: 41 9e 00 68 beq- cr7,ffc0975c <_Event_Surrender+0xb4>
ffc096f8: 3c c0 00 00 lis r6,0
ffc096fc: 80 c6 27 f0 lwz r6,10224(r6)
ffc09700: 7f 83 30 00 cmpw cr7,r3,r6
ffc09704: 40 be 00 58 bne+ cr7,ffc0975c <_Event_Surrender+0xb4>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
ffc09708: 3c c0 00 00 lis r6,0
ffc0970c: 80 a6 28 24 lwz r5,10276(r6)
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
ffc09710: 2f 85 00 02 cmpwi cr7,r5,2
ffc09714: 41 9e 00 10 beq- cr7,ffc09724 <_Event_Surrender+0x7c> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
ffc09718: 80 c6 28 24 lwz r6,10276(r6)
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
ffc0971c: 2f 86 00 01 cmpwi cr7,r6,1
ffc09720: 40 be 00 3c bne+ cr7,ffc0975c <_Event_Surrender+0xb4>
_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) ) {
ffc09724: 7f 89 50 00 cmpw cr7,r9,r10
ffc09728: 41 9e 00 0c beq- cr7,ffc09734 <_Event_Surrender+0x8c>
ffc0972c: 70 e5 00 02 andi. r5,r7,2
ffc09730: 41 82 00 28 beq- ffc09758 <_Event_Surrender+0xb0> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
ffc09734: 7d 6b 48 78 andc r11,r11,r9
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc09738: 81 5f 00 28 lwz r10,40(r31)
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 );
ffc0973c: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
ffc09740: 3d 60 00 00 lis r11,0
ffc09744: 39 00 00 03 li r8,3
ffc09748: 91 0b 28 24 stw r8,10276(r11)
_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;
ffc0974c: 39 60 00 00 li r11,0
ffc09750: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc09754: 91 2a 00 00 stw r9,0(r10)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
}
_ISR_Enable( level );
ffc09758: 48 00 00 80 b ffc097d8 <_Event_Surrender+0x130>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
ffc0975c: 80 df 00 10 lwz r6,16(r31)
ffc09760: 70 c5 01 00 andi. r5,r6,256
ffc09764: 41 82 00 74 beq- ffc097d8 <_Event_Surrender+0x130>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
ffc09768: 7f 89 50 00 cmpw cr7,r9,r10
ffc0976c: 41 9e 00 0c beq- cr7,ffc09778 <_Event_Surrender+0xd0>
ffc09770: 70 ea 00 02 andi. r10,r7,2
ffc09774: 41 82 00 64 beq- ffc097d8 <_Event_Surrender+0x130> <== 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;
ffc09778: 81 5f 00 28 lwz r10,40(r31)
/*
* 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 );
ffc0977c: 7d 6b 48 78 andc r11,r11,r9
ffc09780: 91 68 00 00 stw r11,0(r8)
the_thread->Wait.count = 0;
ffc09784: 39 60 00 00 li r11,0
ffc09788: 91 7f 00 24 stw r11,36(r31)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
ffc0978c: 91 2a 00 00 stw r9,0(r10)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc09790: 7d 20 00 a6 mfmsr r9
ffc09794: 7c 00 01 24 mtmsr r0
ffc09798: 7d 20 01 24 mtmsr r9
_ISR_Flash( level );
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
ffc0979c: 81 3f 00 50 lwz r9,80(r31)
ffc097a0: 2f 89 00 02 cmpwi cr7,r9,2
ffc097a4: 41 9e 00 0c beq- cr7,ffc097b0 <_Event_Surrender+0x108>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc097a8: 7c 00 01 24 mtmsr r0
ffc097ac: 48 00 00 18 b ffc097c4 <_Event_Surrender+0x11c>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
ffc097b0: 39 20 00 03 li r9,3
ffc097b4: 91 3f 00 50 stw r9,80(r31)
ffc097b8: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
ffc097bc: 38 7f 00 48 addi r3,r31,72
ffc097c0: 48 00 44 69 bl ffc0dc28 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc097c4: 3c 80 10 03 lis r4,4099
ffc097c8: 7f e3 fb 78 mr r3,r31
ffc097cc: 60 84 ff f8 ori r4,r4,65528
ffc097d0: 48 00 29 55 bl ffc0c124 <_Thread_Clear_state>
ffc097d4: 48 00 00 08 b ffc097dc <_Event_Surrender+0x134>
ffc097d8: 7c 00 01 24 mtmsr r0
}
return;
}
}
_ISR_Enable( level );
}
ffc097dc: 80 01 00 14 lwz r0,20(r1)
ffc097e0: 83 e1 00 0c lwz r31,12(r1)
ffc097e4: 38 21 00 10 addi r1,r1,16
ffc097e8: 7c 08 03 a6 mtlr r0
ffc097ec: 4e 80 00 20 blr
ffc097f0 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc097f0: 94 21 ff e8 stwu r1,-24(r1)
ffc097f4: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc097f8: 38 81 00 08 addi r4,r1,8
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
ffc097fc: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
ffc09800: 48 00 2e 29 bl ffc0c628 <_Thread_Get>
switch ( location ) {
ffc09804: 80 01 00 08 lwz r0,8(r1)
ffc09808: 2f 80 00 00 cmpwi cr7,r0,0
ffc0980c: 40 9e 00 68 bne- cr7,ffc09874 <_Event_Timeout+0x84> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc09810: 7d 60 00 a6 mfmsr r11
ffc09814: 7d 30 42 a6 mfsprg r9,0
ffc09818: 7d 69 48 78 andc r9,r11,r9
ffc0981c: 7d 20 01 24 mtmsr r9
return;
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
ffc09820: 3d 20 00 00 lis r9,0
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
ffc09824: 90 03 00 24 stw r0,36(r3)
if ( _Thread_Is_executing( the_thread ) ) {
ffc09828: 81 29 27 f0 lwz r9,10224(r9)
ffc0982c: 7f 83 48 00 cmpw cr7,r3,r9
ffc09830: 40 be 00 1c bne+ cr7,ffc0984c <_Event_Timeout+0x5c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
ffc09834: 3d 20 00 00 lis r9,0
ffc09838: 80 09 28 24 lwz r0,10276(r9)
ffc0983c: 2f 80 00 01 cmpwi cr7,r0,1
ffc09840: 40 be 00 0c bne+ cr7,ffc0984c <_Event_Timeout+0x5c>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
ffc09844: 38 00 00 02 li r0,2
ffc09848: 90 09 28 24 stw r0,10276(r9)
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
ffc0984c: 38 00 00 06 li r0,6
ffc09850: 90 03 00 34 stw r0,52(r3)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09854: 7d 60 01 24 mtmsr r11
ffc09858: 3c 80 10 03 lis r4,4099
ffc0985c: 60 84 ff f8 ori r4,r4,65528
ffc09860: 48 00 28 c5 bl ffc0c124 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc09864: 3d 20 00 00 lis r9,0
ffc09868: 81 69 27 b0 lwz r11,10160(r9)
ffc0986c: 38 0b ff ff addi r0,r11,-1
ffc09870: 90 09 27 b0 stw r0,10160(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc09874: 80 01 00 1c lwz r0,28(r1)
ffc09878: 38 21 00 18 addi r1,r1,24
ffc0987c: 7c 08 03 a6 mtlr r0
ffc09880: 4e 80 00 20 blr
ffc15098 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc15098: 94 21 ff d8 stwu r1,-40(r1)
ffc1509c: 7c 08 02 a6 mflr r0
ffc150a0: 7d 80 00 26 mfcr r12
ffc150a4: 7c 89 23 78 mr r9,r4
ffc150a8: 90 01 00 2c stw r0,44(r1)
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
ffc150ac: 38 04 00 04 addi r0,r4,4
uintptr_t const page_size = heap->page_size;
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
ffc150b0: 7f 80 20 40 cmplw cr7,r0,r4
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
ffc150b4: 93 c1 00 20 stw r30,32(r1)
ffc150b8: 7c 7e 1b 78 mr r30,r3
ffc150bc: 93 41 00 10 stw r26,16(r1)
ffc150c0: 93 61 00 14 stw r27,20(r1)
ffc150c4: 93 81 00 18 stw r28,24(r1)
ffc150c8: 93 a1 00 1c stw r29,28(r1)
ffc150cc: 93 e1 00 24 stw r31,36(r1)
ffc150d0: 91 81 00 0c stw r12,12(r1)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc150d4: 80 83 00 08 lwz r4,8(r3)
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
ffc150d8: 81 43 00 10 lwz r10,16(r3)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
ffc150dc: 41 9c 01 48 blt- cr7,ffc15224 <_Heap_Allocate_aligned_with_boundary+0x18c>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
ffc150e0: 2f 86 00 00 cmpwi cr7,r6,0
ffc150e4: 41 be 00 18 beq+ cr7,ffc150fc <_Heap_Allocate_aligned_with_boundary+0x64>
if ( boundary < alloc_size ) {
ffc150e8: 7f 86 48 40 cmplw cr7,r6,r9
ffc150ec: 41 9c 01 38 blt- cr7,ffc15224 <_Heap_Allocate_aligned_with_boundary+0x18c>
return NULL;
}
if ( alignment == 0 ) {
ffc150f0: 2f 85 00 00 cmpwi cr7,r5,0
ffc150f4: 40 9e 00 08 bne- cr7,ffc150fc <_Heap_Allocate_aligned_with_boundary+0x64>
ffc150f8: 7d 45 53 78 mr r5,r10
ffc150fc: 3b a0 00 00 li r29,0
* 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 ) {
ffc15100: 2f 05 00 00 cmpwi cr6,r5,0
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;
ffc15104: 3b 8a 00 07 addi r28,r10,7
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
ffc15108: 21 89 00 04 subfic r12,r9,4
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ffc1510c: 2f 86 00 00 cmpwi cr7,r6,0
ffc15110: 48 00 00 d0 b ffc151e0 <_Heap_Allocate_aligned_with_boundary+0x148>
/*
* 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 ) {
ffc15114: 81 64 00 04 lwz r11,4(r4)
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
ffc15118: 3b bd 00 01 addi r29,r29,1
/*
* 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 ) {
ffc1511c: 7c 8b 00 40 cmplw cr1,r11,r0
ffc15120: 40 85 00 bc ble- cr1,ffc151dc <_Heap_Allocate_aligned_with_boundary+0x144>
ffc15124: 38 e4 00 08 addi r7,r4,8
if ( alignment == 0 ) {
ffc15128: 40 9a 00 0c bne- cr6,ffc15134 <_Heap_Allocate_aligned_with_boundary+0x9c>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
ffc1512c: 7c ff 3b 78 mr r31,r7
ffc15130: 48 00 00 a4 b ffc151d4 <_Heap_Allocate_aligned_with_boundary+0x13c>
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;
ffc15134: 55 6b 00 3c rlwinm r11,r11,0,0,30
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
ffc15138: 80 7e 00 14 lwz r3,20(r30)
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;
ffc1513c: 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_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
ffc15140: 7f ec 5a 14 add r31,r12,r11
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc15144: 7f ff 2b 96 divwu r31,r31,r5
ffc15148: 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;
ffc1514c: 7d 03 e0 50 subf r8,r3,r28
ffc15150: 7d 68 5a 14 add r11,r8,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 ) {
ffc15154: 7c 9f 58 40 cmplw cr1,r31,r11
ffc15158: 40 85 00 0c ble- cr1,ffc15164 <_Heap_Allocate_aligned_with_boundary+0xcc>
ffc1515c: 7f eb 2b 96 divwu r31,r11,r5
ffc15160: 7f ff 29 d6 mullw r31,r31,r5
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
ffc15164: 41 9e 00 48 beq- cr7,ffc151ac <_Heap_Allocate_aligned_with_boundary+0x114>
/* 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;
ffc15168: 7d 1f 4a 14 add r8,r31,r9
ffc1516c: 7d 68 33 96 divwu r11,r8,r6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
ffc15170: 7f 67 4a 14 add r27,r7,r9
ffc15174: 7d 6b 31 d6 mullw r11,r11,r6
ffc15178: 48 00 00 1c b ffc15194 <_Heap_Allocate_aligned_with_boundary+0xfc>
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
ffc1517c: 41 80 00 60 blt- ffc151dc <_Heap_Allocate_aligned_with_boundary+0x144>
ffc15180: 7f fa 2b 96 divwu r31,r26,r5
ffc15184: 7f ff 29 d6 mullw r31,r31,r5
return 0;
}
alloc_begin = boundary_line - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
ffc15188: 7d 1f 4a 14 add r8,r31,r9
ffc1518c: 7d 68 33 96 divwu r11,r8,r6
ffc15190: 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 ) {
ffc15194: 7e 1f 58 40 cmplw cr4,r31,r11
if ( boundary_line < boundary_floor ) {
return 0;
}
alloc_begin = boundary_line - alloc_size;
ffc15198: 7f 49 58 50 subf r26,r9,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 ) {
ffc1519c: 7c 8b 40 40 cmplw cr1,r11,r8
if ( boundary_line < boundary_floor ) {
ffc151a0: 7c 0b d8 40 cmplw r11,r27
/* 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 ) {
ffc151a4: 40 90 00 08 bge- cr4,ffc151ac <_Heap_Allocate_aligned_with_boundary+0x114>
ffc151a8: 41 84 ff d4 blt+ cr1,ffc1517c <_Heap_Allocate_aligned_with_boundary+0xe4>
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 ) {
ffc151ac: 7c 9f 38 40 cmplw cr1,r31,r7
ffc151b0: 41 84 00 2c blt- cr1,ffc151dc <_Heap_Allocate_aligned_with_boundary+0x144>
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;
ffc151b4: 7d 7f 53 96 divwu r11,r31,r10
ffc151b8: 7d 6b 51 d6 mullw r11,r11,r10
ffc151bc: 21 04 ff f8 subfic r8,r4,-8
ffc151c0: 7d 68 5a 14 add r11,r8,r11
if ( free_size >= min_block_size || free_size == 0 ) {
ffc151c4: 7c 8b 18 40 cmplw cr1,r11,r3
ffc151c8: 40 84 00 0c bge- cr1,ffc151d4 <_Heap_Allocate_aligned_with_boundary+0x13c>
ffc151cc: 2c 8b 00 00 cmpwi cr1,r11,0
ffc151d0: 40 86 00 0c bne- cr1,ffc151dc <_Heap_Allocate_aligned_with_boundary+0x144>
boundary
);
}
}
if ( alloc_begin != 0 ) {
ffc151d4: 2c 9f 00 00 cmpwi cr1,r31,0
ffc151d8: 40 86 00 18 bne- cr1,ffc151f0 <_Heap_Allocate_aligned_with_boundary+0x158><== ALWAYS TAKEN
break;
}
block = block->next;
ffc151dc: 80 84 00 08 lwz r4,8(r4)
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
ffc151e0: 7c 84 f0 00 cmpw cr1,r4,r30
ffc151e4: 40 86 ff 30 bne+ cr1,ffc15114 <_Heap_Allocate_aligned_with_boundary+0x7c>
ffc151e8: 3b e0 00 00 li r31,0
ffc151ec: 48 00 00 20 b ffc1520c <_Heap_Allocate_aligned_with_boundary+0x174>
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
ffc151f0: 80 1e 00 4c lwz r0,76(r30)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc151f4: 7d 26 4b 78 mr r6,r9
ffc151f8: 7f c3 f3 78 mr r3,r30
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
ffc151fc: 7c 00 ea 14 add r0,r0,r29
ffc15200: 90 1e 00 4c stw r0,76(r30)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
ffc15204: 7f e5 fb 78 mr r5,r31
ffc15208: 4b ff 60 99 bl ffc0b2a0 <_Heap_Block_allocate>
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
ffc1520c: 80 1e 00 44 lwz r0,68(r30)
ffc15210: 7f 80 e8 40 cmplw cr7,r0,r29
ffc15214: 40 9c 00 08 bge- cr7,ffc1521c <_Heap_Allocate_aligned_with_boundary+0x184>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
ffc15218: 93 be 00 44 stw r29,68(r30)
}
return (void *) alloc_begin;
ffc1521c: 7f e3 fb 78 mr r3,r31
ffc15220: 48 00 00 08 b ffc15228 <_Heap_Allocate_aligned_with_boundary+0x190>
ffc15224: 38 60 00 00 li r3,0
}
ffc15228: 80 01 00 2c lwz r0,44(r1)
ffc1522c: 81 81 00 0c lwz r12,12(r1)
ffc15230: 7c 08 03 a6 mtlr r0
ffc15234: 83 41 00 10 lwz r26,16(r1)
ffc15238: 83 61 00 14 lwz r27,20(r1)
ffc1523c: 7d 80 81 20 mtcrf 8,r12
ffc15240: 83 81 00 18 lwz r28,24(r1)
ffc15244: 83 a1 00 1c lwz r29,28(r1)
ffc15248: 83 c1 00 20 lwz r30,32(r1)
ffc1524c: 83 e1 00 24 lwz r31,36(r1)
ffc15250: 38 21 00 28 addi r1,r1,40
ffc15254: 4e 80 00 20 blr
ffc15168 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
ffc15168: 7c 08 02 a6 mflr r0
ffc1516c: 94 21 ff f8 stwu r1,-8(r1)
ffc15170: 7c 69 1b 78 mr r9,r3
ffc15174: 90 01 00 0c stw r0,12(r1)
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
ffc15178: 80 03 00 18 lwz r0,24(r3)
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
uintptr_t extend_size = 0;
Heap_Block *const last_block = heap->last_block;
ffc1517c: 81 43 00 24 lwz r10,36(r3)
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
ffc15180: 7f 84 00 40 cmplw cr7,r4,r0
uintptr_t const heap_area_end = heap->area_end;
ffc15184: 80 03 00 1c lwz r0,28(r3)
uintptr_t *amount_extended
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
ffc15188: 41 bc 00 10 blt+ cr7,ffc15198 <_Heap_Extend+0x30>
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
ffc1518c: 7f 84 00 40 cmplw cr7,r4,r0
ffc15190: 38 60 00 01 li r3,1
ffc15194: 41 9c 00 9c blt- cr7,ffc15230 <_Heap_Extend+0xc8>
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
ffc15198: 7f 84 00 00 cmpw cr7,r4,r0
ffc1519c: 38 60 00 02 li r3,2
ffc151a0: 40 be 00 90 bne+ cr7,ffc15230 <_Heap_Extend+0xc8>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
ffc151a4: 81 69 00 10 lwz r11,16(r9)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
ffc151a8: 7c 84 2a 14 add r4,r4,r5
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
ffc151ac: 20 0a ff f8 subfic r0,r10,-8
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
ffc151b0: 90 89 00 1c stw r4,28(r9)
extend_size = new_heap_area_end
ffc151b4: 7c 00 22 14 add r0,r0,r4
ffc151b8: 7c 00 5b 96 divwu r0,r0,r11
ffc151bc: 7c 00 59 d6 mullw r0,r0,r11
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
if( extend_size >= heap->min_block_size ) {
ffc151c0: 38 60 00 00 li r3,0
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
ffc151c4: 90 06 00 00 stw r0,0(r6)
if( extend_size >= heap->min_block_size ) {
ffc151c8: 81 69 00 14 lwz r11,20(r9)
ffc151cc: 7f 80 58 40 cmplw cr7,r0,r11
ffc151d0: 41 bc 00 60 blt+ cr7,ffc15230 <_Heap_Extend+0xc8> <== NEVER TAKEN
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
ffc151d4: 80 ea 00 04 lwz r7,4(r10)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc151d8: 7d 60 52 14 add r11,r0,r10
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
ffc151dc: 81 09 00 20 lwz r8,32(r9)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
ffc151e0: 38 8a 00 08 addi r4,r10,8
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
ffc151e4: 54 e7 07 fe clrlwi r7,r7,31
new_last_block->size_and_flag =
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
ffc151e8: 91 69 00 24 stw r11,36(r9)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
ffc151ec: 7d 0b 40 50 subf r8,r11,r8
ffc151f0: 7c 07 3b 78 or r7,r0,r7
ffc151f4: 61 08 00 01 ori r8,r8,1
ffc151f8: 90 ea 00 04 stw r7,4(r10)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
ffc151fc: 7d 23 4b 78 mr r3,r9
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
ffc15200: 91 0b 00 04 stw r8,4(r11)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
ffc15204: 80 e9 00 2c lwz r7,44(r9)
++stats->used_blocks;
ffc15208: 81 09 00 40 lwz r8,64(r9)
--stats->frees; /* Do not count subsequent call as actual free() */
ffc1520c: 81 49 00 50 lwz r10,80(r9)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
ffc15210: 7c 07 02 14 add r0,r7,r0
++stats->used_blocks;
ffc15214: 39 08 00 01 addi r8,r8,1
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
ffc15218: 90 09 00 2c stw r0,44(r9)
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
ffc1521c: 39 4a ff ff addi r10,r10,-1
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
ffc15220: 91 09 00 40 stw r8,64(r9)
--stats->frees; /* Do not count subsequent call as actual free() */
ffc15224: 91 49 00 50 stw r10,80(r9)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
ffc15228: 4b ff 86 a9 bl ffc0d8d0 <_Heap_Free>
ffc1522c: 38 60 00 00 li r3,0
}
return HEAP_EXTEND_SUCCESSFUL;
}
ffc15230: 80 01 00 0c lwz r0,12(r1)
ffc15234: 38 21 00 08 addi r1,r1,8
ffc15238: 7c 08 03 a6 mtlr r0
ffc1523c: 4e 80 00 20 blr
ffc15258 <_Heap_Free>:
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 )
ffc15258: 81 63 00 10 lwz r11,16(r3)
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
ffc1525c: 7c 69 1b 78 mr r9,r3
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;
ffc15260: 80 03 00 20 lwz r0,32(r3)
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
ffc15264: 39 40 00 00 li r10,0
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 )
ffc15268: 7c 84 5b 96 divwu r4,r4,r11
ffc1526c: 7d 64 59 d6 mullw r11,r4,r11
ffc15270: 39 6b ff f8 addi r11,r11,-8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
ffc15274: 7f 8b 00 40 cmplw cr7,r11,r0
ffc15278: 41 9c 00 14 blt- cr7,ffc1528c <_Heap_Free+0x34>
ffc1527c: 81 43 00 24 lwz r10,36(r3)
ffc15280: 7d 4b 50 10 subfc r10,r11,r10
ffc15284: 39 40 00 00 li r10,0
ffc15288: 7d 4a 51 14 adde r10,r10,r10
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
uintptr_t next_block_size = 0;
bool next_is_free = false;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc1528c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc15290: 41 9e 01 a8 beq- cr7,ffc15438 <_Heap_Free+0x1e0>
- 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;
ffc15294: 80 ab 00 04 lwz r5,4(r11)
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
ffc15298: 38 e0 00 00 li r7,0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc1529c: 54 a8 00 3c rlwinm r8,r5,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);
ffc152a0: 7d 4b 42 14 add r10,r11,r8
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
ffc152a4: 7f 8a 00 40 cmplw cr7,r10,r0
ffc152a8: 41 9c 00 14 blt- cr7,ffc152bc <_Heap_Free+0x64> <== NEVER TAKEN
ffc152ac: 80 e9 00 24 lwz r7,36(r9)
ffc152b0: 7c ea 38 10 subfc r7,r10,r7
ffc152b4: 38 e0 00 00 li r7,0
ffc152b8: 7c e7 39 14 adde r7,r7,r7
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc152bc: 2f 87 00 00 cmpwi cr7,r7,0
ffc152c0: 41 9e 01 78 beq- cr7,ffc15438 <_Heap_Free+0x1e0> <== 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;
ffc152c4: 80 ca 00 04 lwz r6,4(r10)
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc152c8: 70 c3 00 01 andi. r3,r6,1
ffc152cc: 41 82 01 6c beq- ffc15438 <_Heap_Free+0x1e0> <== NEVER TAKEN
return false;
}
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 ));
ffc152d0: 81 89 00 24 lwz r12,36(r9)
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
ffc152d4: 54 c6 00 3c rlwinm r6,r6,0,0,30
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc152d8: 38 80 00 00 li r4,0
ffc152dc: 7f 8a 60 00 cmpw cr7,r10,r12
ffc152e0: 41 9e 00 14 beq- cr7,ffc152f4 <_Heap_Free+0x9c>
ffc152e4: 7c ea 32 14 add r7,r10,r6
ffc152e8: 80 87 00 04 lwz r4,4(r7)
ffc152ec: 54 84 07 fe clrlwi r4,r4,31
ffc152f0: 68 84 00 01 xori r4,r4,1
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
ffc152f4: 70 a7 00 01 andi. r7,r5,1
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
ffc152f8: 54 84 06 3e clrlwi r4,r4,24
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
ffc152fc: 40 82 00 94 bne- ffc15390 <_Heap_Free+0x138>
uintptr_t const prev_size = block->prev_size;
ffc15300: 80 ab 00 00 lwz r5,0(r11)
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
ffc15304: 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);
ffc15308: 7c e5 58 50 subf r7,r5,r11
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
ffc1530c: 7f 87 00 40 cmplw cr7,r7,r0
ffc15310: 41 9c 00 10 blt- cr7,ffc15320 <_Heap_Free+0xc8> <== NEVER TAKEN
ffc15314: 7c 67 60 10 subfc r3,r7,r12
ffc15318: 38 60 00 00 li r3,0
ffc1531c: 7c 63 19 14 adde r3,r3,r3
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
ffc15320: 2f 83 00 00 cmpwi cr7,r3,0
ffc15324: 41 9e 01 14 beq- cr7,ffc15438 <_Heap_Free+0x1e0> <== NEVER TAKEN
return( false );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
ffc15328: 80 07 00 04 lwz r0,4(r7)
ffc1532c: 70 03 00 01 andi. r3,r0,1
ffc15330: 41 82 01 08 beq- ffc15438 <_Heap_Free+0x1e0> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
ffc15334: 2f 84 00 00 cmpwi cr7,r4,0
ffc15338: 41 9e 00 38 beq- cr7,ffc15370 <_Heap_Free+0x118>
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc1533c: 80 89 00 38 lwz r4,56(r9)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
ffc15340: 7c c8 32 14 add r6,r8,r6
ffc15344: 7c a6 2a 14 add r5,r6,r5
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
ffc15348: 81 6a 00 0c lwz r11,12(r10)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
ffc1534c: 81 4a 00 08 lwz r10,8(r10)
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
ffc15350: 38 c4 ff ff addi r6,r4,-1
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc15354: 60 a0 00 01 ori r0,r5,1
}
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;
ffc15358: 90 c9 00 38 stw r6,56(r9)
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
ffc1535c: 91 6a 00 0c stw r11,12(r10)
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;
ffc15360: 7c a7 29 2e stwx r5,r7,r5
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc15364: 90 07 00 04 stw r0,4(r7)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
ffc15368: 91 4b 00 08 stw r10,8(r11)
ffc1536c: 48 00 00 a0 b ffc1540c <_Heap_Free+0x1b4>
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;
ffc15370: 7c a8 2a 14 add r5,r8,r5
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc15374: 60 a0 00 01 ori r0,r5,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
ffc15378: 7c ab 41 2e stwx r5,r11,r8
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;
ffc1537c: 90 07 00 04 stw r0,4(r7)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc15380: 80 0a 00 04 lwz r0,4(r10)
ffc15384: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc15388: 90 0a 00 04 stw r0,4(r10)
ffc1538c: 48 00 00 80 b ffc1540c <_Heap_Free+0x1b4>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
ffc15390: 2f 84 00 00 cmpwi cr7,r4,0
ffc15394: 41 9e 00 30 beq- cr7,ffc153c4 <_Heap_Free+0x16c>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
ffc15398: 80 aa 00 0c lwz r5,12(r10)
uintptr_t const size = block_size + next_block_size;
ffc1539c: 7c e6 42 14 add r7,r6,r8
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
ffc153a0: 81 4a 00 08 lwz r10,8(r10)
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
ffc153a4: 60 e0 00 01 ori r0,r7,1
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
ffc153a8: 90 ab 00 0c stw r5,12(r11)
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
ffc153ac: 91 4b 00 08 stw r10,8(r11)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
ffc153b0: 7c eb 39 2e stwx r7,r11,r7
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;
ffc153b4: 90 0b 00 04 stw r0,4(r11)
new_block->prev = prev;
next->prev = new_block;
prev->next = new_block;
ffc153b8: 91 65 00 08 stw r11,8(r5)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
ffc153bc: 91 6a 00 0c stw r11,12(r10)
ffc153c0: 48 00 00 4c b ffc1540c <_Heap_Free+0x1b4>
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;
ffc153c4: 61 00 00 01 ori r0,r8,1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
ffc153c8: 7d 0b 41 2e stwx r8,r11,r8
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;
ffc153cc: 90 0b 00 04 stw r0,4(r11)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
ffc153d0: 80 0a 00 04 lwz r0,4(r10)
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
ffc153d4: 91 2b 00 0c stw r9,12(r11)
ffc153d8: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc153dc: 90 0a 00 04 stw r0,4(r10)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
ffc153e0: 80 e9 00 38 lwz r7,56(r9)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
ffc153e4: 81 49 00 3c lwz r10,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;
ffc153e8: 38 07 00 01 addi r0,r7,1
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
ffc153ec: 7f 8a 00 40 cmplw cr7,r10,r0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
ffc153f0: 81 49 00 08 lwz r10,8(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;
ffc153f4: 90 09 00 38 stw r0,56(r9)
new_block->next = next;
ffc153f8: 91 4b 00 08 stw r10,8(r11)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
ffc153fc: 91 6a 00 0c stw r11,12(r10)
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
ffc15400: 91 69 00 08 stw r11,8(r9)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
ffc15404: 40 9c 00 08 bge- cr7,ffc1540c <_Heap_Free+0x1b4>
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
ffc15408: 90 09 00 3c stw r0,60(r9)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
ffc1540c: 80 09 00 30 lwz r0,48(r9)
ffc15410: 38 60 00 01 li r3,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc15414: 81 69 00 40 lwz r11,64(r9)
++stats->frees;
ffc15418: 81 49 00 50 lwz r10,80(r9)
stats->free_size += block_size;
ffc1541c: 7d 00 42 14 add r8,r0,r8
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc15420: 39 6b ff ff addi r11,r11,-1
++stats->frees;
stats->free_size += block_size;
ffc15424: 91 09 00 30 stw r8,48(r9)
}
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
ffc15428: 38 0a 00 01 addi r0,r10,1
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
ffc1542c: 91 69 00 40 stw r11,64(r9)
++stats->frees;
ffc15430: 90 09 00 50 stw r0,80(r9)
stats->free_size += block_size;
return( true );
ffc15434: 4e 80 00 20 blr
ffc15438: 38 60 00 00 li r3,0
}
ffc1543c: 4e 80 00 20 blr
ffc15598 <_Heap_Size_of_alloc_area>:
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 )
ffc15598: 80 03 00 10 lwz r0,16(r3)
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;
ffc1559c: 81 23 00 20 lwz r9,32(r3)
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 )
ffc155a0: 7d 64 03 96 divwu r11,r4,r0
ffc155a4: 7d 6b 01 d6 mullw r11,r11,r0
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
ffc155a8: 38 00 00 00 li r0,0
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 )
ffc155ac: 39 6b ff f8 addi r11,r11,-8
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
ffc155b0: 7f 8b 48 40 cmplw cr7,r11,r9
ffc155b4: 41 9c 00 14 blt- cr7,ffc155c8 <_Heap_Size_of_alloc_area+0x30><== NEVER TAKEN
ffc155b8: 80 03 00 24 lwz r0,36(r3)
ffc155bc: 7c 0b 00 10 subfc r0,r11,r0
ffc155c0: 38 00 00 00 li r0,0
ffc155c4: 7c 00 01 14 adde r0,r0,r0
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
ffc155c8: 2f 80 00 00 cmpwi cr7,r0,0
ffc155cc: 41 9e 00 54 beq- cr7,ffc15620 <_Heap_Size_of_alloc_area+0x88>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc155d0: 80 0b 00 04 lwz r0,4(r11)
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
ffc155d4: 39 40 00 00 li r10,0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc155d8: 54 00 00 3c rlwinm r0,r0,0,0,30
ffc155dc: 7d 6b 02 14 add r11,r11,r0
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
ffc155e0: 7f 8b 48 40 cmplw cr7,r11,r9
ffc155e4: 41 9c 00 14 blt- cr7,ffc155f8 <_Heap_Size_of_alloc_area+0x60><== NEVER TAKEN
ffc155e8: 81 43 00 24 lwz r10,36(r3)
ffc155ec: 7d 4b 50 10 subfc r10,r11,r10
ffc155f0: 39 40 00 00 li r10,0
ffc155f4: 7d 4a 51 14 adde r10,r10,r10
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
ffc155f8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc155fc: 41 9e 00 24 beq- cr7,ffc15620 <_Heap_Size_of_alloc_area+0x88><== NEVER TAKEN
ffc15600: 80 0b 00 04 lwz r0,4(r11)
ffc15604: 70 09 00 01 andi. r9,r0,1
ffc15608: 41 82 00 18 beq- ffc15620 <_Heap_Size_of_alloc_area+0x88><== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
ffc1560c: 20 84 00 04 subfic r4,r4,4
ffc15610: 7d 64 5a 14 add r11,r4,r11
ffc15614: 91 65 00 00 stw r11,0(r5)
ffc15618: 38 60 00 01 li r3,1
return true;
ffc1561c: 4e 80 00 20 blr
ffc15620: 38 60 00 00 li r3,0
}
ffc15624: 4e 80 00 20 blr
ffc0aa80 <_Heap_Walk>:
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0aa80: 2f 85 00 00 cmpwi cr7,r5,0
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
ffc0aa84: 94 21 ff 98 stwu r1,-104(r1)
ffc0aa88: 7c 08 02 a6 mflr r0
ffc0aa8c: 93 21 00 4c stw r25,76(r1)
ffc0aa90: 90 01 00 6c stw r0,108(r1)
ffc0aa94: 93 61 00 54 stw r27,84(r1)
ffc0aa98: 93 81 00 58 stw r28,88(r1)
ffc0aa9c: 93 a1 00 5c stw r29,92(r1)
ffc0aaa0: 7c 7d 1b 78 mr r29,r3
ffc0aaa4: 93 c1 00 60 stw r30,96(r1)
ffc0aaa8: 7c 9e 23 78 mr r30,r4
ffc0aaac: 93 e1 00 64 stw r31,100(r1)
ffc0aab0: 91 c1 00 20 stw r14,32(r1)
ffc0aab4: 91 e1 00 24 stw r15,36(r1)
ffc0aab8: 92 01 00 28 stw r16,40(r1)
ffc0aabc: 92 21 00 2c stw r17,44(r1)
ffc0aac0: 92 41 00 30 stw r18,48(r1)
ffc0aac4: 92 61 00 34 stw r19,52(r1)
ffc0aac8: 92 81 00 38 stw r20,56(r1)
ffc0aacc: 92 a1 00 3c stw r21,60(r1)
ffc0aad0: 92 c1 00 40 stw r22,64(r1)
ffc0aad4: 92 e1 00 44 stw r23,68(r1)
ffc0aad8: 93 01 00 48 stw r24,72(r1)
ffc0aadc: 93 41 00 50 stw r26,80(r1)
uintptr_t const page_size = heap->page_size;
ffc0aae0: 83 83 00 10 lwz r28,16(r3)
uintptr_t const min_block_size = heap->min_block_size;
ffc0aae4: 83 63 00 14 lwz r27,20(r3)
Heap_Block *const last_block = heap->last_block;
ffc0aae8: 83 23 00 24 lwz r25,36(r3)
Heap_Block *block = heap->first_block;
ffc0aaec: 83 e3 00 20 lwz r31,32(r3)
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
ffc0aaf0: 40 9e 00 10 bne- cr7,ffc0ab00 <_Heap_Walk+0x80>
ffc0aaf4: 3d 20 ff c1 lis r9,-63
ffc0aaf8: 39 29 aa 7c addi r9,r9,-21892
ffc0aafc: 48 00 00 0c b ffc0ab08 <_Heap_Walk+0x88>
ffc0ab00: 3d 20 ff c1 lis r9,-63
ffc0ab04: 39 29 b0 18 addi r9,r9,-20456
ffc0ab08: 91 21 00 18 stw r9,24(r1)
if ( !_System_state_Is_up( _System_state_Get() ) ) {
ffc0ab0c: 3d 20 00 00 lis r9,0
ffc0ab10: 80 09 27 f8 lwz r0,10232(r9)
ffc0ab14: 2f 80 00 03 cmpwi cr7,r0,3
ffc0ab18: 40 be 04 94 bne+ cr7,ffc0afac <_Heap_Walk+0x52c>
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)(
ffc0ab1c: 80 1d 00 0c lwz r0,12(r29)
ffc0ab20: 3c a0 ff c2 lis r5,-62
ffc0ab24: 81 1d 00 18 lwz r8,24(r29)
ffc0ab28: 38 a5 1d 84 addi r5,r5,7556
ffc0ab2c: 81 3d 00 1c lwz r9,28(r29)
ffc0ab30: 7f c3 f3 78 mr r3,r30
ffc0ab34: 81 7d 00 08 lwz r11,8(r29)
ffc0ab38: 38 80 00 00 li r4,0
ffc0ab3c: 90 01 00 10 stw r0,16(r1)
ffc0ab40: 7f 86 e3 78 mr r6,r28
ffc0ab44: 7f 67 db 78 mr r7,r27
ffc0ab48: 80 01 00 18 lwz r0,24(r1)
ffc0ab4c: 7f ea fb 78 mr r10,r31
ffc0ab50: 91 61 00 0c stw r11,12(r1)
ffc0ab54: 7c 09 03 a6 mtctr r0
ffc0ab58: 93 21 00 08 stw r25,8(r1)
ffc0ab5c: 4c c6 31 82 crclr 4*cr1+eq
ffc0ab60: 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 ) {
ffc0ab64: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0ab68: 40 be 00 14 bne+ cr7,ffc0ab7c <_Heap_Walk+0xfc>
(*printer)( source, true, "page size is zero\n" );
ffc0ab6c: 3c a0 ff c2 lis r5,-62
ffc0ab70: 7f c3 f3 78 mr r3,r30
ffc0ab74: 38 a5 1e 15 addi r5,r5,7701
ffc0ab78: 48 00 00 c8 b ffc0ac40 <_Heap_Walk+0x1c0>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
ffc0ab7c: 73 89 00 07 andi. r9,r28,7
ffc0ab80: 41 a2 00 18 beq+ ffc0ab98 <_Heap_Walk+0x118>
(*printer)(
ffc0ab84: 3c a0 ff c2 lis r5,-62
ffc0ab88: 7f c3 f3 78 mr r3,r30
ffc0ab8c: 38 a5 1e 28 addi r5,r5,7720
ffc0ab90: 7f 86 e3 78 mr r6,r28
ffc0ab94: 48 00 03 8c b ffc0af20 <_Heap_Walk+0x4a0>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
ffc0ab98: 7c 1b e3 96 divwu r0,r27,r28
ffc0ab9c: 7c 00 e1 d6 mullw r0,r0,r28
ffc0aba0: 7f 9b 00 00 cmpw cr7,r27,r0
ffc0aba4: 41 be 00 18 beq+ cr7,ffc0abbc <_Heap_Walk+0x13c>
(*printer)(
ffc0aba8: 3c a0 ff c2 lis r5,-62
ffc0abac: 7f c3 f3 78 mr r3,r30
ffc0abb0: 38 a5 1e 46 addi r5,r5,7750
ffc0abb4: 7f 66 db 78 mr r6,r27
ffc0abb8: 48 00 03 68 b ffc0af20 <_Heap_Walk+0x4a0>
);
return false;
}
if (
ffc0abbc: 38 1f 00 08 addi r0,r31,8
ffc0abc0: 7d 20 e3 96 divwu r9,r0,r28
ffc0abc4: 7d 29 e1 d6 mullw r9,r9,r28
ffc0abc8: 7f 80 48 00 cmpw cr7,r0,r9
ffc0abcc: 41 be 00 14 beq+ cr7,ffc0abe0 <_Heap_Walk+0x160>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
ffc0abd0: 3c a0 ff c2 lis r5,-62
ffc0abd4: 7f c3 f3 78 mr r3,r30
ffc0abd8: 38 a5 1e 6a addi r5,r5,7786
ffc0abdc: 48 00 03 40 b ffc0af1c <_Heap_Walk+0x49c>
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
ffc0abe0: 80 1f 00 04 lwz r0,4(r31)
ffc0abe4: 70 09 00 01 andi. r9,r0,1
ffc0abe8: 40 a2 00 14 bne+ ffc0abfc <_Heap_Walk+0x17c>
(*printer)(
ffc0abec: 3c a0 ff c2 lis r5,-62
ffc0abf0: 7f c3 f3 78 mr r3,r30
ffc0abf4: 38 a5 1e 9b addi r5,r5,7835
ffc0abf8: 48 00 00 48 b ffc0ac40 <_Heap_Walk+0x1c0>
);
return false;
}
if ( first_block->prev_size != page_size ) {
ffc0abfc: 83 5f 00 00 lwz r26,0(r31)
ffc0ac00: 7f 9a e0 00 cmpw cr7,r26,r28
ffc0ac04: 41 be 00 18 beq+ cr7,ffc0ac1c <_Heap_Walk+0x19c>
(*printer)(
ffc0ac08: 3c a0 ff c2 lis r5,-62
ffc0ac0c: 7f c3 f3 78 mr r3,r30
ffc0ac10: 38 a5 1e c9 addi r5,r5,7881
ffc0ac14: 7f 46 d3 78 mr r6,r26
ffc0ac18: 48 00 02 18 b ffc0ae30 <_Heap_Walk+0x3b0>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
ffc0ac1c: 81 39 00 04 lwz r9,4(r25)
ffc0ac20: 55 29 00 3c rlwinm r9,r9,0,0,30
ffc0ac24: 7d 39 4a 14 add r9,r25,r9
ffc0ac28: 80 09 00 04 lwz r0,4(r9)
ffc0ac2c: 70 09 00 01 andi. r9,r0,1
ffc0ac30: 40 a2 00 28 bne+ ffc0ac58 <_Heap_Walk+0x1d8>
(*printer)(
ffc0ac34: 3c a0 ff c2 lis r5,-62
ffc0ac38: 7f c3 f3 78 mr r3,r30
ffc0ac3c: 38 a5 1e f4 addi r5,r5,7924
ffc0ac40: 80 01 00 18 lwz r0,24(r1)
ffc0ac44: 38 80 00 01 li r4,1
ffc0ac48: 7c 09 03 a6 mtctr r0
ffc0ac4c: 4c c6 31 82 crclr 4*cr1+eq
ffc0ac50: 4e 80 04 21 bctrl
ffc0ac54: 48 00 02 e0 b ffc0af34 <_Heap_Walk+0x4b4>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
ffc0ac58: 81 3d 00 10 lwz r9,16(r29)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0ac5c: 7f a0 eb 78 mr r0,r29
ffc0ac60: 80 dd 00 08 lwz r6,8(r29)
ffc0ac64: 48 00 00 a4 b ffc0ad08 <_Heap_Walk+0x288>
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
ffc0ac68: 81 1d 00 20 lwz r8,32(r29)
ffc0ac6c: 7f 88 30 40 cmplw cr7,r8,r6
ffc0ac70: 41 9d 00 14 bgt- cr7,ffc0ac84 <_Heap_Walk+0x204>
ffc0ac74: 81 7d 00 24 lwz r11,36(r29)
ffc0ac78: 7d 66 58 10 subfc r11,r6,r11
ffc0ac7c: 39 60 00 00 li r11,0
ffc0ac80: 7d 6b 59 14 adde r11,r11,r11
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
ffc0ac84: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0ac88: 40 be 00 14 bne+ cr7,ffc0ac9c <_Heap_Walk+0x21c>
(*printer)(
ffc0ac8c: 3c a0 ff c2 lis r5,-62
ffc0ac90: 7f c3 f3 78 mr r3,r30
ffc0ac94: 38 a5 1f 09 addi r5,r5,7945
ffc0ac98: 48 00 02 88 b ffc0af20 <_Heap_Walk+0x4a0>
);
return false;
}
if (
ffc0ac9c: 7d 6a 4b 96 divwu r11,r10,r9
ffc0aca0: 7d 6b 49 d6 mullw r11,r11,r9
ffc0aca4: 7f 8a 58 00 cmpw cr7,r10,r11
ffc0aca8: 41 be 00 14 beq+ cr7,ffc0acbc <_Heap_Walk+0x23c>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
ffc0acac: 3c a0 ff c2 lis r5,-62
ffc0acb0: 7f c3 f3 78 mr r3,r30
ffc0acb4: 38 a5 1f 29 addi r5,r5,7977
ffc0acb8: 48 00 02 68 b ffc0af20 <_Heap_Walk+0x4a0>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
ffc0acbc: 81 66 00 04 lwz r11,4(r6)
ffc0acc0: 55 6b 00 3c rlwinm r11,r11,0,0,30
ffc0acc4: 7d 66 5a 14 add r11,r6,r11
ffc0acc8: 81 6b 00 04 lwz r11,4(r11)
ffc0accc: 71 6a 00 01 andi. r10,r11,1
ffc0acd0: 41 a2 00 14 beq+ ffc0ace4 <_Heap_Walk+0x264>
(*printer)(
ffc0acd4: 3c a0 ff c2 lis r5,-62
ffc0acd8: 7f c3 f3 78 mr r3,r30
ffc0acdc: 38 a5 1f 59 addi r5,r5,8025
ffc0ace0: 48 00 02 40 b ffc0af20 <_Heap_Walk+0x4a0>
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0ace4: 80 e6 00 0c lwz r7,12(r6)
ffc0ace8: 7f 87 00 00 cmpw cr7,r7,r0
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0acec: 7c c0 33 78 mr r0,r6
);
return false;
}
if ( free_block->prev != prev_block ) {
ffc0acf0: 41 be 00 14 beq+ cr7,ffc0ad04 <_Heap_Walk+0x284>
(*printer)(
ffc0acf4: 3c a0 ff c2 lis r5,-62
ffc0acf8: 7f c3 f3 78 mr r3,r30
ffc0acfc: 38 a5 1f 75 addi r5,r5,8053
ffc0ad00: 48 00 01 34 b ffc0ae34 <_Heap_Walk+0x3b4>
return false;
}
prev_block = free_block;
free_block = free_block->next;
ffc0ad04: 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 ) {
ffc0ad08: 7f 86 e8 00 cmpw cr7,r6,r29
);
return false;
}
if (
ffc0ad0c: 39 46 00 08 addi r10,r6,8
ffc0ad10: 39 60 00 00 li r11,0
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 ) {
ffc0ad14: 40 9e ff 54 bne+ cr7,ffc0ac68 <_Heap_Walk+0x1e8>
ffc0ad18: 48 00 02 4c b ffc0af64 <_Heap_Walk+0x4e4>
- 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;
ffc0ad1c: 83 1f 00 04 lwz r24,4(r31)
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
ffc0ad20: 73 09 00 01 andi. r9,r24,1
ffc0ad24: 57 18 00 3c rlwinm r24,r24,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);
ffc0ad28: 7f 9f c2 14 add r28,r31,r24
ffc0ad2c: 41 82 00 2c beq- ffc0ad58 <_Heap_Walk+0x2d8>
(*printer)(
ffc0ad30: 80 01 00 18 lwz r0,24(r1)
ffc0ad34: 7f c3 f3 78 mr r3,r30
ffc0ad38: 38 80 00 00 li r4,0
ffc0ad3c: 7e 85 a3 78 mr r5,r20
ffc0ad40: 7c 09 03 a6 mtctr r0
ffc0ad44: 7f e6 fb 78 mr r6,r31
ffc0ad48: 7f 07 c3 78 mr r7,r24
ffc0ad4c: 4c c6 31 82 crclr 4*cr1+eq
ffc0ad50: 4e 80 04 21 bctrl
ffc0ad54: 48 00 00 2c b ffc0ad80 <_Heap_Walk+0x300>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0ad58: 80 01 00 18 lwz r0,24(r1)
ffc0ad5c: 7f c3 f3 78 mr r3,r30
ffc0ad60: 38 80 00 00 li r4,0
ffc0ad64: 81 1f 00 00 lwz r8,0(r31)
ffc0ad68: 7e 65 9b 78 mr r5,r19
ffc0ad6c: 7c 09 03 a6 mtctr r0
ffc0ad70: 7f e6 fb 78 mr r6,r31
ffc0ad74: 7f 07 c3 78 mr r7,r24
ffc0ad78: 4c c6 31 82 crclr 4*cr1+eq
ffc0ad7c: 4e 80 04 21 bctrl
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
ffc0ad80: 81 3d 00 20 lwz r9,32(r29)
ffc0ad84: 38 00 00 00 li r0,0
ffc0ad88: 7f 89 e0 40 cmplw cr7,r9,r28
ffc0ad8c: 41 9d 00 14 bgt- cr7,ffc0ada0 <_Heap_Walk+0x320> <== NEVER TAKEN
ffc0ad90: 80 1d 00 24 lwz r0,36(r29)
ffc0ad94: 7c 1c 00 10 subfc r0,r28,r0
ffc0ad98: 38 00 00 00 li r0,0
ffc0ad9c: 7c 00 01 14 adde r0,r0,r0
block_size,
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
ffc0ada0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ada4: 40 be 00 14 bne+ cr7,ffc0adb8 <_Heap_Walk+0x338>
(*printer)(
ffc0ada8: 3c a0 ff c2 lis r5,-62
ffc0adac: 7f c3 f3 78 mr r3,r30
ffc0adb0: 38 a5 1f e3 addi r5,r5,8163
ffc0adb4: 48 00 00 78 b ffc0ae2c <_Heap_Walk+0x3ac>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
ffc0adb8: 7c 18 d3 96 divwu r0,r24,r26
ffc0adbc: 7c 00 d1 d6 mullw r0,r0,r26
ffc0adc0: 7f 98 00 00 cmpw cr7,r24,r0
ffc0adc4: 41 be 00 1c beq+ cr7,ffc0ade0 <_Heap_Walk+0x360>
(*printer)(
ffc0adc8: 3c a0 ff c2 lis r5,-62
ffc0adcc: 7f c3 f3 78 mr r3,r30
ffc0add0: 38 a5 20 10 addi r5,r5,8208
ffc0add4: 7f e6 fb 78 mr r6,r31
ffc0add8: 7f 07 c3 78 mr r7,r24
ffc0addc: 48 00 00 58 b ffc0ae34 <_Heap_Walk+0x3b4>
);
return false;
}
if ( block_size < min_block_size ) {
ffc0ade0: 7f 98 d8 40 cmplw cr7,r24,r27
ffc0ade4: 40 bc 00 34 bge+ cr7,ffc0ae18 <_Heap_Walk+0x398>
(*printer)(
ffc0ade8: 80 01 00 18 lwz r0,24(r1)
ffc0adec: 3c a0 ff c2 lis r5,-62
ffc0adf0: 7f c3 f3 78 mr r3,r30
ffc0adf4: 38 a5 20 3e addi r5,r5,8254
ffc0adf8: 7c 09 03 a6 mtctr r0
ffc0adfc: 7f e6 fb 78 mr r6,r31
ffc0ae00: 7f 07 c3 78 mr r7,r24
ffc0ae04: 7f 68 db 78 mr r8,r27
ffc0ae08: 38 80 00 01 li r4,1
ffc0ae0c: 4c c6 31 82 crclr 4*cr1+eq
ffc0ae10: 4e 80 04 21 bctrl
ffc0ae14: 48 00 01 20 b ffc0af34 <_Heap_Walk+0x4b4>
);
return false;
}
if ( next_block_begin <= block_begin ) {
ffc0ae18: 7f 9c f8 40 cmplw cr7,r28,r31
ffc0ae1c: 41 bd 00 30 bgt+ cr7,ffc0ae4c <_Heap_Walk+0x3cc>
(*printer)(
ffc0ae20: 3c a0 ff c2 lis r5,-62
ffc0ae24: 7f c3 f3 78 mr r3,r30
ffc0ae28: 38 a5 20 69 addi r5,r5,8297
ffc0ae2c: 7f e6 fb 78 mr r6,r31
ffc0ae30: 7f 87 e3 78 mr r7,r28
ffc0ae34: 80 01 00 18 lwz r0,24(r1)
ffc0ae38: 38 80 00 01 li r4,1
ffc0ae3c: 7c 09 03 a6 mtctr r0
ffc0ae40: 4c c6 31 82 crclr 4*cr1+eq
ffc0ae44: 4e 80 04 21 bctrl
ffc0ae48: 48 00 00 ec b ffc0af34 <_Heap_Walk+0x4b4>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
ffc0ae4c: 80 1c 00 04 lwz r0,4(r28)
ffc0ae50: 70 09 00 01 andi. r9,r0,1
ffc0ae54: 40 82 01 08 bne- ffc0af5c <_Heap_Walk+0x4dc>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0ae58: 80 1d 00 08 lwz r0,8(r29)
ffc0ae5c: 7d c8 73 78 mr r8,r14
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)(
ffc0ae60: 80 ff 00 0c lwz r7,12(r31)
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;
ffc0ae64: 82 bf 00 04 lwz r21,4(r31)
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0ae68: 7f 87 00 00 cmpw cr7,r7,r0
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
ffc0ae6c: 80 1d 00 0c lwz r0,12(r29)
- 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;
ffc0ae70: 56 b8 00 3c rlwinm r24,r21,0,0,30
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
ffc0ae74: 7e df c2 14 add r22,r31,r24
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
ffc0ae78: 41 9e 00 14 beq- cr7,ffc0ae8c <_Heap_Walk+0x40c>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0ae7c: 7f 87 e8 00 cmpw cr7,r7,r29
ffc0ae80: 7e e8 bb 78 mr r8,r23
ffc0ae84: 40 be 00 08 bne+ cr7,ffc0ae8c <_Heap_Walk+0x40c>
ffc0ae88: 7d e8 7b 78 mr r8,r15
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)(
ffc0ae8c: 81 3f 00 08 lwz r9,8(r31)
ffc0ae90: 7e 0a 83 78 mr r10,r16
ffc0ae94: 7f 89 00 00 cmpw cr7,r9,r0
ffc0ae98: 41 9e 00 14 beq- cr7,ffc0aeac <_Heap_Walk+0x42c>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0ae9c: 7f 89 e8 00 cmpw cr7,r9,r29
ffc0aea0: 7e ea bb 78 mr r10,r23
ffc0aea4: 40 be 00 08 bne+ cr7,ffc0aeac <_Heap_Walk+0x42c>
ffc0aea8: 7e 2a 8b 78 mr r10,r17
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)(
ffc0aeac: 80 01 00 18 lwz r0,24(r1)
ffc0aeb0: 7f c3 f3 78 mr r3,r30
ffc0aeb4: 38 80 00 00 li r4,0
ffc0aeb8: 7e 45 93 78 mr r5,r18
ffc0aebc: 7c 09 03 a6 mtctr r0
ffc0aec0: 7f e6 fb 78 mr r6,r31
ffc0aec4: 4c c6 31 82 crclr 4*cr1+eq
ffc0aec8: 4e 80 04 21 bctrl
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
ffc0aecc: 81 16 00 00 lwz r8,0(r22)
ffc0aed0: 7f 98 40 00 cmpw cr7,r24,r8
ffc0aed4: 41 9e 00 34 beq- cr7,ffc0af08 <_Heap_Walk+0x488>
(*printer)(
ffc0aed8: 80 01 00 18 lwz r0,24(r1)
ffc0aedc: 3c a0 ff c2 lis r5,-62
ffc0aee0: 7f c3 f3 78 mr r3,r30
ffc0aee4: 38 a5 20 f2 addi r5,r5,8434
ffc0aee8: 7c 09 03 a6 mtctr r0
ffc0aeec: 7f e6 fb 78 mr r6,r31
ffc0aef0: 7f 07 c3 78 mr r7,r24
ffc0aef4: 7e c9 b3 78 mr r9,r22
ffc0aef8: 38 80 00 01 li r4,1
ffc0aefc: 4c c6 31 82 crclr 4*cr1+eq
ffc0af00: 4e 80 04 21 bctrl
ffc0af04: 48 00 00 30 b ffc0af34 <_Heap_Walk+0x4b4>
);
return false;
}
if ( !prev_used ) {
ffc0af08: 72 a9 00 01 andi. r9,r21,1
ffc0af0c: 40 a2 00 30 bne+ ffc0af3c <_Heap_Walk+0x4bc>
(*printer)(
ffc0af10: 3c a0 ff c2 lis r5,-62
ffc0af14: 7f c3 f3 78 mr r3,r30
ffc0af18: 38 a5 21 2b addi r5,r5,8491
ffc0af1c: 7f e6 fb 78 mr r6,r31
ffc0af20: 80 01 00 18 lwz r0,24(r1)
ffc0af24: 38 80 00 01 li r4,1
ffc0af28: 7c 09 03 a6 mtctr r0
ffc0af2c: 4c c6 31 82 crclr 4*cr1+eq
ffc0af30: 4e 80 04 21 bctrl
ffc0af34: 38 60 00 00 li r3,0
ffc0af38: 48 00 00 78 b ffc0afb0 <_Heap_Walk+0x530>
ffc0af3c: 81 3d 00 08 lwz r9,8(r29)
ffc0af40: 48 00 00 0c b ffc0af4c <_Heap_Walk+0x4cc>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
ffc0af44: 41 9a 00 18 beq- cr6,ffc0af5c <_Heap_Walk+0x4dc>
return true;
}
free_block = free_block->next;
ffc0af48: 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 ) {
ffc0af4c: 7f 89 e8 00 cmpw cr7,r9,r29
if ( free_block == block ) {
ffc0af50: 7f 09 f8 00 cmpw cr6,r9,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 ) {
ffc0af54: 40 9e ff f0 bne+ cr7,ffc0af44 <_Heap_Walk+0x4c4>
ffc0af58: 48 00 00 b0 b ffc0b008 <_Heap_Walk+0x588>
ffc0af5c: 7f 9f e3 78 mr r31,r28
ffc0af60: 48 00 00 44 b ffc0afa4 <_Heap_Walk+0x524>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0af64: 3e 60 ff c2 lis r19,-62
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
(*printer)(
ffc0af68: 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)(
ffc0af6c: 3e 40 ff c2 lis r18,-62
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0af70: 3e 20 ff c2 lis r17,-62
ffc0af74: 3e e0 ff c2 lis r23,-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)(
ffc0af78: 3e 00 ff c2 lis r16,-62
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0af7c: 3d e0 ff c2 lis r15,-62
ffc0af80: 3d c0 ff c2 lis r14,-62
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
ffc0af84: 3a 73 1f be addi r19,r19,8126
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
(*printer)(
ffc0af88: 3a 94 1f a7 addi r20,r20,8103
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)(
ffc0af8c: 3a 52 20 c6 addi r18,r18,8390
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
ffc0af90: 3a 31 20 bc addi r17,r17,8380
ffc0af94: 3a f7 1c cf addi r23,r23,7375
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)(
ffc0af98: 3a 10 20 b2 addi r16,r16,8370
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
ffc0af9c: 39 ef 20 a8 addi r15,r15,8360
ffc0afa0: 39 ce 20 9d addi r14,r14,8349
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
ffc0afa4: 7f 9f c8 00 cmpw cr7,r31,r25
ffc0afa8: 40 9e fd 74 bne+ cr7,ffc0ad1c <_Heap_Walk+0x29c>
ffc0afac: 38 60 00 01 li r3,1
block = next_block;
}
return true;
}
ffc0afb0: 80 01 00 6c lwz r0,108(r1)
ffc0afb4: 81 c1 00 20 lwz r14,32(r1)
ffc0afb8: 7c 08 03 a6 mtlr r0
ffc0afbc: 81 e1 00 24 lwz r15,36(r1)
ffc0afc0: 82 01 00 28 lwz r16,40(r1)
ffc0afc4: 82 21 00 2c lwz r17,44(r1)
ffc0afc8: 82 41 00 30 lwz r18,48(r1)
ffc0afcc: 82 61 00 34 lwz r19,52(r1)
ffc0afd0: 82 81 00 38 lwz r20,56(r1)
ffc0afd4: 82 a1 00 3c lwz r21,60(r1)
ffc0afd8: 82 c1 00 40 lwz r22,64(r1)
ffc0afdc: 82 e1 00 44 lwz r23,68(r1)
ffc0afe0: 83 01 00 48 lwz r24,72(r1)
ffc0afe4: 83 21 00 4c lwz r25,76(r1)
ffc0afe8: 83 41 00 50 lwz r26,80(r1)
ffc0afec: 83 61 00 54 lwz r27,84(r1)
ffc0aff0: 83 81 00 58 lwz r28,88(r1)
ffc0aff4: 83 a1 00 5c lwz r29,92(r1)
ffc0aff8: 83 c1 00 60 lwz r30,96(r1)
ffc0affc: 83 e1 00 64 lwz r31,100(r1)
ffc0b000: 38 21 00 68 addi r1,r1,104
ffc0b004: 4e 80 00 20 blr
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
ffc0b008: 3c a0 ff c2 lis r5,-62
ffc0b00c: 7f c3 f3 78 mr r3,r30
ffc0b010: 38 a5 21 5a addi r5,r5,8538
ffc0b014: 4b ff ff 08 b ffc0af1c <_Heap_Walk+0x49c>
ffc0b018 <_Heap_Walk_print>:
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b018: 94 21 ff 88 stwu r1,-120(r1)
ffc0b01c: 7c 08 02 a6 mflr r0
ffc0b020: 93 e1 00 74 stw r31,116(r1)
ffc0b024: 90 01 00 7c stw r0,124(r1)
ffc0b028: 7c 60 1b 78 mr r0,r3
ffc0b02c: 90 c1 00 1c stw r6,28(r1)
ffc0b030: 90 e1 00 20 stw r7,32(r1)
ffc0b034: 91 01 00 24 stw r8,36(r1)
ffc0b038: 91 21 00 28 stw r9,40(r1)
ffc0b03c: 91 41 00 2c stw r10,44(r1)
ffc0b040: 40 86 00 24 bne- cr1,ffc0b064 <_Heap_Walk_print+0x4c> <== ALWAYS TAKEN
ffc0b044: d8 21 00 30 stfd f1,48(r1)
ffc0b048: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED
ffc0b04c: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED
ffc0b050: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED
ffc0b054: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED
ffc0b058: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED
ffc0b05c: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED
ffc0b060: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED
va_list ap;
if ( error ) {
ffc0b064: 2f 84 00 00 cmpwi cr7,r4,0
{
/* Do nothing */
}
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
ffc0b068: 7c bf 2b 78 mr r31,r5
va_list ap;
if ( error ) {
ffc0b06c: 41 be 00 10 beq+ cr7,ffc0b07c <_Heap_Walk_print+0x64>
printk( "FAIL[%d]: ", source );
ffc0b070: 3c 60 ff c2 lis r3,-62
ffc0b074: 38 63 21 85 addi r3,r3,8581
ffc0b078: 48 00 00 0c b ffc0b084 <_Heap_Walk_print+0x6c>
} else {
printk( "PASS[%d]: ", source );
ffc0b07c: 3c 60 ff c2 lis r3,-62
ffc0b080: 38 63 21 90 addi r3,r3,8592
ffc0b084: 7c 04 03 78 mr r4,r0
ffc0b088: 4c c6 31 82 crclr 4*cr1+eq
ffc0b08c: 4b ff b2 b1 bl ffc0633c <printk>
}
va_start( ap, fmt );
ffc0b090: 38 00 00 03 li r0,3
ffc0b094: 98 01 00 08 stb r0,8(r1)
ffc0b098: 38 00 00 00 li r0,0
vprintk( fmt, ap );
ffc0b09c: 7f e3 fb 78 mr r3,r31
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b0a0: 98 01 00 09 stb r0,9(r1)
ffc0b0a4: 38 01 00 80 addi r0,r1,128
vprintk( fmt, ap );
ffc0b0a8: 38 81 00 08 addi r4,r1,8
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
ffc0b0ac: 90 01 00 0c stw r0,12(r1)
ffc0b0b0: 38 01 00 10 addi r0,r1,16
ffc0b0b4: 90 01 00 10 stw r0,16(r1)
vprintk( fmt, ap );
ffc0b0b8: 4b ff d3 ad bl ffc08464 <vprintk>
va_end( ap );
}
ffc0b0bc: 80 01 00 7c lwz r0,124(r1)
ffc0b0c0: 83 e1 00 74 lwz r31,116(r1)
ffc0b0c4: 38 21 00 78 addi r1,r1,120
ffc0b0c8: 7c 08 03 a6 mtlr r0
ffc0b0cc: 4e 80 00 20 blr
ffc0a3f8 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc0a3f8: 94 21 ff d8 stwu r1,-40(r1)
ffc0a3fc: 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;
ffc0a400: 3d 20 00 00 lis r9,0
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc0a404: 90 01 00 2c stw r0,44(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;
ffc0a408: 39 29 20 88 addi r9,r9,8328
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc0a40c: 93 c1 00 20 stw r30,32(r1)
ffc0a410: 93 e1 00 24 stw r31,36(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;
ffc0a414: 83 c9 00 2c lwz r30,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;
ffc0a418: 83 e9 00 30 lwz r31,48(r9)
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc0a41c: 93 61 00 14 stw r27,20(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 )
ffc0a420: 7f 9e f8 40 cmplw cr7,r30,r31
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
ffc0a424: 93 81 00 18 stw r28,24(r1)
ffc0a428: 3f 80 00 00 lis r28,0
ffc0a42c: 93 a1 00 1c stw r29,28(r1)
ffc0a430: 3f a0 00 00 lis r29,0
ffc0a434: 93 21 00 0c stw r25,12(r1)
ffc0a438: 93 41 00 10 stw r26,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;
ffc0a43c: 83 69 00 34 lwz r27,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 )
ffc0a440: 40 9d 00 40 ble- cr7,ffc0a480 <_IO_Manager_initialization+0x88>
* 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 )
ffc0a444: 1f 3e 00 18 mulli r25,r30,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 *)
ffc0a448: 7f 23 cb 78 mr r3,r25
ffc0a44c: 48 00 38 89 bl ffc0dcd4 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
ffc0a450: 7f 25 cb 78 mr r5,r25
ffc0a454: 38 80 00 00 li r4,0
_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;
ffc0a458: 93 dd 28 28 stw r30,10280(r29)
/*
* 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 *)
ffc0a45c: 7c 7a 1b 78 mr r26,r3
ffc0a460: 90 7c 28 2c stw r3,10284(r28)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
ffc0a464: 48 00 ed b1 bl ffc19214 <memset>
ffc0a468: 2f 9f 00 00 cmpwi cr7,r31,0
_IO_Driver_address_table, 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];
ffc0a46c: 39 40 00 00 li r10,0
ffc0a470: 3b ff 00 01 addi r31,r31,1
ffc0a474: 40 be 00 4c bne+ cr7,ffc0a4c0 <_IO_Manager_initialization+0xc8><== ALWAYS TAKEN
ffc0a478: 3b e0 00 01 li r31,1 <== NOT EXECUTED
ffc0a47c: 48 00 00 44 b ffc0a4c0 <_IO_Manager_initialization+0xc8><== NOT EXECUTED
* 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;
ffc0a480: 93 7c 28 2c stw r27,10284(r28)
_IO_Number_of_drivers = number_of_drivers;
ffc0a484: 93 fd 28 28 stw r31,10280(r29)
return;
ffc0a488: 48 00 00 48 b ffc0a4d0 <_IO_Manager_initialization+0xd8>
_IO_Driver_address_table, 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];
ffc0a48c: 7c c9 50 6e lwzux r6,r9,r10
ffc0a490: 81 09 00 08 lwz r8,8(r9)
ffc0a494: 80 09 00 0c lwz r0,12(r9)
ffc0a498: 80 e9 00 04 lwz r7,4(r9)
ffc0a49c: 7c da 51 2e stwx r6,r26,r10
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc0a4a0: 39 4a 00 18 addi r10,r10,24
_IO_Driver_address_table[index] = driver_table[index];
ffc0a4a4: 90 eb 00 04 stw r7,4(r11)
ffc0a4a8: 91 0b 00 08 stw r8,8(r11)
ffc0a4ac: 90 0b 00 0c stw r0,12(r11)
ffc0a4b0: 81 09 00 14 lwz r8,20(r9)
ffc0a4b4: 80 09 00 10 lwz r0,16(r9)
ffc0a4b8: 91 0b 00 14 stw r8,20(r11)
ffc0a4bc: 90 0b 00 10 stw r0,16(r11)
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc0a4c0: 37 ff ff ff addic. r31,r31,-1
_IO_Driver_address_table[index] = driver_table[index];
ffc0a4c4: 7f 69 db 78 mr r9,r27
ffc0a4c8: 7d 7a 52 14 add r11,r26,r10
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
ffc0a4cc: 40 82 ff c0 bne+ ffc0a48c <_IO_Manager_initialization+0x94>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
ffc0a4d0: 80 01 00 2c lwz r0,44(r1)
ffc0a4d4: 83 21 00 0c lwz r25,12(r1)
ffc0a4d8: 7c 08 03 a6 mtlr r0
ffc0a4dc: 83 41 00 10 lwz r26,16(r1)
ffc0a4e0: 83 61 00 14 lwz r27,20(r1)
ffc0a4e4: 83 81 00 18 lwz r28,24(r1)
ffc0a4e8: 83 a1 00 1c lwz r29,28(r1)
ffc0a4ec: 83 c1 00 20 lwz r30,32(r1)
ffc0a4f0: 83 e1 00 24 lwz r31,36(r1)
ffc0a4f4: 38 21 00 28 addi r1,r1,40
ffc0a4f8: 4e 80 00 20 blr
ffc0b418 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0b418: 94 21 ff f0 stwu r1,-16(r1)
ffc0b41c: 7c 08 02 a6 mflr r0
_Internal_errors_What_happened.the_source = the_source;
ffc0b420: 3d 60 00 00 lis r11,0
ffc0b424: 39 2b 2d f0 addi r9,r11,11760
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0b428: 90 01 00 14 stw r0,20(r1)
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
ffc0b42c: 90 a9 00 08 stw r5,8(r9)
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
ffc0b430: 98 89 00 04 stb r4,4(r9)
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
ffc0b434: 93 e1 00 0c stw r31,12(r1)
ffc0b438: 7c bf 2b 78 mr r31,r5
_Internal_errors_What_happened.the_source = the_source;
ffc0b43c: 90 6b 2d f0 stw r3,11760(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 );
ffc0b440: 48 00 23 f1 bl ffc0d830 <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
ffc0b444: 38 00 00 05 li r0,5
ffc0b448: 3d 20 00 00 lis r9,0
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
ffc0b44c: 7f e3 fb 78 mr r3,r31
ffc0b450: 90 09 28 14 stw r0,10260(r9)
ffc0b454: 4b ff 88 cd bl ffc03d20 <_BSP_Fatal_error>
ffc0b458: 48 00 00 00 b ffc0b458 <_Internal_error_Occurred+0x40><== NOT EXECUTED
ffc0b478 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0b478: 94 21 ff f0 stwu r1,-16(r1)
ffc0b47c: 7c 08 02 a6 mflr r0
ffc0b480: 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 )
ffc0b484: 80 03 00 18 lwz r0,24(r3)
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0b488: 93 e1 00 0c stw r31,12(r1)
ffc0b48c: 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 )
ffc0b490: 2f 80 00 00 cmpwi cr7,r0,0
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
ffc0b494: 93 c1 00 08 stw r30,8(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 )
ffc0b498: 38 60 00 00 li r3,0
ffc0b49c: 41 be 00 70 beq+ cr7,ffc0b50c <_Objects_Allocate+0x94> <== 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 );
ffc0b4a0: 3b df 00 20 addi r30,r31,32
ffc0b4a4: 7f c3 f3 78 mr r3,r30
ffc0b4a8: 4b ff f5 f1 bl ffc0aa98 <_Chain_Get>
if ( information->auto_extend ) {
ffc0b4ac: 88 1f 00 12 lbz r0,18(r31)
ffc0b4b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b4b4: 41 9e 00 58 beq- cr7,ffc0b50c <_Objects_Allocate+0x94>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
ffc0b4b8: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b4bc: 40 be 00 1c bne+ cr7,ffc0b4d8 <_Objects_Allocate+0x60>
_Objects_Extend_information( information );
ffc0b4c0: 7f e3 fb 78 mr r3,r31
ffc0b4c4: 48 00 00 95 bl ffc0b558 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
ffc0b4c8: 7f c3 f3 78 mr r3,r30
ffc0b4cc: 4b ff f5 cd bl ffc0aa98 <_Chain_Get>
}
if ( the_object ) {
ffc0b4d0: 2c 03 00 00 cmpwi r3,0
ffc0b4d4: 41 a2 00 38 beq+ ffc0b50c <_Objects_Allocate+0x94>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0b4d8: a1 63 00 0a lhz r11,10(r3)
ffc0b4dc: a0 1f 00 0a lhz r0,10(r31)
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc0b4e0: a1 3f 00 14 lhz r9,20(r31)
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
ffc0b4e4: 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--;
ffc0b4e8: a1 7f 00 2c lhz r11,44(r31)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc0b4ec: 7c 00 4b 96 divwu r0,r0,r9
ffc0b4f0: 81 3f 00 30 lwz r9,48(r31)
ffc0b4f4: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0b4f8: 7d 49 00 2e lwzx r10,r9,r0
information->inactive--;
ffc0b4fc: 39 6b ff ff addi r11,r11,-1
ffc0b500: b1 7f 00 2c sth r11,44(r31)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
ffc0b504: 39 4a ff ff addi r10,r10,-1
ffc0b508: 7d 49 01 2e stwx r10,r9,r0
information->inactive--;
}
}
return the_object;
}
ffc0b50c: 80 01 00 14 lwz r0,20(r1)
ffc0b510: 83 c1 00 08 lwz r30,8(r1)
ffc0b514: 7c 08 03 a6 mtlr r0
ffc0b518: 83 e1 00 0c lwz r31,12(r1)
ffc0b51c: 38 21 00 10 addi r1,r1,16
ffc0b520: 4e 80 00 20 blr
ffc0b558 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0b558: 94 21 ff b8 stwu r1,-72(r1)
ffc0b55c: 7c 08 02 a6 mflr r0
ffc0b560: 90 01 00 4c stw r0,76(r1)
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0b564: 81 63 00 34 lwz r11,52(r3)
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0b568: 93 61 00 34 stw r27,52(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 )
ffc0b56c: 2f 8b 00 00 cmpwi cr7,r11,0
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
ffc0b570: 93 e1 00 44 stw r31,68(r1)
ffc0b574: 7c 7f 1b 78 mr r31,r3
ffc0b578: 92 a1 00 1c stw r21,28(r1)
ffc0b57c: 92 c1 00 20 stw r22,32(r1)
ffc0b580: 92 e1 00 24 stw r23,36(r1)
ffc0b584: 93 01 00 28 stw r24,40(r1)
ffc0b588: 93 21 00 2c stw r25,44(r1)
ffc0b58c: 93 41 00 30 stw r26,48(r1)
ffc0b590: 93 81 00 38 stw r28,56(r1)
ffc0b594: 93 a1 00 3c stw r29,60(r1)
ffc0b598: 93 c1 00 40 stw r30,64(r1)
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
ffc0b59c: a3 63 00 0a lhz r27,10(r3)
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
ffc0b5a0: 40 be 00 14 bne+ cr7,ffc0b5b4 <_Objects_Extend_information+0x5c>
ffc0b5a4: 7f 7e db 78 mr r30,r27
ffc0b5a8: 3b 80 00 00 li r28,0
ffc0b5ac: 3b 40 00 00 li r26,0
ffc0b5b0: 48 00 00 4c b ffc0b5fc <_Objects_Extend_information+0xa4>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
ffc0b5b4: a1 23 00 14 lhz r9,20(r3)
ffc0b5b8: 7f 7e db 78 mr r30,r27
ffc0b5bc: a3 43 00 10 lhz r26,16(r3)
ffc0b5c0: 3b 80 00 00 li r28,0
ffc0b5c4: 7f 5a 4b 96 divwu r26,r26,r9
ffc0b5c8: 2f 9a 00 00 cmpwi cr7,r26,0
ffc0b5cc: 38 1a 00 01 addi r0,r26,1
ffc0b5d0: 40 be 00 20 bne+ cr7,ffc0b5f0 <_Objects_Extend_information+0x98><== ALWAYS TAKEN
ffc0b5d4: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0b5d8: 48 00 00 18 b ffc0b5f0 <_Objects_Extend_information+0x98><== NOT EXECUTED
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
ffc0b5dc: 7d 4b 50 2e lwzx r10,r11,r10
ffc0b5e0: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0b5e4: 41 9e 00 18 beq- cr7,ffc0b5fc <_Objects_Extend_information+0xa4>
ffc0b5e8: 7f de 4a 14 add r30,r30,r9
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc0b5ec: 3b 9c 00 01 addi r28,r28,1
ffc0b5f0: 34 00 ff ff addic. r0,r0,-1
if ( information->object_blocks[ block ] == NULL )
ffc0b5f4: 57 8a 10 3a rlwinm r10,r28,2,0,29
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
ffc0b5f8: 40 82 ff e4 bne+ ffc0b5dc <_Objects_Extend_information+0x84>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
ffc0b5fc: a0 1f 00 14 lhz r0,20(r31)
ffc0b600: a2 df 00 10 lhz r22,16(r31)
ffc0b604: 7e c0 b2 14 add r22,r0,r22
/*
* 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 ) {
ffc0b608: 2b 96 ff ff cmplwi cr7,r22,65535
ffc0b60c: 41 9d 02 1c bgt- cr7,ffc0b828 <_Objects_Extend_information+0x2d0><== NEVER TAKEN
/*
* 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 ) {
ffc0b610: 89 3f 00 12 lbz r9,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;
ffc0b614: 80 7f 00 18 lwz r3,24(r31)
if ( information->auto_extend ) {
ffc0b618: 2f 89 00 00 cmpwi cr7,r9,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;
ffc0b61c: 7c 60 19 d6 mullw r3,r0,r3
if ( information->auto_extend ) {
ffc0b620: 41 9e 00 14 beq- cr7,ffc0b634 <_Objects_Extend_information+0xdc>
new_object_block = _Workspace_Allocate( block_size );
ffc0b624: 48 00 26 f9 bl ffc0dd1c <_Workspace_Allocate>
if ( !new_object_block )
ffc0b628: 7c 7d 1b 79 mr. r29,r3
ffc0b62c: 40 a2 00 10 bne+ ffc0b63c <_Objects_Extend_information+0xe4>
ffc0b630: 48 00 01 f8 b ffc0b828 <_Objects_Extend_information+0x2d0>
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
ffc0b634: 48 00 26 a1 bl ffc0dcd4 <_Workspace_Allocate_or_fatal_error>
ffc0b638: 7c 7d 1b 78 mr r29,r3
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
ffc0b63c: a0 1f 00 10 lhz r0,16(r31)
ffc0b640: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0b644: 41 9c 01 5c blt- cr7,ffc0b7a0 <_Objects_Extend_information+0x248>
*/
/*
* Up the block count and maximum
*/
block_count++;
ffc0b648: 3b 3a 00 01 addi r25,r26,1
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
ffc0b64c: 1c 19 00 03 mulli r0,r25,3
ffc0b650: 7c 76 da 14 add r3,r22,r27
ffc0b654: 7c 63 02 14 add r3,r3,r0
ffc0b658: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0b65c: 48 00 26 c1 bl ffc0dd1c <_Workspace_Allocate>
if ( !object_blocks ) {
ffc0b660: 7c 77 1b 79 mr. r23,r3
ffc0b664: 40 a2 00 10 bne+ ffc0b674 <_Objects_Extend_information+0x11c>
_Workspace_Free( new_object_block );
ffc0b668: 7f a3 eb 78 mr r3,r29
ffc0b66c: 48 00 26 e5 bl ffc0dd50 <_Workspace_Free>
return;
ffc0b670: 48 00 01 b8 b ffc0b828 <_Objects_Extend_information+0x2d0>
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0b674: a0 1f 00 10 lhz r0,16(r31)
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
ffc0b678: 57 39 10 3a rlwinm r25,r25,2,0,29
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
ffc0b67c: 7f 17 ca 14 add r24,r23,r25
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
ffc0b680: 7f 80 d8 40 cmplw cr7,r0,r27
ffc0b684: 7f 38 ca 14 add r25,r24,r25
ffc0b688: 41 9d 00 20 bgt- cr7,ffc0b6a8 <_Objects_Extend_information+0x150>
ffc0b68c: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0b690: 39 20 00 00 li r9,0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0b694: 38 00 00 00 li r0,0
ffc0b698: 3b 7b 00 01 addi r27,r27,1
ffc0b69c: 40 be 00 50 bne+ cr7,ffc0b6ec <_Objects_Extend_information+0x194><== ALWAYS TAKEN
ffc0b6a0: 3b 60 00 01 li r27,1 <== NOT EXECUTED
ffc0b6a4: 48 00 00 48 b ffc0b6ec <_Objects_Extend_information+0x194><== NOT EXECUTED
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
information->object_blocks,
block_count * sizeof(void*) );
ffc0b6a8: 57 55 10 3a rlwinm r21,r26,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,
ffc0b6ac: 80 9f 00 34 lwz r4,52(r31)
ffc0b6b0: 7e a5 ab 78 mr r5,r21
ffc0b6b4: 48 00 da 61 bl ffc19114 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
ffc0b6b8: 80 9f 00 30 lwz r4,48(r31)
ffc0b6bc: 7e a5 ab 78 mr r5,r21
ffc0b6c0: 7f 03 c3 78 mr r3,r24
ffc0b6c4: 48 00 da 51 bl ffc19114 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
ffc0b6c8: a0 1f 00 10 lhz r0,16(r31)
ffc0b6cc: 80 9f 00 1c lwz r4,28(r31)
ffc0b6d0: 7f 23 cb 78 mr r3,r25
ffc0b6d4: 7f 7b 02 14 add r27,r27,r0
ffc0b6d8: 57 65 10 3a rlwinm r5,r27,2,0,29
ffc0b6dc: 48 00 da 39 bl ffc19114 <memcpy>
ffc0b6e0: 48 00 00 18 b ffc0b6f8 <_Objects_Extend_information+0x1a0>
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
ffc0b6e4: 7c 0b c9 2e stwx r0,r11,r25
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0b6e8: 39 29 00 01 addi r9,r9,1
ffc0b6ec: 37 7b ff ff addic. r27,r27,-1
local_table[ index ] = NULL;
ffc0b6f0: 55 2b 10 3a rlwinm r11,r9,2,0,29
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
ffc0b6f4: 40 82 ff f0 bne+ ffc0b6e4 <_Objects_Extend_information+0x18c>
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0b6f8: a1 5f 00 14 lhz r10,20(r31)
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc0b6fc: 38 00 00 00 li r0,0
ffc0b700: 57 5a 10 3a rlwinm r26,r26,2,0,29
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
ffc0b704: 7d 7e 52 14 add r11,r30,r10
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
ffc0b708: 7c 18 d1 2e stwx r0,r24,r26
ffc0b70c: 7f 9e 58 40 cmplw cr7,r30,r11
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0b710: 57 c9 10 3a rlwinm r9,r30,2,0,29
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
ffc0b714: 7c 17 d1 2e stwx r0,r23,r26
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
ffc0b718: 7d 39 4a 14 add r9,r25,r9
index++ ) {
local_table[ index ] = NULL;
ffc0b71c: 38 0a 00 01 addi r0,r10,1
ffc0b720: 39 40 00 00 li r10,0
ffc0b724: 41 9d 00 0c bgt- cr7,ffc0b730 <_Objects_Extend_information+0x1d8><== NEVER TAKEN
ffc0b728: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0b72c: 40 be 00 14 bne+ cr7,ffc0b740 <_Objects_Extend_information+0x1e8><== ALWAYS TAKEN
ffc0b730: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0b734: 48 00 00 0c b ffc0b740 <_Objects_Extend_information+0x1e8><== NOT EXECUTED
ffc0b738: 91 49 00 00 stw r10,0(r9)
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
ffc0b73c: 39 29 00 04 addi r9,r9,4
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
ffc0b740: 34 00 ff ff addic. r0,r0,-1
ffc0b744: 40 82 ff f4 bne+ ffc0b738 <_Objects_Extend_information+0x1e0>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0b748: 7c 00 00 a6 mfmsr r0
ffc0b74c: 7d 30 42 a6 mfsprg r9,0
ffc0b750: 7c 09 48 78 andc r9,r0,r9
ffc0b754: 7d 20 01 24 mtmsr r9
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0b758: 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;
ffc0b75c: 56 d6 04 3e clrlwi r22,r22,16
information->maximum_id = _Objects_Build_id(
ffc0b760: a1 3f 00 04 lhz r9,4(r31)
ffc0b764: 55 6b c0 0e rlwinm r11,r11,24,0,7
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
ffc0b768: 80 7f 00 34 lwz r3,52(r31)
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0b76c: 65 6b 00 01 oris r11,r11,1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
ffc0b770: 93 1f 00 30 stw r24,48(r31)
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0b774: 55 29 d8 08 rlwinm r9,r9,27,0,4
ffc0b778: 7d 69 4b 78 or r9,r11,r9
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
ffc0b77c: 93 3f 00 1c stw r25,28(r31)
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
ffc0b780: 7d 29 b3 78 or r9,r9,r22
ffc0b784: 91 3f 00 0c stw r9,12(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;
ffc0b788: b2 df 00 10 sth r22,16(r31)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
ffc0b78c: 92 ff 00 34 stw r23,52(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0b790: 7c 00 01 24 mtmsr r0
information->maximum
);
_ISR_Enable( level );
if ( old_tables )
ffc0b794: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b798: 41 9e 00 08 beq- cr7,ffc0b7a0 <_Objects_Extend_information+0x248>
_Workspace_Free( old_tables );
ffc0b79c: 48 00 25 b5 bl ffc0dd50 <_Workspace_Free>
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0b7a0: 81 3f 00 34 lwz r9,52(r31)
ffc0b7a4: 57 9c 10 3a rlwinm r28,r28,2,0,29
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0b7a8: 3b 61 00 08 addi r27,r1,8
ffc0b7ac: a0 bf 00 14 lhz r5,20(r31)
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
ffc0b7b0: 7f a9 e1 2e stwx r29,r9,r28
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0b7b4: 7f a4 eb 78 mr r4,r29
ffc0b7b8: 7f 63 db 78 mr r3,r27
ffc0b7bc: 80 df 00 18 lwz r6,24(r31)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0b7c0: 3b bf 00 20 addi r29,r31,32
information->object_blocks[ block ] = new_object_block;
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
ffc0b7c4: 48 00 95 81 bl ffc14d44 <_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 ) {
ffc0b7c8: 48 00 00 2c b ffc0b7f4 <_Objects_Extend_information+0x29c>
the_object->id = _Objects_Build_id(
ffc0b7cc: 81 7f 00 00 lwz r11,0(r31)
ffc0b7d0: a0 1f 00 04 lhz r0,4(r31)
ffc0b7d4: 55 6b c0 0e rlwinm r11,r11,24,0,7
ffc0b7d8: 65 6b 00 01 oris r11,r11,1
ffc0b7dc: 54 00 d8 08 rlwinm r0,r0,27,0,4
ffc0b7e0: 7d 60 03 78 or r0,r11,r0
ffc0b7e4: 7c 00 f3 78 or r0,r0,r30
ffc0b7e8: 90 09 00 08 stw r0,8(r9)
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
ffc0b7ec: 3b de 00 01 addi r30,r30,1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0b7f0: 4b ff f2 51 bl ffc0aa40 <_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 ) {
ffc0b7f4: 7f 63 db 78 mr r3,r27
ffc0b7f8: 4b ff f2 a1 bl ffc0aa98 <_Chain_Get>
ffc0b7fc: 7c 69 1b 79 mr. r9,r3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
ffc0b800: 7f a3 eb 78 mr r3,r29
ffc0b804: 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 ) {
ffc0b808: 40 82 ff c4 bne+ ffc0b7cc <_Objects_Extend_information+0x274>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0b80c: a0 1f 00 14 lhz r0,20(r31)
information->inactive =
ffc0b810: a1 3f 00 2c lhz r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0b814: 81 7f 00 30 lwz r11,48(r31)
information->inactive =
ffc0b818: 7d 20 4a 14 add r9,r0,r9
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0b81c: 54 00 04 3e clrlwi r0,r0,16
information->inactive =
ffc0b820: b1 3f 00 2c sth r9,44(r31)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
ffc0b824: 7c 0b e1 2e stwx r0,r11,r28
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
ffc0b828: 80 01 00 4c lwz r0,76(r1)
ffc0b82c: 82 a1 00 1c lwz r21,28(r1)
ffc0b830: 7c 08 03 a6 mtlr r0
ffc0b834: 82 c1 00 20 lwz r22,32(r1)
ffc0b838: 82 e1 00 24 lwz r23,36(r1)
ffc0b83c: 83 01 00 28 lwz r24,40(r1)
ffc0b840: 83 21 00 2c lwz r25,44(r1)
ffc0b844: 83 41 00 30 lwz r26,48(r1)
ffc0b848: 83 61 00 34 lwz r27,52(r1)
ffc0b84c: 83 81 00 38 lwz r28,56(r1)
ffc0b850: 83 a1 00 3c lwz r29,60(r1)
ffc0b854: 83 c1 00 40 lwz r30,64(r1)
ffc0b858: 83 e1 00 44 lwz r31,68(r1)
ffc0b85c: 38 21 00 48 addi r1,r1,72
ffc0b860: 4e 80 00 20 blr
ffc0b930 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
ffc0b930: 94 21 ff f0 stwu r1,-16(r1)
ffc0b934: 7c 08 02 a6 mflr r0
ffc0b938: 93 e1 00 0c stw r31,12(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0b93c: 7c 9f 23 79 mr. r31,r4
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
ffc0b940: 93 c1 00 08 stw r30,8(r1)
ffc0b944: 7c 7e 1b 78 mr r30,r3
ffc0b948: 90 01 00 14 stw r0,20(r1)
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
ffc0b94c: 41 a2 00 4c beq+ ffc0b998 <_Objects_Get_information+0x68>
/*
* 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 );
ffc0b950: 48 00 9c d9 bl ffc15628 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
ffc0b954: 2c 03 00 00 cmpwi r3,0
ffc0b958: 41 a2 00 40 beq+ ffc0b998 <_Objects_Get_information+0x68>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
ffc0b95c: 7f 9f 18 40 cmplw cr7,r31,r3
ffc0b960: 41 bd 00 38 bgt+ cr7,ffc0b998 <_Objects_Get_information+0x68>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
ffc0b964: 3d 20 00 00 lis r9,0
ffc0b968: 57 de 10 3a rlwinm r30,r30,2,0,29
ffc0b96c: 39 29 2c e0 addi r9,r9,11488
ffc0b970: 7d 29 f0 2e lwzx r9,r9,r30
ffc0b974: 2f 89 00 00 cmpwi cr7,r9,0
ffc0b978: 41 be 00 20 beq+ cr7,ffc0b998 <_Objects_Get_information+0x68><== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
ffc0b97c: 57 ff 10 3a rlwinm r31,r31,2,0,29
ffc0b980: 7c 69 f8 2e lwzx r3,r9,r31
if ( !info )
ffc0b984: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b988: 41 be 00 14 beq+ cr7,ffc0b99c <_Objects_Get_information+0x6c><== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
ffc0b98c: a0 03 00 10 lhz r0,16(r3)
ffc0b990: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b994: 40 be 00 08 bne+ cr7,ffc0b99c <_Objects_Get_information+0x6c>
ffc0b998: 38 60 00 00 li r3,0
return NULL;
#endif
return info;
}
ffc0b99c: 80 01 00 14 lwz r0,20(r1)
ffc0b9a0: 83 c1 00 08 lwz r30,8(r1)
ffc0b9a4: 7c 08 03 a6 mtlr r0
ffc0b9a8: 83 e1 00 0c lwz r31,12(r1)
ffc0b9ac: 38 21 00 10 addi r1,r1,16
ffc0b9b0: 4e 80 00 20 blr
ffc1d158 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
ffc1d158: 81 23 00 08 lwz r9,8(r3)
if ( information->maximum >= index ) {
ffc1d15c: a0 03 00 10 lhz r0,16(r3)
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
ffc1d160: 21 29 00 01 subfic r9,r9,1
ffc1d164: 7d 29 22 14 add r9,r9,r4
if ( information->maximum >= index ) {
ffc1d168: 7f 80 48 40 cmplw cr7,r0,r9
ffc1d16c: 41 9c 00 24 blt- cr7,ffc1d190 <_Objects_Get_no_protection+0x38>
if ( (the_object = information->local_table[ index ]) != NULL ) {
ffc1d170: 81 63 00 1c lwz r11,28(r3)
ffc1d174: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc1d178: 7c 6b 48 2e lwzx r3,r11,r9
ffc1d17c: 2f 83 00 00 cmpwi cr7,r3,0
ffc1d180: 41 9e 00 10 beq- cr7,ffc1d190 <_Objects_Get_no_protection+0x38><== NEVER TAKEN
*location = OBJECTS_LOCAL;
ffc1d184: 38 00 00 00 li r0,0
ffc1d188: 90 05 00 00 stw r0,0(r5)
return the_object;
ffc1d18c: 4e 80 00 20 blr
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
ffc1d190: 38 00 00 01 li r0,1
ffc1d194: 90 05 00 00 stw r0,0(r5)
ffc1d198: 38 60 00 00 li r3,0
return NULL;
}
ffc1d19c: 4e 80 00 20 blr
ffc0bdec <_Objects_Id_to_name>:
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
ffc0bdec: 2c 03 00 00 cmpwi r3,0
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
ffc0bdf0: 94 21 ff e0 stwu r1,-32(r1)
ffc0bdf4: 7c 08 02 a6 mflr r0
ffc0bdf8: 93 e1 00 1c stw r31,28(r1)
ffc0bdfc: 7c 9f 23 78 mr r31,r4
ffc0be00: 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;
ffc0be04: 41 82 00 0c beq- ffc0be10 <_Objects_Id_to_name+0x24>
ffc0be08: 7c 64 1b 78 mr r4,r3
ffc0be0c: 48 00 00 10 b ffc0be1c <_Objects_Id_to_name+0x30>
ffc0be10: 3d 20 00 00 lis r9,0
ffc0be14: 81 29 28 00 lwz r9,10240(r9)
ffc0be18: 80 89 00 08 lwz r4,8(r9)
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
ffc0be1c: 54 89 47 7e rlwinm r9,r4,8,29,31
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
ffc0be20: 38 09 ff ff addi r0,r9,-1
ffc0be24: 2b 80 00 03 cmplwi cr7,r0,3
ffc0be28: 41 9d 00 48 bgt- cr7,ffc0be70 <_Objects_Id_to_name+0x84>
ffc0be2c: 48 00 00 5c b ffc0be88 <_Objects_Id_to_name+0x9c>
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
ffc0be30: 54 80 3e 7a rlwinm r0,r4,7,25,29
ffc0be34: 7c 69 00 2e lwzx r3,r9,r0
if ( !information )
ffc0be38: 2f 83 00 00 cmpwi cr7,r3,0
ffc0be3c: 41 9e 00 34 beq- cr7,ffc0be70 <_Objects_Id_to_name+0x84><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
ffc0be40: 88 03 00 38 lbz r0,56(r3)
ffc0be44: 2f 80 00 00 cmpwi cr7,r0,0
ffc0be48: 40 9e 00 28 bne- cr7,ffc0be70 <_Objects_Id_to_name+0x84><== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
ffc0be4c: 38 a1 00 08 addi r5,r1,8
ffc0be50: 4b ff ff 0d bl ffc0bd5c <_Objects_Get>
if ( !the_object )
ffc0be54: 2c 03 00 00 cmpwi r3,0
ffc0be58: 41 82 00 18 beq- ffc0be70 <_Objects_Id_to_name+0x84>
return OBJECTS_INVALID_ID;
*name = the_object->name;
ffc0be5c: 80 03 00 0c lwz r0,12(r3)
ffc0be60: 90 1f 00 00 stw r0,0(r31)
_Thread_Enable_dispatch();
ffc0be64: 48 00 0a c1 bl ffc0c924 <_Thread_Enable_dispatch>
ffc0be68: 38 60 00 00 li r3,0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
ffc0be6c: 48 00 00 08 b ffc0be74 <_Objects_Id_to_name+0x88>
ffc0be70: 38 60 00 03 li r3,3
}
ffc0be74: 80 01 00 24 lwz r0,36(r1)
ffc0be78: 83 e1 00 1c lwz r31,28(r1)
ffc0be7c: 38 21 00 20 addi r1,r1,32
ffc0be80: 7c 08 03 a6 mtlr r0
ffc0be84: 4e 80 00 20 blr
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
ffc0be88: 3d 60 00 00 lis r11,0
ffc0be8c: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc0be90: 39 6b 2c 60 addi r11,r11,11360
ffc0be94: 7d 2b 48 2e lwzx r9,r11,r9
ffc0be98: 2f 89 00 00 cmpwi cr7,r9,0
ffc0be9c: 40 9e ff 94 bne+ cr7,ffc0be30 <_Objects_Id_to_name+0x44>
ffc0bea0: 4b ff ff d0 b ffc0be70 <_Objects_Id_to_name+0x84>
ffc0afc0 <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
ffc0afc0: 94 21 ff e8 stwu r1,-24(r1)
ffc0afc4: 7c 08 02 a6 mflr r0
ffc0afc8: 90 01 00 1c stw r0,28(r1)
ffc0afcc: 93 c1 00 10 stw r30,16(r1)
ffc0afd0: 7c 9e 23 78 mr r30,r4
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
ffc0afd4: a0 83 00 3a lhz r4,58(r3)
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
ffc0afd8: 93 a1 00 0c stw r29,12(r1)
ffc0afdc: 7c 7d 1b 78 mr r29,r3
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
ffc0afe0: 7c a3 2b 78 mr r3,r5
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
ffc0afe4: 93 81 00 08 stw r28,8(r1)
ffc0afe8: 7c bc 2b 78 mr r28,r5
ffc0afec: 93 e1 00 14 stw r31,20(r1)
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
ffc0aff0: 48 00 b7 9d bl ffc1678c <strnlen>
ffc0aff4: 7c 7f 1b 78 mr r31,r3
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
ffc0aff8: 88 1d 00 38 lbz r0,56(r29)
ffc0affc: 2f 80 00 00 cmpwi cr7,r0,0
ffc0b000: 41 be 00 54 beq+ cr7,ffc0b054 <_Objects_Set_name+0x94>
char *d;
d = _Workspace_Allocate( length + 1 );
ffc0b004: 38 63 00 01 addi r3,r3,1
ffc0b008: 48 00 22 15 bl ffc0d21c <_Workspace_Allocate>
if ( !d )
ffc0b00c: 7c 7d 1b 79 mr. r29,r3
ffc0b010: 38 60 00 00 li r3,0
ffc0b014: 41 82 00 8c beq- ffc0b0a0 <_Objects_Set_name+0xe0> <== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
ffc0b018: 80 7e 00 0c lwz r3,12(r30)
ffc0b01c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0b020: 41 9e 00 10 beq- cr7,ffc0b030 <_Objects_Set_name+0x70>
_Workspace_Free( (void *)the_object->name.name_p );
ffc0b024: 48 00 22 2d bl ffc0d250 <_Workspace_Free>
the_object->name.name_p = NULL;
ffc0b028: 38 00 00 00 li r0,0
ffc0b02c: 90 1e 00 0c stw r0,12(r30)
}
strncpy( d, name, length );
ffc0b030: 7f 84 e3 78 mr r4,r28
ffc0b034: 7f a3 eb 78 mr r3,r29
ffc0b038: 7f e5 fb 78 mr r5,r31
ffc0b03c: 48 00 b6 71 bl ffc166ac <strncpy>
d[length] = '\0';
ffc0b040: 38 00 00 00 li r0,0
ffc0b044: 7c 1d f9 ae stbx r0,r29,r31
the_object->name.name_p = d;
ffc0b048: 38 60 00 01 li r3,1
ffc0b04c: 93 be 00 0c stw r29,12(r30)
ffc0b050: 48 00 00 50 b ffc0b0a0 <_Objects_Set_name+0xe0>
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
ffc0b054: 2b 83 00 01 cmplwi cr7,r3,1
ffc0b058: 89 5c 00 00 lbz r10,0(r28)
ffc0b05c: 40 9d 00 64 ble- cr7,ffc0b0c0 <_Objects_Set_name+0x100>
ffc0b060: 2b 83 00 02 cmplwi cr7,r3,2
ffc0b064: 89 7c 00 01 lbz r11,1(r28)
ffc0b068: 55 6b 80 1e rlwinm r11,r11,16,0,15
ffc0b06c: 40 9d 00 58 ble- cr7,ffc0b0c4 <_Objects_Set_name+0x104>
ffc0b070: 2b 83 00 03 cmplwi cr7,r3,3
ffc0b074: 89 3c 00 02 lbz r9,2(r28)
ffc0b078: 38 00 00 20 li r0,32
ffc0b07c: 55 29 40 2e rlwinm r9,r9,8,0,23
ffc0b080: 40 9d 00 08 ble- cr7,ffc0b088 <_Objects_Set_name+0xc8>
ffc0b084: 88 1c 00 03 lbz r0,3(r28)
ffc0b088: 55 4a c0 0e rlwinm r10,r10,24,0,7
ffc0b08c: 7d 6b 53 78 or r11,r11,r10
ffc0b090: 7d 69 4b 78 or r9,r11,r9
ffc0b094: 7d 20 03 78 or r0,r9,r0
ffc0b098: 90 1e 00 0c stw r0,12(r30)
ffc0b09c: 38 60 00 01 li r3,1
);
}
return true;
}
ffc0b0a0: 80 01 00 1c lwz r0,28(r1)
ffc0b0a4: 83 81 00 08 lwz r28,8(r1)
ffc0b0a8: 7c 08 03 a6 mtlr r0
ffc0b0ac: 83 a1 00 0c lwz r29,12(r1)
ffc0b0b0: 83 c1 00 10 lwz r30,16(r1)
ffc0b0b4: 83 e1 00 14 lwz r31,20(r1)
ffc0b0b8: 38 21 00 18 addi r1,r1,24
ffc0b0bc: 4e 80 00 20 blr
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
ffc0b0c0: 3d 60 00 20 lis r11,32
ffc0b0c4: 39 20 20 00 li r9,8192
ffc0b0c8: 38 00 00 20 li r0,32
ffc0b0cc: 4b ff ff bc b ffc0b088 <_Objects_Set_name+0xc8>
ffc0bc80 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0bc80: 94 21 ff e8 stwu r1,-24(r1)
ffc0bc84: 7c 08 02 a6 mflr r0
/*
* 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) /
ffc0bc88: 39 20 00 00 li r9,0
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0bc8c: 90 01 00 1c stw r0,28(r1)
ffc0bc90: 93 c1 00 10 stw r30,16(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) /
ffc0bc94: 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 );
ffc0bc98: a3 c3 00 0a lhz r30,10(r3)
block_count = (information->maximum - index_base) /
ffc0bc9c: a1 63 00 14 lhz r11,20(r3)
ffc0bca0: 7d 5e 50 50 subf r10,r30,r10
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0bca4: 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) /
ffc0bca8: 7d 4a 5b 96 divwu r10,r10,r11
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
ffc0bcac: 93 81 00 08 stw r28,8(r1)
ffc0bcb0: 93 a1 00 0c stw r29,12(r1)
ffc0bcb4: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0bcb8: 7c 7f 1b 78 mr r31,r3
/*
* 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) /
ffc0bcbc: 38 0a 00 01 addi r0,r10,1
ffc0bcc0: 40 be 00 88 bne+ cr7,ffc0bd48 <_Objects_Shrink_information+0xc8><== ALWAYS TAKEN
ffc0bcc4: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0bcc8: 48 00 00 80 b ffc0bd48 <_Objects_Shrink_information+0xc8><== NOT EXECUTED
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
ffc0bccc: 81 5f 00 30 lwz r10,48(r31)
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0bcd0: 39 29 00 01 addi r9,r9,1
if ( information->inactive_per_block[ block ] ==
ffc0bcd4: 7d 4a e8 2e lwzx r10,r10,r29
ffc0bcd8: 7f 8a 58 00 cmpw cr7,r10,r11
ffc0bcdc: 40 be 00 68 bne+ cr7,ffc0bd44 <_Objects_Shrink_information+0xc4>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
ffc0bce0: 80 7f 00 20 lwz r3,32(r31)
do {
index = _Objects_Get_index( the_object->id );
ffc0bce4: 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;
ffc0bce8: 83 83 00 00 lwz r28,0(r3)
if ((index >= index_base) &&
ffc0bcec: 7f 80 f0 40 cmplw cr7,r0,r30
ffc0bcf0: 41 9c 00 18 blt- cr7,ffc0bd08 <_Objects_Shrink_information+0x88>
(index < (index_base + information->allocation_size))) {
ffc0bcf4: a1 3f 00 14 lhz r9,20(r31)
ffc0bcf8: 7d 3e 4a 14 add r9,r30,r9
ffc0bcfc: 7f 80 48 40 cmplw cr7,r0,r9
ffc0bd00: 40 bc 00 08 bge+ cr7,ffc0bd08 <_Objects_Shrink_information+0x88>
_Chain_Extract( &extract_me->Node );
ffc0bd04: 4b ff ed 6d bl ffc0aa70 <_Chain_Extract>
}
}
while ( the_object );
ffc0bd08: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0bd0c: 7f 83 e3 78 mr r3,r28
ffc0bd10: 40 9e ff d4 bne+ cr7,ffc0bce4 <_Objects_Shrink_information+0x64>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
ffc0bd14: 81 3f 00 34 lwz r9,52(r31)
ffc0bd18: 7c 69 e8 2e lwzx r3,r9,r29
ffc0bd1c: 48 00 20 35 bl ffc0dd50 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
ffc0bd20: a1 5f 00 2c lhz r10,44(r31)
ffc0bd24: a0 1f 00 14 lhz r0,20(r31)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
ffc0bd28: 81 3f 00 34 lwz r9,52(r31)
information->inactive_per_block[ block ] = 0;
ffc0bd2c: 81 7f 00 30 lwz r11,48(r31)
information->inactive -= information->allocation_size;
ffc0bd30: 7c 00 50 50 subf r0,r0,r10
ffc0bd34: b0 1f 00 2c sth r0,44(r31)
* 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;
ffc0bd38: 7f 8b e9 2e stwx r28,r11,r29
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
ffc0bd3c: 7f 89 e9 2e stwx r28,r9,r29
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
ffc0bd40: 48 00 00 14 b ffc0bd54 <_Objects_Shrink_information+0xd4>
}
index_base += information->allocation_size;
ffc0bd44: 7f de 5a 14 add r30,r30,r11
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
ffc0bd48: 34 00 ff ff addic. r0,r0,-1
ffc0bd4c: 55 3d 10 3a rlwinm r29,r9,2,0,29
ffc0bd50: 40 82 ff 7c bne+ ffc0bccc <_Objects_Shrink_information+0x4c>
return;
}
index_base += information->allocation_size;
}
}
ffc0bd54: 80 01 00 1c lwz r0,28(r1)
ffc0bd58: 83 81 00 08 lwz r28,8(r1)
ffc0bd5c: 7c 08 03 a6 mtlr r0
ffc0bd60: 83 a1 00 0c lwz r29,12(r1)
ffc0bd64: 83 c1 00 10 lwz r30,16(r1)
ffc0bd68: 83 e1 00 14 lwz r31,20(r1)
ffc0bd6c: 38 21 00 18 addi r1,r1,24
ffc0bd70: 4e 80 00 20 blr
ffc09afc <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
ffc09afc: 94 21 ff d0 stwu r1,-48(r1)
ffc09b00: 7c 08 02 a6 mflr r0
ffc09b04: 93 a1 00 24 stw r29,36(r1)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
ffc09b08: 3b a1 00 08 addi r29,r1,8
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
ffc09b0c: 93 e1 00 2c stw r31,44(r1)
ffc09b10: 7c 9f 23 78 mr r31,r4
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
ffc09b14: 7f a4 eb 78 mr r4,r29
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
ffc09b18: 93 c1 00 28 stw r30,40(r1)
ffc09b1c: 7c 7e 1b 78 mr r30,r3
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
ffc09b20: 7f e3 fb 78 mr r3,r31
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
ffc09b24: 93 61 00 1c stw r27,28(r1)
ffc09b28: 7c db 33 78 mr r27,r6
ffc09b2c: 93 81 00 20 stw r28,32(r1)
ffc09b30: 7c bc 2b 78 mr r28,r5
ffc09b34: 90 01 00 34 stw r0,52(r1)
ffc09b38: 93 41 00 18 stw r26,24(r1)
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
ffc09b3c: 48 00 02 3d bl ffc09d78 <_POSIX_Mutex_Get>
ffc09b40: 2f 83 00 00 cmpwi cr7,r3,0
ffc09b44: 41 9e 00 d8 beq- cr7,ffc09c1c <_POSIX_Condition_variables_Wait_support+0x120>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc09b48: 3d 20 00 00 lis r9,0
ffc09b4c: 81 69 27 ec lwz r11,10220(r9)
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
ffc09b50: 7f a4 eb 78 mr r4,r29
ffc09b54: 7f c3 f3 78 mr r3,r30
ffc09b58: 38 0b ff ff addi r0,r11,-1
ffc09b5c: 90 09 27 ec stw r0,10220(r9)
ffc09b60: 4b ff fc e9 bl ffc09848 <_POSIX_Condition_variables_Get>
ffc09b64: 7c 7a 1b 78 mr r26,r3
switch ( location ) {
ffc09b68: 80 01 00 08 lwz r0,8(r1)
ffc09b6c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09b70: 40 9e 00 ac bne- cr7,ffc09c1c <_POSIX_Condition_variables_Wait_support+0x120>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
ffc09b74: 80 03 00 14 lwz r0,20(r3)
ffc09b78: 2f 80 00 00 cmpwi cr7,r0,0
ffc09b7c: 41 9e 00 18 beq- cr7,ffc09b94 <_POSIX_Condition_variables_Wait_support+0x98>
ffc09b80: 81 3f 00 00 lwz r9,0(r31)
ffc09b84: 7f 80 48 00 cmpw cr7,r0,r9
ffc09b88: 41 9e 00 0c beq- cr7,ffc09b94 <_POSIX_Condition_variables_Wait_support+0x98>
_Thread_Enable_dispatch();
ffc09b8c: 48 00 3d 49 bl ffc0d8d4 <_Thread_Enable_dispatch>
ffc09b90: 48 00 00 8c b ffc09c1c <_POSIX_Condition_variables_Wait_support+0x120>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
ffc09b94: 7f e3 fb 78 mr r3,r31
ffc09b98: 48 00 04 99 bl ffc0a030 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
ffc09b9c: 2f 9b 00 00 cmpwi cr7,r27,0
ffc09ba0: 40 be 00 64 bne+ cr7,ffc09c04 <_POSIX_Condition_variables_Wait_support+0x108>
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
ffc09ba4: 3f a0 00 00 lis r29,0
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
ffc09ba8: 80 1f 00 00 lwz r0,0(r31)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
ffc09bac: 81 3d 28 2c lwz r9,10284(r29)
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;
ffc09bb0: 39 40 00 01 li r10,1
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
ffc09bb4: 90 1a 00 14 stw r0,20(r26)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
ffc09bb8: 38 1a 00 18 addi r0,r26,24
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
ffc09bbc: 3c a0 ff c1 lis r5,-63
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
ffc09bc0: 93 69 00 34 stw r27,52(r9)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
ffc09bc4: 7c 03 03 78 mr r3,r0
ffc09bc8: 7f 84 e3 78 mr r4,r28
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
ffc09bcc: 81 7e 00 00 lwz r11,0(r30)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
ffc09bd0: 38 a5 e3 50 addi r5,r5,-7344
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
ffc09bd4: 90 09 00 44 stw r0,68(r9)
_Thread_Executing->Wait.id = *cond;
ffc09bd8: 91 69 00 20 stw r11,32(r9)
ffc09bdc: 91 5a 00 48 stw r10,72(r26)
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
ffc09be0: 48 00 42 f5 bl ffc0ded4 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
ffc09be4: 48 00 3c f1 bl ffc0d8d4 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
ffc09be8: 81 3d 28 2c lwz r9,10284(r29)
ffc09bec: 83 c9 00 34 lwz r30,52(r9)
if ( status && status != ETIMEDOUT )
ffc09bf0: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09bf4: 41 be 00 18 beq+ cr7,ffc09c0c <_POSIX_Condition_variables_Wait_support+0x110>
ffc09bf8: 2f 9e 00 74 cmpwi cr7,r30,116
ffc09bfc: 40 be 00 24 bne+ cr7,ffc09c20 <_POSIX_Condition_variables_Wait_support+0x124><== NEVER TAKEN
ffc09c00: 48 00 00 0c b ffc09c0c <_POSIX_Condition_variables_Wait_support+0x110>
return status;
} else {
_Thread_Enable_dispatch();
ffc09c04: 48 00 3c d1 bl ffc0d8d4 <_Thread_Enable_dispatch>
ffc09c08: 3b c0 00 74 li r30,116
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
ffc09c0c: 7f e3 fb 78 mr r3,r31
ffc09c10: 48 00 03 69 bl ffc09f78 <pthread_mutex_lock>
if ( mutex_status )
ffc09c14: 2f 83 00 00 cmpwi cr7,r3,0
ffc09c18: 41 be 00 08 beq+ cr7,ffc09c20 <_POSIX_Condition_variables_Wait_support+0x124>
ffc09c1c: 3b c0 00 16 li r30,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
ffc09c20: 80 01 00 34 lwz r0,52(r1)
ffc09c24: 7f c3 f3 78 mr r3,r30
ffc09c28: 83 41 00 18 lwz r26,24(r1)
ffc09c2c: 7c 08 03 a6 mtlr r0
ffc09c30: 83 61 00 1c lwz r27,28(r1)
ffc09c34: 83 81 00 20 lwz r28,32(r1)
ffc09c38: 83 a1 00 24 lwz r29,36(r1)
ffc09c3c: 83 c1 00 28 lwz r30,40(r1)
ffc09c40: 83 e1 00 2c lwz r31,44(r1)
ffc09c44: 38 21 00 30 addi r1,r1,48
ffc09c48: 4e 80 00 20 blr
ffc0e014 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
ffc0e014: 94 21 ff c8 stwu r1,-56(r1)
ffc0e018: 7c 08 02 a6 mflr r0
ffc0e01c: 93 e1 00 34 stw r31,52(r1)
ffc0e020: 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(
ffc0e024: 3c 60 00 00 lis r3,0
ffc0e028: 93 81 00 28 stw r28,40(r1)
ffc0e02c: 38 63 36 64 addi r3,r3,13924
ffc0e030: 7c bc 2b 78 mr r28,r5
ffc0e034: 93 a1 00 2c stw r29,44(r1)
ffc0e038: 38 a1 00 08 addi r5,r1,8
ffc0e03c: 7c 9d 23 78 mr r29,r4
ffc0e040: 7f e4 fb 78 mr r4,r31
ffc0e044: 90 01 00 3c stw r0,60(r1)
ffc0e048: 93 61 00 24 stw r27,36(r1)
ffc0e04c: 7c fb 3b 78 mr r27,r7
ffc0e050: 93 c1 00 30 stw r30,48(r1)
ffc0e054: 7c de 33 78 mr r30,r6
ffc0e058: 91 01 00 18 stw r8,24(r1)
ffc0e05c: 48 00 3a d1 bl ffc11b2c <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
ffc0e060: 80 01 00 08 lwz r0,8(r1)
ffc0e064: 81 01 00 18 lwz r8,24(r1)
ffc0e068: 2f 80 00 00 cmpwi cr7,r0,0
ffc0e06c: 40 9e 00 bc bne- cr7,ffc0e128 <_POSIX_Message_queue_Receive_support+0x114>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
ffc0e070: 80 03 00 14 lwz r0,20(r3)
ffc0e074: 54 09 07 be clrlwi r9,r0,30
ffc0e078: 2f 89 00 01 cmpwi cr7,r9,1
ffc0e07c: 40 be 00 0c bne+ cr7,ffc0e088 <_POSIX_Message_queue_Receive_support+0x74>
_Thread_Enable_dispatch();
ffc0e080: 48 00 46 29 bl ffc126a8 <_Thread_Enable_dispatch>
ffc0e084: 48 00 00 a4 b ffc0e128 <_POSIX_Message_queue_Receive_support+0x114>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
ffc0e088: 80 63 00 10 lwz r3,16(r3)
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
ffc0e08c: 81 23 00 68 lwz r9,104(r3)
ffc0e090: 7f 9c 48 40 cmplw cr7,r28,r9
ffc0e094: 40 bc 00 14 bge+ cr7,ffc0e0a8 <_POSIX_Message_queue_Receive_support+0x94>
_Thread_Enable_dispatch();
ffc0e098: 48 00 46 11 bl ffc126a8 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
ffc0e09c: 48 00 d6 f5 bl ffc1b790 <__errno>
ffc0e0a0: 38 00 00 7a li r0,122
ffc0e0a4: 48 00 00 8c b ffc0e130 <_POSIX_Message_queue_Receive_support+0x11c>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
ffc0e0a8: 2f 9b 00 00 cmpwi cr7,r27,0
ffc0e0ac: 38 e0 00 00 li r7,0
ffc0e0b0: 41 9e 00 0c beq- cr7,ffc0e0bc <_POSIX_Message_queue_Receive_support+0xa8><== NEVER TAKEN
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
ffc0e0b4: 68 07 40 00 xori r7,r0,16384
ffc0e0b8: 54 e7 97 fe rlwinm r7,r7,18,31,31
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
ffc0e0bc: 38 00 ff ff li r0,-1
ffc0e0c0: 7c 26 0b 78 mr r6,r1
ffc0e0c4: 94 06 00 0c stwu r0,12(r6)
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
ffc0e0c8: 7f e4 fb 78 mr r4,r31
ffc0e0cc: 38 63 00 1c addi r3,r3,28
ffc0e0d0: 7f a5 eb 78 mr r5,r29
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
ffc0e0d4: 3f e0 00 00 lis r31,0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
ffc0e0d8: 48 00 27 51 bl ffc10828 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
ffc0e0dc: 48 00 45 cd bl ffc126a8 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
ffc0e0e0: 81 3f 2a 5c lwz r9,10844(r31)
if ( !_Thread_Executing->Wait.return_code )
ffc0e0e4: 80 09 00 34 lwz r0,52(r9)
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
ffc0e0e8: 81 29 00 24 lwz r9,36(r9)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
ffc0e0ec: 2f 80 00 00 cmpwi cr7,r0,0
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
ffc0e0f0: 7d 2b fe 70 srawi r11,r9,31
ffc0e0f4: 7d 60 4a 78 xor r0,r11,r9
ffc0e0f8: 7c 0b 00 50 subf r0,r11,r0
ffc0e0fc: 90 1e 00 00 stw r0,0(r30)
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
ffc0e100: 40 9e 00 0c bne- cr7,ffc0e10c <_POSIX_Message_queue_Receive_support+0xf8>
return length_out;
ffc0e104: 80 61 00 0c lwz r3,12(r1)
ffc0e108: 48 00 00 30 b ffc0e138 <_POSIX_Message_queue_Receive_support+0x124>
rtems_set_errno_and_return_minus_one(
ffc0e10c: 48 00 d6 85 bl ffc1b790 <__errno>
ffc0e110: 81 3f 2a 5c lwz r9,10844(r31)
ffc0e114: 7c 7e 1b 78 mr r30,r3
ffc0e118: 80 69 00 34 lwz r3,52(r9)
ffc0e11c: 48 00 03 29 bl ffc0e444 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
ffc0e120: 90 7e 00 00 stw r3,0(r30)
ffc0e124: 48 00 00 10 b ffc0e134 <_POSIX_Message_queue_Receive_support+0x120>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
ffc0e128: 48 00 d6 69 bl ffc1b790 <__errno>
ffc0e12c: 38 00 00 09 li r0,9
ffc0e130: 90 03 00 00 stw r0,0(r3)
ffc0e134: 38 60 ff ff li r3,-1
}
ffc0e138: 80 01 00 3c lwz r0,60(r1)
ffc0e13c: 83 61 00 24 lwz r27,36(r1)
ffc0e140: 7c 08 03 a6 mtlr r0
ffc0e144: 83 81 00 28 lwz r28,40(r1)
ffc0e148: 83 a1 00 2c lwz r29,44(r1)
ffc0e14c: 83 c1 00 30 lwz r30,48(r1)
ffc0e150: 83 e1 00 34 lwz r31,52(r1)
ffc0e154: 38 21 00 38 addi r1,r1,56
ffc0e158: 4e 80 00 20 blr
ffc0f584 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
ffc0f584: 7c 08 02 a6 mflr r0
ffc0f588: 94 21 ff f8 stwu r1,-8(r1)
ffc0f58c: 90 01 00 0c stw r0,12(r1)
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0f590: 81 23 01 48 lwz r9,328(r3)
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc0f594: 80 09 00 d4 lwz r0,212(r9)
ffc0f598: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f59c: 40 9e 00 38 bne- cr7,ffc0f5d4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
ffc0f5a0: 80 09 00 d8 lwz r0,216(r9)
ffc0f5a4: 2f 80 00 01 cmpwi cr7,r0,1
ffc0f5a8: 40 be 00 2c bne+ cr7,ffc0f5d4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50>
thread_support->cancelation_requested ) {
ffc0f5ac: 80 09 00 dc lwz r0,220(r9)
ffc0f5b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0f5b4: 41 be 00 20 beq+ cr7,ffc0f5d4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0f5b8: 3d 20 00 00 lis r9,0
ffc0f5bc: 81 69 27 c0 lwz r11,10176(r9)
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
ffc0f5c0: 38 80 ff ff li r4,-1
ffc0f5c4: 38 0b ff ff addi r0,r11,-1
ffc0f5c8: 90 09 27 c0 stw r0,10176(r9)
ffc0f5cc: 48 00 08 59 bl ffc0fe24 <_POSIX_Thread_Exit>
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc0f5d0: 48 00 00 08 b ffc0f5d8 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54>
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();
ffc0f5d4: 4b ff be c9 bl ffc0b49c <_Thread_Enable_dispatch>
}
ffc0f5d8: 80 01 00 0c lwz r0,12(r1)
ffc0f5dc: 38 21 00 08 addi r1,r1,8
ffc0f5e0: 7c 08 03 a6 mtlr r0
ffc0f5e4: 4e 80 00 20 blr
ffc10ce4 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
ffc10ce4: 94 21 ff e8 stwu r1,-24(r1)
ffc10ce8: 7c 08 02 a6 mflr r0
ffc10cec: 93 c1 00 10 stw r30,16(r1)
ffc10cf0: 7c 7e 1b 78 mr r30,r3
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
ffc10cf4: 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
)
{
ffc10cf8: 93 81 00 08 stw r28,8(r1)
ffc10cfc: 7c dc 33 78 mr r28,r6
ffc10d00: 93 a1 00 0c stw r29,12(r1)
ffc10d04: 7c bd 2b 78 mr r29,r5
ffc10d08: 93 e1 00 14 stw r31,20(r1)
ffc10d0c: 7c 9f 23 78 mr r31,r4
ffc10d10: 90 01 00 1c stw r0,28(r1)
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
ffc10d14: 4b ff ff ad bl ffc10cc0 <_POSIX_Priority_Is_valid>
ffc10d18: 2f 83 00 00 cmpwi cr7,r3,0
ffc10d1c: 41 9e 00 c4 beq- cr7,ffc10de0 <_POSIX_Thread_Translate_sched_param+0xfc><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
ffc10d20: 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;
ffc10d24: 38 00 00 00 li r0,0
ffc10d28: 90 1d 00 00 stw r0,0(r29)
*budget_callout = NULL;
ffc10d2c: 90 1c 00 00 stw r0,0(r28)
if ( policy == SCHED_OTHER ) {
ffc10d30: 40 be 00 0c bne+ cr7,ffc10d3c <_POSIX_Thread_Translate_sched_param+0x58>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
ffc10d34: 38 00 00 01 li r0,1
ffc10d38: 48 00 00 0c b ffc10d44 <_POSIX_Thread_Translate_sched_param+0x60>
return 0;
}
if ( policy == SCHED_FIFO ) {
ffc10d3c: 2f 9e 00 01 cmpwi cr7,r30,1
ffc10d40: 40 be 00 0c bne+ cr7,ffc10d4c <_POSIX_Thread_Translate_sched_param+0x68>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc10d44: 90 1d 00 00 stw r0,0(r29)
ffc10d48: 48 00 00 10 b ffc10d58 <_POSIX_Thread_Translate_sched_param+0x74>
return 0;
}
if ( policy == SCHED_RR ) {
ffc10d4c: 2f 9e 00 02 cmpwi cr7,r30,2
ffc10d50: 40 be 00 10 bne+ cr7,ffc10d60 <_POSIX_Thread_Translate_sched_param+0x7c>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
ffc10d54: 93 dd 00 00 stw r30,0(r29)
ffc10d58: 38 60 00 00 li r3,0
return 0;
ffc10d5c: 48 00 00 88 b ffc10de4 <_POSIX_Thread_Translate_sched_param+0x100>
}
if ( policy == SCHED_SPORADIC ) {
ffc10d60: 2f 9e 00 04 cmpwi cr7,r30,4
ffc10d64: 40 be 00 7c bne+ cr7,ffc10de0 <_POSIX_Thread_Translate_sched_param+0xfc>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
ffc10d68: 80 1f 00 08 lwz r0,8(r31)
ffc10d6c: 2f 80 00 00 cmpwi cr7,r0,0
ffc10d70: 40 9e 00 10 bne- cr7,ffc10d80 <_POSIX_Thread_Translate_sched_param+0x9c>
(param->sched_ss_repl_period.tv_nsec == 0) )
ffc10d74: 80 1f 00 0c lwz r0,12(r31)
ffc10d78: 2f 80 00 00 cmpwi cr7,r0,0
ffc10d7c: 41 9e 00 64 beq- cr7,ffc10de0 <_POSIX_Thread_Translate_sched_param+0xfc>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
ffc10d80: 80 1f 00 10 lwz r0,16(r31)
ffc10d84: 2f 80 00 00 cmpwi cr7,r0,0
ffc10d88: 40 9e 00 10 bne- cr7,ffc10d98 <_POSIX_Thread_Translate_sched_param+0xb4>
(param->sched_ss_init_budget.tv_nsec == 0) )
ffc10d8c: 80 1f 00 14 lwz r0,20(r31)
ffc10d90: 2f 80 00 00 cmpwi cr7,r0,0
ffc10d94: 41 9e 00 4c beq- cr7,ffc10de0 <_POSIX_Thread_Translate_sched_param+0xfc>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
ffc10d98: 38 7f 00 08 addi r3,r31,8
ffc10d9c: 4b ff c8 8d bl ffc0d628 <_Timespec_To_ticks>
ffc10da0: 7c 7e 1b 78 mr r30,r3
ffc10da4: 38 7f 00 10 addi r3,r31,16
ffc10da8: 4b ff c8 81 bl ffc0d628 <_Timespec_To_ticks>
ffc10dac: 7f 9e 18 40 cmplw cr7,r30,r3
ffc10db0: 41 9c 00 30 blt- cr7,ffc10de0 <_POSIX_Thread_Translate_sched_param+0xfc>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
ffc10db4: 80 7f 00 04 lwz r3,4(r31)
ffc10db8: 4b ff ff 09 bl ffc10cc0 <_POSIX_Priority_Is_valid>
ffc10dbc: 2f 83 00 00 cmpwi cr7,r3,0
ffc10dc0: 41 9e 00 20 beq- cr7,ffc10de0 <_POSIX_Thread_Translate_sched_param+0xfc>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
ffc10dc4: 38 00 00 03 li r0,3
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
ffc10dc8: 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;
ffc10dcc: 90 1d 00 00 stw r0,0(r29)
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
ffc10dd0: 38 09 91 50 addi r0,r9,-28336
ffc10dd4: 38 60 00 00 li r3,0
ffc10dd8: 90 1c 00 00 stw r0,0(r28)
return 0;
ffc10ddc: 48 00 00 08 b ffc10de4 <_POSIX_Thread_Translate_sched_param+0x100>
ffc10de0: 38 60 00 16 li r3,22
}
return EINVAL;
}
ffc10de4: 80 01 00 1c lwz r0,28(r1)
ffc10de8: 83 81 00 08 lwz r28,8(r1)
ffc10dec: 7c 08 03 a6 mtlr r0
ffc10df0: 83 a1 00 0c lwz r29,12(r1)
ffc10df4: 83 c1 00 10 lwz r30,16(r1)
ffc10df8: 83 e1 00 14 lwz r31,20(r1)
ffc10dfc: 38 21 00 18 addi r1,r1,24
ffc10e00: 4e 80 00 20 blr
ffc08dc0 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc08dc0: 94 21 ff a0 stwu r1,-96(r1)
ffc08dc4: 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;
ffc08dc8: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc08dcc: 90 01 00 64 stw r0,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;
ffc08dd0: 39 29 20 84 addi r9,r9,8324
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc08dd4: 93 c1 00 58 stw r30,88(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;
ffc08dd8: 83 c9 00 34 lwz r30,52(r9)
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc08ddc: 93 81 00 50 stw r28,80(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 )
ffc08de0: 2f 9e 00 00 cmpwi cr7,r30,0
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
ffc08de4: 93 61 00 4c stw r27,76(r1)
ffc08de8: 93 a1 00 54 stw r29,84(r1)
ffc08dec: 93 e1 00 5c stw r31,92(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;
ffc08df0: 83 89 00 30 lwz r28,48(r9)
if ( !user_threads || maximum == 0 )
ffc08df4: 41 9e 00 70 beq- cr7,ffc08e64 <_POSIX_Threads_Initialize_user_threads_body+0xa4><== NEVER TAKEN
ffc08df8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc08dfc: 41 9e 00 68 beq- cr7,ffc08e64 <_POSIX_Threads_Initialize_user_threads_body+0xa4><== NEVER TAKEN
ffc08e00: 3b a0 00 00 li r29,0
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
ffc08e04: 3b e1 00 0c addi r31,r1,12
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
status = pthread_create(
ffc08e08: 3b 61 00 08 addi r27,r1,8
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
ffc08e0c: 7f e3 fb 78 mr r3,r31
ffc08e10: 48 00 7f f5 bl ffc10e04 <pthread_attr_init>
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
ffc08e14: 38 80 00 02 li r4,2
ffc08e18: 7f e3 fb 78 mr r3,r31
ffc08e1c: 48 00 80 29 bl ffc10e44 <pthread_attr_setinheritsched>
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
ffc08e20: 80 9e 00 04 lwz r4,4(r30)
ffc08e24: 7f e3 fb 78 mr r3,r31
ffc08e28: 48 00 80 55 bl ffc10e7c <pthread_attr_setstacksize>
status = pthread_create(
ffc08e2c: 80 be 00 00 lwz r5,0(r30)
ffc08e30: 7f 63 db 78 mr r3,r27
ffc08e34: 7f e4 fb 78 mr r4,r31
ffc08e38: 38 c0 00 00 li r6,0
ffc08e3c: 4b ff fb c5 bl ffc08a00 <pthread_create>
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
ffc08e40: 7c 65 1b 79 mr. r5,r3
ffc08e44: 41 a2 00 10 beq+ ffc08e54 <_POSIX_Threads_Initialize_user_threads_body+0x94>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
ffc08e48: 38 60 00 02 li r3,2
ffc08e4c: 38 80 00 01 li r4,1
ffc08e50: 48 00 25 55 bl ffc0b3a4 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
ffc08e54: 3b bd 00 01 addi r29,r29,1
ffc08e58: 7f 9d e0 40 cmplw cr7,r29,r28
ffc08e5c: 3b de 00 08 addi r30,r30,8
ffc08e60: 41 9c ff ac blt+ cr7,ffc08e0c <_POSIX_Threads_Initialize_user_threads_body+0x4c><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
ffc08e64: 80 01 00 64 lwz r0,100(r1)
ffc08e68: 83 61 00 4c lwz r27,76(r1)
ffc08e6c: 7c 08 03 a6 mtlr r0
ffc08e70: 83 81 00 50 lwz r28,80(r1)
ffc08e74: 83 a1 00 54 lwz r29,84(r1)
ffc08e78: 83 c1 00 58 lwz r30,88(r1)
ffc08e7c: 83 e1 00 5c lwz r31,92(r1)
ffc08e80: 38 21 00 60 addi r1,r1,96
ffc08e84: 4e 80 00 20 blr
ffc140fc <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
ffc140fc: 94 21 ff f0 stwu r1,-16(r1)
ffc14100: 7c 08 02 a6 mflr r0
ffc14104: 90 01 00 14 stw r0,20(r1)
ffc14108: 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 ];
ffc1410c: 83 e4 01 48 lwz r31,328(r4)
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
ffc14110: 93 c1 00 08 stw r30,8(r1)
ffc14114: 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 );
ffc14118: 38 7f 00 94 addi r3,r31,148
ffc1411c: 48 00 19 81 bl ffc15a9c <_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 ) {
ffc14120: 80 1e 00 1c lwz r0,28(r30)
ffc14124: 3d 20 00 00 lis r9,0
ffc14128: 2f 80 00 00 cmpwi cr7,r0,0
ffc1412c: 88 89 26 e4 lbz r4,9956(r9)
ffc14130: 80 1f 00 84 lwz r0,132(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;
ffc14134: 90 7e 00 78 stw r3,120(r30)
ffc14138: 7c 80 20 50 subf r4,r0,r4
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
ffc1413c: 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 ) {
ffc14140: 40 9e 00 1c bne- cr7,ffc1415c <_POSIX_Threads_Sporadic_budget_TSR+0x60><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
ffc14144: 80 1e 00 14 lwz r0,20(r30)
ffc14148: 7f 80 20 40 cmplw cr7,r0,r4
ffc1414c: 40 bd 00 10 ble+ cr7,ffc1415c <_POSIX_Threads_Sporadic_budget_TSR+0x60>
_Thread_Change_priority( the_thread, new_priority, true );
ffc14150: 7f c3 f3 78 mr r3,r30
ffc14154: 38 a0 00 01 li r5,1
ffc14158: 4b ff 7e 29 bl ffc0bf80 <_Thread_Change_priority>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
ffc1415c: 38 7f 00 8c addi r3,r31,140
ffc14160: 48 00 19 3d bl ffc15a9c <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc14164: 38 9f 00 a4 addi r4,r31,164
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc14168: 90 7f 00 b0 stw r3,176(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc1416c: 3c 60 00 00 lis r3,0
ffc14170: 38 63 2e 08 addi r3,r3,11784
ffc14174: 4b ff 99 5d bl ffc0dad0 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
ffc14178: 80 01 00 14 lwz r0,20(r1)
ffc1417c: 83 c1 00 08 lwz r30,8(r1)
ffc14180: 7c 08 03 a6 mtlr r0
ffc14184: 83 e1 00 0c lwz r31,12(r1)
ffc14188: 38 21 00 10 addi r1,r1,16
ffc1418c: 4e 80 00 20 blr
ffc140a0 <_POSIX_Threads_Sporadic_budget_callout>:
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
ffc140a0: 7c 08 02 a6 mflr r0
ffc140a4: 94 21 ff f8 stwu r1,-8(r1)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
ffc140a8: 3d 40 00 00 lis r10,0
ffc140ac: 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 ) {
ffc140b0: 80 03 00 1c lwz r0,28(r3)
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc140b4: 81 63 01 48 lwz r11,328(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 ) {
ffc140b8: 2f 80 00 00 cmpwi cr7,r0,0
ffc140bc: 88 8a 26 e4 lbz r4,9956(r10)
ffc140c0: 80 0b 00 88 lwz r0,136(r11)
ffc140c4: 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 */
ffc140c8: 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;
ffc140cc: 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 */
ffc140d0: 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 ) {
ffc140d4: 40 9e 00 18 bne- cr7,ffc140ec <_POSIX_Threads_Sporadic_budget_callout+0x4c><== 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 ) {
ffc140d8: 80 03 00 14 lwz r0,20(r3)
ffc140dc: 7f 80 20 40 cmplw cr7,r0,r4
ffc140e0: 40 bc 00 0c bge+ cr7,ffc140ec <_POSIX_Threads_Sporadic_budget_callout+0x4c><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
ffc140e4: 38 a0 00 01 li r5,1
ffc140e8: 4b ff 7e 99 bl ffc0bf80 <_Thread_Change_priority>
#if 0
printk( "lower priority\n" );
#endif
}
}
}
ffc140ec: 80 01 00 0c lwz r0,12(r1)
ffc140f0: 38 21 00 08 addi r1,r1,8
ffc140f4: 7c 08 03 a6 mtlr r0
ffc140f8: 4e 80 00 20 blr
ffc08a80 <_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)
{
ffc08a80: 94 21 ff f0 stwu r1,-16(r1)
ffc08a84: 7c 08 02 a6 mflr r0
ffc08a88: 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 ) ||
ffc08a8c: 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;
ffc08a90: 81 24 00 68 lwz r9,104(r4)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
ffc08a94: 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)
{
ffc08a98: 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;
ffc08a9c: 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)
{
ffc08aa0: 7c 9f 23 78 mr r31,r4
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
ffc08aa4: 90 04 00 68 stw r0,104(r4)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
ffc08aa8: 40 9e 00 10 bne- cr7,ffc08ab8 <_POSIX_Timer_TSR+0x38>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
ffc08aac: 80 04 00 58 lwz r0,88(r4)
ffc08ab0: 2f 80 00 00 cmpwi cr7,r0,0
ffc08ab4: 41 9e 00 38 beq- cr7,ffc08aec <_POSIX_Timer_TSR+0x6c> <== NEVER TAKEN
activated = _POSIX_Timer_Insert_helper(
ffc08ab8: 80 9f 00 64 lwz r4,100(r31)
ffc08abc: 3c c0 ff c1 lis r6,-63
ffc08ac0: 80 bf 00 08 lwz r5,8(r31)
ffc08ac4: 38 c6 8a 80 addi r6,r6,-30080
ffc08ac8: 38 7f 00 10 addi r3,r31,16
ffc08acc: 7f e7 fb 78 mr r7,r31
ffc08ad0: 48 00 7e 71 bl ffc10940 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
ffc08ad4: 2f 83 00 00 cmpwi cr7,r3,0
ffc08ad8: 41 be 00 30 beq+ cr7,ffc08b08 <_POSIX_Timer_TSR+0x88> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
ffc08adc: 38 7f 00 6c addi r3,r31,108
ffc08ae0: 48 00 1b a1 bl ffc0a680 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
ffc08ae4: 38 00 00 03 li r0,3
ffc08ae8: 48 00 00 08 b ffc08af0 <_POSIX_Timer_TSR+0x70>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
ffc08aec: 38 00 00 04 li r0,4 <== NOT EXECUTED
ffc08af0: 98 1f 00 3c stb r0,60(r31)
/*
* 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 ) ) {
ffc08af4: 80 7f 00 38 lwz r3,56(r31)
ffc08af8: 80 9f 00 44 lwz r4,68(r31)
ffc08afc: 48 00 78 b9 bl ffc103b4 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
ffc08b00: 38 00 00 00 li r0,0
ffc08b04: 90 1f 00 68 stw r0,104(r31)
}
ffc08b08: 80 01 00 14 lwz r0,20(r1)
ffc08b0c: 83 e1 00 0c lwz r31,12(r1)
ffc08b10: 38 21 00 10 addi r1,r1,16
ffc08b14: 7c 08 03 a6 mtlr r0
ffc08b18: 4e 80 00 20 blr
ffc17ae4 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc17ae4: 94 21 ff d8 stwu r1,-40(r1)
ffc17ae8: 7c 08 02 a6 mflr r0
ffc17aec: 7c a6 2b 78 mr r6,r5
ffc17af0: 93 a1 00 1c stw r29,28(r1)
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
ffc17af4: 3b a1 00 08 addi r29,r1,8
ffc17af8: 7f a5 eb 78 mr r5,r29
ffc17afc: 38 e0 00 01 li r7,1
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
ffc17b00: 93 c1 00 20 stw r30,32(r1)
ffc17b04: 7c 9e 23 78 mr r30,r4
ffc17b08: 93 e1 00 24 stw r31,36(r1)
ffc17b0c: 7c 7f 1b 78 mr r31,r3
ffc17b10: 90 01 00 2c stw r0,44(r1)
ffc17b14: 93 81 00 18 stw r28,24(r1)
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
ffc17b18: 48 00 00 9d bl ffc17bb4 <_POSIX_signals_Clear_signals>
ffc17b1c: 2f 83 00 00 cmpwi cr7,r3,0
ffc17b20: 41 9e 00 70 beq- cr7,ffc17b90 <_POSIX_signals_Check_signal+0xac>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
ffc17b24: 1d 7e 00 0c mulli r11,r30,12
ffc17b28: 3d 40 00 00 lis r10,0
ffc17b2c: 39 4a 32 30 addi r10,r10,12848
ffc17b30: 7d 2a 5a 14 add r9,r10,r11
ffc17b34: 80 09 00 08 lwz r0,8(r9)
ffc17b38: 2f 80 00 01 cmpwi cr7,r0,1
ffc17b3c: 41 9e 00 54 beq- cr7,ffc17b90 <_POSIX_signals_Check_signal+0xac><== NEVER TAKEN
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
ffc17b40: 7d 6a 58 2e lwzx r11,r10,r11
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
ffc17b44: 81 29 00 04 lwz r9,4(r9)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
ffc17b48: 2f 8b 00 02 cmpwi cr7,r11,2
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
ffc17b4c: 83 9f 00 cc lwz r28,204(r31)
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
ffc17b50: 7d 29 e3 78 or r9,r9,r28
ffc17b54: 91 3f 00 cc stw r9,204(r31)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
ffc17b58: 40 be 00 1c bne+ cr7,ffc17b74 <_POSIX_signals_Check_signal+0x90>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
ffc17b5c: 7f c3 f3 78 mr r3,r30
ffc17b60: 7c 09 03 a6 mtctr r0
ffc17b64: 7f a4 eb 78 mr r4,r29
ffc17b68: 38 a0 00 00 li r5,0
ffc17b6c: 4e 80 04 21 bctrl
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
ffc17b70: 48 00 00 14 b ffc17b84 <_POSIX_signals_Check_signal+0xa0>
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
ffc17b74: 7f c3 f3 78 mr r3,r30
ffc17b78: 7c 09 03 a6 mtctr r0
ffc17b7c: 4c c6 31 82 crclr 4*cr1+eq
ffc17b80: 4e 80 04 21 bctrl
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
ffc17b84: 93 9f 00 cc stw r28,204(r31)
ffc17b88: 38 60 00 01 li r3,1
return true;
ffc17b8c: 48 00 00 08 b ffc17b94 <_POSIX_signals_Check_signal+0xb0>
ffc17b90: 38 60 00 00 li r3,0
}
ffc17b94: 80 01 00 2c lwz r0,44(r1)
ffc17b98: 83 81 00 18 lwz r28,24(r1)
ffc17b9c: 7c 08 03 a6 mtlr r0
ffc17ba0: 83 a1 00 1c lwz r29,28(r1)
ffc17ba4: 83 c1 00 20 lwz r30,32(r1)
ffc17ba8: 83 e1 00 24 lwz r31,36(r1)
ffc17bac: 38 21 00 28 addi r1,r1,40
ffc17bb0: 4e 80 00 20 blr
ffc18428 <_POSIX_signals_Clear_process_signals>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc18428: 7d 60 00 a6 mfmsr r11
ffc1842c: 7c 10 42 a6 mfsprg r0,0
ffc18430: 7d 60 00 78 andc r0,r11,r0
ffc18434: 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 ) {
ffc18438: 3d 20 00 00 lis r9,0
ffc1843c: 1c 03 00 0c mulli r0,r3,12
ffc18440: 39 29 32 30 addi r9,r9,12848
ffc18444: 7d 29 00 2e lwzx r9,r9,r0
ffc18448: 2f 89 00 02 cmpwi cr7,r9,2
ffc1844c: 40 be 00 20 bne+ cr7,ffc1846c <_POSIX_signals_Clear_process_signals+0x44>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
ffc18450: 3d 20 00 00 lis r9,0
ffc18454: 39 29 34 24 addi r9,r9,13348
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc18458: 7d 49 00 2e lwzx r10,r9,r0
ffc1845c: 7d 29 02 14 add r9,r9,r0
ffc18460: 38 09 00 04 addi r0,r9,4
ffc18464: 7f 8a 00 00 cmpw cr7,r10,r0
ffc18468: 40 be 00 38 bne+ cr7,ffc184a0 <_POSIX_signals_Clear_process_signals+0x78><== NEVER TAKEN
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
ffc1846c: 3d 20 00 00 lis r9,0
ffc18470: 80 09 28 20 lwz r0,10272(r9)
ffc18474: 38 63 ff ff addi r3,r3,-1
ffc18478: 39 40 ff fe li r10,-2
ffc1847c: 5d 43 18 3e rotlw r3,r10,r3
ffc18480: 7c 63 00 38 and r3,r3,r0
if ( !_POSIX_signals_Pending )
ffc18484: 2f 83 00 00 cmpwi cr7,r3,0
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
ffc18488: 90 69 28 20 stw r3,10272(r9)
if ( !_POSIX_signals_Pending )
ffc1848c: 40 9e 00 14 bne- cr7,ffc184a0 <_POSIX_signals_Clear_process_signals+0x78><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
ffc18490: 3d 20 00 00 lis r9,0
ffc18494: 81 49 27 e0 lwz r10,10208(r9)
ffc18498: 38 0a ff ff addi r0,r10,-1
ffc1849c: 90 09 27 e0 stw r0,10208(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc184a0: 7d 60 01 24 mtmsr r11
}
_ISR_Enable( level );
}
ffc184a4: 4e 80 00 20 blr
ffc09700 <_POSIX_signals_Get_highest>:
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc09700: 39 40 00 05 li r10,5
ffc09704: 7d 49 03 a6 mtctr r10
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
ffc09708: 39 20 00 1b li r9,27
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc0970c: 38 00 00 01 li r0,1
ffc09710: 39 69 ff ff addi r11,r9,-1
ffc09714: 7c 0b 58 30 slw r11,r0,r11
ffc09718: 7d 6a 18 39 and. r10,r11,r3
ffc0971c: 40 82 00 34 bne- ffc09750 <_POSIX_signals_Get_highest+0x50><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc09720: 39 29 00 01 addi r9,r9,1
ffc09724: 42 00 ff ec bdnz+ ffc09710 <_POSIX_signals_Get_highest+0x10>
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc09728: 39 60 00 1a li r11,26
ffc0972c: 7d 69 03 a6 mtctr r11
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc09730: 39 20 00 01 li r9,1
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
ffc09734: 38 00 00 01 li r0,1
ffc09738: 39 69 ff ff addi r11,r9,-1
ffc0973c: 7c 0b 58 30 slw r11,r0,r11
ffc09740: 7d 6a 18 39 and. r10,r11,r3
ffc09744: 40 82 00 0c bne- ffc09750 <_POSIX_signals_Get_highest+0x50>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
ffc09748: 39 29 00 01 addi r9,r9,1
ffc0974c: 42 00 ff ec bdnz+ ffc09738 <_POSIX_signals_Get_highest+0x38>
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
ffc09750: 7d 23 4b 78 mr r3,r9
ffc09754: 4e 80 00 20 blr
ffc13ca0 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
ffc13ca0: 94 21 ff e8 stwu r1,-24(r1)
ffc13ca4: 7c 08 02 a6 mflr r0
ffc13ca8: 90 01 00 1c stw r0,28(r1)
ffc13cac: 93 e1 00 14 stw r31,20(r1)
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc13cb0: 83 e3 01 48 lwz r31,328(r3)
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
ffc13cb4: 93 a1 00 0c stw r29,12(r1)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
ffc13cb8: 2f 9f 00 00 cmpwi cr7,r31,0
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
ffc13cbc: 93 c1 00 10 stw r30,16(r1)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
ffc13cc0: 41 9e 00 a4 beq- cr7,ffc13d64 <_POSIX_signals_Post_switch_extension+0xc4><== NEVER TAKEN
* 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 &
ffc13cc4: 3f a0 00 00 lis r29,0
ffc13cc8: 3b bd 28 20 addi r29,r29,10272
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc13ccc: 7c 00 00 a6 mfmsr r0
ffc13cd0: 7d 30 42 a6 mfsprg r9,0
ffc13cd4: 7c 09 48 78 andc r9,r0,r9
ffc13cd8: 7d 20 01 24 mtmsr r9
(api->signals_pending | _POSIX_signals_Pending)) ) {
ffc13cdc: 81 5d 00 00 lwz r10,0(r29)
ffc13ce0: 81 3f 00 d0 lwz r9,208(r31)
* 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 &
ffc13ce4: 81 7f 00 cc lwz r11,204(r31)
(api->signals_pending | _POSIX_signals_Pending)) ) {
ffc13ce8: 7d 49 4b 78 or r9,r10,r9
* 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 &
ffc13cec: 7d 2a 58 79 andc. r10,r9,r11
ffc13cf0: 40 a2 00 0c bne+ ffc13cfc <_POSIX_signals_Post_switch_extension+0x5c>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc13cf4: 7c 00 01 24 mtmsr r0
ffc13cf8: 48 00 00 6c b ffc13d64 <_POSIX_signals_Post_switch_extension+0xc4>
ffc13cfc: 7c 00 01 24 mtmsr r0
ffc13d00: 3b c0 00 1b li r30,27
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
ffc13d04: 7f c4 f3 78 mr r4,r30
ffc13d08: 38 a0 00 00 li r5,0
ffc13d0c: 7f e3 fb 78 mr r3,r31
ffc13d10: 48 00 3d d5 bl ffc17ae4 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
ffc13d14: 7f c4 f3 78 mr r4,r30
ffc13d18: 7f e3 fb 78 mr r3,r31
ffc13d1c: 38 a0 00 01 li r5,1
ffc13d20: 48 00 3d c5 bl ffc17ae4 <_POSIX_signals_Check_signal>
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
ffc13d24: 2f 9e 00 1f cmpwi cr7,r30,31
ffc13d28: 3b de 00 01 addi r30,r30,1
ffc13d2c: 40 9e ff d8 bne+ cr7,ffc13d04 <_POSIX_signals_Post_switch_extension+0x64>
ffc13d30: 3b c0 00 01 li r30,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 );
ffc13d34: 7f c4 f3 78 mr r4,r30
ffc13d38: 38 a0 00 00 li r5,0
ffc13d3c: 7f e3 fb 78 mr r3,r31
ffc13d40: 48 00 3d a5 bl ffc17ae4 <_POSIX_signals_Check_signal>
_POSIX_signals_Check_signal( api, signo, true );
ffc13d44: 7f c4 f3 78 mr r4,r30
ffc13d48: 7f e3 fb 78 mr r3,r31
ffc13d4c: 38 a0 00 01 li r5,1
ffc13d50: 48 00 3d 95 bl ffc17ae4 <_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++ ) {
ffc13d54: 2f 9e 00 1a cmpwi cr7,r30,26
ffc13d58: 3b de 00 01 addi r30,r30,1
ffc13d5c: 40 9e ff d8 bne+ cr7,ffc13d34 <_POSIX_signals_Post_switch_extension+0x94>
ffc13d60: 4b ff ff 6c b ffc13ccc <_POSIX_signals_Post_switch_extension+0x2c>
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
}
ffc13d64: 80 01 00 1c lwz r0,28(r1)
ffc13d68: 83 a1 00 0c lwz r29,12(r1)
ffc13d6c: 7c 08 03 a6 mtlr r0
ffc13d70: 83 c1 00 10 lwz r30,16(r1)
ffc13d74: 83 e1 00 14 lwz r31,20(r1)
ffc13d78: 38 21 00 18 addi r1,r1,24
ffc13d7c: 4e 80 00 20 blr
ffc17d4c <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc17d4c: 94 21 ff f0 stwu r1,-16(r1)
ffc17d50: 7c 08 02 a6 mflr r0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
ffc17d54: 3d 20 10 00 lis r9,4096
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc17d58: 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 ) ) {
ffc17d5c: 61 29 80 00 ori r9,r9,32768
ffc17d60: 80 03 00 10 lwz r0,16(r3)
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
ffc17d64: 93 e1 00 0c stw r31,12(r1)
ffc17d68: 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 ) ) {
ffc17d6c: 7d 2b 00 38 and r11,r9,r0
ffc17d70: 7f 8b 48 00 cmpw cr7,r11,r9
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc17d74: 81 43 01 48 lwz r10,328(r3)
ffc17d78: 39 64 ff ff addi r11,r4,-1
ffc17d7c: 39 20 00 01 li r9,1
ffc17d80: 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 ) ) {
ffc17d84: 40 be 00 68 bne+ cr7,ffc17dec <_POSIX_signals_Unblock_thread+0xa0>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
ffc17d88: 80 03 00 30 lwz r0,48(r3)
ffc17d8c: 7d 68 00 39 and. r8,r11,r0
ffc17d90: 40 82 00 10 bne- ffc17da0 <_POSIX_signals_Unblock_thread+0x54>
ffc17d94: 80 0a 00 cc lwz r0,204(r10)
ffc17d98: 7d 69 00 79 andc. r9,r11,r0
ffc17d9c: 41 82 00 d0 beq- ffc17e6c <_POSIX_signals_Unblock_thread+0x120>
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
ffc17da0: 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;
ffc17da4: 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;
ffc17da8: 38 00 00 04 li r0,4
ffc17dac: 90 1f 00 34 stw r0,52(r31)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
ffc17db0: 40 be 00 14 bne+ cr7,ffc17dc4 <_POSIX_signals_Unblock_thread+0x78>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
ffc17db4: 90 a9 00 08 stw r5,8(r9)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
ffc17db8: 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;
ffc17dbc: 90 89 00 00 stw r4,0(r9)
ffc17dc0: 48 00 00 18 b ffc17dd8 <_POSIX_signals_Unblock_thread+0x8c>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
ffc17dc4: 81 45 00 08 lwz r10,8(r5)
ffc17dc8: 81 65 00 00 lwz r11,0(r5)
ffc17dcc: 80 05 00 04 lwz r0,4(r5)
ffc17dd0: 91 49 00 08 stw r10,8(r9)
ffc17dd4: 91 69 00 00 stw r11,0(r9)
ffc17dd8: 90 09 00 04 stw r0,4(r9)
}
_Thread_queue_Extract_with_proxy( the_thread );
ffc17ddc: 7f e3 fb 78 mr r3,r31
ffc17de0: 4b ff 50 ad bl ffc0ce8c <_Thread_queue_Extract_with_proxy>
ffc17de4: 38 60 00 01 li r3,1
return true;
ffc17de8: 48 00 00 88 b ffc17e70 <_POSIX_signals_Unblock_thread+0x124>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
ffc17dec: 81 4a 00 cc lwz r10,204(r10)
ffc17df0: 7d 68 50 79 andc. r8,r11,r10
ffc17df4: 41 82 00 78 beq- ffc17e6c <_POSIX_signals_Unblock_thread+0x120>
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
ffc17df8: 74 0b 10 00 andis. r11,r0,4096
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
ffc17dfc: 99 23 00 74 stb r9,116(r3)
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
ffc17e00: 41 82 00 3c beq- ffc17e3c <_POSIX_signals_Unblock_thread+0xf0>
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
ffc17e04: 70 08 00 08 andi. r8,r0,8
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
the_thread->Wait.return_code = EINTR;
ffc17e08: 38 00 00 04 li r0,4
ffc17e0c: 90 03 00 34 stw r0,52(r3)
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
ffc17e10: 41 82 00 5c beq- ffc17e6c <_POSIX_signals_Unblock_thread+0x120><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
ffc17e14: 80 03 00 50 lwz r0,80(r3)
ffc17e18: 2f 80 00 02 cmpwi cr7,r0,2
ffc17e1c: 40 be 00 0c bne+ cr7,ffc17e28 <_POSIX_signals_Unblock_thread+0xdc><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
ffc17e20: 38 63 00 48 addi r3,r3,72
ffc17e24: 4b ff 5e 05 bl ffc0dc28 <_Watchdog_Remove>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc17e28: 3c 80 10 03 lis r4,4099
ffc17e2c: 7f e3 fb 78 mr r3,r31
ffc17e30: 60 84 ff f8 ori r4,r4,65528
ffc17e34: 4b ff 42 f1 bl ffc0c124 <_Thread_Clear_state>
ffc17e38: 48 00 00 34 b ffc17e6c <_POSIX_signals_Unblock_thread+0x120>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
ffc17e3c: 2f 80 00 00 cmpwi cr7,r0,0
ffc17e40: 40 9e 00 2c bne- cr7,ffc17e6c <_POSIX_signals_Unblock_thread+0x120><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc17e44: 3d 60 00 00 lis r11,0
ffc17e48: 80 0b 27 d8 lwz r0,10200(r11)
ffc17e4c: 2f 80 00 00 cmpwi cr7,r0,0
ffc17e50: 41 9e 00 1c beq- cr7,ffc17e6c <_POSIX_signals_Unblock_thread+0x120>
ffc17e54: 3d 60 00 00 lis r11,0
ffc17e58: 80 0b 27 f0 lwz r0,10224(r11)
ffc17e5c: 7f 83 00 00 cmpw cr7,r3,r0
ffc17e60: 40 be 00 0c bne+ cr7,ffc17e6c <_POSIX_signals_Unblock_thread+0x120><== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
ffc17e64: 3d 60 00 00 lis r11,0
ffc17e68: 99 2b 28 0c stb r9,10252(r11)
ffc17e6c: 38 60 00 00 li r3,0
}
}
return false;
}
ffc17e70: 80 01 00 14 lwz r0,20(r1)
ffc17e74: 83 e1 00 0c lwz r31,12(r1)
ffc17e78: 38 21 00 10 addi r1,r1,16
ffc17e7c: 7c 08 03 a6 mtlr r0
ffc17e80: 4e 80 00 20 blr
ffc14a2c <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc14a2c: 94 21 ff d8 stwu r1,-40(r1)
ffc14a30: 7c 08 02 a6 mflr r0
ffc14a34: 90 01 00 2c stw r0,44(r1)
ffc14a38: 93 e1 00 24 stw r31,36(r1)
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc14a3c: 83 e3 01 44 lwz r31,324(r3)
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc14a40: 93 a1 00 1c stw r29,28(r1)
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
if ( !api )
ffc14a44: 2f 9f 00 00 cmpwi cr7,r31,0
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
ffc14a48: 93 c1 00 20 stw r30,32(r1)
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
if ( !api )
ffc14a4c: 41 9e 00 80 beq- cr7,ffc14acc <_RTEMS_tasks_Post_switch_extension+0xa0><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc14a50: 7c 00 00 a6 mfmsr r0
ffc14a54: 7d 30 42 a6 mfsprg r9,0
ffc14a58: 7c 09 48 78 andc r9,r0,r9
ffc14a5c: 7d 20 01 24 mtmsr r9
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
asr->signals_posted = 0;
ffc14a60: 39 20 00 00 li r9,0
*/
asr = &api->Signal;
_ISR_Disable( level );
signal_set = asr->signals_posted;
ffc14a64: 83 bf 00 14 lwz r29,20(r31)
asr->signals_posted = 0;
ffc14a68: 91 3f 00 14 stw r9,20(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc14a6c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
ffc14a70: 2f 9d 00 00 cmpwi cr7,r29,0
ffc14a74: 41 be 00 58 beq+ cr7,ffc14acc <_RTEMS_tasks_Post_switch_extension+0xa0>
return;
asr->nest_level += 1;
ffc14a78: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc14a7c: 3b c1 00 08 addi r30,r1,8
ffc14a80: 80 7f 00 10 lwz r3,16(r31)
ffc14a84: 38 80 00 00 li r4,0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
ffc14a88: 38 09 00 01 addi r0,r9,1
ffc14a8c: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc14a90: 60 84 ff ff ori r4,r4,65535
ffc14a94: 7f c5 f3 78 mr r5,r30
ffc14a98: 4b ff fc fd bl ffc14794 <rtems_task_mode>
(*asr->handler)( signal_set );
ffc14a9c: 80 1f 00 0c lwz r0,12(r31)
ffc14aa0: 7f a3 eb 78 mr r3,r29
ffc14aa4: 7c 09 03 a6 mtctr r0
ffc14aa8: 4e 80 04 21 bctrl
asr->nest_level -= 1;
ffc14aac: 81 3f 00 1c lwz r9,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc14ab0: 38 80 00 00 li r4,0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
ffc14ab4: 38 09 ff ff addi r0,r9,-1
ffc14ab8: 90 1f 00 1c stw r0,28(r31)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
ffc14abc: 60 84 ff ff ori r4,r4,65535
ffc14ac0: 7f c5 f3 78 mr r5,r30
ffc14ac4: 80 61 00 08 lwz r3,8(r1)
ffc14ac8: 4b ff fc cd bl ffc14794 <rtems_task_mode>
}
ffc14acc: 80 01 00 2c lwz r0,44(r1)
ffc14ad0: 83 a1 00 1c lwz r29,28(r1)
ffc14ad4: 7c 08 03 a6 mtlr r0
ffc14ad8: 83 c1 00 20 lwz r30,32(r1)
ffc14adc: 83 e1 00 24 lwz r31,36(r1)
ffc14ae0: 38 21 00 28 addi r1,r1,40
ffc14ae4: 4e 80 00 20 blr
ffc0a158 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
ffc0a158: 94 21 ff e0 stwu r1,-32(r1)
ffc0a15c: 7c 08 02 a6 mflr r0
ffc0a160: 7c 64 1b 78 mr r4,r3
ffc0a164: 3c 60 00 00 lis r3,0
ffc0a168: 90 01 00 24 stw r0,36(r1)
ffc0a16c: 38 63 2c 58 addi r3,r3,11352
ffc0a170: 38 a1 00 08 addi r5,r1,8
ffc0a174: 93 e1 00 1c stw r31,28(r1)
ffc0a178: 48 00 24 8d bl ffc0c604 <_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 ) {
ffc0a17c: 80 01 00 08 lwz r0,8(r1)
ffc0a180: 7c 7f 1b 78 mr r31,r3
ffc0a184: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a188: 40 9e 00 84 bne- cr7,ffc0a20c <_Rate_monotonic_Timeout+0xb4><== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
ffc0a18c: 80 63 00 40 lwz r3,64(r3)
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
ffc0a190: 80 03 00 10 lwz r0,16(r3)
ffc0a194: 70 09 40 00 andi. r9,r0,16384
ffc0a198: 41 82 00 24 beq- ffc0a1bc <_Rate_monotonic_Timeout+0x64>
the_thread->Wait.id == the_period->Object.id ) {
ffc0a19c: 81 23 00 20 lwz r9,32(r3)
ffc0a1a0: 80 1f 00 08 lwz r0,8(r31)
ffc0a1a4: 7f 89 00 00 cmpw cr7,r9,r0
ffc0a1a8: 40 be 00 14 bne+ cr7,ffc0a1bc <_Rate_monotonic_Timeout+0x64>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
ffc0a1ac: 3c 80 10 03 lis r4,4099
ffc0a1b0: 60 84 ff f8 ori r4,r4,65528
ffc0a1b4: 48 00 2a 7d bl ffc0cc30 <_Thread_Clear_state>
ffc0a1b8: 48 00 00 18 b ffc0a1d0 <_Rate_monotonic_Timeout+0x78>
_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 ) {
ffc0a1bc: 80 1f 00 38 lwz r0,56(r31)
ffc0a1c0: 2f 80 00 01 cmpwi cr7,r0,1
ffc0a1c4: 40 be 00 30 bne+ cr7,ffc0a1f4 <_Rate_monotonic_Timeout+0x9c>
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
ffc0a1c8: 38 00 00 03 li r0,3
ffc0a1cc: 90 1f 00 38 stw r0,56(r31)
_Rate_monotonic_Initiate_statistics( the_period );
ffc0a1d0: 7f e3 fb 78 mr r3,r31
ffc0a1d4: 4b ff f7 75 bl ffc09948 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a1d8: 80 1f 00 3c lwz r0,60(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a1dc: 3c 60 00 00 lis r3,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc0a1e0: 90 1f 00 1c stw r0,28(r31)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0a1e4: 38 63 2e 48 addi r3,r3,11848
ffc0a1e8: 38 9f 00 10 addi r4,r31,16
ffc0a1ec: 48 00 46 11 bl ffc0e7fc <_Watchdog_Insert>
ffc0a1f0: 48 00 00 0c b ffc0a1fc <_Rate_monotonic_Timeout+0xa4>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
ffc0a1f4: 38 00 00 04 li r0,4
ffc0a1f8: 90 1f 00 38 stw r0,56(r31)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0a1fc: 3d 20 00 00 lis r9,0
ffc0a200: 81 69 27 f8 lwz r11,10232(r9)
ffc0a204: 38 0b ff ff addi r0,r11,-1
ffc0a208: 90 09 27 f8 stw r0,10232(r9)
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
ffc0a20c: 80 01 00 24 lwz r0,36(r1)
ffc0a210: 83 e1 00 1c lwz r31,28(r1)
ffc0a214: 38 21 00 20 addi r1,r1,32
ffc0a218: 7c 08 03 a6 mtlr r0
ffc0a21c: 4e 80 00 20 blr
ffc09a98 <_TOD_Validate>:
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc09a98: 2c 03 00 00 cmpwi r3,0
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
ffc09a9c: 3d 20 00 00 lis r9,0
ffc09aa0: 81 29 20 cc lwz r9,8396(r9)
if ((!the_tod) ||
ffc09aa4: 41 82 00 98 beq- ffc09b3c <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->ticks >= ticks_per_second) ||
ffc09aa8: 3c 00 00 0f lis r0,15
ffc09aac: 60 00 42 40 ori r0,r0,16960
ffc09ab0: 7c 00 4b 96 divwu r0,r0,r9
ffc09ab4: 81 23 00 18 lwz r9,24(r3)
ffc09ab8: 7f 89 00 40 cmplw cr7,r9,r0
ffc09abc: 40 9c 00 80 bge- cr7,ffc09b3c <_TOD_Validate+0xa4>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
ffc09ac0: 80 03 00 14 lwz r0,20(r3)
ffc09ac4: 2b 80 00 3b cmplwi cr7,r0,59
ffc09ac8: 41 9d 00 74 bgt- cr7,ffc09b3c <_TOD_Validate+0xa4>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
ffc09acc: 80 03 00 10 lwz r0,16(r3)
ffc09ad0: 2b 80 00 3b cmplwi cr7,r0,59
ffc09ad4: 41 9d 00 68 bgt- cr7,ffc09b3c <_TOD_Validate+0xa4>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
ffc09ad8: 80 03 00 0c lwz r0,12(r3)
ffc09adc: 2b 80 00 17 cmplwi cr7,r0,23
ffc09ae0: 41 9d 00 5c bgt- cr7,ffc09b3c <_TOD_Validate+0xa4>
(the_tod->month == 0) ||
ffc09ae4: 81 23 00 04 lwz r9,4(r3)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc09ae8: 2f 89 00 00 cmpwi cr7,r9,0
ffc09aec: 41 9e 00 50 beq- cr7,ffc09b3c <_TOD_Validate+0xa4> <== NEVER TAKEN
ffc09af0: 2b 89 00 0c cmplwi cr7,r9,12
ffc09af4: 41 9d 00 48 bgt- cr7,ffc09b3c <_TOD_Validate+0xa4>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
ffc09af8: 80 03 00 00 lwz r0,0(r3)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc09afc: 2b 80 07 c3 cmplwi cr7,r0,1987
ffc09b00: 40 9d 00 3c ble- cr7,ffc09b3c <_TOD_Validate+0xa4>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
ffc09b04: 80 63 00 08 lwz r3,8(r3)
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
ffc09b08: 2f 83 00 00 cmpwi cr7,r3,0
ffc09b0c: 41 9e 00 30 beq- cr7,ffc09b3c <_TOD_Validate+0xa4> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
ffc09b10: 70 0b 00 03 andi. r11,r0,3
ffc09b14: 3d 60 ff c2 lis r11,-62
ffc09b18: 39 6b 68 58 addi r11,r11,26712
ffc09b1c: 40 82 00 08 bne- ffc09b24 <_TOD_Validate+0x8c>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
ffc09b20: 39 29 00 0d addi r9,r9,13
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
ffc09b24: 55 29 10 3a rlwinm r9,r9,2,0,29
ffc09b28: 7c 0b 48 2e lwzx r0,r11,r9
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
ffc09b2c: 7c 63 00 10 subfc r3,r3,r0
ffc09b30: 38 60 00 00 li r3,0
ffc09b34: 7c 63 19 14 adde r3,r3,r3
ffc09b38: 4e 80 00 20 blr
ffc09b3c: 38 60 00 00 li r3,0
if ( the_tod->day > days_in_month )
return false;
return true;
}
ffc09b40: 4e 80 00 20 blr
ffc0bf80 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
ffc0bf80: 94 21 ff e0 stwu r1,-32(r1)
ffc0bf84: 7c 08 02 a6 mflr r0
ffc0bf88: 90 01 00 24 stw r0,36(r1)
ffc0bf8c: 93 e1 00 1c stw r31,28(r1)
ffc0bf90: 7c 7f 1b 78 mr r31,r3
ffc0bf94: 93 a1 00 14 stw r29,20(r1)
ffc0bf98: 93 c1 00 18 stw r30,24(r1)
ffc0bf9c: 7c be 2b 78 mr r30,r5
/*
* 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 );
ffc0bfa0: 90 81 00 08 stw r4,8(r1)
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
ffc0bfa4: 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 );
ffc0bfa8: 48 00 12 11 bl ffc0d1b8 <_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 )
ffc0bfac: 80 1f 00 14 lwz r0,20(r31)
ffc0bfb0: 80 81 00 08 lwz r4,8(r1)
ffc0bfb4: 7f 80 20 00 cmpw cr7,r0,r4
ffc0bfb8: 41 9e 00 0c beq- cr7,ffc0bfc4 <_Thread_Change_priority+0x44>
_Thread_Set_priority( the_thread, new_priority );
ffc0bfbc: 7f e3 fb 78 mr r3,r31
ffc0bfc0: 48 00 10 85 bl ffc0d044 <_Thread_Set_priority>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0bfc4: 7d 60 00 a6 mfmsr r11
ffc0bfc8: 7c 10 42 a6 mfsprg r0,0
ffc0bfcc: 7d 60 00 78 andc r0,r11,r0
ffc0bfd0: 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;
ffc0bfd4: 80 1f 00 10 lwz r0,16(r31)
ffc0bfd8: 57 bd 07 7a rlwinm r29,r29,0,29,29
if ( state != STATES_TRANSIENT ) {
ffc0bfdc: 2f 80 00 04 cmpwi cr7,r0,4
ffc0bfe0: 41 9e 00 38 beq- cr7,ffc0c018 <_Thread_Change_priority+0x98>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
ffc0bfe4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0bfe8: 40 9e 00 0c bne- cr7,ffc0bff4 <_Thread_Change_priority+0x74><== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
ffc0bfec: 54 09 07 b8 rlwinm r9,r0,0,30,28
ffc0bff0: 91 3f 00 10 stw r9,16(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0bff4: 7d 60 01 24 mtmsr r11
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
ffc0bff8: 3d 20 00 03 lis r9,3
ffc0bffc: 61 29 be e0 ori r9,r9,48864
ffc0c000: 7c 0b 48 39 and. r11,r0,r9
ffc0c004: 41 a2 01 04 beq+ ffc0c108 <_Thread_Change_priority+0x188>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
ffc0c008: 80 7f 00 44 lwz r3,68(r31)
ffc0c00c: 7f e4 fb 78 mr r4,r31
ffc0c010: 48 00 0f 61 bl ffc0cf70 <_Thread_queue_Requeue>
ffc0c014: 48 00 00 f4 b ffc0c108 <_Thread_Change_priority+0x188>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
ffc0c018: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0c01c: 40 9e 00 6c bne- cr7,ffc0c088 <_Thread_Change_priority+0x108><== NEVER TAKEN
* 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 );
ffc0c020: 93 bf 00 10 stw r29,16(r31)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
ffc0c024: 2f 9e 00 00 cmpwi cr7,r30,0
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0c028: 3d 40 00 00 lis r10,0
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc0c02c: 81 3f 00 90 lwz r9,144(r31)
ffc0c030: 80 1f 00 98 lwz r0,152(r31)
ffc0c034: 81 09 00 00 lwz r8,0(r9)
ffc0c038: 7d 00 03 78 or r0,r8,r0
ffc0c03c: 90 09 00 00 stw r0,0(r9)
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0c040: 81 0a 27 e4 lwz r8,10212(r10)
ffc0c044: 80 1f 00 94 lwz r0,148(r31)
ffc0c048: 81 3f 00 8c lwz r9,140(r31)
ffc0c04c: 7d 00 03 78 or r0,r8,r0
ffc0c050: 90 0a 27 e4 stw r0,10212(r10)
ffc0c054: 41 9e 00 1c beq- cr7,ffc0c070 <_Thread_Change_priority+0xf0>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
ffc0c058: 81 49 00 00 lwz r10,0(r9)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
ffc0c05c: 91 3f 00 04 stw r9,4(r31)
before_node = after_node->next;
after_node->next = the_node;
ffc0c060: 93 e9 00 00 stw r31,0(r9)
the_node->next = before_node;
before_node->previous = the_node;
ffc0c064: 93 ea 00 04 stw r31,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;
ffc0c068: 91 5f 00 00 stw r10,0(r31)
ffc0c06c: 48 00 00 1c b ffc0c088 <_Thread_Change_priority+0x108>
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0c070: 38 09 00 04 addi r0,r9,4
ffc0c074: 90 1f 00 00 stw r0,0(r31)
old_last_node = the_chain->last;
ffc0c078: 81 49 00 08 lwz r10,8(r9)
the_chain->last = the_node;
ffc0c07c: 93 e9 00 08 stw r31,8(r9)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0c080: 91 5f 00 04 stw r10,4(r31)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0c084: 93 ea 00 00 stw r31,0(r10)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0c088: 7c 00 00 a6 mfmsr r0
ffc0c08c: 7d 60 01 24 mtmsr r11
ffc0c090: 7c 00 01 24 mtmsr r0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0c094: 3c c0 00 00 lis r6,0
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
ffc0c098: 3d 40 00 00 lis r10,0
ffc0c09c: 81 26 27 e4 lwz r9,10212(r6)
ffc0c0a0: 80 aa 27 a4 lwz r5,10148(r10)
ffc0c0a4: 7d 27 00 34 cntlzw r7,r9
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0c0a8: 3d 00 00 00 lis r8,0
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
ffc0c0ac: 91 26 27 e4 stw r9,10212(r6)
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
ffc0c0b0: 39 08 2e 60 addi r8,r8,11872
ffc0c0b4: 54 ea 10 3a rlwinm r10,r7,2,0,29
ffc0c0b8: 7c 08 50 2e lwzx r0,r8,r10
ffc0c0bc: 7c 09 00 34 cntlzw r9,r0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
ffc0c0c0: 54 e7 20 36 rlwinm r7,r7,4,0,27
ffc0c0c4: 7c 08 51 2e stwx r0,r8,r10
ffc0c0c8: 7c e7 4a 14 add r7,r7,r9
ffc0c0cc: 1c e7 00 0c mulli r7,r7,12
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
ffc0c0d0: 3d 20 00 00 lis r9,0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
ffc0c0d4: 7c 05 38 2e lwzx r0,r5,r7
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
ffc0c0d8: 81 29 27 f0 lwz r9,10224(r9)
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
ffc0c0dc: 3d 40 00 00 lis r10,0
ffc0c0e0: 90 0a 27 cc stw r0,10188(r10)
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
ffc0c0e4: 7f 89 00 00 cmpw cr7,r9,r0
ffc0c0e8: 41 9e 00 1c beq- cr7,ffc0c104 <_Thread_Change_priority+0x184>
_Thread_Executing->is_preemptible )
ffc0c0ec: 88 09 00 75 lbz r0,117(r9)
ffc0c0f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c0f4: 41 9e 00 10 beq- cr7,ffc0c104 <_Thread_Change_priority+0x184>
_Context_Switch_necessary = true;
ffc0c0f8: 38 00 00 01 li r0,1
ffc0c0fc: 3d 20 00 00 lis r9,0
ffc0c100: 98 09 28 00 stb r0,10240(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c104: 7d 60 01 24 mtmsr r11
_ISR_Enable( level );
}
ffc0c108: 80 01 00 24 lwz r0,36(r1)
ffc0c10c: 83 a1 00 14 lwz r29,20(r1)
ffc0c110: 7c 08 03 a6 mtlr r0
ffc0c114: 83 c1 00 18 lwz r30,24(r1)
ffc0c118: 83 e1 00 1c lwz r31,28(r1)
ffc0c11c: 38 21 00 20 addi r1,r1,32
ffc0c120: 4e 80 00 20 blr
ffc0c124 <_Thread_Clear_state>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c124: 7c 00 00 a6 mfmsr r0
ffc0c128: 7d 30 42 a6 mfsprg r9,0
ffc0c12c: 7c 09 48 78 andc r9,r0,r9
ffc0c130: 7d 20 01 24 mtmsr r9
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
current_state = the_thread->current_state;
ffc0c134: 81 23 00 10 lwz r9,16(r3)
if ( current_state & state ) {
ffc0c138: 7c 8b 48 39 and. r11,r4,r9
ffc0c13c: 41 82 00 a8 beq- ffc0c1e4 <_Thread_Clear_state+0xc0>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
ffc0c140: 7d 24 20 78 andc r4,r9,r4
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
ffc0c144: 2f 84 00 00 cmpwi cr7,r4,0
_ISR_Disable( level );
current_state = the_thread->current_state;
if ( current_state & state ) {
current_state =
ffc0c148: 90 83 00 10 stw r4,16(r3)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
ffc0c14c: 40 9e 00 98 bne- cr7,ffc0c1e4 <_Thread_Clear_state+0xc0>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc0c150: 81 63 00 90 lwz r11,144(r3)
ffc0c154: 81 43 00 98 lwz r10,152(r3)
ffc0c158: 81 0b 00 00 lwz r8,0(r11)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
ffc0c15c: 81 23 00 8c lwz r9,140(r3)
ffc0c160: 7d 0a 53 78 or r10,r8,r10
ffc0c164: 91 4b 00 00 stw r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0c168: 39 69 00 04 addi r11,r9,4
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0c16c: 3d 40 00 00 lis r10,0
ffc0c170: 91 63 00 00 stw r11,0(r3)
ffc0c174: 80 ea 27 e4 lwz r7,10212(r10)
ffc0c178: 81 03 00 94 lwz r8,148(r3)
old_last_node = the_chain->last;
ffc0c17c: 81 69 00 08 lwz r11,8(r9)
ffc0c180: 7c e8 43 78 or r8,r7,r8
the_chain->last = the_node;
ffc0c184: 90 69 00 08 stw r3,8(r9)
ffc0c188: 91 0a 27 e4 stw r8,10212(r10)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0c18c: 91 63 00 04 stw r11,4(r3)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0c190: 90 6b 00 00 stw r3,0(r11)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0c194: 7d 20 00 a6 mfmsr r9
ffc0c198: 7c 00 01 24 mtmsr r0
ffc0c19c: 7d 20 01 24 mtmsr r9
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
ffc0c1a0: 3d 60 00 00 lis r11,0
ffc0c1a4: 81 23 00 14 lwz r9,20(r3)
ffc0c1a8: 81 4b 27 cc lwz r10,10188(r11)
ffc0c1ac: 81 4a 00 14 lwz r10,20(r10)
ffc0c1b0: 7f 89 50 40 cmplw cr7,r9,r10
ffc0c1b4: 40 9c 00 30 bge- cr7,ffc0c1e4 <_Thread_Clear_state+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0c1b8: 3d 40 00 00 lis r10,0
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
ffc0c1bc: 90 6b 27 cc stw r3,10188(r11)
if ( _Thread_Executing->is_preemptible ||
ffc0c1c0: 81 4a 27 f0 lwz r10,10224(r10)
ffc0c1c4: 89 6a 00 75 lbz r11,117(r10)
ffc0c1c8: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0c1cc: 40 9e 00 0c bne- cr7,ffc0c1d8 <_Thread_Clear_state+0xb4>
ffc0c1d0: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c1d4: 40 9e 00 10 bne- cr7,ffc0c1e4 <_Thread_Clear_state+0xc0><== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
ffc0c1d8: 39 60 00 01 li r11,1
ffc0c1dc: 3d 20 00 00 lis r9,0
ffc0c1e0: 99 69 28 00 stb r11,10240(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c1e4: 7c 00 01 24 mtmsr r0
}
}
}
_ISR_Enable( level );
}
ffc0c1e8: 4e 80 00 20 blr
ffc0c1ec <_Thread_Close>:
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
ffc0c1ec: 94 21 ff e8 stwu r1,-24(r1)
ffc0c1f0: 7c 08 02 a6 mflr r0
ffc0c1f4: 39 60 00 00 li r11,0
ffc0c1f8: 90 01 00 1c stw r0,28(r1)
ffc0c1fc: a0 04 00 0a lhz r0,10(r4)
ffc0c200: 81 23 00 1c lwz r9,28(r3)
ffc0c204: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc0c208: 93 a1 00 0c stw r29,12(r1)
ffc0c20c: 7c 7d 1b 78 mr r29,r3
ffc0c210: 93 e1 00 14 stw r31,20(r1)
ffc0c214: 7c 9f 23 78 mr r31,r4
ffc0c218: 93 c1 00 10 stw r30,16(r1)
ffc0c21c: 7d 69 01 2e stwx r11,r9,r0
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0c220: 3f c0 00 00 lis r30,0
ffc0c224: 81 3e 27 b0 lwz r9,10160(r30)
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
ffc0c228: 7c 83 23 78 mr r3,r4
ffc0c22c: 38 09 ff ff addi r0,r9,-1
ffc0c230: 90 1e 27 b0 stw r0,10160(r30)
ffc0c234: 48 00 17 1d bl ffc0d950 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0c238: 81 3e 27 b0 lwz r9,10160(r30)
ffc0c23c: 38 09 00 01 addi r0,r9,1
ffc0c240: 90 1e 27 b0 stw r0,10160(r30)
/*
* Now we are in a dispatching critical section again and we
* can take the thread OUT of the published set. It is invalid
* to use this thread's Id OR name after this call.
*/
_Objects_Close( information, &the_thread->Object );
ffc0c244: 7f a3 eb 78 mr r3,r29
ffc0c248: 7f e4 fb 78 mr r4,r31
ffc0c24c: 4b ff f2 d9 bl ffc0b524 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
ffc0c250: 7f e3 fb 78 mr r3,r31
ffc0c254: 38 80 00 01 li r4,1
ffc0c258: 48 00 0e 49 bl ffc0d0a0 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
ffc0c25c: 7f e3 fb 78 mr r3,r31
ffc0c260: 48 00 0c 2d bl ffc0ce8c <_Thread_queue_Extract_with_proxy>
ffc0c264: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c268: 40 9e 00 18 bne- cr7,ffc0c280 <_Thread_Close+0x94>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
ffc0c26c: 80 1f 00 50 lwz r0,80(r31)
ffc0c270: 2f 80 00 02 cmpwi cr7,r0,2
ffc0c274: 40 be 00 0c bne+ cr7,ffc0c280 <_Thread_Close+0x94>
(void) _Watchdog_Remove( &the_thread->Timer );
ffc0c278: 38 7f 00 48 addi r3,r31,72
ffc0c27c: 48 00 19 ad bl ffc0dc28 <_Watchdog_Remove>
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
ffc0c280: 80 7f 00 d4 lwz r3,212(r31)
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
ffc0c284: 38 00 00 00 li r0,0
ffc0c288: 90 1f 01 3c stw r0,316(r31)
if ( the_thread->Start.fp_context )
ffc0c28c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c290: 41 9e 00 08 beq- cr7,ffc0c298 <_Thread_Close+0xac> <== NEVER TAKEN
(void) _Workspace_Free( the_thread->Start.fp_context );
ffc0c294: 48 00 1a bd bl ffc0dd50 <_Workspace_Free>
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
ffc0c298: 7f e3 fb 78 mr r3,r31
ffc0c29c: 48 00 10 3d bl ffc0d2d8 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
ffc0c2a0: 80 7f 01 50 lwz r3,336(r31)
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
ffc0c2a4: 38 00 00 00 li r0,0
if ( the_thread->extensions )
ffc0c2a8: 2f 83 00 00 cmpwi cr7,r3,0
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
ffc0c2ac: 90 1f 00 d8 stw r0,216(r31)
if ( the_thread->extensions )
ffc0c2b0: 41 9e 00 08 beq- cr7,ffc0c2b8 <_Thread_Close+0xcc>
(void) _Workspace_Free( the_thread->extensions );
ffc0c2b4: 48 00 1a 9d bl ffc0dd50 <_Workspace_Free>
the_thread->extensions = NULL;
ffc0c2b8: 38 00 00 00 li r0,0
}
ffc0c2bc: 83 a1 00 0c lwz r29,12(r1)
_Thread_Stack_Free( the_thread );
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
(void) _Workspace_Free( the_thread->extensions );
the_thread->extensions = NULL;
ffc0c2c0: 90 1f 01 50 stw r0,336(r31)
}
ffc0c2c4: 80 01 00 1c lwz r0,28(r1)
ffc0c2c8: 83 c1 00 10 lwz r30,16(r1)
ffc0c2cc: 7c 08 03 a6 mtlr r0
ffc0c2d0: 83 e1 00 14 lwz r31,20(r1)
ffc0c2d4: 38 21 00 18 addi r1,r1,24
ffc0c2d8: 4e 80 00 20 blr
ffc0c3cc <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c3cc: 94 21 ff e8 stwu r1,-24(r1)
ffc0c3d0: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c3d4: 38 81 00 08 addi r4,r1,8
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0c3d8: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0c3dc: 48 00 02 4d bl ffc0c628 <_Thread_Get>
switch ( location ) {
ffc0c3e0: 80 01 00 08 lwz r0,8(r1)
ffc0c3e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c3e8: 40 9e 00 20 bne- cr7,ffc0c408 <_Thread_Delay_ended+0x3c><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
ffc0c3ec: 3c 80 10 00 lis r4,4096
ffc0c3f0: 60 84 00 18 ori r4,r4,24
ffc0c3f4: 4b ff fd 31 bl ffc0c124 <_Thread_Clear_state>
ffc0c3f8: 3d 20 00 00 lis r9,0
ffc0c3fc: 81 69 27 b0 lwz r11,10160(r9)
ffc0c400: 38 0b ff ff addi r0,r11,-1
ffc0c404: 90 09 27 b0 stw r0,10160(r9)
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
ffc0c408: 80 01 00 1c lwz r0,28(r1)
ffc0c40c: 38 21 00 18 addi r1,r1,24
ffc0c410: 7c 08 03 a6 mtlr r0
ffc0c414: 4e 80 00 20 blr
ffc0c418 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0c418: 94 21 ff b0 stwu r1,-80(r1)
ffc0c41c: 7c 08 02 a6 mflr r0
ffc0c420: 93 41 00 38 stw r26,56(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0c424: 3f 40 00 00 lis r26,0
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
ffc0c428: 93 e1 00 4c stw r31,76(r1)
ffc0c42c: 90 01 00 54 stw r0,84(r1)
ffc0c430: 92 61 00 1c stw r19,28(r1)
ffc0c434: 92 81 00 20 stw r20,32(r1)
ffc0c438: 92 a1 00 24 stw r21,36(r1)
ffc0c43c: 92 c1 00 28 stw r22,40(r1)
ffc0c440: 92 e1 00 2c stw r23,44(r1)
ffc0c444: 93 01 00 30 stw r24,48(r1)
ffc0c448: 93 21 00 34 stw r25,52(r1)
ffc0c44c: 93 61 00 3c stw r27,60(r1)
ffc0c450: 93 81 00 40 stw r28,64(r1)
ffc0c454: 93 a1 00 44 stw r29,68(r1)
ffc0c458: 93 c1 00 48 stw r30,72(r1)
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
ffc0c45c: 83 fa 27 f0 lwz r31,10224(r26)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c460: 7c 00 00 a6 mfmsr r0
ffc0c464: 7d 30 42 a6 mfsprg r9,0
ffc0c468: 7c 09 48 78 andc r9,r0,r9
ffc0c46c: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0c470: 3f 20 00 00 lis r25,0
heir = _Thread_Heir;
ffc0c474: 3e 60 00 00 lis r19,0
_Thread_Dispatch_disable_level = 1;
ffc0c478: 3e 80 00 00 lis r20,0
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0c47c: 3e a0 00 00 lis r21,0
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0c480: 3f 60 00 00 lis r27,0
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c484: 3e c0 00 00 lis r22,0
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0c488: 3b 39 28 00 addi r25,r25,10240
heir = _Thread_Heir;
ffc0c48c: 3a 73 27 cc addi r19,r19,10188
_Thread_Dispatch_disable_level = 1;
ffc0c490: 3a 94 27 b0 addi r20,r20,10160
_Context_Switch_necessary = false;
_Thread_Executing = heir;
ffc0c494: 3b 5a 27 f0 addi r26,r26,10224
#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;
ffc0c498: 3a b5 27 a8 addi r21,r21,10152
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
_Timestamp_Subtract(
ffc0c49c: 3b 7b 27 f8 addi r27,r27,10232
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c4a0: 3a d6 27 c8 addi r22,r22,10184
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
ffc0c4a4: 3a e0 00 01 li r23,1
_Context_Switch_necessary = false;
ffc0c4a8: 3b 00 00 00 li r24,0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0c4ac: 3b 81 00 08 addi r28,r1,8
_Timestamp_Subtract(
ffc0c4b0: 3b a1 00 10 addi r29,r1,16
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0c4b4: 48 00 00 d0 b ffc0c584 <_Thread_Dispatch+0x16c>
heir = _Thread_Heir;
ffc0c4b8: 83 d3 00 00 lwz r30,0(r19)
_Thread_Dispatch_disable_level = 1;
ffc0c4bc: 92 f4 00 00 stw r23,0(r20)
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
ffc0c4c0: 81 3e 00 7c lwz r9,124(r30)
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
ffc0c4c4: 9b 19 00 00 stb r24,0(r25)
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
ffc0c4c8: 2f 89 00 01 cmpwi cr7,r9,1
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
_Thread_Executing = heir;
ffc0c4cc: 93 da 00 00 stw r30,0(r26)
#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 )
ffc0c4d0: 40 be 00 0c bne+ cr7,ffc0c4dc <_Thread_Dispatch+0xc4>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0c4d4: 81 35 00 00 lwz r9,0(r21)
ffc0c4d8: 91 3e 00 78 stw r9,120(r30)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c4dc: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
ffc0c4e0: 7f 83 e3 78 mr r3,r28
ffc0c4e4: 48 00 8b 11 bl ffc14ff4 <_TOD_Get_uptime>
_Timestamp_Subtract(
ffc0c4e8: 7f 63 db 78 mr r3,r27
ffc0c4ec: 7f 84 e3 78 mr r4,r28
ffc0c4f0: 7f a5 eb 78 mr r5,r29
ffc0c4f4: 48 00 11 19 bl ffc0d60c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
ffc0c4f8: 7f a4 eb 78 mr r4,r29
ffc0c4fc: 38 7f 00 84 addi r3,r31,132
ffc0c500: 48 00 10 b1 bl ffc0d5b0 <_Timespec_Add_to>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c504: 81 36 00 00 lwz r9,0(r22)
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
ffc0c508: 81 61 00 08 lwz r11,8(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0c50c: 7f e3 fb 78 mr r3,r31
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c510: 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;
ffc0c514: 81 81 00 0c lwz r12,12(r1)
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
ffc0c518: 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;
ffc0c51c: 91 7b 00 00 stw r11,0(r27)
ffc0c520: 91 9b 00 04 stw r12,4(r27)
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
ffc0c524: 41 9e 00 14 beq- cr7,ffc0c538 <_Thread_Dispatch+0x120> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
ffc0c528: 80 09 00 00 lwz r0,0(r9)
ffc0c52c: 90 1f 01 40 stw r0,320(r31)
*_Thread_libc_reent = heir->libc_reent;
ffc0c530: 80 1e 01 40 lwz r0,320(r30)
ffc0c534: 90 09 00 00 stw r0,0(r9)
}
_User_extensions_Thread_switch( executing, heir );
ffc0c538: 48 00 15 21 bl ffc0da58 <_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 )
ffc0c53c: 80 1f 01 3c lwz r0,316(r31)
_Context_Save_fp( &executing->fp_context );
ffc0c540: 38 7f 01 3c addi r3,r31,316
* operations.
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH != TRUE )
if ( executing->fp_context != NULL )
ffc0c544: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c548: 41 9e 00 08 beq- cr7,ffc0c550 <_Thread_Dispatch+0x138>
_Context_Save_fp( &executing->fp_context );
ffc0c54c: 48 01 6f 75 bl ffc234c0 <_CPU_Context_save_fp>
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
ffc0c550: 38 7f 00 dc addi r3,r31,220
ffc0c554: 38 9e 00 dc addi r4,r30,220
ffc0c558: 48 01 70 e9 bl ffc23640 <_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 )
ffc0c55c: 80 1f 01 3c lwz r0,316(r31)
_Context_Restore_fp( &executing->fp_context );
ffc0c560: 38 7f 01 3c addi r3,r31,316
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
_Thread_Allocated_fp = executing;
}
#else
if ( executing->fp_context != NULL )
ffc0c564: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c568: 41 9e 00 08 beq- cr7,ffc0c570 <_Thread_Dispatch+0x158>
_Context_Restore_fp( &executing->fp_context );
ffc0c56c: 48 01 70 15 bl ffc23580 <_CPU_Context_restore_fp>
#endif
#endif
executing = _Thread_Executing;
ffc0c570: 83 fa 00 00 lwz r31,0(r26)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0c574: 7c 00 00 a6 mfmsr r0
ffc0c578: 7d 30 42 a6 mfsprg r9,0
ffc0c57c: 7c 09 48 78 andc r9,r0,r9
ffc0c580: 7d 20 01 24 mtmsr r9
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
ffc0c584: 89 39 00 00 lbz r9,0(r25)
ffc0c588: 2f 89 00 00 cmpwi cr7,r9,0
ffc0c58c: 40 9e ff 2c bne+ cr7,ffc0c4b8 <_Thread_Dispatch+0xa0>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
ffc0c590: 3d 60 00 00 lis r11,0
ffc0c594: 91 2b 27 b0 stw r9,10160(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0c598: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
if ( _Thread_Do_post_task_switch_extension ||
ffc0c59c: 3d 20 00 00 lis r9,0
ffc0c5a0: 80 09 27 e0 lwz r0,10208(r9)
ffc0c5a4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c5a8: 40 9e 00 10 bne- cr7,ffc0c5b8 <_Thread_Dispatch+0x1a0>
executing->do_post_task_switch_extension ) {
ffc0c5ac: 88 1f 00 74 lbz r0,116(r31)
ffc0c5b0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0c5b4: 41 9e 00 10 beq- cr7,ffc0c5c4 <_Thread_Dispatch+0x1ac>
executing->do_post_task_switch_extension = false;
ffc0c5b8: 38 00 00 00 li r0,0
ffc0c5bc: 98 1f 00 74 stb r0,116(r31)
_API_extensions_Run_postswitch();
ffc0c5c0: 4b ff e2 89 bl ffc0a848 <_API_extensions_Run_postswitch>
}
}
ffc0c5c4: 80 01 00 54 lwz r0,84(r1)
ffc0c5c8: 82 61 00 1c lwz r19,28(r1)
ffc0c5cc: 7c 08 03 a6 mtlr r0
ffc0c5d0: 82 81 00 20 lwz r20,32(r1)
ffc0c5d4: 82 a1 00 24 lwz r21,36(r1)
ffc0c5d8: 82 c1 00 28 lwz r22,40(r1)
ffc0c5dc: 82 e1 00 2c lwz r23,44(r1)
ffc0c5e0: 83 01 00 30 lwz r24,48(r1)
ffc0c5e4: 83 21 00 34 lwz r25,52(r1)
ffc0c5e8: 83 41 00 38 lwz r26,56(r1)
ffc0c5ec: 83 61 00 3c lwz r27,60(r1)
ffc0c5f0: 83 81 00 40 lwz r28,64(r1)
ffc0c5f4: 83 a1 00 44 lwz r29,68(r1)
ffc0c5f8: 83 c1 00 48 lwz r30,72(r1)
ffc0c5fc: 83 e1 00 4c lwz r31,76(r1)
ffc0c600: 38 21 00 50 addi r1,r1,80
ffc0c604: 4e 80 00 20 blr
ffc1564c <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
ffc1564c: 3d 20 00 00 lis r9,0
ffc15650: 81 29 27 f0 lwz r9,10224(r9)
if ( !_States_Is_ready( executing->current_state ) ||
ffc15654: 80 09 00 10 lwz r0,16(r9)
ffc15658: 2f 80 00 00 cmpwi cr7,r0,0
ffc1565c: 40 9e 00 20 bne- cr7,ffc1567c <_Thread_Evaluate_mode+0x30><== NEVER TAKEN
ffc15660: 3d 60 00 00 lis r11,0
ffc15664: 80 0b 27 cc lwz r0,10188(r11)
ffc15668: 7f 89 00 00 cmpw cr7,r9,r0
ffc1566c: 41 9e 00 24 beq- cr7,ffc15690 <_Thread_Evaluate_mode+0x44>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
ffc15670: 88 09 00 75 lbz r0,117(r9)
ffc15674: 2f 80 00 00 cmpwi cr7,r0,0
ffc15678: 41 9e 00 18 beq- cr7,ffc15690 <_Thread_Evaluate_mode+0x44><== NEVER TAKEN
_Context_Switch_necessary = true;
ffc1567c: 38 00 00 01 li r0,1
ffc15680: 3d 20 00 00 lis r9,0
ffc15684: 98 09 28 00 stb r0,10240(r9)
ffc15688: 38 60 00 01 li r3,1
return true;
ffc1568c: 4e 80 00 20 blr
ffc15690: 38 60 00 00 li r3,0
}
return false;
}
ffc15694: 4e 80 00 20 blr
ffc18250 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc18250: 94 21 ff f0 stwu r1,-16(r1)
ffc18254: 7c 08 02 a6 mflr r0
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc18258: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc1825c: 90 01 00 14 stw r0,20(r1)
ffc18260: 93 e1 00 0c stw r31,12(r1)
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
ffc18264: 83 e9 27 f0 lwz r31,10224(r9)
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
ffc18268: 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;
ffc1826c: 81 3f 00 c0 lwz r9,192(r31)
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc18270: 38 00 00 00 li r0,0
ffc18274: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc18278: 71 2b 00 01 andi. r11,r9,1
ffc1827c: 40 82 00 10 bne- ffc1828c <_Thread_Handler+0x3c>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
asm volatile (
ffc18280: 7d 30 42 a6 mfsprg r9,0
msr |= ppc_interrupt_get_disable_mask();
ffc18284: 7d 20 03 78 or r0,r9,r0
ffc18288: 48 00 00 0c b ffc18294 <_Thread_Handler+0x44>
ffc1828c: 7d 30 42 a6 mfsprg r9,0
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc18290: 7c 00 48 78 andc r0,r0,r9
}
_CPU_MSR_SET(msr);
ffc18294: 7c 00 01 24 mtmsr r0
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
ffc18298: 3d 20 00 00 lis r9,0
ffc1829c: 8b c9 2a 74 lbz r30,10868(r9)
doneConstructors = 1;
ffc182a0: 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 );
ffc182a4: 7f e3 fb 78 mr r3,r31
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
ffc182a8: 98 09 2a 74 stb r0,10868(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 );
ffc182ac: 4b ff 54 a5 bl ffc0d750 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
ffc182b0: 4b ff 43 59 bl ffc0c608 <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
ffc182b4: 2f 9e 00 00 cmpwi cr7,r30,0
ffc182b8: 40 be 00 08 bne+ cr7,ffc182c0 <_Thread_Handler+0x70>
INIT_NAME ();
ffc182bc: 48 00 be 81 bl ffc2413c <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
ffc182c0: 80 1f 00 a8 lwz r0,168(r31)
ffc182c4: 2f 80 00 00 cmpwi cr7,r0,0
ffc182c8: 40 be 00 10 bne+ cr7,ffc182d8 <_Thread_Handler+0x88>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
ffc182cc: 80 1f 00 a4 lwz r0,164(r31)
ffc182d0: 80 7f 00 b0 lwz r3,176(r31)
ffc182d4: 48 00 00 14 b ffc182e8 <_Thread_Handler+0x98>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
ffc182d8: 2f 80 00 01 cmpwi cr7,r0,1
ffc182dc: 40 be 00 18 bne+ cr7,ffc182f4 <_Thread_Handler+0xa4> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
ffc182e0: 80 1f 00 a4 lwz r0,164(r31)
ffc182e4: 80 7f 00 ac lwz r3,172(r31)
ffc182e8: 7c 09 03 a6 mtctr r0
ffc182ec: 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 =
ffc182f0: 90 7f 00 28 stw r3,40(r31)
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
ffc182f4: 7f e3 fb 78 mr r3,r31
ffc182f8: 4b ff 54 c9 bl ffc0d7c0 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
ffc182fc: 38 60 00 00 li r3,0
ffc18300: 38 80 00 01 li r4,1
ffc18304: 38 a0 00 06 li r5,6
ffc18308: 4b ff 31 11 bl ffc0b418 <_Internal_error_Occurred>
ffc0c6dc <_Thread_Initialize>:
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
ffc0c6dc: 2c 05 00 00 cmpwi r5,0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
ffc0c6e0: 94 21 ff d8 stwu r1,-40(r1)
ffc0c6e4: 7c 08 02 a6 mflr r0
ffc0c6e8: 93 41 00 10 stw r26,16(r1)
ffc0c6ec: 7d 3a 4b 78 mr r26,r9
ffc0c6f0: 90 01 00 2c stw r0,44(r1)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0c6f4: 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
)
{
ffc0c6f8: 81 21 00 38 lwz r9,56(r1)
ffc0c6fc: 93 01 00 08 stw r24,8(r1)
ffc0c700: 93 21 00 0c stw r25,12(r1)
ffc0c704: 7d 59 53 78 mr r25,r10
ffc0c708: 93 61 00 14 stw r27,20(r1)
ffc0c70c: 7d 1b 43 78 mr r27,r8
ffc0c710: 93 81 00 18 stw r28,24(r1)
ffc0c714: 7c fc 3b 78 mr r28,r7
ffc0c718: 93 a1 00 1c stw r29,28(r1)
ffc0c71c: 7c dd 33 78 mr r29,r6
ffc0c720: 93 c1 00 20 stw r30,32(r1)
ffc0c724: 7c 7e 1b 78 mr r30,r3
ffc0c728: 93 e1 00 24 stw r31,36(r1)
ffc0c72c: 7c 9f 23 78 mr r31,r4
ffc0c730: 83 09 00 00 lwz r24,0(r9)
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
ffc0c734: 90 04 01 44 stw r0,324(r4)
ffc0c738: 90 04 01 48 stw r0,328(r4)
ffc0c73c: 90 04 01 4c stw r0,332(r4)
extensions_area = NULL;
the_thread->libc_reent = NULL;
ffc0c740: 90 04 01 40 stw r0,320(r4)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
ffc0c744: 40 a2 00 30 bne+ ffc0c774 <_Thread_Initialize+0x98>
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
ffc0c748: 7c 83 23 78 mr r3,r4
ffc0c74c: 7c c4 33 78 mr r4,r6
ffc0c750: 48 00 0a fd bl ffc0d24c <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
ffc0c754: 2c 03 00 00 cmpwi r3,0
ffc0c758: 41 82 01 b8 beq- ffc0c910 <_Thread_Initialize+0x234>
ffc0c75c: 7f 83 e8 40 cmplw cr7,r3,r29
ffc0c760: 41 9c 01 b0 blt- cr7,ffc0c910 <_Thread_Initialize+0x234><== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
ffc0c764: 38 00 00 01 li r0,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;
ffc0c768: 80 bf 00 d8 lwz r5,216(r31)
the_thread->Start.core_allocated_stack = true;
ffc0c76c: 98 1f 00 c8 stb r0,200(r31)
ffc0c770: 48 00 00 0c b ffc0c77c <_Thread_Initialize+0xa0>
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
ffc0c774: 98 04 00 c8 stb r0,200(r4)
ffc0c778: 7c c3 33 78 mr r3,r6
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
ffc0c77c: 2f 9c 00 00 cmpwi cr7,r28,0
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
ffc0c780: 90 bf 00 d0 stw r5,208(r31)
ffc0c784: 3b 80 00 00 li r28,0
the_stack->size = size;
ffc0c788: 90 7f 00 cc stw r3,204(r31)
ffc0c78c: 41 be 00 1c beq+ cr7,ffc0c7a8 <_Thread_Initialize+0xcc>
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
ffc0c790: 38 60 01 08 li r3,264
ffc0c794: 48 00 15 89 bl ffc0dd1c <_Workspace_Allocate>
if ( !fp_area )
ffc0c798: 7c 7c 1b 79 mr. r28,r3
ffc0c79c: 40 a2 00 0c bne+ ffc0c7a8 <_Thread_Initialize+0xcc>
ffc0c7a0: 3b a0 00 00 li r29,0
ffc0c7a4: 48 00 01 04 b ffc0c8a8 <_Thread_Initialize+0x1cc>
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0c7a8: 3d 20 00 00 lis r9,0
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
ffc0c7ac: 93 9f 01 3c stw r28,316(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0c7b0: 38 00 00 00 li r0,0
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0c7b4: 80 69 27 dc lwz r3,10204(r9)
ffc0c7b8: 3b a0 00 00 li r29,0
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc0c7bc: 90 1f 00 6c stw r0,108(r31)
ffc0c7c0: 2f 83 00 00 cmpwi cr7,r3,0
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
ffc0c7c4: 93 9f 00 d4 stw r28,212(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0c7c8: 90 1f 00 50 stw r0,80(r31)
the_watchdog->routine = routine;
ffc0c7cc: 90 1f 00 64 stw r0,100(r31)
the_watchdog->id = id;
ffc0c7d0: 90 1f 00 68 stw r0,104(r31)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
ffc0c7d4: 41 be 00 18 beq+ cr7,ffc0c7ec <_Thread_Initialize+0x110>
extensions_area = _Workspace_Allocate(
ffc0c7d8: 38 63 00 01 addi r3,r3,1
ffc0c7dc: 54 63 10 3a rlwinm r3,r3,2,0,29
ffc0c7e0: 48 00 15 3d bl ffc0dd1c <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
ffc0c7e4: 7c 7d 1b 79 mr. r29,r3
ffc0c7e8: 41 82 00 c0 beq- ffc0c8a8 <_Thread_Initialize+0x1cc>
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0c7ec: 2f 9d 00 00 cmpwi cr7,r29,0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
ffc0c7f0: 93 bf 01 50 stw r29,336(r31)
* if they are linked to the thread. An extension user may
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
ffc0c7f4: 41 9e 00 30 beq- cr7,ffc0c824 <_Thread_Initialize+0x148>
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0c7f8: 3d 20 00 00 lis r9,0
ffc0c7fc: 81 69 27 dc lwz r11,10204(r9)
the_thread->extensions[i] = NULL;
ffc0c800: 38 00 00 00 li r0,0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0c804: 39 20 00 00 li r9,0
ffc0c808: 48 00 00 0c b ffc0c814 <_Thread_Initialize+0x138>
the_thread->extensions[i] = NULL;
ffc0c80c: 81 1f 01 50 lwz r8,336(r31)
ffc0c810: 7c 08 51 2e stwx r0,r8,r10
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0c814: 7f 89 58 40 cmplw cr7,r9,r11
the_thread->extensions[i] = NULL;
ffc0c818: 55 2a 10 3a rlwinm r10,r9,2,0,29
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
ffc0c81c: 39 29 00 01 addi r9,r9,1
ffc0c820: 40 9d ff ec ble+ cr7,ffc0c80c <_Thread_Initialize+0x130>
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
ffc0c824: 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;
ffc0c828: 80 01 00 30 lwz r0,48(r1)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
ffc0c82c: 9b 5f 00 b4 stb r26,180(r31)
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
ffc0c830: 90 1f 00 bc stw r0,188(r31)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
ffc0c834: 93 3f 00 b8 stw r25,184(r31)
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
ffc0c838: 40 be 00 10 bne+ cr7,ffc0c848 <_Thread_Initialize+0x16c>
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;
ffc0c83c: 3d 20 00 00 lis r9,0
ffc0c840: 80 09 27 a8 lwz r0,10152(r9)
ffc0c844: 90 1f 00 78 stw r0,120(r31)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0c848: 80 01 00 34 lwz r0,52(r1)
the_thread->current_state = STATES_DORMANT;
the_thread->Wait.queue = NULL;
ffc0c84c: 3b 40 00 00 li r26,0
ffc0c850: 93 5f 00 44 stw r26,68(r31)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
ffc0c854: 7f 64 db 78 mr r4,r27
ffc0c858: 7f e3 fb 78 mr r3,r31
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
ffc0c85c: 90 1f 00 c0 stw r0,192(r31)
the_thread->current_state = STATES_DORMANT;
ffc0c860: 38 00 00 01 li r0,1
ffc0c864: 90 1f 00 10 stw r0,16(r31)
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
ffc0c868: 93 5f 00 1c stw r26,28(r31)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
ffc0c86c: 93 7f 00 18 stw r27,24(r31)
the_thread->Start.initial_priority = priority;
ffc0c870: 93 7f 00 c4 stw r27,196(r31)
_Thread_Set_priority( the_thread, priority );
ffc0c874: 48 00 07 d1 bl ffc0d044 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0c878: a0 1f 00 0a lhz r0,10(r31)
ffc0c87c: 81 3e 00 1c lwz r9,28(r30)
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
ffc0c880: 7f e3 fb 78 mr r3,r31
ffc0c884: 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 );
ffc0c888: 93 5f 00 88 stw r26,136(r31)
ffc0c88c: 7f e9 01 2e stwx r31,r9,r0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc0c890: 93 1f 00 0c stw r24,12(r31)
ffc0c894: 93 5f 00 84 stw r26,132(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 );
ffc0c898: 48 00 10 29 bl ffc0d8c0 <_User_extensions_Thread_create>
if ( extension_status )
ffc0c89c: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8a0: 38 60 00 01 li r3,1
ffc0c8a4: 40 9e 00 70 bne- cr7,ffc0c914 <_Thread_Initialize+0x238>
return true;
failed:
if ( the_thread->libc_reent )
ffc0c8a8: 80 7f 01 40 lwz r3,320(r31)
ffc0c8ac: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8b0: 41 9e 00 08 beq- cr7,ffc0c8b8 <_Thread_Initialize+0x1dc>
_Workspace_Free( the_thread->libc_reent );
ffc0c8b4: 48 00 14 9d bl ffc0dd50 <_Workspace_Free>
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
ffc0c8b8: 80 7f 01 44 lwz r3,324(r31)
ffc0c8bc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8c0: 41 9e 00 08 beq- cr7,ffc0c8c8 <_Thread_Initialize+0x1ec>
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0c8c4: 48 00 14 8d bl ffc0dd50 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
ffc0c8c8: 80 7f 01 48 lwz r3,328(r31)
ffc0c8cc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8d0: 41 9e 00 08 beq- cr7,ffc0c8d8 <_Thread_Initialize+0x1fc>
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0c8d4: 48 00 14 7d bl ffc0dd50 <_Workspace_Free>
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
ffc0c8d8: 80 7f 01 4c lwz r3,332(r31)
ffc0c8dc: 2f 83 00 00 cmpwi cr7,r3,0
ffc0c8e0: 41 9e 00 08 beq- cr7,ffc0c8e8 <_Thread_Initialize+0x20c><== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
ffc0c8e4: 48 00 14 6d bl ffc0dd50 <_Workspace_Free> <== NOT EXECUTED
if ( extensions_area )
ffc0c8e8: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0c8ec: 41 9e 00 0c beq- cr7,ffc0c8f8 <_Thread_Initialize+0x21c>
(void) _Workspace_Free( extensions_area );
ffc0c8f0: 7f a3 eb 78 mr r3,r29
ffc0c8f4: 48 00 14 5d bl ffc0dd50 <_Workspace_Free>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
ffc0c8f8: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0c8fc: 41 9e 00 0c beq- cr7,ffc0c908 <_Thread_Initialize+0x22c>
(void) _Workspace_Free( fp_area );
ffc0c900: 7f 83 e3 78 mr r3,r28
ffc0c904: 48 00 14 4d bl ffc0dd50 <_Workspace_Free>
#endif
_Thread_Stack_Free( the_thread );
ffc0c908: 7f e3 fb 78 mr r3,r31
ffc0c90c: 48 00 09 cd bl ffc0d2d8 <_Thread_Stack_Free>
return false;
ffc0c910: 38 60 00 00 li r3,0
}
ffc0c914: 80 01 00 2c lwz r0,44(r1)
ffc0c918: 83 01 00 08 lwz r24,8(r1)
ffc0c91c: 7c 08 03 a6 mtlr r0
ffc0c920: 83 21 00 0c lwz r25,12(r1)
ffc0c924: 83 41 00 10 lwz r26,16(r1)
ffc0c928: 83 61 00 14 lwz r27,20(r1)
ffc0c92c: 83 81 00 18 lwz r28,24(r1)
ffc0c930: 83 a1 00 1c lwz r29,28(r1)
ffc0c934: 83 c1 00 20 lwz r30,32(r1)
ffc0c938: 83 e1 00 24 lwz r31,36(r1)
ffc0c93c: 38 21 00 28 addi r1,r1,40
ffc0c940: 4e 80 00 20 blr
ffc0c9b4 <_Thread_Restart>:
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0c9b4: 94 21 ff e8 stwu r1,-24(r1)
ffc0c9b8: 7c 08 02 a6 mflr r0
ffc0c9bc: 90 01 00 1c stw r0,28(r1)
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0c9c0: 80 03 00 10 lwz r0,16(r3)
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
ffc0c9c4: 93 e1 00 14 stw r31,20(r1)
ffc0c9c8: 7c 7f 1b 78 mr r31,r3
if ( !_States_Is_dormant( the_thread->current_state ) ) {
ffc0c9cc: 70 09 00 01 andi. r9,r0,1
ffc0c9d0: 38 00 00 00 li r0,0
ffc0c9d4: 40 a2 00 74 bne+ ffc0ca48 <_Thread_Restart+0x94>
_Thread_Set_transient( the_thread );
ffc0c9d8: 90 81 00 08 stw r4,8(r1)
ffc0c9dc: 90 a1 00 0c stw r5,12(r1)
ffc0c9e0: 48 00 01 f5 bl ffc0cbd4 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
ffc0c9e4: 7f e3 fb 78 mr r3,r31
ffc0c9e8: 80 81 00 08 lwz r4,8(r1)
ffc0c9ec: 80 a1 00 0c lwz r5,12(r1)
ffc0c9f0: 48 00 55 31 bl ffc11f20 <_Thread_Reset>
_Thread_Load_environment( the_thread );
ffc0c9f4: 7f e3 fb 78 mr r3,r31
ffc0c9f8: 48 00 51 25 bl ffc11b1c <_Thread_Load_environment>
_Thread_Ready( the_thread );
ffc0c9fc: 7f e3 fb 78 mr r3,r31
ffc0ca00: 48 00 54 45 bl ffc11e44 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
ffc0ca04: 7f e3 fb 78 mr r3,r31
ffc0ca08: 48 00 0a 99 bl ffc0d4a0 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
ffc0ca0c: 3d 20 00 00 lis r9,0
ffc0ca10: 81 29 28 00 lwz r9,10240(r9)
ffc0ca14: 38 00 00 01 li r0,1
ffc0ca18: 7f 9f 48 00 cmpw cr7,r31,r9
ffc0ca1c: 40 be 00 2c bne+ cr7,ffc0ca48 <_Thread_Restart+0x94>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
ffc0ca20: 80 1f 01 3c lwz r0,316(r31)
ffc0ca24: 2f 80 00 00 cmpwi cr7,r0,0
ffc0ca28: 41 9e 00 0c beq- cr7,ffc0ca34 <_Thread_Restart+0x80> <== NEVER TAKEN
_Context_Restore_fp( &_Thread_Executing->fp_context );
ffc0ca2c: 38 7f 01 3c addi r3,r31,316
ffc0ca30: 48 01 62 31 bl ffc22c60 <_CPU_Context_restore_fp>
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
ffc0ca34: 3d 20 00 00 lis r9,0
ffc0ca38: 80 69 28 00 lwz r3,10240(r9)
ffc0ca3c: 38 63 00 dc addi r3,r3,220
ffc0ca40: 48 01 63 e1 bl ffc22e20 <_CPU_Context_restore>
ffc0ca44: 38 00 00 01 li r0,1 <== NOT EXECUTED
return true;
}
return false;
}
ffc0ca48: 7c 03 03 78 mr r3,r0
ffc0ca4c: 80 01 00 1c lwz r0,28(r1)
ffc0ca50: 83 e1 00 14 lwz r31,20(r1)
ffc0ca54: 38 21 00 18 addi r1,r1,24
ffc0ca58: 7c 08 03 a6 mtlr r0
ffc0ca5c: 4e 80 00 20 blr
ffc0f798 <_Thread_Resume>:
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0f798: 7c 00 00 a6 mfmsr r0
ffc0f79c: 7d 30 42 a6 mfsprg r9,0
ffc0f7a0: 7c 09 48 78 andc r9,r0,r9
ffc0f7a4: 7d 20 01 24 mtmsr r9
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
ffc0f7a8: 81 23 00 10 lwz r9,16(r3)
if ( current_state & STATES_SUSPENDED ) {
ffc0f7ac: 71 2b 00 02 andi. r11,r9,2
ffc0f7b0: 41 82 00 a8 beq- ffc0f858 <_Thread_Resume+0xc0> <== NEVER TAKEN
ffc0f7b4: 55 29 07 fa rlwinm r9,r9,0,31,29
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
ffc0f7b8: 2f 89 00 00 cmpwi cr7,r9,0
}
#endif
current_state = the_thread->current_state;
if ( current_state & STATES_SUSPENDED ) {
current_state =
ffc0f7bc: 91 23 00 10 stw r9,16(r3)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
ffc0f7c0: 40 9e 00 98 bne- cr7,ffc0f858 <_Thread_Resume+0xc0>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
ffc0f7c4: 81 63 00 90 lwz r11,144(r3)
ffc0f7c8: 81 43 00 98 lwz r10,152(r3)
ffc0f7cc: 81 0b 00 00 lwz r8,0(r11)
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
ffc0f7d0: 81 23 00 8c lwz r9,140(r3)
ffc0f7d4: 7d 0a 53 78 or r10,r8,r10
ffc0f7d8: 91 4b 00 00 stw r10,0(r11)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0f7dc: 39 69 00 04 addi r11,r9,4
_Priority_Major_bit_map |= the_priority_map->ready_major;
ffc0f7e0: 3d 40 00 00 lis r10,0
ffc0f7e4: 91 63 00 00 stw r11,0(r3)
ffc0f7e8: 80 ea 27 e4 lwz r7,10212(r10)
ffc0f7ec: 81 03 00 94 lwz r8,148(r3)
old_last_node = the_chain->last;
ffc0f7f0: 81 69 00 08 lwz r11,8(r9)
ffc0f7f4: 7c e8 43 78 or r8,r7,r8
the_chain->last = the_node;
ffc0f7f8: 90 69 00 08 stw r3,8(r9)
ffc0f7fc: 91 0a 27 e4 stw r8,10212(r10)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0f800: 91 63 00 04 stw r11,4(r3)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0f804: 90 6b 00 00 stw r3,0(r11)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0f808: 7d 20 00 a6 mfmsr r9
ffc0f80c: 7c 00 01 24 mtmsr r0
ffc0f810: 7d 20 01 24 mtmsr r9
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
ffc0f814: 3d 60 00 00 lis r11,0
ffc0f818: 81 23 00 14 lwz r9,20(r3)
ffc0f81c: 81 4b 27 cc lwz r10,10188(r11)
ffc0f820: 81 4a 00 14 lwz r10,20(r10)
ffc0f824: 7f 89 50 40 cmplw cr7,r9,r10
ffc0f828: 40 9c 00 30 bge- cr7,ffc0f858 <_Thread_Resume+0xc0>
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
ffc0f82c: 3d 40 00 00 lis r10,0
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
ffc0f830: 90 6b 27 cc stw r3,10188(r11)
if ( _Thread_Executing->is_preemptible ||
ffc0f834: 81 4a 27 f0 lwz r10,10224(r10)
ffc0f838: 89 6a 00 75 lbz r11,117(r10)
ffc0f83c: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0f840: 40 9e 00 0c bne- cr7,ffc0f84c <_Thread_Resume+0xb4>
ffc0f844: 2f 89 00 00 cmpwi cr7,r9,0
ffc0f848: 40 9e 00 10 bne- cr7,ffc0f858 <_Thread_Resume+0xc0> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
ffc0f84c: 39 60 00 01 li r11,1
ffc0f850: 3d 20 00 00 lis r9,0
ffc0f854: 99 69 28 00 stb r11,10240(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0f858: 7c 00 01 24 mtmsr r0
}
}
}
_ISR_Enable( level );
}
ffc0f85c: 4e 80 00 20 blr
ffc11464 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
ffc11464: 94 21 ff f0 stwu r1,-16(r1)
ffc11468: 7c 08 02 a6 mflr r0
Thread_Control *executing;
executing = _Thread_Executing;
ffc1146c: 3d 20 00 00 lis r9,0
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
ffc11470: 90 01 00 14 stw r0,20(r1)
ffc11474: 93 e1 00 0c stw r31,12(r1)
Thread_Control *executing;
executing = _Thread_Executing;
ffc11478: 83 e9 28 14 lwz r31,10260(r9)
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
ffc1147c: 88 1f 00 75 lbz r0,117(r31)
ffc11480: 2f 80 00 00 cmpwi cr7,r0,0
ffc11484: 41 9e 00 7c beq- cr7,ffc11500 <_Thread_Tickle_timeslice+0x9c>
return;
if ( !_States_Is_ready( executing->current_state ) )
ffc11488: 80 1f 00 10 lwz r0,16(r31)
ffc1148c: 2f 80 00 00 cmpwi cr7,r0,0
ffc11490: 40 9e 00 70 bne- cr7,ffc11500 <_Thread_Tickle_timeslice+0x9c>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
ffc11494: 80 1f 00 7c lwz r0,124(r31)
ffc11498: 2b 80 00 01 cmplwi cr7,r0,1
ffc1149c: 41 9c 00 64 blt- cr7,ffc11500 <_Thread_Tickle_timeslice+0x9c>
ffc114a0: 2b 80 00 02 cmplwi cr7,r0,2
ffc114a4: 40 9d 00 10 ble- cr7,ffc114b4 <_Thread_Tickle_timeslice+0x50>
ffc114a8: 2f 80 00 03 cmpwi cr7,r0,3
ffc114ac: 40 be 00 54 bne+ cr7,ffc11500 <_Thread_Tickle_timeslice+0x9c><== NEVER TAKEN
ffc114b0: 48 00 00 2c b ffc114dc <_Thread_Tickle_timeslice+0x78>
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 ) {
ffc114b4: 81 3f 00 78 lwz r9,120(r31)
ffc114b8: 38 09 ff ff addi r0,r9,-1
ffc114bc: 2f 80 00 00 cmpwi cr7,r0,0
ffc114c0: 90 1f 00 78 stw r0,120(r31)
ffc114c4: 41 bd 00 3c bgt+ cr7,ffc11500 <_Thread_Tickle_timeslice+0x9c>
_Thread_Reset_timeslice();
ffc114c8: 48 00 50 29 bl ffc164f0 <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc114cc: 3d 20 00 00 lis r9,0
ffc114d0: 80 09 27 cc lwz r0,10188(r9)
ffc114d4: 90 1f 00 78 stw r0,120(r31)
ffc114d8: 48 00 00 28 b ffc11500 <_Thread_Tickle_timeslice+0x9c>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
ffc114dc: 81 3f 00 78 lwz r9,120(r31)
ffc114e0: 38 09 ff ff addi r0,r9,-1
ffc114e4: 2f 80 00 00 cmpwi cr7,r0,0
ffc114e8: 90 1f 00 78 stw r0,120(r31)
ffc114ec: 40 be 00 14 bne+ cr7,ffc11500 <_Thread_Tickle_timeslice+0x9c>
(*executing->budget_callout)( executing );
ffc114f0: 80 1f 00 80 lwz r0,128(r31)
ffc114f4: 7f e3 fb 78 mr r3,r31
ffc114f8: 7c 09 03 a6 mtctr r0
ffc114fc: 4e 80 04 21 bctrl
break;
#endif
}
}
ffc11500: 80 01 00 14 lwz r0,20(r1)
ffc11504: 83 e1 00 0c lwz r31,12(r1)
ffc11508: 38 21 00 10 addi r1,r1,16
ffc1150c: 7c 08 03 a6 mtlr r0
ffc11510: 4e 80 00 20 blr
ffc0d514 <_Thread_Yield_processor>:
{
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ffc0d514: 3d 20 00 00 lis r9,0
ffc0d518: 81 29 27 f0 lwz r9,10224(r9)
ready = executing->ready;
ffc0d51c: 81 69 00 8c lwz r11,140(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0d520: 7c 00 00 a6 mfmsr r0
ffc0d524: 7d 50 42 a6 mfsprg r10,0
ffc0d528: 7c 0a 50 78 andc r10,r0,r10
ffc0d52c: 7d 40 01 24 mtmsr r10
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
ffc0d530: 80 eb 00 00 lwz r7,0(r11)
ffc0d534: 3d 40 00 00 lis r10,0
ffc0d538: 81 0b 00 08 lwz r8,8(r11)
ffc0d53c: 7f 87 40 00 cmpw cr7,r7,r8
ffc0d540: 41 9e 00 50 beq- cr7,ffc0d590 <_Thread_Yield_processor+0x7c>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0d544: 81 09 00 00 lwz r8,0(r9)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0d548: 38 cb 00 04 addi r6,r11,4
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
ffc0d54c: 80 e9 00 04 lwz r7,4(r9)
next->previous = previous;
previous->next = next;
ffc0d550: 91 07 00 00 stw r8,0(r7)
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
ffc0d554: 90 e8 00 04 stw r7,4(r8)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
ffc0d558: 90 c9 00 00 stw r6,0(r9)
old_last_node = the_chain->last;
ffc0d55c: 81 0b 00 08 lwz r8,8(r11)
the_chain->last = the_node;
ffc0d560: 91 2b 00 08 stw r9,8(r11)
old_last_node->next = the_node;
the_node->previous = old_last_node;
ffc0d564: 91 09 00 04 stw r8,4(r9)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
ffc0d568: 91 28 00 00 stw r9,0(r8)
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0d56c: 7d 00 00 a6 mfmsr r8
ffc0d570: 7c 00 01 24 mtmsr r0
ffc0d574: 7d 00 01 24 mtmsr r8
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
ffc0d578: 81 0a 27 cc lwz r8,10188(r10)
ffc0d57c: 7f 89 40 00 cmpw cr7,r9,r8
ffc0d580: 40 be 00 1c bne+ cr7,ffc0d59c <_Thread_Yield_processor+0x88><== NEVER TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
ffc0d584: 81 2b 00 00 lwz r9,0(r11)
ffc0d588: 91 2a 27 cc stw r9,10188(r10)
ffc0d58c: 48 00 00 10 b ffc0d59c <_Thread_Yield_processor+0x88>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
ffc0d590: 81 6a 27 cc lwz r11,10188(r10)
ffc0d594: 7f 89 58 00 cmpw cr7,r9,r11
ffc0d598: 41 9e 00 10 beq- cr7,ffc0d5a8 <_Thread_Yield_processor+0x94><== ALWAYS TAKEN
_Context_Switch_necessary = true;
ffc0d59c: 39 60 00 01 li r11,1
ffc0d5a0: 3d 20 00 00 lis r9,0
ffc0d5a4: 99 69 28 00 stb r11,10240(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0d5a8: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
}
ffc0d5ac: 4e 80 00 20 blr
ffc0cce0 <_Thread_queue_Enqueue_priority>:
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
ffc0cce0: 80 04 00 14 lwz r0,20(r4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc0cce4: 39 04 00 3c addi r8,r4,60
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
ffc0cce8: 94 21 ff f0 stwu r1,-16(r1)
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc0ccec: 39 64 00 38 addi r11,r4,56
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
ffc0ccf0: 70 09 00 20 andi. r9,r0,32
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
ffc0ccf4: 54 0a d1 be rlwinm r10,r0,26,6,31
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc0ccf8: 91 04 00 38 stw r8,56(r4)
ffc0ccfc: 1d 4a 00 0c mulli r10,r10,12
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
ffc0cd00: 93 e1 00 0c stw r31,12(r1)
the_chain->permanent_null = NULL;
ffc0cd04: 39 00 00 00 li r8,0
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
ffc0cd08: 81 23 00 38 lwz r9,56(r3)
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
ffc0cd0c: 7d 43 52 14 add r10,r3,r10
ffc0cd10: 91 04 00 3c stw r8,60(r4)
the_chain->last = _Chain_Head(the_chain);
ffc0cd14: 91 64 00 40 stw r11,64(r4)
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
ffc0cd18: 40 82 00 98 bne- ffc0cdb0 <_Thread_queue_Enqueue_priority+0xd0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc0cd1c: 38 ca 00 04 addi r6,r10,4
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0cd20: 7d 00 00 a6 mfmsr r8
ffc0cd24: 7d 70 42 a6 mfsprg r11,0
ffc0cd28: 7d 0b 58 78 andc r11,r8,r11
ffc0cd2c: 7d 60 01 24 mtmsr r11
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
ffc0cd30: 38 e0 ff ff li r7,-1
ffc0cd34: 81 6a 00 00 lwz r11,0(r10)
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0cd38: 48 00 00 34 b ffc0cd6c <_Thread_queue_Enqueue_priority+0x8c>
search_priority = search_thread->current_priority;
ffc0cd3c: 80 eb 00 14 lwz r7,20(r11)
if ( priority <= search_priority )
ffc0cd40: 7f 80 38 40 cmplw cr7,r0,r7
ffc0cd44: 40 9d 00 30 ble- cr7,ffc0cd74 <_Thread_queue_Enqueue_priority+0x94>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0cd48: 7d 80 00 a6 mfmsr r12
ffc0cd4c: 7d 00 01 24 mtmsr r8
ffc0cd50: 7d 80 01 24 mtmsr r12
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
ffc0cd54: 81 8b 00 10 lwz r12,16(r11)
ffc0cd58: 7d 3f 60 39 and. r31,r9,r12
ffc0cd5c: 40 a2 00 0c bne+ ffc0cd68 <_Thread_queue_Enqueue_priority+0x88><== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0cd60: 7d 00 01 24 mtmsr r8 <== NOT EXECUTED
ffc0cd64: 4b ff ff bc b ffc0cd20 <_Thread_queue_Enqueue_priority+0x40><== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
ffc0cd68: 81 6b 00 00 lwz r11,0(r11)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0cd6c: 7f 8b 30 00 cmpw cr7,r11,r6
ffc0cd70: 40 9e ff cc bne+ cr7,ffc0cd3c <_Thread_queue_Enqueue_priority+0x5c>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
ffc0cd74: 81 43 00 30 lwz r10,48(r3)
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
ffc0cd78: 7d 09 43 78 mr r9,r8
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
ffc0cd7c: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0cd80: 40 be 00 f8 bne+ cr7,ffc0ce78 <_Thread_queue_Enqueue_priority+0x198>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
ffc0cd84: 7f 80 38 00 cmpw cr7,r0,r7
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0cd88: 38 00 00 00 li r0,0
ffc0cd8c: 90 03 00 30 stw r0,48(r3)
if ( priority == search_priority )
ffc0cd90: 41 9e 00 c4 beq- cr7,ffc0ce54 <_Thread_queue_Enqueue_priority+0x174>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
ffc0cd94: 81 2b 00 04 lwz r9,4(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
ffc0cd98: 91 64 00 00 stw r11,0(r4)
the_node->previous = previous_node;
ffc0cd9c: 91 24 00 04 stw r9,4(r4)
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
ffc0cda0: 90 64 00 44 stw r3,68(r4)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
ffc0cda4: 90 89 00 00 stw r4,0(r9)
search_node->previous = the_node;
ffc0cda8: 90 8b 00 04 stw r4,4(r11)
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
ffc0cdac: 48 00 00 9c b ffc0ce48 <_Thread_queue_Enqueue_priority+0x168>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
ffc0cdb0: 3c c0 00 00 lis r6,0
ffc0cdb4: 38 c6 26 e4 addi r6,r6,9956
ffc0cdb8: 88 e6 00 00 lbz r7,0(r6)
ffc0cdbc: 38 e7 00 01 addi r7,r7,1
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0cdc0: 7d 00 00 a6 mfmsr r8
ffc0cdc4: 7d 70 42 a6 mfsprg r11,0
ffc0cdc8: 7d 0b 58 78 andc r11,r8,r11
ffc0cdcc: 7d 60 01 24 mtmsr r11
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
ffc0cdd0: 81 6a 00 08 lwz r11,8(r10)
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0cdd4: 48 00 00 34 b ffc0ce08 <_Thread_queue_Enqueue_priority+0x128>
search_priority = search_thread->current_priority;
ffc0cdd8: 80 eb 00 14 lwz r7,20(r11)
if ( priority >= search_priority )
ffc0cddc: 7f 80 38 40 cmplw cr7,r0,r7
ffc0cde0: 40 9c 00 30 bge- cr7,ffc0ce10 <_Thread_queue_Enqueue_priority+0x130>
static inline void ppc_interrupt_flash( uint32_t level )
{
uint32_t current_level;
asm volatile (
ffc0cde4: 7d 80 00 a6 mfmsr r12
ffc0cde8: 7d 00 01 24 mtmsr r8
ffc0cdec: 7d 80 01 24 mtmsr r12
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
ffc0cdf0: 81 8b 00 10 lwz r12,16(r11)
ffc0cdf4: 7d 3f 60 39 and. r31,r9,r12
ffc0cdf8: 40 a2 00 0c bne+ ffc0ce04 <_Thread_queue_Enqueue_priority+0x124>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0cdfc: 7d 00 01 24 mtmsr r8
ffc0ce00: 4b ff ff b8 b ffc0cdb8 <_Thread_queue_Enqueue_priority+0xd8>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
ffc0ce04: 81 6b 00 04 lwz r11,4(r11)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0ce08: 7f 8b 50 00 cmpw cr7,r11,r10
ffc0ce0c: 40 9e ff cc bne+ cr7,ffc0cdd8 <_Thread_queue_Enqueue_priority+0xf8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
ffc0ce10: 81 43 00 30 lwz r10,48(r3)
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
ffc0ce14: 7d 09 43 78 mr r9,r8
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
ffc0ce18: 2f 8a 00 01 cmpwi cr7,r10,1
ffc0ce1c: 40 be 00 5c bne+ cr7,ffc0ce78 <_Thread_queue_Enqueue_priority+0x198>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
ffc0ce20: 7f 80 38 00 cmpw cr7,r0,r7
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
ffc0ce24: 38 00 00 00 li r0,0
ffc0ce28: 90 03 00 30 stw r0,48(r3)
if ( priority == search_priority )
ffc0ce2c: 41 9e 00 28 beq- cr7,ffc0ce54 <_Thread_queue_Enqueue_priority+0x174>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
ffc0ce30: 81 2b 00 00 lwz r9,0(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
ffc0ce34: 91 64 00 04 stw r11,4(r4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
ffc0ce38: 91 24 00 00 stw r9,0(r4)
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
ffc0ce3c: 90 64 00 44 stw r3,68(r4)
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
ffc0ce40: 90 8b 00 00 stw r4,0(r11)
next_node->previous = the_node;
ffc0ce44: 90 89 00 04 stw r4,4(r9)
ffc0ce48: 7d 00 01 24 mtmsr r8
ffc0ce4c: 38 60 00 01 li r3,1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
ffc0ce50: 48 00 00 30 b ffc0ce80 <_Thread_queue_Enqueue_priority+0x1a0>
ffc0ce54: 39 6b 00 3c addi r11,r11,60
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
ffc0ce58: 90 64 00 44 stw r3,68(r4)
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
ffc0ce5c: 81 4b 00 04 lwz r10,4(r11)
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
ffc0ce60: 91 64 00 00 stw r11,0(r4)
the_node->previous = previous_node;
ffc0ce64: 91 44 00 04 stw r10,4(r4)
previous_node->next = the_node;
ffc0ce68: 90 8a 00 00 stw r4,0(r10)
search_node->previous = the_node;
ffc0ce6c: 90 8b 00 04 stw r4,4(r11)
ffc0ce70: 7d 20 01 24 mtmsr r9
ffc0ce74: 4b ff ff d8 b ffc0ce4c <_Thread_queue_Enqueue_priority+0x16c>
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
ffc0ce78: 91 25 00 00 stw r9,0(r5)
return the_thread_queue->sync_state;
ffc0ce7c: 80 63 00 30 lwz r3,48(r3)
}
ffc0ce80: 83 e1 00 0c lwz r31,12(r1)
ffc0ce84: 38 21 00 10 addi r1,r1,16
ffc0ce88: 4e 80 00 20 blr
ffc0cf70 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0cf70: 94 21 ff d8 stwu r1,-40(r1)
ffc0cf74: 7c 08 02 a6 mflr r0
ffc0cf78: 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 )
ffc0cf7c: 7c 7f 1b 79 mr. r31,r3
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
ffc0cf80: 93 c1 00 20 stw r30,32(r1)
ffc0cf84: 7c 9e 23 78 mr r30,r4
ffc0cf88: 90 01 00 2c stw r0,44(r1)
ffc0cf8c: 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 )
ffc0cf90: 41 82 00 54 beq- ffc0cfe4 <_Thread_queue_Requeue+0x74> <== 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 ) {
ffc0cf94: 80 1f 00 34 lwz r0,52(r31)
ffc0cf98: 2f 80 00 01 cmpwi cr7,r0,1
ffc0cf9c: 40 be 00 48 bne+ cr7,ffc0cfe4 <_Thread_queue_Requeue+0x74><== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0cfa0: 7f a0 00 a6 mfmsr r29
ffc0cfa4: 7d 30 42 a6 mfsprg r9,0
ffc0cfa8: 7f a9 48 78 andc r9,r29,r9
ffc0cfac: 7d 20 01 24 mtmsr r9
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
ffc0cfb0: 3d 60 00 03 lis r11,3
ffc0cfb4: 81 24 00 10 lwz r9,16(r4)
ffc0cfb8: 61 6b be e0 ori r11,r11,48864
ffc0cfbc: 7d 6a 48 39 and. r10,r11,r9
ffc0cfc0: 41 a2 00 20 beq+ ffc0cfe0 <_Thread_queue_Requeue+0x70> <== NEVER TAKEN
ffc0cfc4: 90 1f 00 30 stw r0,48(r31)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
ffc0cfc8: 38 a0 00 01 li r5,1
ffc0cfcc: 48 00 88 8d bl ffc15858 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
ffc0cfd0: 7f e3 fb 78 mr r3,r31
ffc0cfd4: 7f c4 f3 78 mr r4,r30
ffc0cfd8: 38 a1 00 08 addi r5,r1,8
ffc0cfdc: 4b ff fd 05 bl ffc0cce0 <_Thread_queue_Enqueue_priority>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0cfe0: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
}
ffc0cfe4: 80 01 00 2c lwz r0,44(r1)
ffc0cfe8: 83 a1 00 1c lwz r29,28(r1)
ffc0cfec: 7c 08 03 a6 mtlr r0
ffc0cff0: 83 c1 00 20 lwz r30,32(r1)
ffc0cff4: 83 e1 00 24 lwz r31,36(r1)
ffc0cff8: 38 21 00 28 addi r1,r1,40
ffc0cffc: 4e 80 00 20 blr
ffc0d000 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0d000: 94 21 ff e8 stwu r1,-24(r1)
ffc0d004: 7c 08 02 a6 mflr r0
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0d008: 38 81 00 08 addi r4,r1,8
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
ffc0d00c: 90 01 00 1c stw r0,28(r1)
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
ffc0d010: 4b ff f6 19 bl ffc0c628 <_Thread_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 18 bne- cr7,ffc0d034 <_Thread_queue_Timeout+0x34><== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
ffc0d020: 48 00 89 35 bl ffc15954 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
ffc0d024: 3d 20 00 00 lis r9,0
ffc0d028: 81 69 27 b0 lwz r11,10160(r9)
ffc0d02c: 38 0b ff ff addi r0,r11,-1
ffc0d030: 90 09 27 b0 stw r0,10160(r9)
_Thread_Unnest_dispatch();
break;
}
}
ffc0d034: 80 01 00 1c lwz r0,28(r1)
ffc0d038: 38 21 00 18 addi r1,r1,24
ffc0d03c: 7c 08 03 a6 mtlr r0
ffc0d040: 4e 80 00 20 blr
ffc1a620 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a620: 94 21 ff 98 stwu r1,-104(r1)
ffc1a624: 7c 08 02 a6 mflr r0
ffc1a628: 92 01 00 28 stw r16,40(r1)
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc1a62c: 3a 01 00 08 addi r16,r1,8
ffc1a630: 90 01 00 6c stw r0,108(r1)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
ffc1a634: 38 00 00 00 li r0,0
ffc1a638: 93 01 00 48 stw r24,72(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc1a63c: 3b 01 00 0c addi r24,r1,12
ffc1a640: 93 61 00 54 stw r27,84(r1)
ffc1a644: 3b 61 00 18 addi r27,r1,24
ffc1a648: 93 c1 00 60 stw r30,96(r1)
ffc1a64c: 3b c1 00 14 addi r30,r1,20
ffc1a650: 92 21 00 2c stw r17,44(r1)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1a654: 3e 20 00 00 lis r17,0
ffc1a658: 3a 31 28 e4 addi r17,r17,10468
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a65c: 92 41 00 30 stw r18,48(r1)
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ffc1a660: 3e 40 00 00 lis r18,0
ffc1a664: 3a 52 28 ac addi r18,r18,10412
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a668: 93 21 00 4c stw r25,76(r1)
ffc1a66c: 3f 20 00 00 lis r25,0
ffc1a670: 3b 39 28 8c addi r25,r25,10380
ffc1a674: 93 a1 00 5c stw r29,92(r1)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
ffc1a678: 90 01 00 18 stw r0,24(r1)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc1a67c: 93 01 00 08 stw r24,8(r1)
the_chain->permanent_null = NULL;
ffc1a680: 90 01 00 0c stw r0,12(r1)
the_chain->last = _Chain_Head(the_chain);
ffc1a684: 92 01 00 10 stw r16,16(r1)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ffc1a688: 93 61 00 14 stw r27,20(r1)
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
ffc1a68c: 93 c1 00 1c stw r30,28(r1)
ffc1a690: 92 61 00 34 stw r19,52(r1)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc1a694: 3a 63 00 08 addi r19,r3,8
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a698: 92 81 00 38 stw r20,56(r1)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc1a69c: 3a 83 00 40 addi r20,r3,64
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a6a0: 92 a1 00 3c stw r21,60(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
ffc1a6a4: 3a a0 00 00 li r21,0
ffc1a6a8: 92 c1 00 40 stw r22,64(r1)
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
ffc1a6ac: 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
)
{
ffc1a6b0: 92 e1 00 44 stw r23,68(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;
ffc1a6b4: 3a e0 00 01 li r23,1
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a6b8: 93 41 00 50 stw r26,80(r1)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1a6bc: 3b 43 00 30 addi r26,r3,48
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a6c0: 93 81 00 58 stw r28,88(r1)
/*
* 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 );
ffc1a6c4: 3b 83 00 68 addi r28,r3,104
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
ffc1a6c8: 93 e1 00 64 stw r31,100(r1)
ffc1a6cc: 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;
ffc1a6d0: 92 1f 00 78 stw r16,120(r31)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
ffc1a6d4: 80 11 00 00 lwz r0,0(r17)
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1a6d8: 7f c5 f3 78 mr r5,r30
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
ffc1a6dc: 80 9f 00 3c lwz r4,60(r31)
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1a6e0: 7f 43 d3 78 mr r3,r26
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
ffc1a6e4: 90 1f 00 3c stw r0,60(r31)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
ffc1a6e8: 7c 84 00 50 subf r4,r4,r0
ffc1a6ec: 48 00 4f 95 bl ffc1f680 <_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();
ffc1a6f0: 83 b2 00 00 lwz r29,0(r18)
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
ffc1a6f4: 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 ) {
ffc1a6f8: 7f 9d 28 40 cmplw cr7,r29,r5
ffc1a6fc: 40 bd 00 18 ble+ cr7,ffc1a714 <_Timer_server_Body+0xf4>
/*
* 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 );
ffc1a700: 7c 85 e8 50 subf r4,r5,r29
ffc1a704: 7f 83 e3 78 mr r3,r28
ffc1a708: 7f c5 f3 78 mr r5,r30
ffc1a70c: 48 00 4f 75 bl ffc1f680 <_Watchdog_Adjust_to_chain>
ffc1a710: 48 00 00 18 b ffc1a728 <_Timer_server_Body+0x108>
} else if ( snapshot < last_snapshot ) {
ffc1a714: 40 bc 00 14 bge+ cr7,ffc1a728 <_Timer_server_Body+0x108>
/*
* 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 );
ffc1a718: 7c bd 28 50 subf r5,r29,r5
ffc1a71c: 7f 83 e3 78 mr r3,r28
ffc1a720: 38 80 00 01 li r4,1
ffc1a724: 48 00 4e 79 bl ffc1f59c <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
ffc1a728: 93 bf 00 74 stw r29,116(r31)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
ffc1a72c: 80 7f 00 78 lwz r3,120(r31)
ffc1a730: 48 00 0b a1 bl ffc1b2d0 <_Chain_Get>
if ( timer == NULL ) {
ffc1a734: 7c 64 1b 79 mr. r4,r3
ffc1a738: 41 82 00 34 beq- ffc1a76c <_Timer_server_Body+0x14c>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1a73c: 80 04 00 38 lwz r0,56(r4)
ffc1a740: 2f 00 00 01 cmpwi cr6,r0,1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1a744: 2f 80 00 03 cmpwi cr7,r0,3
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
ffc1a748: 40 ba 00 10 bne+ cr6,ffc1a758 <_Timer_server_Body+0x138>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
ffc1a74c: 38 84 00 10 addi r4,r4,16
ffc1a750: 7f 43 d3 78 mr r3,r26
ffc1a754: 48 00 00 10 b ffc1a764 <_Timer_server_Body+0x144>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
ffc1a758: 40 9e ff d4 bne+ cr7,ffc1a72c <_Timer_server_Body+0x10c><== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
ffc1a75c: 38 84 00 10 addi r4,r4,16
ffc1a760: 7f 83 e3 78 mr r3,r28
ffc1a764: 48 00 4f d5 bl ffc1f738 <_Watchdog_Insert>
ffc1a768: 4b ff ff c4 b ffc1a72c <_Timer_server_Body+0x10c>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1a76c: 7c 00 00 a6 mfmsr r0
ffc1a770: 7d 30 42 a6 mfsprg r9,0
ffc1a774: 7c 09 48 78 andc r9,r0,r9
ffc1a778: 7d 20 01 24 mtmsr r9
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ffc1a77c: 81 21 00 08 lwz r9,8(r1)
ffc1a780: 7f 89 c0 00 cmpw cr7,r9,r24
ffc1a784: 40 be 00 1c bne+ cr7,ffc1a7a0 <_Timer_server_Body+0x180>
ts->insert_chain = NULL;
ffc1a788: 90 9f 00 78 stw r4,120(r31)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1a78c: 7c 00 01 24 mtmsr r0
_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 ) ) {
ffc1a790: 80 01 00 14 lwz r0,20(r1)
ffc1a794: 7f 80 d8 00 cmpw cr7,r0,r27
ffc1a798: 40 be 00 10 bne+ cr7,ffc1a7a8 <_Timer_server_Body+0x188>
ffc1a79c: 48 00 00 64 b ffc1a800 <_Timer_server_Body+0x1e0>
ffc1a7a0: 7c 00 01 24 mtmsr r0
ffc1a7a4: 4b ff ff 30 b ffc1a6d4 <_Timer_server_Body+0xb4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc1a7a8: 7c 00 00 a6 mfmsr r0
ffc1a7ac: 7d 30 42 a6 mfsprg r9,0
ffc1a7b0: 7c 09 48 78 andc r9,r0,r9
ffc1a7b4: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc1a7b8: 81 21 00 14 lwz r9,20(r1)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
ffc1a7bc: 7f 09 d8 00 cmpw cr6,r9,r27
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
ffc1a7c0: 2f 89 00 00 cmpwi cr7,r9,0
ffc1a7c4: 41 9a 00 34 beq- cr6,ffc1a7f8 <_Timer_server_Body+0x1d8>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
ffc1a7c8: 81 69 00 00 lwz r11,0(r9)
the_chain->first = new_first;
ffc1a7cc: 91 61 00 14 stw r11,20(r1)
new_first->previous = _Chain_Head(the_chain);
ffc1a7d0: 93 cb 00 04 stw r30,4(r11)
ffc1a7d4: 41 9e 00 24 beq- cr7,ffc1a7f8 <_Timer_server_Body+0x1d8><== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
ffc1a7d8: 92 a9 00 08 stw r21,8(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1a7dc: 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 );
ffc1a7e0: 80 09 00 1c lwz r0,28(r9)
ffc1a7e4: 80 89 00 24 lwz r4,36(r9)
ffc1a7e8: 80 69 00 20 lwz r3,32(r9)
ffc1a7ec: 7c 09 03 a6 mtctr r0
ffc1a7f0: 4e 80 04 21 bctrl
}
ffc1a7f4: 4b ff ff b4 b ffc1a7a8 <_Timer_server_Body+0x188>
ffc1a7f8: 7c 00 01 24 mtmsr r0
ffc1a7fc: 4b ff fe d4 b ffc1a6d0 <_Timer_server_Body+0xb0>
} else {
ts->active = false;
ffc1a800: 9a df 00 7c stb r22,124(r31)
ffc1a804: 81 39 00 00 lwz r9,0(r25)
ffc1a808: 38 09 00 01 addi r0,r9,1
ffc1a80c: 90 19 00 00 stw r0,0(r25)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
ffc1a810: 80 7f 00 00 lwz r3,0(r31)
ffc1a814: 38 80 00 08 li r4,8
ffc1a818: 48 00 41 a9 bl ffc1e9c0 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
ffc1a81c: 7f e3 fb 78 mr r3,r31
ffc1a820: 4b ff fd 01 bl ffc1a520 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
ffc1a824: 7f e3 fb 78 mr r3,r31
ffc1a828: 4b ff fd 79 bl ffc1a5a0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
ffc1a82c: 48 00 35 3d bl ffc1dd68 <_Thread_Enable_dispatch>
ts->active = true;
ffc1a830: 9a ff 00 7c stb r23,124(r31)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
ffc1a834: 7e 63 9b 78 mr r3,r19
ffc1a838: 48 00 50 59 bl ffc1f890 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
ffc1a83c: 7e 83 a3 78 mr r3,r20
ffc1a840: 48 00 50 51 bl ffc1f890 <_Watchdog_Remove>
ffc1a844: 4b ff fe 8c b ffc1a6d0 <_Timer_server_Body+0xb0>
ffc0e8a4 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
ffc0e8a4: 94 21 ff e0 stwu r1,-32(r1)
ffc0e8a8: 7c 08 02 a6 mflr r0
ffc0e8ac: 90 01 00 24 stw r0,36(r1)
ffc0e8b0: 93 c1 00 18 stw r30,24(r1)
ffc0e8b4: 7c be 2b 78 mr r30,r5
ffc0e8b8: 93 e1 00 1c stw r31,28(r1)
ffc0e8bc: 7c 7f 1b 78 mr r31,r3
ffc0e8c0: 93 61 00 0c stw r27,12(r1)
ffc0e8c4: 93 81 00 10 stw r28,16(r1)
ffc0e8c8: 93 a1 00 14 stw r29,20(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0e8cc: 7c 00 00 a6 mfmsr r0
ffc0e8d0: 7d 30 42 a6 mfsprg r9,0
ffc0e8d4: 7c 09 48 78 andc r9,r0,r9
ffc0e8d8: 7d 20 01 24 mtmsr r9
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc0e8dc: 81 23 00 00 lwz r9,0(r3)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc0e8e0: 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 ) ) {
ffc0e8e4: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0e8e8: 41 9e 00 78 beq- cr7,ffc0e960 <_Watchdog_Adjust+0xbc>
switch ( direction ) {
ffc0e8ec: 2f 84 00 00 cmpwi cr7,r4,0
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0e8f0: 3b 60 00 01 li r27,1
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
ffc0e8f4: 41 9e 00 64 beq- cr7,ffc0e958 <_Watchdog_Adjust+0xb4>
ffc0e8f8: 2f 84 00 01 cmpwi cr7,r4,1
ffc0e8fc: 40 be 00 64 bne+ cr7,ffc0e960 <_Watchdog_Adjust+0xbc> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
ffc0e900: 81 69 00 10 lwz r11,16(r9)
ffc0e904: 7f cb 2a 14 add r30,r11,r5
ffc0e908: 48 00 00 18 b ffc0e920 <_Watchdog_Adjust+0x7c>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
ffc0e90c: 81 3f 00 00 lwz r9,0(r31)
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
ffc0e910: 83 a9 00 10 lwz r29,16(r9)
ffc0e914: 7f 9e e8 40 cmplw cr7,r30,r29
ffc0e918: 40 bc 00 10 bge+ cr7,ffc0e928 <_Watchdog_Adjust+0x84>
_Watchdog_First( header )->delta_interval -= units;
ffc0e91c: 7f de e8 50 subf r30,r30,r29
ffc0e920: 93 c9 00 10 stw r30,16(r9)
break;
ffc0e924: 48 00 00 3c b ffc0e960 <_Watchdog_Adjust+0xbc>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
ffc0e928: 93 69 00 10 stw r27,16(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0e92c: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
_Watchdog_Tickle( header );
ffc0e930: 7f e3 fb 78 mr r3,r31
ffc0e934: 48 00 02 59 bl ffc0eb8c <_Watchdog_Tickle>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0e938: 7c 00 00 a6 mfmsr r0
ffc0e93c: 7d 30 42 a6 mfsprg r9,0
ffc0e940: 7c 09 48 78 andc r9,r0,r9
ffc0e944: 7d 20 01 24 mtmsr r9
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0e948: 81 3f 00 00 lwz r9,0(r31)
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
ffc0e94c: 7f dd f0 50 subf r30,r29,r30
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
ffc0e950: 7f 89 e0 00 cmpw cr7,r9,r28
ffc0e954: 41 9e 00 0c beq- cr7,ffc0e960 <_Watchdog_Adjust+0xbc>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
ffc0e958: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0e95c: 40 9e ff b0 bne+ cr7,ffc0e90c <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0e960: 7c 00 01 24 mtmsr r0
}
}
_ISR_Enable( level );
}
ffc0e964: 80 01 00 24 lwz r0,36(r1)
ffc0e968: 83 61 00 0c lwz r27,12(r1)
ffc0e96c: 7c 08 03 a6 mtlr r0
ffc0e970: 83 81 00 10 lwz r28,16(r1)
ffc0e974: 83 a1 00 14 lwz r29,20(r1)
ffc0e978: 83 c1 00 18 lwz r30,24(r1)
ffc0e97c: 83 e1 00 1c lwz r31,28(r1)
ffc0e980: 38 21 00 20 addi r1,r1,32
ffc0e984: 4e 80 00 20 blr
ffc0dc28 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
ffc0dc28: 7c 69 1b 78 mr r9,r3
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0dc2c: 7c 00 00 a6 mfmsr r0
ffc0dc30: 7d 70 42 a6 mfsprg r11,0
ffc0dc34: 7c 0b 58 78 andc r11,r0,r11
ffc0dc38: 7d 60 01 24 mtmsr r11
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
ffc0dc3c: 80 63 00 08 lwz r3,8(r3)
switch ( previous_state ) {
ffc0dc40: 2f 83 00 01 cmpwi cr7,r3,1
ffc0dc44: 41 9e 00 18 beq- cr7,ffc0dc5c <_Watchdog_Remove+0x34>
ffc0dc48: 2b 83 00 01 cmplwi cr7,r3,1
ffc0dc4c: 41 9c 00 74 blt- cr7,ffc0dcc0 <_Watchdog_Remove+0x98>
ffc0dc50: 2b 83 00 03 cmplwi cr7,r3,3
ffc0dc54: 41 9d 00 6c bgt- cr7,ffc0dcc0 <_Watchdog_Remove+0x98> <== NEVER TAKEN
ffc0dc58: 48 00 00 10 b ffc0dc68 <_Watchdog_Remove+0x40>
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0dc5c: 39 60 00 00 li r11,0
ffc0dc60: 91 69 00 08 stw r11,8(r9)
break;
ffc0dc64: 48 00 00 5c b ffc0dcc0 <_Watchdog_Remove+0x98>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
ffc0dc68: 81 69 00 00 lwz r11,0(r9)
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0dc6c: 39 00 00 00 li r8,0
ffc0dc70: 91 09 00 08 stw r8,8(r9)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
ffc0dc74: 81 4b 00 00 lwz r10,0(r11)
ffc0dc78: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0dc7c: 41 9e 00 14 beq- cr7,ffc0dc90 <_Watchdog_Remove+0x68>
next_watchdog->delta_interval += the_watchdog->delta_interval;
ffc0dc80: 81 0b 00 10 lwz r8,16(r11)
ffc0dc84: 81 49 00 10 lwz r10,16(r9)
ffc0dc88: 7d 48 52 14 add r10,r8,r10
ffc0dc8c: 91 4b 00 10 stw r10,16(r11)
if ( _Watchdog_Sync_count )
ffc0dc90: 3d 60 00 00 lis r11,0
ffc0dc94: 81 6b 28 04 lwz r11,10244(r11)
ffc0dc98: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0dc9c: 41 9e 00 14 beq- cr7,ffc0dcb0 <_Watchdog_Remove+0x88>
_Watchdog_Sync_level = _ISR_Nest_level;
ffc0dca0: 3d 60 00 00 lis r11,0
ffc0dca4: 81 4b 27 d8 lwz r10,10200(r11)
ffc0dca8: 3d 60 00 00 lis r11,0
ffc0dcac: 91 4b 27 ec stw r10,10220(r11)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
ffc0dcb0: 81 69 00 00 lwz r11,0(r9)
previous = the_node->previous;
ffc0dcb4: 81 49 00 04 lwz r10,4(r9)
next->previous = previous;
previous->next = next;
ffc0dcb8: 91 6a 00 00 stw r11,0(r10)
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
ffc0dcbc: 91 4b 00 04 stw r10,4(r11)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
ffc0dcc0: 3d 60 00 00 lis r11,0
ffc0dcc4: 81 6b 28 08 lwz r11,10248(r11)
ffc0dcc8: 91 69 00 18 stw r11,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0dccc: 7c 00 01 24 mtmsr r0
_ISR_Enable( level );
return( previous_state );
}
ffc0dcd0: 4e 80 00 20 blr
ffc0df88 <_Watchdog_Report_chain>:
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
ffc0df88: 94 21 ff e8 stwu r1,-24(r1)
ffc0df8c: 7c 08 02 a6 mflr r0
ffc0df90: 93 c1 00 10 stw r30,16(r1)
ffc0df94: 7c 7e 1b 78 mr r30,r3
ffc0df98: 93 e1 00 14 stw r31,20(r1)
ffc0df9c: 7c 9f 23 78 mr r31,r4
ffc0dfa0: 90 01 00 1c stw r0,28(r1)
ffc0dfa4: 93 81 00 08 stw r28,8(r1)
ffc0dfa8: 93 a1 00 0c stw r29,12(r1)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc0dfac: 7f a0 00 a6 mfmsr r29
ffc0dfb0: 7c 10 42 a6 mfsprg r0,0
ffc0dfb4: 7f a0 00 78 andc r0,r29,r0
ffc0dfb8: 7c 00 01 24 mtmsr r0
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
ffc0dfbc: 3c 60 ff c2 lis r3,-62
ffc0dfc0: 7f e5 fb 78 mr r5,r31
ffc0dfc4: 38 63 5f cc addi r3,r3,24524
ffc0dfc8: 7f c4 f3 78 mr r4,r30
ffc0dfcc: 4c c6 31 82 crclr 4*cr1+eq
ffc0dfd0: 4b ff 8a c5 bl ffc06a94 <printk>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
ffc0dfd4: 83 9f 00 00 lwz r28,0(r31)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc0dfd8: 3b ff 00 04 addi r31,r31,4
if ( !_Chain_Is_empty( header ) ) {
ffc0dfdc: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0dfe0: 41 9e 00 34 beq- cr7,ffc0e014 <_Watchdog_Report_chain+0x8c>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
ffc0dfe4: 7f 84 e3 78 mr r4,r28
ffc0dfe8: 38 60 00 00 li r3,0
ffc0dfec: 48 00 00 5d bl ffc0e048 <_Watchdog_Report>
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
ffc0dff0: 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 = header->first ;
ffc0dff4: 7f 9c f8 00 cmpw cr7,r28,r31
ffc0dff8: 40 9e ff ec bne+ cr7,ffc0dfe4 <_Watchdog_Report_chain+0x5c><== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
ffc0dffc: 3c 60 ff c2 lis r3,-62
ffc0e000: 38 63 5f e3 addi r3,r3,24547
ffc0e004: 7f c4 f3 78 mr r4,r30
ffc0e008: 4c c6 31 82 crclr 4*cr1+eq
ffc0e00c: 4b ff 8a 89 bl ffc06a94 <printk>
ffc0e010: 48 00 00 14 b ffc0e024 <_Watchdog_Report_chain+0x9c>
} else {
printk( "Chain is empty\n" );
ffc0e014: 3c 60 ff c2 lis r3,-62
ffc0e018: 38 63 5f f2 addi r3,r3,24562
ffc0e01c: 4c c6 31 82 crclr 4*cr1+eq
ffc0e020: 4b ff 8a 75 bl ffc06a94 <printk>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc0e024: 7f a0 01 24 mtmsr r29
}
_ISR_Enable( level );
}
ffc0e028: 80 01 00 1c lwz r0,28(r1)
ffc0e02c: 83 81 00 08 lwz r28,8(r1)
ffc0e030: 7c 08 03 a6 mtlr r0
ffc0e034: 83 a1 00 0c lwz r29,12(r1)
ffc0e038: 83 c1 00 10 lwz r30,16(r1)
ffc0e03c: 83 e1 00 14 lwz r31,20(r1)
ffc0e040: 38 21 00 18 addi r1,r1,24
ffc0e044: 4e 80 00 20 blr
ffc08720 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
ffc08720: 94 21 ff e0 stwu r1,-32(r1)
ffc08724: 7c 08 02 a6 mflr r0
ffc08728: 93 e1 00 1c stw r31,28(r1)
long adjustment;
/*
* Simple validations
*/
if ( !delta )
ffc0872c: 7c 7f 1b 79 mr. r31,r3
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
ffc08730: 93 c1 00 18 stw r30,24(r1)
ffc08734: 7c 9e 23 78 mr r30,r4
ffc08738: 90 01 00 24 stw r0,36(r1)
long adjustment;
/*
* Simple validations
*/
if ( !delta )
ffc0873c: 41 82 00 18 beq- ffc08754 <adjtime+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
ffc08740: 81 3f 00 04 lwz r9,4(r31)
ffc08744: 3c 00 00 0f lis r0,15
ffc08748: 60 00 42 3f ori r0,r0,16959
ffc0874c: 7f 89 00 40 cmplw cr7,r9,r0
ffc08750: 40 bd 00 18 ble+ cr7,ffc08768 <adjtime+0x48>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08754: 48 00 c2 d9 bl ffc14a2c <__errno>
ffc08758: 38 00 00 16 li r0,22
ffc0875c: 90 03 00 00 stw r0,0(r3)
ffc08760: 38 60 ff ff li r3,-1
ffc08764: 48 00 00 fc b ffc08860 <adjtime+0x140>
if ( olddelta ) {
ffc08768: 2f 84 00 00 cmpwi cr7,r4,0
ffc0876c: 41 9e 00 10 beq- cr7,ffc0877c <adjtime+0x5c>
olddelta->tv_sec = 0;
ffc08770: 38 00 00 00 li r0,0
olddelta->tv_usec = 0;
ffc08774: 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;
ffc08778: 90 04 00 00 stw r0,0(r4)
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
ffc0877c: 80 1f 00 00 lwz r0,0(r31)
ffc08780: 3d 20 00 0f lis r9,15
ffc08784: 61 29 42 40 ori r9,r9,16960
adjustment += delta->tv_usec;
ffc08788: 81 7f 00 04 lwz r11,4(r31)
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
ffc0878c: 7d 29 01 d6 mullw r9,r9,r0
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
ffc08790: 3d 40 00 00 lis r10,0
ffc08794: 80 0a 20 ac lwz r0,8364(r10)
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
adjustment += delta->tv_usec;
ffc08798: 7d 29 5a 14 add r9,r9,r11
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
ffc0879c: 7f 89 00 40 cmplw cr7,r9,r0
ffc087a0: 41 bc 00 bc blt+ cr7,ffc0885c <adjtime+0x13c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc087a4: 3d 20 00 00 lis r9,0
ffc087a8: 81 69 28 d4 lwz r11,10452(r9)
ffc087ac: 38 0b 00 01 addi r0,r11,1
ffc087b0: 90 09 28 d4 stw r0,10452(r9)
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ffc087b4: 38 61 00 08 addi r3,r1,8
ffc087b8: 48 00 1c b5 bl ffc0a46c <_TOD_Get>
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
ffc087bc: 81 3f 00 04 lwz r9,4(r31)
ffc087c0: 80 01 00 0c lwz r0,12(r1)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc087c4: 3d 60 3b 9a lis r11,15258
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
ffc087c8: 1d 29 03 e8 mulli r9,r9,1000
ffc087cc: 81 41 00 08 lwz r10,8(r1)
ffc087d0: 7d 29 02 14 add r9,r9,r0
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ffc087d4: 80 1f 00 00 lwz r0,0(r31)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc087d8: 61 6b ca 00 ori r11,r11,51712
ffc087dc: 7d 69 5b 96 divwu r11,r9,r11
ffc087e0: 39 6b 00 01 addi r11,r11,1
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
ffc087e4: 7d 4a 02 14 add r10,r10,r0
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ffc087e8: 7d 69 03 a6 mtctr r11
ffc087ec: 48 00 00 08 b ffc087f4 <adjtime+0xd4>
ffc087f0: 39 28 36 00 addi r9,r8,13824
ffc087f4: 7d 4b 53 78 mr r11,r10
ffc087f8: 3d 09 c4 65 addis r8,r9,-15259
ffc087fc: 39 4a 00 01 addi r10,r10,1
ffc08800: 42 00 ff f0 bdnz+ ffc087f0 <adjtime+0xd0>
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) ) {
ffc08804: 3d 40 c4 65 lis r10,-15259
ffc08808: 61 4a 36 00 ori r10,r10,13824
ffc0880c: 48 00 00 08 b ffc08814 <adjtime+0xf4>
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 ) {
ffc08810: 39 28 ca 00 addi r9,r8,-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) ) {
ffc08814: 7f 89 50 40 cmplw cr7,r9,r10
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 ) {
ffc08818: 7d 60 5b 78 mr r0,r11
ffc0881c: 3d 09 3b 9b addis r8,r9,15259
ffc08820: 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) ) {
ffc08824: 40 9d ff ec ble+ cr7,ffc08810 <adjtime+0xf0>
ffc08828: 7c 23 0b 78 mr r3,r1
ffc0882c: 91 21 00 0c stw r9,12(r1)
ffc08830: 94 03 00 08 stwu r0,8(r3)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
ffc08834: 48 00 1d 15 bl ffc0a548 <_TOD_Set>
_Thread_Enable_dispatch();
ffc08838: 48 00 33 25 bl ffc0bb5c <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
ffc0883c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08840: 41 9e 00 1c beq- cr7,ffc0885c <adjtime+0x13c> <== NEVER TAKEN
*olddelta = *delta;
ffc08844: 81 3f 00 00 lwz r9,0(r31)
ffc08848: 38 60 00 00 li r3,0
ffc0884c: 81 5f 00 04 lwz r10,4(r31)
ffc08850: 91 3e 00 00 stw r9,0(r30)
ffc08854: 91 5e 00 04 stw r10,4(r30)
ffc08858: 48 00 00 08 b ffc08860 <adjtime+0x140>
ffc0885c: 38 60 00 00 li r3,0
return 0;
}
ffc08860: 80 01 00 24 lwz r0,36(r1)
ffc08864: 83 c1 00 18 lwz r30,24(r1)
ffc08868: 7c 08 03 a6 mtlr r0
ffc0886c: 83 e1 00 1c lwz r31,28(r1)
ffc08870: 38 21 00 20 addi r1,r1,32
ffc08874: 4e 80 00 20 blr
ffc0869c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
if ( !tp )
ffc0869c: 2c 04 00 00 cmpwi r4,0
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
ffc086a0: 94 21 ff f8 stwu r1,-8(r1)
ffc086a4: 7c 08 02 a6 mflr r0
ffc086a8: 90 01 00 0c stw r0,12(r1)
if ( !tp )
ffc086ac: 41 82 00 4c beq- ffc086f8 <clock_gettime+0x5c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
ffc086b0: 2f 83 00 01 cmpwi cr7,r3,1
ffc086b4: 40 be 00 10 bne+ cr7,ffc086c4 <clock_gettime+0x28>
_TOD_Get(tp);
ffc086b8: 7c 83 23 78 mr r3,r4
ffc086bc: 48 00 25 c9 bl ffc0ac84 <_TOD_Get>
ffc086c0: 48 00 00 1c b ffc086dc <clock_gettime+0x40>
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
ffc086c4: 2f 83 00 04 cmpwi cr7,r3,4
ffc086c8: 41 9e 00 0c beq- cr7,ffc086d4 <clock_gettime+0x38> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
ffc086cc: 2f 83 00 02 cmpwi cr7,r3,2
ffc086d0: 40 be 00 14 bne+ cr7,ffc086e4 <clock_gettime+0x48>
_TOD_Get_uptime_as_timespec( tp );
ffc086d4: 7c 83 23 78 mr r3,r4
ffc086d8: 48 00 26 51 bl ffc0ad28 <_TOD_Get_uptime_as_timespec>
ffc086dc: 38 60 00 00 li r3,0
return 0;
ffc086e0: 48 00 00 28 b ffc08708 <clock_gettime+0x6c>
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
ffc086e4: 2f 83 00 03 cmpwi cr7,r3,3
ffc086e8: 40 be 00 10 bne+ cr7,ffc086f8 <clock_gettime+0x5c>
rtems_set_errno_and_return_minus_one( ENOSYS );
ffc086ec: 48 00 c9 31 bl ffc1501c <__errno>
ffc086f0: 38 00 00 58 li r0,88
ffc086f4: 48 00 00 0c b ffc08700 <clock_gettime+0x64>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
ffc086f8: 48 00 c9 25 bl ffc1501c <__errno>
ffc086fc: 38 00 00 16 li r0,22
ffc08700: 90 03 00 00 stw r0,0(r3)
ffc08704: 38 60 ff ff li r3,-1
return 0;
}
ffc08708: 80 01 00 0c lwz r0,12(r1)
ffc0870c: 38 21 00 08 addi r1,r1,8
ffc08710: 7c 08 03 a6 mtlr r0
ffc08714: 4e 80 00 20 blr
ffc08718 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
if ( !tp )
ffc08718: 2c 04 00 00 cmpwi r4,0
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
ffc0871c: 94 21 ff f8 stwu r1,-8(r1)
ffc08720: 7c 08 02 a6 mflr r0
ffc08724: 90 01 00 0c stw r0,12(r1)
if ( !tp )
ffc08728: 41 82 00 60 beq- ffc08788 <clock_settime+0x70> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
ffc0872c: 2f 83 00 01 cmpwi cr7,r3,1
ffc08730: 40 be 00 3c bne+ cr7,ffc0876c <clock_settime+0x54>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
ffc08734: 81 24 00 00 lwz r9,0(r4)
ffc08738: 3c 00 21 da lis r0,8666
ffc0873c: 60 00 e4 ff ori r0,r0,58623
ffc08740: 7f 89 00 40 cmplw cr7,r9,r0
ffc08744: 40 9d 00 44 ble- cr7,ffc08788 <clock_settime+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc08748: 3d 20 00 00 lis r9,0
ffc0874c: 81 69 28 24 lwz r11,10276(r9)
ffc08750: 38 0b 00 01 addi r0,r11,1
ffc08754: 90 09 28 24 stw r0,10276(r9)
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
ffc08758: 7c 83 23 78 mr r3,r4
ffc0875c: 48 00 26 45 bl ffc0ada0 <_TOD_Set>
_Thread_Enable_dispatch();
ffc08760: 48 00 3c 55 bl ffc0c3b4 <_Thread_Enable_dispatch>
ffc08764: 38 60 00 00 li r3,0
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
ffc08768: 48 00 00 30 b ffc08798 <clock_settime+0x80>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
ffc0876c: 2f 83 00 02 cmpwi cr7,r3,2
ffc08770: 41 9e 00 0c beq- cr7,ffc0877c <clock_settime+0x64>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
ffc08774: 2f 83 00 03 cmpwi cr7,r3,3
ffc08778: 40 be 00 10 bne+ cr7,ffc08788 <clock_settime+0x70>
rtems_set_errno_and_return_minus_one( ENOSYS );
ffc0877c: 48 00 c8 a1 bl ffc1501c <__errno>
ffc08780: 38 00 00 58 li r0,88
ffc08784: 48 00 00 0c b ffc08790 <clock_settime+0x78>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08788: 48 00 c8 95 bl ffc1501c <__errno>
ffc0878c: 38 00 00 16 li r0,22
ffc08790: 90 03 00 00 stw r0,0(r3)
ffc08794: 38 60 ff ff li r3,-1
return 0;
}
ffc08798: 80 01 00 0c lwz r0,12(r1)
ffc0879c: 38 21 00 08 addi r1,r1,8
ffc087a0: 7c 08 03 a6 mtlr r0
ffc087a4: 4e 80 00 20 blr
ffc17830 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
ffc17830: 94 21 ff d8 stwu r1,-40(r1)
ffc17834: 7c 08 02 a6 mflr r0
ffc17838: 93 a1 00 1c stw r29,28(r1)
ffc1783c: 7c bd 2b 78 mr r29,r5
ffc17840: 93 c1 00 20 stw r30,32(r1)
ffc17844: 7c 7e 1b 78 mr r30,r3
ffc17848: 93 e1 00 24 stw r31,36(r1)
ffc1784c: 7c 9f 23 78 mr r31,r4
ffc17850: 90 01 00 2c stw r0,44(r1)
ffc17854: 93 81 00 18 stw r28,24(r1)
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
ffc17858: 4b ff b9 29 bl ffc13180 <getpid>
ffc1785c: 7f 9e 18 00 cmpw cr7,r30,r3
ffc17860: 41 be 00 10 beq+ cr7,ffc17870 <killinfo+0x40>
rtems_set_errno_and_return_minus_one( ESRCH );
ffc17864: 48 00 0c c9 bl ffc1852c <__errno>
ffc17868: 38 00 00 03 li r0,3
ffc1786c: 48 00 00 14 b ffc17880 <killinfo+0x50>
/*
* Validate the signal passed.
*/
if ( !sig )
ffc17870: 2f 9f 00 00 cmpwi cr7,r31,0
ffc17874: 40 be 00 18 bne+ cr7,ffc1788c <killinfo+0x5c>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc17878: 48 00 0c b5 bl ffc1852c <__errno>
ffc1787c: 38 00 00 16 li r0,22
ffc17880: 90 03 00 00 stw r0,0(r3)
ffc17884: 38 60 ff ff li r3,-1
ffc17888: 48 00 02 3c b ffc17ac4 <killinfo+0x294>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
ffc1788c: 38 1f ff ff addi r0,r31,-1
if ( !is_valid_signo(sig) )
ffc17890: 2b 80 00 1f cmplwi cr7,r0,31
ffc17894: 41 bd ff e4 bgt- cr7,ffc17878 <killinfo+0x48>
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 )
ffc17898: 1d 7f 00 0c mulli r11,r31,12
ffc1789c: 3d 20 00 00 lis r9,0
ffc178a0: 39 29 32 30 addi r9,r9,12848
ffc178a4: 7d 29 5a 14 add r9,r9,r11
ffc178a8: 81 29 00 08 lwz r9,8(r9)
ffc178ac: 38 60 00 00 li r3,0
ffc178b0: 2f 89 00 01 cmpwi cr7,r9,1
ffc178b4: 41 9e 02 10 beq- cr7,ffc17ac4 <killinfo+0x294>
/*
* 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 ) )
ffc178b8: 2f 9f 00 08 cmpwi cr7,r31,8
ffc178bc: 41 9e 00 14 beq- cr7,ffc178d0 <killinfo+0xa0>
ffc178c0: 2f 9f 00 04 cmpwi cr7,r31,4
ffc178c4: 41 9e 00 0c beq- cr7,ffc178d0 <killinfo+0xa0>
ffc178c8: 2f 9f 00 0b cmpwi cr7,r31,11
ffc178cc: 40 be 00 14 bne+ cr7,ffc178e0 <killinfo+0xb0>
return pthread_kill( pthread_self(), sig );
ffc178d0: 48 00 07 65 bl ffc18034 <pthread_self>
ffc178d4: 7f e4 fb 78 mr r4,r31
ffc178d8: 48 00 06 55 bl ffc17f2c <pthread_kill>
ffc178dc: 48 00 01 e8 b ffc17ac4 <killinfo+0x294>
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
ffc178e0: 2f 9d 00 00 cmpwi cr7,r29,0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
ffc178e4: 93 e1 00 08 stw r31,8(r1)
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
ffc178e8: 3b c0 00 01 li r30,1
siginfo->si_code = SI_USER;
ffc178ec: 93 c1 00 0c stw r30,12(r1)
ffc178f0: 7f de 00 30 slw r30,r30,r0
if ( !value ) {
ffc178f4: 40 be 00 0c bne+ cr7,ffc17900 <killinfo+0xd0>
siginfo->si_value.sival_int = 0;
ffc178f8: 93 a1 00 10 stw r29,16(r1)
ffc178fc: 48 00 00 0c b ffc17908 <killinfo+0xd8>
} else {
siginfo->si_value = *value;
ffc17900: 80 1d 00 00 lwz r0,0(r29)
ffc17904: 90 01 00 10 stw r0,16(r1)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc17908: 3d 20 00 00 lis r9,0
ffc1790c: 81 69 27 b0 lwz r11,10160(r9)
ffc17910: 38 0b 00 01 addi r0,r11,1
ffc17914: 90 09 27 b0 stw r0,10160(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;
ffc17918: 3d 20 00 00 lis r9,0
ffc1791c: 80 69 27 f0 lwz r3,10224(r9)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc17920: 81 23 01 48 lwz r9,328(r3)
ffc17924: 80 09 00 cc lwz r0,204(r9)
ffc17928: 7f c6 00 79 andc. r6,r30,r0
ffc1792c: 40 82 01 08 bne- ffc17a34 <killinfo+0x204>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
ffc17930: 3d 20 00 00 lis r9,0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
ffc17934: 3d 60 00 00 lis r11,0
ffc17938: 81 29 33 bc lwz r9,13244(r9)
ffc1793c: 38 0b 33 c0 addi r0,r11,13248
ffc17940: 48 00 00 24 b ffc17964 <killinfo+0x134>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc17944: 81 49 00 30 lwz r10,48(r9)
for ( the_node = the_chain->first ;
!_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 ];
ffc17948: 81 69 01 48 lwz r11,328(r9)
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
ffc1794c: 7f c8 50 39 and. r8,r30,r10
ffc17950: 40 82 00 e4 bne- ffc17a34 <killinfo+0x204>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
ffc17954: 81 6b 00 cc lwz r11,204(r11)
ffc17958: 7f ca 58 79 andc. r10,r30,r11
ffc1795c: 40 82 00 d8 bne- ffc17a34 <killinfo+0x204>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
ffc17960: 81 29 00 00 lwz r9,0(r9)
ffc17964: 7f 89 00 00 cmpw cr7,r9,r0
the_thread = (Thread_Control *)the_node;
ffc17968: 7d 23 4b 78 mr r3,r9
ffc1796c: 40 9e ff d8 bne+ cr7,ffc17944 <killinfo+0x114>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
ffc17970: 3d 20 00 00 lis r9,0
ffc17974: 89 69 26 e4 lbz r11,9956(r9)
ffc17978: 3d 20 00 00 lis r9,0
ffc1797c: 39 29 2c e8 addi r9,r9,11496
ffc17980: 38 0b 00 01 addi r0,r11,1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
ffc17984: 38 a9 00 0c addi r5,r9,12
ffc17988: 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 ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
ffc1798c: 81 69 00 00 lwz r11,0(r9)
ffc17990: 2f 8b 00 00 cmpwi cr7,r11,0
ffc17994: 41 9e 00 8c beq- cr7,ffc17a20 <killinfo+0x1f0>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
ffc17998: 81 6b 00 04 lwz r11,4(r11)
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
ffc1799c: 39 40 00 01 li r10,1
ffc179a0: 83 ab 00 1c lwz r29,28(r11)
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
ffc179a4: a0 8b 00 10 lhz r4,16(r11)
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
ffc179a8: 48 00 00 70 b ffc17a18 <killinfo+0x1e8>
the_thread = (Thread_Control *) object_table[ index ];
ffc179ac: 55 4b 10 3a rlwinm r11,r10,2,0,29
ffc179b0: 7d 7d 58 2e lwzx r11,r29,r11
if ( !the_thread )
ffc179b4: 2f 8b 00 00 cmpwi cr7,r11,0
ffc179b8: 41 9e 00 4c beq- cr7,ffc17a04 <killinfo+0x1d4>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
ffc179bc: 81 0b 00 14 lwz r8,20(r11)
ffc179c0: 7f 88 00 40 cmplw cr7,r8,r0
ffc179c4: 41 9d 00 40 bgt- cr7,ffc17a04 <killinfo+0x1d4>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc179c8: 80 eb 01 48 lwz r7,328(r11)
ffc179cc: 80 e7 00 cc lwz r7,204(r7)
ffc179d0: 7f dc 38 79 andc. r28,r30,r7
ffc179d4: 41 82 00 30 beq- ffc17a04 <killinfo+0x1d4>
*
* 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 ) {
ffc179d8: 41 9c 00 34 blt- cr7,ffc17a0c <killinfo+0x1dc>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
ffc179dc: 80 c3 00 10 lwz r6,16(r3)
ffc179e0: 2f 86 00 00 cmpwi cr7,r6,0
ffc179e4: 41 9e 00 20 beq- cr7,ffc17a04 <killinfo+0x1d4> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
ffc179e8: 80 eb 00 10 lwz r7,16(r11)
ffc179ec: 2f 87 00 00 cmpwi cr7,r7,0
ffc179f0: 41 9e 00 1c beq- cr7,ffc17a0c <killinfo+0x1dc>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
ffc179f4: 74 dc 10 00 andis. r28,r6,4096
ffc179f8: 40 82 00 0c bne- ffc17a04 <killinfo+0x1d4>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
ffc179fc: 74 e6 10 00 andis. r6,r7,4096
ffc17a00: 40 82 00 0c bne- ffc17a0c <killinfo+0x1dc>
ffc17a04: 7c 08 03 78 mr r8,r0
ffc17a08: 48 00 00 08 b ffc17a10 <killinfo+0x1e0>
ffc17a0c: 7d 63 5b 78 mr r3,r11
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
ffc17a10: 39 4a 00 01 addi r10,r10,1
ffc17a14: 7d 00 43 78 mr r0,r8
ffc17a18: 7f 8a 20 40 cmplw cr7,r10,r4
ffc17a1c: 40 9d ff 90 ble+ cr7,ffc179ac <killinfo+0x17c>
ffc17a20: 39 29 00 04 addi r9,r9,4
* + 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++) {
ffc17a24: 7f 89 28 00 cmpw cr7,r9,r5
ffc17a28: 40 9e ff 64 bne+ cr7,ffc1798c <killinfo+0x15c>
}
}
}
}
if ( interested ) {
ffc17a2c: 2f 83 00 00 cmpwi cr7,r3,0
ffc17a30: 41 9e 00 20 beq- cr7,ffc17a50 <killinfo+0x220>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
ffc17a34: 38 00 00 01 li r0,1
ffc17a38: 98 03 00 74 stb r0,116(r3)
/*
* 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 ) ) {
ffc17a3c: 7f e4 fb 78 mr r4,r31
ffc17a40: 38 a1 00 08 addi r5,r1,8
ffc17a44: 48 00 03 09 bl ffc17d4c <_POSIX_signals_Unblock_thread>
ffc17a48: 2f 83 00 00 cmpwi cr7,r3,0
ffc17a4c: 40 9e 00 70 bne- cr7,ffc17abc <killinfo+0x28c>
/*
* 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 );
ffc17a50: 7f c3 f3 78 mr r3,r30
ffc17a54: 48 00 02 b5 bl ffc17d08 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
ffc17a58: 1f ff 00 0c mulli r31,r31,12
ffc17a5c: 3d 20 00 00 lis r9,0
ffc17a60: 39 29 32 30 addi r9,r9,12848
ffc17a64: 7c 09 f8 2e lwzx r0,r9,r31
ffc17a68: 2f 80 00 02 cmpwi cr7,r0,2
ffc17a6c: 40 be 00 50 bne+ cr7,ffc17abc <killinfo+0x28c>
psiginfo = (POSIX_signals_Siginfo_node *)
ffc17a70: 3c 60 00 00 lis r3,0
ffc17a74: 38 63 33 b0 addi r3,r3,13232
ffc17a78: 4b ff 30 21 bl ffc0aa98 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
ffc17a7c: 7c 64 1b 79 mr. r4,r3
ffc17a80: 40 a2 00 14 bne+ ffc17a94 <killinfo+0x264>
_Thread_Enable_dispatch();
ffc17a84: 4b ff 4b 85 bl ffc0c608 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
ffc17a88: 48 00 0a a5 bl ffc1852c <__errno>
ffc17a8c: 38 00 00 0b li r0,11
ffc17a90: 4b ff fd f0 b ffc17880 <killinfo+0x50>
}
psiginfo->Info = *siginfo;
ffc17a94: 81 21 00 0c lwz r9,12(r1)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc17a98: 3c 60 00 00 lis r3,0
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ffc17a9c: 80 01 00 10 lwz r0,16(r1)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc17aa0: 38 63 34 24 addi r3,r3,13348
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ffc17aa4: 81 61 00 08 lwz r11,8(r1)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc17aa8: 7c 63 fa 14 add r3,r3,r31
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
ffc17aac: 91 24 00 0c stw r9,12(r4)
ffc17ab0: 91 64 00 08 stw r11,8(r4)
ffc17ab4: 90 04 00 10 stw r0,16(r4)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
ffc17ab8: 4b ff 2f 89 bl ffc0aa40 <_Chain_Append>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
ffc17abc: 4b ff 4b 4d bl ffc0c608 <_Thread_Enable_dispatch>
ffc17ac0: 38 60 00 00 li r3,0
return 0;
}
ffc17ac4: 80 01 00 2c lwz r0,44(r1)
ffc17ac8: 83 81 00 18 lwz r28,24(r1)
ffc17acc: 7c 08 03 a6 mtlr r0
ffc17ad0: 83 a1 00 1c lwz r29,28(r1)
ffc17ad4: 83 c1 00 20 lwz r30,32(r1)
ffc17ad8: 83 e1 00 24 lwz r31,36(r1)
ffc17adc: 38 21 00 28 addi r1,r1,40
ffc17ae0: 4e 80 00 20 blr
ffc20324 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
ffc20324: 94 21 ff e8 stwu r1,-24(r1)
ffc20328: 7d 80 00 26 mfcr r12
ffc2032c: 7c 08 02 a6 mflr r0
ffc20330: 93 c1 00 10 stw r30,16(r1)
ffc20334: 7c 9e 23 78 mr r30,r4
ffc20338: 93 e1 00 14 stw r31,20(r1)
ffc2033c: 7c 7f 1b 78 mr r31,r3
ffc20340: 90 01 00 1c stw r0,28(r1)
ffc20344: 93 a1 00 0c stw r29,12(r1)
ffc20348: 91 81 00 08 stw r12,8(r1)
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
ffc2034c: 48 00 01 a5 bl ffc204f0 <_Timespec_Is_valid>
ffc20350: 2f 83 00 00 cmpwi cr7,r3,0
ffc20354: 41 9e 00 1c beq- cr7,ffc20370 <nanosleep+0x4c>
* Return EINVAL if the delay interval is negative.
*
* NOTE: This behavior is beyond the POSIX specification.
* FSU and GNU/Linux pthreads shares this behavior.
*/
if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 )
ffc20358: 80 1f 00 00 lwz r0,0(r31)
ffc2035c: 2f 80 00 00 cmpwi cr7,r0,0
ffc20360: 41 9c 00 10 blt- cr7,ffc20370 <nanosleep+0x4c> <== NEVER TAKEN
ffc20364: 80 1f 00 04 lwz r0,4(r31)
ffc20368: 2f 80 00 00 cmpwi cr7,r0,0
ffc2036c: 40 bc 00 10 bge+ cr7,ffc2037c <nanosleep+0x58> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc20370: 4b ff 3e fd bl ffc1426c <__errno>
ffc20374: 38 00 00 16 li r0,22
ffc20378: 48 00 00 d4 b ffc2044c <nanosleep+0x128>
ticks = _Timespec_To_ticks( rqtp );
ffc2037c: 7f e3 fb 78 mr r3,r31
ffc20380: 4b ff 0f d9 bl ffc11358 <_Timespec_To_ticks>
ffc20384: 2e 1e 00 00 cmpwi cr4,r30,0
* A nanosleep for zero time is implemented as a yield.
* This behavior is also beyond the POSIX specification but is
* consistent with the RTEMS API and yields desirable behavior.
*/
if ( !ticks ) {
ffc20388: 7c 7f 1b 79 mr. r31,r3
ffc2038c: 3d 20 00 00 lis r9,0
ffc20390: 40 82 00 2c bne- ffc203bc <nanosleep+0x98>
ffc20394: 81 69 27 f4 lwz r11,10228(r9)
ffc20398: 38 0b 00 01 addi r0,r11,1
ffc2039c: 90 09 27 f4 stw r0,10228(r9)
_Thread_Disable_dispatch();
_Thread_Yield_processor();
ffc203a0: 4b fe c0 51 bl ffc0c3f0 <_Thread_Yield_processor>
_Thread_Enable_dispatch();
ffc203a4: 4b fe b0 91 bl ffc0b434 <_Thread_Enable_dispatch>
if ( rmtp ) {
ffc203a8: 41 92 00 b0 beq- cr4,ffc20458 <nanosleep+0x134>
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
ffc203ac: 93 fe 00 04 stw r31,4(r30)
ffc203b0: 38 60 00 00 li r3,0
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
ffc203b4: 93 fe 00 00 stw r31,0(r30)
ffc203b8: 48 00 00 a4 b ffc2045c <nanosleep+0x138>
ffc203bc: 81 69 27 f4 lwz r11,10228(r9)
ffc203c0: 38 0b 00 01 addi r0,r11,1
ffc203c4: 90 09 27 f4 stw r0,10228(r9)
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
ffc203c8: 3f a0 00 00 lis r29,0
ffc203cc: 80 7d 28 34 lwz r3,10292(r29)
ffc203d0: 3c 80 10 00 lis r4,4096
ffc203d4: 60 84 00 08 ori r4,r4,8
ffc203d8: 4b fe ba f5 bl ffc0becc <_Thread_Set_state>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
&_Thread_Executing->Timer,
ffc203dc: 81 3d 28 34 lwz r9,10292(r29)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc203e0: 3d 40 ff c1 lis r10,-63
_Thread_Disable_dispatch();
_Thread_Set_state(
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
ffc203e4: 81 69 00 08 lwz r11,8(r9)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc203e8: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc203ec: 39 4a b1 f8 addi r10,r10,-19976
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc203f0: 90 09 00 6c stw r0,108(r9)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc203f4: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc203f8: 91 49 00 64 stw r10,100(r9)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc203fc: 38 63 2d c8 addi r3,r3,11720
ffc20400: 38 89 00 48 addi r4,r9,72
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc20404: 91 69 00 68 stw r11,104(r9)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc20408: 90 09 00 50 stw r0,80(r9)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc2040c: 93 e9 00 54 stw r31,84(r9)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc20410: 4b fe c6 81 bl ffc0ca90 <_Watchdog_Insert>
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
ffc20414: 4b fe b0 21 bl ffc0b434 <_Thread_Enable_dispatch>
/* calculate time remaining */
if ( rmtp ) {
ffc20418: 41 92 00 40 beq- cr4,ffc20458 <nanosleep+0x134>
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
ffc2041c: 81 3d 28 34 lwz r9,10292(r29)
_Timespec_From_ticks( ticks, rmtp );
ffc20420: 7f c4 f3 78 mr r4,r30
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
ffc20424: 80 09 00 60 lwz r0,96(r9)
ffc20428: 81 29 00 5c lwz r9,92(r9)
ffc2042c: 7c 00 48 50 subf r0,r0,r9
ffc20430: 7f e0 fa 14 add r31,r0,r31
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
ffc20434: 7f e3 fb 78 mr r3,r31
ffc20438: 48 00 00 89 bl ffc204c0 <_Timespec_From_ticks>
*/
#if defined(RTEMS_POSIX_API)
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
ffc2043c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc20440: 41 be 00 18 beq+ cr7,ffc20458 <nanosleep+0x134>
rtems_set_errno_and_return_minus_one( EINTR );
ffc20444: 4b ff 3e 29 bl ffc1426c <__errno>
ffc20448: 38 00 00 04 li r0,4
ffc2044c: 90 03 00 00 stw r0,0(r3)
ffc20450: 38 60 ff ff li r3,-1
ffc20454: 48 00 00 08 b ffc2045c <nanosleep+0x138>
ffc20458: 38 60 00 00 li r3,0
#endif
}
return 0;
}
ffc2045c: 80 01 00 1c lwz r0,28(r1)
ffc20460: 81 81 00 08 lwz r12,8(r1)
ffc20464: 7c 08 03 a6 mtlr r0
ffc20468: 83 a1 00 0c lwz r29,12(r1)
ffc2046c: 83 c1 00 10 lwz r30,16(r1)
ffc20470: 7d 80 81 20 mtcrf 8,r12
ffc20474: 83 e1 00 14 lwz r31,20(r1)
ffc20478: 38 21 00 18 addi r1,r1,24
ffc2047c: 4e 80 00 20 blr
ffc0d7c8 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
ffc0d7c8: 2c 03 00 00 cmpwi r3,0
ffc0d7cc: 41 82 00 3c beq- ffc0d808 <pthread_attr_setschedpolicy+0x40>
ffc0d7d0: 80 03 00 00 lwz r0,0(r3)
ffc0d7d4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0d7d8: 41 9e 00 30 beq- cr7,ffc0d808 <pthread_attr_setschedpolicy+0x40>
return EINVAL;
switch ( policy ) {
ffc0d7dc: 2b 84 00 04 cmplwi cr7,r4,4
ffc0d7e0: 41 9d 00 14 bgt- cr7,ffc0d7f4 <pthread_attr_setschedpolicy+0x2c>
ffc0d7e4: 38 00 00 01 li r0,1
ffc0d7e8: 7c 00 20 30 slw r0,r0,r4
ffc0d7ec: 70 09 00 17 andi. r9,r0,23
ffc0d7f0: 40 82 00 0c bne- ffc0d7fc <pthread_attr_setschedpolicy+0x34><== ALWAYS TAKEN
ffc0d7f4: 38 60 00 86 li r3,134
ffc0d7f8: 4e 80 00 20 blr
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
ffc0d7fc: 90 83 00 14 stw r4,20(r3)
ffc0d800: 38 60 00 00 li r3,0
return 0;
ffc0d804: 4e 80 00 20 blr
ffc0d808: 38 60 00 16 li r3,22
default:
return ENOTSUP;
}
}
ffc0d80c: 4e 80 00 20 blr
ffc08e34 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
ffc08e34: 94 21 ff d8 stwu r1,-40(r1)
ffc08e38: 7c 08 02 a6 mflr r0
ffc08e3c: 93 e1 00 24 stw r31,36(r1)
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
ffc08e40: 7c 7f 1b 79 mr. r31,r3
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
ffc08e44: 93 c1 00 20 stw r30,32(r1)
ffc08e48: 7c be 2b 78 mr r30,r5
ffc08e4c: 90 01 00 2c stw r0,44(r1)
ffc08e50: 93 81 00 18 stw r28,24(r1)
ffc08e54: 93 a1 00 1c stw r29,28(r1)
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
ffc08e58: 41 82 00 a8 beq- ffc08f00 <pthread_barrier_init+0xcc>
return EINVAL;
if ( count == 0 )
ffc08e5c: 2f 85 00 00 cmpwi cr7,r5,0
ffc08e60: 41 9e 00 a0 beq- cr7,ffc08f00 <pthread_barrier_init+0xcc>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
ffc08e64: 2f 84 00 00 cmpwi cr7,r4,0
ffc08e68: 7c 9d 23 78 mr r29,r4
ffc08e6c: 40 be 00 10 bne+ cr7,ffc08e7c <pthread_barrier_init+0x48>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
ffc08e70: 3b a1 00 10 addi r29,r1,16
ffc08e74: 7f a3 eb 78 mr r3,r29
ffc08e78: 4b ff fe cd bl ffc08d44 <pthread_barrierattr_init>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc08e7c: 80 1d 00 00 lwz r0,0(r29)
ffc08e80: 2f 80 00 00 cmpwi cr7,r0,0
ffc08e84: 41 9e 00 7c beq- cr7,ffc08f00 <pthread_barrier_init+0xcc>
return EINVAL;
switch ( the_attr->process_shared ) {
ffc08e88: 83 bd 00 04 lwz r29,4(r29)
ffc08e8c: 2f 9d 00 00 cmpwi cr7,r29,0
ffc08e90: 40 9e 00 70 bne- cr7,ffc08f00 <pthread_barrier_init+0xcc><== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc08e94: 3d 20 00 00 lis r9,0
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
ffc08e98: 93 c1 00 0c stw r30,12(r1)
ffc08e9c: 81 69 27 e0 lwz r11,10208(r9)
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
ffc08ea0: 93 a1 00 08 stw r29,8(r1)
ffc08ea4: 38 0b 00 01 addi r0,r11,1
ffc08ea8: 90 09 27 e0 stw r0,10208(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 *)
ffc08eac: 3f 80 00 00 lis r28,0
ffc08eb0: 3b 9c 2f f8 addi r28,r28,12280
ffc08eb4: 7f 83 e3 78 mr r3,r28
ffc08eb8: 48 00 27 7d bl ffc0b634 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
ffc08ebc: 7c 7e 1b 79 mr. r30,r3
ffc08ec0: 40 a2 00 10 bne+ ffc08ed0 <pthread_barrier_init+0x9c>
_Thread_Enable_dispatch();
ffc08ec4: 48 00 38 2d bl ffc0c6f0 <_Thread_Enable_dispatch>
ffc08ec8: 38 60 00 0b li r3,11
return EAGAIN;
ffc08ecc: 48 00 00 38 b ffc08f04 <pthread_barrier_init+0xd0>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
ffc08ed0: 38 7e 00 10 addi r3,r30,16
ffc08ed4: 38 81 00 08 addi r4,r1,8
ffc08ed8: 48 00 1c 41 bl ffc0ab18 <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc08edc: 80 1e 00 08 lwz r0,8(r30)
ffc08ee0: 81 7c 00 1c lwz r11,28(r28)
ffc08ee4: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc08ee8: 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;
ffc08eec: 93 be 00 0c stw r29,12(r30)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
ffc08ef0: 90 1f 00 00 stw r0,0(r31)
_Thread_Enable_dispatch();
ffc08ef4: 48 00 37 fd bl ffc0c6f0 <_Thread_Enable_dispatch>
ffc08ef8: 38 60 00 00 li r3,0
return 0;
ffc08efc: 48 00 00 08 b ffc08f04 <pthread_barrier_init+0xd0>
ffc08f00: 38 60 00 16 li r3,22
}
ffc08f04: 80 01 00 2c lwz r0,44(r1)
ffc08f08: 83 81 00 18 lwz r28,24(r1)
ffc08f0c: 7c 08 03 a6 mtlr r0
ffc08f10: 83 a1 00 1c lwz r29,28(r1)
ffc08f14: 83 c1 00 20 lwz r30,32(r1)
ffc08f18: 83 e1 00 24 lwz r31,36(r1)
ffc08f1c: 38 21 00 28 addi r1,r1,40
ffc08f20: 4e 80 00 20 blr
ffc0841c <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
ffc0841c: 94 21 ff f0 stwu r1,-16(r1)
ffc08420: 7c 08 02 a6 mflr r0
ffc08424: 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 )
ffc08428: 7c 7e 1b 79 mr. r30,r3
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
ffc0842c: 93 e1 00 0c stw r31,12(r1)
ffc08430: 7c 9f 23 78 mr r31,r4
ffc08434: 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 )
ffc08438: 41 82 00 48 beq- ffc08480 <pthread_cleanup_push+0x64>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0843c: 3d 20 00 00 lis r9,0
ffc08440: 81 69 27 b8 lwz r11,10168(r9)
ffc08444: 38 0b 00 01 addi r0,r11,1
ffc08448: 90 09 27 b8 stw r0,10168(r9)
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
ffc0844c: 38 60 00 10 li r3,16
ffc08450: 48 00 52 81 bl ffc0d6d0 <_Workspace_Allocate>
if ( handler ) {
ffc08454: 7c 69 1b 79 mr. r9,r3
ffc08458: 41 82 00 24 beq- ffc0847c <pthread_cleanup_push+0x60> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
ffc0845c: 3d 60 00 00 lis r11,0
handler->routine = routine;
ffc08460: 93 c9 00 08 stw r30,8(r9)
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
ffc08464: 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;
ffc08468: 81 6b 27 f8 lwz r11,10232(r11)
ffc0846c: 80 6b 01 48 lwz r3,328(r11)
handler->routine = routine;
handler->arg = arg;
ffc08470: 93 e9 00 0c stw r31,12(r9)
_Chain_Append( handler_stack, &handler->Node );
ffc08474: 38 63 00 e0 addi r3,r3,224
ffc08478: 48 00 1d 65 bl ffc0a1dc <_Chain_Append>
}
_Thread_Enable_dispatch();
ffc0847c: 48 00 38 f1 bl ffc0bd6c <_Thread_Enable_dispatch>
}
ffc08480: 80 01 00 14 lwz r0,20(r1)
ffc08484: 83 c1 00 08 lwz r30,8(r1)
ffc08488: 7c 08 03 a6 mtlr r0
ffc0848c: 83 e1 00 0c lwz r31,12(r1)
ffc08490: 38 21 00 10 addi r1,r1,16
ffc08494: 4e 80 00 20 blr
ffc098cc <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
ffc098cc: 94 21 ff e8 stwu r1,-24(r1)
ffc098d0: 7c 08 02 a6 mflr r0
ffc098d4: 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;
ffc098d8: 7c 9e 23 79 mr. r30,r4
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
ffc098dc: 93 81 00 08 stw r28,8(r1)
ffc098e0: 7c 7c 1b 78 mr r28,r3
ffc098e4: 90 01 00 1c stw r0,28(r1)
ffc098e8: 93 a1 00 0c stw r29,12(r1)
ffc098ec: 93 e1 00 14 stw r31,20(r1)
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
ffc098f0: 40 a2 00 0c bne+ ffc098fc <pthread_cond_init+0x30>
ffc098f4: 3f c0 00 00 lis r30,0
ffc098f8: 3b de 27 28 addi r30,r30,10024
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
ffc098fc: 80 1e 00 04 lwz r0,4(r30)
ffc09900: 2f 80 00 01 cmpwi cr7,r0,1
ffc09904: 41 9e 00 8c beq- cr7,ffc09990 <pthread_cond_init+0xc4> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
ffc09908: 80 1e 00 00 lwz r0,0(r30)
ffc0990c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09910: 41 be 00 80 beq+ cr7,ffc09990 <pthread_cond_init+0xc4>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc09914: 3d 20 00 00 lis r9,0
ffc09918: 81 69 27 ec lwz r11,10220(r9)
ffc0991c: 38 0b 00 01 addi r0,r11,1
ffc09920: 90 09 27 ec stw r0,10220(r9)
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
ffc09924: 3f a0 00 00 lis r29,0
ffc09928: 3b bd 30 b0 addi r29,r29,12464
ffc0992c: 7f a3 eb 78 mr r3,r29
ffc09930: 48 00 2e e9 bl ffc0c818 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
ffc09934: 7c 7f 1b 79 mr. r31,r3
ffc09938: 40 a2 00 10 bne+ ffc09948 <pthread_cond_init+0x7c>
_Thread_Enable_dispatch();
ffc0993c: 48 00 3f 99 bl ffc0d8d4 <_Thread_Enable_dispatch>
ffc09940: 38 60 00 0c li r3,12
return ENOMEM;
ffc09944: 48 00 00 50 b ffc09994 <pthread_cond_init+0xc8>
}
the_cond->process_shared = the_attr->process_shared;
ffc09948: 80 1e 00 04 lwz r0,4(r30)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
ffc0994c: 3b c0 00 00 li r30,0
ffc09950: 93 df 00 14 stw r30,20(r31)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
ffc09954: 38 7f 00 18 addi r3,r31,24
ffc09958: 38 80 00 00 li r4,0
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
ffc0995c: 90 1f 00 10 stw r0,16(r31)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
ffc09960: 38 a0 08 00 li r5,2048
ffc09964: 38 c0 00 74 li r6,116
ffc09968: 48 00 49 05 bl ffc0e26c <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc0996c: 80 1f 00 08 lwz r0,8(r31)
ffc09970: 81 7d 00 1c lwz r11,28(r29)
ffc09974: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc09978: 7f eb 49 2e stwx r31,r11,r9
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc0997c: 93 df 00 0c stw r30,12(r31)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
ffc09980: 90 1c 00 00 stw r0,0(r28)
_Thread_Enable_dispatch();
ffc09984: 48 00 3f 51 bl ffc0d8d4 <_Thread_Enable_dispatch>
ffc09988: 38 60 00 00 li r3,0
return 0;
ffc0998c: 48 00 00 08 b ffc09994 <pthread_cond_init+0xc8>
ffc09990: 38 60 00 16 li r3,22
}
ffc09994: 80 01 00 1c lwz r0,28(r1)
ffc09998: 83 81 00 08 lwz r28,8(r1)
ffc0999c: 7c 08 03 a6 mtlr r0
ffc099a0: 83 a1 00 0c lwz r29,12(r1)
ffc099a4: 83 c1 00 10 lwz r30,16(r1)
ffc099a8: 83 e1 00 14 lwz r31,20(r1)
ffc099ac: 38 21 00 18 addi r1,r1,24
ffc099b0: 4e 80 00 20 blr
ffc09700 <pthread_condattr_destroy>:
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
ffc09700: 2c 03 00 00 cmpwi r3,0
ffc09704: 41 82 00 20 beq- ffc09724 <pthread_condattr_destroy+0x24>
ffc09708: 80 03 00 00 lwz r0,0(r3)
ffc0970c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09710: 41 9e 00 14 beq- cr7,ffc09724 <pthread_condattr_destroy+0x24><== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
ffc09714: 38 00 00 00 li r0,0
ffc09718: 90 03 00 00 stw r0,0(r3)
ffc0971c: 38 60 00 00 li r3,0
return 0;
ffc09720: 4e 80 00 20 blr
ffc09724: 38 60 00 16 li r3,22
}
ffc09728: 4e 80 00 20 blr
ffc08a00 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc08a00: 94 21 ff 80 stwu r1,-128(r1)
ffc08a04: 7c 08 02 a6 mflr r0
ffc08a08: 93 01 00 60 stw r24,96(r1)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
ffc08a0c: 7c b8 2b 79 mr. r24,r5
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc08a10: 93 21 00 64 stw r25,100(r1)
ffc08a14: 7c d9 33 78 mr r25,r6
ffc08a18: 93 41 00 68 stw r26,104(r1)
ffc08a1c: 7c 7a 1b 78 mr r26,r3
ffc08a20: 93 c1 00 78 stw r30,120(r1)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
ffc08a24: 3b c0 00 0e li r30,14
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
ffc08a28: 90 01 00 84 stw r0,132(r1)
ffc08a2c: 92 a1 00 54 stw r21,84(r1)
ffc08a30: 92 c1 00 58 stw r22,88(r1)
ffc08a34: 92 e1 00 5c stw r23,92(r1)
ffc08a38: 93 61 00 6c stw r27,108(r1)
ffc08a3c: 93 81 00 70 stw r28,112(r1)
ffc08a40: 93 a1 00 74 stw r29,116(r1)
ffc08a44: 93 e1 00 7c stw r31,124(r1)
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
ffc08a48: 41 82 02 80 beq- ffc08cc8 <pthread_create+0x2c8>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
ffc08a4c: 2f 84 00 00 cmpwi cr7,r4,0
ffc08a50: 7c 9f 23 78 mr r31,r4
ffc08a54: 40 be 00 0c bne+ cr7,ffc08a60 <pthread_create+0x60>
ffc08a58: 3f e0 ff c2 lis r31,-62
ffc08a5c: 3b ff 1f 18 addi r31,r31,7960
if ( !the_attr->is_initialized )
ffc08a60: 80 1f 00 00 lwz r0,0(r31)
ffc08a64: 2f 80 00 00 cmpwi cr7,r0,0
ffc08a68: 41 9e 02 5c beq- cr7,ffc08cc4 <pthread_create+0x2c4>
* 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) )
ffc08a6c: 80 1f 00 04 lwz r0,4(r31)
ffc08a70: 2f 80 00 00 cmpwi cr7,r0,0
ffc08a74: 41 9e 00 18 beq- cr7,ffc08a8c <pthread_create+0x8c>
ffc08a78: 3d 20 00 00 lis r9,0
ffc08a7c: 80 09 26 e8 lwz r0,9960(r9)
ffc08a80: 81 3f 00 08 lwz r9,8(r31)
ffc08a84: 7f 89 00 40 cmplw cr7,r9,r0
ffc08a88: 41 9c 02 3c blt- cr7,ffc08cc4 <pthread_create+0x2c4>
* 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 ) {
ffc08a8c: 80 1f 00 10 lwz r0,16(r31)
ffc08a90: 2f 80 00 01 cmpwi cr7,r0,1
ffc08a94: 41 9e 00 10 beq- cr7,ffc08aa4 <pthread_create+0xa4>
ffc08a98: 2f 80 00 02 cmpwi cr7,r0,2
ffc08a9c: 40 be 02 28 bne+ cr7,ffc08cc4 <pthread_create+0x2c4>
ffc08aa0: 48 00 00 44 b ffc08ae4 <pthread_create+0xe4>
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc08aa4: 3d 20 00 00 lis r9,0
ffc08aa8: 81 29 27 fc lwz r9,10236(r9)
ffc08aac: 81 29 01 48 lwz r9,328(r9)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
ffc08ab0: 81 69 00 8c lwz r11,140(r9)
ffc08ab4: 80 09 00 90 lwz r0,144(r9)
ffc08ab8: 81 09 00 84 lwz r8,132(r9)
ffc08abc: 81 49 00 88 lwz r10,136(r9)
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
ffc08ac0: 83 89 00 80 lwz r28,128(r9)
schedparam = api->schedparam;
ffc08ac4: 91 01 00 20 stw r8,32(r1)
ffc08ac8: 91 41 00 24 stw r10,36(r1)
ffc08acc: 91 61 00 28 stw r11,40(r1)
ffc08ad0: 90 01 00 2c stw r0,44(r1)
ffc08ad4: 80 09 00 9c lwz r0,156(r9)
ffc08ad8: 81 69 00 94 lwz r11,148(r9)
ffc08adc: 81 29 00 98 lwz r9,152(r9)
ffc08ae0: 48 00 00 34 b ffc08b14 <pthread_create+0x114>
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
ffc08ae4: 81 7f 00 1c lwz r11,28(r31)
ffc08ae8: 81 3f 00 20 lwz r9,32(r31)
ffc08aec: 80 1f 00 24 lwz r0,36(r31)
ffc08af0: 81 5f 00 18 lwz r10,24(r31)
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
ffc08af4: 83 9f 00 14 lwz r28,20(r31)
schedparam = the_attr->schedparam;
ffc08af8: 91 41 00 20 stw r10,32(r1)
ffc08afc: 91 61 00 24 stw r11,36(r1)
ffc08b00: 91 21 00 28 stw r9,40(r1)
ffc08b04: 90 01 00 2c stw r0,44(r1)
ffc08b08: 81 7f 00 28 lwz r11,40(r31)
ffc08b0c: 81 3f 00 2c lwz r9,44(r31)
ffc08b10: 80 1f 00 30 lwz r0,48(r31)
ffc08b14: 91 61 00 30 stw r11,48(r1)
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
ffc08b18: 3b c0 00 86 li r30,134
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
schedparam = the_attr->schedparam;
ffc08b1c: 91 21 00 34 stw r9,52(r1)
ffc08b20: 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 )
ffc08b24: 80 1f 00 0c lwz r0,12(r31)
ffc08b28: 2f 80 00 00 cmpwi cr7,r0,0
ffc08b2c: 40 9e 01 9c bne- cr7,ffc08cc8 <pthread_create+0x2c8>
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
ffc08b30: 80 61 00 20 lwz r3,32(r1)
ffc08b34: 48 00 81 8d bl ffc10cc0 <_POSIX_Priority_Is_valid>
ffc08b38: 2f 83 00 00 cmpwi cr7,r3,0
ffc08b3c: 41 be 01 88 beq+ cr7,ffc08cc4 <pthread_create+0x2c4> <== NEVER TAKEN
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
ffc08b40: 7c 24 0b 78 mr r4,r1
ffc08b44: 86 e4 00 20 lwzu r23,32(r4)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
ffc08b48: 3d 20 00 00 lis r9,0
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
ffc08b4c: 7f 83 e3 78 mr r3,r28
ffc08b50: 8a c9 26 ec lbz r22,9964(r9)
ffc08b54: 38 a1 00 18 addi r5,r1,24
ffc08b58: 38 c1 00 1c addi r6,r1,28
ffc08b5c: 48 00 81 89 bl ffc10ce4 <_POSIX_Thread_Translate_sched_param>
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
ffc08b60: 7c 7e 1b 79 mr. r30,r3
ffc08b64: 40 a2 01 64 bne+ ffc08cc8 <pthread_create+0x2c8>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
ffc08b68: 3e a0 00 00 lis r21,0
ffc08b6c: 80 75 27 f4 lwz r3,10228(r21)
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
ffc08b70: 3f 60 00 00 lis r27,0
ffc08b74: 3b 7b 2e 58 addi r27,r27,11864
ffc08b78: 48 00 1c f9 bl ffc0a870 <_API_Mutex_Lock>
ffc08b7c: 7f 63 db 78 mr r3,r27
ffc08b80: 48 00 28 85 bl ffc0b404 <_Objects_Allocate>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
ffc08b84: 7c 7d 1b 79 mr. r29,r3
ffc08b88: 40 a2 00 0c bne+ ffc08b94 <pthread_create+0x194>
_RTEMS_Unlock_allocator();
ffc08b8c: 80 75 27 f4 lwz r3,10228(r21)
ffc08b90: 48 00 00 78 b ffc08c08 <pthread_create+0x208>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
ffc08b94: 3d 20 00 00 lis r9,0
ffc08b98: 80 1f 00 08 lwz r0,8(r31)
ffc08b9c: 80 c9 26 e8 lwz r6,9960(r9)
ffc08ba0: 93 c1 00 48 stw r30,72(r1)
ffc08ba4: 54 c6 08 3c rlwinm r6,r6,1,0,30
ffc08ba8: 7f 86 00 40 cmplw cr7,r6,r0
ffc08bac: 80 bf 00 04 lwz r5,4(r31)
ffc08bb0: 40 9c 00 08 bge- cr7,ffc08bb8 <pthread_create+0x1b8>
ffc08bb4: 7c 06 03 78 mr r6,r0
ffc08bb8: 80 01 00 1c lwz r0,28(r1)
ffc08bbc: 7d 17 b0 50 subf r8,r23,r22
ffc08bc0: 81 41 00 18 lwz r10,24(r1)
ffc08bc4: 7f 63 db 78 mr r3,r27
ffc08bc8: 90 01 00 08 stw r0,8(r1)
ffc08bcc: 38 00 00 00 li r0,0
ffc08bd0: 7f a4 eb 78 mr r4,r29
ffc08bd4: 90 01 00 0c stw r0,12(r1)
ffc08bd8: 38 e0 00 01 li r7,1
ffc08bdc: 38 01 00 48 addi r0,r1,72
ffc08be0: 39 20 00 01 li r9,1
ffc08be4: 90 01 00 10 stw r0,16(r1)
ffc08be8: 48 00 39 f9 bl ffc0c5e0 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
ffc08bec: 2f 83 00 00 cmpwi cr7,r3,0
ffc08bf0: 40 9e 00 20 bne- cr7,ffc08c10 <pthread_create+0x210>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
ffc08bf4: 7f 63 db 78 mr r3,r27
ffc08bf8: 7f a4 eb 78 mr r4,r29
ffc08bfc: 48 00 2b f5 bl ffc0b7f0 <_Objects_Free>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
ffc08c00: 3d 20 00 00 lis r9,0
ffc08c04: 80 69 27 f4 lwz r3,10228(r9)
ffc08c08: 3b c0 00 0b li r30,11
ffc08c0c: 48 00 00 b0 b ffc08cbc <pthread_create+0x2bc>
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc08c10: 83 7d 01 48 lwz r27,328(r29)
api->Attributes = *the_attr;
ffc08c14: 7f e4 fb 78 mr r4,r31
ffc08c18: 38 a0 00 3c li r5,60
ffc08c1c: 7f 63 db 78 mr r3,r27
ffc08c20: 48 00 cd c9 bl ffc159e8 <memcpy>
api->detachstate = the_attr->detachstate;
ffc08c24: 80 1f 00 38 lwz r0,56(r31)
api->schedpolicy = schedpolicy;
ffc08c28: 93 9b 00 80 stw r28,128(r27)
the_thread->do_post_task_switch_extension = true;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc08c2c: 7f 05 c3 78 mr r5,r24
ffc08c30: 7f 26 cb 78 mr r6,r25
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
ffc08c34: 90 1b 00 3c stw r0,60(r27)
the_thread->do_post_task_switch_extension = true;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc08c38: 7f a3 eb 78 mr r3,r29
ffc08c3c: 38 80 00 01 li r4,1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
ffc08c40: 81 61 00 24 lwz r11,36(r1)
the_thread->do_post_task_switch_extension = true;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc08c44: 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;
ffc08c48: 81 21 00 28 lwz r9,40(r1)
ffc08c4c: 80 01 00 2c lwz r0,44(r1)
ffc08c50: 81 41 00 20 lwz r10,32(r1)
ffc08c54: 91 7b 00 88 stw r11,136(r27)
* This insures we evaluate the process-wide signals pending when we
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
ffc08c58: 39 60 00 01 li r11,1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
ffc08c5c: 91 5b 00 84 stw r10,132(r27)
ffc08c60: 91 3b 00 8c stw r9,140(r27)
ffc08c64: 90 1b 00 90 stw r0,144(r27)
* This insures we evaluate the process-wide signals pending when we
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
ffc08c68: 99 7d 00 74 stb r11,116(r29)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
ffc08c6c: 81 21 00 34 lwz r9,52(r1)
ffc08c70: 80 01 00 38 lwz r0,56(r1)
ffc08c74: 81 61 00 30 lwz r11,48(r1)
ffc08c78: 91 3b 00 98 stw r9,152(r27)
ffc08c7c: 91 7b 00 94 stw r11,148(r27)
ffc08c80: 90 1b 00 9c stw r0,156(r27)
the_thread->do_post_task_switch_extension = true;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
ffc08c84: 48 00 46 15 bl ffc0d298 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
ffc08c88: 2f 9c 00 04 cmpwi cr7,r28,4
ffc08c8c: 40 be 00 20 bne+ cr7,ffc08cac <pthread_create+0x2ac>
_Watchdog_Insert_ticks(
ffc08c90: 38 7b 00 8c addi r3,r27,140
ffc08c94: 48 00 49 95 bl ffc0d628 <_Timespec_To_ticks>
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08c98: 38 9b 00 a4 addi r4,r27,164
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc08c9c: 90 7b 00 b0 stw r3,176(r27)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc08ca0: 3c 60 00 00 lis r3,0
ffc08ca4: 38 63 2d 28 addi r3,r3,11560
ffc08ca8: 48 00 4e d9 bl ffc0db80 <_Watchdog_Insert>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
ffc08cac: 80 1d 00 08 lwz r0,8(r29)
_RTEMS_Unlock_allocator();
ffc08cb0: 3d 20 00 00 lis r9,0
ffc08cb4: 80 69 27 f4 lwz r3,10228(r9)
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
ffc08cb8: 90 1a 00 00 stw r0,0(r26)
_RTEMS_Unlock_allocator();
ffc08cbc: 48 00 1c 35 bl ffc0a8f0 <_API_Mutex_Unlock>
return 0;
ffc08cc0: 48 00 00 08 b ffc08cc8 <pthread_create+0x2c8>
ffc08cc4: 3b c0 00 16 li r30,22
}
ffc08cc8: 80 01 00 84 lwz r0,132(r1)
ffc08ccc: 7f c3 f3 78 mr r3,r30
ffc08cd0: 82 a1 00 54 lwz r21,84(r1)
ffc08cd4: 7c 08 03 a6 mtlr r0
ffc08cd8: 82 c1 00 58 lwz r22,88(r1)
ffc08cdc: 82 e1 00 5c lwz r23,92(r1)
ffc08ce0: 83 01 00 60 lwz r24,96(r1)
ffc08ce4: 83 21 00 64 lwz r25,100(r1)
ffc08ce8: 83 41 00 68 lwz r26,104(r1)
ffc08cec: 83 61 00 6c lwz r27,108(r1)
ffc08cf0: 83 81 00 70 lwz r28,112(r1)
ffc08cf4: 83 a1 00 74 lwz r29,116(r1)
ffc08cf8: 83 c1 00 78 lwz r30,120(r1)
ffc08cfc: 83 e1 00 7c lwz r31,124(r1)
ffc08d00: 38 21 00 80 addi r1,r1,128
ffc08d04: 4e 80 00 20 blr
ffc07fcc <pthread_mutexattr_gettype>:
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
if ( !attr )
ffc07fcc: 2c 03 00 00 cmpwi r3,0
ffc07fd0: 41 82 00 28 beq- ffc07ff8 <pthread_mutexattr_gettype+0x2c>
return EINVAL;
if ( !attr->is_initialized )
ffc07fd4: 80 03 00 00 lwz r0,0(r3)
ffc07fd8: 2f 80 00 00 cmpwi cr7,r0,0
ffc07fdc: 41 9e 00 1c beq- cr7,ffc07ff8 <pthread_mutexattr_gettype+0x2c>
return EINVAL;
if ( !type )
ffc07fe0: 2f 84 00 00 cmpwi cr7,r4,0
ffc07fe4: 41 9e 00 14 beq- cr7,ffc07ff8 <pthread_mutexattr_gettype+0x2c><== NEVER TAKEN
return EINVAL;
*type = attr->type;
ffc07fe8: 80 03 00 10 lwz r0,16(r3)
ffc07fec: 38 60 00 00 li r3,0
ffc07ff0: 90 04 00 00 stw r0,0(r4)
return 0;
ffc07ff4: 4e 80 00 20 blr
ffc07ff8: 38 60 00 16 li r3,22
}
ffc07ffc: 4e 80 00 20 blr
ffc0adc8 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
ffc0adc8: 2c 03 00 00 cmpwi r3,0
ffc0adcc: 41 82 00 24 beq- ffc0adf0 <pthread_mutexattr_setpshared+0x28>
ffc0add0: 80 03 00 00 lwz r0,0(r3)
ffc0add4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0add8: 41 9e 00 18 beq- cr7,ffc0adf0 <pthread_mutexattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
ffc0addc: 2b 84 00 01 cmplwi cr7,r4,1
ffc0ade0: 41 9d 00 10 bgt- cr7,ffc0adf0 <pthread_mutexattr_setpshared+0x28><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
ffc0ade4: 90 83 00 04 stw r4,4(r3)
ffc0ade8: 38 60 00 00 li r3,0
return 0;
ffc0adec: 4e 80 00 20 blr
ffc0adf0: 38 60 00 16 li r3,22
default:
return EINVAL;
}
}
ffc0adf4: 4e 80 00 20 blr
ffc0804c <pthread_mutexattr_settype>:
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
if ( !attr || !attr->is_initialized )
ffc0804c: 2c 03 00 00 cmpwi r3,0
ffc08050: 41 82 00 24 beq- ffc08074 <pthread_mutexattr_settype+0x28>
ffc08054: 80 03 00 00 lwz r0,0(r3)
ffc08058: 2f 80 00 00 cmpwi cr7,r0,0
ffc0805c: 41 9e 00 18 beq- cr7,ffc08074 <pthread_mutexattr_settype+0x28><== NEVER TAKEN
return EINVAL;
switch ( type ) {
ffc08060: 2b 84 00 03 cmplwi cr7,r4,3
ffc08064: 41 9d 00 10 bgt- cr7,ffc08074 <pthread_mutexattr_settype+0x28>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
ffc08068: 90 83 00 10 stw r4,16(r3)
ffc0806c: 38 60 00 00 li r3,0
return 0;
ffc08070: 4e 80 00 20 blr
ffc08074: 38 60 00 16 li r3,22
default:
return EINVAL;
}
}
ffc08078: 4e 80 00 20 blr
ffc09240 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
ffc09240: 94 21 ff e0 stwu r1,-32(r1)
ffc09244: 7c 08 02 a6 mflr r0
ffc09248: 93 e1 00 1c stw r31,28(r1)
if ( !once_control || !init_routine )
ffc0924c: 7c 7f 1b 79 mr. r31,r3
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
ffc09250: 93 c1 00 18 stw r30,24(r1)
ffc09254: 7c 9e 23 78 mr r30,r4
ffc09258: 90 01 00 24 stw r0,36(r1)
if ( !once_control || !init_routine )
ffc0925c: 41 82 00 64 beq- ffc092c0 <pthread_once+0x80>
ffc09260: 2f 84 00 00 cmpwi cr7,r4,0
ffc09264: 41 9e 00 5c beq- cr7,ffc092c0 <pthread_once+0x80>
return EINVAL;
if ( !once_control->init_executed ) {
ffc09268: 80 1f 00 04 lwz r0,4(r31)
ffc0926c: 38 60 00 00 li r3,0
ffc09270: 2f 80 00 00 cmpwi cr7,r0,0
ffc09274: 40 be 00 50 bne+ cr7,ffc092c4 <pthread_once+0x84>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
ffc09278: 38 60 01 00 li r3,256
ffc0927c: 38 80 01 00 li r4,256
ffc09280: 38 a1 00 08 addi r5,r1,8
ffc09284: 48 00 0d 9d bl ffc0a020 <rtems_task_mode>
if ( !once_control->init_executed ) {
ffc09288: 80 1f 00 04 lwz r0,4(r31)
ffc0928c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09290: 40 be 00 18 bne+ cr7,ffc092a8 <pthread_once+0x68> <== NEVER TAKEN
once_control->is_initialized = true;
ffc09294: 38 00 00 01 li r0,1
once_control->init_executed = true;
(*init_routine)();
ffc09298: 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;
once_control->init_executed = true;
ffc0929c: 90 1f 00 04 stw r0,4(r31)
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;
ffc092a0: 90 1f 00 00 stw r0,0(r31)
once_control->init_executed = true;
(*init_routine)();
ffc092a4: 4e 80 04 21 bctrl
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
ffc092a8: 7c 25 0b 78 mr r5,r1
ffc092ac: 84 65 00 08 lwzu r3,8(r5)
ffc092b0: 38 80 01 00 li r4,256
ffc092b4: 48 00 0d 6d bl ffc0a020 <rtems_task_mode>
ffc092b8: 38 60 00 00 li r3,0
ffc092bc: 48 00 00 08 b ffc092c4 <pthread_once+0x84>
ffc092c0: 38 60 00 16 li r3,22
}
return 0;
}
ffc092c4: 80 01 00 24 lwz r0,36(r1)
ffc092c8: 83 c1 00 18 lwz r30,24(r1)
ffc092cc: 7c 08 03 a6 mtlr r0
ffc092d0: 83 e1 00 1c lwz r31,28(r1)
ffc092d4: 38 21 00 20 addi r1,r1,32
ffc092d8: 4e 80 00 20 blr
ffc09b9c <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
ffc09b9c: 94 21 ff d8 stwu r1,-40(r1)
ffc09ba0: 7c 08 02 a6 mflr r0
ffc09ba4: 93 81 00 18 stw r28,24(r1)
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
ffc09ba8: 7c 7c 1b 79 mr. r28,r3
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
ffc09bac: 90 01 00 2c stw r0,44(r1)
ffc09bb0: 93 a1 00 1c stw r29,28(r1)
ffc09bb4: 93 c1 00 20 stw r30,32(r1)
ffc09bb8: 93 e1 00 24 stw r31,36(r1)
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
ffc09bbc: 41 82 00 98 beq- ffc09c54 <pthread_rwlock_init+0xb8>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
ffc09bc0: 2f 84 00 00 cmpwi cr7,r4,0
ffc09bc4: 7c 9f 23 78 mr r31,r4
ffc09bc8: 40 be 00 10 bne+ cr7,ffc09bd8 <pthread_rwlock_init+0x3c>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
ffc09bcc: 3b e1 00 0c addi r31,r1,12
ffc09bd0: 7f e3 fb 78 mr r3,r31
ffc09bd4: 48 00 0b ed bl ffc0a7c0 <pthread_rwlockattr_init>
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
ffc09bd8: 80 1f 00 00 lwz r0,0(r31)
ffc09bdc: 2f 80 00 00 cmpwi cr7,r0,0
ffc09be0: 41 9e 00 74 beq- cr7,ffc09c54 <pthread_rwlock_init+0xb8><== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
ffc09be4: 83 df 00 04 lwz r30,4(r31)
ffc09be8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09bec: 40 9e 00 68 bne- cr7,ffc09c54 <pthread_rwlock_init+0xb8><== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc09bf0: 3d 20 00 00 lis r9,0
ffc09bf4: 81 69 27 e0 lwz r11,10208(r9)
ffc09bf8: 38 0b 00 01 addi r0,r11,1
ffc09bfc: 90 09 27 e0 stw r0,10208(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 *)
ffc09c00: 3f a0 00 00 lis r29,0
ffc09c04: 3b bd 2e 38 addi r29,r29,11832
ffc09c08: 7f a3 eb 78 mr r3,r29
ffc09c0c: 48 00 2e 7d bl ffc0ca88 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
ffc09c10: 7c 7f 1b 79 mr. r31,r3
ffc09c14: 40 a2 00 10 bne+ ffc09c24 <pthread_rwlock_init+0x88>
_Thread_Enable_dispatch();
ffc09c18: 48 00 3f 2d bl ffc0db44 <_Thread_Enable_dispatch>
ffc09c1c: 38 60 00 0b li r3,11
return EAGAIN;
ffc09c20: 48 00 00 38 b ffc09c58 <pthread_rwlock_init+0xbc>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
ffc09c24: 38 7f 00 10 addi r3,r31,16
ffc09c28: 38 81 00 08 addi r4,r1,8
ffc09c2c: 48 00 24 69 bl ffc0c094 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc09c30: 80 1f 00 08 lwz r0,8(r31)
ffc09c34: 81 7d 00 1c lwz r11,28(r29)
ffc09c38: 54 09 13 ba rlwinm r9,r0,2,14,29
ffc09c3c: 7f eb 49 2e stwx r31,r11,r9
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc09c40: 93 df 00 0c stw r30,12(r31)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
ffc09c44: 90 1c 00 00 stw r0,0(r28)
_Thread_Enable_dispatch();
ffc09c48: 48 00 3e fd bl ffc0db44 <_Thread_Enable_dispatch>
ffc09c4c: 38 60 00 00 li r3,0
return 0;
ffc09c50: 48 00 00 08 b ffc09c58 <pthread_rwlock_init+0xbc>
ffc09c54: 38 60 00 16 li r3,22
}
ffc09c58: 80 01 00 2c lwz r0,44(r1)
ffc09c5c: 83 81 00 18 lwz r28,24(r1)
ffc09c60: 7c 08 03 a6 mtlr r0
ffc09c64: 83 a1 00 1c lwz r29,28(r1)
ffc09c68: 83 c1 00 20 lwz r30,32(r1)
ffc09c6c: 83 e1 00 24 lwz r31,36(r1)
ffc09c70: 38 21 00 28 addi r1,r1,40
ffc09c74: 4e 80 00 20 blr
ffc09cf8 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc09cf8: 94 21 ff d8 stwu r1,-40(r1)
ffc09cfc: 7c 08 02 a6 mflr r0
ffc09d00: 93 a1 00 1c stw r29,28(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc09d04: 7c 7d 1b 79 mr. r29,r3
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc09d08: 90 01 00 2c stw r0,44(r1)
ffc09d0c: 93 c1 00 20 stw r30,32(r1)
ffc09d10: 93 e1 00 24 stw r31,36(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc09d14: 41 82 00 a0 beq- ffc09db4 <pthread_rwlock_timedrdlock+0xbc>
*
* 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 );
ffc09d18: 7c 83 23 78 mr r3,r4
ffc09d1c: 38 81 00 0c addi r4,r1,12
ffc09d20: 48 00 85 4d bl ffc1226c <_POSIX_Absolute_timeout_to_ticks>
ffc09d24: 80 9d 00 00 lwz r4,0(r29)
ffc09d28: 7c 7e 1b 78 mr r30,r3
ffc09d2c: 3c 60 00 00 lis r3,0
ffc09d30: 38 63 2e 38 addi r3,r3,11832
ffc09d34: 38 a1 00 08 addi r5,r1,8
ffc09d38: 48 00 32 fd bl ffc0d034 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
ffc09d3c: 80 01 00 08 lwz r0,8(r1)
ffc09d40: 2f 80 00 00 cmpwi cr7,r0,0
ffc09d44: 40 9e 00 70 bne- cr7,ffc09db4 <pthread_rwlock_timedrdlock+0xbc>
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,
ffc09d48: 6b df 00 03 xori r31,r30,3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
ffc09d4c: 80 9d 00 00 lwz r4,0(r29)
ffc09d50: 7f ff 00 34 cntlzw r31,r31
ffc09d54: 80 c1 00 0c lwz r6,12(r1)
ffc09d58: 57 ff d9 7e rlwinm r31,r31,27,5,31
ffc09d5c: 38 63 00 10 addi r3,r3,16
ffc09d60: 7f e5 fb 78 mr r5,r31
ffc09d64: 38 e0 00 00 li r7,0
ffc09d68: 48 00 23 6d bl ffc0c0d4 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
ffc09d6c: 48 00 3d d9 bl ffc0db44 <_Thread_Enable_dispatch>
if ( !do_wait ) {
ffc09d70: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09d74: 40 9e 00 2c bne- cr7,ffc09da0 <pthread_rwlock_timedrdlock+0xa8>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
ffc09d78: 3d 20 00 00 lis r9,0
ffc09d7c: 81 29 28 20 lwz r9,10272(r9)
ffc09d80: 80 09 00 34 lwz r0,52(r9)
ffc09d84: 2f 80 00 02 cmpwi cr7,r0,2
ffc09d88: 40 be 00 18 bne+ cr7,ffc09da0 <pthread_rwlock_timedrdlock+0xa8>
switch (status) {
ffc09d8c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09d90: 41 9e 00 24 beq- cr7,ffc09db4 <pthread_rwlock_timedrdlock+0xbc><== NEVER TAKEN
ffc09d94: 2b 9e 00 02 cmplwi cr7,r30,2
ffc09d98: 38 60 00 74 li r3,116
ffc09d9c: 40 9d 00 1c ble- cr7,ffc09db8 <pthread_rwlock_timedrdlock+0xc0><== ALWAYS TAKEN
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
ffc09da0: 3d 20 00 00 lis r9,0
ffc09da4: 81 29 28 20 lwz r9,10272(r9)
ffc09da8: 80 69 00 34 lwz r3,52(r9)
ffc09dac: 48 00 01 05 bl ffc09eb0 <_POSIX_RWLock_Translate_core_RWLock_return_code>
ffc09db0: 48 00 00 08 b ffc09db8 <pthread_rwlock_timedrdlock+0xc0>
ffc09db4: 38 60 00 16 li r3,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
ffc09db8: 80 01 00 2c lwz r0,44(r1)
ffc09dbc: 83 a1 00 1c lwz r29,28(r1)
ffc09dc0: 7c 08 03 a6 mtlr r0
ffc09dc4: 83 c1 00 20 lwz r30,32(r1)
ffc09dc8: 83 e1 00 24 lwz r31,36(r1)
ffc09dcc: 38 21 00 28 addi r1,r1,40
ffc09dd0: 4e 80 00 20 blr
ffc09dd4 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc09dd4: 94 21 ff d8 stwu r1,-40(r1)
ffc09dd8: 7c 08 02 a6 mflr r0
ffc09ddc: 93 a1 00 1c stw r29,28(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc09de0: 7c 7d 1b 79 mr. r29,r3
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
ffc09de4: 90 01 00 2c stw r0,44(r1)
ffc09de8: 93 c1 00 20 stw r30,32(r1)
ffc09dec: 93 e1 00 24 stw r31,36(r1)
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
ffc09df0: 41 82 00 a0 beq- ffc09e90 <pthread_rwlock_timedwrlock+0xbc>
*
* 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 );
ffc09df4: 7c 83 23 78 mr r3,r4
ffc09df8: 38 81 00 0c addi r4,r1,12
ffc09dfc: 48 00 84 71 bl ffc1226c <_POSIX_Absolute_timeout_to_ticks>
ffc09e00: 80 9d 00 00 lwz r4,0(r29)
ffc09e04: 7c 7e 1b 78 mr r30,r3
ffc09e08: 3c 60 00 00 lis r3,0
ffc09e0c: 38 63 2e 38 addi r3,r3,11832
ffc09e10: 38 a1 00 08 addi r5,r1,8
ffc09e14: 48 00 32 21 bl ffc0d034 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
ffc09e18: 80 01 00 08 lwz r0,8(r1)
ffc09e1c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09e20: 40 9e 00 70 bne- cr7,ffc09e90 <pthread_rwlock_timedwrlock+0xbc>
(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,
ffc09e24: 6b df 00 03 xori r31,r30,3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
ffc09e28: 80 9d 00 00 lwz r4,0(r29)
ffc09e2c: 7f ff 00 34 cntlzw r31,r31
ffc09e30: 80 c1 00 0c lwz r6,12(r1)
ffc09e34: 57 ff d9 7e rlwinm r31,r31,27,5,31
ffc09e38: 38 63 00 10 addi r3,r3,16
ffc09e3c: 7f e5 fb 78 mr r5,r31
ffc09e40: 38 e0 00 00 li r7,0
ffc09e44: 48 00 23 a5 bl ffc0c1e8 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
ffc09e48: 48 00 3c fd bl ffc0db44 <_Thread_Enable_dispatch>
if ( !do_wait &&
ffc09e4c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09e50: 40 9e 00 2c bne- cr7,ffc09e7c <pthread_rwlock_timedwrlock+0xa8>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
ffc09e54: 3d 20 00 00 lis r9,0
ffc09e58: 81 29 28 20 lwz r9,10272(r9)
ffc09e5c: 80 09 00 34 lwz r0,52(r9)
ffc09e60: 2f 80 00 02 cmpwi cr7,r0,2
ffc09e64: 40 be 00 18 bne+ cr7,ffc09e7c <pthread_rwlock_timedwrlock+0xa8>
switch (status) {
ffc09e68: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09e6c: 41 9e 00 24 beq- cr7,ffc09e90 <pthread_rwlock_timedwrlock+0xbc><== NEVER TAKEN
ffc09e70: 2b 9e 00 02 cmplwi cr7,r30,2
ffc09e74: 38 60 00 74 li r3,116
ffc09e78: 40 9d 00 1c ble- cr7,ffc09e94 <pthread_rwlock_timedwrlock+0xc0><== ALWAYS TAKEN
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
ffc09e7c: 3d 20 00 00 lis r9,0
ffc09e80: 81 29 28 20 lwz r9,10272(r9)
ffc09e84: 80 69 00 34 lwz r3,52(r9)
ffc09e88: 48 00 00 29 bl ffc09eb0 <_POSIX_RWLock_Translate_core_RWLock_return_code>
ffc09e8c: 48 00 00 08 b ffc09e94 <pthread_rwlock_timedwrlock+0xc0>
ffc09e90: 38 60 00 16 li r3,22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
ffc09e94: 80 01 00 2c lwz r0,44(r1)
ffc09e98: 83 a1 00 1c lwz r29,28(r1)
ffc09e9c: 7c 08 03 a6 mtlr r0
ffc09ea0: 83 c1 00 20 lwz r30,32(r1)
ffc09ea4: 83 e1 00 24 lwz r31,36(r1)
ffc09ea8: 38 21 00 28 addi r1,r1,40
ffc09eac: 4e 80 00 20 blr
ffc0a7e4 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
ffc0a7e4: 2c 03 00 00 cmpwi r3,0
ffc0a7e8: 41 82 00 24 beq- ffc0a80c <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
if ( !attr->is_initialized )
ffc0a7ec: 80 03 00 00 lwz r0,0(r3)
ffc0a7f0: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a7f4: 41 9e 00 18 beq- cr7,ffc0a80c <pthread_rwlockattr_setpshared+0x28>
return EINVAL;
switch ( pshared ) {
ffc0a7f8: 2b 84 00 01 cmplwi cr7,r4,1
ffc0a7fc: 41 9d 00 10 bgt- cr7,ffc0a80c <pthread_rwlockattr_setpshared+0x28><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
ffc0a800: 90 83 00 04 stw r4,4(r3)
ffc0a804: 38 60 00 00 li r3,0
return 0;
ffc0a808: 4e 80 00 20 blr
ffc0a80c: 38 60 00 16 li r3,22
default:
return EINVAL;
}
}
ffc0a810: 4e 80 00 20 blr
ffc0bdb4 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0bdb4: 94 21 ff d0 stwu r1,-48(r1)
ffc0bdb8: 7c 08 02 a6 mflr r0
ffc0bdbc: 93 e1 00 2c stw r31,44(r1)
int rc;
/*
* Check all the parameters
*/
if ( !param )
ffc0bdc0: 7c bf 2b 79 mr. r31,r5
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0bdc4: 93 81 00 20 stw r28,32(r1)
int rc;
/*
* Check all the parameters
*/
if ( !param )
ffc0bdc8: 3b 80 00 16 li r28,22
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
ffc0bdcc: 93 a1 00 24 stw r29,36(r1)
ffc0bdd0: 7c 7d 1b 78 mr r29,r3
ffc0bdd4: 93 c1 00 28 stw r30,40(r1)
ffc0bdd8: 7c 9e 23 78 mr r30,r4
ffc0bddc: 90 01 00 34 stw r0,52(r1)
ffc0bde0: 93 61 00 1c stw r27,28(r1)
int rc;
/*
* Check all the parameters
*/
if ( !param )
ffc0bde4: 41 82 01 18 beq- ffc0befc <pthread_setschedparam+0x148>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
ffc0bde8: 7c 83 23 78 mr r3,r4
ffc0bdec: 38 a1 00 08 addi r5,r1,8
ffc0bdf0: 7f e4 fb 78 mr r4,r31
ffc0bdf4: 38 c1 00 0c addi r6,r1,12
ffc0bdf8: 48 00 7a 01 bl ffc137f8 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
ffc0bdfc: 7c 7c 1b 79 mr. r28,r3
ffc0be00: 40 82 00 fc bne- ffc0befc <pthread_setschedparam+0x148>
ffc0be04: 3c 60 00 00 lis r3,0
ffc0be08: 38 63 2e d8 addi r3,r3,11992
ffc0be0c: 7f a4 eb 78 mr r4,r29
ffc0be10: 38 a1 00 10 addi r5,r1,16
ffc0be14: 48 00 25 e5 bl ffc0e3f8 <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
ffc0be18: 80 01 00 10 lwz r0,16(r1)
ffc0be1c: 7c 7b 1b 78 mr r27,r3
ffc0be20: 2f 80 00 00 cmpwi cr7,r0,0
ffc0be24: 41 9e 00 0c beq- cr7,ffc0be30 <pthread_setschedparam+0x7c>
ffc0be28: 3b 80 00 03 li r28,3
ffc0be2c: 48 00 00 d0 b ffc0befc <pthread_setschedparam+0x148>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc0be30: 83 a3 01 48 lwz r29,328(r3)
if ( api->schedpolicy == SCHED_SPORADIC )
ffc0be34: 80 1d 00 80 lwz r0,128(r29)
ffc0be38: 2f 80 00 04 cmpwi cr7,r0,4
ffc0be3c: 40 be 00 0c bne+ cr7,ffc0be48 <pthread_setschedparam+0x94>
(void) _Watchdog_Remove( &api->Sporadic_timer );
ffc0be40: 38 7d 00 a4 addi r3,r29,164
ffc0be44: 48 00 49 bd bl ffc10800 <_Watchdog_Remove>
api->schedpolicy = policy;
ffc0be48: 93 dd 00 80 stw r30,128(r29)
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
ffc0be4c: 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;
ffc0be50: 81 5f 00 04 lwz r10,4(r31)
ffc0be54: 81 7f 00 08 lwz r11,8(r31)
ffc0be58: 81 3f 00 0c lwz r9,12(r31)
ffc0be5c: 80 1f 00 00 lwz r0,0(r31)
ffc0be60: 91 5d 00 88 stw r10,136(r29)
ffc0be64: 91 7d 00 8c stw r11,140(r29)
ffc0be68: 91 3d 00 90 stw r9,144(r29)
ffc0be6c: 90 1d 00 84 stw r0,132(r29)
ffc0be70: 81 3f 00 18 lwz r9,24(r31)
ffc0be74: 81 5f 00 10 lwz r10,16(r31)
ffc0be78: 81 7f 00 14 lwz r11,20(r31)
ffc0be7c: 91 3d 00 9c stw r9,156(r29)
the_thread->budget_algorithm = budget_algorithm;
ffc0be80: 81 21 00 08 lwz r9,8(r1)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
ffc0be84: 91 5d 00 94 stw r10,148(r29)
the_thread->budget_algorithm = budget_algorithm;
ffc0be88: 91 3b 00 7c stw r9,124(r27)
the_thread->budget_callout = budget_callout;
ffc0be8c: 81 21 00 0c lwz r9,12(r1)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
ffc0be90: 91 7d 00 98 stw r11,152(r29)
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
ffc0be94: 91 3b 00 80 stw r9,128(r27)
switch ( api->schedpolicy ) {
ffc0be98: 41 9c 00 60 blt- cr7,ffc0bef8 <pthread_setschedparam+0x144><== NEVER TAKEN
ffc0be9c: 2f 9e 00 02 cmpwi cr7,r30,2
ffc0bea0: 40 9d 00 10 ble- cr7,ffc0beb0 <pthread_setschedparam+0xfc>
ffc0bea4: 2f 9e 00 04 cmpwi cr7,r30,4
ffc0bea8: 40 be 00 50 bne+ cr7,ffc0bef8 <pthread_setschedparam+0x144><== NEVER TAKEN
ffc0beac: 48 00 00 34 b ffc0bee0 <pthread_setschedparam+0x12c>
ffc0beb0: 3d 20 00 00 lis r9,0
ffc0beb4: 88 89 27 2c lbz r4,10028(r9)
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0beb8: 3d 60 00 00 lis r11,0
ffc0bebc: 81 3d 00 84 lwz r9,132(r29)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0bec0: 7f 63 db 78 mr r3,r27
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0bec4: 80 0b 28 2c lwz r0,10284(r11)
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0bec8: 38 a0 00 01 li r5,1
ffc0becc: 7c 89 20 50 subf r4,r9,r4
switch ( api->schedpolicy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc0bed0: 90 1b 00 78 stw r0,120(r27)
the_thread->real_priority =
ffc0bed4: 90 9b 00 18 stw r4,24(r27)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
ffc0bed8: 48 00 29 a9 bl ffc0e880 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
ffc0bedc: 48 00 00 1c b ffc0bef8 <pthread_setschedparam+0x144>
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
ffc0bee0: 90 1d 00 a0 stw r0,160(r29)
_Watchdog_Remove( &api->Sporadic_timer );
ffc0bee4: 38 7d 00 a4 addi r3,r29,164
ffc0bee8: 48 00 49 19 bl ffc10800 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
ffc0beec: 7f 64 db 78 mr r4,r27
ffc0bef0: 38 60 00 00 li r3,0
ffc0bef4: 4b ff fe 1d bl ffc0bd10 <_POSIX_Threads_Sporadic_budget_TSR>
break;
}
_Thread_Enable_dispatch();
ffc0bef8: 48 00 30 11 bl ffc0ef08 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
ffc0befc: 80 01 00 34 lwz r0,52(r1)
ffc0bf00: 7f 83 e3 78 mr r3,r28
ffc0bf04: 83 61 00 1c lwz r27,28(r1)
ffc0bf08: 7c 08 03 a6 mtlr r0
ffc0bf0c: 83 81 00 20 lwz r28,32(r1)
ffc0bf10: 83 a1 00 24 lwz r29,36(r1)
ffc0bf14: 83 c1 00 28 lwz r30,40(r1)
ffc0bf18: 83 e1 00 2c lwz r31,44(r1)
ffc0bf1c: 38 21 00 30 addi r1,r1,48
ffc0bf20: 4e 80 00 20 blr
ffc08de8 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
ffc08de8: 94 21 ff f0 stwu r1,-16(r1)
ffc08dec: 7c 08 02 a6 mflr r0
* 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() )
ffc08df0: 3d 20 00 00 lis r9,0
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
ffc08df4: 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() )
ffc08df8: 80 09 27 e0 lwz r0,10208(r9)
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
ffc08dfc: 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() )
ffc08e00: 2f 80 00 00 cmpwi cr7,r0,0
ffc08e04: 40 9e 00 58 bne- cr7,ffc08e5c <pthread_testcancel+0x74> <== NEVER TAKEN
ffc08e08: 3d 20 00 00 lis r9,0
ffc08e0c: 81 49 27 b8 lwz r10,10168(r9)
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
ffc08e10: 3d 60 00 00 lis r11,0
ffc08e14: 81 6b 27 f8 lwz r11,10232(r11)
ffc08e18: 38 0a 00 01 addi r0,r10,1
ffc08e1c: 90 09 27 b8 stw r0,10168(r9)
ffc08e20: 81 2b 01 48 lwz r9,328(r11)
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
ffc08e24: 80 09 00 d4 lwz r0,212(r9)
ffc08e28: 3b e0 00 00 li r31,0
ffc08e2c: 2f 80 00 00 cmpwi cr7,r0,0
ffc08e30: 40 9e 00 10 bne- cr7,ffc08e40 <pthread_testcancel+0x58> <== NEVER TAKEN
/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate));
int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype));
void _EXFUN(pthread_testcancel, (void));
ffc08e34: 80 09 00 dc lwz r0,220(r9)
ffc08e38: 31 20 ff ff addic r9,r0,-1
ffc08e3c: 7f e9 01 10 subfe r31,r9,r0
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
ffc08e40: 48 00 2f 2d bl ffc0bd6c <_Thread_Enable_dispatch>
if ( cancel )
ffc08e44: 2f 9f 00 00 cmpwi cr7,r31,0
ffc08e48: 41 be 00 14 beq+ cr7,ffc08e5c <pthread_testcancel+0x74>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
ffc08e4c: 3d 20 00 00 lis r9,0
ffc08e50: 80 69 27 f8 lwz r3,10232(r9)
ffc08e54: 38 80 ff ff li r4,-1
ffc08e58: 48 00 79 0d bl ffc10764 <_POSIX_Thread_Exit>
}
ffc08e5c: 80 01 00 14 lwz r0,20(r1)
ffc08e60: 83 e1 00 0c lwz r31,12(r1)
ffc08e64: 38 21 00 10 addi r1,r1,16
ffc08e68: 7c 08 03 a6 mtlr r0
ffc08e6c: 4e 80 00 20 blr
ffc0a4fc <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
)
{
ffc0a4fc: 94 21 ff f0 stwu r1,-16(r1)
ffc0a500: 7c 08 02 a6 mflr r0
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0a504: 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
)
{
ffc0a508: 90 01 00 14 stw r0,20(r1)
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0a50c: 80 09 27 d8 lwz r0,10200(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;
ffc0a510: 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
)
{
ffc0a514: 93 e1 00 0c stw r31,12(r1)
ffc0a518: 7c 7f 1b 78 mr r31,r3
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
ffc0a51c: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a520: 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;
ffc0a524: 80 09 28 28 lwz r0,10280(r9)
if ( rtems_interrupt_is_in_progress() )
ffc0a528: 40 9e 01 40 bne- cr7,ffc0a668 <rtems_io_register_driver+0x16c>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
ffc0a52c: 2f 85 00 00 cmpwi cr7,r5,0
ffc0a530: 41 9e 01 34 beq- cr7,ffc0a664 <rtems_io_register_driver+0x168>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
if ( driver_table == NULL )
ffc0a534: 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;
ffc0a538: 90 05 00 00 stw r0,0(r5)
if ( driver_table == NULL )
ffc0a53c: 41 9e 01 28 beq- cr7,ffc0a664 <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;
ffc0a540: 81 24 00 00 lwz r9,0(r4)
ffc0a544: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a548: 40 be 01 34 bne+ cr7,ffc0a67c <rtems_io_register_driver+0x180>
ffc0a54c: 81 24 00 04 lwz r9,4(r4)
ffc0a550: 2f 89 00 00 cmpwi cr7,r9,0
ffc0a554: 40 be 01 28 bne+ cr7,ffc0a67c <rtems_io_register_driver+0x180>
ffc0a558: 48 00 01 0c b ffc0a664 <rtems_io_register_driver+0x168>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0a55c: 3d 20 00 00 lis r9,0
ffc0a560: 81 69 27 b0 lwz r11,10160(r9)
ffc0a564: 38 0b 00 01 addi r0,r11,1
ffc0a568: 90 09 27 b0 stw r0,10160(r9)
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
ffc0a56c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0a570: 3d 20 00 00 lis r9,0
ffc0a574: 40 9e 00 58 bne- cr7,ffc0a5cc <rtems_io_register_driver+0xd0>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
ffc0a578: 3d 60 00 00 lis r11,0
ffc0a57c: 81 29 28 2c lwz r9,10284(r9)
ffc0a580: 81 6b 28 28 lwz r11,10280(r11)
ffc0a584: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a588: 38 0b 00 01 addi r0,r11,1
ffc0a58c: 40 be 00 28 bne+ cr7,ffc0a5b4 <rtems_io_register_driver+0xb8><== ALWAYS TAKEN
ffc0a590: 38 00 00 01 li r0,1 <== NOT EXECUTED
ffc0a594: 48 00 00 20 b ffc0a5b4 <rtems_io_register_driver+0xb8><== NOT EXECUTED
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0a598: 81 49 00 00 lwz r10,0(r9)
ffc0a59c: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0a5a0: 40 be 00 ec bne+ cr7,ffc0a68c <rtems_io_register_driver+0x190>
ffc0a5a4: 81 49 00 04 lwz r10,4(r9)
ffc0a5a8: 2f 8a 00 00 cmpwi cr7,r10,0
ffc0a5ac: 40 be 00 e0 bne+ cr7,ffc0a68c <rtems_io_register_driver+0x190>
ffc0a5b0: 48 00 00 0c b ffc0a5bc <rtems_io_register_driver+0xc0>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
ffc0a5b4: 34 00 ff ff addic. r0,r0,-1
ffc0a5b8: 40 82 ff e0 bne+ ffc0a598 <rtems_io_register_driver+0x9c>
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
ffc0a5bc: 7f 9f 58 00 cmpw cr7,r31,r11
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
ffc0a5c0: 93 e5 00 00 stw r31,0(r5)
if ( m != n )
ffc0a5c4: 40 be 00 48 bne+ cr7,ffc0a60c <rtems_io_register_driver+0x110>
ffc0a5c8: 48 00 00 d0 b ffc0a698 <rtems_io_register_driver+0x19c>
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0a5cc: 1c 1f 00 18 mulli r0,r31,24
ffc0a5d0: 81 29 28 2c lwz r9,10284(r9)
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
ffc0a5d4: 7d 69 00 2e lwzx r11,r9,r0
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
ffc0a5d8: 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;
ffc0a5dc: 38 00 00 00 li r0,0
ffc0a5e0: 2f 8b 00 00 cmpwi cr7,r11,0
ffc0a5e4: 40 be 00 10 bne+ cr7,ffc0a5f4 <rtems_io_register_driver+0xf8>
ffc0a5e8: 80 09 00 04 lwz r0,4(r9)
ffc0a5ec: 7c 00 00 34 cntlzw r0,r0
ffc0a5f0: 54 00 d9 7e rlwinm r0,r0,27,5,31
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
ffc0a5f4: 2f 80 00 00 cmpwi cr7,r0,0
ffc0a5f8: 40 9e 00 10 bne- cr7,ffc0a608 <rtems_io_register_driver+0x10c>
_Thread_Enable_dispatch();
ffc0a5fc: 48 00 20 0d bl ffc0c608 <_Thread_Enable_dispatch>
ffc0a600: 38 60 00 0c li r3,12
return RTEMS_RESOURCE_IN_USE;
ffc0a604: 48 00 00 64 b ffc0a668 <rtems_io_register_driver+0x16c>
}
*registered_major = major;
ffc0a608: 93 e5 00 00 stw r31,0(r5)
}
_IO_Driver_address_table [major] = *driver_table;
ffc0a60c: 3d 20 00 00 lis r9,0
ffc0a610: 80 c4 00 00 lwz r6,0(r4)
ffc0a614: 81 69 28 2c lwz r11,10284(r9)
ffc0a618: 1c 1f 00 18 mulli r0,r31,24
ffc0a61c: 80 e4 00 04 lwz r7,4(r4)
ffc0a620: 81 04 00 08 lwz r8,8(r4)
ffc0a624: 7d 2b 02 14 add r9,r11,r0
ffc0a628: 81 44 00 0c lwz r10,12(r4)
ffc0a62c: 7c cb 01 2e stwx r6,r11,r0
ffc0a630: 90 e9 00 04 stw r7,4(r9)
ffc0a634: 91 09 00 08 stw r8,8(r9)
ffc0a638: 91 49 00 0c stw r10,12(r9)
ffc0a63c: 81 64 00 14 lwz r11,20(r4)
ffc0a640: 80 04 00 10 lwz r0,16(r4)
ffc0a644: 91 69 00 14 stw r11,20(r9)
ffc0a648: 90 09 00 10 stw r0,16(r9)
_Thread_Enable_dispatch();
ffc0a64c: 48 00 1f bd bl ffc0c608 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
ffc0a650: 7f e3 fb 78 mr r3,r31
ffc0a654: 38 80 00 00 li r4,0
ffc0a658: 38 a0 00 00 li r5,0
ffc0a65c: 48 00 a6 61 bl ffc14cbc <rtems_io_initialize>
ffc0a660: 48 00 00 08 b ffc0a668 <rtems_io_register_driver+0x16c>
ffc0a664: 38 60 00 09 li r3,9
}
ffc0a668: 80 01 00 14 lwz r0,20(r1)
ffc0a66c: 83 e1 00 0c lwz r31,12(r1)
ffc0a670: 38 21 00 10 addi r1,r1,16
ffc0a674: 7c 08 03 a6 mtlr r0
ffc0a678: 4e 80 00 20 blr
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
ffc0a67c: 7f 9f 00 40 cmplw cr7,r31,r0
ffc0a680: 38 60 00 0a li r3,10
ffc0a684: 41 9c fe d8 blt+ cr7,ffc0a55c <rtems_io_register_driver+0x60>
ffc0a688: 4b ff ff e0 b ffc0a668 <rtems_io_register_driver+0x16c>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
ffc0a68c: 3b ff 00 01 addi r31,r31,1
ffc0a690: 39 29 00 18 addi r9,r9,24
ffc0a694: 4b ff ff 20 b ffc0a5b4 <rtems_io_register_driver+0xb8>
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
ffc0a698: 48 00 1f 71 bl ffc0c608 <_Thread_Enable_dispatch>
ffc0a69c: 38 60 00 05 li r3,5
return sc;
ffc0a6a0: 4b ff ff c8 b ffc0a668 <rtems_io_register_driver+0x16c>
ffc0be28 <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)
{
ffc0be28: 94 21 ff e0 stwu r1,-32(r1)
ffc0be2c: 7c 08 02 a6 mflr r0
ffc0be30: 93 61 00 0c stw r27,12(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0be34: 7c 7b 1b 79 mr. r27,r3
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
ffc0be38: 90 01 00 24 stw r0,36(r1)
ffc0be3c: 93 81 00 10 stw r28,16(r1)
ffc0be40: 93 a1 00 14 stw r29,20(r1)
ffc0be44: 93 c1 00 18 stw r30,24(r1)
ffc0be48: 93 e1 00 1c stw r31,28(r1)
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
ffc0be4c: 41 82 00 68 beq- ffc0beb4 <rtems_iterate_over_all_threads+0x8c><== NEVER TAKEN
ffc0be50: 3f e0 00 00 lis r31,0
ffc0be54: 3b ff 30 64 addi r31,r31,12388
#endif
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
ffc0be58: 3b 9f 00 10 addi r28,r31,16
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
ffc0be5c: 81 3f 00 00 lwz r9,0(r31)
ffc0be60: 2f 89 00 00 cmpwi cr7,r9,0
ffc0be64: 41 9e 00 44 beq- cr7,ffc0bea8 <rtems_iterate_over_all_threads+0x80>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
ffc0be68: 83 a9 00 04 lwz r29,4(r9)
if ( !information )
ffc0be6c: 3b c0 00 01 li r30,1
ffc0be70: 2f 9d 00 00 cmpwi cr7,r29,0
ffc0be74: 40 be 00 20 bne+ cr7,ffc0be94 <rtems_iterate_over_all_threads+0x6c>
ffc0be78: 48 00 00 30 b ffc0bea8 <rtems_iterate_over_all_threads+0x80>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0be7c: 81 7d 00 1c lwz r11,28(r29)
ffc0be80: 7c 6b 48 2e lwzx r3,r11,r9
if ( !the_thread )
ffc0be84: 2f 83 00 00 cmpwi cr7,r3,0
ffc0be88: 41 9e 00 0c beq- cr7,ffc0be94 <rtems_iterate_over_all_threads+0x6c><== NEVER TAKEN
continue;
(*routine)(the_thread);
ffc0be8c: 7f 69 03 a6 mtctr r27
ffc0be90: 4e 80 04 21 bctrl
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0be94: a0 1d 00 10 lhz r0,16(r29)
the_thread = (Thread_Control *)information->local_table[ i ];
ffc0be98: 57 c9 10 3a rlwinm r9,r30,2,0,29
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
ffc0be9c: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0bea0: 3b de 00 01 addi r30,r30,1
ffc0bea4: 40 9d ff d8 ble+ cr7,ffc0be7c <rtems_iterate_over_all_threads+0x54>
ffc0bea8: 3b ff 00 04 addi r31,r31,4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
ffc0beac: 7f 9f e0 00 cmpw cr7,r31,r28
ffc0beb0: 40 9e ff ac bne+ cr7,ffc0be5c <rtems_iterate_over_all_threads+0x34>
(*routine)(the_thread);
}
}
}
ffc0beb4: 80 01 00 24 lwz r0,36(r1)
ffc0beb8: 83 61 00 0c lwz r27,12(r1)
ffc0bebc: 7c 08 03 a6 mtlr r0
ffc0bec0: 83 81 00 10 lwz r28,16(r1)
ffc0bec4: 83 a1 00 14 lwz r29,20(r1)
ffc0bec8: 83 c1 00 18 lwz r30,24(r1)
ffc0becc: 83 e1 00 1c lwz r31,28(r1)
ffc0bed0: 38 21 00 20 addi r1,r1,32
ffc0bed4: 4e 80 00 20 blr
ffc17520 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc17520: 94 21 ff d0 stwu r1,-48(r1)
ffc17524: 7c 08 02 a6 mflr r0
ffc17528: 93 e1 00 2c stw r31,44(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc1752c: 7c 7f 1b 79 mr. r31,r3
ffc17530: 38 60 00 03 li r3,3
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
ffc17534: 93 41 00 18 stw r26,24(r1)
ffc17538: 7c fa 3b 78 mr r26,r7
ffc1753c: 93 81 00 20 stw r28,32(r1)
ffc17540: 7d 1c 43 78 mr r28,r8
ffc17544: 93 c1 00 28 stw r30,40(r1)
ffc17548: 7c be 2b 78 mr r30,r5
ffc1754c: 90 01 00 34 stw r0,52(r1)
ffc17550: 93 21 00 14 stw r25,20(r1)
ffc17554: 93 61 00 1c stw r27,28(r1)
ffc17558: 93 a1 00 24 stw r29,36(r1)
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
ffc1755c: 41 82 00 d0 beq- ffc1762c <rtems_partition_create+0x10c>
return RTEMS_INVALID_NAME;
if ( !starting_address )
ffc17560: 2f 84 00 00 cmpwi cr7,r4,0
ffc17564: 41 9e 00 bc beq- cr7,ffc17620 <rtems_partition_create+0x100>
return RTEMS_INVALID_ADDRESS;
if ( !id )
ffc17568: 2f 88 00 00 cmpwi cr7,r8,0
ffc1756c: 41 9e 00 b4 beq- cr7,ffc17620 <rtems_partition_create+0x100><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
ffc17570: 2f 85 00 00 cmpwi cr7,r5,0
ffc17574: 41 9e 00 b4 beq- cr7,ffc17628 <rtems_partition_create+0x108>
ffc17578: 2f 86 00 00 cmpwi cr7,r6,0
ffc1757c: 41 9e 00 ac beq- cr7,ffc17628 <rtems_partition_create+0x108>
ffc17580: 7f 85 30 40 cmplw cr7,r5,r6
ffc17584: 41 9c 00 a4 blt- cr7,ffc17628 <rtems_partition_create+0x108>
ffc17588: 70 c0 00 07 andi. r0,r6,7
ffc1758c: 40 82 00 9c bne- ffc17628 <rtems_partition_create+0x108>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
ffc17590: 70 99 00 07 andi. r25,r4,7
ffc17594: 40 a2 00 8c bne+ ffc17620 <rtems_partition_create+0x100>
ffc17598: 3d 20 00 00 lis r9,0
ffc1759c: 81 69 28 8c lwz r11,10380(r9)
ffc175a0: 38 0b 00 01 addi r0,r11,1
ffc175a4: 90 09 28 8c stw r0,10380(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 );
ffc175a8: 3f 60 00 00 lis r27,0
ffc175ac: 90 81 00 08 stw r4,8(r1)
ffc175b0: 3b 7b 6f 00 addi r27,r27,28416
ffc175b4: 7f 63 db 78 mr r3,r27
ffc175b8: 90 c1 00 0c stw r6,12(r1)
ffc175bc: 48 00 55 f1 bl ffc1cbac <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
ffc175c0: 7c 7d 1b 79 mr. r29,r3
ffc175c4: 80 81 00 08 lwz r4,8(r1)
ffc175c8: 80 c1 00 0c lwz r6,12(r1)
ffc175cc: 40 a2 00 10 bne+ ffc175dc <rtems_partition_create+0xbc>
_Thread_Enable_dispatch();
ffc175d0: 48 00 67 99 bl ffc1dd68 <_Thread_Enable_dispatch>
ffc175d4: 38 60 00 05 li r3,5
return RTEMS_TOO_MANY;
ffc175d8: 48 00 00 54 b ffc1762c <rtems_partition_create+0x10c>
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,
ffc175dc: 7c be 33 96 divwu r5,r30,r6
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
ffc175e0: 90 9d 00 10 stw r4,16(r29)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
ffc175e4: 90 dd 00 18 stw r6,24(r29)
the_partition->attribute_set = attribute_set;
ffc175e8: 93 5d 00 1c stw r26,28(r29)
the_partition->number_of_used_blocks = 0;
ffc175ec: 93 3d 00 20 stw r25,32(r29)
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
ffc175f0: 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;
_Chain_Initialize( &the_partition->Memory, starting_address,
ffc175f4: 38 7d 00 24 addi r3,r29,36
ffc175f8: 48 00 3d 19 bl ffc1b310 <_Chain_Initialize>
ffc175fc: 80 1d 00 08 lwz r0,8(r29)
ffc17600: 81 7b 00 1c lwz r11,28(r27)
ffc17604: 54 09 13 ba rlwinm r9,r0,2,14,29
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
ffc17608: 93 fd 00 0c stw r31,12(r29)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc1760c: 7f ab 49 2e stwx r29,r11,r9
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
ffc17610: 90 1c 00 00 stw r0,0(r28)
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
ffc17614: 48 00 67 55 bl ffc1dd68 <_Thread_Enable_dispatch>
ffc17618: 38 60 00 00 li r3,0
return RTEMS_SUCCESSFUL;
ffc1761c: 48 00 00 10 b ffc1762c <rtems_partition_create+0x10c>
ffc17620: 38 60 00 09 li r3,9
ffc17624: 48 00 00 08 b ffc1762c <rtems_partition_create+0x10c>
ffc17628: 38 60 00 08 li r3,8
}
ffc1762c: 80 01 00 34 lwz r0,52(r1)
ffc17630: 83 21 00 14 lwz r25,20(r1)
ffc17634: 7c 08 03 a6 mtlr r0
ffc17638: 83 41 00 18 lwz r26,24(r1)
ffc1763c: 83 61 00 1c lwz r27,28(r1)
ffc17640: 83 81 00 20 lwz r28,32(r1)
ffc17644: 83 a1 00 24 lwz r29,36(r1)
ffc17648: 83 c1 00 28 lwz r30,40(r1)
ffc1764c: 83 e1 00 2c lwz r31,44(r1)
ffc17650: 38 21 00 30 addi r1,r1,48
ffc17654: 4e 80 00 20 blr
ffc177d0 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
ffc177d0: 94 21 ff e0 stwu r1,-32(r1)
ffc177d4: 7c 08 02 a6 mflr r0
ffc177d8: 90 01 00 24 stw r0,36(r1)
ffc177dc: 7c 60 1b 78 mr r0,r3
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
ffc177e0: 3c 60 00 00 lis r3,0
ffc177e4: 93 e1 00 1c stw r31,28(r1)
ffc177e8: 38 63 6f 00 addi r3,r3,28416
ffc177ec: 7c 9f 23 78 mr r31,r4
ffc177f0: 38 a1 00 08 addi r5,r1,8
ffc177f4: 93 c1 00 18 stw r30,24(r1)
ffc177f8: 7c 04 03 78 mr r4,r0
ffc177fc: 48 00 59 a5 bl ffc1d1a0 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
ffc17800: 80 01 00 08 lwz r0,8(r1)
ffc17804: 7c 7e 1b 78 mr r30,r3
ffc17808: 2f 80 00 00 cmpwi cr7,r0,0
ffc1780c: 38 60 00 04 li r3,4
ffc17810: 40 9e 00 58 bne- cr7,ffc17868 <rtems_partition_return_buffer+0x98>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
ffc17814: 80 1e 00 10 lwz r0,16(r30)
ending = _Addresses_Add_offset( starting, the_partition->length );
ffc17818: 81 3e 00 14 lwz r9,20(r30)
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
ffc1781c: 7f 9f 00 40 cmplw cr7,r31,r0
ffc17820: 41 9c 00 60 blt- cr7,ffc17880 <rtems_partition_return_buffer+0xb0>
ffc17824: 7d 20 4a 14 add r9,r0,r9
ffc17828: 7f 9f 48 40 cmplw cr7,r31,r9
ffc1782c: 41 9d 00 54 bgt- cr7,ffc17880 <rtems_partition_return_buffer+0xb0><== NEVER TAKEN
return (
ffc17830: 81 3e 00 18 lwz r9,24(r30)
ffc17834: 7c 00 f8 50 subf r0,r0,r31
ffc17838: 7d 60 4b 96 divwu r11,r0,r9
ffc1783c: 7d 2b 49 d6 mullw r9,r11,r9
ffc17840: 7f 80 48 00 cmpw cr7,r0,r9
ffc17844: 40 9e 00 3c bne- cr7,ffc17880 <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 );
ffc17848: 38 7e 00 24 addi r3,r30,36
ffc1784c: 7f e4 fb 78 mr r4,r31
ffc17850: 48 00 3a 29 bl ffc1b278 <_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;
ffc17854: 81 3e 00 20 lwz r9,32(r30)
ffc17858: 38 09 ff ff addi r0,r9,-1
ffc1785c: 90 1e 00 20 stw r0,32(r30)
_Thread_Enable_dispatch();
ffc17860: 48 00 65 09 bl ffc1dd68 <_Thread_Enable_dispatch>
ffc17864: 38 60 00 00 li r3,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc17868: 80 01 00 24 lwz r0,36(r1)
ffc1786c: 83 c1 00 18 lwz r30,24(r1)
ffc17870: 7c 08 03 a6 mtlr r0
ffc17874: 83 e1 00 1c lwz r31,28(r1)
ffc17878: 38 21 00 20 addi r1,r1,32
ffc1787c: 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();
ffc17880: 48 00 64 e9 bl ffc1dd68 <_Thread_Enable_dispatch>
ffc17884: 38 60 00 09 li r3,9
return RTEMS_INVALID_ADDRESS;
ffc17888: 4b ff ff e0 b ffc17868 <rtems_partition_return_buffer+0x98>
ffc09bec <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
ffc09bec: 94 21 ff d8 stwu r1,-40(r1)
ffc09bf0: 7c 08 02 a6 mflr r0
ffc09bf4: 93 c1 00 20 stw r30,32(r1)
ffc09bf8: 7c 7e 1b 78 mr r30,r3
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
ffc09bfc: 3c 60 00 00 lis r3,0
ffc09c00: 93 e1 00 24 stw r31,36(r1)
ffc09c04: 38 63 2c 58 addi r3,r3,11352
ffc09c08: 7c 9f 23 78 mr r31,r4
ffc09c0c: 38 a1 00 08 addi r5,r1,8
ffc09c10: 90 01 00 2c stw r0,44(r1)
ffc09c14: 7f c4 f3 78 mr r4,r30
ffc09c18: 93 a1 00 1c stw r29,28(r1)
ffc09c1c: 93 81 00 18 stw r28,24(r1)
ffc09c20: 48 00 29 e5 bl ffc0c604 <_Objects_Get>
ffc09c24: 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 ) {
ffc09c28: 80 01 00 08 lwz r0,8(r1)
ffc09c2c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09c30: 40 9e 01 70 bne- cr7,ffc09da0 <rtems_rate_monotonic_period+0x1b4>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
ffc09c34: 3d 20 00 00 lis r9,0
ffc09c38: 80 09 28 38 lwz r0,10296(r9)
ffc09c3c: 81 23 00 40 lwz r9,64(r3)
ffc09c40: 7f 89 00 00 cmpw cr7,r9,r0
ffc09c44: 41 9e 00 10 beq- cr7,ffc09c54 <rtems_rate_monotonic_period+0x68>
_Thread_Enable_dispatch();
ffc09c48: 48 00 34 cd bl ffc0d114 <_Thread_Enable_dispatch>
ffc09c4c: 3b c0 00 17 li r30,23
return RTEMS_NOT_OWNER_OF_RESOURCE;
ffc09c50: 48 00 01 54 b ffc09da4 <rtems_rate_monotonic_period+0x1b8>
}
if ( length == RTEMS_PERIOD_STATUS ) {
ffc09c54: 2f 9f 00 00 cmpwi cr7,r31,0
ffc09c58: 40 be 00 28 bne+ cr7,ffc09c80 <rtems_rate_monotonic_period+0x94>
switch ( the_period->state ) {
ffc09c5c: 80 03 00 38 lwz r0,56(r3)
ffc09c60: 3b c0 00 00 li r30,0
ffc09c64: 2b 80 00 04 cmplwi cr7,r0,4
ffc09c68: 41 9d 01 30 bgt- cr7,ffc09d98 <rtems_rate_monotonic_period+0x1ac><== NEVER TAKEN
ffc09c6c: 3d 20 ff c2 lis r9,-62
ffc09c70: 54 00 10 3a rlwinm r0,r0,2,0,29
ffc09c74: 39 29 5d cc addi r9,r9,24012
ffc09c78: 7f c9 00 2e lwzx r30,r9,r0
ffc09c7c: 48 00 01 1c b ffc09d98 <rtems_rate_monotonic_period+0x1ac>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc09c80: 7f 80 00 a6 mfmsr r28
ffc09c84: 7c 10 42 a6 mfsprg r0,0
ffc09c88: 7f 80 00 78 andc r0,r28,r0
ffc09c8c: 7c 00 01 24 mtmsr r0
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
switch ( the_period->state ) {
ffc09c90: 80 03 00 38 lwz r0,56(r3)
ffc09c94: 2f 80 00 02 cmpwi cr7,r0,2
ffc09c98: 41 9e 00 60 beq- cr7,ffc09cf8 <rtems_rate_monotonic_period+0x10c>
ffc09c9c: 2f 80 00 04 cmpwi cr7,r0,4
ffc09ca0: 41 9e 00 cc beq- cr7,ffc09d6c <rtems_rate_monotonic_period+0x180>
ffc09ca4: 2f 80 00 00 cmpwi cr7,r0,0
ffc09ca8: 40 9e 00 f8 bne- cr7,ffc09da0 <rtems_rate_monotonic_period+0x1b4><== NEVER TAKEN
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09cac: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
ffc09cb0: 4b ff fc 99 bl ffc09948 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc09cb4: 39 20 00 02 li r9,2
ffc09cb8: 91 3d 00 38 stw r9,56(r29)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc09cbc: 3d 20 ff c1 lis r9,-63
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc09cc0: 38 00 00 00 li r0,0
the_watchdog->routine = routine;
ffc09cc4: 39 29 a1 58 addi r9,r9,-24232
the_watchdog->id = id;
ffc09cc8: 93 dd 00 30 stw r30,48(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc09ccc: 3c 60 00 00 lis r3,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc09cd0: 91 3d 00 2c stw r9,44(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc09cd4: 38 63 2e 48 addi r3,r3,11848
ffc09cd8: 38 9d 00 10 addi r4,r29,16
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc09cdc: 90 1d 00 34 stw r0,52(r29)
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc09ce0: 3b c0 00 00 li r30,0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc09ce4: 93 fd 00 1c stw r31,28(r29)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc09ce8: 90 1d 00 18 stw r0,24(r29)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
ffc09cec: 93 fd 00 3c stw r31,60(r29)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc09cf0: 48 00 4b 0d bl ffc0e7fc <_Watchdog_Insert>
ffc09cf4: 48 00 00 a4 b ffc09d98 <rtems_rate_monotonic_period+0x1ac>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
ffc09cf8: 4b ff fd d9 bl ffc09ad0 <_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;
ffc09cfc: 38 00 00 01 li r0,1
the_period->next_length = length;
ffc09d00: 93 fd 00 3c stw r31,60(r29)
/*
* 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;
ffc09d04: 90 1d 00 38 stw r0,56(r29)
ffc09d08: 7f 80 01 24 mtmsr r28
the_period->next_length = length;
_ISR_Enable( level );
_Thread_Executing->Wait.id = the_period->Object.id;
ffc09d0c: 3d 20 00 00 lis r9,0
ffc09d10: 80 1d 00 08 lwz r0,8(r29)
ffc09d14: 81 29 28 38 lwz r9,10296(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc09d18: 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;
ffc09d1c: 90 09 00 20 stw r0,32(r9)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc09d20: 7d 23 4b 78 mr r3,r9
ffc09d24: 48 00 3e d5 bl ffc0dbf8 <_Thread_Set_state>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc09d28: 7d 20 00 a6 mfmsr r9
ffc09d2c: 7c 10 42 a6 mfsprg r0,0
ffc09d30: 7d 20 00 78 andc r0,r9,r0
ffc09d34: 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;
ffc09d38: 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;
ffc09d3c: 80 1d 00 38 lwz r0,56(r29)
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc09d40: 91 7d 00 38 stw r11,56(r29)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09d44: 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 )
ffc09d48: 2f 80 00 03 cmpwi cr7,r0,3
ffc09d4c: 40 be 00 14 bne+ cr7,ffc09d60 <rtems_rate_monotonic_period+0x174><== ALWAYS TAKEN
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
ffc09d50: 3d 20 00 00 lis r9,0 <== NOT EXECUTED
ffc09d54: 80 69 28 38 lwz r3,10296(r9) <== NOT EXECUTED
ffc09d58: 38 80 40 00 li r4,16384 <== NOT EXECUTED
ffc09d5c: 48 00 2e d5 bl ffc0cc30 <_Thread_Clear_state> <== NOT EXECUTED
_Thread_Enable_dispatch();
ffc09d60: 48 00 33 b5 bl ffc0d114 <_Thread_Enable_dispatch>
ffc09d64: 3b c0 00 00 li r30,0
return RTEMS_SUCCESSFUL;
ffc09d68: 48 00 00 3c b ffc09da4 <rtems_rate_monotonic_period+0x1b8>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
ffc09d6c: 4b ff fd 65 bl ffc09ad0 <_Rate_monotonic_Update_statistics>
ffc09d70: 7f 80 01 24 mtmsr r28
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
ffc09d74: 38 00 00 02 li r0,2
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc09d78: 93 fd 00 1c stw r31,28(r29)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc09d7c: 3c 60 00 00 lis r3,0
ffc09d80: 90 1d 00 38 stw r0,56(r29)
ffc09d84: 38 63 2e 48 addi r3,r3,11848
ffc09d88: 38 9d 00 10 addi r4,r29,16
the_period->next_length = length;
ffc09d8c: 93 fd 00 3c stw r31,60(r29)
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
ffc09d90: 3b c0 00 06 li r30,6
ffc09d94: 48 00 4a 69 bl ffc0e7fc <_Watchdog_Insert>
ffc09d98: 48 00 33 7d bl ffc0d114 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
ffc09d9c: 48 00 00 08 b ffc09da4 <rtems_rate_monotonic_period+0x1b8>
ffc09da0: 3b c0 00 04 li r30,4
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc09da4: 80 01 00 2c lwz r0,44(r1)
ffc09da8: 7f c3 f3 78 mr r3,r30
ffc09dac: 83 81 00 18 lwz r28,24(r1)
ffc09db0: 7c 08 03 a6 mtlr r0
ffc09db4: 83 a1 00 1c lwz r29,28(r1)
ffc09db8: 83 c1 00 20 lwz r30,32(r1)
ffc09dbc: 83 e1 00 24 lwz r31,36(r1)
ffc09dc0: 38 21 00 28 addi r1,r1,40
ffc09dc4: 4e 80 00 20 blr
ffc09dc8 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc09dc8: 94 21 ff 58 stwu r1,-168(r1)
ffc09dcc: 7c 08 02 a6 mflr r0
ffc09dd0: 90 01 00 ac stw r0,172(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc09dd4: 7c 80 23 79 mr. r0,r4
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
ffc09dd8: 93 e1 00 a4 stw r31,164(r1)
ffc09ddc: 7c 7f 1b 78 mr r31,r3
ffc09de0: 92 41 00 70 stw r18,112(r1)
ffc09de4: 92 61 00 74 stw r19,116(r1)
ffc09de8: 92 81 00 78 stw r20,120(r1)
ffc09dec: 92 a1 00 7c stw r21,124(r1)
ffc09df0: 92 c1 00 80 stw r22,128(r1)
ffc09df4: 92 e1 00 84 stw r23,132(r1)
ffc09df8: 93 01 00 88 stw r24,136(r1)
ffc09dfc: 93 21 00 8c stw r25,140(r1)
ffc09e00: 93 41 00 90 stw r26,144(r1)
ffc09e04: 93 61 00 94 stw r27,148(r1)
ffc09e08: 93 81 00 98 stw r28,152(r1)
ffc09e0c: 93 a1 00 9c stw r29,156(r1)
ffc09e10: 93 c1 00 a0 stw r30,160(r1)
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
ffc09e14: 90 01 00 68 stw r0,104(r1)
ffc09e18: 41 82 02 00 beq- ffc0a018 <rtems_rate_monotonic_report_statistics_with_plugin+0x250><== NEVER TAKEN
return;
(*print)( context, "Period information by period\n" );
ffc09e1c: 3c 80 ff c2 lis r4,-62
ffc09e20: 7c 09 03 a6 mtctr r0
ffc09e24: 38 84 5d e0 addi r4,r4,24032
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc09e28: 3f 00 ff c2 lis r24,-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,
ffc09e2c: 3f 20 ff c2 lis r25,-62
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,
ffc09e30: 3f 40 ff c2 lis r26,-62
char name[5];
if ( !print )
return;
(*print)( context, "Period information by period\n" );
ffc09e34: 4c c6 31 82 crclr 4*cr1+eq
ffc09e38: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc09e3c: 80 01 00 68 lwz r0,104(r1)
ffc09e40: 3c 80 ff c2 lis r4,-62
ffc09e44: 7c 09 03 a6 mtctr r0
ffc09e48: 38 84 5d fe addi r4,r4,24062
ffc09e4c: 7f e3 fb 78 mr r3,r31
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc09e50: 3e 40 ff c2 lis r18,-62
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc09e54: 3a 61 00 30 addi r19,r1,48
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
ffc09e58: 3a 81 00 18 addi r20,r1,24
if ( !print )
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
ffc09e5c: 4c c6 31 82 crclr 4*cr1+eq
ffc09e60: 4e 80 04 21 bctrl
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc09e64: 80 01 00 68 lwz r0,104(r1)
ffc09e68: 3c 80 ff c2 lis r4,-62
ffc09e6c: 7c 09 03 a6 mtctr r0
ffc09e70: 38 84 5e 20 addi r4,r4,24096
ffc09e74: 7f e3 fb 78 mr r3,r31
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc09e78: 3b 61 00 08 addi r27,r1,8
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 );
ffc09e7c: 3a a1 00 48 addi r21,r1,72
ffc09e80: 3b 81 00 10 addi r28,r1,16
return;
(*print)( context, "Period information by period\n" );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
(*print)( context, "--- Wall times are in seconds ---\n" );
ffc09e84: 4c c6 31 82 crclr 4*cr1+eq
ffc09e88: 4e 80 04 21 bctrl
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc09e8c: 80 01 00 68 lwz r0,104(r1)
ffc09e90: 3c 80 ff c2 lis r4,-62
ffc09e94: 7c 09 03 a6 mtctr r0
ffc09e98: 38 84 5e 43 addi r4,r4,24131
ffc09e9c: 7f e3 fb 78 mr r3,r31
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,
ffc09ea0: 3b a0 03 e8 li r29,1000
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);
ffc09ea4: 3a c1 00 60 addi r22,r1,96
rtems_object_get_name( the_status.owner, sizeof(name), name );
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc09ea8: 3b 18 5e da addi r24,r24,24282
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
ffc09eac: 4c c6 31 82 crclr 4*cr1+eq
ffc09eb0: 4e 80 04 21 bctrl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc09eb4: 80 01 00 68 lwz r0,104(r1)
ffc09eb8: 3c 80 ff c2 lis r4,-62
ffc09ebc: 38 84 5e 8e addi r4,r4,24206
ffc09ec0: 7c 09 03 a6 mtctr r0
ffc09ec4: 7f e3 fb 78 mr r3,r31
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,
ffc09ec8: 3b 39 5e f1 addi r25,r25,24305
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,
ffc09ecc: 3b 5a 5f 10 addi r26,r26,24336
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc09ed0: 3a 52 5d 7e addi r18,r18,23934
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
ffc09ed4: 4c c6 31 82 crclr 4*cr1+eq
ffc09ed8: 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 ;
ffc09edc: 3d 20 00 00 lis r9,0
ffc09ee0: 39 29 2c 58 addi r9,r9,11352
ffc09ee4: 7d 37 4b 78 mr r23,r9
ffc09ee8: 83 c9 00 08 lwz r30,8(r9)
ffc09eec: 48 00 01 18 b ffc0a004 <rtems_rate_monotonic_report_statistics_with_plugin+0x23c>
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc09ef0: 48 00 82 69 bl ffc12158 <rtems_rate_monotonic_get_statistics>
if ( status != RTEMS_SUCCESSFUL )
ffc09ef4: 2f 83 00 00 cmpwi cr7,r3,0
ffc09ef8: 40 be 01 08 bne+ cr7,ffc0a000 <rtems_rate_monotonic_report_statistics_with_plugin+0x238>
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
ffc09efc: 7e 84 a3 78 mr r4,r20
ffc09f00: 7f c3 f3 78 mr r3,r30
ffc09f04: 48 00 83 25 bl ffc12228 <rtems_rate_monotonic_get_status>
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
ffc09f08: 80 61 00 18 lwz r3,24(r1)
ffc09f0c: 7f 65 db 78 mr r5,r27
ffc09f10: 38 80 00 05 li r4,5
ffc09f14: 48 00 03 0d bl ffc0a220 <rtems_object_get_name>
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
ffc09f18: 80 01 00 68 lwz r0,104(r1)
ffc09f1c: 7f 04 c3 78 mr r4,r24
ffc09f20: 80 e1 00 30 lwz r7,48(r1)
ffc09f24: 7f c5 f3 78 mr r5,r30
ffc09f28: 7c 09 03 a6 mtctr r0
ffc09f2c: 7f e3 fb 78 mr r3,r31
ffc09f30: 81 01 00 34 lwz r8,52(r1)
ffc09f34: 7f 66 db 78 mr r6,r27
ffc09f38: 4c c6 31 82 crclr 4*cr1+eq
ffc09f3c: 4e 80 04 21 bctrl
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc09f40: 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 );
ffc09f44: 7e a3 ab 78 mr r3,r21
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc09f48: 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 );
ffc09f4c: 7f 85 e3 78 mr r5,r28
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
ffc09f50: 7e 44 93 78 mr r4,r18
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
ffc09f54: 40 9e 00 1c bne- cr7,ffc09f70 <rtems_rate_monotonic_report_statistics_with_plugin+0x1a8>
(*print)( context, "\n" );
ffc09f58: 80 01 00 68 lwz r0,104(r1)
ffc09f5c: 7f e3 fb 78 mr r3,r31
ffc09f60: 7c 09 03 a6 mtctr r0
ffc09f64: 4c c6 31 82 crclr 4*cr1+eq
ffc09f68: 4e 80 04 21 bctrl
continue;
ffc09f6c: 48 00 00 94 b ffc0a000 <rtems_rate_monotonic_report_statistics_with_plugin+0x238>
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 );
ffc09f70: 7c 04 03 78 mr r4,r0
ffc09f74: 48 00 42 a1 bl ffc0e214 <_Timespec_Divide_by_integer>
(*print)( context,
ffc09f78: 80 01 00 68 lwz r0,104(r1)
ffc09f7c: 80 c1 00 3c lwz r6,60(r1)
ffc09f80: 7f 24 cb 78 mr r4,r25
ffc09f84: 81 01 00 44 lwz r8,68(r1)
ffc09f88: 7c 09 03 a6 mtctr r0
ffc09f8c: 81 41 00 14 lwz r10,20(r1)
ffc09f90: 7c c6 eb d6 divw r6,r6,r29
ffc09f94: 80 e1 00 40 lwz r7,64(r1)
ffc09f98: 81 21 00 10 lwz r9,16(r1)
ffc09f9c: 80 a1 00 38 lwz r5,56(r1)
ffc09fa0: 7d 08 eb d6 divw r8,r8,r29
ffc09fa4: 7d 4a eb d6 divw r10,r10,r29
ffc09fa8: 7f e3 fb 78 mr r3,r31
ffc09fac: 4c c6 31 82 crclr 4*cr1+eq
ffc09fb0: 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);
ffc09fb4: 80 81 00 30 lwz r4,48(r1)
ffc09fb8: 7e c3 b3 78 mr r3,r22
ffc09fbc: 7f 85 e3 78 mr r5,r28
ffc09fc0: 48 00 42 55 bl ffc0e214 <_Timespec_Divide_by_integer>
(*print)( context,
ffc09fc4: 80 c1 00 54 lwz r6,84(r1)
ffc09fc8: 81 01 00 5c lwz r8,92(r1)
ffc09fcc: 7f e3 fb 78 mr r3,r31
ffc09fd0: 81 41 00 14 lwz r10,20(r1)
ffc09fd4: 7c c6 eb d6 divw r6,r6,r29
ffc09fd8: 80 01 00 68 lwz r0,104(r1)
ffc09fdc: 80 a1 00 50 lwz r5,80(r1)
ffc09fe0: 80 e1 00 58 lwz r7,88(r1)
ffc09fe4: 7c 09 03 a6 mtctr r0
ffc09fe8: 81 21 00 10 lwz r9,16(r1)
ffc09fec: 7d 08 eb d6 divw r8,r8,r29
ffc09ff0: 7d 4a eb d6 divw r10,r10,r29
ffc09ff4: 7f 44 d3 78 mr r4,r26
ffc09ff8: 4c c6 31 82 crclr 4*cr1+eq
ffc09ffc: 4e 80 04 21 bctrl
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
ffc0a000: 3b de 00 01 addi r30,r30,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 ;
ffc0a004: 80 17 00 0c lwz r0,12(r23)
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
ffc0a008: 7f c3 f3 78 mr r3,r30
ffc0a00c: 7e 64 9b 78 mr r4,r19
/*
* 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 ;
ffc0a010: 7f 9e 00 40 cmplw cr7,r30,r0
ffc0a014: 40 9d fe dc ble+ cr7,ffc09ef0 <rtems_rate_monotonic_report_statistics_with_plugin+0x128>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
ffc0a018: 80 01 00 ac lwz r0,172(r1)
ffc0a01c: 82 41 00 70 lwz r18,112(r1)
ffc0a020: 7c 08 03 a6 mtlr r0
ffc0a024: 82 61 00 74 lwz r19,116(r1)
ffc0a028: 82 81 00 78 lwz r20,120(r1)
ffc0a02c: 82 a1 00 7c lwz r21,124(r1)
ffc0a030: 82 c1 00 80 lwz r22,128(r1)
ffc0a034: 82 e1 00 84 lwz r23,132(r1)
ffc0a038: 83 01 00 88 lwz r24,136(r1)
ffc0a03c: 83 21 00 8c lwz r25,140(r1)
ffc0a040: 83 41 00 90 lwz r26,144(r1)
ffc0a044: 83 61 00 94 lwz r27,148(r1)
ffc0a048: 83 81 00 98 lwz r28,152(r1)
ffc0a04c: 83 a1 00 9c lwz r29,156(r1)
ffc0a050: 83 c1 00 a0 lwz r30,160(r1)
ffc0a054: 83 e1 00 a4 lwz r31,164(r1)
ffc0a058: 38 21 00 a8 addi r1,r1,168
ffc0a05c: 4e 80 00 20 blr
ffc19010 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc19010: 94 21 ff e0 stwu r1,-32(r1)
ffc19014: 7c 08 02 a6 mflr r0
ffc19018: 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 )
ffc1901c: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
ffc19020: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
ffc19024: 38 00 00 0a li r0,10
ffc19028: 41 82 00 c0 beq- ffc190e8 <rtems_signal_send+0xd8>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
ffc1902c: 38 81 00 08 addi r4,r1,8
ffc19030: 48 00 4d a5 bl ffc1ddd4 <_Thread_Get>
switch ( location ) {
ffc19034: 81 21 00 08 lwz r9,8(r1)
ffc19038: 38 00 00 04 li r0,4
ffc1903c: 2f 89 00 00 cmpwi cr7,r9,0
ffc19040: 40 9e 00 a8 bne- cr7,ffc190e8 <rtems_signal_send+0xd8>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
ffc19044: 81 23 01 44 lwz r9,324(r3)
asr = &api->Signal;
ffc19048: 80 09 00 0c lwz r0,12(r9)
ffc1904c: 2f 80 00 00 cmpwi cr7,r0,0
ffc19050: 41 9e 00 90 beq- cr7,ffc190e0 <rtems_signal_send+0xd0>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
ffc19054: 88 09 00 08 lbz r0,8(r9)
ffc19058: 2f 80 00 00 cmpwi cr7,r0,0
ffc1905c: 41 9e 00 58 beq- cr7,ffc190b4 <rtems_signal_send+0xa4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc19060: 7c 00 00 a6 mfmsr r0
ffc19064: 7d 70 42 a6 mfsprg r11,0
ffc19068: 7c 0b 58 78 andc r11,r0,r11
ffc1906c: 7d 60 01 24 mtmsr r11
)
{
ISR_Level _level;
_ISR_Disable( _level );
*signal_set |= signals;
ffc19070: 81 69 00 14 lwz r11,20(r9)
ffc19074: 7d 7f fb 78 or r31,r11,r31
ffc19078: 93 e9 00 14 stw r31,20(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc1907c: 7c 00 01 24 mtmsr r0
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc19080: 3d 20 00 00 lis r9,0
ffc19084: 81 29 28 b4 lwz r9,10420(r9)
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
ffc19088: 38 00 00 01 li r0,1
ffc1908c: 98 03 00 74 stb r0,116(r3)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
ffc19090: 2f 89 00 00 cmpwi cr7,r9,0
ffc19094: 41 9e 00 40 beq- cr7,ffc190d4 <rtems_signal_send+0xc4>
ffc19098: 3d 20 00 00 lis r9,0
ffc1909c: 81 29 28 cc lwz r9,10444(r9)
ffc190a0: 7f 83 48 00 cmpw cr7,r3,r9
ffc190a4: 40 be 00 30 bne+ cr7,ffc190d4 <rtems_signal_send+0xc4> <== NEVER TAKEN
_ISR_Signals_to_thread_executing = true;
ffc190a8: 3d 20 00 00 lis r9,0
ffc190ac: 98 09 28 e8 stb r0,10472(r9)
ffc190b0: 48 00 00 24 b ffc190d4 <rtems_signal_send+0xc4>
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc190b4: 7c 00 00 a6 mfmsr r0
ffc190b8: 7d 70 42 a6 mfsprg r11,0
ffc190bc: 7c 0b 58 78 andc r11,r0,r11
ffc190c0: 7d 60 01 24 mtmsr r11
ffc190c4: 81 69 00 18 lwz r11,24(r9)
ffc190c8: 7d 7f fb 78 or r31,r11,r31
ffc190cc: 93 e9 00 18 stw r31,24(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc190d0: 7c 00 01 24 mtmsr r0
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
ffc190d4: 48 00 4c 95 bl ffc1dd68 <_Thread_Enable_dispatch>
ffc190d8: 38 00 00 00 li r0,0
return RTEMS_SUCCESSFUL;
ffc190dc: 48 00 00 0c b ffc190e8 <rtems_signal_send+0xd8>
}
_Thread_Enable_dispatch();
ffc190e0: 48 00 4c 89 bl ffc1dd68 <_Thread_Enable_dispatch>
ffc190e4: 38 00 00 0b li r0,11
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc190e8: 7c 03 03 78 mr r3,r0
ffc190ec: 80 01 00 24 lwz r0,36(r1)
ffc190f0: 83 e1 00 1c lwz r31,28(r1)
ffc190f4: 38 21 00 20 addi r1,r1,32
ffc190f8: 7c 08 03 a6 mtlr r0
ffc190fc: 4e 80 00 20 blr
ffc14794 <rtems_task_mode>:
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc14794: 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
)
{
ffc14798: 94 21 ff f0 stwu r1,-16(r1)
ffc1479c: 7c 08 02 a6 mflr r0
ffc147a0: 93 e1 00 0c stw r31,12(r1)
ffc147a4: 90 01 00 14 stw r0,20(r1)
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
ffc147a8: 38 00 00 09 li r0,9
ffc147ac: 41 82 01 5c beq- ffc14908 <rtems_task_mode+0x174>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
ffc147b0: 3d 20 00 00 lis r9,0
ffc147b4: 81 29 27 f0 lwz r9,10224(r9)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc147b8: 80 09 00 7c lwz r0,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;
ffc147bc: 89 49 00 75 lbz r10,117(r9)
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc147c0: 2f 80 00 00 cmpwi cr7,r0,0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
ffc147c4: 81 69 01 44 lwz r11,324(r9)
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
ffc147c8: 7d 4a 00 34 cntlzw r10,r10
ffc147cc: 55 4a d9 7e rlwinm r10,r10,27,5,31
ffc147d0: 55 4a 40 2e rlwinm r10,r10,8,0,23
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
ffc147d4: 41 9e 00 08 beq- cr7,ffc147dc <rtems_task_mode+0x48>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
ffc147d8: 61 4a 02 00 ori r10,r10,512
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc147dc: 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);
ffc147e0: 38 00 00 00 li r0,0
ffc147e4: 7d 08 00 34 cntlzw r8,r8
ffc147e8: 55 08 d9 7e rlwinm r8,r8,27,5,31
ffc147ec: 55 08 50 2a rlwinm r8,r8,10,0,21
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;
ffc147f0: 7d 0a 53 78 or r10,r8,r10
ffc147f4: 7c 00 00 a6 mfmsr r0
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc147f8: 70 88 01 00 andi. r8,r4,256
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
ffc147fc: 68 00 80 00 xori r0,r0,32768
ffc14800: 54 00 8f fe rlwinm r0,r0,17,31,31
ffc14804: 7d 4a 03 78 or r10,r10,r0
ffc14808: 91 45 00 00 stw r10,0(r5)
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
ffc1480c: 41 82 00 10 beq- ffc1481c <rtems_task_mode+0x88>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
ffc14810: 68 60 01 00 xori r0,r3,256
ffc14814: 54 00 c7 fe rlwinm r0,r0,24,31,31
ffc14818: 98 09 00 75 stb r0,117(r9)
if ( mask & RTEMS_TIMESLICE_MASK ) {
ffc1481c: 70 8a 02 00 andi. r10,r4,512
ffc14820: 41 82 00 28 beq- ffc14848 <rtems_task_mode+0xb4>
if ( _Modes_Is_timeslice(mode_set) ) {
ffc14824: 70 60 02 00 andi. r0,r3,512
ffc14828: 41 82 00 1c beq- ffc14844 <rtems_task_mode+0xb0>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc1482c: 3d 40 00 00 lis r10,0
ffc14830: 80 0a 27 a8 lwz r0,10152(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;
ffc14834: 39 40 00 01 li r10,1
ffc14838: 91 49 00 7c stw r10,124(r9)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
ffc1483c: 90 09 00 78 stw r0,120(r9)
ffc14840: 48 00 00 08 b ffc14848 <rtems_task_mode+0xb4>
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
ffc14844: 90 09 00 7c stw r0,124(r9)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
ffc14848: 70 80 00 01 andi. r0,r4,1
ffc1484c: 41 82 00 2c beq- ffc14878 <rtems_task_mode+0xe4>
}
static inline void _CPU_ISR_Set_level( uint32_t level )
{
register unsigned int msr;
_CPU_MSR_GET(msr);
ffc14850: 38 00 00 00 li r0,0
ffc14854: 7c 00 00 a6 mfmsr r0
if (!(level & CPU_MODES_INTERRUPT_MASK)) {
ffc14858: 70 68 00 01 andi. r8,r3,1
ffc1485c: 40 82 00 10 bne- ffc1486c <rtems_task_mode+0xd8>
static inline uint32_t ppc_interrupt_get_disable_mask( void )
{
uint32_t mask;
asm volatile (
ffc14860: 7d 50 42 a6 mfsprg r10,0
msr |= ppc_interrupt_get_disable_mask();
ffc14864: 7d 40 03 78 or r0,r10,r0
ffc14868: 48 00 00 0c b ffc14874 <rtems_task_mode+0xe0>
ffc1486c: 7d 50 42 a6 mfsprg r10,0
}
else {
msr &= ~ppc_interrupt_get_disable_mask();
ffc14870: 7c 00 50 78 andc r0,r0,r10
}
_CPU_MSR_SET(msr);
ffc14874: 7c 00 01 24 mtmsr r0
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
ffc14878: 70 8a 04 00 andi. r10,r4,1024
ffc1487c: 41 82 00 5c beq- ffc148d8 <rtems_task_mode+0x144>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc14880: 68 63 04 00 xori r3,r3,1024
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc14884: 88 0b 00 08 lbz r0,8(r11)
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
ffc14888: 54 63 b7 fe rlwinm r3,r3,22,31,31
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc1488c: 7f 80 18 00 cmpw cr7,r0,r3
ffc14890: 41 9e 00 48 beq- cr7,ffc148d8 <rtems_task_mode+0x144>
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
ffc14894: 98 6b 00 08 stb r3,8(r11)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc14898: 7c 00 00 a6 mfmsr r0
ffc1489c: 7d 50 42 a6 mfsprg r10,0
ffc148a0: 7c 0a 50 78 andc r10,r0,r10
ffc148a4: 7d 40 01 24 mtmsr r10
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
ffc148a8: 81 0b 00 18 lwz r8,24(r11)
information->signals_pending = information->signals_posted;
ffc148ac: 81 4b 00 14 lwz r10,20(r11)
information->signals_posted = _signals;
ffc148b0: 91 0b 00 14 stw r8,20(r11)
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
ffc148b4: 91 4b 00 18 stw r10,24(r11)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc148b8: 7c 00 01 24 mtmsr r0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
ffc148bc: 80 0b 00 14 lwz r0,20(r11)
ffc148c0: 2f 80 00 00 cmpwi cr7,r0,0
ffc148c4: 41 9e 00 14 beq- cr7,ffc148d8 <rtems_task_mode+0x144>
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
ffc148c8: 38 00 00 01 li r0,1
ffc148cc: 98 09 00 74 stb r0,116(r9)
ffc148d0: 3b e0 00 01 li r31,1
ffc148d4: 48 00 00 08 b ffc148dc <rtems_task_mode+0x148>
ffc148d8: 3b e0 00 00 li r31,0
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
ffc148dc: 3d 20 00 00 lis r9,0
ffc148e0: 80 09 28 14 lwz r0,10260(r9)
ffc148e4: 2f 80 00 03 cmpwi cr7,r0,3
ffc148e8: 40 be 00 1c bne+ cr7,ffc14904 <rtems_task_mode+0x170> <== NEVER TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
ffc148ec: 48 00 0d 61 bl ffc1564c <_Thread_Evaluate_mode>
ffc148f0: 2f 83 00 00 cmpwi cr7,r3,0
ffc148f4: 40 9e 00 0c bne- cr7,ffc14900 <rtems_task_mode+0x16c>
ffc148f8: 2f 9f 00 00 cmpwi cr7,r31,0
ffc148fc: 41 9e 00 08 beq- cr7,ffc14904 <rtems_task_mode+0x170>
_Thread_Dispatch();
ffc14900: 4b ff 7b 19 bl ffc0c418 <_Thread_Dispatch>
ffc14904: 38 00 00 00 li r0,0
return RTEMS_SUCCESSFUL;
}
ffc14908: 7c 03 03 78 mr r3,r0
ffc1490c: 80 01 00 14 lwz r0,20(r1)
ffc14910: 83 e1 00 0c lwz r31,12(r1)
ffc14914: 38 21 00 10 addi r1,r1,16
ffc14918: 7c 08 03 a6 mtlr r0
ffc1491c: 4e 80 00 20 blr
ffc0ddd4 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0ddd4: 94 21 ff e0 stwu r1,-32(r1)
ffc0ddd8: 7c 08 02 a6 mflr r0
ffc0dddc: 93 e1 00 1c stw r31,28(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0dde0: 7c 9f 23 79 mr. r31,r4
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
ffc0dde4: 93 c1 00 18 stw r30,24(r1)
ffc0dde8: 7c be 2b 78 mr r30,r5
ffc0ddec: 90 01 00 24 stw r0,36(r1)
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
ffc0ddf0: 41 82 00 18 beq- ffc0de08 <rtems_task_set_priority+0x34>
ffc0ddf4: 3d 20 00 00 lis r9,0
ffc0ddf8: 89 29 27 04 lbz r9,9988(r9)
ffc0ddfc: 38 00 00 13 li r0,19
ffc0de00: 7f 9f 48 40 cmplw cr7,r31,r9
ffc0de04: 41 9d 00 68 bgt- cr7,ffc0de6c <rtems_task_set_priority+0x98>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
ffc0de08: 2f 9e 00 00 cmpwi cr7,r30,0
ffc0de0c: 38 00 00 09 li r0,9
ffc0de10: 41 9e 00 5c beq- cr7,ffc0de6c <rtems_task_set_priority+0x98>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
ffc0de14: 38 81 00 08 addi r4,r1,8
ffc0de18: 48 00 26 99 bl ffc104b0 <_Thread_Get>
switch ( location ) {
ffc0de1c: 81 21 00 08 lwz r9,8(r1)
ffc0de20: 38 00 00 04 li r0,4
ffc0de24: 2f 89 00 00 cmpwi cr7,r9,0
ffc0de28: 40 9e 00 44 bne- cr7,ffc0de6c <rtems_task_set_priority+0x98>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0de2c: 2f 9f 00 00 cmpwi cr7,r31,0
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
ffc0de30: 80 03 00 14 lwz r0,20(r3)
ffc0de34: 90 1e 00 00 stw r0,0(r30)
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
ffc0de38: 41 9e 00 2c beq- cr7,ffc0de64 <rtems_task_set_priority+0x90>
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
ffc0de3c: 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;
ffc0de40: 93 e3 00 18 stw r31,24(r3)
if ( the_thread->resource_count == 0 ||
ffc0de44: 2f 80 00 00 cmpwi cr7,r0,0
ffc0de48: 41 9e 00 10 beq- cr7,ffc0de58 <rtems_task_set_priority+0x84>
the_thread->current_priority > new_priority )
ffc0de4c: 80 03 00 14 lwz r0,20(r3)
ffc0de50: 7f 80 f8 40 cmplw cr7,r0,r31
ffc0de54: 40 9d 00 10 ble- cr7,ffc0de64 <rtems_task_set_priority+0x90><== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
ffc0de58: 7f e4 fb 78 mr r4,r31
ffc0de5c: 38 a0 00 00 li r5,0
ffc0de60: 48 00 1f 5d bl ffc0fdbc <_Thread_Change_priority>
}
_Thread_Enable_dispatch();
ffc0de64: 48 00 25 e1 bl ffc10444 <_Thread_Enable_dispatch>
ffc0de68: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc0de6c: 7c 03 03 78 mr r3,r0
ffc0de70: 80 01 00 24 lwz r0,36(r1)
ffc0de74: 83 c1 00 18 lwz r30,24(r1)
ffc0de78: 7c 08 03 a6 mtlr r0
ffc0de7c: 83 e1 00 1c lwz r31,28(r1)
ffc0de80: 38 21 00 20 addi r1,r1,32
ffc0de84: 4e 80 00 20 blr
ffc19bb8 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
ffc19bb8: 94 21 ff e8 stwu r1,-24(r1)
ffc19bbc: 7c 08 02 a6 mflr r0
ffc19bc0: 7c 64 1b 78 mr r4,r3
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
ffc19bc4: 3c 60 00 00 lis r3,0
ffc19bc8: 90 01 00 1c stw r0,28(r1)
ffc19bcc: 38 63 79 ac addi r3,r3,31148
ffc19bd0: 38 a1 00 08 addi r5,r1,8
ffc19bd4: 48 00 35 cd bl ffc1d1a0 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc19bd8: 81 21 00 08 lwz r9,8(r1)
ffc19bdc: 38 00 00 04 li r0,4
ffc19be0: 2f 89 00 00 cmpwi cr7,r9,0
ffc19be4: 40 9e 00 20 bne- cr7,ffc19c04 <rtems_timer_cancel+0x4c>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
ffc19be8: 80 03 00 38 lwz r0,56(r3)
ffc19bec: 2f 80 00 04 cmpwi cr7,r0,4
ffc19bf0: 41 9e 00 0c beq- cr7,ffc19bfc <rtems_timer_cancel+0x44> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc19bf4: 38 63 00 10 addi r3,r3,16
ffc19bf8: 48 00 5c 99 bl ffc1f890 <_Watchdog_Remove>
_Thread_Enable_dispatch();
ffc19bfc: 48 00 41 6d bl ffc1dd68 <_Thread_Enable_dispatch>
ffc19c00: 38 00 00 00 li r0,0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc19c04: 7c 03 03 78 mr r3,r0
ffc19c08: 80 01 00 1c lwz r0,28(r1)
ffc19c0c: 38 21 00 18 addi r1,r1,24
ffc19c10: 7c 08 03 a6 mtlr r0
ffc19c14: 4e 80 00 20 blr
ffc1a228 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1a228: 94 21 ff c8 stwu r1,-56(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc1a22c: 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
)
{
ffc1a230: 7c 08 02 a6 mflr r0
ffc1a234: 93 e1 00 34 stw r31,52(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
ffc1a238: 83 e9 29 0c lwz r31,10508(r9)
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1a23c: 93 41 00 20 stw r26,32(r1)
ffc1a240: 7c da 33 78 mr r26,r6
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc1a244: 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
)
{
ffc1a248: 93 81 00 28 stw r28,40(r1)
ffc1a24c: 7c 9c 23 78 mr r28,r4
ffc1a250: 93 a1 00 2c stw r29,44(r1)
ffc1a254: 7c 7d 1b 78 mr r29,r3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc1a258: 38 60 00 0e li r3,14
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
ffc1a25c: 93 c1 00 30 stw r30,48(r1)
ffc1a260: 7c be 2b 78 mr r30,r5
ffc1a264: 90 01 00 3c stw r0,60(r1)
ffc1a268: 93 01 00 18 stw r24,24(r1)
ffc1a26c: 93 21 00 1c stw r25,28(r1)
ffc1a270: 93 61 00 24 stw r27,36(r1)
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
ffc1a274: 41 9e 00 c8 beq- cr7,ffc1a33c <rtems_timer_server_fire_when+0x114>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
ffc1a278: 3d 20 00 00 lis r9,0
ffc1a27c: 88 09 28 94 lbz r0,10388(r9)
ffc1a280: 38 60 00 0b li r3,11
ffc1a284: 2f 80 00 00 cmpwi cr7,r0,0
ffc1a288: 41 9e 00 b4 beq- cr7,ffc1a33c <rtems_timer_server_fire_when+0x114><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( !routine )
ffc1a28c: 2f 85 00 00 cmpwi cr7,r5,0
ffc1a290: 38 60 00 09 li r3,9
ffc1a294: 41 9e 00 a8 beq- cr7,ffc1a33c <rtems_timer_server_fire_when+0x114>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
ffc1a298: 7c 83 23 78 mr r3,r4
ffc1a29c: 4b ff c5 75 bl ffc16810 <_TOD_Validate>
ffc1a2a0: 2f 83 00 00 cmpwi cr7,r3,0
ffc1a2a4: 41 9e 00 94 beq- cr7,ffc1a338 <rtems_timer_server_fire_when+0x110>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1a2a8: 7f 83 e3 78 mr r3,r28
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1a2ac: 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 );
ffc1a2b0: 4b ff c4 d5 bl ffc16784 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1a2b4: 80 1b 28 ac lwz r0,10412(r27)
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
ffc1a2b8: 7c 7c 1b 78 mr r28,r3
if ( seconds <= _TOD_Seconds_since_epoch() )
ffc1a2bc: 7f 83 00 40 cmplw cr7,r3,r0
ffc1a2c0: 40 9d 00 78 ble- cr7,ffc1a338 <rtems_timer_server_fire_when+0x110>
ffc1a2c4: 3c 60 00 00 lis r3,0
ffc1a2c8: 38 63 79 ac addi r3,r3,31148
ffc1a2cc: 7f a4 eb 78 mr r4,r29
ffc1a2d0: 38 a1 00 08 addi r5,r1,8
ffc1a2d4: 48 00 2e cd bl ffc1d1a0 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
ffc1a2d8: 83 01 00 08 lwz r24,8(r1)
ffc1a2dc: 7c 79 1b 78 mr r25,r3
ffc1a2e0: 2f 98 00 00 cmpwi cr7,r24,0
ffc1a2e4: 38 60 00 04 li r3,4
ffc1a2e8: 40 9e 00 54 bne- cr7,ffc1a33c <rtems_timer_server_fire_when+0x114>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
ffc1a2ec: 38 79 00 10 addi r3,r25,16
ffc1a2f0: 48 00 55 a1 bl ffc1f890 <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc1a2f4: 93 b9 00 30 stw r29,48(r25)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
ffc1a2f8: 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();
ffc1a2fc: 80 1b 28 ac lwz r0,10412(r27)
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1a300: 7f e3 fb 78 mr r3,r31
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;
ffc1a304: 91 39 00 38 stw r9,56(r25)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1a308: 7f 24 cb 78 mr r4,r25
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
ffc1a30c: 7f 80 e0 50 subf r28,r0,r28
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1a310: 80 1f 00 04 lwz r0,4(r31)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc1a314: 93 19 00 18 stw r24,24(r25)
ffc1a318: 7c 09 03 a6 mtctr r0
the_watchdog->routine = routine;
ffc1a31c: 93 d9 00 2c stw r30,44(r25)
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc1a320: 93 59 00 34 stw r26,52(r25)
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
ffc1a324: 93 99 00 1c stw r28,28(r25)
(*timer_server->schedule_operation)( timer_server, the_timer );
ffc1a328: 4e 80 04 21 bctrl
_Thread_Enable_dispatch();
ffc1a32c: 48 00 3a 3d bl ffc1dd68 <_Thread_Enable_dispatch>
ffc1a330: 38 60 00 00 li r3,0
return RTEMS_SUCCESSFUL;
ffc1a334: 48 00 00 08 b ffc1a33c <rtems_timer_server_fire_when+0x114>
ffc1a338: 38 60 00 14 li r3,20
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
ffc1a33c: 80 01 00 3c lwz r0,60(r1)
ffc1a340: 83 01 00 18 lwz r24,24(r1)
ffc1a344: 7c 08 03 a6 mtlr r0
ffc1a348: 83 21 00 1c lwz r25,28(r1)
ffc1a34c: 83 41 00 20 lwz r26,32(r1)
ffc1a350: 83 61 00 24 lwz r27,36(r1)
ffc1a354: 83 81 00 28 lwz r28,40(r1)
ffc1a358: 83 a1 00 2c lwz r29,44(r1)
ffc1a35c: 83 c1 00 30 lwz r30,48(r1)
ffc1a360: 83 e1 00 34 lwz r31,52(r1)
ffc1a364: 38 21 00 38 addi r1,r1,56
ffc1a368: 4e 80 00 20 blr
ffc092ec <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
ffc092ec: 2b 83 00 04 cmplwi cr7,r3,4
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
ffc092f0: 94 21 ff f8 stwu r1,-8(r1)
ffc092f4: 7c 08 02 a6 mflr r0
ffc092f8: 90 01 00 0c stw r0,12(r1)
switch ( policy ) {
ffc092fc: 41 9d 00 14 bgt- cr7,ffc09310 <sched_get_priority_max+0x24>
ffc09300: 38 00 00 01 li r0,1
ffc09304: 7c 03 18 30 slw r3,r0,r3
ffc09308: 70 60 00 17 andi. r0,r3,23
ffc0930c: 40 82 00 18 bne- ffc09324 <sched_get_priority_max+0x38> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09310: 48 00 ba f1 bl ffc14e00 <__errno>
ffc09314: 38 00 00 16 li r0,22
ffc09318: 90 03 00 00 stw r0,0(r3)
ffc0931c: 38 60 ff ff li r3,-1
ffc09320: 48 00 00 10 b ffc09330 <sched_get_priority_max+0x44>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
ffc09324: 3d 20 00 00 lis r9,0
ffc09328: 88 69 26 ec lbz r3,9964(r9)
ffc0932c: 38 63 ff ff addi r3,r3,-1
}
ffc09330: 80 01 00 0c lwz r0,12(r1)
ffc09334: 38 21 00 08 addi r1,r1,8
ffc09338: 7c 08 03 a6 mtlr r0
ffc0933c: 4e 80 00 20 blr
ffc09340 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
ffc09340: 2b 83 00 04 cmplwi cr7,r3,4
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
ffc09344: 94 21 ff f8 stwu r1,-8(r1)
ffc09348: 7c 08 02 a6 mflr r0
ffc0934c: 90 01 00 0c stw r0,12(r1)
switch ( policy ) {
ffc09350: 41 9d 00 18 bgt- cr7,ffc09368 <sched_get_priority_min+0x28>
ffc09354: 38 00 00 01 li r0,1
ffc09358: 7c 03 18 30 slw r3,r0,r3
ffc0935c: 70 60 00 17 andi. r0,r3,23
ffc09360: 38 60 00 01 li r3,1
ffc09364: 40 82 00 14 bne- ffc09378 <sched_get_priority_min+0x38> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09368: 48 00 ba 99 bl ffc14e00 <__errno>
ffc0936c: 38 00 00 16 li r0,22
ffc09370: 90 03 00 00 stw r0,0(r3)
ffc09374: 38 60 ff ff li r3,-1
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
ffc09378: 80 01 00 0c lwz r0,12(r1)
ffc0937c: 38 21 00 08 addi r1,r1,8
ffc09380: 7c 08 03 a6 mtlr r0
ffc09384: 4e 80 00 20 blr
ffc09388 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
ffc09388: 94 21 ff e8 stwu r1,-24(r1)
ffc0938c: 7c 08 02 a6 mflr r0
ffc09390: 93 e1 00 14 stw r31,20(r1)
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
ffc09394: 7c 7f 1b 79 mr. r31,r3
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
ffc09398: 90 01 00 1c stw r0,28(r1)
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
ffc0939c: 41 a2 00 24 beq+ ffc093c0 <sched_rr_get_interval+0x38> <== NEVER TAKEN
ffc093a0: 90 81 00 08 stw r4,8(r1)
ffc093a4: 4b ff c0 35 bl ffc053d8 <getpid>
ffc093a8: 7f 9f 18 00 cmpw cr7,r31,r3
ffc093ac: 80 81 00 08 lwz r4,8(r1)
ffc093b0: 41 be 00 10 beq+ cr7,ffc093c0 <sched_rr_get_interval+0x38>
rtems_set_errno_and_return_minus_one( ESRCH );
ffc093b4: 48 00 ba 4d bl ffc14e00 <__errno>
ffc093b8: 38 00 00 03 li r0,3
ffc093bc: 48 00 00 14 b ffc093d0 <sched_rr_get_interval+0x48>
if ( !interval )
ffc093c0: 2f 84 00 00 cmpwi cr7,r4,0
ffc093c4: 40 be 00 18 bne+ cr7,ffc093dc <sched_rr_get_interval+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc093c8: 48 00 ba 39 bl ffc14e00 <__errno>
ffc093cc: 38 00 00 16 li r0,22
ffc093d0: 90 03 00 00 stw r0,0(r3)
ffc093d4: 38 60 ff ff li r3,-1
ffc093d8: 48 00 00 14 b ffc093ec <sched_rr_get_interval+0x64>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
ffc093dc: 3d 20 00 00 lis r9,0
ffc093e0: 80 69 27 b4 lwz r3,10164(r9)
ffc093e4: 48 00 41 dd bl ffc0d5c0 <_Timespec_From_ticks>
ffc093e8: 38 60 00 00 li r3,0
return 0;
}
ffc093ec: 80 01 00 1c lwz r0,28(r1)
ffc093f0: 83 e1 00 14 lwz r31,20(r1)
ffc093f4: 38 21 00 18 addi r1,r1,24
ffc093f8: 7c 08 03 a6 mtlr r0
ffc093fc: 4e 80 00 20 blr
ffc0bc7c <sem_open>:
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc0bc7c: 3d 20 00 00 lis r9,0
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
ffc0bc80: 94 21 ff b8 stwu r1,-72(r1)
ffc0bc84: 7c 08 02 a6 mflr r0
ffc0bc88: 81 69 27 b4 lwz r11,10164(r9)
ffc0bc8c: 93 c1 00 40 stw r30,64(r1)
ffc0bc90: 7c 9e 23 78 mr r30,r4
ffc0bc94: 39 6b 00 01 addi r11,r11,1
ffc0bc98: 93 e1 00 44 stw r31,68(r1)
ffc0bc9c: 7c 7f 1b 78 mr r31,r3
ffc0bca0: 90 01 00 4c stw r0,76(r1)
ffc0bca4: 93 61 00 34 stw r27,52(r1)
ffc0bca8: 93 81 00 38 stw r28,56(r1)
ffc0bcac: 93 a1 00 3c stw r29,60(r1)
ffc0bcb0: 90 a1 00 28 stw r5,40(r1)
ffc0bcb4: 91 69 27 b4 stw r11,10164(r9)
ffc0bcb8: 90 c1 00 2c stw r6,44(r1)
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
ffc0bcbc: 70 9c 02 00 andi. r28,r4,512
ffc0bcc0: 40 82 00 0c bne- ffc0bccc <sem_open+0x50>
ffc0bcc4: 3b a0 00 00 li r29,0
ffc0bcc8: 48 00 00 20 b ffc0bce8 <sem_open+0x6c>
va_start(arg, oflag);
ffc0bccc: 38 01 00 50 addi r0,r1,80
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
ffc0bcd0: 83 a1 00 2c lwz r29,44(r1)
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
ffc0bcd4: 90 01 00 18 stw r0,24(r1)
ffc0bcd8: 38 01 00 20 addi r0,r1,32
ffc0bcdc: 90 01 00 1c stw r0,28(r1)
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
ffc0bce0: 38 00 00 04 li r0,4
ffc0bce4: 98 01 00 14 stb r0,20(r1)
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
ffc0bce8: 7f e3 fb 78 mr r3,r31
ffc0bcec: 38 81 00 08 addi r4,r1,8
ffc0bcf0: 48 00 82 11 bl ffc13f00 <_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 ) {
ffc0bcf4: 7c 7b 1b 79 mr. r27,r3
ffc0bcf8: 41 82 00 24 beq- ffc0bd1c <sem_open+0xa0>
/*
* 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) ) ) {
ffc0bcfc: 2f 9b 00 02 cmpwi cr7,r27,2
ffc0bd00: 40 9e 00 0c bne- cr7,ffc0bd0c <sem_open+0x90> <== NEVER TAKEN
ffc0bd04: 2f 9c 00 00 cmpwi cr7,r28,0
ffc0bd08: 40 9e 00 68 bne- cr7,ffc0bd70 <sem_open+0xf4>
_Thread_Enable_dispatch();
ffc0bd0c: 48 00 32 7d bl ffc0ef88 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
ffc0bd10: 48 00 ca 95 bl ffc187a4 <__errno>
ffc0bd14: 93 63 00 00 stw r27,0(r3)
ffc0bd18: 48 00 00 20 b ffc0bd38 <sem_open+0xbc>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
ffc0bd1c: 73 de 0a 00 andi. r30,r30,2560
ffc0bd20: 2f 9e 0a 00 cmpwi cr7,r30,2560
ffc0bd24: 40 be 00 1c bne+ cr7,ffc0bd40 <sem_open+0xc4>
_Thread_Enable_dispatch();
ffc0bd28: 48 00 32 61 bl ffc0ef88 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
ffc0bd2c: 48 00 ca 79 bl ffc187a4 <__errno>
ffc0bd30: 38 00 00 11 li r0,17
ffc0bd34: 90 03 00 00 stw r0,0(r3)
ffc0bd38: 38 60 ff ff li r3,-1
ffc0bd3c: 48 00 00 64 b ffc0bda0 <sem_open+0x124>
ffc0bd40: 80 81 00 08 lwz r4,8(r1)
ffc0bd44: 3c 60 00 00 lis r3,0
ffc0bd48: 38 a1 00 10 addi r5,r1,16
ffc0bd4c: 38 63 30 f8 addi r3,r3,12536
ffc0bd50: 48 00 26 bd bl ffc0e40c <_Objects_Get>
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
ffc0bd54: 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 );
ffc0bd58: 90 61 00 0c stw r3,12(r1)
the_semaphore->open_count += 1;
ffc0bd5c: 38 09 00 01 addi r0,r9,1
ffc0bd60: 90 03 00 18 stw r0,24(r3)
_Thread_Enable_dispatch();
ffc0bd64: 48 00 32 25 bl ffc0ef88 <_Thread_Enable_dispatch>
_Thread_Enable_dispatch();
ffc0bd68: 48 00 32 21 bl ffc0ef88 <_Thread_Enable_dispatch>
goto return_id;
ffc0bd6c: 48 00 00 2c b ffc0bd98 <sem_open+0x11c>
/*
* 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(
ffc0bd70: 7f a5 eb 78 mr r5,r29
ffc0bd74: 7f e3 fb 78 mr r3,r31
ffc0bd78: 38 80 00 00 li r4,0
ffc0bd7c: 38 c1 00 0c addi r6,r1,12
ffc0bd80: 48 00 7f d5 bl ffc13d54 <_POSIX_Semaphore_Create_support>
ffc0bd84: 7c 7f 1b 78 mr r31,r3
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
ffc0bd88: 48 00 32 01 bl ffc0ef88 <_Thread_Enable_dispatch>
if ( status == -1 )
ffc0bd8c: 2f 9f ff ff cmpwi cr7,r31,-1
ffc0bd90: 38 60 ff ff li r3,-1
ffc0bd94: 41 9e 00 0c beq- cr7,ffc0bda0 <sem_open+0x124>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
ffc0bd98: 80 61 00 0c lwz r3,12(r1)
ffc0bd9c: 38 63 00 08 addi r3,r3,8
#endif
return id;
}
ffc0bda0: 80 01 00 4c lwz r0,76(r1)
ffc0bda4: 83 61 00 34 lwz r27,52(r1)
ffc0bda8: 7c 08 03 a6 mtlr r0
ffc0bdac: 83 81 00 38 lwz r28,56(r1)
ffc0bdb0: 83 a1 00 3c lwz r29,60(r1)
ffc0bdb4: 83 c1 00 40 lwz r30,64(r1)
ffc0bdb8: 83 e1 00 44 lwz r31,68(r1)
ffc0bdbc: 38 21 00 48 addi r1,r1,72
ffc0bdc0: 4e 80 00 20 blr
ffc091a4 <sigaction>:
struct sigaction *oact
)
{
ISR_Level level;
if ( oact )
ffc091a4: 2c 05 00 00 cmpwi r5,0
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
ffc091a8: 94 21 ff e8 stwu r1,-24(r1)
ffc091ac: 7c 08 02 a6 mflr r0
ffc091b0: 93 c1 00 10 stw r30,16(r1)
ffc091b4: 7c 9e 23 78 mr r30,r4
ffc091b8: 90 01 00 1c stw r0,28(r1)
ffc091bc: 93 81 00 08 stw r28,8(r1)
ffc091c0: 93 a1 00 0c stw r29,12(r1)
ffc091c4: 93 e1 00 14 stw r31,20(r1)
ISR_Level level;
if ( oact )
ffc091c8: 41 82 00 2c beq- ffc091f4 <sigaction+0x50>
*oact = _POSIX_signals_Vectors[ sig ];
ffc091cc: 1c 03 00 0c mulli r0,r3,12
ffc091d0: 3d 60 00 00 lis r11,0
ffc091d4: 39 6b 31 d0 addi r11,r11,12752
ffc091d8: 7d 2b 02 14 add r9,r11,r0
ffc091dc: 7d 6b 00 2e lwzx r11,r11,r0
ffc091e0: 81 49 00 08 lwz r10,8(r9)
ffc091e4: 80 09 00 04 lwz r0,4(r9)
ffc091e8: 91 45 00 08 stw r10,8(r5)
ffc091ec: 91 65 00 00 stw r11,0(r5)
ffc091f0: 90 05 00 04 stw r0,4(r5)
if ( !sig )
ffc091f4: 2f 83 00 00 cmpwi cr7,r3,0
ffc091f8: 41 9e 00 18 beq- cr7,ffc09210 <sigaction+0x6c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
ffc091fc: 38 03 ff ff addi r0,r3,-1
ffc09200: 2b 80 00 1f cmplwi cr7,r0,31
ffc09204: 41 9d 00 0c bgt- cr7,ffc09210 <sigaction+0x6c>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
ffc09208: 2f 83 00 09 cmpwi cr7,r3,9
ffc0920c: 40 be 00 18 bne+ cr7,ffc09224 <sigaction+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
ffc09210: 48 00 be 0d bl ffc1501c <__errno>
ffc09214: 38 00 00 16 li r0,22
ffc09218: 90 03 00 00 stw r0,0(r3)
ffc0921c: 38 00 ff ff li r0,-1
ffc09220: 48 00 00 7c b ffc0929c <sigaction+0xf8>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
ffc09224: 2f 9e 00 00 cmpwi cr7,r30,0
ffc09228: 38 00 00 00 li r0,0
ffc0922c: 41 9e 00 70 beq- cr7,ffc0929c <sigaction+0xf8> <== NEVER TAKEN
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc09230: 7f 80 00 a6 mfmsr r28
ffc09234: 7c 10 42 a6 mfsprg r0,0
ffc09238: 7f 80 00 78 andc r0,r28,r0
ffc0923c: 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 ) {
ffc09240: 80 1e 00 08 lwz r0,8(r30)
ffc09244: 3f a0 00 00 lis r29,0
ffc09248: 3b bd 31 d0 addi r29,r29,12752
ffc0924c: 2f 80 00 00 cmpwi cr7,r0,0
ffc09250: 1f e3 00 0c mulli r31,r3,12
ffc09254: 40 be 00 20 bne+ cr7,ffc09274 <sigaction+0xd0>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
ffc09258: 3d 60 ff c2 lis r11,-62
ffc0925c: 39 6b 32 b8 addi r11,r11,12984
ffc09260: 7d 2b fa 14 add r9,r11,r31
ffc09264: 7d 4b f8 2e lwzx r10,r11,r31
ffc09268: 80 09 00 04 lwz r0,4(r9)
ffc0926c: 81 69 00 08 lwz r11,8(r9)
ffc09270: 48 00 00 14 b ffc09284 <sigaction+0xe0>
} else {
_POSIX_signals_Clear_process_signals( sig );
ffc09274: 48 00 77 d9 bl ffc10a4c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
ffc09278: 81 7e 00 08 lwz r11,8(r30)
ffc0927c: 81 5e 00 00 lwz r10,0(r30)
ffc09280: 80 1e 00 04 lwz r0,4(r30)
ffc09284: 7d 3d fa 14 add r9,r29,r31
ffc09288: 7d 5d f9 2e stwx r10,r29,r31
ffc0928c: 91 69 00 08 stw r11,8(r9)
ffc09290: 90 09 00 04 stw r0,4(r9)
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09294: 7f 80 01 24 mtmsr r28
ffc09298: 38 00 00 00 li r0,0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
ffc0929c: 7c 03 03 78 mr r3,r0
ffc092a0: 80 01 00 1c lwz r0,28(r1)
ffc092a4: 83 81 00 08 lwz r28,8(r1)
ffc092a8: 7c 08 03 a6 mtlr r0
ffc092ac: 83 a1 00 0c lwz r29,12(r1)
ffc092b0: 83 c1 00 10 lwz r30,16(r1)
ffc092b4: 83 e1 00 14 lwz r31,20(r1)
ffc092b8: 38 21 00 18 addi r1,r1,24
ffc092bc: 4e 80 00 20 blr
ffc0bb34 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
ffc0bb34: 94 21 ff e0 stwu r1,-32(r1)
ffc0bb38: 7c 08 02 a6 mflr r0
ffc0bb3c: 7c 64 1b 78 mr r4,r3
ffc0bb40: 93 e1 00 1c stw r31,28(r1)
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
ffc0bb44: 3b e1 00 08 addi r31,r1,8
ffc0bb48: 7f e5 fb 78 mr r5,r31
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
ffc0bb4c: 93 c1 00 18 stw r30,24(r1)
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
ffc0bb50: 38 60 00 01 li r3,1
(void) sigfillset( &all_signals );
ffc0bb54: 3b c1 00 0c addi r30,r1,12
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
ffc0bb58: 90 01 00 24 stw r0,36(r1)
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
ffc0bb5c: 4b ff ff 99 bl ffc0baf4 <sigprocmask>
(void) sigfillset( &all_signals );
ffc0bb60: 7f c3 f3 78 mr r3,r30
ffc0bb64: 4b ff fe 89 bl ffc0b9ec <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
ffc0bb68: 7f c3 f3 78 mr r3,r30
ffc0bb6c: 38 80 00 00 li r4,0
ffc0bb70: 38 a0 00 00 li r5,0
ffc0bb74: 48 00 00 a1 bl ffc0bc14 <sigtimedwait>
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
ffc0bb78: 7f e4 fb 78 mr r4,r31
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
(void) sigfillset( &all_signals );
status = sigtimedwait( &all_signals, NULL, NULL );
ffc0bb7c: 7c 7e 1b 78 mr r30,r3
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
ffc0bb80: 38 a0 00 00 li r5,0
ffc0bb84: 38 60 00 00 li r3,0
ffc0bb88: 4b ff ff 6d bl ffc0baf4 <sigprocmask>
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
ffc0bb8c: 2f 9e ff ff cmpwi cr7,r30,-1
ffc0bb90: 41 be 00 10 beq+ cr7,ffc0bba0 <sigsuspend+0x6c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
ffc0bb94: 48 00 ba b1 bl ffc17644 <__errno>
ffc0bb98: 38 00 00 04 li r0,4
ffc0bb9c: 90 03 00 00 stw r0,0(r3)
return status;
}
ffc0bba0: 80 01 00 24 lwz r0,36(r1)
ffc0bba4: 38 60 ff ff li r3,-1
ffc0bba8: 83 c1 00 18 lwz r30,24(r1)
ffc0bbac: 7c 08 03 a6 mtlr r0
ffc0bbb0: 83 e1 00 1c lwz r31,28(r1)
ffc0bbb4: 38 21 00 20 addi r1,r1,32
ffc0bbb8: 4e 80 00 20 blr
ffc09758 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
ffc09758: 94 21 ff d8 stwu r1,-40(r1)
ffc0975c: 7c 08 02 a6 mflr r0
ffc09760: 93 c1 00 20 stw r30,32(r1)
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
ffc09764: 7c 7e 1b 79 mr. r30,r3
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
ffc09768: 93 a1 00 1c stw r29,28(r1)
ffc0976c: 7c 9d 23 78 mr r29,r4
ffc09770: 93 e1 00 24 stw r31,36(r1)
ffc09774: 7c bf 2b 78 mr r31,r5
ffc09778: 90 01 00 2c stw r0,44(r1)
ffc0977c: 93 81 00 18 stw r28,24(r1)
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
ffc09780: 41 82 00 2c beq- ffc097ac <sigtimedwait+0x54>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
ffc09784: 2f 85 00 00 cmpwi cr7,r5,0
ffc09788: 41 9e 00 38 beq- cr7,ffc097c0 <sigtimedwait+0x68>
if ( !_Timespec_Is_valid( timeout ) )
ffc0978c: 7c a3 2b 78 mr r3,r5
ffc09790: 48 00 42 29 bl ffc0d9b8 <_Timespec_Is_valid>
ffc09794: 2f 83 00 00 cmpwi cr7,r3,0
ffc09798: 41 9e 00 14 beq- cr7,ffc097ac <sigtimedwait+0x54>
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
ffc0979c: 7f e3 fb 78 mr r3,r31
ffc097a0: 48 00 42 8d bl ffc0da2c <_Timespec_To_ticks>
if ( !interval )
ffc097a4: 7c 64 1b 79 mr. r4,r3
ffc097a8: 40 a2 00 1c bne+ ffc097c4 <sigtimedwait+0x6c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc097ac: 48 00 bc b5 bl ffc15460 <__errno>
ffc097b0: 38 00 00 16 li r0,22
ffc097b4: 90 03 00 00 stw r0,0(r3)
ffc097b8: 3b c0 ff ff li r30,-1
ffc097bc: 48 00 01 54 b ffc09910 <sigtimedwait+0x1b8>
ffc097c0: 38 80 00 00 li r4,0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
ffc097c4: 2f 9d 00 00 cmpwi cr7,r29,0
ffc097c8: 3b e1 00 08 addi r31,r1,8
ffc097cc: 41 9e 00 08 beq- cr7,ffc097d4 <sigtimedwait+0x7c>
ffc097d0: 7f bf eb 78 mr r31,r29
the_thread = _Thread_Executing;
ffc097d4: 3d 20 00 00 lis r9,0
ffc097d8: 81 29 28 64 lwz r9,10340(r9)
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
ffc097dc: 83 89 01 48 lwz r28,328(r9)
static inline uint32_t ppc_interrupt_disable( void )
{
uint32_t level;
uint32_t mask;
asm volatile (
ffc097e0: 7f a0 00 a6 mfmsr r29
ffc097e4: 7c 10 42 a6 mfsprg r0,0
ffc097e8: 7f a0 00 78 andc r0,r29,r0
ffc097ec: 7c 00 01 24 mtmsr r0
*/
/* API signals pending? */
_ISR_Disable( level );
if ( *set & api->signals_pending ) {
ffc097f0: 80 1e 00 00 lwz r0,0(r30)
ffc097f4: 80 7c 00 d0 lwz r3,208(r28)
ffc097f8: 7c 0b 18 39 and. r11,r0,r3
ffc097fc: 41 a2 00 3c beq+ ffc09838 <sigtimedwait+0xe0>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
ffc09800: 4b ff ff 01 bl ffc09700 <_POSIX_signals_Get_highest>
_POSIX_signals_Clear_signals(
ffc09804: 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_highest( api->signals_pending );
ffc09808: 90 7f 00 00 stw r3,0(r31)
ffc0980c: 7c 64 1b 78 mr r4,r3
_POSIX_signals_Clear_signals(
ffc09810: 38 c0 00 00 li r6,0
ffc09814: 7f 83 e3 78 mr r3,r28
ffc09818: 38 e0 00 00 li r7,0
ffc0981c: 48 00 7a 51 bl ffc1126c <_POSIX_signals_Clear_signals>
return level;
}
static inline void ppc_interrupt_enable( uint32_t level )
{
asm volatile (
ffc09820: 7f a0 01 24 mtmsr r29
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
ffc09824: 38 00 00 01 li r0,1
ffc09828: 90 1f 00 04 stw r0,4(r31)
the_info->si_value.sival_int = 0;
ffc0982c: 38 00 00 00 li r0,0
ffc09830: 90 1f 00 08 stw r0,8(r31)
ffc09834: 48 00 00 d8 b ffc0990c <sigtimedwait+0x1b4>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
ffc09838: 3d 60 00 00 lis r11,0
ffc0983c: 80 6b 28 94 lwz r3,10388(r11)
ffc09840: 7c 0b 18 39 and. r11,r0,r3
ffc09844: 41 a2 00 40 beq+ ffc09884 <sigtimedwait+0x12c>
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
ffc09848: 4b ff fe b9 bl ffc09700 <_POSIX_signals_Get_highest>
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
ffc0984c: 7f e5 fb 78 mr r5,r31
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
ffc09850: 7c 7e 1b 78 mr r30,r3
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
ffc09854: 7f c4 f3 78 mr r4,r30
ffc09858: 7f 83 e3 78 mr r3,r28
ffc0985c: 38 c0 00 01 li r6,1
ffc09860: 38 e0 00 00 li r7,0
ffc09864: 48 00 7a 09 bl ffc1126c <_POSIX_signals_Clear_signals>
ffc09868: 7f a0 01 24 mtmsr r29
_ISR_Enable( level );
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
ffc0986c: 38 00 00 00 li r0,0
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
_ISR_Enable( level );
the_info->si_signo = signo;
ffc09870: 93 df 00 00 stw r30,0(r31)
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
ffc09874: 90 1f 00 08 stw r0,8(r31)
signo = _POSIX_signals_Get_highest( _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;
ffc09878: 38 00 00 01 li r0,1
ffc0987c: 90 1f 00 04 stw r0,4(r31)
the_info->si_value.sival_int = 0;
return signo;
ffc09880: 48 00 00 90 b ffc09910 <sigtimedwait+0x1b8>
ffc09884: 3d 60 00 00 lis r11,0
ffc09888: 81 4b 28 24 lwz r10,10276(r11)
ffc0988c: 38 0a 00 01 addi r0,r10,1
ffc09890: 90 0b 28 24 stw r0,10276(r11)
}
the_info->si_signo = -1;
ffc09894: 38 00 ff ff li r0,-1
ffc09898: 90 1f 00 00 stw r0,0(r31)
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
ffc0989c: 38 00 00 04 li r0,4
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
ffc098a0: 93 e9 00 28 stw r31,40(r9)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
ffc098a4: 3d 60 00 00 lis r11,0
the_thread->Wait.return_code = EINTR;
ffc098a8: 90 09 00 34 stw r0,52(r9)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
ffc098ac: 39 6b 33 5c addi r11,r11,13148
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;
ffc098b0: 39 40 00 01 li r10,1
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
ffc098b4: 80 1e 00 00 lwz r0,0(r30)
ffc098b8: 91 4b 00 30 stw r10,48(r11)
ffc098bc: 90 09 00 30 stw r0,48(r9)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
ffc098c0: 91 69 00 44 stw r11,68(r9)
ffc098c4: 7f a0 01 24 mtmsr r29
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 );
ffc098c8: 3c a0 ff c1 lis r5,-63
ffc098cc: 3c 60 00 00 lis r3,0
ffc098d0: 38 a5 d2 fc addi r5,r5,-11524
ffc098d4: 38 63 33 5c addi r3,r3,13148
ffc098d8: 48 00 36 2d bl ffc0cf04 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
ffc098dc: 48 00 30 29 bl ffc0c904 <_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 );
ffc098e0: 80 9f 00 00 lwz r4,0(r31)
ffc098e4: 7f e5 fb 78 mr r5,r31
ffc098e8: 38 c0 00 00 li r6,0
ffc098ec: 38 e0 00 00 li r7,0
ffc098f0: 7f 83 e3 78 mr r3,r28
ffc098f4: 48 00 79 79 bl ffc1126c <_POSIX_signals_Clear_signals>
errno = _Thread_Executing->Wait.return_code;
ffc098f8: 48 00 bb 69 bl ffc15460 <__errno>
ffc098fc: 3d 20 00 00 lis r9,0
ffc09900: 81 29 28 64 lwz r9,10340(r9)
ffc09904: 80 09 00 34 lwz r0,52(r9)
ffc09908: 90 03 00 00 stw r0,0(r3)
return the_info->si_signo;
ffc0990c: 83 df 00 00 lwz r30,0(r31)
}
ffc09910: 80 01 00 2c lwz r0,44(r1)
ffc09914: 7f c3 f3 78 mr r3,r30
ffc09918: 83 81 00 18 lwz r28,24(r1)
ffc0991c: 7c 08 03 a6 mtlr r0
ffc09920: 83 a1 00 1c lwz r29,28(r1)
ffc09924: 83 c1 00 20 lwz r30,32(r1)
ffc09928: 83 e1 00 24 lwz r31,36(r1)
ffc0992c: 38 21 00 28 addi r1,r1,40
ffc09930: 4e 80 00 20 blr
ffc0be14 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0be14: 94 21 ff f0 stwu r1,-16(r1)
ffc0be18: 7c 08 02 a6 mflr r0
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0be1c: 38 a0 00 00 li r5,0
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0be20: 93 e1 00 0c stw r31,12(r1)
ffc0be24: 7c 9f 23 78 mr r31,r4
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0be28: 38 80 00 00 li r4,0
int sigwait(
const sigset_t *set,
int *sig
)
{
ffc0be2c: 90 01 00 14 stw r0,20(r1)
int status;
status = sigtimedwait( set, NULL, NULL );
ffc0be30: 4b ff fd e5 bl ffc0bc14 <sigtimedwait>
if ( status != -1 ) {
ffc0be34: 2f 83 ff ff cmpwi cr7,r3,-1
ffc0be38: 41 9e 00 18 beq- cr7,ffc0be50 <sigwait+0x3c>
if ( sig )
ffc0be3c: 2f 9f 00 00 cmpwi cr7,r31,0
ffc0be40: 38 00 00 00 li r0,0
ffc0be44: 41 9e 00 14 beq- cr7,ffc0be58 <sigwait+0x44> <== NEVER TAKEN
*sig = status;
ffc0be48: 90 7f 00 00 stw r3,0(r31)
ffc0be4c: 48 00 00 0c b ffc0be58 <sigwait+0x44>
return 0;
}
return errno;
ffc0be50: 48 00 b7 f5 bl ffc17644 <__errno>
ffc0be54: 80 03 00 00 lwz r0,0(r3)
}
ffc0be58: 7c 03 03 78 mr r3,r0
ffc0be5c: 80 01 00 14 lwz r0,20(r1)
ffc0be60: 83 e1 00 0c lwz r31,12(r1)
ffc0be64: 38 21 00 10 addi r1,r1,16
ffc0be68: 7c 08 03 a6 mtlr r0
ffc0be6c: 4e 80 00 20 blr
ffc0871c <timer_create>:
timer_t *timerid
)
{
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
ffc0871c: 2f 83 00 01 cmpwi cr7,r3,1
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
ffc08720: 94 21 ff f0 stwu r1,-16(r1)
ffc08724: 7c 08 02 a6 mflr r0
ffc08728: 93 c1 00 08 stw r30,8(r1)
ffc0872c: 7c be 2b 78 mr r30,r5
ffc08730: 93 e1 00 0c stw r31,12(r1)
ffc08734: 7c 9f 23 78 mr r31,r4
ffc08738: 90 01 00 14 stw r0,20(r1)
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
ffc0873c: 40 9e 00 3c bne- cr7,ffc08778 <timer_create+0x5c>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
ffc08740: 2f 85 00 00 cmpwi cr7,r5,0
ffc08744: 41 9e 00 34 beq- cr7,ffc08778 <timer_create+0x5c>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
ffc08748: 2f 84 00 00 cmpwi cr7,r4,0
ffc0874c: 41 9e 00 38 beq- cr7,ffc08784 <timer_create+0x68>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
ffc08750: 81 24 00 00 lwz r9,0(r4)
ffc08754: 38 09 ff ff addi r0,r9,-1
ffc08758: 2b 80 00 01 cmplwi cr7,r0,1
ffc0875c: 41 9d 00 1c bgt- cr7,ffc08778 <timer_create+0x5c> <== 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 )
ffc08760: 81 24 00 04 lwz r9,4(r4)
ffc08764: 2f 89 00 00 cmpwi cr7,r9,0
ffc08768: 41 9e 00 10 beq- cr7,ffc08778 <timer_create+0x5c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
ffc0876c: 39 29 ff ff addi r9,r9,-1
ffc08770: 2b 89 00 1f cmplwi cr7,r9,31
ffc08774: 40 bd 00 10 ble+ cr7,ffc08784 <timer_create+0x68> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08778: 48 00 c3 e1 bl ffc14b58 <__errno>
ffc0877c: 38 00 00 16 li r0,22
ffc08780: 48 00 00 34 b ffc087b4 <timer_create+0x98>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
ffc08784: 3d 20 00 00 lis r9,0
ffc08788: 81 69 28 00 lwz r11,10240(r9)
ffc0878c: 38 0b 00 01 addi r0,r11,1
ffc08790: 90 09 28 00 stw r0,10240(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 );
ffc08794: 3c 60 00 00 lis r3,0
ffc08798: 38 63 2f 78 addi r3,r3,12152
ffc0879c: 48 00 24 85 bl ffc0ac20 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
ffc087a0: 2c 03 00 00 cmpwi r3,0
ffc087a4: 40 a2 00 1c bne+ ffc087c0 <timer_create+0xa4>
_Thread_Enable_dispatch();
ffc087a8: 48 00 35 35 bl ffc0bcdc <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
ffc087ac: 48 00 c3 ad bl ffc14b58 <__errno>
ffc087b0: 38 00 00 0b li r0,11
ffc087b4: 90 03 00 00 stw r0,0(r3)
ffc087b8: 38 60 ff ff li r3,-1
ffc087bc: 48 00 00 88 b ffc08844 <timer_create+0x128>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ffc087c0: 38 00 00 02 li r0,2
ffc087c4: 98 03 00 3c stb r0,60(r3)
ptimer->thread_id = _Thread_Executing->Object.id;
ffc087c8: 3d 20 00 00 lis r9,0
if ( evp != NULL ) {
ffc087cc: 2f 9f 00 00 cmpwi cr7,r31,0
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
ptimer->thread_id = _Thread_Executing->Object.id;
ffc087d0: 81 29 28 40 lwz r9,10304(r9)
ffc087d4: 80 09 00 08 lwz r0,8(r9)
ffc087d8: 90 03 00 38 stw r0,56(r3)
if ( evp != NULL ) {
ffc087dc: 41 9e 00 1c beq- cr7,ffc087f8 <timer_create+0xdc>
ptimer->inf.sigev_notify = evp->sigev_notify;
ptimer->inf.sigev_signo = evp->sigev_signo;
ptimer->inf.sigev_value = evp->sigev_value;
ffc087e0: 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;
ffc087e4: 81 7f 00 00 lwz r11,0(r31)
ptimer->inf.sigev_signo = evp->sigev_signo;
ffc087e8: 81 3f 00 04 lwz r9,4(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;
ffc087ec: 91 63 00 40 stw r11,64(r3)
ptimer->inf.sigev_signo = evp->sigev_signo;
ffc087f0: 91 23 00 44 stw r9,68(r3)
ptimer->inf.sigev_value = evp->sigev_value;
ffc087f4: 90 03 00 48 stw r0,72(r3)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
ffc087f8: 81 23 00 08 lwz r9,8(r3)
ffc087fc: 3d 60 00 00 lis r11,0
ffc08800: 81 4b 2f 94 lwz r10,12180(r11)
}
ptimer->overrun = 0;
ffc08804: 38 00 00 00 li r0,0
ffc08808: 55 2b 13 ba rlwinm r11,r9,2,14,29
ffc0880c: 90 03 00 68 stw r0,104(r3)
ffc08810: 7c 6a 59 2e stwx r3,r10,r11
ptimer->timer_data.it_value.tv_sec = 0;
ffc08814: 90 03 00 5c stw r0,92(r3)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
ffc08818: 90 03 00 0c stw r0,12(r3)
ptimer->timer_data.it_value.tv_nsec = 0;
ffc0881c: 90 03 00 60 stw r0,96(r3)
ptimer->timer_data.it_interval.tv_sec = 0;
ffc08820: 90 03 00 54 stw r0,84(r3)
ptimer->timer_data.it_interval.tv_nsec = 0;
ffc08824: 90 03 00 58 stw r0,88(r3)
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc08828: 90 03 00 30 stw r0,48(r3)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc0882c: 90 03 00 18 stw r0,24(r3)
the_watchdog->routine = routine;
ffc08830: 90 03 00 2c stw r0,44(r3)
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc08834: 90 03 00 34 stw r0,52(r3)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
ffc08838: 91 3e 00 00 stw r9,0(r30)
_Thread_Enable_dispatch();
ffc0883c: 48 00 34 a1 bl ffc0bcdc <_Thread_Enable_dispatch>
ffc08840: 38 60 00 00 li r3,0
return 0;
}
ffc08844: 80 01 00 14 lwz r0,20(r1)
ffc08848: 83 c1 00 08 lwz r30,8(r1)
ffc0884c: 7c 08 03 a6 mtlr r0
ffc08850: 83 e1 00 0c lwz r31,12(r1)
ffc08854: 38 21 00 10 addi r1,r1,16
ffc08858: 4e 80 00 20 blr
ffc0885c <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
ffc0885c: 94 21 ff c0 stwu r1,-64(r1)
ffc08860: 7c 08 02 a6 mflr r0
ffc08864: 93 a1 00 34 stw r29,52(r1)
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
ffc08868: 7c bd 2b 79 mr. r29,r5
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
ffc0886c: 93 c1 00 38 stw r30,56(r1)
ffc08870: 7c de 33 78 mr r30,r6
ffc08874: 93 e1 00 3c stw r31,60(r1)
ffc08878: 7c 7f 1b 78 mr r31,r3
ffc0887c: 90 01 00 44 stw r0,68(r1)
ffc08880: 93 61 00 2c stw r27,44(r1)
ffc08884: 93 81 00 30 stw r28,48(r1)
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
ffc08888: 41 82 01 c4 beq- ffc08a4c <timer_settime+0x1f0> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
ffc0888c: 81 3d 00 0c lwz r9,12(r29)
ffc08890: 3c 00 3b 9a lis r0,15258
ffc08894: 60 00 c9 ff ori r0,r0,51711
ffc08898: 7f 89 00 40 cmplw cr7,r9,r0
ffc0889c: 41 9d 01 b0 bgt- cr7,ffc08a4c <timer_settime+0x1f0>
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
ffc088a0: 81 3d 00 04 lwz r9,4(r29)
ffc088a4: 7f 89 00 40 cmplw cr7,r9,r0
ffc088a8: 41 9d 01 a4 bgt- cr7,ffc08a4c <timer_settime+0x1f0> <== NEVER TAKEN
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
ffc088ac: 2f 84 00 04 cmpwi cr7,r4,4
ffc088b0: 41 9e 00 0c beq- cr7,ffc088bc <timer_settime+0x60>
ffc088b4: 2f 84 00 00 cmpwi cr7,r4,0
ffc088b8: 40 9e 01 94 bne- cr7,ffc08a4c <timer_settime+0x1f0>
}
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
ffc088bc: 2f 84 00 04 cmpwi cr7,r4,4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
ffc088c0: 81 5d 00 00 lwz r10,0(r29)
ffc088c4: 81 7d 00 04 lwz r11,4(r29)
ffc088c8: 81 3d 00 08 lwz r9,8(r29)
ffc088cc: 80 1d 00 0c lwz r0,12(r29)
ffc088d0: 91 41 00 14 stw r10,20(r1)
ffc088d4: 91 61 00 18 stw r11,24(r1)
ffc088d8: 91 21 00 1c stw r9,28(r1)
ffc088dc: 90 01 00 20 stw r0,32(r1)
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
ffc088e0: 40 be 00 38 bne+ cr7,ffc08918 <timer_settime+0xbc>
struct timespec now;
_TOD_Get( &now );
ffc088e4: 3b 81 00 0c addi r28,r1,12
ffc088e8: 7f 83 e3 78 mr r3,r28
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
ffc088ec: 3b 61 00 1c addi r27,r1,28
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
ffc088f0: 48 00 1d 91 bl ffc0a680 <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
ffc088f4: 7f 83 e3 78 mr r3,r28
ffc088f8: 7f 64 db 78 mr r4,r27
ffc088fc: 48 00 44 95 bl ffc0cd90 <_Timespec_Greater_than>
ffc08900: 2f 83 00 00 cmpwi cr7,r3,0
ffc08904: 40 9e 01 48 bne- cr7,ffc08a4c <timer_settime+0x1f0>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
ffc08908: 7f 64 db 78 mr r4,r27
ffc0890c: 7f 83 e3 78 mr r3,r28
ffc08910: 7f 65 db 78 mr r5,r27
ffc08914: 48 00 44 b9 bl ffc0cdcc <_Timespec_Subtract>
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
ffc08918: 3c 60 00 00 lis r3,0
ffc0891c: 7f e4 fb 78 mr r4,r31
ffc08920: 38 63 2f 78 addi r3,r3,12152
ffc08924: 38 a1 00 08 addi r5,r1,8
ffc08928: 48 00 28 a5 bl ffc0b1cc <_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 ) {
ffc0892c: 80 01 00 08 lwz r0,8(r1)
ffc08930: 7c 7f 1b 78 mr r31,r3
ffc08934: 2f 80 00 00 cmpwi cr7,r0,0
ffc08938: 40 9e 01 14 bne- cr7,ffc08a4c <timer_settime+0x1f0>
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 ) {
ffc0893c: 80 01 00 1c lwz r0,28(r1)
ffc08940: 2f 80 00 00 cmpwi cr7,r0,0
ffc08944: 40 9e 00 6c bne- cr7,ffc089b0 <timer_settime+0x154>
ffc08948: 80 01 00 20 lwz r0,32(r1)
ffc0894c: 2f 80 00 00 cmpwi cr7,r0,0
ffc08950: 40 be 00 60 bne+ cr7,ffc089b0 <timer_settime+0x154>
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
ffc08954: 38 63 00 10 addi r3,r3,16
ffc08958: 48 00 4b 05 bl ffc0d45c <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
ffc0895c: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08960: 41 9e 00 24 beq- cr7,ffc08984 <timer_settime+0x128>
*ovalue = ptimer->timer_data;
ffc08964: 81 5f 00 54 lwz r10,84(r31)
ffc08968: 81 3f 00 58 lwz r9,88(r31)
ffc0896c: 80 1f 00 5c lwz r0,92(r31)
ffc08970: 81 7f 00 60 lwz r11,96(r31)
ffc08974: 91 5e 00 00 stw r10,0(r30)
ffc08978: 91 7e 00 0c stw r11,12(r30)
ffc0897c: 91 3e 00 04 stw r9,4(r30)
ffc08980: 90 1e 00 08 stw r0,8(r30)
/* The new data are set */
ptimer->timer_data = normalize;
ffc08984: 81 41 00 14 lwz r10,20(r1)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
ffc08988: 39 00 00 04 li r8,4
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
ffc0898c: 81 61 00 18 lwz r11,24(r1)
ffc08990: 81 21 00 1c lwz r9,28(r1)
ffc08994: 80 01 00 20 lwz r0,32(r1)
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
ffc08998: 99 1f 00 3c stb r8,60(r31)
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
ffc0899c: 91 5f 00 54 stw r10,84(r31)
ffc089a0: 91 7f 00 58 stw r11,88(r31)
ffc089a4: 91 3f 00 5c stw r9,92(r31)
ffc089a8: 90 1f 00 60 stw r0,96(r31)
ffc089ac: 48 00 00 94 b ffc08a40 <timer_settime+0x1e4>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
ffc089b0: 7f a3 eb 78 mr r3,r29
ffc089b4: 48 00 44 51 bl ffc0ce04 <_Timespec_To_ticks>
ffc089b8: 90 7f 00 64 stw r3,100(r31)
initial_period = _Timespec_To_ticks( &normalize.it_value );
ffc089bc: 38 61 00 1c addi r3,r1,28
ffc089c0: 48 00 44 45 bl ffc0ce04 <_Timespec_To_ticks>
activated = _POSIX_Timer_Insert_helper(
ffc089c4: 80 bf 00 08 lwz r5,8(r31)
ffc089c8: 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 );
ffc089cc: 7c 64 1b 78 mr r4,r3
activated = _POSIX_Timer_Insert_helper(
ffc089d0: 38 c6 8a 80 addi r6,r6,-30080
ffc089d4: 38 7f 00 10 addi r3,r31,16
ffc089d8: 7f e7 fb 78 mr r7,r31
ffc089dc: 48 00 7f 65 bl ffc10940 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
ffc089e0: 2f 83 00 00 cmpwi cr7,r3,0
ffc089e4: 41 9e 00 5c beq- cr7,ffc08a40 <timer_settime+0x1e4>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
ffc089e8: 2f 9e 00 00 cmpwi cr7,r30,0
ffc089ec: 41 9e 00 24 beq- cr7,ffc08a10 <timer_settime+0x1b4>
*ovalue = ptimer->timer_data;
ffc089f0: 81 5f 00 54 lwz r10,84(r31)
ffc089f4: 81 3f 00 58 lwz r9,88(r31)
ffc089f8: 80 1f 00 5c lwz r0,92(r31)
ffc089fc: 81 7f 00 60 lwz r11,96(r31)
ffc08a00: 91 5e 00 00 stw r10,0(r30)
ffc08a04: 91 7e 00 0c stw r11,12(r30)
ffc08a08: 91 3e 00 04 stw r9,4(r30)
ffc08a0c: 90 1e 00 08 stw r0,8(r30)
ptimer->timer_data = normalize;
ffc08a10: 80 01 00 20 lwz r0,32(r1)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
ffc08a14: 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;
ffc08a18: 81 61 00 18 lwz r11,24(r1)
ffc08a1c: 81 21 00 1c lwz r9,28(r1)
ffc08a20: 81 41 00 14 lwz r10,20(r1)
ffc08a24: 90 1f 00 60 stw r0,96(r31)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
ffc08a28: 38 00 00 03 li r0,3
* 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;
ffc08a2c: 91 5f 00 54 stw r10,84(r31)
ffc08a30: 91 7f 00 58 stw r11,88(r31)
ffc08a34: 91 3f 00 5c stw r9,92(r31)
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
ffc08a38: 98 1f 00 3c stb r0,60(r31)
_TOD_Get( &ptimer->time );
ffc08a3c: 48 00 1c 45 bl ffc0a680 <_TOD_Get>
_Thread_Enable_dispatch();
ffc08a40: 48 00 32 9d bl ffc0bcdc <_Thread_Enable_dispatch>
ffc08a44: 38 60 00 00 li r3,0
return 0;
ffc08a48: 48 00 00 14 b ffc08a5c <timer_settime+0x200>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
ffc08a4c: 48 00 c1 0d bl ffc14b58 <__errno>
ffc08a50: 38 00 00 16 li r0,22
ffc08a54: 90 03 00 00 stw r0,0(r3)
ffc08a58: 38 60 ff ff li r3,-1
}
ffc08a5c: 80 01 00 44 lwz r0,68(r1)
ffc08a60: 83 61 00 2c lwz r27,44(r1)
ffc08a64: 7c 08 03 a6 mtlr r0
ffc08a68: 83 81 00 30 lwz r28,48(r1)
ffc08a6c: 83 a1 00 34 lwz r29,52(r1)
ffc08a70: 83 c1 00 38 lwz r30,56(r1)
ffc08a74: 83 e1 00 3c lwz r31,60(r1)
ffc08a78: 38 21 00 40 addi r1,r1,64
ffc08a7c: 4e 80 00 20 blr
ffc08570 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc08570: 94 21 ff d8 stwu r1,-40(r1)
ffc08574: 7c 08 02 a6 mflr r0
ffc08578: 93 a1 00 1c stw r29,28(r1)
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc0857c: 3f a0 00 00 lis r29,0
ffc08580: 3b bd 35 44 addi r29,r29,13636
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc08584: 90 01 00 2c stw r0,44(r1)
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc08588: 80 1d 00 1c lwz r0,28(r29)
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc0858c: 93 c1 00 20 stw r30,32(r1)
ffc08590: 7c 7e 1b 78 mr r30,r3
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc08594: 2f 80 00 00 cmpwi cr7,r0,0
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
ffc08598: 93 e1 00 24 stw r31,36(r1)
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
ffc0859c: 40 be 00 24 bne+ cr7,ffc085c0 <ualarm+0x50>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc085a0: 3d 20 ff c1 lis r9,-63
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc085a4: 90 1d 00 24 stw r0,36(r29)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc085a8: 39 29 86 88 addi r9,r9,-31096
the_watchdog->id = id;
the_watchdog->user_data = user_data;
ffc085ac: 3b e0 00 00 li r31,0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
ffc085b0: 91 3d 00 1c stw r9,28(r29)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
ffc085b4: 90 1d 00 08 stw r0,8(r29)
the_watchdog->routine = routine;
the_watchdog->id = id;
ffc085b8: 90 1d 00 20 stw r0,32(r29)
ffc085bc: 48 00 00 58 b ffc08614 <ualarm+0xa4>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
ffc085c0: 7f a3 eb 78 mr r3,r29
ffc085c4: 48 00 48 fd bl ffc0cec0 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
ffc085c8: 3b e0 00 00 li r31,0
ffc085cc: 38 63 ff fe addi r3,r3,-2
ffc085d0: 2b 83 00 01 cmplwi cr7,r3,1
ffc085d4: 41 bd 00 40 bgt+ cr7,ffc08614 <ualarm+0xa4> <== NEVER TAKEN
* 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);
ffc085d8: 81 3d 00 0c lwz r9,12(r29)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
ffc085dc: 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);
ffc085e0: 80 7d 00 14 lwz r3,20(r29)
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
ffc085e4: 80 1d 00 18 lwz r0,24(r29)
* 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);
ffc085e8: 7c 63 4a 14 add r3,r3,r9
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
ffc085ec: 7c 60 18 50 subf r3,r0,r3
ffc085f0: 48 00 41 2d bl ffc0c71c <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
remaining += tp.tv_nsec / 1000;
ffc085f4: 83 e1 00 0c lwz r31,12(r1)
ffc085f8: 38 00 03 e8 li r0,1000
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;
ffc085fc: 81 21 00 08 lwz r9,8(r1)
remaining += tp.tv_nsec / 1000;
ffc08600: 7c 1f 03 d6 divw r0,r31,r0
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;
ffc08604: 3f e0 00 0f lis r31,15
ffc08608: 63 ff 42 40 ori r31,r31,16960
ffc0860c: 7f ff 49 d6 mullw r31,r31,r9
remaining += tp.tv_nsec / 1000;
ffc08610: 7f e0 fa 14 add r31,r0,r31
/*
* 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 ) {
ffc08614: 2f 9e 00 00 cmpwi cr7,r30,0
ffc08618: 41 be 00 50 beq+ cr7,ffc08668 <ualarm+0xf8>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
ffc0861c: 3d 20 00 0f lis r9,15
ffc08620: 61 29 42 40 ori r9,r9,16960
ffc08624: 7c 1e 4b 96 divwu r0,r30,r9
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ffc08628: 7d 20 49 d6 mullw r9,r0,r9
* 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;
ffc0862c: 90 01 00 08 stw r0,8(r1)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
ffc08630: 3b a1 00 08 addi r29,r1,8
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ffc08634: 7f c9 f0 50 subf r30,r9,r30
ffc08638: 1f de 03 e8 mulli r30,r30,1000
ticks = _Timespec_To_ticks( &tp );
ffc0863c: 7f a3 eb 78 mr r3,r29
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ffc08640: 93 c1 00 0c stw r30,12(r1)
ticks = _Timespec_To_ticks( &tp );
ffc08644: 48 00 41 41 bl ffc0c784 <_Timespec_To_ticks>
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
ffc08648: 7f a3 eb 78 mr r3,r29
ffc0864c: 48 00 41 39 bl ffc0c784 <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
ffc08650: 3c 80 00 00 lis r4,0
ffc08654: 38 84 35 44 addi r4,r4,13636
ffc08658: 90 64 00 0c stw r3,12(r4)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
ffc0865c: 3c 60 00 00 lis r3,0
ffc08660: 38 63 2d a8 addi r3,r3,11688
ffc08664: 48 00 47 05 bl ffc0cd68 <_Watchdog_Insert>
}
return remaining;
}
ffc08668: 80 01 00 2c lwz r0,44(r1)
ffc0866c: 7f e3 fb 78 mr r3,r31
ffc08670: 83 a1 00 1c lwz r29,28(r1)
ffc08674: 7c 08 03 a6 mtlr r0
ffc08678: 83 c1 00 20 lwz r30,32(r1)
ffc0867c: 83 e1 00 24 lwz r31,36(r1)
ffc08680: 38 21 00 28 addi r1,r1,40
ffc08684: 4e 80 00 20 blr