=============================================================================== ffc0b0c8 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0b0c8: 7c 2b 0b 78 mr r11,r1 ffc0b0cc: 7c 08 02 a6 mflr r0 ffc0b0d0: 94 21 ff f0 stwu r1,-16(r1) ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0b0d4: 3d 20 00 00 lis r9,0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { ffc0b0d8: 90 01 00 14 stw r0,20(r1) ffc0b0dc: 48 00 ce 19 bl ffc17ef4 <_savegpr_31> ffc0b0e0: 7c 7f 1b 78 mr r31,r3 ISR_Level level; Thread_Control *executing = _Thread_Executing; ffc0b0e4: 81 69 31 30 lwz r11,12592(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b0e8: 7c 00 00 a6 mfmsr r0 ffc0b0ec: 7d 30 42 a6 mfsprg r9,0 ffc0b0f0: 7c 09 48 78 andc r9,r0,r9 ffc0b0f4: 7d 20 01 24 mtmsr r9 * 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){ ffc0b0f8: 81 23 00 44 lwz r9,68(r3) ffc0b0fc: 2f 89 00 00 cmpwi cr7,r9,0 ffc0b100: 40 be 00 14 bne+ cr7,ffc0b114 <_CORE_RWLock_Release+0x4c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b104: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; ffc0b108: 38 00 00 02 li r0,2 ffc0b10c: 90 0b 00 34 stw r0,52(r11) return CORE_RWLOCK_SUCCESSFUL; ffc0b110: 48 00 00 a8 b ffc0b1b8 <_CORE_RWLock_Release+0xf0> } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { ffc0b114: 2f 89 00 01 cmpwi cr7,r9,1 ffc0b118: 40 9e 00 20 bne- cr7,ffc0b138 <_CORE_RWLock_Release+0x70> the_rwlock->number_of_readers -= 1; ffc0b11c: 81 23 00 48 lwz r9,72(r3) ffc0b120: 39 29 ff ff addi r9,r9,-1 if ( the_rwlock->number_of_readers != 0 ) { ffc0b124: 2f 89 00 00 cmpwi cr7,r9,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; ffc0b128: 91 23 00 48 stw r9,72(r3) if ( the_rwlock->number_of_readers != 0 ) { ffc0b12c: 41 be 00 0c beq+ cr7,ffc0b138 <_CORE_RWLock_Release+0x70> ffc0b130: 7c 00 01 24 mtmsr r0 /* must be unlocked again */ _ISR_Enable( level ); return CORE_RWLOCK_SUCCESSFUL; ffc0b134: 48 00 00 84 b ffc0b1b8 <_CORE_RWLock_Release+0xf0> } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; ffc0b138: 39 20 00 00 li r9,0 ffc0b13c: 91 2b 00 34 stw r9,52(r11) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; ffc0b140: 91 3f 00 44 stw r9,68(r31) ffc0b144: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); ffc0b148: 7f e3 fb 78 mr r3,r31 ffc0b14c: 48 00 1d 05 bl ffc0ce50 <_Thread_queue_Dequeue> if ( next ) { ffc0b150: 2c 03 00 00 cmpwi r3,0 ffc0b154: 41 82 00 64 beq- ffc0b1b8 <_CORE_RWLock_Release+0xf0> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { ffc0b158: 80 03 00 30 lwz r0,48(r3) ffc0b15c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b160: 40 be 00 10 bne+ cr7,ffc0b170 <_CORE_RWLock_Release+0xa8> the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; ffc0b164: 38 00 00 02 li r0,2 ffc0b168: 90 1f 00 44 stw r0,68(r31) return CORE_RWLOCK_SUCCESSFUL; ffc0b16c: 48 00 00 4c b ffc0b1b8 <_CORE_RWLock_Release+0xf0> } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; ffc0b170: 81 3f 00 48 lwz r9,72(r31) ffc0b174: 38 09 00 01 addi r0,r9,1 ffc0b178: 90 1f 00 48 stw r0,72(r31) the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; ffc0b17c: 38 00 00 01 li r0,1 ffc0b180: 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 ); ffc0b184: 7f e3 fb 78 mr r3,r31 ffc0b188: 48 00 22 31 bl ffc0d3b8 <_Thread_queue_First> if ( !next || ffc0b18c: 7c 64 1b 79 mr. r4,r3 ffc0b190: 41 82 00 28 beq- ffc0b1b8 <_CORE_RWLock_Release+0xf0> ffc0b194: 80 04 00 30 lwz r0,48(r4) ffc0b198: 2f 80 00 01 cmpwi cr7,r0,1 ffc0b19c: 41 9e 00 1c beq- cr7,ffc0b1b8 <_CORE_RWLock_Release+0xf0><== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; ffc0b1a0: 81 3f 00 48 lwz r9,72(r31) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0b1a4: 7f e3 fb 78 mr r3,r31 while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; ffc0b1a8: 38 09 00 01 addi r0,r9,1 ffc0b1ac: 90 1f 00 48 stw r0,72(r31) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); ffc0b1b0: 48 00 20 99 bl ffc0d248 <_Thread_queue_Extract> } ffc0b1b4: 4b ff ff d0 b ffc0b184 <_CORE_RWLock_Release+0xbc> } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } ffc0b1b8: 39 61 00 10 addi r11,r1,16 ffc0b1bc: 38 60 00 00 li r3,0 ffc0b1c0: 4b ff 6c 7c b ffc01e3c <_restgpr_31_x> =============================================================================== ffc0b1c4 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0b1c4: 94 21 ff e8 stwu r1,-24(r1) ffc0b1c8: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0b1cc: 38 81 00 08 addi r4,r1,8 void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { ffc0b1d0: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0b1d4: 48 00 18 e1 bl ffc0cab4 <_Thread_Get> switch ( location ) { ffc0b1d8: 80 01 00 08 lwz r0,8(r1) ffc0b1dc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b1e0: 40 9e 00 18 bne- cr7,ffc0b1f8 <_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 ); ffc0b1e4: 48 00 22 f5 bl ffc0d4d8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0b1e8: 3d 20 00 00 lis r9,0 ffc0b1ec: 81 69 27 f4 lwz r11,10228(r9) ffc0b1f0: 38 0b ff ff addi r0,r11,-1 ffc0b1f4: 90 09 27 f4 stw r0,10228(r9) _Thread_Unnest_dispatch(); break; } } ffc0b1f8: 80 01 00 1c lwz r0,28(r1) ffc0b1fc: 38 21 00 18 addi r1,r1,24 ffc0b200: 7c 08 03 a6 mtlr r0 ffc0b204: 4e 80 00 20 blr =============================================================================== ffc19b5c <_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 ) { ffc19b5c: 94 21 ff e0 stwu r1,-32(r1) ffc19b60: 7c 08 02 a6 mflr r0 ffc19b64: 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 ) { ffc19b68: 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 ) { ffc19b6c: bf 41 00 08 stmw r26,8(r1) ffc19b70: 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 ) { ffc19b74: 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 ) { ffc19b78: 7c 9d 23 78 mr r29,r4 ffc19b7c: 7c be 2b 78 mr r30,r5 ffc19b80: 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 ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; ffc19b84: 38 60 00 01 li r3,1 { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { ffc19b88: 41 9d 00 54 bgt- cr7,ffc19bdc <_CORE_message_queue_Broadcast+0x80><== 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 ) { ffc19b8c: 80 1f 00 48 lwz r0,72(r31) ffc19b90: 3b 80 00 00 li r28,0 ffc19b94: 2f 80 00 00 cmpwi cr7,r0,0 ffc19b98: 41 be 00 30 beq+ cr7,ffc19bc8 <_CORE_message_queue_Broadcast+0x6c> *count = 0; ffc19b9c: 38 00 00 00 li r0,0 ffc19ba0: 90 08 00 00 stw r0,0(r8) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc19ba4: 38 60 00 00 li r3,0 ffc19ba8: 48 00 00 34 b ffc19bdc <_CORE_message_queue_Broadcast+0x80> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc19bac: 80 7a 00 2c lwz r3,44(r26) ffc19bb0: 7f a4 eb 78 mr r4,r29 ffc19bb4: 7f c5 f3 78 mr r5,r30 ffc19bb8: 48 00 99 55 bl ffc2350c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc19bbc: 81 3a 00 28 lwz r9,40(r26) */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; ffc19bc0: 3b 9c 00 01 addi r28,r28,1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; ffc19bc4: 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 = ffc19bc8: 7f e3 fb 78 mr r3,r31 ffc19bcc: 48 00 2e 65 bl ffc1ca30 <_Thread_queue_Dequeue> ffc19bd0: 7c 7a 1b 79 mr. r26,r3 ffc19bd4: 40 82 ff d8 bne+ ffc19bac <_CORE_message_queue_Broadcast+0x50> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; ffc19bd8: 93 9b 00 00 stw r28,0(r27) return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } ffc19bdc: 39 61 00 20 addi r11,r1,32 ffc19be0: 4b ff 46 c8 b ffc0e2a8 <_restgpr_26_x> =============================================================================== ffc11958 <_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 ) { ffc11958: 94 21 ff e0 stwu r1,-32(r1) ffc1195c: 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)) { ffc11960: 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 ) { ffc11964: 90 01 00 24 stw r0,36(r1) 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; ffc11968: 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 ) { ffc1196c: bf 81 00 10 stmw r28,16(r1) ffc11970: 7c 7f 1b 78 mr r31,r3 ffc11974: 7c 9d 23 78 mr r29,r4 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; ffc11978: 90 03 00 48 stw r0,72(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; ffc1197c: 90 03 00 60 stw r0,96(r3) the_message_queue->notify_argument = the_argument; ffc11980: 90 03 00 64 stw r0,100(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc11984: 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; ffc11988: 90 a3 00 44 stw r5,68(r3) the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; ffc1198c: 90 c3 00 4c stw r6,76(r3) /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { ffc11990: 41 82 00 18 beq- ffc119a8 <_CORE_message_queue_Initialize+0x50> allocated_message_size += sizeof(uint32_t); ffc11994: 39 26 00 04 addi r9,r6,4 allocated_message_size &= ~(sizeof(uint32_t) - 1); ffc11998: 55 29 00 3a rlwinm r9,r9,0,0,29 } if (allocated_message_size < maximum_message_size) ffc1199c: 7f 89 30 40 cmplw cr7,r9,r6 return false; ffc119a0: 3b c0 00 00 li r30,0 if (allocated_message_size & (sizeof(uint32_t) - 1)) { allocated_message_size += sizeof(uint32_t); allocated_message_size &= ~(sizeof(uint32_t) - 1); } if (allocated_message_size < maximum_message_size) ffc119a4: 41 bc 00 78 blt+ cr7,ffc11a1c <_CORE_message_queue_Initialize+0xc4><== 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)); ffc119a8: 3b 89 00 14 addi r28,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 * ffc119ac: 7c 7c 29 d6 mullw r3,r28,r5 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; ffc119b0: 3b c0 00 00 li r30,0 * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) ffc119b4: 7f 83 48 40 cmplw cr7,r3,r9 ffc119b8: 41 bc 00 64 blt+ cr7,ffc11a1c <_CORE_message_queue_Initialize+0xc4><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc119bc: 90 a1 00 08 stw r5,8(r1) ffc119c0: 48 00 33 85 bl ffc14d44 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) ffc119c4: 2f 83 00 00 cmpwi cr7,r3,0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); ffc119c8: 7c 64 1b 78 mr r4,r3 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) ffc119cc: 90 7f 00 5c stw r3,92(r31) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) ffc119d0: 80 a1 00 08 lwz r5,8(r1) ffc119d4: 41 9e 00 48 beq- cr7,ffc11a1c <_CORE_message_queue_Initialize+0xc4> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( ffc119d8: 38 7f 00 68 addi r3,r31,104 ffc119dc: 7f 86 e3 78 mr r6,r28 ffc119e0: 48 00 5a 31 bl ffc17410 <_Chain_Initialize> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc119e4: 38 1f 00 54 addi r0,r31,84 head->next = tail; ffc119e8: 90 1f 00 50 stw r0,80(r31) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); ffc119ec: 38 1f 00 50 addi r0,r31,80 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc119f0: 7f e3 fb 78 mr r3,r31 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc119f4: 93 df 00 54 stw r30,84(r31) ffc119f8: 38 a0 00 80 li r5,128 ffc119fc: 38 c0 00 06 li r6,6 tail->previous = head; ffc11a00: 90 1f 00 58 stw r0,88(r31) THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; ffc11a04: 3b c0 00 01 li r30,1 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( ffc11a08: 80 9d 00 00 lwz r4,0(r29) ffc11a0c: 68 84 00 01 xori r4,r4,1 ffc11a10: 7c 84 00 34 cntlzw r4,r4 ffc11a14: 54 84 d9 7e rlwinm r4,r4,27,5,31 ffc11a18: 48 00 27 1d bl ffc14134 <_Thread_queue_Initialize> STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } ffc11a1c: 39 61 00 20 addi r11,r1,32 ffc11a20: 7f c3 f3 78 mr r3,r30 ffc11a24: 4b ff 3f b4 b ffc059d8 <_restgpr_28_x> =============================================================================== ffc11a28 <_CORE_message_queue_Seize>: void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc11a28: 94 21 ff e8 stwu r1,-24(r1) ffc11a2c: 7c 08 02 a6 mflr r0 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc11a30: 3d 60 00 00 lis r11,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc11a34: 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; ffc11a38: 39 40 00 00 li r10,0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { ffc11a3c: 7c 80 23 78 mr r0,r4 ffc11a40: bf a1 00 0c stmw r29,12(r1) ffc11a44: 7c a9 2b 78 mr r9,r5 ffc11a48: 7c 7f 1b 78 mr r31,r3 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; ffc11a4c: 81 6b 32 d0 lwz r11,13008(r11) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; ffc11a50: 91 4b 00 34 stw r10,52(r11) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc11a54: 7d 40 00 a6 mfmsr r10 ffc11a58: 7c b0 42 a6 mfsprg r5,0 ffc11a5c: 7d 45 28 78 andc r5,r10,r5 ffc11a60: 7c a0 01 24 mtmsr r5 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 ); } ffc11a64: 83 c3 00 50 lwz r30,80(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc11a68: 38 a3 00 54 addi r5,r3,84 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) ffc11a6c: 7f 9e 28 00 cmpw cr7,r30,r5 ffc11a70: 41 9e 00 a4 beq- cr7,ffc11b14 <_CORE_message_queue_Seize+0xec> 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 ) { ffc11a74: 2f 9e 00 00 cmpwi cr7,r30,0 Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc11a78: 80 9e 00 00 lwz r4,0(r30) head->next = new_first; ffc11a7c: 7c 65 1b 78 mr r5,r3 ffc11a80: 94 85 00 50 stwu r4,80(r5) new_first->previous = head; ffc11a84: 90 a4 00 04 stw r5,4(r4) ffc11a88: 41 9e 00 8c beq- cr7,ffc11b14 <_CORE_message_queue_Seize+0xec><== NEVER TAKEN the_message_queue->number_of_pending_messages -= 1; ffc11a8c: 81 63 00 48 lwz r11,72(r3) ffc11a90: 38 0b ff ff addi r0,r11,-1 ffc11a94: 90 03 00 48 stw r0,72(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc11a98: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); *size_p = the_message->Contents.size; ffc11a9c: 80 be 00 0c lwz r5,12(r30) _Thread_Executing->Wait.count = ffc11aa0: 3d 60 00 00 lis r11,0 ffc11aa4: 81 6b 32 d0 lwz r11,13008(r11) _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, ffc11aa8: 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; ffc11aac: 90 a6 00 00 stw r5,0(r6) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc11ab0: 7d 23 4b 78 mr r3,r9 ffc11ab4: 7f a4 eb 78 mr r4,r29 _Thread_Executing->Wait.count = ffc11ab8: 80 1e 00 08 lwz r0,8(r30) ffc11abc: 90 0b 00 24 stw r0,36(r11) ffc11ac0: 48 00 8c e5 bl ffc1a7a4 * 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 ); ffc11ac4: 7f e3 fb 78 mr r3,r31 ffc11ac8: 48 00 21 f9 bl ffc13cc0 <_Thread_queue_Dequeue> if ( !the_thread ) { ffc11acc: 7c 69 1b 79 mr. r9,r3 ffc11ad0: 40 a2 00 14 bne+ ffc11ae4 <_CORE_message_queue_Seize+0xbc> 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 ); ffc11ad4: 38 7f 00 68 addi r3,r31,104 ffc11ad8: 7f c4 f3 78 mr r4,r30 ffc11adc: 4b ff fd b9 bl ffc11894 <_Chain_Append> _CORE_message_queue_Free_message_buffer( the_message_queue, the_message ); return; ffc11ae0: 48 00 00 7c b ffc11b5c <_CORE_message_queue_Seize+0x134> CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; ffc11ae4: 80 09 00 24 lwz r0,36(r9) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc11ae8: 7f a3 eb 78 mr r3,r29 */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; ffc11aec: 80 a9 00 30 lwz r5,48(r9) ffc11af0: 80 89 00 2c lwz r4,44(r9) ffc11af4: 90 be 00 0c stw r5,12(r30) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; ffc11af8: 90 1e 00 08 stw r0,8(r30) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); ffc11afc: 48 00 8c a9 bl ffc1a7a4 the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( ffc11b00: 80 be 00 08 lwz r5,8(r30) ffc11b04: 7f e3 fb 78 mr r3,r31 ffc11b08: 7f c4 f3 78 mr r4,r30 ffc11b0c: 48 00 59 55 bl ffc17460 <_CORE_message_queue_Insert_message> the_message_queue, the_message, _CORE_message_queue_Get_message_priority( the_message ) ); return; ffc11b10: 48 00 00 4c b ffc11b5c <_CORE_message_queue_Seize+0x134> } #endif } if ( !wait ) { ffc11b14: 2f 87 00 00 cmpwi cr7,r7,0 ffc11b18: 40 9e 00 14 bne- cr7,ffc11b2c <_CORE_message_queue_Seize+0x104> ffc11b1c: 7d 40 01 24 mtmsr r10 _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; ffc11b20: 38 00 00 04 li r0,4 ffc11b24: 90 0b 00 34 stw r0,52(r11) return; ffc11b28: 48 00 00 34 b ffc11b5c <_CORE_message_queue_Seize+0x134> 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; ffc11b2c: 38 e0 00 01 li r7,1 ffc11b30: 90 ff 00 30 stw r7,48(r31) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; ffc11b34: 93 eb 00 44 stw r31,68(r11) executing->Wait.id = id; ffc11b38: 90 0b 00 20 stw r0,32(r11) executing->Wait.return_argument_second.mutable_object = buffer; ffc11b3c: 91 2b 00 2c stw r9,44(r11) executing->Wait.return_argument = size_p; ffc11b40: 90 cb 00 28 stw r6,40(r11) ffc11b44: 7d 40 01 24 mtmsr r10 /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); ffc11b48: 3c a0 ff c1 lis r5,-63 ffc11b4c: 7f e3 fb 78 mr r3,r31 ffc11b50: 7d 04 43 78 mr r4,r8 ffc11b54: 38 a5 42 10 addi r5,r5,16912 ffc11b58: 48 00 23 01 bl ffc13e58 <_Thread_queue_Enqueue_with_handler> } ffc11b5c: 39 61 00 18 addi r11,r1,24 ffc11b60: 4b ff 3e 7c b ffc059dc <_restgpr_29_x> =============================================================================== ffc08554 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08554: 94 21 ff e0 stwu r1,-32(r1) ffc08558: 7c 08 02 a6 mflr r0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc0855c: 3d 20 00 00 lis r9,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08560: 90 01 00 24 stw r0,36(r1) _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08564: 80 09 27 a8 lwz r0,10152(r9) Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08568: bf 81 00 10 stmw r28,16(r1) ffc0856c: 7c 7f 1b 78 mr r31,r3 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08570: 2f 80 00 00 cmpwi cr7,r0,0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { ffc08574: 7c 9e 23 78 mr r30,r4 ffc08578: 90 e1 00 08 stw r7,8(r1) ffc0857c: 7c bd 2b 78 mr r29,r5 ffc08580: 7c dc 33 78 mr r28,r6 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); ffc08584: 41 9e 00 2c beq- cr7,ffc085b0 <_CORE_mutex_Seize+0x5c> ffc08588: 2f 85 00 00 cmpwi cr7,r5,0 ffc0858c: 41 9e 00 24 beq- cr7,ffc085b0 <_CORE_mutex_Seize+0x5c> <== NEVER TAKEN ffc08590: 3d 20 00 00 lis r9,0 ffc08594: 80 09 27 ec lwz r0,10220(r9) ffc08598: 2b 80 00 01 cmplwi cr7,r0,1 ffc0859c: 40 bd 00 14 ble+ cr7,ffc085b0 <_CORE_mutex_Seize+0x5c> ffc085a0: 38 60 00 00 li r3,0 ffc085a4: 38 80 00 00 li r4,0 ffc085a8: 38 a0 00 12 li r5,18 ffc085ac: 48 00 07 a1 bl ffc08d4c <_Internal_error_Occurred> ffc085b0: 7f e3 fb 78 mr r3,r31 ffc085b4: 38 81 00 08 addi r4,r1,8 ffc085b8: 48 00 55 1d bl ffc0dad4 <_CORE_mutex_Seize_interrupt_trylock> ffc085bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc085c0: 41 9e 00 64 beq- cr7,ffc08624 <_CORE_mutex_Seize+0xd0> ffc085c4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc085c8: 3d 20 00 00 lis r9,0 ffc085cc: 39 29 31 04 addi r9,r9,12548 ffc085d0: 40 9e 00 1c bne- cr7,ffc085ec <_CORE_mutex_Seize+0x98> ffc085d4: 80 01 00 08 lwz r0,8(r1) ffc085d8: 7c 00 01 24 mtmsr r0 ffc085dc: 81 29 00 0c lwz r9,12(r9) ffc085e0: 38 00 00 01 li r0,1 ffc085e4: 90 09 00 34 stw r0,52(r9) ffc085e8: 48 00 00 3c b ffc08624 <_CORE_mutex_Seize+0xd0> ffc085ec: 81 29 00 0c lwz r9,12(r9) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc085f0: 38 00 00 01 li r0,1 ffc085f4: 90 1f 00 30 stw r0,48(r31) ffc085f8: 93 e9 00 44 stw r31,68(r9) ffc085fc: 93 c9 00 20 stw r30,32(r9) ffc08600: 3d 20 00 00 lis r9,0 ffc08604: 81 69 27 a8 lwz r11,10152(r9) ffc08608: 38 0b 00 01 addi r0,r11,1 ffc0860c: 90 09 27 a8 stw r0,10152(r9) ffc08610: 80 01 00 08 lwz r0,8(r1) ffc08614: 7c 00 01 24 mtmsr r0 ffc08618: 7f e3 fb 78 mr r3,r31 ffc0861c: 7f 84 e3 78 mr r4,r28 ffc08620: 4b ff fe c1 bl ffc084e0 <_CORE_mutex_Seize_interrupt_blocking> } ffc08624: 39 61 00 20 addi r11,r1,32 ffc08628: 48 00 cb 44 b ffc1516c <_restgpr_28_x> =============================================================================== ffc087cc <_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 ) { ffc087cc: 7c 08 02 a6 mflr r0 ffc087d0: 7c 2b 0b 78 mr r11,r1 ffc087d4: 94 21 ff f0 stwu r1,-16(r1) ffc087d8: 90 01 00 14 stw r0,20(r1) ffc087dc: 48 00 c9 51 bl ffc1512c <_savegpr_31> ffc087e0: 7c 7f 1b 78 mr r31,r3 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc087e4: 48 00 1b 8d bl ffc0a370 <_Thread_queue_Dequeue> ffc087e8: 2f 83 00 00 cmpwi cr7,r3,0 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc087ec: 38 00 00 00 li r0,0 if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { ffc087f0: 40 be 00 38 bne+ cr7,ffc08828 <_CORE_semaphore_Surrender+0x5c> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc087f4: 7d 60 00 a6 mfmsr r11 ffc087f8: 7c 10 42 a6 mfsprg r0,0 ffc087fc: 7d 60 00 78 andc r0,r11,r0 ffc08800: 7c 00 01 24 mtmsr r0 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc08804: 81 3f 00 48 lwz r9,72(r31) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; ffc08808: 38 00 00 04 li r0,4 (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) ffc0880c: 81 5f 00 40 lwz r10,64(r31) ffc08810: 7f 89 50 40 cmplw cr7,r9,r10 ffc08814: 40 9c 00 10 bge- cr7,ffc08824 <_CORE_semaphore_Surrender+0x58><== NEVER TAKEN the_semaphore->count += 1; ffc08818: 39 29 00 01 addi r9,r9,1 ffc0881c: 91 3f 00 48 stw r9,72(r31) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; ffc08820: 38 00 00 00 li r0,0 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08824: 7d 60 01 24 mtmsr r11 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } ffc08828: 39 61 00 10 addi r11,r1,16 ffc0882c: 7c 03 03 78 mr r3,r0 ffc08830: 48 00 c9 48 b ffc15178 <_restgpr_31_x> =============================================================================== ffc073c4 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { ffc073c4: 7c 2b 0b 78 mr r11,r1 ffc073c8: 7c 08 02 a6 mflr r0 ffc073cc: 94 21 ff f0 stwu r1,-16(r1) ffc073d0: 90 01 00 14 stw r0,20(r1) ffc073d4: 48 00 dd 59 bl ffc1512c <_savegpr_31> ffc073d8: 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 ]; ffc073dc: 81 03 01 30 lwz r8,304(r3) option_set = (rtems_option) the_thread->Wait.option; ffc073e0: 80 e3 00 30 lwz r7,48(r3) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc073e4: 7c 00 00 a6 mfmsr r0 ffc073e8: 7d 30 42 a6 mfsprg r9,0 ffc073ec: 7c 09 48 78 andc r9,r0,r9 ffc073f0: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); pending_events = api->pending_events; ffc073f4: 81 68 00 00 lwz r11,0(r8) event_condition = (rtems_event_set) the_thread->Wait.count; ffc073f8: 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 ) ) { ffc073fc: 7d 49 58 39 and. r9,r10,r11 ffc07400: 40 a2 00 08 bne+ ffc07408 <_Event_Surrender+0x44> _ISR_Enable( level ); ffc07404: 48 00 00 f4 b ffc074f8 <_Event_Surrender+0x134> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && ffc07408: 3c c0 00 00 lis r6,0 ffc0740c: 38 c6 31 04 addi r6,r6,12548 ffc07410: 80 a6 00 08 lwz r5,8(r6) ffc07414: 2f 85 00 00 cmpwi cr7,r5,0 ffc07418: 41 9e 00 64 beq- cr7,ffc0747c <_Event_Surrender+0xb8> ffc0741c: 80 c6 00 0c lwz r6,12(r6) ffc07420: 7f 83 30 00 cmpw cr7,r3,r6 ffc07424: 40 be 00 58 bne+ cr7,ffc0747c <_Event_Surrender+0xb8> _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc07428: 3c c0 00 00 lis r6,0 ffc0742c: 80 a6 27 f8 lwz r5,10232(r6) /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ffc07430: 2f 85 00 02 cmpwi cr7,r5,2 ffc07434: 41 9e 00 10 beq- cr7,ffc07444 <_Event_Surrender+0x80> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { ffc07438: 80 c6 27 f8 lwz r6,10232(r6) * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || ffc0743c: 2f 86 00 01 cmpwi cr7,r6,1 ffc07440: 40 be 00 3c bne+ cr7,ffc0747c <_Event_Surrender+0xb8> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { ffc07444: 7f 89 50 00 cmpw cr7,r9,r10 ffc07448: 41 9e 00 0c beq- cr7,ffc07454 <_Event_Surrender+0x90> ffc0744c: 70 e5 00 02 andi. r5,r7,2 ffc07450: 41 82 00 28 beq- ffc07478 <_Event_Surrender+0xb4> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); ffc07454: 7d 6b 48 78 andc r11,r11,r9 api->pending_events = _Event_sets_Clear( pending_events,seized_events ); ffc07458: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc0745c: 39 60 00 00 li r11,0 ffc07460: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc07464: 81 7f 00 28 lwz r11,40(r31) ffc07468: 91 2b 00 00 stw r9,0(r11) _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; ffc0746c: 39 60 00 03 li r11,3 ffc07470: 3d 20 00 00 lis r9,0 ffc07474: 91 69 27 f8 stw r11,10232(r9) } _ISR_Enable( level ); ffc07478: 48 00 00 80 b ffc074f8 <_Event_Surrender+0x134> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); ffc0747c: 80 df 00 10 lwz r6,16(r31) } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { ffc07480: 70 c5 01 00 andi. r5,r6,256 ffc07484: 41 82 00 74 beq- ffc074f8 <_Event_Surrender+0x134> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { ffc07488: 7f 89 50 00 cmpw cr7,r9,r10 ffc0748c: 41 9e 00 0c beq- cr7,ffc07498 <_Event_Surrender+0xd4> ffc07490: 70 ea 00 02 andi. r10,r7,2 ffc07494: 41 82 00 64 beq- ffc074f8 <_Event_Surrender+0x134> <== NEVER TAKEN ffc07498: 7d 6b 48 78 andc r11,r11,r9 api->pending_events = _Event_sets_Clear( pending_events, seized_events ); ffc0749c: 91 68 00 00 stw r11,0(r8) the_thread->Wait.count = 0; ffc074a0: 39 60 00 00 li r11,0 ffc074a4: 91 7f 00 24 stw r11,36(r31) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; ffc074a8: 81 7f 00 28 lwz r11,40(r31) ffc074ac: 91 2b 00 00 stw r9,0(r11) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc074b0: 7d 20 00 a6 mfmsr r9 ffc074b4: 7c 00 01 24 mtmsr r0 ffc074b8: 7d 20 01 24 mtmsr r9 _ISR_Flash( level ); if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { ffc074bc: 81 3f 00 50 lwz r9,80(r31) ffc074c0: 2f 89 00 02 cmpwi cr7,r9,2 ffc074c4: 41 9e 00 0c beq- cr7,ffc074d0 <_Event_Surrender+0x10c> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc074c8: 7c 00 01 24 mtmsr r0 ffc074cc: 48 00 00 18 b ffc074e4 <_Event_Surrender+0x120> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; ffc074d0: 39 20 00 03 li r9,3 ffc074d4: 91 3f 00 50 stw r9,80(r31) ffc074d8: 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 ); ffc074dc: 38 7f 00 48 addi r3,r31,72 ffc074e0: 48 00 3d 45 bl ffc0b224 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc074e4: 3c 80 10 03 lis r4,4099 ffc074e8: 7f e3 fb 78 mr r3,r31 ffc074ec: 60 84 ff f8 ori r4,r4,65528 ffc074f0: 48 00 26 e9 bl ffc09bd8 <_Thread_Clear_state> ffc074f4: 48 00 00 08 b ffc074fc <_Event_Surrender+0x138> ffc074f8: 7c 00 01 24 mtmsr r0 } return; } } _ISR_Enable( level ); } ffc074fc: 39 61 00 10 addi r11,r1,16 ffc07500: 48 00 dc 78 b ffc15178 <_restgpr_31_x> =============================================================================== ffc07504 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { ffc07504: 94 21 ff e8 stwu r1,-24(r1) ffc07508: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc0750c: 38 81 00 08 addi r4,r1,8 void _Event_Timeout( Objects_Id id, void *ignored ) { ffc07510: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); ffc07514: 48 00 2a c1 bl ffc09fd4 <_Thread_Get> switch ( location ) { ffc07518: 80 01 00 08 lwz r0,8(r1) ffc0751c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07520: 40 9e 00 68 bne- cr7,ffc07588 <_Event_Timeout+0x84> <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc07524: 7d 60 00 a6 mfmsr r11 ffc07528: 7d 30 42 a6 mfsprg r9,0 ffc0752c: 7d 69 48 78 andc r9,r11,r9 ffc07530: 7d 20 01 24 mtmsr r9 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc07534: 3d 20 00 00 lis r9,0 _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; ffc07538: 90 03 00 24 stw r0,36(r3) if ( _Thread_Is_executing( the_thread ) ) { ffc0753c: 80 09 31 10 lwz r0,12560(r9) ffc07540: 7f 83 00 00 cmpw cr7,r3,r0 ffc07544: 40 be 00 1c bne+ cr7,ffc07560 <_Event_Timeout+0x5c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) ffc07548: 3d 20 00 00 lis r9,0 ffc0754c: 80 09 27 f8 lwz r0,10232(r9) ffc07550: 2f 80 00 01 cmpwi cr7,r0,1 ffc07554: 40 be 00 0c bne+ cr7,ffc07560 <_Event_Timeout+0x5c> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; ffc07558: 38 00 00 02 li r0,2 ffc0755c: 90 09 27 f8 stw r0,10232(r9) } the_thread->Wait.return_code = RTEMS_TIMEOUT; ffc07560: 38 00 00 06 li r0,6 ffc07564: 90 03 00 34 stw r0,52(r3) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc07568: 7d 60 01 24 mtmsr r11 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc0756c: 3c 80 10 03 lis r4,4099 ffc07570: 60 84 ff f8 ori r4,r4,65528 ffc07574: 48 00 26 65 bl ffc09bd8 <_Thread_Clear_state> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc07578: 3d 20 00 00 lis r9,0 ffc0757c: 81 69 27 a8 lwz r11,10152(r9) ffc07580: 38 0b ff ff addi r0,r11,-1 ffc07584: 90 09 27 a8 stw r0,10152(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc07588: 80 01 00 1c lwz r0,28(r1) ffc0758c: 38 21 00 18 addi r1,r1,24 ffc07590: 7c 08 03 a6 mtlr r0 ffc07594: 4e 80 00 20 blr =============================================================================== ffc0e32c <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0e32c: 94 21 ff c0 stwu r1,-64(r1) ffc0e330: 7c 08 02 a6 mflr r0 ffc0e334: be c1 00 18 stmw r22,24(r1) Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; ffc0e338: 7f c4 2a 14 add r30,r4,r5 uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc0e33c: 7f 9e 20 40 cmplw cr7,r30,r4 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0e340: 90 01 00 44 stw r0,68(r1) Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc0e344: 3b 40 00 00 li r26,0 Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0e348: 7c d9 33 78 mr r25,r6 ffc0e34c: 7c 7f 1b 78 mr r31,r3 Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; ffc0e350: 83 83 00 20 lwz r28,32(r3) Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { ffc0e354: 7c 9d 23 78 mr r29,r4 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; ffc0e358: 93 41 00 08 stw r26,8(r1) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { return false; ffc0e35c: 38 00 00 00 li r0,0 Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; ffc0e360: 93 41 00 0c stw r26,12(r1) uintptr_t const page_size = heap->page_size; ffc0e364: 83 63 00 10 lwz r27,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc0e368: 80 c3 00 14 lwz r6,20(r3) uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; ffc0e36c: 83 03 00 30 lwz r24,48(r3) uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { ffc0e370: 41 bc 02 70 blt+ cr7,ffc0e5e0 <_Heap_Extend+0x2b4> return false; } extend_area_ok = _Heap_Get_first_and_last_block( ffc0e374: 7c 83 23 78 mr r3,r4 ffc0e378: 38 e1 00 08 addi r7,r1,8 ffc0e37c: 7c a4 2b 78 mr r4,r5 ffc0e380: 39 01 00 0c addi r8,r1,12 ffc0e384: 7f 65 db 78 mr r5,r27 ffc0e388: 4b ff ab 6d bl ffc08ef4 <_Heap_Get_first_and_last_block> &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { /* For simplicity we reject extend areas that are too small */ return false; ffc0e38c: 7f 40 d3 78 mr r0,r26 page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { ffc0e390: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e394: 41 9e 02 4c beq- cr7,ffc0e5e0 <_Heap_Extend+0x2b4> ffc0e398: 7f 89 e3 78 mr r9,r28 ffc0e39c: 3a c0 00 00 li r22,0 ffc0e3a0: 39 40 00 00 li r10,0 ffc0e3a4: 3a e0 00 00 li r23,0 return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; ffc0e3a8: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0e3ac: 7d 2b 4b 78 mr r11,r9 ffc0e3b0: 40 be 00 08 bne+ cr7,ffc0e3b8 <_Heap_Extend+0x8c> ffc0e3b4: 81 7f 00 18 lwz r11,24(r31) uintptr_t const sub_area_end = start_block->prev_size; ffc0e3b8: 80 09 00 00 lwz r0,0(r9) Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( ffc0e3bc: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0e3c0: 40 9d 00 0c ble- cr7,ffc0e3cc <_Heap_Extend+0xa0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ffc0e3c4: 7f 9e 58 40 cmplw cr7,r30,r11 ffc0e3c8: 41 9d 02 14 bgt- cr7,ffc0e5dc <_Heap_Extend+0x2b0> ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc0e3cc: 7f 9e 58 00 cmpw cr7,r30,r11 ffc0e3d0: 41 9e 00 10 beq- cr7,ffc0e3e0 <_Heap_Extend+0xb4> <== NEVER TAKEN merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc0e3d4: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0e3d8: 41 9c 00 10 blt- cr7,ffc0e3e8 <_Heap_Extend+0xbc> ffc0e3dc: 48 00 00 10 b ffc0e3ec <_Heap_Extend+0xc0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { ffc0e3e0: 7d 37 4b 78 mr r23,r9 <== NOT EXECUTED ffc0e3e4: 48 00 00 08 b ffc0e3ec <_Heap_Extend+0xc0> <== NOT EXECUTED merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { ffc0e3e8: 7d 2a 4b 78 mr r10,r9 ffc0e3ec: 7d 60 db 96 divwu r11,r0,r27 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { ffc0e3f0: 7f 80 e8 00 cmpw cr7,r0,r29 ffc0e3f4: 7d 6b d9 d6 mullw r11,r11,r27 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0e3f8: 39 6b ff f8 addi r11,r11,-8 ffc0e3fc: 40 be 00 10 bne+ cr7,ffc0e40c <_Heap_Extend+0xe0> start_block->prev_size = extend_area_end; ffc0e400: 93 c9 00 00 stw r30,0(r9) RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) ffc0e404: 7d 7a 5b 78 mr r26,r11 ffc0e408: 48 00 00 10 b ffc0e418 <_Heap_Extend+0xec> merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { ffc0e40c: 7f 80 e8 40 cmplw cr7,r0,r29 ffc0e410: 40 9c 00 08 bge- cr7,ffc0e418 <_Heap_Extend+0xec> ffc0e414: 7d 76 5b 78 mr r22,r11 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0e418: 81 2b 00 04 lwz r9,4(r11) ffc0e41c: 55 29 00 3c rlwinm r9,r9,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0e420: 7d 2b 4a 14 add r9,r11,r9 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); ffc0e424: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0e428: 40 9e ff 80 bne+ cr7,ffc0e3a8 <_Heap_Extend+0x7c> if ( extend_area_begin < heap->area_begin ) { ffc0e42c: 80 1f 00 18 lwz r0,24(r31) ffc0e430: 7f 9d 00 40 cmplw cr7,r29,r0 ffc0e434: 40 9c 00 0c bge- cr7,ffc0e440 <_Heap_Extend+0x114> heap->area_begin = extend_area_begin; ffc0e438: 93 bf 00 18 stw r29,24(r31) ffc0e43c: 48 00 00 14 b ffc0e450 <_Heap_Extend+0x124> } else if ( heap->area_end < extend_area_end ) { ffc0e440: 80 1f 00 1c lwz r0,28(r31) ffc0e444: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0e448: 40 9c 00 08 bge- cr7,ffc0e450 <_Heap_Extend+0x124> heap->area_end = extend_area_end; ffc0e44c: 93 df 00 1c stw r30,28(r31) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; ffc0e450: 81 61 00 08 lwz r11,8(r1) ffc0e454: 81 21 00 0c lwz r9,12(r1) extend_first_block->prev_size = extend_area_end; ffc0e458: 93 cb 00 00 stw r30,0(r11) heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = ffc0e45c: 7c 0b 48 50 subf r0,r11,r9 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; ffc0e460: 60 08 00 01 ori r8,r0,1 _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; ffc0e464: 90 09 00 00 stw r0,0(r9) extend_last_block->size_and_flag = 0; ffc0e468: 38 00 00 00 li r0,0 extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = ffc0e46c: 91 0b 00 04 stw r8,4(r11) extend_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; extend_last_block->size_and_flag = 0; ffc0e470: 90 09 00 04 stw r0,4(r9) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { ffc0e474: 80 1f 00 20 lwz r0,32(r31) ffc0e478: 7f 80 58 40 cmplw cr7,r0,r11 ffc0e47c: 40 9d 00 0c ble- cr7,ffc0e488 <_Heap_Extend+0x15c> heap->first_block = extend_first_block; ffc0e480: 91 7f 00 20 stw r11,32(r31) ffc0e484: 48 00 00 14 b ffc0e498 <_Heap_Extend+0x16c> } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { ffc0e488: 80 1f 00 24 lwz r0,36(r31) ffc0e48c: 7f 80 48 40 cmplw cr7,r0,r9 ffc0e490: 40 9c 00 08 bge- cr7,ffc0e498 <_Heap_Extend+0x16c> heap->last_block = extend_last_block; ffc0e494: 91 3f 00 24 stw r9,36(r31) } if ( merge_below_block != NULL ) { ffc0e498: 2f 97 00 00 cmpwi cr7,r23,0 ffc0e49c: 41 9e 00 48 beq- cr7,ffc0e4e4 <_Heap_Extend+0x1b8> <== ALWAYS TAKEN Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; ffc0e4a0: 80 1f 00 10 lwz r0,16(r31) <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); ffc0e4a4: 3b bd 00 08 addi r29,r29,8 <== NOT EXECUTED RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; ffc0e4a8: 7d 3d 03 96 divwu r9,r29,r0 <== NOT EXECUTED ffc0e4ac: 7d 29 01 d6 mullw r9,r9,r0 <== NOT EXECUTED if ( remainder != 0 ) { ffc0e4b0: 7d 29 e8 51 subf. r9,r9,r29 <== NOT EXECUTED ffc0e4b4: 41 82 00 0c beq- ffc0e4c0 <_Heap_Extend+0x194> <== NOT EXECUTED return value - remainder + alignment; ffc0e4b8: 7f bd 02 14 add r29,r29,r0 <== NOT EXECUTED ffc0e4bc: 7f a9 e8 50 subf r29,r9,r29 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc0e4c0: 80 17 00 00 lwz r0,0(r23) <== NOT EXECUTED ) { uintptr_t const page_size = heap->page_size; uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = ffc0e4c4: 38 9d ff f8 addi r4,r29,-8 <== NOT EXECUTED Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; _Heap_Free_block( heap, new_first_block ); ffc0e4c8: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; ffc0e4cc: 90 1d ff f8 stw r0,-8(r29) <== NOT EXECUTED uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); uintptr_t const new_first_block_begin = new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = ffc0e4d0: 7c 04 b8 50 subf r0,r4,r23 <== NOT EXECUTED first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; ffc0e4d4: 60 00 00 01 ori r0,r0,1 <== NOT EXECUTED ffc0e4d8: 90 04 00 04 stw r0,4(r4) <== NOT EXECUTED _Heap_Free_block( heap, new_first_block ); ffc0e4dc: 4b ff fe 15 bl ffc0e2f0 <_Heap_Free_block> <== NOT EXECUTED ffc0e4e0: 48 00 00 1c b ffc0e4fc <_Heap_Extend+0x1d0> <== NOT EXECUTED heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { ffc0e4e4: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0e4e8: 41 9e 00 14 beq- cr7,ffc0e4fc <_Heap_Extend+0x1d0> _Heap_Link_below( ffc0e4ec: 81 21 00 0c lwz r9,12(r1) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; ffc0e4f0: 7d 49 50 50 subf r10,r9,r10 ffc0e4f4: 61 4a 00 01 ori r10,r10,1 ) { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = ffc0e4f8: 91 49 00 04 stw r10,4(r9) link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { ffc0e4fc: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0e500: 41 9e 00 4c beq- cr7,ffc0e54c <_Heap_Extend+0x220> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0e504: 80 1f 00 10 lwz r0,16(r31) ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, ffc0e508: 3b de ff f8 addi r30,r30,-8 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( ffc0e50c: 7f da f0 50 subf r30,r26,r30 ffc0e510: 7f de 03 96 divwu r30,r30,r0 ffc0e514: 7f de 01 d6 mullw r30,r30,r0 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc0e518: 80 1a 00 04 lwz r0,4(r26) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc0e51c: 7f e3 fb 78 mr r3,r31 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) ffc0e520: 7c 1e 00 50 subf r0,r30,r0 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0e524: 7d 3e d2 14 add r9,r30,r26 (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; ffc0e528: 60 00 00 01 ori r0,r0,1 page_size ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = ffc0e52c: 90 09 00 04 stw r0,4(r9) (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); ffc0e530: 7f 44 d3 78 mr r4,r26 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0e534: 80 1a 00 04 lwz r0,4(r26) ffc0e538: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc0e53c: 7f de 03 78 or r30,r30,r0 ffc0e540: 93 da 00 04 stw r30,4(r26) ffc0e544: 4b ff fd ad bl ffc0e2f0 <_Heap_Free_block> ffc0e548: 48 00 00 34 b ffc0e57c <_Heap_Extend+0x250> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { ffc0e54c: 2f 96 00 00 cmpwi cr7,r22,0 ffc0e550: 41 9e 00 2c beq- cr7,ffc0e57c <_Heap_Extend+0x250> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0e554: 80 16 00 04 lwz r0,4(r22) ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); ffc0e558: 81 61 00 08 lwz r11,8(r1) ffc0e55c: 54 00 07 fe clrlwi r0,r0,31 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( ffc0e560: 81 21 00 0c lwz r9,12(r1) ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); ffc0e564: 7d 76 58 50 subf r11,r22,r11 block->size_and_flag = size | flag; ffc0e568: 7d 60 03 78 or r0,r11,r0 ffc0e56c: 90 16 00 04 stw r0,4(r22) last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; ffc0e570: 80 09 00 04 lwz r0,4(r9) ffc0e574: 60 00 00 01 ori r0,r0,1 ffc0e578: 90 09 00 04 stw r0,4(r9) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { ffc0e57c: 2f 97 00 00 cmpwi cr7,r23,0 ffc0e580: 40 be 00 18 bne+ cr7,ffc0e598 <_Heap_Extend+0x26c> <== NEVER TAKEN ffc0e584: 2f 9a 00 00 cmpwi cr7,r26,0 ffc0e588: 40 be 00 10 bne+ cr7,ffc0e598 <_Heap_Extend+0x26c> _Heap_Free_block( heap, extend_first_block ); ffc0e58c: 80 81 00 08 lwz r4,8(r1) ffc0e590: 7f e3 fb 78 mr r3,r31 ffc0e594: 4b ff fd 5d bl ffc0e2f0 <_Heap_Free_block> */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( heap->last_block, (uintptr_t) heap->first_block - (uintptr_t) heap->last_block ffc0e598: 81 3f 00 24 lwz r9,36(r31) extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc0e59c: 2f 99 00 00 cmpwi cr7,r25,0 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc0e5a0: 81 7f 00 20 lwz r11,32(r31) RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0e5a4: 80 09 00 04 lwz r0,4(r9) * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( ffc0e5a8: 7d 69 58 50 subf r11,r9,r11 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0e5ac: 54 00 07 fe clrlwi r0,r0,31 block->size_and_flag = size | flag; ffc0e5b0: 7d 60 03 78 or r0,r11,r0 ffc0e5b4: 90 09 00 04 stw r0,4(r9) _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; ffc0e5b8: 80 1f 00 30 lwz r0,48(r31) ffc0e5bc: 7f 18 00 50 subf r24,r24,r0 /* Statistics */ stats->size += extended_size; ffc0e5c0: 80 1f 00 2c lwz r0,44(r31) ffc0e5c4: 7c 00 c2 14 add r0,r0,r24 ffc0e5c8: 90 1f 00 2c stw r0,44(r31) if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; ffc0e5cc: 38 00 00 01 li r0,1 extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; if ( extended_size_ptr != NULL ) ffc0e5d0: 41 9e 00 10 beq- cr7,ffc0e5e0 <_Heap_Extend+0x2b4> <== NEVER TAKEN *extended_size_ptr = extended_size; ffc0e5d4: 93 19 00 00 stw r24,0(r25) ffc0e5d8: 48 00 00 08 b ffc0e5e0 <_Heap_Extend+0x2b4> _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; ffc0e5dc: 38 00 00 00 li r0,0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } ffc0e5e0: 39 61 00 40 addi r11,r1,64 ffc0e5e4: 7c 03 03 78 mr r3,r0 ffc0e5e8: 4b ff 1f b8 b ffc005a0 <_restgpr_22_x> =============================================================================== ffc0de18 <_Heap_Free>: ffc0de18: 80 03 00 10 lwz r0,16(r3) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { ffc0de1c: 7c 69 1b 78 mr r9,r3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc0de20: 80 a3 00 20 lwz r5,32(r3) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc0de24: 7d 64 03 96 divwu r11,r4,r0 ffc0de28: 94 21 ff f0 stwu r1,-16(r1) ffc0de2c: 93 e1 00 0c stw r31,12(r1) ffc0de30: 7d 6b 01 d6 mullw r11,r11,r0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0de34: 38 00 00 00 li r0,0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc0de38: 39 6b ff f8 addi r11,r11,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0de3c: 7f 8b 28 40 cmplw cr7,r11,r5 ffc0de40: 41 9c 00 14 blt- cr7,ffc0de54 <_Heap_Free+0x3c> ffc0de44: 80 03 00 24 lwz r0,36(r3) ffc0de48: 7c 0b 00 10 subfc r0,r11,r0 ffc0de4c: 38 00 00 00 li r0,0 ffc0de50: 7c 00 01 14 adde r0,r0,r0 uintptr_t next_block_size = 0; bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc0de54: 2f 80 00 00 cmpwi cr7,r0,0 return false; ffc0de58: 38 60 00 00 li r3,0 uintptr_t next_block_size = 0; bool next_is_free = false; _Heap_Protection_block_check( heap, block ); if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc0de5c: 41 9e 01 b0 beq- cr7,ffc0e00c <_Heap_Free+0x1f4> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0de60: 80 cb 00 04 lwz r6,4(r11) ffc0de64: 38 00 00 00 li r0,0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0de68: 54 c8 00 3c rlwinm r8,r6,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0de6c: 7d 4b 42 14 add r10,r11,r8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0de70: 7f 8a 28 40 cmplw cr7,r10,r5 ffc0de74: 41 9c 00 14 blt- cr7,ffc0de88 <_Heap_Free+0x70> <== NEVER TAKEN ffc0de78: 80 09 00 24 lwz r0,36(r9) ffc0de7c: 7c 0a 00 10 subfc r0,r10,r0 ffc0de80: 38 00 00 00 li r0,0 ffc0de84: 7c 00 01 14 adde r0,r0,r0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0de88: 2f 80 00 00 cmpwi cr7,r0,0 _HAssert( false ); return false; ffc0de8c: 38 60 00 00 li r3,0 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc0de90: 41 9e 01 7c beq- cr7,ffc0e00c <_Heap_Free+0x1f4> <== NEVER TAKEN --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0de94: 80 0a 00 04 lwz r0,4(r10) if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { _HAssert( false ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc0de98: 70 04 00 01 andi. r4,r0,1 ffc0de9c: 41 82 01 70 beq- ffc0e00c <_Heap_Free+0x1f4> if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0dea0: 80 69 00 24 lwz r3,36(r9) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc0dea4: 54 00 00 3c rlwinm r0,r0,0,0,30 && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); ffc0dea8: 38 80 00 00 li r4,0 ffc0deac: 7f 8a 18 00 cmpw cr7,r10,r3 ffc0deb0: 41 9e 00 18 beq- cr7,ffc0dec8 <_Heap_Free+0xb0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } ffc0deb4: 7c ea 02 14 add r7,r10,r0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc0deb8: 80 e7 00 04 lwz r7,4(r7) return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) ffc0debc: 70 ff 00 01 andi. r31,r7,1 ffc0dec0: 7c 80 00 26 mfcr r4 ffc0dec4: 54 84 1f fe rlwinm r4,r4,3,31,31 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { ffc0dec8: 70 c7 00 01 andi. r7,r6,1 if ( !_Heap_Protection_determine_block_free( heap, block ) ) { return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block ffc0decc: 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 ) ) { ffc0ded0: 40 82 00 98 bne- ffc0df68 <_Heap_Free+0x150> uintptr_t const prev_size = block->prev_size; ffc0ded4: 80 cb 00 00 lwz r6,0(r11) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0ded8: 39 80 00 00 li r12,0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc0dedc: 7c e6 58 50 subf r7,r6,r11 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc0dee0: 7f 87 28 40 cmplw cr7,r7,r5 ffc0dee4: 41 9c 00 10 blt- cr7,ffc0def4 <_Heap_Free+0xdc> <== NEVER TAKEN ffc0dee8: 7d 87 18 10 subfc r12,r7,r3 ffc0deec: 39 80 00 00 li r12,0 ffc0def0: 7d 8c 61 14 adde r12,r12,r12 Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc0def4: 2f 8c 00 00 cmpwi cr7,r12,0 _HAssert( false ); return( false ); ffc0def8: 38 60 00 00 li r3,0 if ( !_Heap_Is_prev_used( block ) ) { uintptr_t const prev_size = block->prev_size; Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size ); if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) { ffc0defc: 41 9e 01 10 beq- cr7,ffc0e00c <_Heap_Free+0x1f4> <== 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; ffc0df00: 80 a7 00 04 lwz r5,4(r7) return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { ffc0df04: 70 bf 00 01 andi. r31,r5,1 ffc0df08: 41 82 01 04 beq- ffc0e00c <_Heap_Free+0x1f4> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ ffc0df0c: 2f 84 00 00 cmpwi cr7,r4,0 ffc0df10: 41 9e 00 38 beq- cr7,ffc0df48 <_Heap_Free+0x130> return _Heap_Free_list_tail(heap)->prev; } RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; ffc0df14: 81 6a 00 08 lwz r11,8(r10) uintptr_t const size = block_size + prev_size + next_block_size; ffc0df18: 7c 08 02 14 add r0,r8,r0 Heap_Block *prev = block->prev; ffc0df1c: 81 4a 00 0c lwz r10,12(r10) ffc0df20: 7c c0 32 14 add r6,r0,r6 prev->next = next; ffc0df24: 91 6a 00 08 stw r11,8(r10) next->prev = prev; ffc0df28: 91 4b 00 0c stw r10,12(r11) _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; ffc0df2c: 81 69 00 38 lwz r11,56(r9) ffc0df30: 38 0b ff ff addi r0,r11,-1 ffc0df34: 90 09 00 38 stw r0,56(r9) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df38: 60 c0 00 01 ori r0,r6,1 ffc0df3c: 90 07 00 04 stw r0,4(r7) next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; ffc0df40: 7c c7 31 2e stwx r6,r7,r6 ffc0df44: 48 00 00 a0 b ffc0dfe4 <_Heap_Free+0x1cc> } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; ffc0df48: 7c c8 32 14 add r6,r8,r6 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df4c: 60 c0 00 01 ori r0,r6,1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; ffc0df50: 7c cb 41 2e stwx r6,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; ffc0df54: 90 07 00 04 stw r0,4(r7) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0df58: 80 0a 00 04 lwz r0,4(r10) ffc0df5c: 54 00 00 3c rlwinm r0,r0,0,0,30 ffc0df60: 90 0a 00 04 stw r0,4(r10) ffc0df64: 48 00 00 80 b ffc0dfe4 <_Heap_Free+0x1cc> next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ ffc0df68: 2f 84 00 00 cmpwi cr7,r4,0 ffc0df6c: 41 9e 00 30 beq- cr7,ffc0df9c <_Heap_Free+0x184> RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace( Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *next = old_block->next; ffc0df70: 80 ca 00 08 lwz r6,8(r10) uintptr_t const size = block_size + next_block_size; ffc0df74: 7c e0 42 14 add r7,r0,r8 Heap_Block *prev = old_block->prev; ffc0df78: 81 4a 00 0c lwz r10,12(r10) _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; ffc0df7c: 60 e0 00 01 ori r0,r7,1 new_block->next = next; ffc0df80: 90 cb 00 08 stw r6,8(r11) new_block->prev = prev; ffc0df84: 91 4b 00 0c stw r10,12(r11) next->prev = new_block; prev->next = new_block; ffc0df88: 91 6a 00 08 stw r11,8(r10) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; ffc0df8c: 91 66 00 0c stw r11,12(r6) ffc0df90: 90 0b 00 04 stw r0,4(r11) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; ffc0df94: 7c eb 39 2e stwx r7,r11,r7 ffc0df98: 48 00 00 4c b ffc0dfe4 <_Heap_Free+0x1cc> } 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; ffc0df9c: 61 00 00 01 ori r0,r8,1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; ffc0dfa0: 80 e9 00 08 lwz r7,8(r9) ffc0dfa4: 90 0b 00 04 stw r0,4(r11) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0dfa8: 80 0a 00 04 lwz r0,4(r10) new_block->next = next; ffc0dfac: 90 eb 00 08 stw r7,8(r11) ffc0dfb0: 54 00 00 3c rlwinm r0,r0,0,0,30 new_block->prev = block_before; ffc0dfb4: 91 2b 00 0c stw r9,12(r11) next_block->prev_size = block_size; ffc0dfb8: 7d 0b 41 2e stwx r8,r11,r8 block_before->next = new_block; next->prev = new_block; ffc0dfbc: 91 67 00 0c stw r11,12(r7) { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; ffc0dfc0: 91 69 00 08 stw r11,8(r9) /* Statistics */ ++stats->free_blocks; ffc0dfc4: 81 69 00 38 lwz r11,56(r9) } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; ffc0dfc8: 90 0a 00 04 stw r0,4(r10) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0dfcc: 38 0b 00 01 addi r0,r11,1 if ( stats->max_free_blocks < stats->free_blocks ) { ffc0dfd0: 81 69 00 3c lwz r11,60(r9) block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; ffc0dfd4: 90 09 00 38 stw r0,56(r9) if ( stats->max_free_blocks < stats->free_blocks ) { ffc0dfd8: 7f 8b 00 40 cmplw cr7,r11,r0 ffc0dfdc: 40 9c 00 08 bge- cr7,ffc0dfe4 <_Heap_Free+0x1cc> stats->max_free_blocks = stats->free_blocks; ffc0dfe0: 90 09 00 3c stw r0,60(r9) } } /* Statistics */ --stats->used_blocks; ffc0dfe4: 81 69 00 40 lwz r11,64(r9) ++stats->frees; stats->free_size += block_size; return( true ); ffc0dfe8: 38 60 00 01 li r3,1 stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0dfec: 38 0b ff ff addi r0,r11,-1 ++stats->frees; ffc0dff0: 81 69 00 50 lwz r11,80(r9) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; ffc0dff4: 90 09 00 40 stw r0,64(r9) ++stats->frees; ffc0dff8: 38 0b 00 01 addi r0,r11,1 ffc0dffc: 90 09 00 50 stw r0,80(r9) stats->free_size += block_size; ffc0e000: 80 09 00 30 lwz r0,48(r9) ffc0e004: 7d 00 42 14 add r8,r0,r8 ffc0e008: 91 09 00 30 stw r8,48(r9) return( true ); } ffc0e00c: 83 e1 00 0c lwz r31,12(r1) ffc0e010: 38 21 00 10 addi r1,r1,16 ffc0e014: 4e 80 00 20 blr =============================================================================== ffc15d08 <_Heap_Size_of_alloc_area>: RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc15d08: 80 03 00 10 lwz r0,16(r3) bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { ffc15d0c: 7c 69 1b 78 mr r9,r3 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block ffc15d10: 81 03 00 20 lwz r8,32(r3) RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); ffc15d14: 7d 44 03 96 divwu r10,r4,r0 ffc15d18: 7d 4a 01 d6 mullw r10,r10,r0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc15d1c: 38 00 00 00 li r0,0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); ffc15d20: 39 4a ff f8 addi r10,r10,-8 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc15d24: 7f 8a 40 40 cmplw cr7,r10,r8 ffc15d28: 41 9c 00 14 blt- cr7,ffc15d3c <_Heap_Size_of_alloc_area+0x34> ffc15d2c: 80 03 00 24 lwz r0,36(r3) ffc15d30: 7c 0a 00 10 subfc r0,r10,r0 ffc15d34: 38 00 00 00 li r0,0 ffc15d38: 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 ) ) { ffc15d3c: 2f 80 00 00 cmpwi cr7,r0,0 return false; ffc15d40: 38 60 00 00 li r3,0 uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr; Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size ); Heap_Block *next_block = NULL; uintptr_t block_size = 0; if ( !_Heap_Is_block_in_heap( heap, block ) ) { ffc15d44: 4d 9e 00 20 beqlr cr7 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc15d48: 81 6a 00 04 lwz r11,4(r10) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc15d4c: 38 00 00 00 li r0,0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc15d50: 55 6b 00 3c rlwinm r11,r11,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc15d54: 7d 6a 5a 14 add r11,r10,r11 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc15d58: 7f 8b 40 40 cmplw cr7,r11,r8 ffc15d5c: 41 9c 00 14 blt- cr7,ffc15d70 <_Heap_Size_of_alloc_area+0x68><== NEVER TAKEN ffc15d60: 80 09 00 24 lwz r0,36(r9) ffc15d64: 7c 0b 00 10 subfc r0,r11,r0 ffc15d68: 38 00 00 00 li r0,0 ffc15d6c: 7c 00 01 14 adde r0,r0,r0 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc15d70: 2f 80 00 00 cmpwi cr7,r0,0 !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; ffc15d74: 38 60 00 00 li r3,0 } block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( ffc15d78: 4d 9e 00 20 beqlr cr7 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc15d7c: 80 0b 00 04 lwz r0,4(r11) !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ffc15d80: 70 09 00 01 andi. r9,r0,1 ffc15d84: 4d 82 00 20 beqlr ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; ffc15d88: 20 84 00 04 subfic r4,r4,4 ffc15d8c: 7d 64 5a 14 add r11,r4,r11 ffc15d90: 91 65 00 00 stw r11,0(r5) return true; ffc15d94: 38 60 00 01 li r3,1 } ffc15d98: 4e 80 00 20 blr =============================================================================== ffc09a38 <_Heap_Walk>: uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc09a38: 2f 85 00 00 cmpwi cr7,r5,0 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { ffc09a3c: 94 21 ff 98 stwu r1,-104(r1) ffc09a40: 7c 08 02 a6 mflr r0 ffc09a44: bd c1 00 20 stmw r14,32(r1) ffc09a48: 7c 7e 1b 78 mr r30,r3 ffc09a4c: 7c 9f 23 78 mr r31,r4 ffc09a50: 90 01 00 6c stw r0,108(r1) uintptr_t const page_size = heap->page_size; ffc09a54: 83 43 00 10 lwz r26,16(r3) uintptr_t const min_block_size = heap->min_block_size; ffc09a58: 83 23 00 14 lwz r25,20(r3) Heap_Block *const first_block = heap->first_block; ffc09a5c: 83 03 00 20 lwz r24,32(r3) Heap_Block *const last_block = heap->last_block; ffc09a60: 82 e3 00 24 lwz r23,36(r3) Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; ffc09a64: 41 9e 00 10 beq- cr7,ffc09a74 <_Heap_Walk+0x3c> ffc09a68: 3d 20 ff c1 lis r9,-63 ffc09a6c: 39 29 99 88 addi r9,r9,-26232 ffc09a70: 48 00 00 0c b ffc09a7c <_Heap_Walk+0x44> ffc09a74: 3d 20 ff c1 lis r9,-63 ffc09a78: 39 29 99 84 addi r9,r9,-26236 ffc09a7c: 91 21 00 18 stw r9,24(r1) if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc09a80: 3d 20 00 00 lis r9,0 return true; ffc09a84: 38 60 00 01 li r3,1 Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { ffc09a88: 80 09 27 ec lwz r0,10220(r9) ffc09a8c: 2f 80 00 03 cmpwi cr7,r0,3 ffc09a90: 40 be 04 c4 bne+ cr7,ffc09f54 <_Heap_Walk+0x51c> 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)( ffc09a94: 80 1e 00 08 lwz r0,8(r30) ffc09a98: 3c a0 ff c2 lis r5,-62 ffc09a9c: 81 1e 00 18 lwz r8,24(r30) ffc09aa0: 7f e3 fb 78 mr r3,r31 ffc09aa4: 90 01 00 0c stw r0,12(r1) ffc09aa8: 38 80 00 00 li r4,0 ffc09aac: 38 a5 81 a5 addi r5,r5,-32347 ffc09ab0: 80 1e 00 0c lwz r0,12(r30) ffc09ab4: 7f 46 d3 78 mr r6,r26 ffc09ab8: 81 3e 00 1c lwz r9,28(r30) ffc09abc: 7f 27 cb 78 mr r7,r25 ffc09ac0: 90 01 00 10 stw r0,16(r1) ffc09ac4: 7f 0a c3 78 mr r10,r24 ffc09ac8: 80 01 00 18 lwz r0,24(r1) ffc09acc: 92 e1 00 08 stw r23,8(r1) ffc09ad0: 7c 09 03 a6 mtctr r0 ffc09ad4: 4c c6 31 82 crclr 4*cr1+eq ffc09ad8: 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 ) { ffc09adc: 2f 9a 00 00 cmpwi cr7,r26,0 ffc09ae0: 40 be 00 18 bne+ cr7,ffc09af8 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); ffc09ae4: 3c a0 ff c2 lis r5,-62 ffc09ae8: 7f e3 fb 78 mr r3,r31 ffc09aec: 38 80 00 01 li r4,1 ffc09af0: 38 a5 82 36 addi r5,r5,-32202 ffc09af4: 48 00 00 94 b ffc09b88 <_Heap_Walk+0x150> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { ffc09af8: 73 49 00 07 andi. r9,r26,7 ffc09afc: 41 a2 00 1c beq+ ffc09b18 <_Heap_Walk+0xe0> (*printer)( ffc09b00: 3c a0 ff c2 lis r5,-62 ffc09b04: 7f e3 fb 78 mr r3,r31 ffc09b08: 38 80 00 01 li r4,1 ffc09b0c: 38 a5 82 49 addi r5,r5,-32183 ffc09b10: 7f 46 d3 78 mr r6,r26 ffc09b14: 48 00 04 5c b ffc09f70 <_Heap_Walk+0x538> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09b18: 7c 19 d3 96 divwu r0,r25,r26 ffc09b1c: 7c 00 d1 d6 mullw r0,r0,r26 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { ffc09b20: 7f 99 00 00 cmpw cr7,r25,r0 ffc09b24: 41 be 00 1c beq+ cr7,ffc09b40 <_Heap_Walk+0x108> (*printer)( ffc09b28: 3c a0 ff c2 lis r5,-62 ffc09b2c: 7f e3 fb 78 mr r3,r31 ffc09b30: 38 80 00 01 li r4,1 ffc09b34: 38 a5 82 67 addi r5,r5,-32153 ffc09b38: 7f 26 cb 78 mr r6,r25 ffc09b3c: 48 00 04 34 b ffc09f70 <_Heap_Walk+0x538> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09b40: 38 18 00 08 addi r0,r24,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09b44: 7d 20 d3 96 divwu r9,r0,r26 ffc09b48: 7d 29 d1 d6 mullw r9,r9,r26 ); return false; } if ( ffc09b4c: 7f 80 48 00 cmpw cr7,r0,r9 ffc09b50: 41 be 00 1c beq+ cr7,ffc09b6c <_Heap_Walk+0x134> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( ffc09b54: 3c a0 ff c2 lis r5,-62 ffc09b58: 7f e3 fb 78 mr r3,r31 ffc09b5c: 38 80 00 01 li r4,1 ffc09b60: 38 a5 82 8b addi r5,r5,-32117 ffc09b64: 7f 06 c3 78 mr r6,r24 ffc09b68: 48 00 04 08 b ffc09f70 <_Heap_Walk+0x538> 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; ffc09b6c: 80 18 00 04 lwz r0,4(r24) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { ffc09b70: 70 09 00 01 andi. r9,r0,1 ffc09b74: 40 a2 00 28 bne+ ffc09b9c <_Heap_Walk+0x164> (*printer)( ffc09b78: 3c a0 ff c2 lis r5,-62 ffc09b7c: 7f e3 fb 78 mr r3,r31 ffc09b80: 38 80 00 01 li r4,1 ffc09b84: 38 a5 82 bc addi r5,r5,-32068 ffc09b88: 80 01 00 18 lwz r0,24(r1) ffc09b8c: 7c 09 03 a6 mtctr r0 ffc09b90: 4c c6 31 82 crclr 4*cr1+eq ffc09b94: 4e 80 04 21 bctrl ffc09b98: 48 00 01 18 b ffc09cb0 <_Heap_Walk+0x278> - 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; ffc09b9c: 83 b7 00 04 lwz r29,4(r23) ffc09ba0: 57 bd 00 3c rlwinm r29,r29,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09ba4: 7f b7 ea 14 add r29,r23,r29 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc09ba8: 80 1d 00 04 lwz r0,4(r29) ); return false; } if ( _Heap_Is_free( last_block ) ) { ffc09bac: 70 09 00 01 andi. r9,r0,1 ffc09bb0: 40 a2 00 18 bne+ ffc09bc8 <_Heap_Walk+0x190> (*printer)( ffc09bb4: 3c a0 ff c2 lis r5,-62 ffc09bb8: 7f e3 fb 78 mr r3,r31 ffc09bbc: 38 80 00 01 li r4,1 ffc09bc0: 38 a5 82 ea addi r5,r5,-32022 ffc09bc4: 4b ff ff c4 b ffc09b88 <_Heap_Walk+0x150> ); return false; } if ( ffc09bc8: 7f 9d c0 00 cmpw cr7,r29,r24 ffc09bcc: 41 9e 00 18 beq- cr7,ffc09be4 <_Heap_Walk+0x1ac> <== ALWAYS TAKEN _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( ffc09bd0: 3c a0 ff c2 lis r5,-62 <== NOT EXECUTED ffc09bd4: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc09bd8: 38 80 00 01 li r4,1 <== NOT EXECUTED ffc09bdc: 38 a5 82 ff addi r5,r5,-32001 <== NOT EXECUTED ffc09be0: 4b ff ff a8 b ffc09b88 <_Heap_Walk+0x150> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; ffc09be4: 81 3e 00 10 lwz r9,16(r30) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); ffc09be8: 7f c0 f3 78 mr r0,r30 block = next_block; } while ( block != first_block ); return true; } ffc09bec: 80 de 00 08 lwz r6,8(r30) ffc09bf0: 48 00 00 d0 b ffc09cc0 <_Heap_Walk+0x288> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc09bf4: 81 5e 00 20 lwz r10,32(r30) ffc09bf8: 39 60 00 00 li r11,0 ffc09bfc: 7f 8a 30 40 cmplw cr7,r10,r6 ffc09c00: 41 9d 00 14 bgt- cr7,ffc09c14 <_Heap_Walk+0x1dc> ffc09c04: 81 7e 00 24 lwz r11,36(r30) ffc09c08: 7d 66 58 10 subfc r11,r6,r11 ffc09c0c: 39 60 00 00 li r11,0 ffc09c10: 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 ) ) { ffc09c14: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09c18: 40 be 00 18 bne+ cr7,ffc09c30 <_Heap_Walk+0x1f8> (*printer)( ffc09c1c: 3c a0 ff c2 lis r5,-62 ffc09c20: 7f e3 fb 78 mr r3,r31 ffc09c24: 38 80 00 01 li r4,1 ffc09c28: 38 a5 83 2e addi r5,r5,-31954 ffc09c2c: 48 00 03 44 b ffc09f70 <_Heap_Walk+0x538> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; ffc09c30: 39 66 00 08 addi r11,r6,8 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09c34: 7d 4b 4b 96 divwu r10,r11,r9 ffc09c38: 7d 4a 49 d6 mullw r10,r10,r9 ); return false; } if ( ffc09c3c: 7f 8b 50 00 cmpw cr7,r11,r10 ffc09c40: 41 be 00 18 beq+ cr7,ffc09c58 <_Heap_Walk+0x220> !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( ffc09c44: 3c a0 ff c2 lis r5,-62 ffc09c48: 7f e3 fb 78 mr r3,r31 ffc09c4c: 38 80 00 01 li r4,1 ffc09c50: 38 a5 83 4e addi r5,r5,-31922 ffc09c54: 48 00 03 1c b ffc09f70 <_Heap_Walk+0x538> - 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; ffc09c58: 81 66 00 04 lwz r11,4(r6) ffc09c5c: 55 6b 00 3c rlwinm r11,r11,0,0,30 block = next_block; } while ( block != first_block ); return true; } ffc09c60: 7d 66 5a 14 add r11,r6,r11 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc09c64: 81 6b 00 04 lwz r11,4(r11) ); return false; } if ( _Heap_Is_used( free_block ) ) { ffc09c68: 71 6a 00 01 andi. r10,r11,1 ffc09c6c: 41 a2 00 18 beq+ ffc09c84 <_Heap_Walk+0x24c> (*printer)( ffc09c70: 3c a0 ff c2 lis r5,-62 ffc09c74: 7f e3 fb 78 mr r3,r31 ffc09c78: 38 80 00 01 li r4,1 ffc09c7c: 38 a5 83 7e addi r5,r5,-31874 ffc09c80: 48 00 02 f0 b ffc09f70 <_Heap_Walk+0x538> ); return false; } if ( free_block->prev != prev_block ) { ffc09c84: 80 e6 00 0c lwz r7,12(r6) ffc09c88: 7f 87 00 00 cmpw cr7,r7,r0 ffc09c8c: 41 be 00 2c beq+ cr7,ffc09cb8 <_Heap_Walk+0x280> (*printer)( ffc09c90: 3c a0 ff c2 lis r5,-62 ffc09c94: 7f e3 fb 78 mr r3,r31 ffc09c98: 38 80 00 01 li r4,1 ffc09c9c: 38 a5 83 9a addi r5,r5,-31846 ffc09ca0: 80 01 00 18 lwz r0,24(r1) ffc09ca4: 7c 09 03 a6 mtctr r0 ffc09ca8: 4c c6 31 82 crclr 4*cr1+eq ffc09cac: 4e 80 04 21 bctrl if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; ffc09cb0: 38 60 00 00 li r3,0 ffc09cb4: 48 00 02 a0 b ffc09f54 <_Heap_Walk+0x51c> return false; } prev_block = free_block; free_block = free_block->next; ffc09cb8: 7c c0 33 78 mr r0,r6 ffc09cbc: 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 ) { ffc09cc0: 7f 86 f0 00 cmpw cr7,r6,r30 ffc09cc4: 40 9e ff 30 bne+ cr7,ffc09bf4 <_Heap_Walk+0x1bc> ffc09cc8: 48 00 00 0c b ffc09cd4 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); ffc09ccc: 7f 7d db 78 mr r29,r27 ffc09cd0: 48 00 00 30 b ffc09d00 <_Heap_Walk+0x2c8> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09cd4: 3e 60 ff c2 lis r19,-62 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc09cd8: 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)( ffc09cdc: 3e 40 ff c2 lis r18,-62 "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09ce0: 3a 73 85 3a addi r19,r19,-31430 if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { (*printer)( ffc09ce4: 3a 94 85 23 addi r20,r20,-31453 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)( ffc09ce8: 3a 52 84 86 addi r18,r18,-31610 ffc09cec: 3e 20 ff c2 lis r17,-62 " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc09cf0: 3e c0 ff c2 lis r22,-62 ffc09cf4: 3e 00 ff c2 lis r16,-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)( ffc09cf8: 3d e0 ff c2 lis r15,-62 block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc09cfc: 3d c0 ff c2 lis r14,-62 block = next_block; } while ( block != first_block ); return true; } ffc09d00: 82 bd 00 04 lwz r21,4(r29) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc09d04: 38 00 00 00 li r0,0 ffc09d08: 81 3e 00 20 lwz r9,32(r30) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; ffc09d0c: 56 bc 00 3c rlwinm r28,r21,0,0,30 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); ffc09d10: 7f 7d e2 14 add r27,r29,r28 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; ffc09d14: 7f 89 d8 40 cmplw cr7,r9,r27 ffc09d18: 41 9d 00 14 bgt- cr7,ffc09d2c <_Heap_Walk+0x2f4> <== NEVER TAKEN ffc09d1c: 80 1e 00 24 lwz r0,36(r30) ffc09d20: 7c 1b 00 10 subfc r0,r27,r0 ffc09d24: 38 00 00 00 li r0,0 ffc09d28: 7c 00 01 14 adde r0,r0,r0 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { ffc09d2c: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d30: 40 be 00 18 bne+ cr7,ffc09d48 <_Heap_Walk+0x310> (*printer)( ffc09d34: 3c a0 ff c2 lis r5,-62 ffc09d38: 7f e3 fb 78 mr r3,r31 ffc09d3c: 38 80 00 01 li r4,1 ffc09d40: 38 a5 83 cc addi r5,r5,-31796 ffc09d44: 48 00 00 a8 b ffc09dec <_Heap_Walk+0x3b4> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; ffc09d48: 7d 3c d3 96 divwu r9,r28,r26 ffc09d4c: 7d 29 d1 d6 mullw r9,r9,r26 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc09d50: 7f a0 ba 78 xor r0,r29,r23 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc09d54: 7f 9c 48 00 cmpw cr7,r28,r9 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; ffc09d58: 7c 00 00 34 cntlzw r0,r0 ffc09d5c: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc09d60: 68 00 00 01 xori r0,r0,1 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { ffc09d64: 41 9e 00 28 beq- cr7,ffc09d8c <_Heap_Walk+0x354> ffc09d68: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d6c: 41 be 00 20 beq+ cr7,ffc09d8c <_Heap_Walk+0x354> (*printer)( ffc09d70: 3c a0 ff c2 lis r5,-62 ffc09d74: 7f e3 fb 78 mr r3,r31 ffc09d78: 38 80 00 01 li r4,1 ffc09d7c: 38 a5 83 f9 addi r5,r5,-31751 ffc09d80: 7f a6 eb 78 mr r6,r29 ffc09d84: 7f 87 e3 78 mr r7,r28 ffc09d88: 4b ff ff 18 b ffc09ca0 <_Heap_Walk+0x268> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { ffc09d8c: 7f 9c c8 40 cmplw cr7,r28,r25 ffc09d90: 40 9c 00 3c bge- cr7,ffc09dcc <_Heap_Walk+0x394> ffc09d94: 2f 80 00 00 cmpwi cr7,r0,0 ffc09d98: 41 be 00 34 beq+ cr7,ffc09dcc <_Heap_Walk+0x394> <== NEVER TAKEN (*printer)( ffc09d9c: 80 01 00 18 lwz r0,24(r1) ffc09da0: 3c a0 ff c2 lis r5,-62 ffc09da4: 7f e3 fb 78 mr r3,r31 ffc09da8: 38 80 00 01 li r4,1 ffc09dac: 7c 09 03 a6 mtctr r0 ffc09db0: 38 a5 84 27 addi r5,r5,-31705 ffc09db4: 7f a6 eb 78 mr r6,r29 ffc09db8: 7f 87 e3 78 mr r7,r28 ffc09dbc: 7f 28 cb 78 mr r8,r25 ffc09dc0: 4c c6 31 82 crclr 4*cr1+eq ffc09dc4: 4e 80 04 21 bctrl ffc09dc8: 4b ff fe e8 b ffc09cb0 <_Heap_Walk+0x278> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { ffc09dcc: 7f 9b e8 40 cmplw cr7,r27,r29 ffc09dd0: 41 9d 00 28 bgt- cr7,ffc09df8 <_Heap_Walk+0x3c0> ffc09dd4: 2f 80 00 00 cmpwi cr7,r0,0 ffc09dd8: 41 be 00 20 beq+ cr7,ffc09df8 <_Heap_Walk+0x3c0> (*printer)( ffc09ddc: 3c a0 ff c2 lis r5,-62 ffc09de0: 7f e3 fb 78 mr r3,r31 ffc09de4: 38 80 00 01 li r4,1 ffc09de8: 38 a5 84 52 addi r5,r5,-31662 ffc09dec: 7f a6 eb 78 mr r6,r29 ffc09df0: 7f 67 db 78 mr r7,r27 ffc09df4: 4b ff fe ac b ffc09ca0 <_Heap_Walk+0x268> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; ffc09df8: 80 1b 00 04 lwz r0,4(r27) ffc09dfc: 56 b5 07 fe clrlwi r21,r21,31 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { ffc09e00: 70 09 00 01 andi. r9,r0,1 ffc09e04: 40 a2 00 ec bne+ ffc09ef0 <_Heap_Walk+0x4b8> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? ffc09e08: 81 1d 00 0c lwz r8,12(r29) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc09e0c: 39 2f 81 72 addi r9,r15,-32398 ffc09e10: 80 1e 00 08 lwz r0,8(r30) block = next_block; } while ( block != first_block ); return true; } ffc09e14: 81 7e 00 0c lwz r11,12(r30) 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)( ffc09e18: 7f 88 00 00 cmpw cr7,r8,r0 ffc09e1c: 41 9e 00 14 beq- cr7,ffc09e30 <_Heap_Walk+0x3f8> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), ffc09e20: 7f 88 f0 00 cmpw cr7,r8,r30 ffc09e24: 39 36 80 a7 addi r9,r22,-32601 ffc09e28: 40 be 00 08 bne+ cr7,ffc09e30 <_Heap_Walk+0x3f8> ffc09e2c: 39 2e 81 82 addi r9,r14,-32382 block->next, block->next == last_free_block ? ffc09e30: 81 5d 00 08 lwz r10,8(r29) Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( ffc09e34: 38 11 81 8c addi r0,r17,-32372 ffc09e38: 7f 8a 58 00 cmpw cr7,r10,r11 ffc09e3c: 41 9e 00 14 beq- cr7,ffc09e50 <_Heap_Walk+0x418> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ffc09e40: 7f 8a f0 00 cmpw cr7,r10,r30 ffc09e44: 38 16 80 a7 addi r0,r22,-32601 ffc09e48: 40 be 00 08 bne+ cr7,ffc09e50 <_Heap_Walk+0x418> ffc09e4c: 38 10 81 9b addi r0,r16,-32357 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)( ffc09e50: 90 01 00 08 stw r0,8(r1) ffc09e54: 7f e3 fb 78 mr r3,r31 ffc09e58: 38 80 00 00 li r4,0 ffc09e5c: 80 01 00 18 lwz r0,24(r1) ffc09e60: 7e 45 93 78 mr r5,r18 ffc09e64: 7f a6 eb 78 mr r6,r29 ffc09e68: 7f 87 e3 78 mr r7,r28 ffc09e6c: 7c 09 03 a6 mtctr r0 ffc09e70: 4c c6 31 82 crclr 4*cr1+eq ffc09e74: 4e 80 04 21 bctrl block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { ffc09e78: 81 1b 00 00 lwz r8,0(r27) ffc09e7c: 7f 9c 40 00 cmpw cr7,r28,r8 ffc09e80: 41 be 00 34 beq+ cr7,ffc09eb4 <_Heap_Walk+0x47c> (*printer)( ffc09e84: 80 01 00 18 lwz r0,24(r1) ffc09e88: 3c a0 ff c2 lis r5,-62 ffc09e8c: 7f e3 fb 78 mr r3,r31 ffc09e90: 38 80 00 01 li r4,1 ffc09e94: 7c 09 03 a6 mtctr r0 ffc09e98: 38 a5 84 bb addi r5,r5,-31557 ffc09e9c: 7f a6 eb 78 mr r6,r29 ffc09ea0: 7f 87 e3 78 mr r7,r28 ffc09ea4: 7f 69 db 78 mr r9,r27 ffc09ea8: 4c c6 31 82 crclr 4*cr1+eq ffc09eac: 4e 80 04 21 bctrl ffc09eb0: 4b ff fe 00 b ffc09cb0 <_Heap_Walk+0x278> ); return false; } if ( !prev_used ) { ffc09eb4: 2f 95 00 00 cmpwi cr7,r21,0 ffc09eb8: 40 be 00 18 bne+ cr7,ffc09ed0 <_Heap_Walk+0x498> (*printer)( ffc09ebc: 3c a0 ff c2 lis r5,-62 ffc09ec0: 7f e3 fb 78 mr r3,r31 ffc09ec4: 38 80 00 01 li r4,1 ffc09ec8: 38 a5 84 f4 addi r5,r5,-31500 ffc09ecc: 48 00 00 a0 b ffc09f6c <_Heap_Walk+0x534> block = next_block; } while ( block != first_block ); return true; } ffc09ed0: 81 3e 00 08 lwz r9,8(r30) ffc09ed4: 48 00 00 10 b ffc09ee4 <_Heap_Walk+0x4ac> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { ffc09ed8: 7f 89 e8 00 cmpw cr7,r9,r29 ffc09edc: 41 9e 00 6c beq- cr7,ffc09f48 <_Heap_Walk+0x510> return true; } free_block = free_block->next; ffc09ee0: 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 ) { ffc09ee4: 7f 89 f0 00 cmpw cr7,r9,r30 ffc09ee8: 40 9e ff f0 bne+ cr7,ffc09ed8 <_Heap_Walk+0x4a0> ffc09eec: 48 00 00 70 b ffc09f5c <_Heap_Walk+0x524> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { ffc09ef0: 2f 95 00 00 cmpwi cr7,r21,0 ffc09ef4: 41 9e 00 2c beq- cr7,ffc09f20 <_Heap_Walk+0x4e8> (*printer)( ffc09ef8: 80 01 00 18 lwz r0,24(r1) ffc09efc: 7f e3 fb 78 mr r3,r31 ffc09f00: 38 80 00 00 li r4,0 ffc09f04: 7e 85 a3 78 mr r5,r20 ffc09f08: 7c 09 03 a6 mtctr r0 ffc09f0c: 7f a6 eb 78 mr r6,r29 ffc09f10: 7f 87 e3 78 mr r7,r28 ffc09f14: 4c c6 31 82 crclr 4*cr1+eq ffc09f18: 4e 80 04 21 bctrl ffc09f1c: 48 00 00 2c b ffc09f48 <_Heap_Walk+0x510> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( ffc09f20: 80 01 00 18 lwz r0,24(r1) ffc09f24: 7f e3 fb 78 mr r3,r31 ffc09f28: 38 80 00 00 li r4,0 ffc09f2c: 81 1d 00 00 lwz r8,0(r29) ffc09f30: 7e 65 9b 78 mr r5,r19 ffc09f34: 7c 09 03 a6 mtctr r0 ffc09f38: 7f a6 eb 78 mr r6,r29 ffc09f3c: 7f 87 e3 78 mr r7,r28 ffc09f40: 4c c6 31 82 crclr 4*cr1+eq ffc09f44: 4e 80 04 21 bctrl block->prev_size ); } block = next_block; } while ( block != first_block ); ffc09f48: 7f 9b c0 00 cmpw cr7,r27,r24 ffc09f4c: 40 9e fd 80 bne+ cr7,ffc09ccc <_Heap_Walk+0x294> return true; ffc09f50: 38 60 00 01 li r3,1 } ffc09f54: 39 61 00 68 addi r11,r1,104 ffc09f58: 4b ff 6b 68 b ffc00ac0 <_restgpr_14_x> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( ffc09f5c: 3c a0 ff c2 lis r5,-62 ffc09f60: 7f e3 fb 78 mr r3,r31 ffc09f64: 38 80 00 01 li r4,1 ffc09f68: 38 a5 85 5f addi r5,r5,-31393 ffc09f6c: 7f a6 eb 78 mr r6,r29 ffc09f70: 80 01 00 18 lwz r0,24(r1) ffc09f74: 7c 09 03 a6 mtctr r0 ffc09f78: 4c c6 31 82 crclr 4*cr1+eq ffc09f7c: 4e 80 04 21 bctrl ffc09f80: 4b ff fd 30 b ffc09cb0 <_Heap_Walk+0x278> =============================================================================== ffc09988 <_Heap_Walk_print>: static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc09988: 7c 08 02 a6 mflr r0 ffc0998c: 7c 2b 0b 78 mr r11,r1 ffc09990: 94 21 ff 88 stwu r1,-120(r1) ffc09994: 90 01 00 7c stw r0,124(r1) ffc09998: 4b ff 71 21 bl ffc00ab8 <_savegpr_31> ffc0999c: 7c 60 1b 78 mr r0,r3 ffc099a0: 90 c1 00 1c stw r6,28(r1) ffc099a4: 90 e1 00 20 stw r7,32(r1) ffc099a8: 91 01 00 24 stw r8,36(r1) ffc099ac: 91 21 00 28 stw r9,40(r1) ffc099b0: 91 41 00 2c stw r10,44(r1) ffc099b4: 40 86 00 24 bne- cr1,ffc099d8 <_Heap_Walk_print+0x50> <== ALWAYS TAKEN ffc099b8: d8 21 00 30 stfd f1,48(r1) <== NOT EXECUTED ffc099bc: d8 41 00 38 stfd f2,56(r1) <== NOT EXECUTED ffc099c0: d8 61 00 40 stfd f3,64(r1) <== NOT EXECUTED ffc099c4: d8 81 00 48 stfd f4,72(r1) <== NOT EXECUTED ffc099c8: d8 a1 00 50 stfd f5,80(r1) <== NOT EXECUTED ffc099cc: d8 c1 00 58 stfd f6,88(r1) <== NOT EXECUTED ffc099d0: d8 e1 00 60 stfd f7,96(r1) <== NOT EXECUTED ffc099d4: d9 01 00 68 stfd f8,104(r1) <== NOT EXECUTED va_list ap; if ( error ) { ffc099d8: 2f 84 00 00 cmpwi cr7,r4,0 { /* Do nothing */ } static void _Heap_Walk_print( int source, bool error, const char *fmt, ... ) { ffc099dc: 7c bf 2b 78 mr r31,r5 va_list ap; if ( error ) { ffc099e0: 41 be 00 10 beq+ cr7,ffc099f0 <_Heap_Walk_print+0x68> printk( "FAIL[%d]: ", source ); ffc099e4: 3c 60 ff c2 lis r3,-62 ffc099e8: 38 63 81 5c addi r3,r3,-32420 ffc099ec: 48 00 00 0c b ffc099f8 <_Heap_Walk_print+0x70> } else { printk( "PASS[%d]: ", source ); ffc099f0: 3c 60 ff c2 lis r3,-62 ffc099f4: 38 63 81 67 addi r3,r3,-32409 ffc099f8: 7c 04 03 78 mr r4,r0 ffc099fc: 4c c6 31 82 crclr 4*cr1+eq ffc09a00: 4b ff be a9 bl ffc058a8 } va_start( ap, fmt ); ffc09a04: 38 00 00 03 li r0,3 ffc09a08: 98 01 00 08 stb r0,8(r1) ffc09a0c: 38 00 00 00 li r0,0 vprintk( fmt, ap ); ffc09a10: 7f e3 fb 78 mr r3,r31 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc09a14: 98 01 00 09 stb r0,9(r1) ffc09a18: 38 01 00 80 addi r0,r1,128 vprintk( fmt, ap ); ffc09a1c: 38 81 00 08 addi r4,r1,8 printk( "FAIL[%d]: ", source ); } else { printk( "PASS[%d]: ", source ); } va_start( ap, fmt ); ffc09a20: 90 01 00 0c stw r0,12(r1) ffc09a24: 38 01 00 10 addi r0,r1,16 ffc09a28: 90 01 00 10 stw r0,16(r1) vprintk( fmt, ap ); ffc09a2c: 4b ff dc 41 bl ffc0766c va_end( ap ); } ffc09a30: 39 61 00 78 addi r11,r1,120 ffc09a34: 4b ff 70 d0 b ffc00b04 <_restgpr_31_x> =============================================================================== ffc07fb4 <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { ffc07fb4: 94 21 ff e0 stwu r1,-32(r1) ffc07fb8: 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; ffc07fbc: 3d 20 00 00 lis r9,0 * workspace. * */ void _IO_Manager_initialization(void) { ffc07fc0: 90 01 00 24 stw r0,36(r1) uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; ffc07fc4: 39 29 20 a0 addi r9,r9,8352 * workspace. * */ void _IO_Manager_initialization(void) { ffc07fc8: bf 41 00 08 stmw r26,8(r1) ffc07fcc: 3f a0 00 00 lis r29,0 ffc07fd0: 3f 40 00 00 lis r26,0 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; ffc07fd4: 83 c9 00 34 lwz r30,52(r9) number_of_drivers = Configuration.maximum_drivers; ffc07fd8: 83 69 00 30 lwz r27,48(r9) 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; ffc07fdc: 83 e9 00 38 lwz r31,56(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 ) ffc07fe0: 7f 9b f0 40 cmplw cr7,r27,r30 ffc07fe4: 40 9d 00 40 ble- cr7,ffc08024 <_IO_Manager_initialization+0x70> * 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 ) ffc07fe8: 1f 9b 00 18 mulli r28,r27,24 * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( ffc07fec: 7f 83 e3 78 mr r3,r28 ffc07ff0: 48 00 34 65 bl ffc0b454 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( ffc07ff4: 38 80 00 00 li r4,0 ffc07ff8: 7f 85 e3 78 mr r5,r28 /* * 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 *) ffc07ffc: 90 7d 28 00 stw r3,10240(r29) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; ffc08000: 93 7a 27 fc stw r27,10236(r26) memset( ffc08004: 48 00 8e d5 bl ffc10ed8 ffc08008: 2f 9e 00 00 cmpwi cr7,r30,0 _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc0800c: 39 60 00 00 li r11,0 _IO_Driver_address_table[index] = driver_table[index]; ffc08010: 7f a4 eb 78 mr r4,r29 ffc08014: 38 1e 00 01 addi r0,r30,1 ffc08018: 40 be 00 30 bne+ cr7,ffc08048 <_IO_Manager_initialization+0x94><== ALWAYS TAKEN ffc0801c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc08020: 48 00 00 28 b ffc08048 <_IO_Manager_initialization+0x94><== 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; ffc08024: 93 fd 28 00 stw r31,10240(r29) _IO_Number_of_drivers = number_of_drivers; ffc08028: 93 da 27 fc stw r30,10236(r26) return; ffc0802c: 48 00 00 24 b ffc08050 <_IO_Manager_initialization+0x9c> _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]; ffc08030: 80 64 28 00 lwz r3,10240(r4) ffc08034: 7d 9f 5a 14 add r12,r31,r11 ffc08038: 7c 63 5a 14 add r3,r3,r11 ffc0803c: 7c ac c4 aa lswi r5,r12,24 ffc08040: 7c a3 c5 aa stswi r5,r3,24 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) ffc08044: 39 6b 00 18 addi r11,r11,24 ffc08048: 34 00 ff ff addic. r0,r0,-1 ffc0804c: 40 82 ff e4 bne+ ffc08030 <_IO_Manager_initialization+0x7c> _IO_Driver_address_table[index] = driver_table[index]; } ffc08050: 39 61 00 20 addi r11,r1,32 ffc08054: 48 00 d1 10 b ffc15164 <_restgpr_26_x> =============================================================================== ffc08d4c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc08d4c: 7c 2b 0b 78 mr r11,r1 ffc08d50: 94 21 ff f0 stwu r1,-16(r1) ffc08d54: 7c 08 02 a6 mflr r0 ffc08d58: 48 00 c3 d5 bl ffc1512c <_savegpr_31> _Internal_errors_What_happened.the_source = the_source; ffc08d5c: 3d 60 00 00 lis r11,0 ffc08d60: 39 2b 2d 10 addi r9,r11,11536 void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { ffc08d64: 90 01 00 14 stw r0,20(r1) ffc08d68: 7c bf 2b 78 mr r31,r5 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; ffc08d6c: 98 89 00 04 stb r4,4(r9) _Internal_errors_What_happened.the_error = the_error; ffc08d70: 90 a9 00 08 stw r5,8(r9) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; ffc08d74: 90 6b 2d 10 stw r3,11536(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 ); ffc08d78: 48 00 21 6d bl ffc0aee4 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; ffc08d7c: 38 00 00 05 li r0,5 ffc08d80: 3d 20 00 00 lis r9,0 _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); ffc08d84: 7f e3 fb 78 mr r3,r31 ffc08d88: 90 09 27 ec stw r0,10220(r9) ffc08d8c: 4b ff a5 55 bl ffc032e0 <_BSP_Fatal_error> ffc08d90: 48 00 00 00 b ffc08d90 <_Internal_error_Occurred+0x44><== NOT EXECUTED =============================================================================== ffc08da8 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc08da8: 94 21 ff f0 stwu r1,-16(r1) ffc08dac: 7c 08 02 a6 mflr r0 ffc08db0: 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 ) ffc08db4: 80 03 00 18 lwz r0,24(r3) */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { ffc08db8: bf c1 00 08 stmw r30,8(r1) ffc08dbc: 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 ) ffc08dc0: 2f 80 00 00 cmpwi cr7,r0,0 return NULL; ffc08dc4: 38 60 00 00 li r3,0 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) ffc08dc8: 41 be 00 70 beq+ cr7,ffc08e38 <_Objects_Allocate+0x90> <== NEVER TAKEN /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc08dcc: 3b df 00 20 addi r30,r31,32 ffc08dd0: 7f c3 f3 78 mr r3,r30 ffc08dd4: 4b ff f5 e9 bl ffc083bc <_Chain_Get> if ( information->auto_extend ) { ffc08dd8: 88 1f 00 12 lbz r0,18(r31) ffc08ddc: 2f 80 00 00 cmpwi cr7,r0,0 ffc08de0: 41 9e 00 58 beq- cr7,ffc08e38 <_Objects_Allocate+0x90> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { ffc08de4: 2f 83 00 00 cmpwi cr7,r3,0 ffc08de8: 40 be 00 1c bne+ cr7,ffc08e04 <_Objects_Allocate+0x5c> _Objects_Extend_information( information ); ffc08dec: 7f e3 fb 78 mr r3,r31 ffc08df0: 48 00 00 85 bl ffc08e74 <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); ffc08df4: 7f c3 f3 78 mr r3,r30 ffc08df8: 4b ff f5 c5 bl ffc083bc <_Chain_Get> } if ( the_object ) { ffc08dfc: 2c 03 00 00 cmpwi r3,0 ffc08e00: 41 a2 00 38 beq+ ffc08e38 <_Objects_Allocate+0x90> uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - ffc08e04: a1 23 00 0a lhz r9,10(r3) ffc08e08: a0 1f 00 0a lhz r0,10(r31) ffc08e0c: 7c 00 48 50 subf r0,r0,r9 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; ffc08e10: a1 3f 00 14 lhz r9,20(r31) ffc08e14: 7c 00 4b 96 divwu r0,r0,r9 information->inactive_per_block[ block ]--; ffc08e18: 81 3f 00 30 lwz r9,48(r31) ffc08e1c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc08e20: 7d 69 00 2e lwzx r11,r9,r0 ffc08e24: 39 6b ff ff addi r11,r11,-1 ffc08e28: 7d 69 01 2e stwx r11,r9,r0 information->inactive--; ffc08e2c: a1 3f 00 2c lhz r9,44(r31) ffc08e30: 38 09 ff ff addi r0,r9,-1 ffc08e34: b0 1f 00 2c sth r0,44(r31) ); } #endif return the_object; } ffc08e38: 39 61 00 10 addi r11,r1,16 ffc08e3c: 48 00 c3 38 b ffc15174 <_restgpr_30_x> =============================================================================== ffc08e74 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { ffc08e74: 94 21 ff b8 stwu r1,-72(r1) ffc08e78: 7c 08 02 a6 mflr r0 ffc08e7c: 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 ) ffc08e80: 81 63 00 34 lwz r11,52(r3) */ void _Objects_Extend_information( Objects_Information *information ) { ffc08e84: be a1 00 1c stmw r21,28(r1) ffc08e88: 7c 7f 1b 78 mr r31,r3 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc08e8c: 2f 8b 00 00 cmpwi cr7,r11,0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc08e90: a3 83 00 0a lhz r28,10(r3) index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) ffc08e94: 41 9e 00 54 beq- cr7,ffc08ee8 <_Objects_Extend_information+0x74> block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc08e98: a1 23 00 14 lhz r9,20(r3) * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc08e9c: 39 6b ff fc addi r11,r11,-4 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc08ea0: a3 63 00 10 lhz r27,16(r3) /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); ffc08ea4: 7f 9e e3 78 mr r30,r28 index_base = minimum_index; block = 0; ffc08ea8: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; ffc08eac: 7f 7b 4b 96 divwu r27,r27,r9 ffc08eb0: 2f 9b 00 00 cmpwi cr7,r27,0 * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc08eb4: 38 1b 00 01 addi r0,r27,1 ffc08eb8: 40 be 00 20 bne+ cr7,ffc08ed8 <_Objects_Extend_information+0x64><== ALWAYS TAKEN ffc08ebc: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc08ec0: 48 00 00 18 b ffc08ed8 <_Objects_Extend_information+0x64><== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { ffc08ec4: 85 4b 00 04 lwzu r10,4(r11) ffc08ec8: 2f 8a 00 00 cmpwi cr7,r10,0 ffc08ecc: 41 9e 00 30 beq- cr7,ffc08efc <_Objects_Extend_information+0x88> ffc08ed0: 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++ ) { ffc08ed4: 3b bd 00 01 addi r29,r29,1 ffc08ed8: 34 00 ff ff addic. r0,r0,-1 ffc08edc: 40 82 ff e8 bne+ ffc08ec4 <_Objects_Extend_information+0x50> /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc08ee0: 3b 20 00 01 li r25,1 ffc08ee4: 48 00 00 1c b ffc08f00 <_Objects_Extend_information+0x8c> minimum_index = _Objects_Get_index( information->minimum_id ); ffc08ee8: 7f 9e e3 78 mr r30,r28 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; ffc08eec: 3b 20 00 01 li r25,1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; ffc08ef0: 3b a0 00 00 li r29,0 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; ffc08ef4: 3b 60 00 00 li r27,0 ffc08ef8: 48 00 00 08 b ffc08f00 <_Objects_Extend_information+0x8c> else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { do_extend = false; ffc08efc: 3b 20 00 00 li r25,0 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; ffc08f00: a0 1f 00 14 lhz r0,20(r31) ffc08f04: a2 ff 00 10 lhz r23,16(r31) ffc08f08: 7e e0 ba 14 add r23,r0,r23 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { ffc08f0c: 2b 97 ff ff cmplwi cr7,r23,65535 ffc08f10: 41 9d 02 08 bgt- cr7,ffc09118 <_Objects_Extend_information+0x2a4> /* * 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; ffc08f14: 80 7f 00 18 lwz r3,24(r31) ffc08f18: 7c 60 19 d6 mullw r3,r0,r3 if ( information->auto_extend ) { ffc08f1c: 88 1f 00 12 lbz r0,18(r31) ffc08f20: 2f 80 00 00 cmpwi cr7,r0,0 ffc08f24: 41 9e 00 14 beq- cr7,ffc08f38 <_Objects_Extend_information+0xc4> new_object_block = _Workspace_Allocate( block_size ); ffc08f28: 48 00 24 cd bl ffc0b3f4 <_Workspace_Allocate> if ( !new_object_block ) ffc08f2c: 7c 7a 1b 79 mr. r26,r3 ffc08f30: 40 a2 00 10 bne+ ffc08f40 <_Objects_Extend_information+0xcc> ffc08f34: 48 00 01 e4 b ffc09118 <_Objects_Extend_information+0x2a4> return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); ffc08f38: 48 00 25 1d bl ffc0b454 <_Workspace_Allocate_or_fatal_error> ffc08f3c: 7c 7a 1b 78 mr r26,r3 } /* * Do we need to grow the tables? */ if ( do_extend ) { ffc08f40: 2f 99 00 00 cmpwi cr7,r25,0 ffc08f44: 41 9e 01 54 beq- cr7,ffc09098 <_Objects_Extend_information+0x224> */ /* * Up the block count and maximum */ block_count++; ffc08f48: 3b 3b 00 01 addi r25,r27,1 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc08f4c: 1c 19 00 03 mulli r0,r25,3 ((maximum + minimum_index) * sizeof(Objects_Control *)); ffc08f50: 7c 77 e2 14 add r3,r23,r28 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ffc08f54: 7c 63 02 14 add r3,r3,r0 ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); ffc08f58: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc08f5c: 48 00 24 99 bl ffc0b3f4 <_Workspace_Allocate> if ( !object_blocks ) { ffc08f60: 7c 76 1b 79 mr. r22,r3 ffc08f64: 40 a2 00 10 bne+ ffc08f74 <_Objects_Extend_information+0x100> _Workspace_Free( new_object_block ); ffc08f68: 7f 43 d3 78 mr r3,r26 ffc08f6c: 48 00 24 bd bl ffc0b428 <_Workspace_Free> return; ffc08f70: 48 00 01 a8 b ffc09118 <_Objects_Extend_information+0x2a4> * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc08f74: a0 1f 00 10 lhz r0,16(r31) } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( ffc08f78: 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); ffc08f7c: 7f 16 ca 14 add r24,r22,r25 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { ffc08f80: 7f 80 e0 40 cmplw cr7,r0,r28 ffc08f84: 7f 38 ca 14 add r25,r24,r25 ffc08f88: 41 9d 00 20 bgt- cr7,ffc08fa8 <_Objects_Extend_information+0x134> ffc08f8c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc08f90: 39 39 ff fc addi r9,r25,-4 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc08f94: 39 60 00 00 li r11,0 ffc08f98: 38 1c 00 01 addi r0,r28,1 ffc08f9c: 40 be 00 4c bne+ cr7,ffc08fe8 <_Objects_Extend_information+0x174><== ALWAYS TAKEN ffc08fa0: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc08fa4: 48 00 00 44 b ffc08fe8 <_Objects_Extend_information+0x174><== NOT EXECUTED * separate parts as size of each block has changed. */ memcpy( object_blocks, information->object_blocks, block_count * sizeof(void*) ); ffc08fa8: 57 75 10 3a rlwinm r21,r27,2,0,29 /* * Copy each section of the table over. This has to be performed as * separate parts as size of each block has changed. */ memcpy( object_blocks, ffc08fac: 80 9f 00 34 lwz r4,52(r31) ffc08fb0: 7e a5 ab 78 mr r5,r21 ffc08fb4: 48 00 7e 45 bl ffc10df8 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, ffc08fb8: 80 9f 00 30 lwz r4,48(r31) ffc08fbc: 7e a5 ab 78 mr r5,r21 ffc08fc0: 7f 03 c3 78 mr r3,r24 ffc08fc4: 48 00 7e 35 bl ffc10df8 information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc08fc8: a0 1f 00 10 lhz r0,16(r31) information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc08fcc: 80 9f 00 1c lwz r4,28(r31) ffc08fd0: 7f 23 cb 78 mr r3,r25 information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); ffc08fd4: 7f 9c 02 14 add r28,r28,r0 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, ffc08fd8: 57 85 10 3a rlwinm r5,r28,2,0,29 ffc08fdc: 48 00 7e 1d bl ffc10df8 ffc08fe0: 48 00 00 10 b ffc08ff0 <_Objects_Extend_information+0x17c> /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; ffc08fe4: 95 69 00 04 stwu r11,4(r9) } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { ffc08fe8: 34 00 ff ff addic. r0,r0,-1 ffc08fec: 40 82 ff f8 bne+ ffc08fe4 <_Objects_Extend_information+0x170> */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc08ff0: a1 5f 00 14 lhz r10,20(r31) * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc08ff4: 57 c9 10 3a rlwinm r9,r30,2,0,29 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc08ff8: 38 00 00 00 li r0,0 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc08ffc: 7d 7e 52 14 add r11,r30,r10 ffc09000: 7f 9e 58 40 cmplw cr7,r30,r11 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc09004: 57 7b 10 3a rlwinm r27,r27,2,0,29 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( ffc09008: 39 29 ff fc addi r9,r9,-4 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; ffc0900c: 7c 16 d9 2e stwx r0,r22,r27 inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); ffc09010: 7d 29 ca 14 add r9,r9,r25 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; ffc09014: 7c 18 d9 2e stwx r0,r24,r27 for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; ffc09018: 39 00 00 00 li r8,0 ffc0901c: 38 0a 00 01 addi r0,r10,1 ffc09020: 41 9d 00 0c bgt- cr7,ffc0902c <_Objects_Extend_information+0x1b8><== NEVER TAKEN ffc09024: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09028: 40 be 00 10 bne+ cr7,ffc09038 <_Objects_Extend_information+0x1c4><== ALWAYS TAKEN ffc0902c: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc09030: 48 00 00 08 b ffc09038 <_Objects_Extend_information+0x1c4><== NOT EXECUTED ffc09034: 95 09 00 04 stwu r8,4(r9) * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; ffc09038: 34 00 ff ff addic. r0,r0,-1 ffc0903c: 40 82 ff f8 bne+ ffc09034 <_Objects_Extend_information+0x1c0> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09040: 7c 00 00 a6 mfmsr r0 ffc09044: 7d 30 42 a6 mfsprg r9,0 ffc09048: 7c 09 48 78 andc r9,r0,r9 ffc0904c: 7d 20 01 24 mtmsr r9 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc09050: 81 3f 00 00 lwz r9,0(r31) old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc09054: 56 f7 04 3e clrlwi r23,r23,16 information->maximum_id = _Objects_Build_id( ffc09058: a1 7f 00 04 lhz r11,4(r31) ffc0905c: 55 29 c0 0e rlwinm r9,r9,24,0,7 old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; ffc09060: b2 ff 00 10 sth r23,16(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc09064: 55 6b d8 08 rlwinm r11,r11,27,0,4 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc09068: 65 29 00 01 oris r9,r9,1 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; ffc0906c: 80 7f 00 34 lwz r3,52(r31) (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc09070: 7d 29 5b 78 or r9,r9,r11 information->object_blocks = object_blocks; ffc09074: 92 df 00 34 stw r22,52(r31) uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc09078: 7d 37 bb 78 or r23,r9,r23 information->inactive_per_block = inactive_per_block; ffc0907c: 93 1f 00 30 stw r24,48(r31) information->local_table = local_table; ffc09080: 93 3f 00 1c stw r25,28(r31) information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( ffc09084: 92 ff 00 0c stw r23,12(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09088: 7c 00 01 24 mtmsr r0 information->maximum ); _ISR_Enable( level ); if ( old_tables ) ffc0908c: 2f 83 00 00 cmpwi cr7,r3,0 ffc09090: 41 9e 00 08 beq- cr7,ffc09098 <_Objects_Extend_information+0x224> _Workspace_Free( old_tables ); ffc09094: 48 00 23 95 bl ffc0b428 <_Workspace_Free> } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; ffc09098: 81 3f 00 34 lwz r9,52(r31) ffc0909c: 57 bd 10 3a rlwinm r29,r29,2,0,29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc090a0: 3b 81 00 08 addi r28,r1,8 ffc090a4: 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; ffc090a8: 7f 49 e9 2e stwx r26,r9,r29 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc090ac: 7f 83 e3 78 mr r3,r28 ffc090b0: 7f 44 d3 78 mr r4,r26 ffc090b4: 80 df 00 18 lwz r6,24(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc090b8: 3b 7f 00 20 addi r27,r31,32 information->object_blocks[ block ] = new_object_block; /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( ffc090bc: 48 00 49 dd bl ffc0da98 <_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 ) { ffc090c0: 48 00 00 30 b ffc090f0 <_Objects_Extend_information+0x27c> ffc090c4: 81 3f 00 00 lwz r9,0(r31) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc090c8: 7f 63 db 78 mr r3,r27 */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { the_object->id = _Objects_Build_id( ffc090cc: a0 1f 00 04 lhz r0,4(r31) ffc090d0: 55 29 c0 0e rlwinm r9,r9,24,0,7 ffc090d4: 65 29 00 01 oris r9,r9,1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | ffc090d8: 54 00 d8 08 rlwinm r0,r0,27,0,4 ffc090dc: 7d 20 03 78 or r0,r9,r0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | ffc090e0: 7c 00 f3 78 or r0,r0,r30 ffc090e4: 90 04 00 08 stw r0,8(r4) index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; ffc090e8: 3b de 00 01 addi r30,r30,1 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); ffc090ec: 4b ff f2 79 bl ffc08364 <_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 ) { ffc090f0: 7f 83 e3 78 mr r3,r28 ffc090f4: 4b ff f2 c9 bl ffc083bc <_Chain_Get> ffc090f8: 7c 64 1b 79 mr. r4,r3 ffc090fc: 40 82 ff c8 bne+ ffc090c4 <_Objects_Extend_information+0x250> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; ffc09100: a0 1f 00 14 lhz r0,20(r31) ffc09104: 81 3f 00 30 lwz r9,48(r31) ffc09108: 7c 09 e9 2e stwx r0,r9,r29 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); ffc0910c: a1 3f 00 2c lhz r9,44(r31) ffc09110: 7c 00 4a 14 add r0,r0,r9 index++; } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = ffc09114: b0 1f 00 2c sth r0,44(r31) (Objects_Maximum)(information->inactive + information->allocation_size); } ffc09118: 39 61 00 48 addi r11,r1,72 ffc0911c: 48 00 c0 34 b ffc15150 <_restgpr_21_x> =============================================================================== ffc091d4 <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc091d4: 94 21 ff e8 stwu r1,-24(r1) ffc091d8: 7c 08 02 a6 mflr r0 ffc091dc: bf a1 00 0c stmw r29,12(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc091e0: 7c 9d 23 79 mr. r29,r4 Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { ffc091e4: 7c 7e 1b 78 mr r30,r3 ffc091e8: 90 01 00 1c stw r0,28(r1) Objects_Information *info; int the_class_api_maximum; if ( !the_class ) return NULL; ffc091ec: 3b e0 00 00 li r31,0 ) { Objects_Information *info; int the_class_api_maximum; if ( !the_class ) ffc091f0: 41 a2 00 50 beq+ ffc09240 <_Objects_Get_information+0x6c> /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); ffc091f4: 48 00 4e 25 bl ffc0e018 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) ffc091f8: 2c 03 00 00 cmpwi r3,0 ffc091fc: 41 a2 00 44 beq+ ffc09240 <_Objects_Get_information+0x6c> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) ffc09200: 7f 9d 18 40 cmplw cr7,r29,r3 ffc09204: 41 bd 00 3c bgt+ cr7,ffc09240 <_Objects_Get_information+0x6c> return NULL; if ( !_Objects_Information_table[ the_api ] ) ffc09208: 3d 20 00 00 lis r9,0 ffc0920c: 57 de 10 3a rlwinm r30,r30,2,0,29 ffc09210: 39 29 2c 00 addi r9,r9,11264 ffc09214: 7d 29 f0 2e lwzx r9,r9,r30 ffc09218: 2f 89 00 00 cmpwi cr7,r9,0 ffc0921c: 41 be 00 24 beq+ cr7,ffc09240 <_Objects_Get_information+0x6c><== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; ffc09220: 57 bd 10 3a rlwinm r29,r29,2,0,29 ffc09224: 7f e9 e8 2e lwzx r31,r9,r29 if ( !info ) ffc09228: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0922c: 41 be 00 14 beq+ cr7,ffc09240 <_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 ) ffc09230: a0 1f 00 10 lhz r0,16(r31) ffc09234: 2f 80 00 00 cmpwi cr7,r0,0 ffc09238: 40 be 00 08 bne+ cr7,ffc09240 <_Objects_Get_information+0x6c> return NULL; ffc0923c: 3b e0 00 00 li r31,0 #endif return info; } ffc09240: 39 61 00 18 addi r11,r1,24 ffc09244: 7f e3 fb 78 mr r3,r31 ffc09248: 48 00 bf 28 b ffc15170 <_restgpr_29_x> =============================================================================== ffc1b934 <_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; ffc1b934: 80 03 00 08 lwz r0,8(r3) if ( information->maximum >= index ) { ffc1b938: a1 23 00 10 lhz r9,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; ffc1b93c: 20 00 00 01 subfic r0,r0,1 ffc1b940: 7c 00 22 14 add r0,r0,r4 if ( information->maximum >= index ) { ffc1b944: 7f 89 00 40 cmplw cr7,r9,r0 ffc1b948: 41 9c 00 24 blt- cr7,ffc1b96c <_Objects_Get_no_protection+0x38> if ( (the_object = information->local_table[ index ]) != NULL ) { ffc1b94c: 81 23 00 1c lwz r9,28(r3) ffc1b950: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc1b954: 7c 69 00 2e lwzx r3,r9,r0 ffc1b958: 2f 83 00 00 cmpwi cr7,r3,0 ffc1b95c: 41 9e 00 10 beq- cr7,ffc1b96c <_Objects_Get_no_protection+0x38><== NEVER TAKEN *location = OBJECTS_LOCAL; ffc1b960: 38 00 00 00 li r0,0 ffc1b964: 90 05 00 00 stw r0,0(r5) return the_object; ffc1b968: 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; ffc1b96c: 38 00 00 01 li r0,1 ffc1b970: 90 05 00 00 stw r0,0(r5) return NULL; ffc1b974: 38 60 00 00 li r3,0 } ffc1b978: 4e 80 00 20 blr =============================================================================== ffc0ac54 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0ac54: 94 21 ff e0 stwu r1,-32(r1) ffc0ac58: 7c 08 02 a6 mflr r0 ffc0ac5c: bf c1 00 18 stmw r30,24(r1) ffc0ac60: 7c 9e 23 78 mr r30,r4 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; ffc0ac64: 7c 64 1b 79 mr. r4,r3 */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { ffc0ac68: 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; ffc0ac6c: 40 82 00 10 bne- ffc0ac7c <_Objects_Id_to_name+0x28> ffc0ac70: 3d 20 00 00 lis r9,0 ffc0ac74: 81 29 31 90 lwz r9,12688(r9) ffc0ac78: 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); ffc0ac7c: 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 ) ffc0ac80: 38 09 ff ff addi r0,r9,-1 ffc0ac84: 2b 80 00 02 cmplwi cr7,r0,2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; ffc0ac88: 3b e0 00 03 li r31,3 ffc0ac8c: 41 9d 00 44 bgt- cr7,ffc0acd0 <_Objects_Id_to_name+0x7c> ffc0ac90: 48 00 00 4c b ffc0acdc <_Objects_Id_to_name+0x88> if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; ffc0ac94: 54 80 3e 7a rlwinm r0,r4,7,25,29 ffc0ac98: 7c 69 00 2e lwzx r3,r9,r0 if ( !information ) ffc0ac9c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0aca0: 41 9e 00 30 beq- cr7,ffc0acd0 <_Objects_Id_to_name+0x7c><== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) ffc0aca4: 88 03 00 38 lbz r0,56(r3) ffc0aca8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0acac: 40 9e 00 24 bne- cr7,ffc0acd0 <_Objects_Id_to_name+0x7c><== NEVER TAKEN return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); ffc0acb0: 38 a1 00 08 addi r5,r1,8 ffc0acb4: 4b ff ff 25 bl ffc0abd8 <_Objects_Get> if ( !the_object ) ffc0acb8: 2c 03 00 00 cmpwi r3,0 ffc0acbc: 41 82 00 14 beq- ffc0acd0 <_Objects_Id_to_name+0x7c> return OBJECTS_INVALID_ID; *name = the_object->name; ffc0acc0: 80 03 00 0c lwz r0,12(r3) _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; ffc0acc4: 3b e0 00 00 li r31,0 the_object = _Objects_Get( information, tmpId, &ignored_location ); if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; ffc0acc8: 90 1e 00 00 stw r0,0(r30) _Thread_Enable_dispatch(); ffc0accc: 48 00 0c a9 bl ffc0b974 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } ffc0acd0: 39 61 00 20 addi r11,r1,32 ffc0acd4: 7f e3 fb 78 mr r3,r31 ffc0acd8: 4b ff 69 c0 b ffc01698 <_restgpr_30_x> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) ffc0acdc: 3d 60 00 00 lis r11,0 ffc0ace0: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc0ace4: 39 6b 2c 80 addi r11,r11,11392 ffc0ace8: 7d 2b 48 2e lwzx r9,r11,r9 ffc0acec: 2f 89 00 00 cmpwi cr7,r9,0 ffc0acf0: 40 9e ff a4 bne+ cr7,ffc0ac94 <_Objects_Id_to_name+0x40> ffc0acf4: 4b ff ff dc b ffc0acd0 <_Objects_Id_to_name+0x7c> =============================================================================== ffc09500 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { ffc09500: 94 21 ff e8 stwu r1,-24(r1) ffc09504: 7c 08 02 a6 mflr r0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc09508: 39 20 00 00 li r9,0 */ void _Objects_Shrink_information( Objects_Information *information ) { ffc0950c: 90 01 00 1c stw r0,28(r1) ffc09510: bf 81 00 08 stmw r28,8(r1) ffc09514: 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 ); ffc09518: a3 c3 00 0a lhz r30,10(r3) block_count = (information->maximum - index_base) / ffc0951c: a1 43 00 10 lhz r10,16(r3) ffc09520: a1 63 00 14 lhz r11,20(r3) ffc09524: 7d 5e 50 50 subf r10,r30,r10 ffc09528: 7d 4a 5b 96 divwu r10,r10,r11 ffc0952c: 2f 8a 00 00 cmpwi cr7,r10,0 information->allocation_size; for ( block = 0; block < block_count; block++ ) { ffc09530: 38 0a 00 01 addi r0,r10,1 ffc09534: 40 be 00 90 bne+ cr7,ffc095c4 <_Objects_Shrink_information+0xc4><== ALWAYS TAKEN ffc09538: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc0953c: 48 00 00 88 b ffc095c4 <_Objects_Shrink_information+0xc4><== NOT EXECUTED if ( information->inactive_per_block[ block ] == ffc09540: 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++ ) { ffc09544: 55 3d 10 3a rlwinm r29,r9,2,0,29 if ( information->inactive_per_block[ block ] == ffc09548: 7d 4a e8 2e lwzx r10,r10,r29 ffc0954c: 7f 8a 58 00 cmpw cr7,r10,r11 ffc09550: 40 be 00 6c bne+ cr7,ffc095bc <_Objects_Shrink_information+0xbc> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); ffc09554: 80 7f 00 20 lwz r3,32(r31) ffc09558: 48 00 00 08 b ffc09560 <_Objects_Shrink_information+0x60> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; ffc0955c: 7f 83 e3 78 mr r3,r28 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); ffc09560: 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; ffc09564: 83 83 00 00 lwz r28,0(r3) if ((index >= index_base) && ffc09568: 7f 80 f0 40 cmplw cr7,r0,r30 ffc0956c: 41 9c 00 18 blt- cr7,ffc09584 <_Objects_Shrink_information+0x84> (index < (index_base + information->allocation_size))) { ffc09570: a1 3f 00 14 lhz r9,20(r31) ffc09574: 7d 3e 4a 14 add r9,r30,r9 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && ffc09578: 7f 80 48 40 cmplw cr7,r0,r9 ffc0957c: 40 bc 00 08 bge+ cr7,ffc09584 <_Objects_Shrink_information+0x84> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); ffc09580: 4b ff ee 15 bl ffc08394 <_Chain_Extract> } } while ( the_object ); ffc09584: 2f 9c 00 00 cmpwi cr7,r28,0 ffc09588: 40 9e ff d4 bne+ cr7,ffc0955c <_Objects_Shrink_information+0x5c> /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); ffc0958c: 81 3f 00 34 lwz r9,52(r31) ffc09590: 7c 69 e8 2e lwzx r3,r9,r29 ffc09594: 48 00 1e 95 bl ffc0b428 <_Workspace_Free> information->object_blocks[ block ] = NULL; ffc09598: 81 3f 00 34 lwz r9,52(r31) information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; ffc0959c: 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; ffc095a0: 7f 89 e9 2e stwx r28,r9,r29 information->inactive_per_block[ block ] = 0; ffc095a4: 81 3f 00 30 lwz r9,48(r31) ffc095a8: 7f 89 e9 2e stwx r28,r9,r29 information->inactive -= information->allocation_size; ffc095ac: a1 3f 00 2c lhz r9,44(r31) ffc095b0: 7c 00 48 50 subf r0,r0,r9 ffc095b4: b0 1f 00 2c sth r0,44(r31) return; ffc095b8: 48 00 00 14 b ffc095cc <_Objects_Shrink_information+0xcc> } index_base += information->allocation_size; ffc095bc: 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++ ) { ffc095c0: 39 29 00 01 addi r9,r9,1 ffc095c4: 34 00 ff ff addic. r0,r0,-1 ffc095c8: 40 82 ff 78 bne+ ffc09540 <_Objects_Shrink_information+0x40> return; } index_base += information->allocation_size; } } ffc095cc: 39 61 00 18 addi r11,r1,24 ffc095d0: 48 00 bb 9c b ffc1516c <_restgpr_28_x> =============================================================================== ffc0a1e4 <_POSIX_Absolute_timeout_to_ticks>: */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0a1e4: 94 21 ff d8 stwu r1,-40(r1) ffc0a1e8: 7c 08 02 a6 mflr r0 ffc0a1ec: 90 01 00 2c stw r0,44(r1) /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0a1f0: 38 00 00 00 li r0,0 */ POSIX_Absolute_timeout_conversion_results_t _POSIX_Absolute_timeout_to_ticks( const struct timespec *abstime, Watchdog_Interval *ticks_out ) { ffc0a1f4: bf 81 00 18 stmw r28,24(r1) ffc0a1f8: 7c 7c 1b 78 mr r28,r3 ffc0a1fc: 7c 9f 23 78 mr r31,r4 /* * Make sure there is always a value returned. */ *ticks_out = 0; ffc0a200: 90 04 00 00 stw r0,0(r4) /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) ffc0a204: 48 00 45 55 bl ffc0e758 <_Timespec_Is_valid> return POSIX_ABSOLUTE_TIMEOUT_INVALID; ffc0a208: 38 00 00 00 li r0,0 *ticks_out = 0; /* * Is the absolute time even valid? */ if ( !_Timespec_Is_valid(abstime) ) ffc0a20c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a210: 41 be 00 58 beq+ cr7,ffc0a268 <_POSIX_Absolute_timeout_to_ticks+0x84> return POSIX_ABSOLUTE_TIMEOUT_INVALID; /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); ffc0a214: 3b a1 00 08 addi r29,r1,8 ffc0a218: 7f a3 eb 78 mr r3,r29 ffc0a21c: 48 00 1f 9d bl ffc0c1b8 <_TOD_Get> if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0a220: 7f 83 e3 78 mr r3,r28 ffc0a224: 7f a4 eb 78 mr r4,r29 ffc0a228: 48 00 45 71 bl ffc0e798 <_Timespec_Less_than> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; ffc0a22c: 38 00 00 01 li r0,1 /* * Is the absolute time in the past? */ _TOD_Get( ¤t_time ); if ( _Timespec_Less_than( abstime, ¤t_time ) ) ffc0a230: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a234: 40 9e 00 34 bne- cr7,ffc0a268 <_POSIX_Absolute_timeout_to_ticks+0x84> return POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST; /* * How long until the requested absolute time? */ _Timespec_Subtract( ¤t_time, abstime, &difference ); ffc0a238: 3b c1 00 10 addi r30,r1,16 ffc0a23c: 7f a3 eb 78 mr r3,r29 ffc0a240: 7f 84 e3 78 mr r4,r28 ffc0a244: 7f c5 f3 78 mr r5,r30 ffc0a248: 48 00 45 8d bl ffc0e7d4 <_Timespec_Subtract> /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0a24c: 7f c3 f3 78 mr r3,r30 ffc0a250: 48 00 45 c9 bl ffc0e818 <_Timespec_To_ticks> /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; ffc0a254: 38 00 00 03 li r0,3 /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0a258: 2f 83 00 00 cmpwi cr7,r3,0 _Timespec_Subtract( ¤t_time, abstime, &difference ); /* * Internally the SuperCore uses ticks, so convert to them. */ *ticks_out = _Timespec_To_ticks( &difference ); ffc0a25c: 90 7f 00 00 stw r3,0(r31) /* * If the difference was 0, then the future is now. It is so bright * we better wear shades. */ if ( !*ticks_out ) ffc0a260: 40 be 00 08 bne+ cr7,ffc0a268 <_POSIX_Absolute_timeout_to_ticks+0x84><== ALWAYS TAKEN return POSIX_ABSOLUTE_TIMEOUT_IS_NOW; ffc0a264: 38 00 00 02 li r0,2 <== NOT EXECUTED /* * This is the case we were expecting and it took this long to * get here. */ return POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE; } ffc0a268: 39 61 00 28 addi r11,r1,40 ffc0a26c: 7c 03 03 78 mr r3,r0 ffc0a270: 4b ff 89 10 b ffc02b80 <_restgpr_28_x> =============================================================================== ffc0cc94 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { ffc0cc94: 94 21 ff c8 stwu r1,-56(r1) ffc0cc98: 7c 08 02 a6 mflr r0 ffc0cc9c: bf 61 00 24 stmw r27,36(r1) ffc0cca0: 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( ffc0cca4: 3c 60 00 00 lis r3,0 ffc0cca8: 7c 9d 23 78 mr r29,r4 ffc0ccac: 90 01 00 3c stw r0,60(r1) ffc0ccb0: 7c bc 2b 78 mr r28,r5 ffc0ccb4: 38 63 36 18 addi r3,r3,13848 ffc0ccb8: 91 01 00 18 stw r8,24(r1) ffc0ccbc: 7f e4 fb 78 mr r4,r31 ffc0ccc0: 38 a1 00 08 addi r5,r1,8 ffc0ccc4: 7c de 33 78 mr r30,r6 ffc0ccc8: 7c fb 3b 78 mr r27,r7 ffc0cccc: 48 00 35 21 bl ffc101ec <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { ffc0ccd0: 80 01 00 08 lwz r0,8(r1) ffc0ccd4: 81 01 00 18 lwz r8,24(r1) ffc0ccd8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ccdc: 40 9e 00 c8 bne- cr7,ffc0cda4 <_POSIX_Message_queue_Receive_support+0x110> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { ffc0cce0: 81 23 00 14 lwz r9,20(r3) ffc0cce4: 55 20 07 be clrlwi r0,r9,30 ffc0cce8: 2f 80 00 01 cmpwi cr7,r0,1 ffc0ccec: 40 be 00 0c bne+ cr7,ffc0ccf8 <_POSIX_Message_queue_Receive_support+0x64> _Thread_Enable_dispatch(); ffc0ccf0: 48 00 42 91 bl ffc10f80 <_Thread_Enable_dispatch> ffc0ccf4: 48 00 00 b0 b ffc0cda4 <_POSIX_Message_queue_Receive_support+0x110> rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; ffc0ccf8: 80 63 00 10 lwz r3,16(r3) if ( msg_len < the_mq->Message_queue.maximum_message_size ) { ffc0ccfc: 80 03 00 68 lwz r0,104(r3) ffc0cd00: 7f 9c 00 40 cmplw cr7,r28,r0 ffc0cd04: 40 bc 00 14 bge+ cr7,ffc0cd18 <_POSIX_Message_queue_Receive_support+0x84> _Thread_Enable_dispatch(); ffc0cd08: 48 00 42 79 bl ffc10f80 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); ffc0cd0c: 48 00 ad 45 bl ffc17a50 <__errno> ffc0cd10: 38 00 00 7a li r0,122 ffc0cd14: 48 00 00 98 b ffc0cdac <_POSIX_Message_queue_Receive_support+0x118> length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0cd18: 2f 9b 00 00 cmpwi cr7,r27,0 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; ffc0cd1c: 38 00 ff ff li r0,-1 ffc0cd20: 90 01 00 0c stw r0,12(r1) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) ffc0cd24: 38 00 00 00 li r0,0 ffc0cd28: 41 9e 00 10 beq- cr7,ffc0cd38 <_POSIX_Message_queue_Receive_support+0xa4><== NEVER TAKEN do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true; ffc0cd2c: 71 20 40 00 andi. r0,r9,16384 ffc0cd30: 7c 00 00 26 mfcr r0 ffc0cd34: 54 00 1f fe rlwinm r0,r0,3,31,31 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0cd38: 7f e4 fb 78 mr r4,r31 timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0cd3c: 3f e0 00 00 lis r31,0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0cd40: 7c 07 03 78 mr r7,r0 ffc0cd44: 38 63 00 1c addi r3,r3,28 ffc0cd48: 7f a5 eb 78 mr r5,r29 ffc0cd4c: 38 c1 00 0c addi r6,r1,12 timeout ); _Thread_Enable_dispatch(); *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0cd50: 3b ff 36 84 addi r31,r31,13956 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( ffc0cd54: 48 00 23 29 bl ffc0f07c <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); ffc0cd58: 48 00 42 29 bl ffc10f80 <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); ffc0cd5c: 81 3f 00 0c lwz r9,12(r31) RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); ffc0cd60: 80 09 00 24 lwz r0,36(r9) ffc0cd64: 7c 0b fe 70 srawi r11,r0,31 ffc0cd68: 7d 60 02 78 xor r0,r11,r0 ffc0cd6c: 7c 0b 00 50 subf r0,r11,r0 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = ffc0cd70: 90 1e 00 00 stw r0,0(r30) _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) ffc0cd74: 80 09 00 34 lwz r0,52(r9) ffc0cd78: 2f 80 00 00 cmpwi cr7,r0,0 ffc0cd7c: 40 9e 00 0c bne- cr7,ffc0cd88 <_POSIX_Message_queue_Receive_support+0xf4> return length_out; ffc0cd80: 80 61 00 0c lwz r3,12(r1) ffc0cd84: 48 00 00 30 b ffc0cdb4 <_POSIX_Message_queue_Receive_support+0x120> rtems_set_errno_and_return_minus_one( ffc0cd88: 48 00 ac c9 bl ffc17a50 <__errno> ffc0cd8c: 81 3f 00 0c lwz r9,12(r31) ffc0cd90: 7c 7e 1b 78 mr r30,r3 ffc0cd94: 80 69 00 34 lwz r3,52(r9) ffc0cd98: 48 00 02 a5 bl ffc0d03c <_POSIX_Message_queue_Translate_core_message_queue_return_code> ffc0cd9c: 90 7e 00 00 stw r3,0(r30) ffc0cda0: 48 00 00 10 b ffc0cdb0 <_POSIX_Message_queue_Receive_support+0x11c> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); ffc0cda4: 48 00 ac ad bl ffc17a50 <__errno> ffc0cda8: 38 00 00 09 li r0,9 ffc0cdac: 90 03 00 00 stw r0,0(r3) ffc0cdb0: 38 60 ff ff li r3,-1 } ffc0cdb4: 39 61 00 38 addi r11,r1,56 ffc0cdb8: 4b ff 8b 28 b ffc058e0 <_restgpr_27_x> =============================================================================== ffc0d0ec <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { ffc0d0ec: 7c 08 02 a6 mflr r0 ffc0d0f0: 94 21 ff f8 stwu r1,-8(r1) ffc0d0f4: 90 01 00 0c stw r0,12(r1) POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0d0f8: 81 23 01 34 lwz r9,308(r3) if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc0d0fc: 80 09 00 d8 lwz r0,216(r9) ffc0d100: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d104: 40 9e 00 38 bne- cr7,ffc0d13c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50><== NEVER TAKEN ffc0d108: 80 09 00 dc lwz r0,220(r9) ffc0d10c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0d110: 40 be 00 2c bne+ cr7,ffc0d13c <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x50> thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && ffc0d114: 80 09 00 e0 lwz r0,224(r9) ffc0d118: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d11c: 41 be 00 20 beq+ cr7,ffc0d13c <_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; ffc0d120: 3d 20 00 00 lis r9,0 ffc0d124: 81 69 27 f4 lwz r11,10228(r9) thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); ffc0d128: 38 80 ff ff li r4,-1 ffc0d12c: 38 0b ff ff addi r0,r11,-1 ffc0d130: 90 09 27 f4 stw r0,10228(r9) ffc0d134: 48 00 08 45 bl ffc0d978 <_POSIX_Thread_Exit> ffc0d138: 48 00 00 08 b ffc0d140 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x54> } else _Thread_Enable_dispatch(); ffc0d13c: 4b ff d3 d9 bl ffc0a514 <_Thread_Enable_dispatch> } ffc0d140: 80 01 00 0c lwz r0,12(r1) ffc0d144: 38 21 00 08 addi r1,r1,8 ffc0d148: 7c 08 03 a6 mtlr r0 ffc0d14c: 4e 80 00 20 blr =============================================================================== ffc0e6e4 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { ffc0e6e4: 94 21 ff e0 stwu r1,-32(r1) ffc0e6e8: 7c 08 02 a6 mflr r0 ffc0e6ec: bf 61 00 0c stmw r27,12(r1) ffc0e6f0: 7c 7f 1b 78 mr r31,r3 ffc0e6f4: 7c 9e 23 78 mr r30,r4 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc0e6f8: 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 ) { ffc0e6fc: 7c bd 2b 78 mr r29,r5 ffc0e700: 90 01 00 24 stw r0,36(r1) ffc0e704: 7c db 33 78 mr r27,r6 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc0e708: 4b ff ff b5 bl ffc0e6bc <_POSIX_Priority_Is_valid> return EINVAL; ffc0e70c: 3b 80 00 16 li r28,22 struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) ffc0e710: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e714: 41 9e 00 c8 beq- cr7,ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { ffc0e718: 2f 9f 00 00 cmpwi cr7,r31,0 ) { if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc0e71c: 38 00 00 00 li r0,0 ffc0e720: 90 1d 00 00 stw r0,0(r29) *budget_callout = NULL; ffc0e724: 90 1b 00 00 stw r0,0(r27) if ( policy == SCHED_OTHER ) { ffc0e728: 40 be 00 10 bne+ cr7,ffc0e738 <_POSIX_Thread_Translate_sched_param+0x54> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc0e72c: 38 00 00 01 li r0,1 ffc0e730: 90 1d 00 00 stw r0,0(r29) ffc0e734: 48 00 00 a4 b ffc0e7d8 <_POSIX_Thread_Translate_sched_param+0xf4> return 0; } if ( policy == SCHED_FIFO ) { ffc0e738: 2f 9f 00 01 cmpwi cr7,r31,1 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; ffc0e73c: 3b 80 00 00 li r28,0 if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { ffc0e740: 41 9e 00 9c beq- cr7,ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { ffc0e744: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0e748: 40 be 00 0c bne+ cr7,ffc0e754 <_POSIX_Thread_Translate_sched_param+0x70> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; ffc0e74c: 93 fd 00 00 stw r31,0(r29) return 0; ffc0e750: 48 00 00 8c b ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8> } if ( policy == SCHED_SPORADIC ) { ffc0e754: 2f 9f 00 04 cmpwi cr7,r31,4 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; ffc0e758: 3b 80 00 16 li r28,22 if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { ffc0e75c: 40 be 00 80 bne+ cr7,ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8> if ( (param->sched_ss_repl_period.tv_sec == 0) && ffc0e760: 80 1e 00 08 lwz r0,8(r30) ffc0e764: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e768: 40 9e 00 10 bne- cr7,ffc0e778 <_POSIX_Thread_Translate_sched_param+0x94> ffc0e76c: 80 1e 00 0c lwz r0,12(r30) ffc0e770: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e774: 41 9e 00 68 beq- cr7,ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc0e778: 80 1e 00 10 lwz r0,16(r30) ffc0e77c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e780: 40 9e 00 14 bne- cr7,ffc0e794 <_POSIX_Thread_Translate_sched_param+0xb0> ffc0e784: 80 1e 00 14 lwz r0,20(r30) (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; ffc0e788: 3b 80 00 16 li r28,22 if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && ffc0e78c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0e790: 41 9e 00 4c beq- cr7,ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc0e794: 38 7e 00 08 addi r3,r30,8 ffc0e798: 4b ff da 25 bl ffc0c1bc <_Timespec_To_ticks> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; ffc0e79c: 3b 80 00 16 li r28,22 if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc0e7a0: 7c 7f 1b 78 mr r31,r3 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) ffc0e7a4: 38 7e 00 10 addi r3,r30,16 ffc0e7a8: 4b ff da 15 bl ffc0c1bc <_Timespec_To_ticks> if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < ffc0e7ac: 7f 9f 18 40 cmplw cr7,r31,r3 ffc0e7b0: 41 9c 00 2c blt- cr7,ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) ffc0e7b4: 80 7e 00 04 lwz r3,4(r30) ffc0e7b8: 4b ff ff 05 bl ffc0e6bc <_POSIX_Priority_Is_valid> ffc0e7bc: 2f 83 00 00 cmpwi cr7,r3,0 ffc0e7c0: 41 9e 00 1c beq- cr7,ffc0e7dc <_POSIX_Thread_Translate_sched_param+0xf8> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; ffc0e7c4: 38 00 00 03 li r0,3 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc0e7c8: 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; ffc0e7cc: 90 1d 00 00 stw r0,0(r29) *budget_callout = _POSIX_Threads_Sporadic_budget_callout; ffc0e7d0: 38 09 81 60 addi r0,r9,-32416 ffc0e7d4: 90 1b 00 00 stw r0,0(r27) return 0; ffc0e7d8: 3b 80 00 00 li r28,0 } return EINVAL; } ffc0e7dc: 39 61 00 20 addi r11,r1,32 ffc0e7e0: 7f 83 e3 78 mr r3,r28 ffc0e7e4: 4b ff 23 f0 b ffc00bd4 <_restgpr_27_x> =============================================================================== ffc07e44 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc07e44: 94 21 ff 90 stwu r1,-112(r1) ffc07e48: 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; ffc07e4c: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc07e50: 90 01 00 74 stw r0,116(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; ffc07e54: 39 29 20 84 addi r9,r9,8324 * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { ffc07e58: bf 61 00 5c stmw r27,92(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; ffc07e5c: 83 c9 00 34 lwz r30,52(r9) maximum = Configuration_POSIX_API.number_of_initialization_threads; ffc07e60: 83 89 00 30 lwz r28,48(r9) if ( !user_threads || maximum == 0 ) ffc07e64: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07e68: 41 9e 00 70 beq- cr7,ffc07ed8 <_POSIX_Threads_Initialize_user_threads_body+0x94><== NEVER TAKEN ffc07e6c: 2f 9c 00 00 cmpwi cr7,r28,0 ffc07e70: 41 9e 00 68 beq- cr7,ffc07ed8 <_POSIX_Threads_Initialize_user_threads_body+0x94><== NEVER TAKEN ffc07e74: 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 ); ffc07e78: 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( ffc07e7c: 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 ); ffc07e80: 7f e3 fb 78 mr r3,r31 ffc07e84: 48 00 69 65 bl ffc0e7e8 (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); ffc07e88: 38 80 00 02 li r4,2 ffc07e8c: 7f e3 fb 78 mr r3,r31 ffc07e90: 48 00 69 99 bl ffc0e828 (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); ffc07e94: 80 9e 00 04 lwz r4,4(r30) ffc07e98: 7f e3 fb 78 mr r3,r31 ffc07e9c: 48 00 69 c5 bl ffc0e860 status = pthread_create( ffc07ea0: 80 be 00 00 lwz r5,0(r30) ffc07ea4: 7f 63 db 78 mr r3,r27 ffc07ea8: 7f e4 fb 78 mr r4,r31 ffc07eac: 38 c0 00 00 li r6,0 ffc07eb0: 4b ff fc c9 bl ffc07b78 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) ffc07eb4: 7c 65 1b 79 mr. r5,r3 ffc07eb8: 41 a2 00 10 beq+ ffc07ec8 <_POSIX_Threads_Initialize_user_threads_body+0x84> _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); ffc07ebc: 38 60 00 02 li r3,2 ffc07ec0: 38 80 00 01 li r4,1 ffc07ec4: 48 00 22 89 bl ffc0a14c <_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++ ) { ffc07ec8: 3b bd 00 01 addi r29,r29,1 ffc07ecc: 7f 9d e0 40 cmplw cr7,r29,r28 ffc07ed0: 3b de 00 08 addi r30,r30,8 ffc07ed4: 41 9c ff ac blt+ cr7,ffc07e80 <_POSIX_Threads_Initialize_user_threads_body+0x3c><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } ffc07ed8: 39 61 00 70 addi r11,r1,112 ffc07edc: 4b ff 8c f8 b ffc00bd4 <_restgpr_27_x> =============================================================================== ffc0d2c0 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { ffc0d2c0: 94 21 ff f0 stwu r1,-16(r1) ffc0d2c4: 7c 08 02 a6 mflr r0 ffc0d2c8: 90 01 00 14 stw r0,20(r1) ffc0d2cc: bf c1 00 08 stmw r30,8(r1) ffc0d2d0: 7c 9e 23 78 mr r30,r4 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0d2d4: 83 e4 01 34 lwz r31,308(r4) /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); ffc0d2d8: 38 7f 00 98 addi r3,r31,152 ffc0d2dc: 48 00 11 a9 bl ffc0e484 <_Timespec_To_ticks> RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); ffc0d2e0: 3d 20 00 00 lis r9,0 ffc0d2e4: 80 1f 00 88 lwz r0,136(r31) ffc0d2e8: 88 89 26 ec lbz r4,9964(r9) the_thread->cpu_time_budget = ticks; ffc0d2ec: 90 7e 00 78 stw r3,120(r30) ffc0d2f0: 7c 80 20 50 subf r4,r0,r4 */ #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 ) { ffc0d2f4: 80 1e 00 1c lwz r0,28(r30) ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; ffc0d2f8: 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 ) { ffc0d2fc: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d300: 40 9e 00 1c bne- cr7,ffc0d31c <_POSIX_Threads_Sporadic_budget_TSR+0x5c><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { ffc0d304: 80 1e 00 14 lwz r0,20(r30) ffc0d308: 7f 80 20 40 cmplw cr7,r0,r4 ffc0d30c: 40 bd 00 10 ble+ cr7,ffc0d31c <_POSIX_Threads_Sporadic_budget_TSR+0x5c> _Thread_Change_priority( the_thread, new_priority, true ); ffc0d310: 7f c3 f3 78 mr r3,r30 ffc0d314: 38 a0 00 01 li r5,1 ffc0d318: 4b ff c7 35 bl ffc09a4c <_Thread_Change_priority> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); ffc0d31c: 38 7f 00 90 addi r3,r31,144 ffc0d320: 48 00 11 65 bl ffc0e484 <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0d324: 38 9f 00 a8 addi r4,r31,168 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0d328: 90 7f 00 b4 stw r3,180(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc0d32c: 3c 60 00 00 lis r3,0 ffc0d330: 38 63 2d 28 addi r3,r3,11560 ffc0d334: 4b ff dd 95 bl ffc0b0c8 <_Watchdog_Insert> _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); } ffc0d338: 39 61 00 10 addi r11,r1,16 ffc0d33c: 48 00 7e 38 b ffc15174 <_restgpr_30_x> =============================================================================== ffc0d340 <_POSIX_Threads_Sporadic_budget_callout>: * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { ffc0d340: 7c 08 02 a6 mflr r0 ffc0d344: 94 21 ff f8 stwu r1,-8(r1) ffc0d348: 3d 40 00 00 lis r10,0 ffc0d34c: 90 01 00 0c stw r0,12(r1) /* * 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 */ ffc0d350: 38 00 ff ff li r0,-1 ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0d354: 81 63 01 34 lwz r11,308(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 */ ffc0d358: 90 03 00 78 stw r0,120(r3) ffc0d35c: 88 8a 26 ec lbz r4,9964(r10) ffc0d360: 80 0b 00 8c lwz r0,140(r11) ffc0d364: 7c 80 20 50 subf r4,r0,r4 */ #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 ) { ffc0d368: 80 03 00 1c lwz r0,28(r3) * while at low priority. */ the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; ffc0d36c: 90 83 00 18 stw r4,24(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 ) { ffc0d370: 2f 80 00 00 cmpwi cr7,r0,0 ffc0d374: 40 9e 00 18 bne- cr7,ffc0d38c <_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 ) { ffc0d378: 80 03 00 14 lwz r0,20(r3) ffc0d37c: 7f 80 20 40 cmplw cr7,r0,r4 ffc0d380: 40 bc 00 0c bge+ cr7,ffc0d38c <_POSIX_Threads_Sporadic_budget_callout+0x4c><== NEVER TAKEN _Thread_Change_priority( the_thread, new_priority, true ); ffc0d384: 38 a0 00 01 li r5,1 ffc0d388: 4b ff c6 c5 bl ffc09a4c <_Thread_Change_priority> #if 0 printk( "lower priority\n" ); #endif } } } ffc0d38c: 80 01 00 0c lwz r0,12(r1) ffc0d390: 38 21 00 08 addi r1,r1,8 ffc0d394: 7c 08 03 a6 mtlr r0 ffc0d398: 4e 80 00 20 blr =============================================================================== ffc07b64 <_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) { ffc07b64: 7c 08 02 a6 mflr r0 ffc07b68: 7c 2b 0b 78 mr r11,r1 ffc07b6c: 94 21 ff f0 stwu r1,-16(r1) ffc07b70: 90 01 00 14 stw r0,20(r1) ffc07b74: 48 01 43 dd bl ffc1bf50 <_savegpr_31> ffc07b78: 7c 9f 23 78 mr r31,r4 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; ffc07b7c: 81 24 00 68 lwz r9,104(r4) ffc07b80: 38 09 00 01 addi r0,r9,1 ffc07b84: 90 04 00 68 stw r0,104(r4) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || ffc07b88: 80 04 00 54 lwz r0,84(r4) ffc07b8c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07b90: 40 9e 00 10 bne- cr7,ffc07ba0 <_POSIX_Timer_TSR+0x3c> ffc07b94: 80 04 00 58 lwz r0,88(r4) ffc07b98: 2f 80 00 00 cmpwi cr7,r0,0 ffc07b9c: 41 9e 00 38 beq- cr7,ffc07bd4 <_POSIX_Timer_TSR+0x70> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( ffc07ba0: 80 9f 00 64 lwz r4,100(r31) ffc07ba4: 3c c0 ff c0 lis r6,-64 ffc07ba8: 80 bf 00 08 lwz r5,8(r31) ffc07bac: 38 7f 00 10 addi r3,r31,16 ffc07bb0: 38 c6 7b 64 addi r6,r6,31588 ffc07bb4: 7f e7 fb 78 mr r7,r31 ffc07bb8: 48 00 68 09 bl ffc0e3c0 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) ffc07bbc: 2f 83 00 00 cmpwi cr7,r3,0 ffc07bc0: 41 be 00 30 beq+ cr7,ffc07bf0 <_POSIX_Timer_TSR+0x8c> <== NEVER TAKEN return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); ffc07bc4: 38 7f 00 6c addi r3,r31,108 ffc07bc8: 48 00 19 01 bl ffc094c8 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc07bcc: 38 00 00 03 li r0,3 ffc07bd0: 48 00 00 08 b ffc07bd8 <_POSIX_Timer_TSR+0x74> } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc07bd4: 38 00 00 04 li r0,4 ffc07bd8: 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 ) ) { ffc07bdc: 80 7f 00 38 lwz r3,56(r31) ffc07be0: 80 9f 00 44 lwz r4,68(r31) ffc07be4: 48 00 62 f9 bl ffc0dedc } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; ffc07be8: 38 00 00 00 li r0,0 ffc07bec: 90 1f 00 68 stw r0,104(r31) } ffc07bf0: 39 61 00 10 addi r11,r1,16 ffc07bf4: 4b ff 8a 30 b ffc00624 <_restgpr_31_x> =============================================================================== ffc0f954 <_POSIX_signals_Check_signal>: bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc0f954: 94 21 ff 98 stwu r1,-104(r1) ffc0f958: 7c 08 02 a6 mflr r0 ffc0f95c: 7c a6 2b 78 mr r6,r5 ffc0f960: bf 21 00 4c stmw r25,76(r1) siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc0f964: 3b a1 00 08 addi r29,r1,8 ffc0f968: 7f a5 eb 78 mr r5,r29 ffc0f96c: 38 e0 00 01 li r7,1 bool _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, bool is_global ) { ffc0f970: 90 01 00 6c stw r0,108(r1) ffc0f974: 7c 7f 1b 78 mr r31,r3 ffc0f978: 7c 9e 23 78 mr r30,r4 siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc0f97c: 48 00 00 b5 bl ffc0fa30 <_POSIX_signals_Clear_signals> ffc0f980: 2f 83 00 00 cmpwi cr7,r3,0 is_global, true ) ) return false; ffc0f984: 38 00 00 00 li r0,0 { siginfo_t siginfo_struct; sigset_t saved_signals_blocked; Thread_Wait_information stored_thread_wait_information; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, ffc0f988: 41 9e 00 9c beq- cr7,ffc0fa24 <_POSIX_signals_Check_signal+0xd0> #endif /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) ffc0f98c: 3f 20 00 00 lis r25,0 ffc0f990: 1f 5e 00 0c mulli r26,r30,12 ffc0f994: 3b 39 31 60 addi r25,r25,12640 ffc0f998: 7d 39 d2 14 add r9,r25,r26 ffc0f99c: 83 89 00 08 lwz r28,8(r9) ffc0f9a0: 2f 9c 00 01 cmpwi cr7,r28,1 ffc0f9a4: 41 9e 00 80 beq- cr7,ffc0fa24 <_POSIX_signals_Check_signal+0xd0><== NEVER TAKEN /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc0f9a8: 80 09 00 04 lwz r0,4(r9) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc0f9ac: 3d 20 00 00 lis r9,0 return false; /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; ffc0f9b0: 83 7f 00 d0 lwz r27,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc0f9b4: 38 61 00 14 addi r3,r1,20 ffc0f9b8: 80 89 31 10 lwz r4,12560(r9) ffc0f9bc: 38 a0 00 28 li r5,40 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; ffc0f9c0: 7c 00 db 78 or r0,r0,r27 ffc0f9c4: 90 1f 00 d0 stw r0,208(r31) /* * We have to save the blocking information of the current wait queue * because the signal handler may subsequently go on and put the thread * on a wait queue, for its own purposes. */ memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, ffc0f9c8: 38 84 00 20 addi r4,r4,32 ffc0f9cc: 48 00 14 2d bl ffc10df8 sizeof( Thread_Wait_information )); /* * Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { ffc0f9d0: 7c 19 d0 2e lwzx r0,r25,r26 ffc0f9d4: 2f 80 00 02 cmpwi cr7,r0,2 ffc0f9d8: 40 be 00 1c bne+ cr7,ffc0f9f4 <_POSIX_signals_Check_signal+0xa0> case SA_SIGINFO: (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( ffc0f9dc: 7f c3 f3 78 mr r3,r30 ffc0f9e0: 7f 89 03 a6 mtctr r28 ffc0f9e4: 7f a4 eb 78 mr r4,r29 ffc0f9e8: 38 a0 00 00 li r5,0 ffc0f9ec: 4e 80 04 21 bctrl signo, &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; ffc0f9f0: 48 00 00 14 b ffc0fa04 <_POSIX_signals_Check_signal+0xb0> default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); ffc0f9f4: 7f c3 f3 78 mr r3,r30 ffc0f9f8: 7f 89 03 a6 mtctr r28 ffc0f9fc: 4c c6 31 82 crclr 4*cr1+eq ffc0fa00: 4e 80 04 21 bctrl } /* * Restore the blocking information */ memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, ffc0fa04: 3d 20 00 00 lis r9,0 ffc0fa08: 80 69 31 10 lwz r3,12560(r9) ffc0fa0c: 38 81 00 14 addi r4,r1,20 ffc0fa10: 38 a0 00 28 li r5,40 ffc0fa14: 38 63 00 20 addi r3,r3,32 ffc0fa18: 48 00 13 e1 bl ffc10df8 sizeof( Thread_Wait_information )); /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; ffc0fa1c: 93 7f 00 d0 stw r27,208(r31) return true; ffc0fa20: 38 00 00 01 li r0,1 } ffc0fa24: 39 61 00 68 addi r11,r1,104 ffc0fa28: 7c 03 03 78 mr r3,r0 ffc0fa2c: 48 00 57 34 b ffc15160 <_restgpr_25_x> =============================================================================== ffc10130 <_POSIX_signals_Clear_process_signals>: static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc10130: 7d 60 00 a6 mfmsr r11 ffc10134: 7c 10 42 a6 mfsprg r0,0 ffc10138: 7d 60 00 78 andc r0,r11,r0 ffc1013c: 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 ) { ffc10140: 3d 20 00 00 lis r9,0 ffc10144: 1c 03 00 0c mulli r0,r3,12 ffc10148: 39 29 31 60 addi r9,r9,12640 ffc1014c: 7d 29 00 2e lwzx r9,r9,r0 ffc10150: 2f 89 00 02 cmpwi cr7,r9,2 ffc10154: 40 be 00 20 bne+ cr7,ffc10174 <_POSIX_signals_Clear_process_signals+0x44> } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); } ffc10158: 3d 20 00 00 lis r9,0 ffc1015c: 39 29 33 54 addi r9,r9,13140 ffc10160: 7d 49 02 14 add r10,r9,r0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) ffc10164: 7c 09 00 2e lwzx r0,r9,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc10168: 39 4a 00 04 addi r10,r10,4 ffc1016c: 7f 80 50 00 cmpw cr7,r0,r10 ffc10170: 40 be 00 20 bne+ cr7,ffc10190 <_POSIX_signals_Clear_process_signals+0x60><== NEVER TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; ffc10174: 3d 20 00 00 lis r9,0 ffc10178: 38 00 ff fe li r0,-2 ffc1017c: 38 63 ff ff addi r3,r3,-1 ffc10180: 5c 03 18 3e rotlw r3,r0,r3 ffc10184: 80 09 27 f4 lwz r0,10228(r9) ffc10188: 7c 63 00 38 and r3,r3,r0 ffc1018c: 90 69 27 f4 stw r3,10228(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc10190: 7d 60 01 24 mtmsr r11 } _ISR_Enable( level ); } ffc10194: 4e 80 00 20 blr =============================================================================== ffc0861c <_POSIX_signals_Get_lowest>: ffc0861c: 39 40 00 05 li r10,5 ffc08620: 7d 49 03 a6 mtctr r10 sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc08624: 39 20 00 1b li r9,27 ffc08628: 38 00 00 01 li r0,1 #include #include #include #include int _POSIX_signals_Get_lowest( ffc0862c: 39 69 ff ff addi r11,r9,-1 ffc08630: 7c 0b 58 30 slw r11,r0,r11 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc08634: 7d 6a 18 39 and. r10,r11,r3 ffc08638: 40 82 00 34 bne- ffc0866c <_POSIX_signals_Get_lowest+0x50><== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { ffc0863c: 39 29 00 01 addi r9,r9,1 ffc08640: 42 00 ff ec bdnz+ ffc0862c <_POSIX_signals_Get_lowest+0x10> ffc08644: 39 60 00 1a li r11,26 ffc08648: 7d 69 03 a6 mtctr r11 ffc0864c: 39 20 00 01 li r9,1 ffc08650: 38 00 00 01 li r0,1 #include #include #include #include int _POSIX_signals_Get_lowest( ffc08654: 39 69 ff ff addi r11,r9,-1 ffc08658: 7c 0b 58 30 slw r11,r0,r11 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { ffc0865c: 7d 6a 18 39 and. r10,r11,r3 ffc08660: 40 82 00 0c bne- ffc0866c <_POSIX_signals_Get_lowest+0x50> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { ffc08664: 39 29 00 01 addi r9,r9,1 ffc08668: 42 00 ff ec bdnz+ ffc08654 <_POSIX_signals_Get_lowest+0x38> * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } ffc0866c: 7d 23 4b 78 mr r3,r9 ffc08670: 4e 80 00 20 blr =============================================================================== ffc25a88 <_POSIX_signals_Unblock_thread>: bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc25a88: 94 21 ff f0 stwu r1,-16(r1) ffc25a8c: 7c 08 02 a6 mflr r0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc25a90: 3c e0 10 00 lis r7,4096 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc25a94: 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 ) ) { ffc25a98: 60 e7 80 00 ori r7,r7,32768 ffc25a9c: 39 64 ff ff addi r11,r4,-1 ffc25aa0: 80 03 00 10 lwz r0,16(r3) ffc25aa4: 39 40 00 01 li r10,1 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc25aa8: bf c1 00 08 stmw r30,8(r1) ffc25aac: 7c a9 2b 78 mr r9,r5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc25ab0: 7c 06 38 38 and r6,r0,r7 ffc25ab4: 7f 86 38 00 cmpw cr7,r6,r7 { POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc25ab8: 81 03 01 34 lwz r8,308(r3) bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { ffc25abc: 7c 7f 1b 78 mr r31,r3 ffc25ac0: 7d 4b 58 30 slw r11,r10,r11 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { ffc25ac4: 40 be 00 60 bne+ cr7,ffc25b24 <_POSIX_signals_Unblock_thread+0x9c> if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc25ac8: 80 03 00 30 lwz r0,48(r3) ffc25acc: 7d 6a 00 39 and. r10,r11,r0 ffc25ad0: 40 82 00 14 bne- ffc25ae4 <_POSIX_signals_Unblock_thread+0x5c> ffc25ad4: 80 08 00 d0 lwz r0,208(r8) /* * This should only be reached via pthread_kill(). */ return false; ffc25ad8: 3b c0 00 00 li r30,0 * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { ffc25adc: 7d 68 00 79 andc. r8,r11,r0 ffc25ae0: 41 82 00 cc beq- ffc25bac <_POSIX_signals_Unblock_thread+0x124> the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc25ae4: 2f 89 00 00 cmpwi cr7,r9,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; ffc25ae8: 81 7f 00 28 lwz r11,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; ffc25aec: 38 00 00 04 li r0,4 ffc25af0: 90 1f 00 34 stw r0,52(r31) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { ffc25af4: 40 be 00 18 bne+ cr7,ffc25b0c <_POSIX_signals_Unblock_thread+0x84> the_info->si_signo = signo; the_info->si_code = SI_USER; ffc25af8: 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; ffc25afc: 90 8b 00 00 stw r4,0(r11) the_info->si_code = SI_USER; ffc25b00: 90 0b 00 04 stw r0,4(r11) the_info->si_value.sival_int = 0; ffc25b04: 91 2b 00 08 stw r9,8(r11) ffc25b08: 48 00 00 0c b ffc25b14 <_POSIX_signals_Unblock_thread+0x8c> } else { *the_info = *info; ffc25b0c: 7c a9 64 aa lswi r5,r9,12 ffc25b10: 7c ab 65 aa stswi r5,r11,12 } _Thread_queue_Extract_with_proxy( the_thread ); ffc25b14: 7f e3 fb 78 mr r3,r31 ffc25b18: 4b fe a9 85 bl ffc1049c <_Thread_queue_Extract_with_proxy> return true; ffc25b1c: 3b c0 00 01 li r30,1 ffc25b20: 48 00 00 8c b ffc25bac <_POSIX_signals_Unblock_thread+0x124> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc25b24: 81 28 00 d0 lwz r9,208(r8) } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; ffc25b28: 3b c0 00 00 li r30,0 } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { ffc25b2c: 7d 68 48 79 andc. r8,r11,r9 ffc25b30: 41 82 00 7c beq- ffc25bac <_POSIX_signals_Unblock_thread+0x124> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { ffc25b34: 74 09 10 00 andis. r9,r0,4096 ffc25b38: 41 82 00 48 beq- ffc25b80 <_POSIX_signals_Unblock_thread+0xf8> the_thread->Wait.return_code = EINTR; ffc25b3c: 39 20 00 04 li r9,4 ffc25b40: 91 23 00 34 stw r9,52(r3) /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) ffc25b44: 3d 20 00 03 lis r9,3 ffc25b48: 61 29 be e0 ori r9,r9,48864 ffc25b4c: 7c 0a 48 39 and. r10,r0,r9 ffc25b50: 41 a2 00 0c beq+ ffc25b5c <_POSIX_signals_Unblock_thread+0xd4> _Thread_queue_Extract_with_proxy( the_thread ); ffc25b54: 4b fe a9 49 bl ffc1049c <_Thread_queue_Extract_with_proxy> ffc25b58: 48 00 00 54 b ffc25bac <_POSIX_signals_Unblock_thread+0x124> else if ( _States_Is_delaying(the_thread->current_state) ) { ffc25b5c: 70 0b 00 08 andi. r11,r0,8 ffc25b60: 41 a2 00 4c beq+ ffc25bac <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); ffc25b64: 38 63 00 48 addi r3,r3,72 ffc25b68: 4b fe b3 f1 bl ffc10f58 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc25b6c: 3c 80 10 03 lis r4,4099 ffc25b70: 7f e3 fb 78 mr r3,r31 ffc25b74: 60 84 ff f8 ori r4,r4,65528 ffc25b78: 4b fe 9d 95 bl ffc0f90c <_Thread_Clear_state> ffc25b7c: 48 00 00 30 b ffc25bac <_POSIX_signals_Unblock_thread+0x124> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { ffc25b80: 2f 80 00 00 cmpwi cr7,r0,0 ffc25b84: 40 9e 00 28 bne- cr7,ffc25bac <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc25b88: 3d 20 00 00 lis r9,0 ffc25b8c: 39 29 32 84 addi r9,r9,12932 ffc25b90: 80 09 00 08 lwz r0,8(r9) ffc25b94: 2f 80 00 00 cmpwi cr7,r0,0 ffc25b98: 41 9e 00 14 beq- cr7,ffc25bac <_POSIX_signals_Unblock_thread+0x124> ffc25b9c: 80 09 00 0c lwz r0,12(r9) ffc25ba0: 7f 83 00 00 cmpw cr7,r3,r0 ffc25ba4: 40 be 00 08 bne+ cr7,ffc25bac <_POSIX_signals_Unblock_thread+0x124><== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc25ba8: 99 49 00 18 stb r10,24(r9) } } return false; } ffc25bac: 39 61 00 10 addi r11,r1,16 ffc25bb0: 7f c3 f3 78 mr r3,r30 ffc25bb4: 4b fd c3 e0 b ffc01f94 <_restgpr_30_x> =============================================================================== ffc090d8 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { ffc090d8: 7c 2b 0b 78 mr r11,r1 ffc090dc: 94 21 ff e0 stwu r1,-32(r1) ffc090e0: 7c 08 02 a6 mflr r0 ffc090e4: 7c 64 1b 78 mr r4,r3 ffc090e8: 3c 60 00 00 lis r3,0 ffc090ec: 48 01 3b 6d bl ffc1cc58 <_savegpr_31> ffc090f0: 38 63 2c 58 addi r3,r3,11352 ffc090f4: 90 01 00 24 stw r0,36(r1) ffc090f8: 38 a1 00 08 addi r5,r1,8 ffc090fc: 48 00 21 69 bl ffc0b264 <_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 ) { ffc09100: 80 01 00 08 lwz r0,8(r1) ffc09104: 7c 7f 1b 78 mr r31,r3 ffc09108: 2f 80 00 00 cmpwi cr7,r0,0 ffc0910c: 40 9e 00 84 bne- cr7,ffc09190 <_Rate_monotonic_Timeout+0xb8><== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; ffc09110: 80 63 00 40 lwz r3,64(r3) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); ffc09114: 80 03 00 10 lwz r0,16(r3) if ( _States_Is_waiting_for_period( the_thread->current_state ) && ffc09118: 70 09 40 00 andi. r9,r0,16384 ffc0911c: 41 82 00 24 beq- ffc09140 <_Rate_monotonic_Timeout+0x68> ffc09120: 81 23 00 20 lwz r9,32(r3) ffc09124: 80 1f 00 08 lwz r0,8(r31) ffc09128: 7f 89 00 00 cmpw cr7,r9,r0 ffc0912c: 40 be 00 14 bne+ cr7,ffc09140 <_Rate_monotonic_Timeout+0x68> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); ffc09130: 3c 80 10 03 lis r4,4099 ffc09134: 60 84 ff f8 ori r4,r4,65528 ffc09138: 48 00 2a 49 bl ffc0bb80 <_Thread_Clear_state> ffc0913c: 48 00 00 18 b ffc09154 <_Rate_monotonic_Timeout+0x7c> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { ffc09140: 80 1f 00 38 lwz r0,56(r31) ffc09144: 2f 80 00 01 cmpwi cr7,r0,1 ffc09148: 40 be 00 30 bne+ cr7,ffc09178 <_Rate_monotonic_Timeout+0xa0> the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; ffc0914c: 38 00 00 03 li r0,3 ffc09150: 90 1f 00 38 stw r0,56(r31) _Rate_monotonic_Initiate_statistics( the_period ); ffc09154: 7f e3 fb 78 mr r3,r31 ffc09158: 4b ff f9 45 bl ffc08a9c <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc0915c: 80 1f 00 3c lwz r0,60(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09160: 3c 60 00 00 lis r3,0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc09164: 90 1f 00 1c stw r0,28(r31) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc09168: 38 63 2e 48 addi r3,r3,11848 ffc0916c: 38 9f 00 10 addi r4,r31,16 ffc09170: 48 00 40 09 bl ffc0d178 <_Watchdog_Insert> ffc09174: 48 00 00 0c b ffc09180 <_Rate_monotonic_Timeout+0xa8> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; ffc09178: 38 00 00 04 li r0,4 ffc0917c: 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; ffc09180: 3d 20 00 00 lis r9,0 ffc09184: 81 69 28 2c lwz r11,10284(r9) ffc09188: 38 0b ff ff addi r0,r11,-1 ffc0918c: 90 09 28 2c stw r0,10284(r9) case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } ffc09190: 39 61 00 20 addi r11,r1,32 ffc09194: 4b ff 80 38 b ffc011cc <_restgpr_31_x> =============================================================================== ffc0e03c <_Scheduler_priority_Block>: RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_extract( Thread_Control *the_thread ) { Chain_Control *ready = the_thread->scheduler.priority->ready_chain; ffc0e03c: 81 24 00 8c lwz r9,140(r4) ffc0e040: 81 29 00 00 lwz r9,0(r9) if ( _Chain_Has_only_one_node( ready ) ) { ffc0e044: 81 69 00 00 lwz r11,0(r9) ffc0e048: 80 09 00 08 lwz r0,8(r9) ffc0e04c: 7f 8b 00 00 cmpw cr7,r11,r0 ffc0e050: 40 be 00 50 bne+ cr7,ffc0e0a0 <_Scheduler_priority_Block+0x64> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); ffc0e054: 38 09 00 04 addi r0,r9,4 head->next = tail; head->previous = NULL; tail->previous = head; ffc0e058: 91 29 00 08 stw r9,8(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0e05c: 90 09 00 00 stw r0,0(r9) head->previous = NULL; ffc0e060: 38 00 00 00 li r0,0 ffc0e064: 90 09 00 04 stw r0,4(r9) _Chain_Initialize_empty( ready ); _Priority_bit_map_Remove( &the_thread->scheduler.priority->Priority_map ); ffc0e068: 81 24 00 8c lwz r9,140(r4) RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0e06c: 81 69 00 04 lwz r11,4(r9) ffc0e070: 80 09 00 14 lwz r0,20(r9) ffc0e074: 81 4b 00 00 lwz r10,0(r11) ffc0e078: 7d 40 00 38 and r0,r10,r0 if ( *the_priority_map->minor == 0 ) ffc0e07c: 2f 80 00 00 cmpwi cr7,r0,0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; ffc0e080: 90 0b 00 00 stw r0,0(r11) if ( *the_priority_map->minor == 0 ) ffc0e084: 40 9e 00 2c bne- cr7,ffc0e0b0 <_Scheduler_priority_Block+0x74> _Priority_Major_bit_map &= the_priority_map->block_major; ffc0e088: 3d 60 00 00 lis r11,0 ffc0e08c: 80 09 00 10 lwz r0,16(r9) ffc0e090: 81 4b 27 f0 lwz r10,10224(r11) ffc0e094: 7d 40 00 38 and r0,r10,r0 ffc0e098: 90 0b 27 f0 stw r0,10224(r11) ffc0e09c: 48 00 00 14 b ffc0e0b0 <_Scheduler_priority_Block+0x74> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc0e0a0: 81 64 00 00 lwz r11,0(r4) previous = the_node->previous; ffc0e0a4: 81 24 00 04 lwz r9,4(r4) next->previous = previous; ffc0e0a8: 91 2b 00 04 stw r9,4(r11) previous->next = next; ffc0e0ac: 91 69 00 00 stw r11,0(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_heir ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Heir ); ffc0e0b0: 3d 20 00 00 lis r9,0 { _Scheduler_priority_Ready_queue_extract(the_thread); /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) ffc0e0b4: 80 09 31 14 lwz r0,12564(r9) ffc0e0b8: 7f 84 00 00 cmpw cr7,r4,r0 ffc0e0bc: 40 be 00 60 bne+ cr7,ffc0e11c <_Scheduler_priority_Block+0xe0> RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0e0c0: 3d 40 00 00 lis r10,0 Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { _Scheduler_priority_Block_body(the_scheduler, the_thread); } ffc0e0c4: 81 23 00 00 lwz r9,0(r3) ffc0e0c8: 80 0a 27 f0 lwz r0,10224(r10) ffc0e0cc: 7c 0b 00 34 cntlzw r11,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0e0d0: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0e0d4: 90 0a 27 f0 stw r0,10224(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc0e0d8: 39 08 31 20 addi r8,r8,12576 ffc0e0dc: 55 6a 10 3a rlwinm r10,r11,2,0,29 ffc0e0e0: 7c 08 50 2e lwzx r0,r8,r10 ffc0e0e4: 7c 07 00 34 cntlzw r7,r0 ffc0e0e8: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc0e0ec: 55 60 20 36 rlwinm r0,r11,4,0,27 ffc0e0f0: 7c 00 3a 14 add r0,r0,r7 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0e0f4: 1c 00 00 0c mulli r0,r0,12 ffc0e0f8: 7d 69 02 14 add r11,r9,r0 ffc0e0fc: 7d 29 00 2e lwzx r9,r9,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0e100: 39 6b 00 04 addi r11,r11,4 ffc0e104: 7f 89 58 00 cmpw cr7,r9,r11 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc0e108: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc0e10c: 41 9e 00 08 beq- cr7,ffc0e114 <_Scheduler_priority_Block+0xd8><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc0e110: 7d 20 4b 78 mr r0,r9 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc0e114: 3d 20 00 00 lis r9,0 ffc0e118: 90 09 31 14 stw r0,12564(r9) RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0e11c: 3d 20 00 00 lis r9,0 ffc0e120: 39 29 31 04 addi r9,r9,12548 /* TODO: flash critical section */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(the_scheduler); if ( _Thread_Is_executing( the_thread ) ) ffc0e124: 80 09 00 0c lwz r0,12(r9) ffc0e128: 7f 84 00 00 cmpw cr7,r4,r0 ffc0e12c: 4c be 00 20 bnelr+ cr7 _Thread_Dispatch_necessary = true; ffc0e130: 38 00 00 01 li r0,1 ffc0e134: 98 09 00 18 stb r0,24(r9) ffc0e138: 4e 80 00 20 blr =============================================================================== ffc0979c <_Scheduler_priority_Schedule>: RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc0979c: 3d 40 00 00 lis r10,0 void _Scheduler_priority_Schedule( Scheduler_Control *the_scheduler ) { _Scheduler_priority_Schedule_body( the_scheduler ); } ffc097a0: 81 23 00 00 lwz r9,0(r3) ffc097a4: 80 0a 27 f0 lwz r0,10224(r10) ffc097a8: 7c 0b 00 34 cntlzw r11,r0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc097ac: 3d 00 00 00 lis r8,0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); ffc097b0: 90 0a 27 f0 stw r0,10224(r10) _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); ffc097b4: 39 08 31 20 addi r8,r8,12576 ffc097b8: 55 6a 10 3a rlwinm r10,r11,2,0,29 ffc097bc: 7c 08 50 2e lwzx r0,r8,r10 ffc097c0: 7c 07 00 34 cntlzw r7,r0 ffc097c4: 7c 08 51 2e stwx r0,r8,r10 return (_Priority_Bits_index( major ) << 4) + ffc097c8: 55 60 20 36 rlwinm r0,r11,4,0,27 ffc097cc: 7c 00 3a 14 add r0,r0,r7 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc097d0: 1c 00 00 0c mulli r0,r0,12 ffc097d4: 7d 69 02 14 add r11,r9,r0 ffc097d8: 7d 29 00 2e lwzx r9,r9,r0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc097dc: 39 6b 00 04 addi r11,r11,4 ffc097e0: 7f 89 58 00 cmpw cr7,r9,r11 return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; ffc097e4: 38 00 00 00 li r0,0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) ffc097e8: 41 9e 00 08 beq- cr7,ffc097f0 <_Scheduler_priority_Schedule+0x54><== NEVER TAKEN return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); ffc097ec: 7d 20 4b 78 mr r0,r9 RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body( Scheduler_Control *the_scheduler ) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( ffc097f0: 3d 20 00 00 lis r9,0 ffc097f4: 90 09 31 14 stw r0,12564(r9) ffc097f8: 4e 80 00 20 blr =============================================================================== ffc08b48 <_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) || ffc08b48: 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(); ffc08b4c: 3d 20 00 00 lis r9,0 ffc08b50: 81 29 20 cc lwz r9,8396(r9) (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; ffc08b54: 38 00 00 00 li r0,0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08b58: 41 82 00 94 beq- ffc08bec <_TOD_Validate+0xa4> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / ffc08b5c: 3d 60 00 0f lis r11,15 ffc08b60: 61 6b 42 40 ori r11,r11,16960 ffc08b64: 7d 2b 4b 96 divwu r9,r11,r9 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || ffc08b68: 81 63 00 18 lwz r11,24(r3) ffc08b6c: 7f 8b 48 40 cmplw cr7,r11,r9 ffc08b70: 40 9c 00 7c bge- cr7,ffc08bec <_TOD_Validate+0xa4> (the_tod->ticks >= ticks_per_second) || ffc08b74: 81 23 00 14 lwz r9,20(r3) ffc08b78: 2b 89 00 3b cmplwi cr7,r9,59 ffc08b7c: 41 9d 00 70 bgt- cr7,ffc08bec <_TOD_Validate+0xa4> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || ffc08b80: 81 23 00 10 lwz r9,16(r3) ffc08b84: 2b 89 00 3b cmplwi cr7,r9,59 ffc08b88: 41 9d 00 64 bgt- cr7,ffc08bec <_TOD_Validate+0xa4> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || ffc08b8c: 81 23 00 0c lwz r9,12(r3) ffc08b90: 2b 89 00 17 cmplwi cr7,r9,23 ffc08b94: 41 9d 00 58 bgt- cr7,ffc08bec <_TOD_Validate+0xa4> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || ffc08b98: 81 23 00 04 lwz r9,4(r3) rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || ffc08b9c: 2f 89 00 00 cmpwi cr7,r9,0 ffc08ba0: 41 9e 00 4c beq- cr7,ffc08bec <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->month == 0) || ffc08ba4: 2b 89 00 0c cmplwi cr7,r9,12 ffc08ba8: 41 9d 00 44 bgt- cr7,ffc08bec <_TOD_Validate+0xa4> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc08bac: 81 43 00 00 lwz r10,0(r3) (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || ffc08bb0: 2b 8a 07 c3 cmplwi cr7,r10,1987 ffc08bb4: 40 9d 00 38 ble- cr7,ffc08bec <_TOD_Validate+0xa4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) ffc08bb8: 81 63 00 08 lwz r11,8(r3) (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || ffc08bbc: 2f 8b 00 00 cmpwi cr7,r11,0 ffc08bc0: 41 9e 00 2c beq- cr7,ffc08bec <_TOD_Validate+0xa4> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) ffc08bc4: 71 40 00 03 andi. r0,r10,3 ffc08bc8: 3d 40 ff c2 lis r10,-62 ffc08bcc: 39 4a fd 4c addi r10,r10,-692 ffc08bd0: 40 82 00 08 bne- ffc08bd8 <_TOD_Validate+0x90> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; ffc08bd4: 39 29 00 0d addi r9,r9,13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; ffc08bd8: 55 29 10 3a rlwinm r9,r9,2,0,29 ffc08bdc: 7c 0a 48 2e lwzx r0,r10,r9 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( ffc08be0: 7c 0b 00 10 subfc r0,r11,r0 ffc08be4: 38 00 00 00 li r0,0 ffc08be8: 7c 00 01 14 adde r0,r0,r0 if ( the_tod->day > days_in_month ) return false; return true; } ffc08bec: 7c 03 03 78 mr r3,r0 ffc08bf0: 4e 80 00 20 blr =============================================================================== ffc09a4c <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { ffc09a4c: 94 21 ff e0 stwu r1,-32(r1) ffc09a50: 7c 08 02 a6 mflr r0 ffc09a54: 90 01 00 24 stw r0,36(r1) ffc09a58: bf 81 00 10 stmw r28,16(r1) ffc09a5c: 7c 7f 1b 78 mr r31,r3 ffc09a60: 7c be 2b 78 mr r30,r5 */ /* * Save original state */ original_state = the_thread->current_state; ffc09a64: 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 ); ffc09a68: 90 81 00 08 stw r4,8(r1) ffc09a6c: 48 00 0f 3d bl ffc0a9a8 <_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 ) ffc09a70: 80 1f 00 14 lwz r0,20(r31) ffc09a74: 80 81 00 08 lwz r4,8(r1) ffc09a78: 7f 80 20 00 cmpw cr7,r0,r4 ffc09a7c: 41 9e 00 0c beq- cr7,ffc09a88 <_Thread_Change_priority+0x3c> _Thread_Set_priority( the_thread, new_priority ); ffc09a80: 7f e3 fb 78 mr r3,r31 ffc09a84: 48 00 0e 81 bl ffc0a904 <_Thread_Set_priority> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09a88: 7f 80 00 a6 mfmsr r28 ffc09a8c: 7c 10 42 a6 mfsprg r0,0 ffc09a90: 7f 80 00 78 andc r0,r28,r0 ffc09a94: 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; ffc09a98: 80 1f 00 10 lwz r0,16(r31) ffc09a9c: 57 bd 07 7a rlwinm r29,r29,0,29,29 if ( state != STATES_TRANSIENT ) { ffc09aa0: 2f 80 00 04 cmpwi cr7,r0,4 ffc09aa4: 41 9e 00 38 beq- cr7,ffc09adc <_Thread_Change_priority+0x90> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) ffc09aa8: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09aac: 40 9e 00 0c bne- cr7,ffc09ab8 <_Thread_Change_priority+0x6c><== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc09ab0: 54 09 07 b8 rlwinm r9,r0,0,30,28 the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc09ab4: 91 3f 00 10 stw r9,16(r31) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09ab8: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { ffc09abc: 3d 20 00 03 lis r9,3 ffc09ac0: 61 29 be e0 ori r9,r9,48864 ffc09ac4: 7c 0b 48 39 and. r11,r0,r9 ffc09ac8: 41 a2 01 08 beq+ ffc09bd0 <_Thread_Change_priority+0x184> _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); ffc09acc: 80 7f 00 44 lwz r3,68(r31) ffc09ad0: 7f e4 fb 78 mr r4,r31 ffc09ad4: 48 00 0d 79 bl ffc0a84c <_Thread_queue_Requeue> ffc09ad8: 48 00 00 f8 b ffc09bd0 <_Thread_Change_priority+0x184> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { ffc09adc: 2f 9d 00 00 cmpwi cr7,r29,0 ffc09ae0: 40 9e 00 a0 bne- cr7,ffc09b80 <_Thread_Change_priority+0x134><== NEVER TAKEN * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); if ( prepend_it ) ffc09ae4: 2f 9e 00 00 cmpwi cr7,r30,0 * Ready Queue with interrupts off. * * FIXME: hard-coded for priority scheduling. Might be ok since this * function is specific to priority scheduling? */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); ffc09ae8: 93 bf 00 10 stw r29,16(r31) ffc09aec: 3d 60 00 00 lis r11,0 ffc09af0: 81 3f 00 8c lwz r9,140(r31) if ( prepend_it ) ffc09af4: 41 9e 00 48 beq- cr7,ffc09b3c <_Thread_Change_priority+0xf0> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc09af8: 81 49 00 04 lwz r10,4(r9) ffc09afc: 80 09 00 0c lwz r0,12(r9) ffc09b00: 81 0a 00 00 lwz r8,0(r10) ffc09b04: 7d 00 03 78 or r0,r8,r0 ffc09b08: 90 0a 00 00 stw r0,0(r10) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc09b0c: 80 09 00 08 lwz r0,8(r9) Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); _Chain_Prepend_unprotected( the_thread->scheduler.priority->ready_chain, ffc09b10: 81 3f 00 8c lwz r9,140(r31) ffc09b14: 81 4b 27 f0 lwz r10,10224(r11) ffc09b18: 81 29 00 00 lwz r9,0(r9) ffc09b1c: 7d 40 03 78 or r0,r10,r0 ffc09b20: 90 0b 27 f0 stw r0,10224(r11) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; ffc09b24: 81 69 00 00 lwz r11,0(r9) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; ffc09b28: 91 3f 00 04 stw r9,4(r31) before_node = after_node->next; after_node->next = the_node; ffc09b2c: 93 e9 00 00 stw r31,0(r9) the_node->next = before_node; before_node->previous = the_node; ffc09b30: 93 eb 00 04 stw r31,4(r11) Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; ffc09b34: 91 7f 00 00 stw r11,0(r31) ffc09b38: 48 00 00 48 b ffc09b80 <_Thread_Change_priority+0x134> RTEMS_INLINE_ROUTINE void _Priority_bit_map_Add ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; ffc09b3c: 81 49 00 04 lwz r10,4(r9) ffc09b40: 80 09 00 0c lwz r0,12(r9) ffc09b44: 81 0a 00 00 lwz r8,0(r10) ffc09b48: 7d 00 03 78 or r0,r8,r0 ffc09b4c: 90 0a 00 00 stw r0,0(r10) _Priority_Major_bit_map |= the_priority_map->ready_major; ffc09b50: 80 09 00 08 lwz r0,8(r9) Thread_Control *the_thread ) { _Priority_bit_map_Add( &the_thread->scheduler.priority->Priority_map ); _Chain_Append_unprotected( the_thread->scheduler.priority->ready_chain, ffc09b54: 81 3f 00 8c lwz r9,140(r31) ffc09b58: 81 4b 27 f0 lwz r10,10224(r11) ffc09b5c: 81 29 00 00 lwz r9,0(r9) ffc09b60: 7d 40 03 78 or r0,r10,r0 ffc09b64: 90 0b 27 f0 stw r0,10224(r11) RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc09b68: 38 09 00 04 addi r0,r9,4 Chain_Node *old_last = tail->previous; ffc09b6c: 81 69 00 08 lwz r11,8(r9) the_node->next = tail; ffc09b70: 90 1f 00 00 stw r0,0(r31) tail->previous = the_node; ffc09b74: 93 e9 00 08 stw r31,8(r9) old_last->next = the_node; ffc09b78: 93 eb 00 00 stw r31,0(r11) the_node->previous = old_last; ffc09b7c: 91 7f 00 04 stw r11,4(r31) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc09b80: 7c 00 00 a6 mfmsr r0 ffc09b84: 7f 80 01 24 mtmsr r28 ffc09b88: 7c 00 01 24 mtmsr r0 */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( Scheduler_Control *the_scheduler ) { the_scheduler->Operations.schedule( the_scheduler ); ffc09b8c: 3c 60 00 00 lis r3,0 ffc09b90: 38 63 2c e0 addi r3,r3,11488 ffc09b94: 80 03 00 04 lwz r0,4(r3) ffc09b98: 7c 09 03 a6 mtctr r0 ffc09b9c: 4e 80 04 21 bctrl * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); ffc09ba0: 3d 20 00 00 lis r9,0 ffc09ba4: 39 29 31 04 addi r9,r9,12548 ffc09ba8: 81 69 00 0c lwz r11,12(r9) * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(&_Scheduler); if ( !_Thread_Is_executing_also_the_heir() && ffc09bac: 80 09 00 10 lwz r0,16(r9) ffc09bb0: 7f 8b 00 00 cmpw cr7,r11,r0 ffc09bb4: 41 9e 00 18 beq- cr7,ffc09bcc <_Thread_Change_priority+0x180> ffc09bb8: 88 0b 00 74 lbz r0,116(r11) ffc09bbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc09bc0: 41 9e 00 0c beq- cr7,ffc09bcc <_Thread_Change_priority+0x180> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; ffc09bc4: 38 00 00 01 li r0,1 ffc09bc8: 98 09 00 18 stb r0,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09bcc: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); } ffc09bd0: 39 61 00 20 addi r11,r1,32 ffc09bd4: 48 00 b5 98 b ffc1516c <_restgpr_28_x> =============================================================================== ffc09c40 <_Thread_Close>: void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { ffc09c40: 94 21 ff e8 stwu r1,-24(r1) ffc09c44: 7c 08 02 a6 mflr r0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09c48: 39 60 00 00 li r11,0 ffc09c4c: 90 01 00 1c stw r0,28(r1) RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( ffc09c50: a0 04 00 0a lhz r0,10(r4) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc09c54: 81 23 00 1c lwz r9,28(r3) ffc09c58: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc09c5c: bf a1 00 0c stmw r29,12(r1) ffc09c60: 7c 7e 1b 78 mr r30,r3 ffc09c64: 7d 69 01 2e stwx r11,r9,r0 ffc09c68: 7c 9f 23 78 mr r31,r4 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc09c6c: 3f a0 00 00 lis r29,0 ffc09c70: 81 3d 27 a8 lwz r9,10152(r29) * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); ffc09c74: 7c 83 23 78 mr r3,r4 ffc09c78: 38 09 ff ff addi r0,r9,-1 ffc09c7c: 90 1d 27 a8 stw r0,10152(r29) ffc09c80: 48 00 13 39 bl ffc0afb8 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09c84: 81 3d 27 a8 lwz r9,10152(r29) ffc09c88: 38 09 00 01 addi r0,r9,1 ffc09c8c: 90 1d 27 a8 stw r0,10152(r29) /* * 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 ); ffc09c90: 7f c3 f3 78 mr r3,r30 ffc09c94: 7f e4 fb 78 mr r4,r31 ffc09c98: 4b ff f1 a9 bl ffc08e40 <_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 ); ffc09c9c: 7f e3 fb 78 mr r3,r31 ffc09ca0: 38 80 00 01 li r4,1 ffc09ca4: 48 00 0c 9d bl ffc0a940 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { ffc09ca8: 7f e3 fb 78 mr r3,r31 ffc09cac: 48 00 0a bd bl ffc0a768 <_Thread_queue_Extract_with_proxy> ffc09cb0: 2f 83 00 00 cmpwi cr7,r3,0 ffc09cb4: 40 9e 00 18 bne- cr7,ffc09ccc <_Thread_Close+0x8c> if ( _Watchdog_Is_active( &the_thread->Timer ) ) ffc09cb8: 80 1f 00 50 lwz r0,80(r31) ffc09cbc: 2f 80 00 02 cmpwi cr7,r0,2 ffc09cc0: 40 be 00 0c bne+ cr7,ffc09ccc <_Thread_Close+0x8c> (void) _Watchdog_Remove( &the_thread->Timer ); ffc09cc4: 38 7f 00 48 addi r3,r31,72 ffc09cc8: 48 00 15 5d bl ffc0b224 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Scheduler_Thread_scheduler_free( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_free( the_scheduler, the_thread ); ffc09ccc: 3c 60 00 00 lis r3,0 ffc09cd0: 38 63 2c e0 addi r3,r3,11488 ffc09cd4: 80 03 00 18 lwz r0,24(r3) ffc09cd8: 7f e4 fb 78 mr r4,r31 ffc09cdc: 7c 09 03 a6 mtctr r0 ffc09ce0: 4e 80 04 21 bctrl if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; if ( the_thread->Start.fp_context ) ffc09ce4: 80 7f 00 c0 lwz r3,192(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; ffc09ce8: 38 00 00 00 li r0,0 if ( the_thread->Start.fp_context ) ffc09cec: 2f 83 00 00 cmpwi cr7,r3,0 #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; ffc09cf0: 90 1f 01 28 stw r0,296(r31) if ( the_thread->Start.fp_context ) ffc09cf4: 41 9e 00 08 beq- cr7,ffc09cfc <_Thread_Close+0xbc> <== NEVER TAKEN (void) _Workspace_Free( the_thread->Start.fp_context ); ffc09cf8: 48 00 17 31 bl ffc0b428 <_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 ); ffc09cfc: 7f e3 fb 78 mr r3,r31 ffc09d00: 48 00 0d b9 bl ffc0aab8 <_Thread_Stack_Free> the_thread->Start.stack = NULL; if ( the_thread->extensions ) ffc09d04: 80 7f 01 38 lwz r3,312(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; ffc09d08: 38 00 00 00 li r0,0 if ( the_thread->extensions ) ffc09d0c: 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; ffc09d10: 90 1f 00 c4 stw r0,196(r31) if ( the_thread->extensions ) ffc09d14: 41 9e 00 08 beq- cr7,ffc09d1c <_Thread_Close+0xdc> (void) _Workspace_Free( the_thread->extensions ); ffc09d18: 48 00 17 11 bl ffc0b428 <_Workspace_Free> the_thread->extensions = NULL; ffc09d1c: 38 00 00 00 li r0,0 } ffc09d20: 39 61 00 18 addi r11,r1,24 _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; if ( the_thread->extensions ) (void) _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; ffc09d24: 90 1f 01 38 stw r0,312(r31) } ffc09d28: 48 00 b4 48 b ffc15170 <_restgpr_29_x> =============================================================================== ffc09e10 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc09e10: 94 21 ff e8 stwu r1,-24(r1) ffc09e14: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc09e18: 38 81 00 08 addi r4,r1,8 void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc09e1c: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc09e20: 48 00 01 b5 bl ffc09fd4 <_Thread_Get> switch ( location ) { ffc09e24: 80 01 00 08 lwz r0,8(r1) ffc09e28: 2f 80 00 00 cmpwi cr7,r0,0 ffc09e2c: 40 9e 00 20 bne- cr7,ffc09e4c <_Thread_Delay_ended+0x3c><== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( ffc09e30: 3c 80 10 00 lis r4,4096 ffc09e34: 60 84 00 18 ori r4,r4,24 ffc09e38: 4b ff fd a1 bl ffc09bd8 <_Thread_Clear_state> ffc09e3c: 3d 20 00 00 lis r9,0 ffc09e40: 81 69 27 a8 lwz r11,10152(r9) ffc09e44: 38 0b ff ff addi r0,r11,-1 ffc09e48: 90 09 27 a8 stw r0,10152(r9) | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } ffc09e4c: 80 01 00 1c lwz r0,28(r1) ffc09e50: 38 21 00 18 addi r1,r1,24 ffc09e54: 7c 08 03 a6 mtlr r0 ffc09e58: 4e 80 00 20 blr =============================================================================== ffc09e5c <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc09e5c: 94 21 ff b8 stwu r1,-72(r1) ffc09e60: 7c 08 02 a6 mflr r0 ffc09e64: be a1 00 1c stmw r21,28(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc09e68: 3f 40 00 00 lis r26,0 ffc09e6c: 39 3a 31 04 addi r9,r26,12548 * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { ffc09e70: 90 01 00 4c stw r0,76(r1) Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; ffc09e74: 83 e9 00 0c lwz r31,12(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09e78: 7c 00 00 a6 mfmsr r0 ffc09e7c: 7d 30 42 a6 mfsprg r9,0 ffc09e80: 7c 09 48 78 andc r9,r0,r9 ffc09e84: 7d 20 01 24 mtmsr r9 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( ffc09e88: 3f 80 00 00 lis r28,0 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; ffc09e8c: 3e a0 00 00 lis r21,0 ffc09e90: 3a c0 00 01 li r22,1 _Thread_Dispatch_necessary = false; ffc09e94: 3a e0 00 00 li r23,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; ffc09e98: 3f 00 00 00 lis r24,0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc09e9c: 3b 61 00 08 addi r27,r1,8 _Timestamp_Subtract( ffc09ea0: 3b 9c 27 d8 addi r28,r28,10200 ffc09ea4: 3b a1 00 10 addi r29,r1,16 #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc09ea8: 3f 20 00 00 lis r25,0 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc09eac: 48 00 00 dc b ffc09f88 <_Thread_Dispatch+0x12c> heir = _Thread_Heir; ffc09eb0: 83 c9 00 10 lwz r30,16(r9) _Thread_Dispatch_disable_level = 1; ffc09eb4: 92 d5 27 a8 stw r22,10152(r21) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc09eb8: 7f 9e f8 00 cmpw cr7,r30,r31 executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; ffc09ebc: 9a e9 00 18 stb r23,24(r9) _Thread_Executing = heir; ffc09ec0: 93 c9 00 0c stw r30,12(r9) /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) ffc09ec4: 41 9e 00 d4 beq- cr7,ffc09f98 <_Thread_Dispatch+0x13c> */ #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 ) ffc09ec8: 81 3e 00 7c lwz r9,124(r30) ffc09ecc: 2f 89 00 01 cmpwi cr7,r9,1 ffc09ed0: 40 be 00 0c bne+ cr7,ffc09edc <_Thread_Dispatch+0x80> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc09ed4: 81 38 27 a4 lwz r9,10148(r24) ffc09ed8: 91 3e 00 78 stw r9,120(r30) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09edc: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); ffc09ee0: 7f 63 db 78 mr r3,r27 ffc09ee4: 48 00 3d 29 bl ffc0dc0c <_TOD_Get_uptime> _Timestamp_Subtract( ffc09ee8: 7f 83 e3 78 mr r3,r28 ffc09eec: 7f 64 db 78 mr r4,r27 ffc09ef0: 7f a5 eb 78 mr r5,r29 ffc09ef4: 48 00 0e 55 bl ffc0ad48 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); ffc09ef8: 38 7f 00 84 addi r3,r31,132 ffc09efc: 7f a4 eb 78 mr r4,r29 ffc09f00: 48 00 0d ed bl ffc0acec <_Timespec_Add_to> _Thread_Time_of_last_context_switch = uptime; ffc09f04: 81 21 00 08 lwz r9,8(r1) ffc09f08: 81 41 00 0c lwz r10,12(r1) ffc09f0c: 91 3c 00 00 stw r9,0(r28) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc09f10: 81 39 27 bc lwz r9,10172(r25) &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; ffc09f14: 91 5c 00 04 stw r10,4(r28) #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { ffc09f18: 2f 89 00 00 cmpwi cr7,r9,0 ffc09f1c: 41 9e 00 14 beq- cr7,ffc09f30 <_Thread_Dispatch+0xd4> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; ffc09f20: 80 09 00 00 lwz r0,0(r9) ffc09f24: 90 1f 01 2c stw r0,300(r31) *_Thread_libc_reent = heir->libc_reent; ffc09f28: 80 1e 01 2c lwz r0,300(r30) ffc09f2c: 90 09 00 00 stw r0,0(r9) } _User_extensions_Thread_switch( executing, heir ); ffc09f30: 7f e3 fb 78 mr r3,r31 ffc09f34: 7f c4 f3 78 mr r4,r30 ffc09f38: 48 00 11 3d bl ffc0b074 <_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 ) ffc09f3c: 80 1f 01 28 lwz r0,296(r31) ffc09f40: 2f 80 00 00 cmpwi cr7,r0,0 ffc09f44: 41 9e 00 0c beq- cr7,ffc09f50 <_Thread_Dispatch+0xf4> _Context_Save_fp( &executing->fp_context ); ffc09f48: 38 7f 01 28 addi r3,r31,296 ffc09f4c: 48 00 b2 f5 bl ffc15240 <_CPU_Context_save_fp> #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); ffc09f50: 38 7f 00 c8 addi r3,r31,200 ffc09f54: 38 9e 00 c8 addi r4,r30,200 ffc09f58: 48 00 b4 69 bl ffc153c0 <_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 ) ffc09f5c: 80 1f 01 28 lwz r0,296(r31) ffc09f60: 2f 80 00 00 cmpwi cr7,r0,0 ffc09f64: 41 9e 00 0c beq- cr7,ffc09f70 <_Thread_Dispatch+0x114> _Context_Restore_fp( &executing->fp_context ); ffc09f68: 38 7f 01 28 addi r3,r31,296 ffc09f6c: 48 00 b3 95 bl ffc15300 <_CPU_Context_restore_fp> #endif #endif executing = _Thread_Executing; ffc09f70: 39 3a 31 04 addi r9,r26,12548 ffc09f74: 83 e9 00 0c lwz r31,12(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc09f78: 7c 00 00 a6 mfmsr r0 ffc09f7c: 7d 30 42 a6 mfsprg r9,0 ffc09f80: 7c 09 48 78 andc r9,r0,r9 ffc09f84: 7d 20 01 24 mtmsr r9 Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { ffc09f88: 39 3a 31 04 addi r9,r26,12548 ffc09f8c: 89 69 00 18 lbz r11,24(r9) ffc09f90: 2f 8b 00 00 cmpwi cr7,r11,0 ffc09f94: 40 9e ff 1c bne+ cr7,ffc09eb0 <_Thread_Dispatch+0x54> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; ffc09f98: 39 60 00 00 li r11,0 ffc09f9c: 3d 20 00 00 lis r9,0 ffc09fa0: 91 69 27 a8 stw r11,10152(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc09fa4: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _API_extensions_Run_postswitch(); ffc09fa8: 4b ff e2 35 bl ffc081dc <_API_extensions_Run_postswitch> } ffc09fac: 39 61 00 48 addi r11,r1,72 ffc09fb0: 48 00 b1 a0 b ffc15150 <_restgpr_21_x> =============================================================================== ffc0ff88 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0ff88: 94 21 ff f0 stwu r1,-16(r1) ffc0ff8c: 7c 08 02 a6 mflr r0 #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc0ff90: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Handler( void ) { ffc0ff94: 90 01 00 14 stw r0,20(r1) ffc0ff98: bf c1 00 08 stmw r30,8(r1) #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; ffc0ff9c: 83 e9 31 10 lwz r31,12560(r9) /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; ffc0ffa0: 81 3f 00 ac lwz r9,172(r31) } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0ffa4: 38 00 00 00 li r0,0 ffc0ffa8: 7c 00 00 a6 mfmsr r0 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc0ffac: 71 2b 00 01 andi. r11,r9,1 ffc0ffb0: 40 82 00 10 bne- ffc0ffc0 <_Thread_Handler+0x38> static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc0ffb4: 7d 30 42 a6 mfsprg r9,0 msr |= ppc_interrupt_get_disable_mask(); ffc0ffb8: 7d 20 03 78 or r0,r9,r0 ffc0ffbc: 48 00 00 0c b ffc0ffc8 <_Thread_Handler+0x40> ffc0ffc0: 7d 30 42 a6 mfsprg r9,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc0ffc4: 7c 00 48 78 andc r0,r0,r9 } _CPU_MSR_SET(msr); ffc0ffc8: 7c 00 01 24 mtmsr r0 _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; ffc0ffcc: 3d 20 00 00 lis r9,0 ffc0ffd0: 8b c9 29 98 lbz r30,10648(r9) doneConstructors = 1; ffc0ffd4: 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 ); ffc0ffd8: 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; ffc0ffdc: 98 09 29 98 stb r0,10648(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 ); ffc0ffe0: 4b ff ae 61 bl ffc0ae40 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); ffc0ffe4: 4b ff 9f d1 bl ffc09fb4 <_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) */ { ffc0ffe8: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0ffec: 40 be 00 08 bne+ cr7,ffc0fff4 <_Thread_Handler+0x6c> INIT_NAME (); ffc0fff0: 48 00 62 6d bl ffc1625c <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { ffc0fff4: 80 1f 00 94 lwz r0,148(r31) ffc0fff8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fffc: 40 be 00 10 bne+ cr7,ffc1000c <_Thread_Handler+0x84> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( ffc10000: 80 1f 00 90 lwz r0,144(r31) ffc10004: 80 7f 00 9c lwz r3,156(r31) ffc10008: 48 00 00 14 b ffc1001c <_Thread_Handler+0x94> executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { ffc1000c: 2f 80 00 01 cmpwi cr7,r0,1 ffc10010: 40 be 00 18 bne+ cr7,ffc10028 <_Thread_Handler+0xa0> <== NEVER TAKEN executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( ffc10014: 80 1f 00 90 lwz r0,144(r31) ffc10018: 80 7f 00 98 lwz r3,152(r31) ffc1001c: 7c 09 03 a6 mtctr r0 ffc10020: 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 = ffc10024: 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 ); ffc10028: 7f e3 fb 78 mr r3,r31 ffc1002c: 4b ff ae 69 bl ffc0ae94 <_User_extensions_Thread_exitted> _Internal_error_Occurred( ffc10030: 38 60 00 00 li r3,0 ffc10034: 38 80 00 01 li r4,1 ffc10038: 38 a0 00 05 li r5,5 ffc1003c: 4b ff 8d 11 bl ffc08d4c <_Internal_error_Occurred> =============================================================================== ffc0a074 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a074: 94 21 ff d0 stwu r1,-48(r1) ffc0a078: 7c 08 02 a6 mflr r0 ffc0a07c: be e1 00 0c stmw r23,12(r1) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0a080: 7c b7 2b 79 mr. r23,r5 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a084: 7d 3a 4b 78 mr r26,r9 ffc0a088: 90 01 00 34 stw r0,52(r1) /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0a08c: 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 ) { ffc0a090: 7c 7e 1b 78 mr r30,r3 ffc0a094: 81 21 00 40 lwz r9,64(r1) ffc0a098: 7c 9f 23 78 mr r31,r4 ffc0a09c: 7c dd 33 78 mr r29,r6 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0a0a0: 90 04 01 30 stw r0,304(r4) Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { ffc0a0a4: 7c fc 3b 78 mr r28,r7 ffc0a0a8: 7d 1b 43 78 mr r27,r8 ffc0a0ac: 83 09 00 00 lwz r24,0(r9) ffc0a0b0: 7d 59 53 78 mr r25,r10 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; ffc0a0b4: 90 04 01 34 stw r0,308(r4) extensions_area = NULL; the_thread->libc_reent = NULL; ffc0a0b8: 90 04 01 2c stw r0,300(r4) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { ffc0a0bc: 40 a2 00 38 bne+ ffc0a0f4 <_Thread_Initialize+0x80> actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); ffc0a0c0: 7c 83 23 78 mr r3,r4 ffc0a0c4: 7c c4 33 78 mr r4,r6 ffc0a0c8: 48 00 09 7d bl ffc0aa44 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ ffc0a0cc: 38 00 00 00 li r0,0 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0a0d0: 2c 03 00 00 cmpwi r3,0 ffc0a0d4: 41 82 01 e0 beq- ffc0a2b4 <_Thread_Initialize+0x240> ffc0a0d8: 7f 83 e8 40 cmplw cr7,r3,r29 return false; /* stack allocation failed */ ffc0a0dc: 7e e0 bb 78 mr r0,r23 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) ffc0a0e0: 41 9c 01 d4 blt- cr7,ffc0a2b4 <_Thread_Initialize+0x240><== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = true; ffc0a0e4: 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; ffc0a0e8: 82 ff 00 c4 lwz r23,196(r31) the_thread->Start.core_allocated_stack = true; ffc0a0ec: 98 1f 00 b4 stb r0,180(r31) ffc0a0f0: 48 00 00 0c b ffc0a0fc <_Thread_Initialize+0x88> } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = false; ffc0a0f4: 98 04 00 b4 stb r0,180(r4) ffc0a0f8: 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 ) { ffc0a0fc: 2f 9c 00 00 cmpwi cr7,r28,0 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; ffc0a100: 92 ff 00 bc stw r23,188(r31) extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; ffc0a104: 3a e0 00 00 li r23,0 the_stack->size = size; ffc0a108: 90 7f 00 b8 stw r3,184(r31) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { ffc0a10c: 41 be 00 14 beq+ cr7,ffc0a120 <_Thread_Initialize+0xac> fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); ffc0a110: 38 60 01 08 li r3,264 ffc0a114: 48 00 12 e1 bl ffc0b3f4 <_Workspace_Allocate> if ( !fp_area ) ffc0a118: 7c 77 1b 79 mr. r23,r3 ffc0a11c: 41 82 01 24 beq- ffc0a240 <_Thread_Initialize+0x1cc> #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a120: 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; ffc0a124: 92 ff 01 28 stw r23,296(r31) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc0a128: 38 00 00 00 li r0,0 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a12c: 80 69 27 c8 lwz r3,10184(r9) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0a130: 3b a0 00 00 li r29,0 if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; the_thread->Start.fp_context = fp_area; ffc0a134: 92 ff 00 c0 stw r23,192(r31) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { ffc0a138: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a13c: 90 1f 00 50 stw r0,80(r31) the_watchdog->routine = routine; ffc0a140: 90 1f 00 64 stw r0,100(r31) the_watchdog->id = id; ffc0a144: 90 1f 00 68 stw r0,104(r31) the_watchdog->user_data = user_data; ffc0a148: 90 1f 00 6c stw r0,108(r31) ffc0a14c: 41 be 00 18 beq+ cr7,ffc0a164 <_Thread_Initialize+0xf0> extensions_area = _Workspace_Allocate( ffc0a150: 38 63 00 01 addi r3,r3,1 ffc0a154: 54 63 10 3a rlwinm r3,r3,2,0,29 ffc0a158: 48 00 12 9d bl ffc0b3f4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) ffc0a15c: 7c 7d 1b 79 mr. r29,r3 ffc0a160: 41 82 00 e4 beq- ffc0a244 <_Thread_Initialize+0x1d0> * 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 ) { ffc0a164: 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; ffc0a168: 93 bf 01 38 stw r29,312(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 ) { ffc0a16c: 41 9e 00 2c beq- cr7,ffc0a198 <_Thread_Initialize+0x124> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) ffc0a170: 3d 20 00 00 lis r9,0 ffc0a174: 81 49 27 c8 lwz r10,10184(r9) * all memory associated with this thread. It completes by adding * the thread to the local object table so operations on this * thread id are allowed. */ bool _Thread_Initialize( ffc0a178: 39 7d ff fc addi r11,r29,-4 ffc0a17c: 39 20 00 00 li r9,0 * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; ffc0a180: 38 00 00 00 li r0,0 ffc0a184: 48 00 00 0c b ffc0a190 <_Thread_Initialize+0x11c> ffc0a188: 94 0b 00 04 stwu r0,4(r11) * 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++ ) ffc0a18c: 39 29 00 01 addi r9,r9,1 ffc0a190: 7f 89 50 40 cmplw cr7,r9,r10 ffc0a194: 40 9d ff f4 ble+ cr7,ffc0a188 <_Thread_Initialize+0x114> the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { ffc0a198: 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; ffc0a19c: 80 01 00 38 lwz r0,56(r1) /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; ffc0a1a0: 9b 5f 00 a0 stb r26,160(r31) the_thread->Start.budget_algorithm = budget_algorithm; ffc0a1a4: 93 3f 00 a4 stw r25,164(r31) the_thread->Start.budget_callout = budget_callout; ffc0a1a8: 90 1f 00 a8 stw r0,168(r31) switch ( budget_algorithm ) { ffc0a1ac: 40 be 00 10 bne+ cr7,ffc0a1bc <_Thread_Initialize+0x148> 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; ffc0a1b0: 3d 20 00 00 lis r9,0 ffc0a1b4: 80 09 27 a4 lwz r0,10148(r9) ffc0a1b8: 90 1f 00 78 stw r0,120(r31) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0a1bc: 80 01 00 3c lwz r0,60(r1) Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return the_scheduler->Operations.scheduler_allocate( the_scheduler, the_thread ); ffc0a1c0: 3c 60 00 00 lis r3,0 ffc0a1c4: 38 63 2c e0 addi r3,r3,11488 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; ffc0a1c8: 93 7f 00 18 stw r27,24(r31) } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; ffc0a1cc: 3b 40 00 00 li r26,0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; ffc0a1d0: 90 1f 00 ac stw r0,172(r31) the_thread->current_state = STATES_DORMANT; ffc0a1d4: 38 00 00 01 li r0,1 RTEMS_INLINE_ROUTINE void* _Scheduler_Thread_scheduler_allocate( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { return ffc0a1d8: 7f e4 fb 78 mr r4,r31 ffc0a1dc: 90 1f 00 10 stw r0,16(r31) ffc0a1e0: 80 03 00 14 lwz r0,20(r3) the_thread->Wait.queue = NULL; ffc0a1e4: 93 5f 00 44 stw r26,68(r31) ffc0a1e8: 7c 09 03 a6 mtctr r0 the_thread->resource_count = 0; ffc0a1ec: 93 5f 00 1c stw r26,28(r31) the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; ffc0a1f0: 93 7f 00 b0 stw r27,176(r31) ffc0a1f4: 4e 80 04 21 bctrl sched =_Scheduler_Thread_scheduler_allocate( &_Scheduler, the_thread ); if ( !sched ) ffc0a1f8: 7c 7c 1b 79 mr. r28,r3 ffc0a1fc: 41 82 00 4c beq- ffc0a248 <_Thread_Initialize+0x1d4> goto failed; _Thread_Set_priority( the_thread, priority ); ffc0a200: 7f e3 fb 78 mr r3,r31 ffc0a204: 7f 64 db 78 mr r4,r27 ffc0a208: 48 00 06 fd bl ffc0a904 <_Thread_Set_priority> Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( ffc0a20c: a0 1f 00 0a lhz r0,10(r31) _Thread_Stack_Free( the_thread ); return false; } ffc0a210: 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 ); ffc0a214: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0a218: 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 ); ffc0a21c: 93 5f 00 84 stw r26,132(r31) ffc0a220: 93 5f 00 88 stw r26,136(r31) ffc0a224: 7f e9 01 2e stwx r31,r9,r0 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc0a228: 93 1f 00 0c stw r24,12(r31) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); ffc0a22c: 48 00 0d 19 bl ffc0af44 <_User_extensions_Thread_create> if ( extension_status ) return true; ffc0a230: 38 00 00 01 li r0,1 * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) ffc0a234: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a238: 41 be 00 10 beq+ cr7,ffc0a248 <_Thread_Initialize+0x1d4> ffc0a23c: 48 00 00 78 b ffc0a2b4 <_Thread_Initialize+0x240> * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; ffc0a240: 3b a0 00 00 li r29,0 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; ffc0a244: 3b 80 00 00 li r28,0 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: if ( the_thread->libc_reent ) ffc0a248: 80 7f 01 2c lwz r3,300(r31) ffc0a24c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a250: 41 9e 00 08 beq- cr7,ffc0a258 <_Thread_Initialize+0x1e4> _Workspace_Free( the_thread->libc_reent ); ffc0a254: 48 00 11 d5 bl ffc0b428 <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) ffc0a258: 80 7f 01 30 lwz r3,304(r31) ffc0a25c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a260: 41 9e 00 08 beq- cr7,ffc0a268 <_Thread_Initialize+0x1f4> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0a264: 48 00 11 c5 bl ffc0b428 <_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] ) ffc0a268: 80 7f 01 34 lwz r3,308(r31) ffc0a26c: 2f 83 00 00 cmpwi cr7,r3,0 ffc0a270: 41 9e 00 08 beq- cr7,ffc0a278 <_Thread_Initialize+0x204> _Workspace_Free( the_thread->API_Extensions[i] ); ffc0a274: 48 00 11 b5 bl ffc0b428 <_Workspace_Free> if ( extensions_area ) ffc0a278: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0a27c: 41 9e 00 0c beq- cr7,ffc0a288 <_Thread_Initialize+0x214> (void) _Workspace_Free( extensions_area ); ffc0a280: 7f a3 eb 78 mr r3,r29 ffc0a284: 48 00 11 a5 bl ffc0b428 <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) ffc0a288: 2f 97 00 00 cmpwi cr7,r23,0 ffc0a28c: 41 9e 00 0c beq- cr7,ffc0a298 <_Thread_Initialize+0x224> (void) _Workspace_Free( fp_area ); ffc0a290: 7e e3 bb 78 mr r3,r23 ffc0a294: 48 00 11 95 bl ffc0b428 <_Workspace_Free> #endif if ( sched ) ffc0a298: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0a29c: 41 9e 00 0c beq- cr7,ffc0a2a8 <_Thread_Initialize+0x234> (void) _Workspace_Free( sched ); ffc0a2a0: 7f 83 e3 78 mr r3,r28 ffc0a2a4: 48 00 11 85 bl ffc0b428 <_Workspace_Free> _Thread_Stack_Free( the_thread ); ffc0a2a8: 7f e3 fb 78 mr r3,r31 ffc0a2ac: 48 00 08 0d bl ffc0aab8 <_Thread_Stack_Free> return false; ffc0a2b0: 38 00 00 00 li r0,0 } ffc0a2b4: 39 61 00 30 addi r11,r1,48 ffc0a2b8: 7c 03 03 78 mr r3,r0 ffc0a2bc: 48 00 ae 9c b ffc15158 <_restgpr_23_x> =============================================================================== ffc0b8f4 <_Thread_Restart>: bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0b8f4: 7c 2b 0b 78 mr r11,r1 ffc0b8f8: 7c 08 02 a6 mflr r0 ffc0b8fc: 94 21 ff e8 stwu r1,-24(r1) ffc0b900: 90 01 00 1c stw r0,28(r1) ffc0b904: 48 01 04 2d bl ffc1bd30 <_savegpr_31> _Thread_Restart_self(); return true; } return false; ffc0b908: 38 00 00 00 li r0,0 */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); ffc0b90c: 81 23 00 10 lwz r9,16(r3) bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { ffc0b910: 7c 7f 1b 78 mr r31,r3 if ( !_States_Is_dormant( the_thread->current_state ) ) { ffc0b914: 71 2b 00 01 andi. r11,r9,1 ffc0b918: 40 a2 00 70 bne+ ffc0b988 <_Thread_Restart+0x94> _Thread_Set_transient( the_thread ); ffc0b91c: 90 81 00 08 stw r4,8(r1) ffc0b920: 90 a1 00 0c stw r5,12(r1) ffc0b924: 48 00 01 15 bl ffc0ba38 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); ffc0b928: 7f e3 fb 78 mr r3,r31 ffc0b92c: 80 81 00 08 lwz r4,8(r1) ffc0b930: 80 a1 00 0c lwz r5,12(r1) ffc0b934: 48 00 3c ed bl ffc0f620 <_Thread_Reset> _Thread_Load_environment( the_thread ); ffc0b938: 7f e3 fb 78 mr r3,r31 ffc0b93c: 48 00 39 9d bl ffc0f2d8 <_Thread_Load_environment> _Thread_Ready( the_thread ); ffc0b940: 7f e3 fb 78 mr r3,r31 ffc0b944: 48 00 3c 8d bl ffc0f5d0 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); ffc0b948: 7f e3 fb 78 mr r3,r31 ffc0b94c: 48 00 07 59 bl ffc0c0a4 <_User_extensions_Thread_restart> RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); ffc0b950: 3d 20 00 00 lis r9,0 if ( _Thread_Is_executing ( the_thread ) ) ffc0b954: 81 29 31 90 lwz r9,12688(r9) _Thread_Restart_self(); return true; ffc0b958: 38 00 00 01 li r0,1 _Thread_Ready( the_thread ); _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) ffc0b95c: 7f 9f 48 00 cmpw cr7,r31,r9 ffc0b960: 40 be 00 28 bne+ cr7,ffc0b988 <_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 ) ffc0b964: 80 1f 01 28 lwz r0,296(r31) ffc0b968: 2f 80 00 00 cmpwi cr7,r0,0 ffc0b96c: 41 9e 00 0c beq- cr7,ffc0b978 <_Thread_Restart+0x84> <== NEVER TAKEN _Context_Restore_fp( &_Thread_Executing->fp_context ); ffc0b970: 38 7f 01 28 addi r3,r31,296 ffc0b974: 48 01 05 2d bl ffc1bea0 <_CPU_Context_restore_fp> #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); ffc0b978: 3d 20 00 00 lis r9,0 ffc0b97c: 80 69 31 90 lwz r3,12688(r9) ffc0b980: 38 63 00 c8 addi r3,r3,200 ffc0b984: 48 01 06 dd bl ffc1c060 <_CPU_Context_restore> return true; } return false; } ffc0b988: 39 61 00 18 addi r11,r1,24 ffc0b98c: 7c 03 03 78 mr r3,r0 ffc0b990: 4b ff 53 c8 b ffc00d58 <_restgpr_31_x> =============================================================================== ffc0df64 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, bool force ) { ffc0df64: 7c 2b 0b 78 mr r11,r1 ffc0df68: 7c 08 02 a6 mflr r0 ffc0df6c: 94 21 ff f0 stwu r1,-16(r1) ffc0df70: 7c 64 1b 78 mr r4,r3 ffc0df74: 90 01 00 14 stw r0,20(r1) ffc0df78: 4b ff 26 cd bl ffc00644 <_savegpr_31> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0df7c: 7f e0 00 a6 mfmsr r31 ffc0df80: 7c 10 42 a6 mfsprg r0,0 ffc0df84: 7f e0 00 78 andc r0,r31,r0 ffc0df88: 7c 00 01 24 mtmsr r0 ISR_Level level; States_Control current_state; _ISR_Disable( level ); current_state = the_thread->current_state; ffc0df8c: 80 03 00 10 lwz r0,16(r3) if ( current_state & STATES_SUSPENDED ) { ffc0df90: 70 09 00 02 andi. r9,r0,2 ffc0df94: 41 82 00 28 beq- ffc0dfbc <_Thread_Resume+0x58> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); ffc0df98: 54 00 07 fa rlwinm r0,r0,0,31,29 current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { ffc0df9c: 2f 80 00 00 cmpwi cr7,r0,0 _ISR_Disable( level ); current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); ffc0dfa0: 90 03 00 10 stw r0,16(r3) if ( _States_Is_ready( current_state ) ) { ffc0dfa4: 40 be 00 18 bne+ cr7,ffc0dfbc <_Thread_Resume+0x58> RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( Scheduler_Control *the_scheduler, Thread_Control *the_thread ) { the_scheduler->Operations.unblock( the_scheduler, the_thread ); ffc0dfa8: 3c 60 00 00 lis r3,0 ffc0dfac: 38 63 2d c0 addi r3,r3,11712 ffc0dfb0: 80 03 00 10 lwz r0,16(r3) ffc0dfb4: 7c 09 03 a6 mtctr r0 ffc0dfb8: 4e 80 04 21 bctrl return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0dfbc: 7f e0 01 24 mtmsr r31 _Scheduler_Unblock( &_Scheduler, the_thread ); } } _ISR_Enable( level ); } ffc0dfc0: 39 61 00 10 addi r11,r1,16 ffc0dfc4: 4b ff 26 cc b ffc00690 <_restgpr_31_x> =============================================================================== ffc0ac34 <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0ac34: 7c 08 02 a6 mflr r0 ffc0ac38: 7c 2b 0b 78 mr r11,r1 ffc0ac3c: 94 21 ff f0 stwu r1,-16(r1) Thread_Control *executing; executing = _Thread_Executing; ffc0ac40: 3d 20 00 00 lis r9,0 * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { ffc0ac44: 90 01 00 14 stw r0,20(r1) ffc0ac48: 48 00 a4 e5 bl ffc1512c <_savegpr_31> Thread_Control *executing; executing = _Thread_Executing; ffc0ac4c: 83 e9 31 10 lwz r31,12560(r9) /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) ffc0ac50: 88 1f 00 74 lbz r0,116(r31) ffc0ac54: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac58: 41 9e 00 8c beq- cr7,ffc0ace4 <_Thread_Tickle_timeslice+0xb0> return; if ( !_States_Is_ready( executing->current_state ) ) ffc0ac5c: 80 1f 00 10 lwz r0,16(r31) ffc0ac60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac64: 40 9e 00 80 bne- cr7,ffc0ace4 <_Thread_Tickle_timeslice+0xb0> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { ffc0ac68: 80 1f 00 7c lwz r0,124(r31) ffc0ac6c: 2b 80 00 01 cmplwi cr7,r0,1 ffc0ac70: 41 9c 00 74 blt- cr7,ffc0ace4 <_Thread_Tickle_timeslice+0xb0> ffc0ac74: 2b 80 00 02 cmplwi cr7,r0,2 ffc0ac78: 40 9d 00 10 ble- cr7,ffc0ac88 <_Thread_Tickle_timeslice+0x54> ffc0ac7c: 2f 80 00 03 cmpwi cr7,r0,3 ffc0ac80: 40 be 00 64 bne+ cr7,ffc0ace4 <_Thread_Tickle_timeslice+0xb0><== NEVER TAKEN ffc0ac84: 48 00 00 3c b ffc0acc0 <_Thread_Tickle_timeslice+0x8c> 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 ) { ffc0ac88: 81 3f 00 78 lwz r9,120(r31) ffc0ac8c: 38 09 ff ff addi r0,r9,-1 ffc0ac90: 2f 80 00 00 cmpwi cr7,r0,0 ffc0ac94: 90 1f 00 78 stw r0,120(r31) ffc0ac98: 41 bd 00 4c bgt+ cr7,ffc0ace4 <_Thread_Tickle_timeslice+0xb0> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield( &_Scheduler ); ffc0ac9c: 3c 60 00 00 lis r3,0 ffc0aca0: 38 63 2c e0 addi r3,r3,11488 ffc0aca4: 80 03 00 08 lwz r0,8(r3) ffc0aca8: 7c 09 03 a6 mtctr r0 ffc0acac: 4e 80 04 21 bctrl * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield( ); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0acb0: 3d 20 00 00 lis r9,0 ffc0acb4: 80 09 27 a4 lwz r0,10148(r9) ffc0acb8: 90 1f 00 78 stw r0,120(r31) ffc0acbc: 48 00 00 28 b ffc0ace4 <_Thread_Tickle_timeslice+0xb0> } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) ffc0acc0: 81 3f 00 78 lwz r9,120(r31) ffc0acc4: 38 09 ff ff addi r0,r9,-1 ffc0acc8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0accc: 90 1f 00 78 stw r0,120(r31) ffc0acd0: 40 be 00 14 bne+ cr7,ffc0ace4 <_Thread_Tickle_timeslice+0xb0> (*executing->budget_callout)( executing ); ffc0acd4: 80 1f 00 80 lwz r0,128(r31) ffc0acd8: 7f e3 fb 78 mr r3,r31 ffc0acdc: 7c 09 03 a6 mtctr r0 ffc0ace0: 4e 80 04 21 bctrl break; #endif } } ffc0ace4: 39 61 00 10 addi r11,r1,16 ffc0ace8: 48 00 a4 90 b ffc15178 <_restgpr_31_x> =============================================================================== ffc0a84c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0a84c: 94 21 ff d8 stwu r1,-40(r1) ffc0a850: 7c 08 02 a6 mflr r0 ffc0a854: bf a1 00 1c stmw r29,28(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0a858: 7c 7f 1b 79 mr. r31,r3 void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { ffc0a85c: 7c 9e 23 78 mr r30,r4 ffc0a860: 90 01 00 2c stw r0,44(r1) /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) ffc0a864: 41 82 00 54 beq- ffc0a8b8 <_Thread_queue_Requeue+0x6c> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { ffc0a868: 80 1f 00 34 lwz r0,52(r31) ffc0a86c: 2f 80 00 01 cmpwi cr7,r0,1 ffc0a870: 40 be 00 48 bne+ cr7,ffc0a8b8 <_Thread_queue_Requeue+0x6c><== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0a874: 7f a0 00 a6 mfmsr r29 ffc0a878: 7d 30 42 a6 mfsprg r9,0 ffc0a87c: 7f a9 48 78 andc r9,r29,r9 ffc0a880: 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 ) ) { ffc0a884: 3d 60 00 03 lis r11,3 ffc0a888: 81 24 00 10 lwz r9,16(r4) ffc0a88c: 61 6b be e0 ori r11,r11,48864 ffc0a890: 7d 6a 48 39 and. r10,r11,r9 ffc0a894: 41 a2 00 20 beq+ ffc0a8b4 <_Thread_queue_Requeue+0x68> <== NEVER TAKEN RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc0a898: 90 1f 00 30 stw r0,48(r31) _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); ffc0a89c: 38 a0 00 01 li r5,1 ffc0a8a0: 48 00 3a 39 bl ffc0e2d8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); ffc0a8a4: 7f e3 fb 78 mr r3,r31 ffc0a8a8: 7f c4 f3 78 mr r4,r30 ffc0a8ac: 38 a1 00 08 addi r5,r1,8 ffc0a8b0: 4b ff fd 0d bl ffc0a5bc <_Thread_queue_Enqueue_priority> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0a8b4: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } } ffc0a8b8: 39 61 00 28 addi r11,r1,40 ffc0a8bc: 48 00 a8 b4 b ffc15170 <_restgpr_29_x> =============================================================================== ffc0a8c0 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a8c0: 94 21 ff e8 stwu r1,-24(r1) ffc0a8c4: 7c 08 02 a6 mflr r0 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a8c8: 38 81 00 08 addi r4,r1,8 void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { ffc0a8cc: 90 01 00 1c stw r0,28(r1) Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); ffc0a8d0: 4b ff f7 05 bl ffc09fd4 <_Thread_Get> switch ( location ) { ffc0a8d4: 80 01 00 08 lwz r0,8(r1) ffc0a8d8: 2f 80 00 00 cmpwi cr7,r0,0 ffc0a8dc: 40 9e 00 18 bne- cr7,ffc0a8f4 <_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 ); ffc0a8e0: 48 00 3a ed bl ffc0e3cc <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; ffc0a8e4: 3d 20 00 00 lis r9,0 ffc0a8e8: 81 69 27 a8 lwz r11,10152(r9) ffc0a8ec: 38 0b ff ff addi r0,r11,-1 ffc0a8f0: 90 09 27 a8 stw r0,10152(r9) _Thread_Unnest_dispatch(); break; } } ffc0a8f4: 80 01 00 1c lwz r0,28(r1) ffc0a8f8: 38 21 00 18 addi r1,r1,24 ffc0a8fc: 7c 08 03 a6 mtlr r0 ffc0a900: 4e 80 00 20 blr =============================================================================== ffc18e50 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { ffc18e50: 94 21 ff a0 stwu r1,-96(r1) ffc18e54: 7c 08 02 a6 mflr r0 ffc18e58: be 41 00 28 stmw r18,40(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e5c: 3a a1 00 0c addi r21,r1,12 head->previous = NULL; tail->previous = head; ffc18e60: 3a 41 00 08 addi r18,r1,8 ffc18e64: 90 01 00 64 stw r0,100(r1) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e68: 3b 81 00 14 addi r28,r1,20 head->previous = NULL; ffc18e6c: 38 00 00 00 li r0,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e70: 3b 61 00 18 addi r27,r1,24 ffc18e74: 92 a1 00 08 stw r21,8(r1) ffc18e78: 7c 7f 1b 78 mr r31,r3 head->previous = NULL; ffc18e7c: 90 01 00 0c stw r0,12(r1) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc18e80: 3e 60 00 00 lis r19,0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18e84: 3b 43 00 30 addi r26,r3,48 tail->previous = head; ffc18e88: 92 41 00 10 stw r18,16(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(); ffc18e8c: 3e 80 00 00 lis r20,0 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); ffc18e90: 3b a3 00 68 addi r29,r3,104 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc18e94: 93 61 00 14 stw r27,20(r1) _ISR_Disable( level ); tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; do_loop = false; ffc18e98: 3a c0 00 00 li r22,0 _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; ffc18e9c: 3a e0 00 01 li r23,1 head->previous = NULL; ffc18ea0: 90 01 00 18 stw r0,24(r1) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); ffc18ea4: 3b 03 00 08 addi r24,r3,8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc18ea8: 3b 23 00 40 addi r25,r3,64 tail->previous = head; ffc18eac: 93 81 00 1c stw r28,28(r1) Chain_Control *tmp; /* * 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; ffc18eb0: 92 5f 00 78 stw r18,120(r31) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; ffc18eb4: 80 13 28 dc lwz r0,10460(r19) */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18eb8: 7f 85 e3 78 mr r5,r28 Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; ffc18ebc: 80 9f 00 3c lwz r4,60(r31) watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18ec0: 7f 43 d3 78 mr r3,r26 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; ffc18ec4: 90 1f 00 3c stw r0,60(r31) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); ffc18ec8: 7c 84 00 50 subf r4,r4,r0 ffc18ecc: 48 00 4b 51 bl ffc1da1c <_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(); ffc18ed0: 83 d4 28 b8 lwz r30,10424(r20) Watchdog_Interval last_snapshot = watchdogs->last_snapshot; ffc18ed4: 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 ) { ffc18ed8: 7f 9e 28 40 cmplw cr7,r30,r5 ffc18edc: 40 bd 00 18 ble+ cr7,ffc18ef4 <_Timer_server_Body+0xa4> /* * 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 ); ffc18ee0: 7c 85 f0 50 subf r4,r5,r30 ffc18ee4: 7f a3 eb 78 mr r3,r29 ffc18ee8: 7f 85 e3 78 mr r5,r28 ffc18eec: 48 00 4b 31 bl ffc1da1c <_Watchdog_Adjust_to_chain> ffc18ef0: 48 00 00 18 b ffc18f08 <_Timer_server_Body+0xb8> } else if ( snapshot < last_snapshot ) { ffc18ef4: 40 bc 00 14 bge+ cr7,ffc18f08 <_Timer_server_Body+0xb8> /* * 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 ); ffc18ef8: 7f a3 eb 78 mr r3,r29 ffc18efc: 38 80 00 01 li r4,1 ffc18f00: 7c be 28 50 subf r5,r30,r5 ffc18f04: 48 00 4a 61 bl ffc1d964 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; ffc18f08: 93 df 00 74 stw r30,116(r31) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); ffc18f0c: 80 7f 00 78 lwz r3,120(r31) ffc18f10: 48 00 0b d1 bl ffc19ae0 <_Chain_Get> if ( timer == NULL ) { ffc18f14: 7c 7e 1b 79 mr. r30,r3 ffc18f18: 41 82 00 2c beq- ffc18f44 <_Timer_server_Body+0xf4> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc18f1c: 80 1e 00 38 lwz r0,56(r30) _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc18f20: 7f 43 d3 78 mr r3,r26 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc18f24: 2f 80 00 01 cmpwi cr7,r0,1 ffc18f28: 41 9e 00 10 beq- cr7,ffc18f38 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc18f2c: 2f 80 00 03 cmpwi cr7,r0,3 ffc18f30: 40 9e ff dc bne+ cr7,ffc18f0c <_Timer_server_Body+0xbc> <== NEVER TAKEN _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc18f34: 7f a3 eb 78 mr r3,r29 ffc18f38: 38 9e 00 10 addi r4,r30,16 ffc18f3c: 48 00 4b 95 bl ffc1dad0 <_Watchdog_Insert> ffc18f40: 4b ff ff cc b ffc18f0c <_Timer_server_Body+0xbc> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); ffc18f44: 4b ff fe 25 bl ffc18d68 tmp = ts->insert_chain; if ( _Chain_Is_empty( insert_chain ) ) { ffc18f48: 81 21 00 08 lwz r9,8(r1) * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); tmp = ts->insert_chain; ffc18f4c: 80 1f 00 78 lwz r0,120(r31) if ( _Chain_Is_empty( insert_chain ) ) { ffc18f50: 38 00 00 01 li r0,1 ffc18f54: 7f 89 a8 00 cmpw cr7,r9,r21 ffc18f58: 40 be 00 0c bne+ cr7,ffc18f64 <_Timer_server_Body+0x114> ts->insert_chain = NULL; ffc18f5c: 93 df 00 78 stw r30,120(r31) do_loop = false; ffc18f60: 38 00 00 00 li r0,0 ffc18f64: 7c 60 01 24 mtmsr 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; while ( do_loop ) { ffc18f68: 2f 80 00 00 cmpwi cr7,r0,0 ffc18f6c: 40 9e ff 48 bne+ cr7,ffc18eb4 <_Timer_server_Body+0x64> _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 ) ) { ffc18f70: 81 21 00 14 lwz r9,20(r1) ffc18f74: 7f 89 d8 00 cmpw cr7,r9,r27 ffc18f78: 41 9e 00 50 beq- cr7,ffc18fc8 <_Timer_server_Body+0x178> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); ffc18f7c: 4b ff fd ed bl ffc18d68 initialized = false; } #endif return status; } ffc18f80: 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)) ffc18f84: 7f 89 d8 00 cmpw cr7,r9,r27 ffc18f88: 41 9e 00 38 beq- cr7,ffc18fc0 <_Timer_server_Body+0x170> * 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 ) { ffc18f8c: 2f 89 00 00 cmpwi cr7,r9,0 Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; ffc18f90: 81 69 00 00 lwz r11,0(r9) head->next = new_first; ffc18f94: 91 61 00 14 stw r11,20(r1) new_first->previous = head; ffc18f98: 93 8b 00 04 stw r28,4(r11) ffc18f9c: 41 9e 00 24 beq- cr7,ffc18fc0 <_Timer_server_Body+0x170><== NEVER TAKEN watchdog->state = WATCHDOG_INACTIVE; ffc18fa0: 92 c9 00 08 stw r22,8(r9) ffc18fa4: 7c 60 01 24 mtmsr r3 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); ffc18fa8: 80 09 00 1c lwz r0,28(r9) ffc18fac: 80 69 00 20 lwz r3,32(r9) ffc18fb0: 80 89 00 24 lwz r4,36(r9) ffc18fb4: 7c 09 03 a6 mtctr r0 ffc18fb8: 4e 80 04 21 bctrl } ffc18fbc: 4b ff ff c0 b ffc18f7c <_Timer_server_Body+0x12c> ffc18fc0: 7c 60 01 24 mtmsr r3 ffc18fc4: 4b ff fe ec b ffc18eb0 <_Timer_server_Body+0x60> } else { ts->active = false; ffc18fc8: 98 1f 00 7c stb r0,124(r31) /* * Block until there is something to do. */ _Thread_Disable_dispatch(); ffc18fcc: 4b ff fd b1 bl ffc18d7c <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); ffc18fd0: 80 7f 00 00 lwz r3,0(r31) ffc18fd4: 38 80 00 08 li r4,8 ffc18fd8: 48 00 41 2d bl ffc1d104 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); ffc18fdc: 7f e3 fb 78 mr r3,r31 ffc18fe0: 4b ff fd b1 bl ffc18d90 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); ffc18fe4: 7f e3 fb 78 mr r3,r31 ffc18fe8: 4b ff fe 09 bl ffc18df0 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); ffc18fec: 48 00 36 89 bl ffc1c674 <_Thread_Enable_dispatch> ts->active = true; ffc18ff0: 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 ); ffc18ff4: 7f 03 c3 78 mr r3,r24 ffc18ff8: 48 00 4c 35 bl ffc1dc2c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); ffc18ffc: 7f 23 cb 78 mr r3,r25 ffc19000: 48 00 4c 2d bl ffc1dc2c <_Watchdog_Remove> ffc19004: 4b ff fe ac b ffc18eb0 <_Timer_server_Body+0x60> =============================================================================== ffc19008 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19008: 94 21 ff f0 stwu r1,-16(r1) ffc1900c: 7c 08 02 a6 mflr r0 ffc19010: 90 01 00 14 stw r0,20(r1) if ( ts->insert_chain == NULL ) { ffc19014: 80 03 00 78 lwz r0,120(r3) static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19018: bf c1 00 08 stmw r30,8(r1) ffc1901c: 7c 7f 1b 78 mr r31,r3 if ( ts->insert_chain == NULL ) { ffc19020: 2f 80 00 00 cmpwi cr7,r0,0 static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { ffc19024: 7c 9e 23 78 mr r30,r4 if ( ts->insert_chain == NULL ) { ffc19028: 40 be 01 00 bne+ cr7,ffc19128 <_Timer_server_Schedule_operation_method+0x120> * is the reference point for the delta chain. Thus if we do not update the * reference point we have to add DT to the initial delta of the watchdog * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); ffc1902c: 4b ff fd 51 bl ffc18d7c <_Thread_Disable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { ffc19030: 80 1e 00 38 lwz r0,56(r30) ffc19034: 2f 80 00 01 cmpwi cr7,r0,1 ffc19038: 40 be 00 6c bne+ cr7,ffc190a4 <_Timer_server_Schedule_operation_method+0x9c> /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); ffc1903c: 4b ff fd 2d bl ffc18d68 snapshot = _Watchdog_Ticks_since_boot; ffc19040: 3d 20 00 00 lis r9,0 ffc19044: 80 09 28 dc lwz r0,10460(r9) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc19048: 39 7f 00 34 addi r11,r31,52 initialized = false; } #endif return status; } ffc1904c: 81 3f 00 30 lwz r9,48(r31) * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; ffc19050: 81 5f 00 3c lwz r10,60(r31) if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { ffc19054: 7f 89 58 00 cmpw cr7,r9,r11 ffc19058: 41 9e 00 20 beq- cr7,ffc19078 <_Timer_server_Schedule_operation_method+0x70> /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; ffc1905c: 81 09 00 10 lwz r8,16(r9) first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; ffc19060: 7d 4a 00 50 subf r10,r10,r0 delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; ffc19064: 39 60 00 00 li r11,0 * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { ffc19068: 7f 88 50 40 cmplw cr7,r8,r10 ffc1906c: 40 9d 00 08 ble- cr7,ffc19074 <_Timer_server_Schedule_operation_method+0x6c> delta_interval -= delta; ffc19070: 7d 6a 40 50 subf r11,r10,r8 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; ffc19074: 91 69 00 10 stw r11,16(r9) } ts->Interval_watchdogs.last_snapshot = snapshot; ffc19078: 90 1f 00 3c stw r0,60(r31) ffc1907c: 7c 60 01 24 mtmsr r3 _ISR_Enable( level ); _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); ffc19080: 38 7f 00 30 addi r3,r31,48 ffc19084: 38 9e 00 10 addi r4,r30,16 ffc19088: 48 00 4a 49 bl ffc1dad0 <_Watchdog_Insert> if ( !ts->active ) { ffc1908c: 88 1f 00 7c lbz r0,124(r31) ffc19090: 2f 80 00 00 cmpwi cr7,r0,0 ffc19094: 40 be 00 8c bne+ cr7,ffc19120 <_Timer_server_Schedule_operation_method+0x118> _Timer_server_Reset_interval_system_watchdog( ts ); ffc19098: 7f e3 fb 78 mr r3,r31 ffc1909c: 4b ff fc f5 bl ffc18d90 <_Timer_server_Reset_interval_system_watchdog> ffc190a0: 48 00 00 80 b ffc19120 <_Timer_server_Schedule_operation_method+0x118> } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { ffc190a4: 2f 80 00 03 cmpwi cr7,r0,3 ffc190a8: 40 be 00 78 bne+ cr7,ffc19120 <_Timer_server_Schedule_operation_method+0x118> /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); ffc190ac: 4b ff fc bd bl ffc18d68 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc190b0: 3d 20 00 00 lis r9,0 last_snapshot = ts->TOD_watchdogs.last_snapshot; ffc190b4: 81 1f 00 74 lwz r8,116(r31) /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ffc190b8: 80 09 28 b8 lwz r0,10424(r9) ffc190bc: 39 7f 00 6c addi r11,r31,108 initialized = false; } #endif return status; } ffc190c0: 81 3f 00 68 lwz r9,104(r31) * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { ffc190c4: 7f 89 58 00 cmpw cr7,r9,r11 ffc190c8: 41 9e 00 30 beq- cr7,ffc190f8 <_Timer_server_Schedule_operation_method+0xf0> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc190cc: 7f 80 40 40 cmplw cr7,r0,r8 _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; ffc190d0: 81 49 00 10 lwz r10,16(r9) } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; ffc190d4: 7d 6a 42 14 add r11,r10,r8 delta_interval += delta; ffc190d8: 7d 60 58 50 subf r11,r0,r11 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; if ( snapshot > last_snapshot ) { ffc190dc: 40 9d 00 18 ble- cr7,ffc190f4 <_Timer_server_Schedule_operation_method+0xec> /* * We advanced in time. */ delta = snapshot - last_snapshot; ffc190e0: 7d 08 00 50 subf r8,r8,r0 if (delta_interval > delta) { ffc190e4: 7f 8a 40 40 cmplw cr7,r10,r8 delta_interval -= delta; } else { delta_interval = 0; ffc190e8: 39 60 00 00 li r11,0 if ( snapshot > last_snapshot ) { /* * We advanced in time. */ delta = snapshot - last_snapshot; if (delta_interval > delta) { ffc190ec: 40 9d 00 08 ble- cr7,ffc190f4 <_Timer_server_Schedule_operation_method+0xec><== NEVER TAKEN delta_interval -= delta; ffc190f0: 7d 68 50 50 subf r11,r8,r10 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; ffc190f4: 91 69 00 10 stw r11,16(r9) } ts->TOD_watchdogs.last_snapshot = snapshot; ffc190f8: 90 1f 00 74 stw r0,116(r31) ffc190fc: 7c 60 01 24 mtmsr r3 _ISR_Enable( level ); _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); ffc19100: 38 7f 00 68 addi r3,r31,104 ffc19104: 38 9e 00 10 addi r4,r30,16 ffc19108: 48 00 49 c9 bl ffc1dad0 <_Watchdog_Insert> if ( !ts->active ) { ffc1910c: 88 1f 00 7c lbz r0,124(r31) ffc19110: 2f 80 00 00 cmpwi cr7,r0,0 ffc19114: 40 be 00 0c bne+ cr7,ffc19120 <_Timer_server_Schedule_operation_method+0x118><== NEVER TAKEN _Timer_server_Reset_tod_system_watchdog( ts ); ffc19118: 7f e3 fb 78 mr r3,r31 ffc1911c: 4b ff fc d5 bl ffc18df0 <_Timer_server_Reset_tod_system_watchdog> } } _Thread_Enable_dispatch(); ffc19120: 48 00 35 55 bl ffc1c674 <_Thread_Enable_dispatch> ffc19124: 48 00 00 0c b ffc19130 <_Timer_server_Schedule_operation_method+0x128> * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); ffc19128: 80 63 00 78 lwz r3,120(r3) ffc1912c: 48 00 09 5d bl ffc19a88 <_Chain_Append> } } ffc19130: 39 61 00 10 addi r11,r1,16 ffc19134: 4b ff 51 84 b ffc0e2b8 <_restgpr_30_x> =============================================================================== ffc0ad8c <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ad8c: 94 21 ff e8 stwu r1,-24(r1) ffc0ad90: 7c 08 02 a6 mflr r0 User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0ad94: 3d 20 00 00 lis r9,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ad98: 90 01 00 1c stw r0,28(r1) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0ad9c: 39 29 20 a0 addi r9,r9,8352 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0ada0: 3d 60 00 00 lis r11,0 #include #include #include void _User_extensions_Handler_initialization(void) { ffc0ada4: bf 81 00 08 stmw r28,8(r1) uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; initial_extensions = Configuration.User_extension_table; ffc0ada8: 83 a9 00 40 lwz r29,64(r9) User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; ffc0adac: 83 c9 00 3c lwz r30,60(r9) ffc0adb0: 39 2b 2d b4 addi r9,r11,11700 initial_extensions = Configuration.User_extension_table; _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { ffc0adb4: 2f 9d 00 00 cmpwi cr7,r29,0 head->previous = NULL; tail->previous = head; ffc0adb8: 91 29 00 08 stw r9,8(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0adbc: 38 09 00 04 addi r0,r9,4 ffc0adc0: 90 0b 2d b4 stw r0,11700(r11) head->previous = NULL; ffc0adc4: 38 00 00 00 li r0,0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0adc8: 3d 60 00 00 lis r11,0 head->previous = NULL; ffc0adcc: 90 09 00 04 stw r0,4(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc0add0: 39 2b 2c 70 addi r9,r11,11376 ffc0add4: 39 49 00 04 addi r10,r9,4 ffc0add8: 91 4b 2c 70 stw r10,11376(r11) head->previous = NULL; ffc0addc: 90 09 00 04 stw r0,4(r9) tail->previous = head; ffc0ade0: 91 29 00 08 stw r9,8(r9) ffc0ade4: 41 9e 00 54 beq- cr7,ffc0ae38 <_User_extensions_Handler_initialization+0xac><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( number_of_extensions * sizeof( User_extensions_Control ) ffc0ade8: 1f 9e 00 34 mulli r28,r30,52 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( ffc0adec: 7f 83 e3 78 mr r3,r28 ffc0adf0: 48 00 06 65 bl ffc0b454 <_Workspace_Allocate_or_fatal_error> number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0adf4: 7f 85 e3 78 mr r5,r28 ffc0adf8: 38 80 00 00 li r4,0 _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( ffc0adfc: 7c 7f 1b 78 mr r31,r3 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( ffc0ae00: 48 00 60 d9 bl ffc10ed8 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0ae04: 3b 80 00 00 li r28,0 ffc0ae08: 48 00 00 28 b ffc0ae30 <_User_extensions_Handler_initialization+0xa4> #include #include #include #include void _User_extensions_Handler_initialization(void) ffc0ae0c: 57 83 28 34 rlwinm r3,r28,5,0,26 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; ffc0ae10: 38 9f 00 14 addi r4,r31,20 ffc0ae14: 7c 7d 1a 14 add r3,r29,r3 ffc0ae18: 7c a3 04 aa lswi r5,r3,32 ffc0ae1c: 7c a4 05 aa stswi r5,r4,32 _User_extensions_Add_set( extension ); ffc0ae20: 7f e3 fb 78 mr r3,r31 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0ae24: 3b 9c 00 01 addi r28,r28,1 ffc0ae28: 48 00 36 bd bl ffc0e4e4 <_User_extensions_Add_set> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; ffc0ae2c: 3b ff 00 34 addi r31,r31,52 extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { ffc0ae30: 7f 9c f0 40 cmplw cr7,r28,r30 ffc0ae34: 41 9c ff d8 blt+ cr7,ffc0ae0c <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } ffc0ae38: 39 61 00 18 addi r11,r1,24 ffc0ae3c: 48 00 a3 30 b ffc1516c <_restgpr_28_x> =============================================================================== ffc0d220 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { ffc0d220: 94 21 ff e0 stwu r1,-32(r1) ffc0d224: 7c 08 02 a6 mflr r0 ffc0d228: bf 61 00 0c stmw r27,12(r1) ffc0d22c: 7c 7f 1b 78 mr r31,r3 ffc0d230: 7c be 2b 78 mr r30,r5 ffc0d234: 90 01 00 24 stw r0,36(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d238: 7c 00 00 a6 mfmsr r0 ffc0d23c: 7d 30 42 a6 mfsprg r9,0 ffc0d240: 7c 09 48 78 andc r9,r0,r9 ffc0d244: 7d 20 01 24 mtmsr r9 } } _ISR_Enable( level ); } ffc0d248: 81 23 00 00 lwz r9,0(r3) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0d24c: 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 ) ) { ffc0d250: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0d254: 41 9e 00 78 beq- cr7,ffc0d2cc <_Watchdog_Adjust+0xac> switch ( direction ) { ffc0d258: 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; ffc0d25c: 3b 60 00 01 li r27,1 * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { ffc0d260: 41 9e 00 64 beq- cr7,ffc0d2c4 <_Watchdog_Adjust+0xa4> ffc0d264: 2f 84 00 01 cmpwi cr7,r4,1 ffc0d268: 40 be 00 64 bne+ cr7,ffc0d2cc <_Watchdog_Adjust+0xac> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; ffc0d26c: 81 69 00 10 lwz r11,16(r9) ffc0d270: 7f cb 2a 14 add r30,r11,r5 ffc0d274: 48 00 00 18 b ffc0d28c <_Watchdog_Adjust+0x6c> RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); ffc0d278: 81 3f 00 00 lwz r9,0(r31) break; case WATCHDOG_FORWARD: while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { ffc0d27c: 83 a9 00 10 lwz r29,16(r9) ffc0d280: 7f 9e e8 40 cmplw cr7,r30,r29 ffc0d284: 40 bc 00 10 bge+ cr7,ffc0d294 <_Watchdog_Adjust+0x74> _Watchdog_First( header )->delta_interval -= units; ffc0d288: 7f de e8 50 subf r30,r30,r29 ffc0d28c: 93 c9 00 10 stw r30,16(r9) break; ffc0d290: 48 00 00 3c b ffc0d2cc <_Watchdog_Adjust+0xac> } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; ffc0d294: 93 69 00 10 stw r27,16(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d298: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); _Watchdog_Tickle( header ); ffc0d29c: 7f e3 fb 78 mr r3,r31 ffc0d2a0: 48 00 02 3d bl ffc0d4dc <_Watchdog_Tickle> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0d2a4: 7c 00 00 a6 mfmsr r0 ffc0d2a8: 7d 30 42 a6 mfsprg r9,0 ffc0d2ac: 7c 09 48 78 andc r9,r0,r9 ffc0d2b0: 7d 20 01 24 mtmsr r9 _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) ffc0d2b4: 81 3f 00 00 lwz r9,0(r31) ffc0d2b8: 7f 89 e0 00 cmpw cr7,r9,r28 ffc0d2bc: 41 9e 00 10 beq- cr7,ffc0d2cc <_Watchdog_Adjust+0xac> while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; ffc0d2c0: 7f dd f0 50 subf r30,r29,r30 switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { ffc0d2c4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0d2c8: 40 9e ff b0 bne+ cr7,ffc0d278 <_Watchdog_Adjust+0x58> <== ALWAYS TAKEN return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0d2cc: 7c 00 01 24 mtmsr r0 } } _ISR_Enable( level ); } ffc0d2d0: 39 61 00 20 addi r11,r1,32 ffc0d2d4: 4b ff 40 6c b ffc01340 <_restgpr_27_x> =============================================================================== ffc1da1c <_Watchdog_Adjust_to_chain>: { Watchdog_Interval units = units_arg; ISR_Level level; Watchdog_Control *first; if ( units <= 0 ) { ffc1da1c: 2c 04 00 00 cmpwi r4,0 ffc1da20: 4d 82 00 20 beqlr static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc1da24: 7d 40 00 a6 mfmsr r10 ffc1da28: 7c 10 42 a6 mfsprg r0,0 ffc1da2c: 7d 40 00 78 andc r0,r10,r0 ffc1da30: 7c 00 01 24 mtmsr r0 /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc1da34: 39 80 00 00 li r12,0 ffc1da38: 39 03 00 04 addi r8,r3,4 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); ffc1da3c: 38 c5 00 04 addi r6,r5,4 ffc1da40: 48 00 00 0c b ffc1da4c <_Watchdog_Adjust_to_chain+0x30> } _ISR_Disable( level ); while ( 1 ) { if ( units <= 0 ) { ffc1da44: 2f 84 00 00 cmpwi cr7,r4,0 ffc1da48: 41 9e 00 80 beq- cr7,ffc1dac8 <_Watchdog_Adjust_to_chain+0xac> break; } } _ISR_Enable( level ); } ffc1da4c: 81 63 00 00 lwz r11,0(r3) while ( 1 ) { if ( units <= 0 ) { break; } if ( _Chain_Is_empty( header ) ) { ffc1da50: 7f 8b 40 00 cmpw cr7,r11,r8 ffc1da54: 41 9e 00 74 beq- cr7,ffc1dac8 <_Watchdog_Adjust_to_chain+0xac> /* * If it is longer than "units" until the first element on the chain * fires, then bump it and quit. */ if ( units < first->delta_interval ) { ffc1da58: 80 0b 00 10 lwz r0,16(r11) ffc1da5c: 7d 69 5b 78 mr r9,r11 ffc1da60: 7f 84 00 40 cmplw cr7,r4,r0 ffc1da64: 40 bc 00 10 bge+ cr7,ffc1da74 <_Watchdog_Adjust_to_chain+0x58><== ALWAYS TAKEN first->delta_interval -= units; ffc1da68: 7c 84 00 50 subf r4,r4,r0 ffc1da6c: 90 8b 00 10 stw r4,16(r11) break; ffc1da70: 48 00 00 58 b ffc1dac8 <_Watchdog_Adjust_to_chain+0xac><== NOT EXECUTED /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; first->delta_interval = 0; ffc1da74: 91 8b 00 10 stw r12,16(r11) /* * The first set happens in less than units, so take all of them * off the chain and adjust units to reflect this. */ units -= first->delta_interval; ffc1da78: 7c 80 20 50 subf r4,r0,r4 { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc1da7c: 81 69 00 04 lwz r11,4(r9) ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; ffc1da80: 80 e9 00 00 lwz r7,0(r9) previous = the_node->previous; next->previous = previous; ffc1da84: 91 67 00 04 stw r11,4(r7) previous->next = next; ffc1da88: 90 eb 00 00 stw r7,0(r11) Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; ffc1da8c: 81 65 00 08 lwz r11,8(r5) the_node->next = tail; ffc1da90: 90 c9 00 00 stw r6,0(r9) tail->previous = the_node; old_last->next = the_node; ffc1da94: 91 2b 00 00 stw r9,0(r11) { Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; ffc1da98: 91 25 00 08 stw r9,8(r5) old_last->next = the_node; the_node->previous = old_last; ffc1da9c: 91 69 00 04 stw r11,4(r9) static inline void ppc_interrupt_flash( uint32_t level ) { uint32_t current_level; asm volatile ( ffc1daa0: 7c 00 00 a6 mfmsr r0 ffc1daa4: 7d 40 01 24 mtmsr r10 ffc1daa8: 7c 00 01 24 mtmsr r0 break; } } _ISR_Enable( level ); } ffc1daac: 81 23 00 00 lwz r9,0(r3) _Chain_Extract_unprotected( &first->Node ); _Chain_Append_unprotected( to_fire, &first->Node ); _ISR_Flash( level ); if ( _Chain_Is_empty( header ) ) ffc1dab0: 7f 89 40 00 cmpw cr7,r9,r8 ffc1dab4: 41 be ff 90 beq- cr7,ffc1da44 <_Watchdog_Adjust_to_chain+0x28> break; first = _Watchdog_First( header ); if ( first->delta_interval != 0 ) ffc1dab8: 80 09 00 10 lwz r0,16(r9) ffc1dabc: 2f 80 00 00 cmpwi cr7,r0,0 ffc1dac0: 41 9e ff bc beq+ cr7,ffc1da7c <_Watchdog_Adjust_to_chain+0x60> ffc1dac4: 4b ff ff 80 b ffc1da44 <_Watchdog_Adjust_to_chain+0x28> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc1dac8: 7d 40 01 24 mtmsr r10 ffc1dacc: 4e 80 00 20 blr =============================================================================== ffc0b224 <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { ffc0b224: 7c 69 1b 78 mr r9,r3 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0b228: 7c 00 00 a6 mfmsr r0 ffc0b22c: 7d 70 42 a6 mfsprg r11,0 ffc0b230: 7c 0b 58 78 andc r11,r0,r11 ffc0b234: 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; ffc0b238: 80 63 00 08 lwz r3,8(r3) switch ( previous_state ) { ffc0b23c: 2f 83 00 01 cmpwi cr7,r3,1 ffc0b240: 41 9e 00 18 beq- cr7,ffc0b258 <_Watchdog_Remove+0x34> ffc0b244: 2b 83 00 01 cmplwi cr7,r3,1 ffc0b248: 41 9c 00 70 blt- cr7,ffc0b2b8 <_Watchdog_Remove+0x94> ffc0b24c: 2b 83 00 03 cmplwi cr7,r3,3 ffc0b250: 41 9d 00 68 bgt- cr7,ffc0b2b8 <_Watchdog_Remove+0x94> <== NEVER TAKEN ffc0b254: 48 00 00 10 b ffc0b264 <_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; ffc0b258: 39 60 00 00 li r11,0 ffc0b25c: 91 69 00 08 stw r11,8(r9) break; ffc0b260: 48 00 00 58 b ffc0b2b8 <_Watchdog_Remove+0x94> case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; ffc0b264: 39 60 00 00 li r11,0 ffc0b268: 91 69 00 08 stw r11,8(r9) } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } ffc0b26c: 81 69 00 00 lwz r11,0(r9) case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) ffc0b270: 81 4b 00 00 lwz r10,0(r11) ffc0b274: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b278: 41 9e 00 14 beq- cr7,ffc0b28c <_Watchdog_Remove+0x68> next_watchdog->delta_interval += the_watchdog->delta_interval; ffc0b27c: 81 0b 00 10 lwz r8,16(r11) ffc0b280: 81 49 00 10 lwz r10,16(r9) ffc0b284: 7d 48 52 14 add r10,r8,r10 ffc0b288: 91 4b 00 10 stw r10,16(r11) if ( _Watchdog_Sync_count ) ffc0b28c: 3d 40 00 00 lis r10,0 ffc0b290: 81 4a 27 e0 lwz r10,10208(r10) ffc0b294: 2f 8a 00 00 cmpwi cr7,r10,0 ffc0b298: 41 9e 00 14 beq- cr7,ffc0b2ac <_Watchdog_Remove+0x88> _Watchdog_Sync_level = _ISR_Nest_level; ffc0b29c: 3d 40 00 00 lis r10,0 ffc0b2a0: 81 0a 31 0c lwz r8,12556(r10) ffc0b2a4: 3d 40 00 00 lis r10,0 ffc0b2a8: 91 0a 27 d0 stw r8,10192(r10) { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; ffc0b2ac: 81 49 00 04 lwz r10,4(r9) next->previous = previous; ffc0b2b0: 91 4b 00 04 stw r10,4(r11) previous->next = next; ffc0b2b4: 91 6a 00 00 stw r11,0(r10) _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; ffc0b2b8: 3d 60 00 00 lis r11,0 ffc0b2bc: 81 6b 27 e4 lwz r11,10212(r11) ffc0b2c0: 91 69 00 18 stw r11,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0b2c4: 7c 00 01 24 mtmsr r0 _ISR_Enable( level ); return( previous_state ); } ffc0b2c8: 4e 80 00 20 blr =============================================================================== ffc0ca88 <_Watchdog_Report_chain>: void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { ffc0ca88: 94 21 ff e8 stwu r1,-24(r1) ffc0ca8c: 7c 08 02 a6 mflr r0 ffc0ca90: bf 81 00 08 stmw r28,8(r1) ffc0ca94: 7c 7e 1b 78 mr r30,r3 ffc0ca98: 7c 9f 23 78 mr r31,r4 ffc0ca9c: 90 01 00 1c stw r0,28(r1) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0caa0: 7f a0 00 a6 mfmsr r29 ffc0caa4: 7c 10 42 a6 mfsprg r0,0 ffc0caa8: 7f a0 00 78 andc r0,r29,r0 ffc0caac: 7c 00 01 24 mtmsr r0 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); ffc0cab0: 3c 60 ff c2 lis r3,-62 ffc0cab4: 7f e5 fb 78 mr r5,r31 ffc0cab8: 38 63 f5 e0 addi r3,r3,-2592 ffc0cabc: 7f c4 f3 78 mr r4,r30 ffc0cac0: 4c c6 31 82 crclr 4*cr1+eq ffc0cac4: 4b ff 95 59 bl ffc0601c printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } ffc0cac8: 83 9f 00 00 lwz r28,0(r31) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc0cacc: 3b ff 00 04 addi r31,r31,4 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { ffc0cad0: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0cad4: 41 9e 00 34 beq- cr7,ffc0cb08 <_Watchdog_Report_chain+0x80> node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); ffc0cad8: 7f 84 e3 78 mr r4,r28 ffc0cadc: 38 60 00 00 li r3,0 ffc0cae0: 48 00 00 45 bl ffc0cb24 <_Watchdog_Report> _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) ffc0cae4: 83 9c 00 00 lwz r28,0(r28) Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; ffc0cae8: 7f 9c f8 00 cmpw cr7,r28,r31 ffc0caec: 40 9e ff ec bne+ cr7,ffc0cad8 <_Watchdog_Report_chain+0x50><== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); ffc0caf0: 3c 60 ff c2 lis r3,-62 ffc0caf4: 38 63 f5 f7 addi r3,r3,-2569 ffc0caf8: 7f c4 f3 78 mr r4,r30 ffc0cafc: 4c c6 31 82 crclr 4*cr1+eq ffc0cb00: 4b ff 95 1d bl ffc0601c ffc0cb04: 48 00 00 14 b ffc0cb18 <_Watchdog_Report_chain+0x90> } else { printk( "Chain is empty\n" ); ffc0cb08: 3c 60 ff c2 lis r3,-62 ffc0cb0c: 38 63 f6 06 addi r3,r3,-2554 ffc0cb10: 4c c6 31 82 crclr 4*cr1+eq ffc0cb14: 4b ff 95 09 bl ffc0601c return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0cb18: 7f a0 01 24 mtmsr r29 } _ISR_Enable( level ); } ffc0cb1c: 39 61 00 18 addi r11,r1,24 ffc0cb20: 4b ff 43 a4 b ffc00ec4 <_restgpr_28_x> =============================================================================== ffc0837c : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc0837c: 94 21 ff e0 stwu r1,-32(r1) ffc08380: 7c 08 02 a6 mflr r0 ffc08384: bf 61 00 0c stmw r27,12(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc08388: 3f e0 00 00 lis r31,0 ffc0838c: 3b ff 2c 50 addi r31,r31,11344 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc08390: 7c 7d 1b 78 mr r29,r3 ffc08394: 90 01 00 24 stw r0,36(r1) rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc08398: 7f e3 fb 78 mr r3,r31 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { ffc0839c: 7c 9e 23 78 mr r30,r4 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); ffc083a0: 48 00 12 2d bl ffc095cc if (fcntl (fildes, F_GETFD) < 0) { ffc083a4: 7f a3 eb 78 mr r3,r29 ffc083a8: 38 80 00 01 li r4,1 ffc083ac: 4c c6 31 82 crclr 4*cr1+eq ffc083b0: 48 00 73 99 bl ffc0f748 ffc083b4: 2f 83 00 00 cmpwi cr7,r3,0 ffc083b8: 40 bc 00 18 bge+ cr7,ffc083d0 pthread_mutex_unlock(&aio_request_queue.mutex); ffc083bc: 7f e3 fb 78 mr r3,r31 ffc083c0: 48 00 12 b1 bl ffc09670 rtems_set_errno_and_return_minus_one (EBADF); ffc083c4: 48 00 ad b1 bl ffc13174 <__errno> ffc083c8: 38 00 00 09 li r0,9 ffc083cc: 48 00 00 c8 b ffc08494 } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { ffc083d0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc083d4: 40 be 00 a4 bne+ cr7,ffc08478 AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); ffc083d8: 38 7f 00 48 addi r3,r31,72 ffc083dc: 7f a4 eb 78 mr r4,r29 ffc083e0: 38 a0 00 00 li r5,0 ffc083e4: 48 00 02 d1 bl ffc086b4 if (r_chain == NULL) { ffc083e8: 7c 7e 1b 79 mr. r30,r3 ffc083ec: 40 a2 00 58 bne+ ffc08444 AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc083f0: 81 3f 00 54 lwz r9,84(r31) ffc083f4: 38 1f 00 58 addi r0,r31,88 ffc083f8: 7f 89 00 00 cmpw cr7,r9,r0 ffc083fc: 41 9e 00 f8 beq- cr7,ffc084f4 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); ffc08400: 38 7f 00 54 addi r3,r31,84 ffc08404: 7f a4 eb 78 mr r4,r29 ffc08408: 38 a0 00 00 li r5,0 ffc0840c: 48 00 02 a9 bl ffc086b4 if (r_chain == NULL) { ffc08410: 7c 7e 1b 79 mr. r30,r3 ffc08414: 41 82 00 e0 beq- ffc084f4 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc08418: 48 00 2d c5 bl ffc0b1dc <_Chain_Extract> AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); ffc0841c: 3b be 00 1c addi r29,r30,28 } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc08420: 7f c3 f3 78 mr r3,r30 ffc08424: 48 00 06 69 bl ffc08a8c pthread_mutex_destroy (&r_chain->mutex); ffc08428: 7f a3 eb 78 mr r3,r29 ffc0842c: 48 00 0e d5 bl ffc09300 pthread_cond_destroy (&r_chain->mutex); ffc08430: 7f a3 eb 78 mr r3,r29 ffc08434: 48 00 0b 05 bl ffc08f38 free (r_chain); ffc08438: 7f c3 f3 78 mr r3,r30 ffc0843c: 4b ff cb 21 bl ffc04f5c ffc08440: 48 00 00 28 b ffc08468 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); ffc08444: 3b be 00 1c addi r29,r30,28 ffc08448: 7f a3 eb 78 mr r3,r29 ffc0844c: 48 00 11 81 bl ffc095cc ffc08450: 7f c3 f3 78 mr r3,r30 ffc08454: 48 00 2d 89 bl ffc0b1dc <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); ffc08458: 7f c3 f3 78 mr r3,r30 ffc0845c: 48 00 06 31 bl ffc08a8c pthread_mutex_unlock (&r_chain->mutex); ffc08460: 7f a3 eb 78 mr r3,r29 ffc08464: 48 00 12 0d bl ffc09670 pthread_mutex_unlock (&aio_request_queue.mutex); ffc08468: 7f e3 fb 78 mr r3,r31 ffc0846c: 48 00 12 05 bl ffc09670 return AIO_CANCELED; ffc08470: 3b c0 00 00 li r30,0 ffc08474: 48 00 00 bc b ffc08530 } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { ffc08478: 83 9e 00 00 lwz r28,0(r30) ffc0847c: 7f 9c e8 00 cmpw cr7,r28,r29 ffc08480: 41 be 00 20 beq+ cr7,ffc084a0 pthread_mutex_unlock (&aio_request_queue.mutex); ffc08484: 7f e3 fb 78 mr r3,r31 ffc08488: 48 00 11 e9 bl ffc09670 rtems_set_errno_and_return_minus_one (EINVAL); ffc0848c: 48 00 ac e9 bl ffc13174 <__errno> ffc08490: 38 00 00 16 li r0,22 ffc08494: 90 03 00 00 stw r0,0(r3) ffc08498: 3b c0 ff ff li r30,-1 ffc0849c: 48 00 00 94 b ffc08530 } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); ffc084a0: 38 7f 00 48 addi r3,r31,72 ffc084a4: 7f 84 e3 78 mr r4,r28 ffc084a8: 38 a0 00 00 li r5,0 ffc084ac: 48 00 02 09 bl ffc086b4 if (r_chain == NULL) { ffc084b0: 7c 7b 1b 79 mr. r27,r3 ffc084b4: 40 a2 00 50 bne+ ffc08504 if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc084b8: 81 3f 00 54 lwz r9,84(r31) ffc084bc: 38 1f 00 58 addi r0,r31,88 ffc084c0: 7f 89 00 00 cmpw cr7,r9,r0 ffc084c4: 41 9e 00 30 beq- cr7,ffc084f4 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); ffc084c8: 38 7f 00 54 addi r3,r31,84 ffc084cc: 7f 84 e3 78 mr r4,r28 ffc084d0: 38 a0 00 00 li r5,0 ffc084d4: 48 00 01 e1 bl ffc086b4 if (r_chain == NULL) { ffc084d8: 2c 03 00 00 cmpwi r3,0 ffc084dc: 41 a2 ff a8 beq- ffc08484 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); ffc084e0: 7f c4 f3 78 mr r4,r30 ffc084e4: 38 63 00 08 addi r3,r3,8 ffc084e8: 48 00 05 fd bl ffc08ae4 ffc084ec: 7c 7e 1b 78 mr r30,r3 ffc084f0: 48 00 00 38 b ffc08528 pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); ffc084f4: 7f e3 fb 78 mr r3,r31 ffc084f8: 48 00 11 79 bl ffc09670 return AIO_ALLDONE; ffc084fc: 3b c0 00 02 li r30,2 ffc08500: 48 00 00 30 b ffc08530 } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); ffc08504: 3b bb 00 1c addi r29,r27,28 ffc08508: 7f a3 eb 78 mr r3,r29 ffc0850c: 48 00 10 c1 bl ffc095cc result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); ffc08510: 7f c4 f3 78 mr r4,r30 ffc08514: 38 7b 00 08 addi r3,r27,8 ffc08518: 48 00 05 cd bl ffc08ae4 ffc0851c: 7c 7e 1b 78 mr r30,r3 pthread_mutex_unlock (&r_chain->mutex); ffc08520: 7f a3 eb 78 mr r3,r29 ffc08524: 48 00 11 4d bl ffc09670 pthread_mutex_unlock (&aio_request_queue.mutex); ffc08528: 7f e3 fb 78 mr r3,r31 ffc0852c: 48 00 11 45 bl ffc09670 return result; } return AIO_ALLDONE; } ffc08530: 39 61 00 20 addi r11,r1,32 ffc08534: 7f c3 f3 78 mr r3,r30 ffc08538: 4b ff 85 f0 b ffc00b28 <_restgpr_27_x> =============================================================================== ffc08544 : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) ffc08544: 2f 83 20 00 cmpwi cr7,r3,8192 int aio_fsync( int op, struct aiocb *aiocbp ) { ffc08548: 94 21 ff f0 stwu r1,-16(r1) ffc0854c: 7c 08 02 a6 mflr r0 ffc08550: bf c1 00 08 stmw r30,8(r1) ffc08554: 7c 9f 23 78 mr r31,r4 rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc08558: 3b c0 00 16 li r30,22 int aio_fsync( int op, struct aiocb *aiocbp ) { ffc0855c: 90 01 00 14 stw r0,20(r1) rtems_aio_request *req; int mode; if (op != O_SYNC) ffc08560: 40 9e 00 28 bne- cr7,ffc08588 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc08564: 80 64 00 00 lwz r3,0(r4) ffc08568: 38 80 00 03 li r4,3 ffc0856c: 4c c6 31 82 crclr 4*cr1+eq ffc08570: 48 00 71 d9 bl ffc0f748 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc08574: 54 63 07 be clrlwi r3,r3,30 ffc08578: 38 63 ff ff addi r3,r3,-1 ffc0857c: 2b 83 00 01 cmplwi cr7,r3,1 ffc08580: 40 bd 00 24 ble+ cr7,ffc085a4 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc08584: 3b c0 00 09 li r30,9 ffc08588: 38 00 ff ff li r0,-1 ffc0858c: 93 df 00 34 stw r30,52(r31) ffc08590: 90 1f 00 38 stw r0,56(r31) ffc08594: 48 00 ab e1 bl ffc13174 <__errno> ffc08598: 93 c3 00 00 stw r30,0(r3) ffc0859c: 38 60 ff ff li r3,-1 ffc085a0: 48 00 00 28 b ffc085c8 req = malloc (sizeof (rtems_aio_request)); ffc085a4: 38 60 00 18 li r3,24 ffc085a8: 4b ff d0 2d bl ffc055d4 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc085ac: 3b c0 00 0b li r30,11 mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc085b0: 7c 69 1b 79 mr. r9,r3 ffc085b4: 41 a2 ff d4 beq- ffc08588 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc085b8: 38 00 00 03 li r0,3 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc085bc: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_SYNC; ffc085c0: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc085c4: 48 00 05 9d bl ffc08b60 } ffc085c8: 39 61 00 10 addi r11,r1,16 ffc085cc: 4b ff 85 68 b ffc00b34 <_restgpr_30_x> =============================================================================== ffc08d80 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc08d80: 94 21 ff f0 stwu r1,-16(r1) ffc08d84: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc08d88: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { ffc08d8c: 90 01 00 14 stw r0,20(r1) ffc08d90: bf c1 00 08 stmw r30,8(r1) ffc08d94: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc08d98: 80 63 00 00 lwz r3,0(r3) ffc08d9c: 4c c6 31 82 crclr 4*cr1+eq ffc08da0: 48 00 69 a9 bl ffc0f748 if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc08da4: 70 63 00 03 andi. r3,r3,3 ffc08da8: 41 82 00 10 beq- ffc08db8 <== NEVER TAKEN ffc08dac: 2f 83 00 02 cmpwi cr7,r3,2 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc08db0: 3b c0 00 09 li r30,9 { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc08db4: 40 9e 00 14 bne- cr7,ffc08dc8 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc08db8: 80 1f 00 18 lwz r0,24(r31) ffc08dbc: 2f 80 00 00 cmpwi cr7,r0,0 ffc08dc0: 41 be 00 24 beq+ cr7,ffc08de4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc08dc4: 3b c0 00 16 li r30,22 ffc08dc8: 38 00 ff ff li r0,-1 ffc08dcc: 93 df 00 34 stw r30,52(r31) ffc08dd0: 90 1f 00 38 stw r0,56(r31) ffc08dd4: 48 00 a3 a1 bl ffc13174 <__errno> ffc08dd8: 93 c3 00 00 stw r30,0(r3) ffc08ddc: 38 60 ff ff li r3,-1 ffc08de0: 48 00 00 34 b ffc08e14 if (aiocbp->aio_offset < 0) ffc08de4: 80 1f 00 08 lwz r0,8(r31) ffc08de8: 2f 80 00 00 cmpwi cr7,r0,0 ffc08dec: 41 bc ff d8 blt- cr7,ffc08dc4 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc08df0: 38 60 00 18 li r3,24 ffc08df4: 4b ff c7 e1 bl ffc055d4 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc08df8: 3b c0 00 0b li r30,11 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc08dfc: 7c 69 1b 79 mr. r9,r3 ffc08e00: 41 a2 ff c8 beq- ffc08dc8 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; ffc08e04: 38 00 00 01 li r0,1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc08e08: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_READ; ffc08e0c: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc08e10: 4b ff fd 51 bl ffc08b60 } ffc08e14: 39 61 00 10 addi r11,r1,16 ffc08e18: 4b ff 7d 1c b ffc00b34 <_restgpr_30_x> =============================================================================== ffc08e24 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc08e24: 94 21 ff f0 stwu r1,-16(r1) ffc08e28: 7c 08 02 a6 mflr r0 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc08e2c: 38 80 00 03 li r4,3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { ffc08e30: 90 01 00 14 stw r0,20(r1) ffc08e34: bf c1 00 08 stmw r30,8(r1) ffc08e38: 7c 7f 1b 78 mr r31,r3 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); ffc08e3c: 3b c0 00 09 li r30,9 aio_write (struct aiocb *aiocbp) { rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); ffc08e40: 80 63 00 00 lwz r3,0(r3) ffc08e44: 4c c6 31 82 crclr 4*cr1+eq ffc08e48: 48 00 69 01 bl ffc0f748 if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) ffc08e4c: 54 63 07 be clrlwi r3,r3,30 ffc08e50: 38 63 ff ff addi r3,r3,-1 ffc08e54: 2b 83 00 01 cmplwi cr7,r3,1 ffc08e58: 41 9d 00 14 bgt- cr7,ffc08e6c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) ffc08e5c: 80 1f 00 18 lwz r0,24(r31) ffc08e60: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e64: 41 be 00 24 beq+ cr7,ffc08e88 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); ffc08e68: 3b c0 00 16 li r30,22 ffc08e6c: 38 00 ff ff li r0,-1 ffc08e70: 93 df 00 34 stw r30,52(r31) ffc08e74: 90 1f 00 38 stw r0,56(r31) ffc08e78: 48 00 a2 fd bl ffc13174 <__errno> ffc08e7c: 93 c3 00 00 stw r30,0(r3) ffc08e80: 38 60 ff ff li r3,-1 ffc08e84: 48 00 00 34 b ffc08eb8 if (aiocbp->aio_offset < 0) ffc08e88: 80 1f 00 08 lwz r0,8(r31) ffc08e8c: 2f 80 00 00 cmpwi cr7,r0,0 ffc08e90: 41 bc ff d8 blt- cr7,ffc08e68 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); ffc08e94: 38 60 00 18 li r3,24 ffc08e98: 4b ff c7 3d bl ffc055d4 if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); ffc08e9c: 3b c0 00 0b li r30,11 if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) ffc08ea0: 7c 69 1b 79 mr. r9,r3 ffc08ea4: 41 a2 ff c8 beq- ffc08e6c <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc08ea8: 38 00 00 02 li r0,2 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; ffc08eac: 93 e9 00 14 stw r31,20(r9) req->aiocbp->aio_lio_opcode = LIO_WRITE; ffc08eb0: 90 1f 00 30 stw r0,48(r31) return rtems_aio_enqueue (req); ffc08eb4: 4b ff fc ad bl ffc08b60 } ffc08eb8: 39 61 00 10 addi r11,r1,16 ffc08ebc: 4b ff 7c 78 b ffc00b34 <_restgpr_30_x> =============================================================================== ffc07808 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { ffc07808: 7c 08 02 a6 mflr r0 ffc0780c: 94 21 ff f8 stwu r1,-8(r1) ffc07810: 90 01 00 0c stw r0,12(r1) ffc07814: 7c 60 1b 78 mr r0,r3 if ( !tp ) ffc07818: 7c 83 23 79 mr. r3,r4 ffc0781c: 41 82 00 44 beq- ffc07860 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc07820: 2f 80 00 01 cmpwi cr7,r0,1 ffc07824: 40 be 00 0c bne+ cr7,ffc07830 _TOD_Get(tp); ffc07828: 48 00 21 99 bl ffc099c0 <_TOD_Get> ffc0782c: 48 00 00 18 b ffc07844 return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { ffc07830: 2f 80 00 04 cmpwi cr7,r0,4 ffc07834: 41 9e 00 0c beq- cr7,ffc07840 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { ffc07838: 2f 80 00 02 cmpwi cr7,r0,2 ffc0783c: 40 be 00 10 bne+ cr7,ffc0784c _TOD_Get_uptime_as_timespec( tp ); ffc07840: 48 00 22 01 bl ffc09a40 <_TOD_Get_uptime_as_timespec> return 0; ffc07844: 38 60 00 00 li r3,0 ffc07848: 48 00 00 28 b ffc07870 } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc0784c: 2f 80 00 03 cmpwi cr7,r0,3 ffc07850: 40 be 00 10 bne+ cr7,ffc07860 rtems_set_errno_and_return_minus_one( ENOSYS ); ffc07854: 48 00 9d 6d bl ffc115c0 <__errno> ffc07858: 38 00 00 58 li r0,88 ffc0785c: 48 00 00 0c b ffc07868 #endif rtems_set_errno_and_return_minus_one( EINVAL ); ffc07860: 48 00 9d 61 bl ffc115c0 <__errno> ffc07864: 38 00 00 16 li r0,22 ffc07868: 90 03 00 00 stw r0,0(r3) ffc0786c: 38 60 ff ff li r3,-1 return 0; } ffc07870: 80 01 00 0c lwz r0,12(r1) ffc07874: 38 21 00 08 addi r1,r1,8 ffc07878: 7c 08 03 a6 mtlr r0 ffc0787c: 4e 80 00 20 blr =============================================================================== ffc07880 : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { ffc07880: 7c 08 02 a6 mflr r0 ffc07884: 94 21 ff f8 stwu r1,-8(r1) ffc07888: 90 01 00 0c stw r0,12(r1) ffc0788c: 7c 60 1b 78 mr r0,r3 if ( !tp ) ffc07890: 7c 83 23 79 mr. r3,r4 ffc07894: 41 82 00 5c beq- ffc078f0 <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { ffc07898: 2f 80 00 01 cmpwi cr7,r0,1 ffc0789c: 40 be 00 38 bne+ cr7,ffc078d4 if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) ffc078a0: 81 23 00 00 lwz r9,0(r3) ffc078a4: 3c 00 21 da lis r0,8666 ffc078a8: 60 00 e4 ff ori r0,r0,58623 ffc078ac: 7f 89 00 40 cmplw cr7,r9,r0 ffc078b0: 40 9d 00 40 ble- cr7,ffc078f0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc078b4: 3d 20 00 00 lis r9,0 ffc078b8: 81 69 28 38 lwz r11,10296(r9) ffc078bc: 38 0b 00 01 addi r0,r11,1 ffc078c0: 90 09 28 38 stw r0,10296(r9) rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); ffc078c4: 48 00 21 ed bl ffc09ab0 <_TOD_Set> _Thread_Enable_dispatch(); ffc078c8: 48 00 39 3d bl ffc0b204 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; ffc078cc: 38 60 00 00 li r3,0 ffc078d0: 48 00 00 30 b ffc07900 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) ffc078d4: 2f 80 00 02 cmpwi cr7,r0,2 ffc078d8: 41 9e 00 0c beq- cr7,ffc078e4 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) ffc078dc: 2f 80 00 03 cmpwi cr7,r0,3 ffc078e0: 40 be 00 10 bne+ cr7,ffc078f0 rtems_set_errno_and_return_minus_one( ENOSYS ); ffc078e4: 48 00 9c dd bl ffc115c0 <__errno> ffc078e8: 38 00 00 58 li r0,88 ffc078ec: 48 00 00 0c b ffc078f8 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); ffc078f0: 48 00 9c d1 bl ffc115c0 <__errno> ffc078f4: 38 00 00 16 li r0,22 ffc078f8: 90 03 00 00 stw r0,0(r3) ffc078fc: 38 60 ff ff li r3,-1 return 0; } ffc07900: 80 01 00 0c lwz r0,12(r1) ffc07904: 38 21 00 08 addi r1,r1,8 ffc07908: 7c 08 03 a6 mtlr r0 ffc0790c: 4e 80 00 20 blr =============================================================================== ffc257e8 : int killinfo( pid_t pid, int sig, const union sigval *value ) { ffc257e8: 94 21 ff d8 stwu r1,-40(r1) ffc257ec: 7c 08 02 a6 mflr r0 ffc257f0: bf 81 00 18 stmw r28,24(r1) ffc257f4: 7c 7e 1b 78 mr r30,r3 ffc257f8: 7c 9f 23 78 mr r31,r4 ffc257fc: 90 01 00 2c stw r0,44(r1) ffc25800: 7c bd 2b 78 mr r29,r5 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) ffc25804: 4b ff fc 7d bl ffc25480 ffc25808: 7f 9e 18 00 cmpw cr7,r30,r3 ffc2580c: 41 be 00 10 beq+ cr7,ffc2581c rtems_set_errno_and_return_minus_one( ESRCH ); ffc25810: 4b ff 07 a5 bl ffc15fb4 <__errno> ffc25814: 38 00 00 03 li r0,3 ffc25818: 48 00 00 14 b ffc2582c /* * Validate the signal passed. */ if ( !sig ) ffc2581c: 2f 9f 00 00 cmpwi cr7,r31,0 ffc25820: 40 be 00 18 bne+ cr7,ffc25838 rtems_set_errno_and_return_minus_one( EINVAL ); ffc25824: 4b ff 07 91 bl ffc15fb4 <__errno> ffc25828: 38 00 00 16 li r0,22 ffc2582c: 90 03 00 00 stw r0,0(r3) ffc25830: 38 60 ff ff li r3,-1 ffc25834: 48 00 02 24 b ffc25a58 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc25838: 3b df ff ff addi r30,r31,-1 if ( !is_valid_signo(sig) ) ffc2583c: 2b 9e 00 1f cmplwi cr7,r30,31 ffc25840: 41 bd ff e4 bgt- cr7,ffc25824 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 ) ffc25844: 1c 1f 00 0c mulli r0,r31,12 ffc25848: 3d 20 00 00 lis r9,0 ffc2584c: 39 29 32 e0 addi r9,r9,13024 ffc25850: 7d 29 02 14 add r9,r9,r0 ffc25854: 80 09 00 08 lwz r0,8(r9) return 0; ffc25858: 38 60 00 00 li r3,0 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) ffc2585c: 2f 80 00 01 cmpwi cr7,r0,1 ffc25860: 41 9e 01 f8 beq- cr7,ffc25a58 /* * 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 ) ) ffc25864: 2f 9f 00 08 cmpwi cr7,r31,8 ffc25868: 41 9e 00 14 beq- cr7,ffc2587c ffc2586c: 2f 9f 00 04 cmpwi cr7,r31,4 ffc25870: 41 9e 00 0c beq- cr7,ffc2587c ffc25874: 2f 9f 00 0b cmpwi cr7,r31,11 ffc25878: 40 be 00 14 bne+ cr7,ffc2588c return pthread_kill( pthread_self(), sig ); ffc2587c: 48 00 04 1d bl ffc25c98 ffc25880: 7f e4 fb 78 mr r4,r31 ffc25884: 48 00 03 35 bl ffc25bb8 ffc25888: 48 00 01 d0 b ffc25a58 * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { ffc2588c: 2f 9d 00 00 cmpwi cr7,r29,0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; ffc25890: 93 e1 00 08 stw r31,8(r1) static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); ffc25894: 38 00 00 01 li r0,1 ffc25898: 7c 1e f0 30 slw r30,r0,r30 siginfo->si_code = SI_USER; ffc2589c: 90 01 00 0c stw r0,12(r1) if ( !value ) { ffc258a0: 40 be 00 0c bne+ cr7,ffc258ac siginfo->si_value.sival_int = 0; ffc258a4: 93 a1 00 10 stw r29,16(r1) ffc258a8: 48 00 00 0c b ffc258b4 } else { siginfo->si_value = *value; ffc258ac: 80 1d 00 00 lwz r0,0(r29) ffc258b0: 90 01 00 10 stw r0,16(r1) ffc258b4: 3d 20 00 00 lis r9,0 ffc258b8: 81 69 28 2c lwz r11,10284(r9) ffc258bc: 38 0b 00 01 addi r0,r11,1 ffc258c0: 90 09 28 2c stw r0,10284(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; ffc258c4: 3d 20 00 00 lis r9,0 ffc258c8: 80 69 32 90 lwz r3,12944(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { ffc258cc: 81 23 01 34 lwz r9,308(r3) ffc258d0: 80 09 00 d0 lwz r0,208(r9) ffc258d4: 7f c5 00 79 andc. r5,r30,r0 ffc258d8: 40 82 01 00 bne- ffc259d8 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc258dc: 3d 20 00 00 lis r9,0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc258e0: 3d 60 00 00 lis r11,0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } ffc258e4: 81 29 34 6c lwz r9,13420(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc258e8: 38 0b 34 70 addi r0,r11,13424 ffc258ec: 48 00 00 28 b ffc25914 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc258f0: 81 49 00 30 lwz r10,48(r9) for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; ffc258f4: 7d 23 4b 78 mr r3,r9 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc258f8: 81 69 01 34 lwz r11,308(r9) #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) ffc258fc: 7f c8 50 39 and. r8,r30,r10 ffc25900: 40 82 00 d8 bne- ffc259d8 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) ffc25904: 81 6b 00 d0 lwz r11,208(r11) ffc25908: 7f ca 58 79 andc. r10,r30,r11 ffc2590c: 40 82 00 cc bne- ffc259d8 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { ffc25910: 81 29 00 00 lwz r9,0(r9) /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); ffc25914: 7f 89 00 00 cmpw cr7,r9,r0 ffc25918: 40 9e ff d8 bne+ cr7,ffc258f0 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; ffc2591c: 3d 20 00 00 lis r9,0 ffc25920: 89 29 27 6c lbz r9,10092(r9) ffc25924: 3d 60 00 00 lis r11,0 ffc25928: 39 6b 2d 84 addi r11,r11,11652 ffc2592c: 38 09 00 01 addi r0,r9,1 */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( ffc25930: 38 8b 00 08 addi r4,r11,8 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; ffc25934: 38 60 00 00 li r3,0 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) ffc25938: 85 2b 00 04 lwzu r9,4(r11) ffc2593c: 2f 89 00 00 cmpwi cr7,r9,0 ffc25940: 41 9e 00 88 beq- cr7,ffc259c8 <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; ffc25944: 81 29 00 04 lwz r9,4(r9) #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc25948: 39 00 00 01 li r8,1 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; ffc2594c: a3 a9 00 10 lhz r29,16(r9) ffc25950: 80 e9 00 1c lwz r7,28(r9) object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc25954: 48 00 00 6c b ffc259c0 the_thread = (Thread_Control *) object_table[ index ]; ffc25958: 85 27 00 04 lwzu r9,4(r7) if ( !the_thread ) ffc2595c: 2f 89 00 00 cmpwi cr7,r9,0 ffc25960: 41 9e 00 5c beq- cr7,ffc259bc /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) ffc25964: 81 49 00 14 lwz r10,20(r9) ffc25968: 7f 8a 00 40 cmplw cr7,r10,r0 ffc2596c: 41 9d 00 50 bgt- cr7,ffc259bc #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) ffc25970: 80 c9 01 34 lwz r6,308(r9) ffc25974: 80 c6 00 d0 lwz r6,208(r6) ffc25978: 7f dc 30 79 andc. r28,r30,r6 ffc2597c: 41 82 00 40 beq- ffc259bc * * 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 ) { ffc25980: 41 9c 00 34 blt- cr7,ffc259b4 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { ffc25984: 2f 83 00 00 cmpwi cr7,r3,0 ffc25988: 41 9e 00 34 beq- cr7,ffc259bc <== NEVER TAKEN ffc2598c: 80 a3 00 10 lwz r5,16(r3) ffc25990: 2f 85 00 00 cmpwi cr7,r5,0 ffc25994: 41 9e 00 28 beq- cr7,ffc259bc <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc25998: 80 c9 00 10 lwz r6,16(r9) ffc2599c: 2f 86 00 00 cmpwi cr7,r6,0 ffc259a0: 41 9e 00 14 beq- cr7,ffc259b4 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { ffc259a4: 74 bc 10 00 andis. r28,r5,4096 ffc259a8: 40 82 00 14 bne- ffc259bc DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { ffc259ac: 74 c5 10 00 andis. r5,r6,4096 ffc259b0: 41 82 00 0c beq- ffc259bc */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { ffc259b4: 7d 40 53 78 mr r0,r10 ffc259b8: 7d 23 4b 78 mr r3,r9 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { ffc259bc: 39 08 00 01 addi r8,r8,1 ffc259c0: 7f 88 e8 40 cmplw cr7,r8,r29 ffc259c4: 40 9d ff 94 ble+ cr7,ffc25958 * + 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++) { ffc259c8: 7f 8b 20 00 cmpw cr7,r11,r4 ffc259cc: 40 be ff 6c bne- cr7,ffc25938 } } } } if ( interested ) { ffc259d0: 2f 83 00 00 cmpwi cr7,r3,0 ffc259d4: 41 9e 00 18 beq- cr7,ffc259ec /* * 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 ) ) { ffc259d8: 7f e4 fb 78 mr r4,r31 ffc259dc: 38 a1 00 08 addi r5,r1,8 ffc259e0: 48 00 00 a9 bl ffc25a88 <_POSIX_signals_Unblock_thread> ffc259e4: 2f 83 00 00 cmpwi cr7,r3,0 ffc259e8: 40 9e 00 68 bne- cr7,ffc25a50 /* * 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 ); ffc259ec: 7f c3 f3 78 mr r3,r30 ffc259f0: 48 00 00 71 bl ffc25a60 <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { ffc259f4: 1f ff 00 0c mulli r31,r31,12 ffc259f8: 3d 20 00 00 lis r9,0 ffc259fc: 39 29 32 e0 addi r9,r9,13024 ffc25a00: 7c 09 f8 2e lwzx r0,r9,r31 ffc25a04: 2f 80 00 02 cmpwi cr7,r0,2 ffc25a08: 40 be 00 48 bne+ cr7,ffc25a50 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); ffc25a0c: 3c 60 00 00 lis r3,0 ffc25a10: 38 63 34 60 addi r3,r3,13408 ffc25a14: 4b fe 85 f5 bl ffc0e008 <_Chain_Get> if ( !psiginfo ) { ffc25a18: 7c 64 1b 79 mr. r4,r3 ffc25a1c: 40 a2 00 14 bne+ ffc25a30 _Thread_Enable_dispatch(); ffc25a20: 4b fe a2 c9 bl ffc0fce8 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc25a24: 4b ff 05 91 bl ffc15fb4 <__errno> ffc25a28: 38 00 00 0b li r0,11 ffc25a2c: 4b ff fe 00 b ffc2582c } psiginfo->Info = *siginfo; ffc25a30: 39 24 00 08 addi r9,r4,8 ffc25a34: 39 61 00 08 addi r11,r1,8 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc25a38: 3c 60 00 00 lis r3,0 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; ffc25a3c: 7c ab 64 aa lswi r5,r11,12 ffc25a40: 7c a9 65 aa stswi r5,r9,12 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); ffc25a44: 38 63 34 d4 addi r3,r3,13524 ffc25a48: 7c 63 fa 14 add r3,r3,r31 ffc25a4c: 4b fe 85 65 bl ffc0dfb0 <_Chain_Append> } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); ffc25a50: 4b fe a2 99 bl ffc0fce8 <_Thread_Enable_dispatch> return 0; ffc25a54: 38 60 00 00 li r3,0 } ffc25a58: 39 61 00 28 addi r11,r1,40 ffc25a5c: 4b fd c5 30 b ffc01f8c <_restgpr_28_x> =============================================================================== ffc0d5c4 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) ffc0d5c4: 2c 03 00 00 cmpwi r3,0 return EINVAL; ffc0d5c8: 38 00 00 16 li r0,22 int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) ffc0d5cc: 41 82 00 38 beq- ffc0d604 ffc0d5d0: 81 23 00 00 lwz r9,0(r3) ffc0d5d4: 2f 89 00 00 cmpwi cr7,r9,0 ffc0d5d8: 41 9e 00 2c beq- cr7,ffc0d604 return EINVAL; switch ( policy ) { ffc0d5dc: 2b 84 00 04 cmplwi cr7,r4,4 ffc0d5e0: 41 9d 00 20 bgt- cr7,ffc0d600 ffc0d5e4: 38 00 00 01 li r0,1 ffc0d5e8: 7c 00 20 30 slw r0,r0,r4 ffc0d5ec: 70 09 00 17 andi. r9,r0,23 ffc0d5f0: 41 82 00 10 beq- ffc0d600 <== NEVER TAKEN case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; ffc0d5f4: 90 83 00 14 stw r4,20(r3) return 0; ffc0d5f8: 38 00 00 00 li r0,0 ffc0d5fc: 48 00 00 08 b ffc0d604 default: return ENOTSUP; ffc0d600: 38 00 00 86 li r0,134 } } ffc0d604: 7c 03 03 78 mr r3,r0 ffc0d608: 4e 80 00 20 blr =============================================================================== ffc07f34 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc07f34: 94 21 ff d8 stwu r1,-40(r1) ffc07f38: 7c 08 02 a6 mflr r0 ffc07f3c: bf 81 00 18 stmw r28,24(r1) const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc07f40: 7c 7c 1b 79 mr. r28,r3 int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { ffc07f44: 7c bf 2b 78 mr r31,r5 ffc07f48: 90 01 00 2c stw r0,44(r1) /* * Error check parameters */ if ( !barrier ) return EINVAL; ffc07f4c: 38 00 00 16 li r0,22 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) ffc07f50: 41 82 00 a8 beq- ffc07ff8 return EINVAL; if ( count == 0 ) ffc07f54: 2f 85 00 00 cmpwi cr7,r5,0 ffc07f58: 41 9e 00 a0 beq- cr7,ffc07ff8 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc07f5c: 2f 84 00 00 cmpwi cr7,r4,0 ffc07f60: 7c 9e 23 78 mr r30,r4 ffc07f64: 40 be 00 10 bne+ cr7,ffc07f74 the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); ffc07f68: 3b c1 00 10 addi r30,r1,16 ffc07f6c: 7f c3 f3 78 mr r3,r30 ffc07f70: 4b ff fe e9 bl ffc07e58 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc07f74: 81 3e 00 00 lwz r9,0(r30) return EINVAL; ffc07f78: 38 00 00 16 li r0,22 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc07f7c: 2f 89 00 00 cmpwi cr7,r9,0 ffc07f80: 41 9e 00 78 beq- cr7,ffc07ff8 return EINVAL; switch ( the_attr->process_shared ) { ffc07f84: 83 de 00 04 lwz r30,4(r30) ffc07f88: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07f8c: 40 9e 00 6c bne- cr7,ffc07ff8 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc07f90: 3d 20 00 00 lis r9,0 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; ffc07f94: 93 c1 00 08 stw r30,8(r1) ffc07f98: 81 69 27 f4 lwz r11,10228(r9) the_attributes.maximum_count = count; ffc07f9c: 93 e1 00 0c stw r31,12(r1) ffc07fa0: 38 0b 00 01 addi r0,r11,1 ffc07fa4: 90 09 27 f4 stw r0,10228(r9) * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) _Objects_Allocate( &_POSIX_Barrier_Information ); ffc07fa8: 3f a0 00 00 lis r29,0 ffc07fac: 3b bd 2f ac addi r29,r29,12204 ffc07fb0: 7f a3 eb 78 mr r3,r29 ffc07fb4: 48 00 23 a5 bl ffc0a358 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { ffc07fb8: 7c 7f 1b 79 mr. r31,r3 ffc07fbc: 40 a2 00 10 bne+ ffc07fcc _Thread_Enable_dispatch(); ffc07fc0: 48 00 35 a5 bl ffc0b564 <_Thread_Enable_dispatch> return EAGAIN; ffc07fc4: 38 00 00 0b li r0,11 ffc07fc8: 48 00 00 30 b ffc07ff8 } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); ffc07fcc: 38 7f 00 10 addi r3,r31,16 ffc07fd0: 38 81 00 08 addi r4,r1,8 ffc07fd4: 48 00 18 f9 bl ffc098cc <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc07fd8: 80 1f 00 08 lwz r0,8(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc07fdc: 81 7d 00 1c lwz r11,28(r29) ffc07fe0: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc07fe4: 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; ffc07fe8: 93 df 00 0c stw r30,12(r31) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; ffc07fec: 90 1c 00 00 stw r0,0(r28) _Thread_Enable_dispatch(); ffc07ff0: 48 00 35 75 bl ffc0b564 <_Thread_Enable_dispatch> return 0; ffc07ff4: 38 00 00 00 li r0,0 } ffc07ff8: 39 61 00 28 addi r11,r1,40 ffc07ffc: 7c 03 03 78 mr r3,r0 ffc08000: 4b ff 8f 2c b ffc00f2c <_restgpr_28_x> =============================================================================== ffc075b0 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc075b0: 94 21 ff f0 stwu r1,-16(r1) ffc075b4: 7c 08 02 a6 mflr r0 ffc075b8: bf c1 00 08 stmw 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 ) ffc075bc: 7c 7e 1b 79 mr. r30,r3 void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { ffc075c0: 7c 9f 23 78 mr r31,r4 ffc075c4: 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 ) ffc075c8: 41 82 00 48 beq- ffc07610 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc075cc: 3d 20 00 00 lis r9,0 ffc075d0: 81 69 27 ec lwz r11,10220(r9) ffc075d4: 38 0b 00 01 addi r0,r11,1 ffc075d8: 90 09 27 ec stw r0,10220(r9) return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); ffc075dc: 38 60 00 10 li r3,16 ffc075e0: 48 00 4b 6d bl ffc0c14c <_Workspace_Allocate> if ( handler ) { ffc075e4: 7c 69 1b 79 mr. r9,r3 ffc075e8: 41 82 00 24 beq- ffc0760c <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc075ec: 3d 60 00 00 lis r11,0 ffc075f0: 81 6b 31 10 lwz r11,12560(r11) handler_stack = &thread_support->Cancellation_Handlers; handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); ffc075f4: 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; ffc075f8: 80 6b 01 34 lwz r3,308(r11) handler->routine = routine; ffc075fc: 93 c9 00 08 stw r30,8(r9) handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); ffc07600: 38 63 00 e4 addi r3,r3,228 thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; handler->routine = routine; handler->arg = arg; ffc07604: 93 e9 00 0c stw r31,12(r9) _Chain_Append( handler_stack, &handler->Node ); ffc07608: 48 00 1a 05 bl ffc0900c <_Chain_Append> } _Thread_Enable_dispatch(); ffc0760c: 48 00 36 51 bl ffc0ac5c <_Thread_Enable_dispatch> } ffc07610: 39 61 00 10 addi r11,r1,16 ffc07614: 48 00 ee 58 b ffc1646c <_restgpr_30_x> =============================================================================== ffc088cc : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc088cc: 94 21 ff e8 stwu r1,-24(r1) ffc088d0: 7c 08 02 a6 mflr r0 ffc088d4: bf 81 00 08 stmw r28,8(r1) POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc088d8: 7c 9e 23 79 mr. r30,r4 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { ffc088dc: 7c 7c 1b 78 mr r28,r3 ffc088e0: 90 01 00 1c stw r0,28(r1) POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; ffc088e4: 40 a2 00 0c bne+ ffc088f0 else the_attr = &_POSIX_Condition_variables_Default_attributes; ffc088e8: 3f c0 00 00 lis r30,0 ffc088ec: 3b de 27 50 addi r30,r30,10064 /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) ffc088f0: 80 1e 00 04 lwz r0,4(r30) return EINVAL; ffc088f4: 38 60 00 16 li r3,22 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) ffc088f8: 2f 80 00 01 cmpwi cr7,r0,1 ffc088fc: 41 9e 00 8c beq- cr7,ffc08988 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) ffc08900: 80 1e 00 00 lwz r0,0(r30) ffc08904: 2f 80 00 00 cmpwi cr7,r0,0 ffc08908: 41 be 00 80 beq+ cr7,ffc08988 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0890c: 3d 20 00 00 lis r9,0 ffc08910: 81 69 28 00 lwz r11,10240(r9) ffc08914: 38 0b 00 01 addi r0,r11,1 ffc08918: 90 09 28 00 stw r0,10240(r9) RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); ffc0891c: 3f a0 00 00 lis r29,0 ffc08920: 3b bd 30 44 addi r29,r29,12356 ffc08924: 7f a3 eb 78 mr r3,r29 ffc08928: 48 00 29 f5 bl ffc0b31c <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { ffc0892c: 7c 7f 1b 79 mr. r31,r3 ffc08930: 40 a2 00 10 bne+ ffc08940 _Thread_Enable_dispatch(); ffc08934: 48 00 3b f5 bl ffc0c528 <_Thread_Enable_dispatch> return ENOMEM; ffc08938: 38 60 00 0c li r3,12 ffc0893c: 48 00 00 4c b ffc08988 } the_cond->process_shared = the_attr->process_shared; ffc08940: 80 1e 00 04 lwz r0,4(r30) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; ffc08944: 3b c0 00 00 li r30,0 ffc08948: 93 df 00 14 stw r30,20(r31) _Thread_queue_Initialize( ffc0894c: 3c a0 10 00 lis r5,4096 ffc08950: 38 7f 00 18 addi r3,r31,24 if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; ffc08954: 90 1f 00 10 stw r0,16(r31) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; _Thread_queue_Initialize( ffc08958: 38 80 00 00 li r4,0 ffc0895c: 60 a5 08 00 ori r5,r5,2048 ffc08960: 38 c0 00 74 li r6,116 ffc08964: 48 00 44 75 bl ffc0cdd8 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc08968: 80 1f 00 08 lwz r0,8(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc0896c: 81 7d 00 1c lwz r11,28(r29) ffc08970: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc08974: 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; ffc08978: 93 df 00 0c stw r30,12(r31) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; ffc0897c: 90 1c 00 00 stw r0,0(r28) _Thread_Enable_dispatch(); ffc08980: 48 00 3b a9 bl ffc0c528 <_Thread_Enable_dispatch> return 0; ffc08984: 38 60 00 00 li r3,0 } ffc08988: 39 61 00 18 addi r11,r1,24 ffc0898c: 4b ff 8e 48 b ffc017d4 <_restgpr_28_x> =============================================================================== ffc08724 : int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) ffc08724: 2c 03 00 00 cmpwi r3,0 return EINVAL; ffc08728: 38 00 00 16 li r0,22 int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) ffc0872c: 41 82 00 18 beq- ffc08744 ffc08730: 81 23 00 00 lwz r9,0(r3) ffc08734: 2f 89 00 00 cmpwi cr7,r9,0 ffc08738: 41 9e 00 0c beq- cr7,ffc08744 <== NEVER TAKEN return EINVAL; attr->is_initialized = false; ffc0873c: 38 00 00 00 li r0,0 ffc08740: 90 03 00 00 stw r0,0(r3) return 0; } ffc08744: 7c 03 03 78 mr r3,r0 ffc08748: 4e 80 00 20 blr =============================================================================== ffc07b78 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc07b78: 94 21 ff 88 stwu r1,-120(r1) ffc07b7c: 7c 08 02 a6 mflr r0 ffc07b80: be c1 00 50 stmw r22,80(r1) int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc07b84: 7c b8 2b 79 mr. r24,r5 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { ffc07b88: 7c 7a 1b 78 mr r26,r3 ffc07b8c: 90 01 00 7c stw r0,124(r1) ffc07b90: 7c d9 33 78 mr r25,r6 struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) return EFAULT; ffc07b94: 3b c0 00 0e li r30,14 int schedpolicy = SCHED_RR; struct sched_param schedparam; Objects_Name name; int rc; if ( !start_routine ) ffc07b98: 41 82 02 0c beq- ffc07da4 return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; ffc07b9c: 2f 84 00 00 cmpwi cr7,r4,0 ffc07ba0: 7c 9f 23 78 mr r31,r4 ffc07ba4: 40 be 00 0c bne+ cr7,ffc07bb0 ffc07ba8: 3f e0 ff c2 lis r31,-62 ffc07bac: 3b ff ef d8 addi r31,r31,-4136 if ( !the_attr->is_initialized ) ffc07bb0: 80 1f 00 00 lwz r0,0(r31) return EINVAL; ffc07bb4: 3b c0 00 16 li r30,22 if ( !start_routine ) return EFAULT; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; if ( !the_attr->is_initialized ) ffc07bb8: 2f 80 00 00 cmpwi cr7,r0,0 ffc07bbc: 41 9e 01 e8 beq- cr7,ffc07da4 * 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) ) ffc07bc0: 80 1f 00 04 lwz r0,4(r31) ffc07bc4: 2f 80 00 00 cmpwi cr7,r0,0 ffc07bc8: 41 9e 00 18 beq- cr7,ffc07be0 ffc07bcc: 3d 60 00 00 lis r11,0 ffc07bd0: 81 3f 00 08 lwz r9,8(r31) ffc07bd4: 80 0b 27 10 lwz r0,10000(r11) ffc07bd8: 7f 89 00 40 cmplw cr7,r9,r0 ffc07bdc: 41 9c 01 c8 blt- cr7,ffc07da4 * 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 ) { ffc07be0: 80 1f 00 10 lwz r0,16(r31) ffc07be4: 2f 80 00 01 cmpwi cr7,r0,1 ffc07be8: 41 9e 00 14 beq- cr7,ffc07bfc ffc07bec: 2f 80 00 02 cmpwi cr7,r0,2 schedpolicy = the_attr->schedpolicy; schedparam = the_attr->schedparam; break; default: return EINVAL; ffc07bf0: 3b c0 00 16 li r30,22 * If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread * inherits scheduling attributes from the creating thread. If it is * PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the * attributes structure. */ switch ( the_attr->inheritsched ) { ffc07bf4: 40 be 01 b0 bne+ cr7,ffc07da4 ffc07bf8: 48 00 00 1c b ffc07c14 case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc07bfc: 3d 20 00 00 lis r9,0 ffc07c00: 81 29 31 10 lwz r9,12560(r9) ffc07c04: 80 69 01 34 lwz r3,308(r9) schedpolicy = api->schedpolicy; ffc07c08: 83 63 00 84 lwz r27,132(r3) schedparam = api->schedparam; ffc07c0c: 38 63 00 88 addi r3,r3,136 ffc07c10: 48 00 00 0c b ffc07c1c break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; ffc07c14: 83 7f 00 14 lwz r27,20(r31) schedparam = the_attr->schedparam; ffc07c18: 38 7f 00 18 addi r3,r31,24 ffc07c1c: 38 81 00 20 addi r4,r1,32 ffc07c20: 7c a3 e4 aa lswi r5,r3,28 ffc07c24: 7c a4 e5 aa stswi r5,r4,28 /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) return ENOTSUP; ffc07c28: 3b c0 00 86 li r30,134 /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) ffc07c2c: 80 1f 00 0c lwz r0,12(r31) ffc07c30: 2f 80 00 00 cmpwi cr7,r0,0 ffc07c34: 40 9e 01 70 bne- cr7,ffc07da4 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) ffc07c38: 80 61 00 20 lwz r3,32(r1) return EINVAL; ffc07c3c: 3b c0 00 16 li r30,22 return ENOTSUP; /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) ffc07c40: 48 00 6a 7d bl ffc0e6bc <_POSIX_Priority_Is_valid> ffc07c44: 2f 83 00 00 cmpwi cr7,r3,0 ffc07c48: 41 be 01 5c beq+ cr7,ffc07da4 <== NEVER TAKEN return EINVAL; core_priority = _POSIX_Priority_To_core( schedparam.sched_priority ); ffc07c4c: 7c 24 0b 78 mr r4,r1 ffc07c50: 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); ffc07c54: 3d 20 00 00 lis r9,0 /* * Set the core scheduling policy information. */ rc = _POSIX_Thread_Translate_sched_param( ffc07c58: 7f 63 db 78 mr r3,r27 ffc07c5c: 8a c9 27 14 lbz r22,10004(r9) ffc07c60: 38 a1 00 18 addi r5,r1,24 ffc07c64: 38 c1 00 1c addi r6,r1,28 ffc07c68: 48 00 6a 7d bl ffc0e6e4 <_POSIX_Thread_Translate_sched_param> schedpolicy, &schedparam, &budget_algorithm, &budget_callout ); if ( rc ) ffc07c6c: 7c 7e 1b 79 mr. r30,r3 ffc07c70: 40 a2 01 34 bne+ ffc07da4 #endif /* * Lock the allocator mutex for protection */ _RTEMS_Lock_allocator(); ffc07c74: 3f a0 00 00 lis r29,0 ffc07c78: 80 7d 28 14 lwz r3,10260(r29) ffc07c7c: 48 00 1a 21 bl ffc0969c <_API_Mutex_Lock> * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); ffc07c80: 3c 60 00 00 lis r3,0 ffc07c84: 38 63 2e 0c addi r3,r3,11788 ffc07c88: 48 00 25 21 bl ffc0a1a8 <_Objects_Allocate> * Allocate the thread control block. * * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { ffc07c8c: 7c 7c 1b 79 mr. r28,r3 ffc07c90: 40 a2 00 0c bne+ ffc07c9c _RTEMS_Unlock_allocator(); ffc07c94: 80 7d 28 14 lwz r3,10260(r29) ffc07c98: 48 00 00 80 b ffc07d18 static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) ffc07c9c: 3d 20 00 00 lis r9,0 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc07ca0: 80 1f 00 08 lwz r0,8(r31) static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) ffc07ca4: 80 c9 27 10 lwz r6,10000(r9) /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc07ca8: 80 bf 00 04 lwz r5,4(r31) static inline size_t _POSIX_Threads_Ensure_minimum_stack ( size_t size ) { if ( size >= PTHREAD_MINIMUM_STACK_SIZE ) ffc07cac: 54 c6 08 3c rlwinm r6,r6,1,0,30 /* * Initialize the core thread for this task. */ name.name_p = NULL; /* posix threads don't have a name by default */ status = _Thread_Initialize( ffc07cb0: 7f 86 00 40 cmplw cr7,r6,r0 ffc07cb4: 40 9c 00 08 bge- cr7,ffc07cbc ffc07cb8: 7c 06 03 78 mr r6,r0 ffc07cbc: 38 00 00 00 li r0,0 ffc07cc0: 81 61 00 1c lwz r11,28(r1) ffc07cc4: 7c 29 0b 78 mr r9,r1 ffc07cc8: 81 41 00 18 lwz r10,24(r1) ffc07ccc: 94 09 00 48 stwu r0,72(r9) ffc07cd0: 3f a0 00 00 lis r29,0 ffc07cd4: 3b bd 2e 0c addi r29,r29,11788 ffc07cd8: 91 21 00 10 stw r9,16(r1) ffc07cdc: 7f a3 eb 78 mr r3,r29 ffc07ce0: 7f 84 e3 78 mr r4,r28 ffc07ce4: 38 e0 00 01 li r7,1 ffc07ce8: 91 61 00 08 stw r11,8(r1) ffc07cec: 7d 17 b0 50 subf r8,r23,r22 ffc07cf0: 39 20 00 01 li r9,1 ffc07cf4: 90 01 00 0c stw r0,12(r1) ffc07cf8: 48 00 37 7d bl ffc0b474 <_Thread_Initialize> budget_callout, 0, /* isr level */ name /* posix threads don't have a name */ ); if ( !status ) { ffc07cfc: 2f 83 00 00 cmpwi cr7,r3,0 ffc07d00: 40 9e 00 24 bne- cr7,ffc07d24 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); ffc07d04: 7f a3 eb 78 mr r3,r29 ffc07d08: 7f 84 e3 78 mr r4,r28 ffc07d0c: 48 00 28 15 bl ffc0a520 <_Objects_Free> _POSIX_Threads_Free( the_thread ); _RTEMS_Unlock_allocator(); ffc07d10: 3d 20 00 00 lis r9,0 ffc07d14: 80 69 28 14 lwz r3,10260(r9) ffc07d18: 48 00 1a 09 bl ffc09720 <_API_Mutex_Unlock> return EAGAIN; ffc07d1c: 3b c0 00 0b li r30,11 ffc07d20: 48 00 00 84 b ffc07da4 } /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc07d24: 83 bc 01 34 lwz r29,308(r28) api->Attributes = *the_attr; ffc07d28: 38 a0 00 40 li r5,64 ffc07d2c: 7f e4 fb 78 mr r4,r31 ffc07d30: 7f a3 eb 78 mr r3,r29 ffc07d34: 48 00 a1 6d bl ffc11ea0 api->detachstate = the_attr->detachstate; ffc07d38: 80 1f 00 3c lwz r0,60(r31) api->schedpolicy = schedpolicy; ffc07d3c: 93 7d 00 84 stw r27,132(r29) api->schedparam = schedparam; ffc07d40: 38 9d 00 88 addi r4,r29,136 ffc07d44: 38 61 00 20 addi r3,r1,32 * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; ffc07d48: 90 1d 00 40 stw r0,64(r29) api->schedpolicy = schedpolicy; api->schedparam = schedparam; ffc07d4c: 7c a3 e4 aa lswi r5,r3,28 ffc07d50: 7c a4 e5 aa stswi r5,r4,28 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( ffc07d54: 7f 83 e3 78 mr r3,r28 ffc07d58: 38 80 00 01 li r4,1 ffc07d5c: 7f 05 c3 78 mr r5,r24 ffc07d60: 7f 26 cb 78 mr r6,r25 ffc07d64: 38 e0 00 00 li r7,0 ffc07d68: 48 00 42 09 bl ffc0bf70 <_Thread_Start> _RTEMS_Unlock_allocator(); return EINVAL; } #endif if ( schedpolicy == SCHED_SPORADIC ) { ffc07d6c: 2f 9b 00 04 cmpwi cr7,r27,4 ffc07d70: 40 be 00 20 bne+ cr7,ffc07d90 _Watchdog_Insert_ticks( ffc07d74: 38 7d 00 90 addi r3,r29,144 ffc07d78: 48 00 44 45 bl ffc0c1bc <_Timespec_To_ticks> ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07d7c: 38 9d 00 a8 addi r4,r29,168 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc07d80: 90 7d 00 b4 stw r3,180(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07d84: 3c 60 00 00 lis r3,0 ffc07d88: 38 63 2d 28 addi r3,r3,11560 ffc07d8c: 48 00 48 1d bl ffc0c5a8 <_Watchdog_Insert> } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc07d90: 80 1c 00 08 lwz r0,8(r28) _RTEMS_Unlock_allocator(); ffc07d94: 3d 20 00 00 lis r9,0 ffc07d98: 80 69 28 14 lwz r3,10260(r9) } /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; ffc07d9c: 90 1a 00 00 stw r0,0(r26) _RTEMS_Unlock_allocator(); ffc07da0: 48 00 19 81 bl ffc09720 <_API_Mutex_Unlock> return 0; } ffc07da4: 39 61 00 78 addi r11,r1,120 ffc07da8: 7f c3 f3 78 mr r3,r30 ffc07dac: 4b ff 8e 14 b ffc00bc0 <_restgpr_22_x> =============================================================================== ffc0a0d4 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { ffc0a0d4: 94 21 ff d8 stwu r1,-40(r1) ffc0a0d8: 7c 08 02 a6 mflr r0 ffc0a0dc: bf a1 00 1c stmw r29,28(r1) ffc0a0e0: 7c 7d 1b 78 mr r29,r3 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0a0e4: 7c 83 23 78 mr r3,r4 ffc0a0e8: 38 81 00 08 addi r4,r1,8 int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { ffc0a0ec: 90 01 00 2c stw r0,44(r1) * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); ffc0a0f0: 48 00 00 f5 bl ffc0a1e4 <_POSIX_Absolute_timeout_to_ticks> int _EXFUN(pthread_mutex_trylock, (pthread_mutex_t *__mutex)); int _EXFUN(pthread_mutex_unlock, (pthread_mutex_t *__mutex)); #if defined(_POSIX_TIMEOUTS) int _EXFUN(pthread_mutex_timedlock, ffc0a0f4: 68 7f 00 03 xori r31,r3,3 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); ffc0a0f8: 80 a1 00 08 lwz r5,8(r1) ffc0a0fc: 7f ff 00 34 cntlzw r31,r31 ffc0a100: 57 ff d9 7e rlwinm r31,r31,27,5,31 * * 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 ); ffc0a104: 7c 7e 1b 78 mr r30,r3 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); ffc0a108: 7f e4 fb 78 mr r4,r31 ffc0a10c: 7f a3 eb 78 mr r3,r29 ffc0a110: 4b ff fe c1 bl ffc09fd0 <_POSIX_Mutex_Lock_support> * This service only gives us the option to block. We used a polling * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { ffc0a114: 2f 9f 00 00 cmpwi cr7,r31,0 ffc0a118: 40 9e 00 30 bne- cr7,ffc0a148 ffc0a11c: 2f 83 00 10 cmpwi cr7,r3,16 ffc0a120: 40 be 00 28 bne+ cr7,ffc0a148 <== NEVER TAKEN if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) ffc0a124: 2f 9e 00 00 cmpwi cr7,r30,0 ffc0a128: 41 9e 00 14 beq- cr7,ffc0a13c <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc0a12c: 3b de ff ff addi r30,r30,-1 ffc0a130: 2b 9e 00 01 cmplwi cr7,r30,1 ffc0a134: 41 bd 00 14 bgt+ cr7,ffc0a148 <== NEVER TAKEN ffc0a138: 48 00 00 0c b ffc0a144 * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; ffc0a13c: 38 60 00 16 li r3,22 <== NOT EXECUTED ffc0a140: 48 00 00 08 b ffc0a148 <== NOT EXECUTED if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; ffc0a144: 38 60 00 74 li r3,116 } return lock_status; } ffc0a148: 39 61 00 28 addi r11,r1,40 ffc0a14c: 4b ff 8a 38 b ffc02b84 <_restgpr_29_x> =============================================================================== ffc09c54 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) ffc09c54: 2c 03 00 00 cmpwi r3,0 return EINVAL; ffc09c58: 38 00 00 16 li r0,22 int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) ffc09c5c: 41 82 00 20 beq- ffc09c7c ffc09c60: 81 23 00 00 lwz r9,0(r3) ffc09c64: 2f 89 00 00 cmpwi cr7,r9,0 ffc09c68: 41 9e 00 14 beq- cr7,ffc09c7c return EINVAL; switch ( pshared ) { ffc09c6c: 2b 84 00 01 cmplwi cr7,r4,1 ffc09c70: 41 9d 00 0c bgt- cr7,ffc09c7c <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; ffc09c74: 90 83 00 04 stw r4,4(r3) return 0; ffc09c78: 38 00 00 00 li r0,0 default: return EINVAL; } } ffc09c7c: 7c 03 03 78 mr r3,r0 ffc09c80: 4e 80 00 20 blr =============================================================================== ffc071ec : int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) ffc071ec: 2c 03 00 00 cmpwi r3,0 return EINVAL; ffc071f0: 38 00 00 16 li r0,22 int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { if ( !attr || !attr->is_initialized ) ffc071f4: 41 82 00 20 beq- ffc07214 ffc071f8: 81 23 00 00 lwz r9,0(r3) ffc071fc: 2f 89 00 00 cmpwi cr7,r9,0 ffc07200: 41 9e 00 14 beq- cr7,ffc07214 <== NEVER TAKEN return EINVAL; switch ( type ) { ffc07204: 2b 84 00 03 cmplwi cr7,r4,3 ffc07208: 41 9d 00 0c bgt- cr7,ffc07214 case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; ffc0720c: 90 83 00 10 stw r4,16(r3) return 0; ffc07210: 38 00 00 00 li r0,0 default: return EINVAL; } } ffc07214: 7c 03 03 78 mr r3,r0 ffc07218: 4e 80 00 20 blr =============================================================================== ffc08218 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc08218: 94 21 ff e0 stwu r1,-32(r1) ffc0821c: 7c 08 02 a6 mflr r0 ffc08220: bf c1 00 18 stmw r30,24(r1) if ( !once_control || !init_routine ) ffc08224: 7c 7f 1b 79 mr. r31,r3 int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { ffc08228: 7c 9e 23 78 mr r30,r4 ffc0822c: 90 01 00 24 stw r0,36(r1) if ( !once_control || !init_routine ) return EINVAL; ffc08230: 38 00 00 16 li r0,22 int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) ffc08234: 41 82 00 60 beq- ffc08294 ffc08238: 2f 84 00 00 cmpwi cr7,r4,0 ffc0823c: 41 9e 00 58 beq- cr7,ffc08294 return EINVAL; if ( !once_control->init_executed ) { ffc08240: 81 3f 00 04 lwz r9,4(r31) once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; ffc08244: 38 00 00 00 li r0,0 ) { if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { ffc08248: 2f 89 00 00 cmpwi cr7,r9,0 ffc0824c: 40 be 00 48 bne+ cr7,ffc08294 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); ffc08250: 38 60 01 00 li r3,256 ffc08254: 38 80 01 00 li r4,256 ffc08258: 38 a1 00 08 addi r5,r1,8 ffc0825c: 48 00 0c b9 bl ffc08f14 if ( !once_control->init_executed ) { ffc08260: 80 1f 00 04 lwz r0,4(r31) ffc08264: 2f 80 00 00 cmpwi cr7,r0,0 ffc08268: 40 be 00 18 bne+ cr7,ffc08280 <== NEVER TAKEN once_control->is_initialized = true; ffc0826c: 38 00 00 01 li r0,1 once_control->init_executed = true; (*init_routine)(); ffc08270: 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; ffc08274: 90 1f 00 00 stw r0,0(r31) once_control->init_executed = true; ffc08278: 90 1f 00 04 stw r0,4(r31) (*init_routine)(); ffc0827c: 4e 80 04 21 bctrl } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); ffc08280: 7c 25 0b 78 mr r5,r1 ffc08284: 84 65 00 08 lwzu r3,8(r5) ffc08288: 38 80 01 00 li r4,256 ffc0828c: 48 00 0c 89 bl ffc08f14 } return 0; ffc08290: 38 00 00 00 li r0,0 } ffc08294: 39 61 00 20 addi r11,r1,32 ffc08298: 7c 03 03 78 mr r3,r0 ffc0829c: 4b ff 89 44 b ffc00be0 <_restgpr_30_x> =============================================================================== ffc08e0c : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc08e0c: 94 21 ff d8 stwu r1,-40(r1) ffc08e10: 7c 08 02 a6 mflr r0 ffc08e14: bf 81 00 18 stmw r28,24(r1) const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc08e18: 7c 7c 1b 79 mr. r28,r3 int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { ffc08e1c: 90 01 00 2c stw r0,44(r1) /* * Error check parameters */ if ( !rwlock ) return EINVAL; ffc08e20: 38 00 00 16 li r0,22 const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) ffc08e24: 41 82 00 9c beq- ffc08ec0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { ffc08e28: 2f 84 00 00 cmpwi cr7,r4,0 ffc08e2c: 7c 9f 23 78 mr r31,r4 ffc08e30: 40 be 00 10 bne+ cr7,ffc08e40 the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); ffc08e34: 3b e1 00 0c addi r31,r1,12 ffc08e38: 7f e3 fb 78 mr r3,r31 ffc08e3c: 48 00 0a 41 bl ffc0987c } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc08e40: 81 3f 00 00 lwz r9,0(r31) return EINVAL; ffc08e44: 38 00 00 16 li r0,22 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) ffc08e48: 2f 89 00 00 cmpwi cr7,r9,0 ffc08e4c: 41 9e 00 74 beq- cr7,ffc08ec0 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { ffc08e50: 83 df 00 04 lwz r30,4(r31) ffc08e54: 2f 9e 00 00 cmpwi cr7,r30,0 ffc08e58: 40 9e 00 68 bne- cr7,ffc08ec0 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc08e5c: 3d 20 00 00 lis r9,0 */ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes( CORE_RWLock_Attributes *the_attributes ) { the_attributes->XXX = 0; ffc08e60: 93 c1 00 08 stw r30,8(r1) ffc08e64: 81 69 27 f4 lwz r11,10228(r9) ffc08e68: 38 0b 00 01 addi r0,r11,1 ffc08e6c: 90 09 27 f4 stw r0,10228(r9) * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) _Objects_Allocate( &_POSIX_RWLock_Information ); ffc08e70: 3f a0 00 00 lis r29,0 ffc08e74: 3b bd 2d ec addi r29,r29,11756 ffc08e78: 7f a3 eb 78 mr r3,r29 ffc08e7c: 48 00 2a 0d bl ffc0b888 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { ffc08e80: 7c 7f 1b 79 mr. r31,r3 ffc08e84: 40 a2 00 10 bne+ ffc08e94 _Thread_Enable_dispatch(); ffc08e88: 48 00 3c 0d bl ffc0ca94 <_Thread_Enable_dispatch> return EAGAIN; ffc08e8c: 38 00 00 0b li r0,11 ffc08e90: 48 00 00 30 b ffc08ec0 } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); ffc08e94: 38 7f 00 10 addi r3,r31,16 ffc08e98: 38 81 00 08 addi r4,r1,8 ffc08e9c: 48 00 20 71 bl ffc0af0c <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc08ea0: 80 1f 00 08 lwz r0,8(r31) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc08ea4: 81 7d 00 1c lwz r11,28(r29) ffc08ea8: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc08eac: 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; ffc08eb0: 93 df 00 0c stw r30,12(r31) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; ffc08eb4: 90 1c 00 00 stw r0,0(r28) _Thread_Enable_dispatch(); ffc08eb8: 48 00 3b dd bl ffc0ca94 <_Thread_Enable_dispatch> return 0; ffc08ebc: 38 00 00 00 li r0,0 } ffc08ec0: 39 61 00 28 addi r11,r1,40 ffc08ec4: 7c 03 03 78 mr r3,r0 ffc08ec8: 4b ff 8f 68 b ffc01e30 <_restgpr_28_x> =============================================================================== ffc08f44 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc08f44: 94 21 ff d8 stwu r1,-40(r1) ffc08f48: 7c 08 02 a6 mflr r0 ffc08f4c: bf 81 00 18 stmw r28,24(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc08f50: 7c 7c 1b 79 mr. r28,r3 return EINVAL; ffc08f54: 3b c0 00 16 li r30,22 int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc08f58: 90 01 00 2c stw r0,44(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc08f5c: 41 82 00 a4 beq- ffc09000 * * 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 ); ffc08f60: 7c 83 23 78 mr r3,r4 ffc08f64: 38 81 00 0c addi r4,r1,12 ffc08f68: 48 00 6c 99 bl ffc0fc00 <_POSIX_Absolute_timeout_to_ticks> ffc08f6c: 80 9c 00 00 lwz r4,0(r28) ffc08f70: 7c 7d 1b 78 mr r29,r3 ffc08f74: 3c 60 00 00 lis r3,0 ffc08f78: 38 63 2d ec addi r3,r3,11756 ffc08f7c: 38 a1 00 08 addi r5,r1,8 ffc08f80: 48 00 2e 1d bl ffc0bd9c <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc08f84: 80 01 00 08 lwz r0,8(r1) ffc08f88: 2f 80 00 00 cmpwi cr7,r0,0 ffc08f8c: 40 9e 00 74 bne- cr7,ffc09000 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, ffc08f90: 6b bf 00 03 xori r31,r29,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( ffc08f94: 80 9c 00 00 lwz r4,0(r28) ffc08f98: 7f ff 00 34 cntlzw r31,r31 ffc08f9c: 80 c1 00 0c lwz r6,12(r1) ffc08fa0: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc08fa4: 38 63 00 10 addi r3,r3,16 ffc08fa8: 7f e5 fb 78 mr r5,r31 ffc08fac: 38 e0 00 00 li r7,0 ffc08fb0: 48 00 1f 9d bl ffc0af4c <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc08fb4: 48 00 3a e1 bl ffc0ca94 <_Thread_Enable_dispatch> if ( !do_wait ) { ffc08fb8: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08fbc: 40 9e 00 30 bne- cr7,ffc08fec if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { ffc08fc0: 3d 20 00 00 lis r9,0 ffc08fc4: 81 29 31 30 lwz r9,12592(r9) ffc08fc8: 80 09 00 34 lwz r0,52(r9) ffc08fcc: 2f 80 00 02 cmpwi cr7,r0,2 ffc08fd0: 40 be 00 1c bne+ cr7,ffc08fec if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) ffc08fd4: 2f 9d 00 00 cmpwi cr7,r29,0 ffc08fd8: 41 9e 00 28 beq- cr7,ffc09000 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc08fdc: 3b bd ff ff addi r29,r29,-1 ffc08fe0: 2b 9d 00 01 cmplwi cr7,r29,1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; ffc08fe4: 3b c0 00 74 li r30,116 _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc08fe8: 40 9d 00 18 ble- cr7,ffc09000 <== ALWAYS TAKEN return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ffc08fec: 3d 20 00 00 lis r9,0 ffc08ff0: 81 29 31 30 lwz r9,12592(r9) status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc08ff4: 80 69 00 34 lwz r3,52(r9) ffc08ff8: 48 00 00 dd bl ffc090d4 <_POSIX_RWLock_Translate_core_RWLock_return_code> ffc08ffc: 7c 7e 1b 78 mr r30,r3 case OBJECTS_ERROR: break; } return EINVAL; } ffc09000: 39 61 00 28 addi r11,r1,40 ffc09004: 7f c3 f3 78 mr r3,r30 ffc09008: 4b ff 8e 28 b ffc01e30 <_restgpr_28_x> =============================================================================== ffc0900c : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc0900c: 94 21 ff d8 stwu r1,-40(r1) ffc09010: 7c 08 02 a6 mflr r0 ffc09014: bf 81 00 18 stmw r28,24(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc09018: 7c 7c 1b 79 mr. r28,r3 return EINVAL; ffc0901c: 3b c0 00 16 li r30,22 int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { ffc09020: 90 01 00 2c stw r0,44(r1) Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) ffc09024: 41 82 00 a4 beq- ffc090c8 * * 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 ); ffc09028: 7c 83 23 78 mr r3,r4 ffc0902c: 38 81 00 0c addi r4,r1,12 ffc09030: 48 00 6b d1 bl ffc0fc00 <_POSIX_Absolute_timeout_to_ticks> ffc09034: 80 9c 00 00 lwz r4,0(r28) ffc09038: 7c 7d 1b 78 mr r29,r3 ffc0903c: 3c 60 00 00 lis r3,0 ffc09040: 38 63 2d ec addi r3,r3,11756 ffc09044: 38 a1 00 08 addi r5,r1,8 ffc09048: 48 00 2d 55 bl ffc0bd9c <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { ffc0904c: 80 01 00 08 lwz r0,8(r1) ffc09050: 2f 80 00 00 cmpwi cr7,r0,0 ffc09054: 40 9e 00 74 bne- cr7,ffc090c8 (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, ffc09058: 6b bf 00 03 xori r31,r29,3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( ffc0905c: 80 9c 00 00 lwz r4,0(r28) ffc09060: 7f ff 00 34 cntlzw r31,r31 ffc09064: 80 c1 00 0c lwz r6,12(r1) ffc09068: 57 ff d9 7e rlwinm r31,r31,27,5,31 ffc0906c: 38 63 00 10 addi r3,r3,16 ffc09070: 7f e5 fb 78 mr r5,r31 ffc09074: 38 e0 00 00 li r7,0 ffc09078: 48 00 1f b5 bl ffc0b02c <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); ffc0907c: 48 00 3a 19 bl ffc0ca94 <_Thread_Enable_dispatch> if ( !do_wait && ffc09080: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09084: 40 9e 00 30 bne- cr7,ffc090b4 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { ffc09088: 3d 20 00 00 lis r9,0 ffc0908c: 81 29 31 30 lwz r9,12592(r9) ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && ffc09090: 80 09 00 34 lwz r0,52(r9) ffc09094: 2f 80 00 02 cmpwi cr7,r0,2 ffc09098: 40 be 00 1c bne+ cr7,ffc090b4 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) ffc0909c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc090a0: 41 9e 00 28 beq- cr7,ffc090c8 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc090a4: 3b bd ff ff addi r29,r29,-1 ffc090a8: 2b 9d 00 01 cmplwi cr7,r29,1 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; ffc090ac: 3b c0 00 74 li r30,116 _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || ffc090b0: 40 9d 00 18 ble- cr7,ffc090c8 <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ffc090b4: 3d 20 00 00 lis r9,0 ffc090b8: 81 29 31 30 lwz r9,12592(r9) if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( ffc090bc: 80 69 00 34 lwz r3,52(r9) ffc090c0: 48 00 00 15 bl ffc090d4 <_POSIX_RWLock_Translate_core_RWLock_return_code> ffc090c4: 7c 7e 1b 78 mr r30,r3 case OBJECTS_ERROR: break; } return EINVAL; } ffc090c8: 39 61 00 28 addi r11,r1,40 ffc090cc: 7f c3 f3 78 mr r3,r30 ffc090d0: 4b ff 8d 60 b ffc01e30 <_restgpr_28_x> =============================================================================== ffc098a0 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) ffc098a0: 2c 03 00 00 cmpwi r3,0 return EINVAL; ffc098a4: 38 00 00 16 li r0,22 int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) ffc098a8: 41 82 00 20 beq- ffc098c8 return EINVAL; if ( !attr->is_initialized ) ffc098ac: 81 23 00 00 lwz r9,0(r3) ffc098b0: 2f 89 00 00 cmpwi cr7,r9,0 ffc098b4: 41 9e 00 14 beq- cr7,ffc098c8 return EINVAL; switch ( pshared ) { ffc098b8: 2b 84 00 01 cmplwi cr7,r4,1 ffc098bc: 41 9d 00 0c bgt- cr7,ffc098c8 <== NEVER TAKEN case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; ffc098c0: 90 83 00 04 stw r4,4(r3) return 0; ffc098c4: 38 00 00 00 li r0,0 default: return EINVAL; } } ffc098c8: 7c 03 03 78 mr r3,r0 ffc098cc: 4e 80 00 20 blr =============================================================================== ffc0a9cc : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0a9cc: 94 21 ff d0 stwu r1,-48(r1) ffc0a9d0: 7c 08 02 a6 mflr r0 ffc0a9d4: bf 61 00 1c stmw r27,28(r1) int rc; /* * Check all the parameters */ if ( !param ) ffc0a9d8: 7c bd 2b 79 mr. r29,r5 int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { ffc0a9dc: 7c 7c 1b 78 mr r28,r3 ffc0a9e0: 90 01 00 34 stw r0,52(r1) ffc0a9e4: 7c 9f 23 78 mr r31,r4 /* * Check all the parameters */ if ( !param ) return EINVAL; ffc0a9e8: 3b c0 00 16 li r30,22 int rc; /* * Check all the parameters */ if ( !param ) ffc0a9ec: 41 82 00 f0 beq- ffc0aadc return EINVAL; rc = _POSIX_Thread_Translate_sched_param( ffc0a9f0: 7c 83 23 78 mr r3,r4 ffc0a9f4: 38 a1 00 08 addi r5,r1,8 ffc0a9f8: 7f a4 eb 78 mr r4,r29 ffc0a9fc: 38 c1 00 0c addi r6,r1,12 ffc0aa00: 48 00 63 d1 bl ffc10dd0 <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) ffc0aa04: 7c 7e 1b 79 mr. r30,r3 ffc0aa08: 40 82 00 d4 bne- ffc0aadc ffc0aa0c: 3c 60 00 00 lis r3,0 ffc0aa10: 38 63 2e 6c addi r3,r3,11884 ffc0aa14: 7f 84 e3 78 mr r4,r28 ffc0aa18: 38 a1 00 10 addi r5,r1,16 ffc0aa1c: 48 00 22 b1 bl ffc0cccc <_Objects_Get> /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { ffc0aa20: 80 01 00 10 lwz r0,16(r1) ffc0aa24: 7c 7b 1b 78 mr r27,r3 ffc0aa28: 2f 80 00 00 cmpwi cr7,r0,0 ffc0aa2c: 40 9e 00 ac bne- cr7,ffc0aad8 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc0aa30: 83 83 01 34 lwz r28,308(r3) if ( api->schedpolicy == SCHED_SPORADIC ) ffc0aa34: 80 1c 00 84 lwz r0,132(r28) ffc0aa38: 2f 80 00 04 cmpwi cr7,r0,4 ffc0aa3c: 40 be 00 0c bne+ cr7,ffc0aa48 (void) _Watchdog_Remove( &api->Sporadic_timer ); ffc0aa40: 38 7c 00 a8 addi r3,r28,168 ffc0aa44: 48 00 43 d5 bl ffc0ee18 <_Watchdog_Remove> api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { ffc0aa48: 2f 9f 00 00 cmpwi cr7,r31,0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; ffc0aa4c: 93 fc 00 84 stw r31,132(r28) api->schedparam = *param; ffc0aa50: 38 9c 00 88 addi r4,r28,136 the_thread->budget_algorithm = budget_algorithm; ffc0aa54: 80 01 00 08 lwz r0,8(r1) if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; ffc0aa58: 7c bd e4 aa lswi r5,r29,28 ffc0aa5c: 7c a4 e5 aa stswi r5,r4,28 the_thread->budget_algorithm = budget_algorithm; ffc0aa60: 90 1b 00 7c stw r0,124(r27) the_thread->budget_callout = budget_callout; ffc0aa64: 80 01 00 0c lwz r0,12(r1) ffc0aa68: 90 1b 00 80 stw r0,128(r27) switch ( api->schedpolicy ) { ffc0aa6c: 41 9c 00 64 blt- cr7,ffc0aad0 <== NEVER TAKEN ffc0aa70: 2f 9f 00 02 cmpwi cr7,r31,2 ffc0aa74: 40 9d 00 10 ble- cr7,ffc0aa84 ffc0aa78: 2f 9f 00 04 cmpwi cr7,r31,4 ffc0aa7c: 40 be 00 54 bne+ cr7,ffc0aad0 <== NEVER TAKEN ffc0aa80: 48 00 00 34 b ffc0aab4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0aa84: 3d 20 00 00 lis r9,0 ffc0aa88: 80 09 28 44 lwz r0,10308(r9) ffc0aa8c: 3d 20 00 00 lis r9,0 ffc0aa90: 88 89 27 54 lbz r4,10068(r9) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0aa94: 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; ffc0aa98: 90 1b 00 78 stw r0,120(r27) the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0aa9c: 38 a0 00 01 li r5,1 ffc0aaa0: 80 1c 00 88 lwz r0,136(r28) ffc0aaa4: 7c 80 20 50 subf r4,r0,r4 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; the_thread->real_priority = ffc0aaa8: 90 9b 00 18 stw r4,24(r27) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( ffc0aaac: 48 00 29 b1 bl ffc0d45c <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; ffc0aab0: 48 00 00 20 b ffc0aad0 case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; ffc0aab4: 80 1c 00 88 lwz r0,136(r28) _Watchdog_Remove( &api->Sporadic_timer ); ffc0aab8: 38 7c 00 a8 addi r3,r28,168 true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; ffc0aabc: 90 1c 00 a4 stw r0,164(r28) _Watchdog_Remove( &api->Sporadic_timer ); ffc0aac0: 48 00 43 59 bl ffc0ee18 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); ffc0aac4: 38 60 00 00 li r3,0 ffc0aac8: 7f 64 db 78 mr r4,r27 ffc0aacc: 4b ff fd b9 bl ffc0a884 <_POSIX_Threads_Sporadic_budget_TSR> break; } _Thread_Enable_dispatch(); ffc0aad0: 48 00 2e f5 bl ffc0d9c4 <_Thread_Enable_dispatch> return 0; ffc0aad4: 48 00 00 08 b ffc0aadc #endif case OBJECTS_ERROR: break; } return ESRCH; ffc0aad8: 3b c0 00 03 li r30,3 } ffc0aadc: 39 61 00 30 addi r11,r1,48 ffc0aae0: 7f c3 f3 78 mr r3,r30 ffc0aae4: 4b ff 80 98 b ffc02b7c <_restgpr_27_x> =============================================================================== ffc07ddc : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc07ddc: 7c 08 02 a6 mflr r0 ffc07de0: 7c 2b 0b 78 mr r11,r1 ffc07de4: 94 21 ff f0 stwu r1,-16(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() ) ffc07de8: 3d 20 00 00 lis r9,0 ffc07dec: 39 29 31 04 addi r9,r9,12548 * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { ffc07df0: 90 01 00 14 stw r0,20(r1) ffc07df4: 48 00 e6 31 bl ffc16424 <_savegpr_31> * 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() ) ffc07df8: 80 09 00 08 lwz r0,8(r9) ffc07dfc: 2f 80 00 00 cmpwi cr7,r0,0 ffc07e00: 40 9e 00 58 bne- cr7,ffc07e58 <== NEVER TAKEN ffc07e04: 3d 60 00 00 lis r11,0 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; ffc07e08: 81 29 00 0c lwz r9,12(r9) ffc07e0c: 81 4b 27 ec lwz r10,10220(r11) ffc07e10: 81 29 01 34 lwz r9,308(r9) ffc07e14: 38 0a 00 01 addi r0,r10,1 ffc07e18: 90 0b 27 ec stw r0,10220(r11) _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc07e1c: 80 09 00 d8 lwz r0,216(r9) */ void pthread_testcancel( void ) { POSIX_API_Control *thread_support; bool cancel = false; ffc07e20: 3b e0 00 00 li r31,0 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && ffc07e24: 2f 80 00 00 cmpwi cr7,r0,0 ffc07e28: 40 9e 00 14 bne- cr7,ffc07e3c <== 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)); ffc07e2c: 80 09 00 e0 lwz r0,224(r9) ffc07e30: 7c 00 00 34 cntlzw r0,r0 ffc07e34: 54 00 d9 7e rlwinm r0,r0,27,5,31 ffc07e38: 68 1f 00 01 xori r31,r0,1 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); ffc07e3c: 48 00 2e 21 bl ffc0ac5c <_Thread_Enable_dispatch> if ( cancel ) ffc07e40: 2f 9f 00 00 cmpwi cr7,r31,0 ffc07e44: 41 be 00 14 beq+ cr7,ffc07e58 _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); ffc07e48: 3d 20 00 00 lis r9,0 ffc07e4c: 80 69 31 10 lwz r3,12560(r9) ffc07e50: 38 80 ff ff li r4,-1 ffc07e54: 48 00 63 2d bl ffc0e180 <_POSIX_Thread_Exit> } ffc07e58: 39 61 00 10 addi r11,r1,16 ffc07e5c: 48 00 e6 14 b ffc16470 <_restgpr_31_x> =============================================================================== ffc08b60 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { ffc08b60: 94 21 ff a8 stwu r1,-88(r1) ffc08b64: 7c 08 02 a6 mflr r0 ffc08b68: bf 21 00 3c stmw r25,60(r1) struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); ffc08b6c: 3f e0 00 00 lis r31,0 ffc08b70: 3b ff 2c 50 addi r31,r31,11344 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { ffc08b74: 7c 7d 1b 78 mr r29,r3 ffc08b78: 90 01 00 5c stw r0,92(r1) struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); ffc08b7c: 7f e3 fb 78 mr r3,r31 ffc08b80: 48 00 0a 4d bl ffc095cc if (result != 0) { ffc08b84: 7c 7e 1b 79 mr. r30,r3 ffc08b88: 41 a2 00 10 beq+ ffc08b98 <== ALWAYS TAKEN free (req); ffc08b8c: 7f a3 eb 78 mr r3,r29 <== NOT EXECUTED ffc08b90: 4b ff c3 cd bl ffc04f5c <== NOT EXECUTED return result; ffc08b94: 48 00 01 e0 b ffc08d74 <== NOT EXECUTED } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); ffc08b98: 48 00 13 1d bl ffc09eb4 ffc08b9c: 38 81 00 0c addi r4,r1,12 ffc08ba0: 38 a1 00 10 addi r5,r1,16 ffc08ba4: 48 00 0e ad bl ffc09a50 req->caller_thread = pthread_self (); ffc08ba8: 48 00 13 0d bl ffc09eb4 req->priority = param.sched_priority - req->aiocbp->aio_reqprio; ffc08bac: 81 3d 00 14 lwz r9,20(r29) ffc08bb0: 81 61 00 10 lwz r11,16(r1) ffc08bb4: 80 09 00 18 lwz r0,24(r9) /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); ffc08bb8: 90 7d 00 10 stw r3,16(r29) req->priority = param.sched_priority - req->aiocbp->aio_reqprio; ffc08bbc: 7c 00 58 50 subf r0,r0,r11 ffc08bc0: 90 1d 00 0c stw r0,12(r29) req->policy = policy; ffc08bc4: 80 01 00 0c lwz r0,12(r1) ffc08bc8: 90 1d 00 08 stw r0,8(r29) req->aiocbp->error_code = EINPROGRESS; ffc08bcc: 38 00 00 77 li r0,119 ffc08bd0: 90 09 00 34 stw r0,52(r9) req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && ffc08bd4: 80 1f 00 68 lwz r0,104(r31) req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; ffc08bd8: 93 c9 00 38 stw r30,56(r9) if ((aio_request_queue.idle_threads == 0) && ffc08bdc: 2f 80 00 00 cmpwi cr7,r0,0 ffc08be0: 40 9e 00 c8 bne- cr7,ffc08ca8 <== NEVER TAKEN ffc08be4: 80 1f 00 64 lwz r0,100(r31) ffc08be8: 2f 80 00 04 cmpwi cr7,r0,4 ffc08bec: 41 bd 00 bc bgt+ cr7,ffc08ca8 aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc08bf0: 80 89 00 00 lwz r4,0(r9) ffc08bf4: 38 7f 00 48 addi r3,r31,72 ffc08bf8: 38 a0 00 01 li r5,1 ffc08bfc: 4b ff fa b9 bl ffc086b4 if (r_chain->new_fd == 1) { ffc08c00: 80 03 00 18 lwz r0,24(r3) if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc08c04: 7c 7c 1b 78 mr r28,r3 ffc08c08: 3b 23 00 08 addi r25,r3,8 if (r_chain->new_fd == 1) { ffc08c0c: 2f 80 00 01 cmpwi cr7,r0,1 ffc08c10: 3b 63 00 1c addi r27,r3,28 ffc08c14: 3b 43 00 20 addi r26,r3,32 ffc08c18: 40 be 00 6c bne+ cr7,ffc08c84 RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); ffc08c1c: 7f a4 eb 78 mr r4,r29 ffc08c20: 7f 23 cb 78 mr r3,r25 ffc08c24: 48 00 26 21 bl ffc0b244 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; ffc08c28: 93 dc 00 18 stw r30,24(r28) pthread_mutex_init (&r_chain->mutex, NULL); ffc08c2c: 38 80 00 00 li r4,0 ffc08c30: 7f 63 db 78 mr r3,r27 ffc08c34: 48 00 08 39 bl ffc0946c pthread_cond_init (&r_chain->cond, NULL); ffc08c38: 38 80 00 00 li r4,0 ffc08c3c: 7f 43 d3 78 mr r3,r26 ffc08c40: 48 00 03 e1 bl ffc09020 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, ffc08c44: 3c a0 ff c1 lis r5,-63 ffc08c48: 38 61 00 08 addi r3,r1,8 ffc08c4c: 38 9f 00 08 addi r4,r31,8 ffc08c50: 38 a5 87 d4 addi r5,r5,-30764 ffc08c54: 7f 86 e3 78 mr r6,r28 ffc08c58: 48 00 0b c1 bl ffc09818 rtems_aio_handle, (void *) r_chain); if (result != 0) { ffc08c5c: 7c 7d 1b 79 mr. r29,r3 ffc08c60: 41 a2 00 14 beq+ ffc08c74 <== ALWAYS TAKEN pthread_mutex_unlock (&aio_request_queue.mutex); ffc08c64: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc08c68: 48 00 0a 09 bl ffc09670 <== NOT EXECUTED return result; ffc08c6c: 7f be eb 78 mr r30,r29 <== NOT EXECUTED ffc08c70: 48 00 01 04 b ffc08d74 <== NOT EXECUTED } ++aio_request_queue.active_threads; ffc08c74: 81 3f 00 64 lwz r9,100(r31) ffc08c78: 38 09 00 01 addi r0,r9,1 ffc08c7c: 90 1f 00 64 stw r0,100(r31) ffc08c80: 48 00 00 e8 b ffc08d68 } else { /* put request in the fd chain it belongs to */ pthread_mutex_lock (&r_chain->mutex); ffc08c84: 7f 63 db 78 mr r3,r27 ffc08c88: 48 00 09 45 bl ffc095cc rtems_aio_insert_prio (&r_chain->perfd, req); ffc08c8c: 7f 23 cb 78 mr r3,r25 ffc08c90: 7f a4 eb 78 mr r4,r29 ffc08c94: 4b ff fd 8d bl ffc08a20 pthread_cond_signal (&r_chain->cond); ffc08c98: 7f 43 d3 78 mr r3,r26 ffc08c9c: 48 00 04 49 bl ffc090e4 pthread_mutex_unlock (&r_chain->mutex); ffc08ca0: 7f 63 db 78 mr r3,r27 ffc08ca4: 48 00 00 48 b ffc08cec else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, ffc08ca8: 3f 80 00 00 lis r28,0 ffc08cac: 80 89 00 00 lwz r4,0(r9) ffc08cb0: 3b 9c 2c 98 addi r28,r28,11416 ffc08cb4: 7f 83 e3 78 mr r3,r28 ffc08cb8: 38 a0 00 00 li r5,0 ffc08cbc: 4b ff f9 f9 bl ffc086b4 req->aiocbp->aio_fildes, 0); if (r_chain != NULL) ffc08cc0: 7c 7f 1b 79 mr. r31,r3 ffc08cc4: 41 82 00 30 beq- ffc08cf4 { pthread_mutex_lock (&r_chain->mutex); ffc08cc8: 3b 9f 00 1c addi r28,r31,28 ffc08ccc: 7f 83 e3 78 mr r3,r28 ffc08cd0: 48 00 08 fd bl ffc095cc rtems_aio_insert_prio (&r_chain->perfd, req); ffc08cd4: 38 7f 00 08 addi r3,r31,8 ffc08cd8: 7f a4 eb 78 mr r4,r29 ffc08cdc: 4b ff fd 45 bl ffc08a20 pthread_cond_signal (&r_chain->cond); ffc08ce0: 38 7f 00 20 addi r3,r31,32 ffc08ce4: 48 00 04 01 bl ffc090e4 pthread_mutex_unlock (&r_chain->mutex); ffc08ce8: 7f 83 e3 78 mr r3,r28 ffc08cec: 48 00 09 85 bl ffc09670 ffc08cf0: 48 00 00 78 b ffc08d68 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc08cf4: 81 3d 00 14 lwz r9,20(r29) ffc08cf8: 38 7c 00 0c addi r3,r28,12 ffc08cfc: 38 a0 00 01 li r5,1 ffc08d00: 80 89 00 00 lwz r4,0(r9) ffc08d04: 4b ff f9 b1 bl ffc086b4 if (r_chain->new_fd == 1) { ffc08d08: 80 03 00 18 lwz r0,24(r3) } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); ffc08d0c: 7c 7c 1b 78 mr r28,r3 ffc08d10: 38 63 00 08 addi r3,r3,8 if (r_chain->new_fd == 1) { ffc08d14: 2f 80 00 01 cmpwi cr7,r0,1 ffc08d18: 40 be 00 2c bne+ cr7,ffc08d44 ffc08d1c: 7f a4 eb 78 mr r4,r29 ffc08d20: 48 00 25 25 bl ffc0b244 <_Chain_Insert> /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; ffc08d24: 93 fc 00 18 stw r31,24(r28) pthread_mutex_init (&r_chain->mutex, NULL); ffc08d28: 38 7c 00 1c addi r3,r28,28 ffc08d2c: 38 80 00 00 li r4,0 ffc08d30: 48 00 07 3d bl ffc0946c pthread_cond_init (&r_chain->cond, NULL); ffc08d34: 38 7c 00 20 addi r3,r28,32 ffc08d38: 38 80 00 00 li r4,0 ffc08d3c: 48 00 02 e5 bl ffc09020 ffc08d40: 48 00 00 0c b ffc08d4c } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); ffc08d44: 7f a4 eb 78 mr r4,r29 ffc08d48: 4b ff fc d9 bl ffc08a20 if (aio_request_queue.idle_threads > 0) ffc08d4c: 3c 60 00 00 lis r3,0 ffc08d50: 38 63 2c 50 addi r3,r3,11344 ffc08d54: 80 03 00 68 lwz r0,104(r3) ffc08d58: 2f 80 00 00 cmpwi cr7,r0,0 ffc08d5c: 40 9d 00 0c ble- cr7,ffc08d68 <== ALWAYS TAKEN pthread_cond_signal (&aio_request_queue.new_req); ffc08d60: 38 63 00 04 addi r3,r3,4 <== NOT EXECUTED ffc08d64: 48 00 03 81 bl ffc090e4 <== NOT EXECUTED } } pthread_mutex_unlock (&aio_request_queue.mutex); ffc08d68: 3c 60 00 00 lis r3,0 ffc08d6c: 38 63 2c 50 addi r3,r3,11344 ffc08d70: 48 00 09 01 bl ffc09670 return 0; } ffc08d74: 39 61 00 58 addi r11,r1,88 ffc08d78: 7f c3 f3 78 mr r3,r30 ffc08d7c: 4b ff 7d a4 b ffc00b20 <_restgpr_25_x> =============================================================================== ffc087d4 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc087d4: 94 21 ff 98 stwu r1,-104(r1) ffc087d8: 7c 08 02 a6 mflr r0 ffc087dc: be 81 00 38 stmw r20,56(r1) struct timespec timeout; AIO_printf ("Chain is empty [WQ], wait for work\n"); pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); ffc087e0: 3f e0 00 00 lis r31,0 ffc087e4: 3b ff 2c 50 addi r31,r31,11344 * NULL - if error */ static void * rtems_aio_handle (void *arg) { ffc087e8: 90 01 00 6c stw r0,108(r1) ffc087ec: 7c 7e 1b 78 mr r30,r3 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); ffc087f0: 3b 81 00 0c addi r28,r1,12 pthread_cond_destroy (&r_chain->cond); free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc087f4: 3a df 00 58 addi r22,r31,88 --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc087f8: 3a ff 00 04 addi r23,r31,4 node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); ffc087fc: 3b 61 00 14 addi r27,r1,20 ffc08800: 3b 01 00 08 addi r24,r1,8 default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; ffc08804: 3b 20 ff ff li r25,-1 req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; req->aiocbp->error_code = 0; ffc08808: 3b 40 00 00 li r26,0 /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); ffc0880c: 3a be 00 1c addi r21,r30,28 ffc08810: 7e a3 ab 78 mr r3,r21 ffc08814: 48 00 0d b9 bl ffc095cc if (result != 0) ffc08818: 7c 74 1b 79 mr. r20,r3 ffc0881c: 40 82 01 f8 bne- ffc08a14 <== NEVER TAKEN } } AIO_printf ("Thread finished\n"); return NULL; } ffc08820: 83 be 00 08 lwz r29,8(r30) RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc08824: 38 1e 00 0c addi r0,r30,12 /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { ffc08828: 7f 9d 00 00 cmpw cr7,r29,r0 ffc0882c: 41 9e 00 cc beq- cr7,ffc088f8 node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); ffc08830: 48 00 16 85 bl ffc09eb4 ffc08834: 7f 04 c3 78 mr r4,r24 ffc08838: 7f 65 db 78 mr r5,r27 ffc0883c: 48 00 12 15 bl ffc09a50 param.sched_priority = req->priority; ffc08840: 80 1d 00 0c lwz r0,12(r29) ffc08844: 90 01 00 14 stw r0,20(r1) pthread_setschedparam (pthread_self(), req->policy, ¶m); ffc08848: 48 00 16 6d bl ffc09eb4 ffc0884c: 7f 65 db 78 mr r5,r27 ffc08850: 80 9d 00 08 lwz r4,8(r29) ffc08854: 48 00 16 71 bl ffc09ec4 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); ffc08858: 7f a3 eb 78 mr r3,r29 ffc0885c: 48 00 29 81 bl ffc0b1dc <_Chain_Extract> rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); ffc08860: 7e a3 ab 78 mr r3,r21 ffc08864: 48 00 0e 0d bl ffc09670 switch (req->aiocbp->aio_lio_opcode) { ffc08868: 81 3d 00 14 lwz r9,20(r29) ffc0886c: 80 09 00 30 lwz r0,48(r9) ffc08870: 2f 80 00 02 cmpwi cr7,r0,2 ffc08874: 41 9e 00 30 beq- cr7,ffc088a4 ffc08878: 2f 80 00 03 cmpwi cr7,r0,3 ffc0887c: 41 9e 00 44 beq- cr7,ffc088c0 <== NEVER TAKEN ffc08880: 2f 80 00 01 cmpwi cr7,r0,1 ffc08884: 40 be 00 4c bne+ cr7,ffc088d0 <== NEVER TAKEN case LIO_READ: AIO_printf ("read\n"); result = pread (req->aiocbp->aio_fildes, ffc08888: 80 69 00 00 lwz r3,0(r9) ffc0888c: 80 89 00 10 lwz r4,16(r9) ffc08890: 80 a9 00 14 lwz r5,20(r9) ffc08894: 80 e9 00 08 lwz r7,8(r9) ffc08898: 81 09 00 0c lwz r8,12(r9) ffc0889c: 48 00 b8 3d bl ffc140d8 (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; ffc088a0: 48 00 00 28 b ffc088c8 case LIO_WRITE: AIO_printf ("write\n"); result = pwrite (req->aiocbp->aio_fildes, ffc088a4: 80 69 00 00 lwz r3,0(r9) ffc088a8: 80 89 00 10 lwz r4,16(r9) ffc088ac: 80 a9 00 14 lwz r5,20(r9) ffc088b0: 80 e9 00 08 lwz r7,8(r9) ffc088b4: 81 09 00 0c lwz r8,12(r9) ffc088b8: 48 00 b9 59 bl ffc14210 (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; ffc088bc: 48 00 00 0c b ffc088c8 case LIO_SYNC: AIO_printf ("sync\n"); result = fsync (req->aiocbp->aio_fildes); ffc088c0: 80 69 00 00 lwz r3,0(r9) <== NOT EXECUTED ffc088c4: 48 00 70 cd bl ffc0f990 <== NOT EXECUTED break; default: result = -1; } if (result == -1) { ffc088c8: 2f 83 ff ff cmpwi cr7,r3,-1 ffc088cc: 40 be 00 1c bne+ cr7,ffc088e8 <== ALWAYS TAKEN req->aiocbp->return_value = -1; ffc088d0: 83 bd 00 14 lwz r29,20(r29) <== NOT EXECUTED ffc088d4: 93 3d 00 38 stw r25,56(r29) <== NOT EXECUTED req->aiocbp->error_code = errno; ffc088d8: 48 00 a8 9d bl ffc13174 <__errno> <== NOT EXECUTED ffc088dc: 80 03 00 00 lwz r0,0(r3) <== NOT EXECUTED ffc088e0: 90 1d 00 34 stw r0,52(r29) <== NOT EXECUTED ffc088e4: 4b ff ff 28 b ffc0880c <== NOT EXECUTED } else { req->aiocbp->return_value = result; ffc088e8: 81 3d 00 14 lwz r9,20(r29) ffc088ec: 90 69 00 38 stw r3,56(r9) req->aiocbp->error_code = 0; ffc088f0: 93 49 00 34 stw r26,52(r9) ffc088f4: 4b ff ff 18 b ffc0880c struct timespec timeout; AIO_printf ("Chain is empty [WQ], wait for work\n"); pthread_mutex_unlock (&r_chain->mutex); ffc088f8: 7e a3 ab 78 mr r3,r21 ffc088fc: 48 00 0d 75 bl ffc09670 pthread_mutex_lock (&aio_request_queue.mutex); ffc08900: 7f e3 fb 78 mr r3,r31 ffc08904: 48 00 0c c9 bl ffc095cc if (rtems_chain_is_empty (chain)) ffc08908: 80 1e 00 08 lwz r0,8(r30) ffc0890c: 7f 80 e8 00 cmpw cr7,r0,r29 ffc08910: 40 be 00 f8 bne+ cr7,ffc08a08 <== NEVER TAKEN { clock_gettime (CLOCK_REALTIME, &timeout); ffc08914: 7f 84 e3 78 mr r4,r28 ffc08918: 38 60 00 01 li r3,1 ffc0891c: 48 00 05 a5 bl ffc08ec0 timeout.tv_sec += 3; ffc08920: 81 21 00 0c lwz r9,12(r1) timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, ffc08924: 3b be 00 20 addi r29,r30,32 if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; ffc08928: 92 81 00 10 stw r20,16(r1) pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc0892c: 38 09 00 03 addi r0,r9,3 timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, ffc08930: 7f a3 eb 78 mr r3,r29 pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc08934: 90 01 00 0c stw r0,12(r1) timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, ffc08938: 7f e4 fb 78 mr r4,r31 ffc0893c: 7f 85 e3 78 mr r5,r28 ffc08940: 48 00 08 41 bl ffc09180 &aio_request_queue.mutex, &timeout); /* If no requests were added to the chain we delete the fd chain from the queue and start working with idle fd chains */ if (result == ETIMEDOUT) { ffc08944: 2f 83 00 74 cmpwi cr7,r3,116 ffc08948: 40 be 00 c0 bne+ cr7,ffc08a08 <== NEVER TAKEN ffc0894c: 7f c3 f3 78 mr r3,r30 ffc08950: 48 00 28 8d bl ffc0b1dc <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); ffc08954: 7e a3 ab 78 mr r3,r21 ffc08958: 48 00 09 a9 bl ffc09300 pthread_cond_destroy (&r_chain->cond); ffc0895c: 7f a3 eb 78 mr r3,r29 ffc08960: 48 00 05 d9 bl ffc08f38 free (r_chain); ffc08964: 7f c3 f3 78 mr r3,r30 ffc08968: 4b ff c5 f5 bl ffc04f5c /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { ffc0896c: 80 1f 00 54 lwz r0,84(r31) ffc08970: 7f 80 b0 00 cmpw cr7,r0,r22 ffc08974: 40 be 00 68 bne+ cr7,ffc089dc AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; ffc08978: 81 3f 00 68 lwz r9,104(r31) --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); ffc0897c: 7f 84 e3 78 mr r4,r28 ffc08980: 38 60 00 01 li r3,1 /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; ffc08984: 38 09 00 01 addi r0,r9,1 --aio_request_queue.active_threads; ffc08988: 81 3f 00 64 lwz r9,100(r31) /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; ffc0898c: 90 1f 00 68 stw r0,104(r31) --aio_request_queue.active_threads; ffc08990: 38 09 ff ff addi r0,r9,-1 ffc08994: 90 1f 00 64 stw r0,100(r31) clock_gettime (CLOCK_REALTIME, &timeout); ffc08998: 48 00 05 29 bl ffc08ec0 timeout.tv_sec += 3; ffc0899c: 81 21 00 0c lwz r9,12(r1) timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc089a0: 7e e3 bb 78 mr r3,r23 ++aio_request_queue.idle_threads; --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; ffc089a4: 92 81 00 10 stw r20,16(r1) AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc089a8: 38 09 00 03 addi r0,r9,3 timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc089ac: 7f e4 fb 78 mr r4,r31 AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; ffc089b0: 90 01 00 0c stw r0,12(r1) timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, ffc089b4: 7f 85 e3 78 mr r5,r28 ffc089b8: 48 00 07 c9 bl ffc09180 &aio_request_queue.mutex, &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { ffc089bc: 2f 83 00 74 cmpwi cr7,r3,116 ffc089c0: 40 be 00 1c bne+ cr7,ffc089dc <== NEVER TAKEN AIO_printf ("Etimeout\n"); --aio_request_queue.idle_threads; ffc089c4: 81 3f 00 68 lwz r9,104(r31) pthread_mutex_unlock (&aio_request_queue.mutex); ffc089c8: 7f e3 fb 78 mr r3,r31 /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { AIO_printf ("Etimeout\n"); --aio_request_queue.idle_threads; ffc089cc: 38 09 ff ff addi r0,r9,-1 ffc089d0: 90 1f 00 68 stw r0,104(r31) pthread_mutex_unlock (&aio_request_queue.mutex); ffc089d4: 48 00 0c 9d bl ffc09670 return NULL; ffc089d8: 48 00 00 3c b ffc08a14 } } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; ffc089dc: 81 3f 00 68 lwz r9,104(r31) } } AIO_printf ("Thread finished\n"); return NULL; } ffc089e0: 83 df 00 54 lwz r30,84(r31) } } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; ffc089e4: 38 09 ff ff addi r0,r9,-1 ++aio_request_queue.active_threads; ffc089e8: 81 3f 00 64 lwz r9,100(r31) } } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; ffc089ec: 90 1f 00 68 stw r0,104(r31) ffc089f0: 7f c3 f3 78 mr r3,r30 ++aio_request_queue.active_threads; ffc089f4: 38 09 00 01 addi r0,r9,1 ffc089f8: 90 1f 00 64 stw r0,100(r31) ffc089fc: 48 00 27 e1 bl ffc0b1dc <_Chain_Extract> node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = (rtems_aio_request_chain *) node; rtems_aio_move_to_work (r_chain); ffc08a00: 7f c3 f3 78 mr r3,r30 ffc08a04: 4b ff fd 79 bl ffc0877c } } /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); ffc08a08: 7f e3 fb 78 mr r3,r31 ffc08a0c: 48 00 0c 65 bl ffc09670 ffc08a10: 4b ff fd fc b ffc0880c } } AIO_printf ("Thread finished\n"); return NULL; } ffc08a14: 39 61 00 68 addi r11,r1,104 ffc08a18: 38 60 00 00 li r3,0 ffc08a1c: 4b ff 80 f0 b ffc00b0c <_restgpr_20_x> =============================================================================== ffc085d0 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { ffc085d0: 94 21 ff f0 stwu r1,-16(r1) ffc085d4: 7c 08 02 a6 mflr r0 ffc085d8: bf c1 00 08 stmw r30,8(r1) int result = 0; result = pthread_attr_init (&aio_request_queue.attr); ffc085dc: 3f e0 00 00 lis r31,0 ffc085e0: 3b ff 2c 58 addi r31,r31,11352 ffc085e4: 7f e3 fb 78 mr r3,r31 * 0 - if initialization succeeded */ int rtems_aio_init (void) { ffc085e8: 90 01 00 14 stw r0,20(r1) int result = 0; result = pthread_attr_init (&aio_request_queue.attr); ffc085ec: 48 00 11 bd bl ffc097a8 if (result != 0) ffc085f0: 7c 7e 1b 79 mr. r30,r3 ffc085f4: 40 a2 00 b4 bne+ ffc086a8 <== NEVER TAKEN return result; result = ffc085f8: 7f e3 fb 78 mr r3,r31 ffc085fc: 38 80 00 00 li r4,0 ffc08600: 48 00 11 e9 bl ffc097e8 pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) ffc08604: 2f 83 00 00 cmpwi cr7,r3,0 ffc08608: 41 be 00 0c beq+ cr7,ffc08614 <== ALWAYS TAKEN pthread_attr_destroy (&aio_request_queue.attr); ffc0860c: 7f e3 fb 78 mr r3,r31 <== NOT EXECUTED ffc08610: 48 00 11 71 bl ffc09780 <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); ffc08614: 3f e0 00 00 lis r31,0 ffc08618: 3b ff 2c 50 addi r31,r31,11344 ffc0861c: 7f e3 fb 78 mr r3,r31 ffc08620: 38 80 00 00 li r4,0 ffc08624: 48 00 0e 49 bl ffc0946c if (result != 0) ffc08628: 2f 83 00 00 cmpwi cr7,r3,0 ffc0862c: 41 be 00 0c beq+ cr7,ffc08638 <== ALWAYS TAKEN pthread_attr_destroy (&aio_request_queue.attr); ffc08630: 38 7f 00 08 addi r3,r31,8 <== NOT EXECUTED ffc08634: 48 00 11 4d bl ffc09780 <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); ffc08638: 3f e0 00 00 lis r31,0 ffc0863c: 3b ff 2c 54 addi r31,r31,11348 ffc08640: 7f e3 fb 78 mr r3,r31 ffc08644: 38 80 00 00 li r4,0 ffc08648: 48 00 09 d9 bl ffc09020 if (result != 0) { ffc0864c: 7c 7e 1b 79 mr. r30,r3 ffc08650: 41 a2 00 14 beq+ ffc08664 <== ALWAYS TAKEN pthread_mutex_destroy (&aio_request_queue.mutex); ffc08654: 38 7f ff fc addi r3,r31,-4 <== NOT EXECUTED ffc08658: 48 00 0c a9 bl ffc09300 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); ffc0865c: 38 7f 00 04 addi r3,r31,4 <== NOT EXECUTED ffc08660: 48 00 11 21 bl ffc09780 <== NOT EXECUTED ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc08664: 3d 20 00 00 lis r9,0 ffc08668: 39 29 2c 50 addi r9,r9,11344 ffc0866c: 38 09 00 4c addi r0,r9,76 head->previous = NULL; tail->previous = head; ffc08670: 39 69 00 48 addi r11,r9,72 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc08674: 90 09 00 48 stw r0,72(r9) head->previous = NULL; ffc08678: 38 00 00 00 li r0,0 tail->previous = head; ffc0867c: 91 69 00 50 stw r11,80(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc08680: 39 69 00 58 addi r11,r9,88 head->previous = NULL; ffc08684: 90 09 00 4c stw r0,76(r9) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; ffc08688: 91 69 00 54 stw r11,84(r9) head->previous = NULL; tail->previous = head; ffc0868c: 39 69 00 54 addi r11,r9,84 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; ffc08690: 90 09 00 58 stw r0,88(r9) } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; ffc08694: 90 09 00 64 stw r0,100(r9) aio_request_queue.idle_threads = 0; ffc08698: 90 09 00 68 stw r0,104(r9) aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; ffc0869c: 60 00 b0 0b ori r0,r0,45067 tail->previous = head; ffc086a0: 91 69 00 5c stw r11,92(r9) ffc086a4: 90 09 00 60 stw r0,96(r9) return result; } ffc086a8: 39 61 00 10 addi r11,r1,16 ffc086ac: 7f c3 f3 78 mr r3,r30 ffc086b0: 4b ff 84 84 b ffc00b34 <_restgpr_30_x> =============================================================================== ffc08a20 : * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { ffc08a20: 94 21 ff f8 stwu r1,-8(r1) ffc08a24: 7c 08 02 a6 mflr r0 ffc08a28: 7c 8b 23 78 mr r11,r4 ffc08a2c: 90 01 00 0c stw r0,12(r1) ffc08a30: 38 03 00 04 addi r0,r3,4 } } AIO_printf ("Thread finished\n"); return NULL; } ffc08a34: 81 23 00 00 lwz r9,0(r3) rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { ffc08a38: 7f 89 00 00 cmpw cr7,r9,r0 ffc08a3c: 41 9e 00 3c beq- cr7,ffc08a78 <== NEVER TAKEN AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; ffc08a40: 81 49 00 14 lwz r10,20(r9) while (req->aiocbp->aio_reqprio > prio && ffc08a44: 81 04 00 14 lwz r8,20(r4) if (rtems_chain_is_empty (chain)) { AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; ffc08a48: 81 4a 00 18 lwz r10,24(r10) while (req->aiocbp->aio_reqprio > prio && ffc08a4c: 81 08 00 18 lwz r8,24(r8) ffc08a50: 48 00 00 10 b ffc08a60 } } AIO_printf ("Thread finished\n"); return NULL; } ffc08a54: 81 29 00 00 lwz r9,0(r9) <== NOT EXECUTED int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; ffc08a58: 81 49 00 14 lwz r10,20(r9) <== NOT EXECUTED ffc08a5c: 81 4a 00 18 lwz r10,24(r10) <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && ffc08a60: 7f 88 50 00 cmpw cr7,r8,r10 ffc08a64: 40 9d 00 0c ble- cr7,ffc08a70 <== ALWAYS TAKEN ffc08a68: 7f 89 00 00 cmpw cr7,r9,r0 ffc08a6c: 40 9e ff e8 bne+ cr7,ffc08a54 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); ffc08a70: 80 69 00 04 lwz r3,4(r9) ffc08a74: 7d 64 5b 78 mr r4,r11 ffc08a78: 48 00 27 cd bl ffc0b244 <_Chain_Insert> } rtems_chain_insert (node->previous, &req->next_prio); } } ffc08a7c: 80 01 00 0c lwz r0,12(r1) ffc08a80: 38 21 00 08 addi r1,r1,8 ffc08a84: 7c 08 03 a6 mtlr r0 ffc08a88: 4e 80 00 20 blr =============================================================================== ffc0877c : * NONE */ void rtems_aio_move_to_work (rtems_aio_request_chain *r_chain) { ffc0877c: 94 21 ff f8 stwu r1,-8(r1) ffc08780: 7c 08 02 a6 mflr r0 } } AIO_printf ("Thread finished\n"); return NULL; } ffc08784: 3d 60 00 00 lis r11,0 * NONE */ void rtems_aio_move_to_work (rtems_aio_request_chain *r_chain) { ffc08788: 90 01 00 0c stw r0,12(r1) } } AIO_printf ("Thread finished\n"); return NULL; } ffc0878c: 39 6b 2c 50 addi r11,r11,11344 * NONE */ void rtems_aio_move_to_work (rtems_aio_request_chain *r_chain) { ffc08790: 7c 64 1b 78 mr r4,r3 } } AIO_printf ("Thread finished\n"); return NULL; } ffc08794: 81 2b 00 48 lwz r9,72(r11) rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && ffc08798: 39 6b 00 4c addi r11,r11,76 ffc0879c: 80 03 00 14 lwz r0,20(r3) ffc087a0: 48 00 00 08 b ffc087a8 } } AIO_printf ("Thread finished\n"); return NULL; } ffc087a4: 81 29 00 00 lwz r9,0(r9) rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && ffc087a8: 81 49 00 14 lwz r10,20(r9) ffc087ac: 7f 8a 00 00 cmpw cr7,r10,r0 ffc087b0: 40 9c 00 0c bge- cr7,ffc087bc ffc087b4: 7f 89 58 00 cmpw cr7,r9,r11 ffc087b8: 40 9e ff ec bne+ cr7,ffc087a4 <== ALWAYS TAKEN ffc087bc: 80 69 00 04 lwz r3,4(r9) ffc087c0: 48 00 2a 85 bl ffc0b244 <_Chain_Insert> node = rtems_chain_next (node); temp = (rtems_aio_request_chain *) node; } rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd); } ffc087c4: 80 01 00 0c lwz r0,12(r1) ffc087c8: 38 21 00 08 addi r1,r1,8 ffc087cc: 7c 08 03 a6 mtlr r0 ffc087d0: 4e 80 00 20 blr =============================================================================== ffc08ae4 : * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { ffc08ae4: 7c 08 02 a6 mflr r0 ffc08ae8: 7c 2b 0b 78 mr r11,r1 ffc08aec: 94 21 ff f0 stwu r1,-16(r1) ffc08af0: 90 01 00 14 stw r0,20(r1) ffc08af4: 4b ff 7f f9 bl ffc00aec <_savegpr_31> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); ffc08af8: 38 03 00 04 addi r0,r3,4 } } AIO_printf ("Thread finished\n"); return NULL; } ffc08afc: 83 e3 00 00 lwz r31,0(r3) */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) return AIO_ALLDONE; ffc08b00: 38 60 00 02 li r3,2 * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) ffc08b04: 7f 9f 00 00 cmpw cr7,r31,r0 ffc08b08: 40 be 00 14 bne+ cr7,ffc08b1c ffc08b0c: 48 00 00 4c b ffc08b58 } } AIO_printf ("Thread finished\n"); return NULL; } ffc08b10: 83 e3 00 00 lwz r31,0(r3) <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { ffc08b14: 7f 9f 00 00 cmpw cr7,r31,r0 <== NOT EXECUTED ffc08b18: 41 9e 00 3c beq- cr7,ffc08b54 <== NOT EXECUTED ffc08b1c: 81 3f 00 14 lwz r9,20(r31) node = rtems_chain_next (node); current = (rtems_aio_request *) node; ffc08b20: 7f e3 fb 78 mr r3,r31 rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { ffc08b24: 7f 89 20 00 cmpw cr7,r9,r4 ffc08b28: 40 9e ff e8 bne+ cr7,ffc08b10 <== NEVER TAKEN ffc08b2c: 48 00 26 b1 bl ffc0b1dc <_Chain_Extract> if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; ffc08b30: 81 3f 00 14 lwz r9,20(r31) ffc08b34: 38 00 00 8c li r0,140 ffc08b38: 90 09 00 34 stw r0,52(r9) current->aiocbp->return_value = -1; ffc08b3c: 38 00 ff ff li r0,-1 free (current); ffc08b40: 7f e3 fb 78 mr r3,r31 return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; ffc08b44: 90 09 00 38 stw r0,56(r9) free (current); ffc08b48: 4b ff c4 15 bl ffc04f5c } return AIO_CANCELED; ffc08b4c: 38 60 00 00 li r3,0 ffc08b50: 48 00 00 08 b ffc08b58 node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; ffc08b54: 38 60 00 01 li r3,1 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } ffc08b58: 39 61 00 10 addi r11,r1,16 ffc08b5c: 4b ff 7f dc b ffc00b38 <_restgpr_31_x> =============================================================================== ffc08634 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc08634: 94 21 ff f0 stwu r1,-16(r1) ffc08638: 7c 08 02 a6 mflr r0 ffc0863c: bf c1 00 08 stmw r30,8(r1) ffc08640: 7c bf 2b 78 mr r31,r5 ffc08644: 7c de 33 78 mr r30,r6 ffc08648: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); ffc0864c: 48 00 06 45 bl ffc08c90 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc08650: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc08654: 38 00 00 00 li r0,0 bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { ffc08658: 41 be 00 14 beq+ cr7,ffc0866c <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc0865c: 7f e3 fb 78 mr r3,r31 ffc08660: 7f c4 f3 78 mr r4,r30 ffc08664: 4b ff f4 dd bl ffc07b40 ffc08668: 7c 60 1b 78 mr r0,r3 } return sc; } ffc0866c: 39 61 00 10 addi r11,r1,16 ffc08670: 7c 03 03 78 mr r3,r0 ffc08674: 48 00 d4 44 b ffc15ab8 <_restgpr_30_x> =============================================================================== ffc086c0 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { ffc086c0: 94 21 ff d0 stwu r1,-48(r1) ffc086c4: 7c 08 02 a6 mflr r0 ffc086c8: bf 41 00 18 stmw r26,24(r1) ffc086cc: 7c 7a 1b 78 mr r26,r3 ffc086d0: 7c 9b 23 78 mr r27,r4 ffc086d4: 90 01 00 34 stw r0,52(r1) ffc086d8: 7c bc 2b 78 mr r28,r5 ffc086dc: 7c df 33 78 mr r31,r6 while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( ffc086e0: 3b a1 00 08 addi r29,r1,8 ffc086e4: 48 00 00 20 b ffc08704 ffc086e8: 7f 63 db 78 mr r3,r27 ffc086ec: 38 80 00 00 li r4,0 ffc086f0: 7f 85 e3 78 mr r5,r28 ffc086f4: 7f a6 eb 78 mr r6,r29 ffc086f8: 4b ff f2 b1 bl ffc079a8 ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( ffc086fc: 2c 03 00 00 cmpwi r3,0 ffc08700: 40 82 00 18 bne- ffc08718 <== ALWAYS TAKEN */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); ffc08704: 7f 43 d3 78 mr r3,r26 ffc08708: 48 00 06 79 bl ffc08d80 <_Chain_Get> sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ffc0870c: 7c 7e 1b 79 mr. r30,r3 ffc08710: 41 82 ff d8 beq+ ffc086e8 ffc08714: 38 60 00 00 li r3,0 } *node_ptr = node; return sc; } ffc08718: 39 61 00 30 addi r11,r1,48 timeout, &out ); } *node_ptr = node; ffc0871c: 93 df 00 00 stw r30,0(r31) return sc; } ffc08720: 48 00 d3 88 b ffc15aa8 <_restgpr_26_x> =============================================================================== ffc08724 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { ffc08724: 94 21 ff f0 stwu r1,-16(r1) ffc08728: 7c 08 02 a6 mflr r0 ffc0872c: bf c1 00 08 stmw r30,8(r1) ffc08730: 7c bf 2b 78 mr r31,r5 ffc08734: 7c de 33 78 mr r30,r6 ffc08738: 90 01 00 14 stw r0,20(r1) RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); ffc0873c: 48 00 06 b1 bl ffc08dec <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc08740: 2f 83 00 00 cmpwi cr7,r3,0 rtems_chain_node *node, rtems_id task, rtems_event_set events ) { rtems_status_code sc = RTEMS_SUCCESSFUL; ffc08744: 38 00 00 00 li r0,0 bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { ffc08748: 41 be 00 14 beq+ cr7,ffc0875c <== NEVER TAKEN sc = rtems_event_send( task, events ); ffc0874c: 7f e3 fb 78 mr r3,r31 ffc08750: 7f c4 f3 78 mr r4,r30 ffc08754: 4b ff f3 ed bl ffc07b40 ffc08758: 7c 60 1b 78 mr r0,r3 } return sc; } ffc0875c: 39 61 00 10 addi r11,r1,16 ffc08760: 7c 03 03 78 mr r3,r0 ffc08764: 48 00 d3 54 b ffc15ab8 <_restgpr_30_x> =============================================================================== ffc09218 : 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 ) { ffc09218: 7c 08 02 a6 mflr r0 ffc0921c: 7c 2b 0b 78 mr r11,r1 ffc09220: 94 21 ff f0 stwu r1,-16(r1) rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc09224: 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 ) { ffc09228: 90 01 00 14 stw r0,20(r1) ffc0922c: 48 00 ff 9d bl ffc191c8 <_savegpr_31> ffc09230: 7c 7f 1b 78 mr r31,r3 rtems_device_major_number major_limit = _IO_Number_of_drivers; ffc09234: 80 09 28 18 lwz r0,10264(r9) if ( rtems_interrupt_is_in_progress() ) ffc09238: 3d 20 00 00 lis r9,0 ffc0923c: 81 29 31 cc lwz r9,12748(r9) return RTEMS_CALLED_FROM_ISR; ffc09240: 38 60 00 12 li r3,18 rtems_device_major_number *registered_major ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) ffc09244: 2f 89 00 00 cmpwi cr7,r9,0 ffc09248: 40 9e 01 14 bne- cr7,ffc0935c return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc0924c: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc09250: 38 60 00 09 li r3,9 rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) ffc09254: 41 9e 01 08 beq- cr7,ffc0935c return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; if ( driver_table == NULL ) ffc09258: 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; ffc0925c: 90 05 00 00 stw r0,0(r5) if ( driver_table == NULL ) ffc09260: 41 9e 00 fc beq- cr7,ffc0935c static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; ffc09264: 81 24 00 00 lwz r9,0(r4) ffc09268: 2f 89 00 00 cmpwi cr7,r9,0 ffc0926c: 40 be 00 f8 bne+ cr7,ffc09364 ffc09270: 81 24 00 04 lwz r9,4(r4) ffc09274: 2f 89 00 00 cmpwi cr7,r9,0 ffc09278: 40 be 00 ec bne+ cr7,ffc09364 ffc0927c: 48 00 00 e0 b ffc0935c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc09280: 3d 20 00 00 lis r9,0 ffc09284: 81 69 27 c4 lwz r11,10180(r9) ffc09288: 38 0b 00 01 addi r0,r11,1 ffc0928c: 90 09 27 c4 stw r0,10180(r9) if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { ffc09290: 2f 9f 00 00 cmpwi cr7,r31,0 ffc09294: 3d 20 00 00 lis r9,0 ffc09298: 40 9e 00 58 bne- cr7,ffc092f0 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; ffc0929c: 3d 60 00 00 lis r11,0 ffc092a0: 81 29 28 1c lwz r9,10268(r9) ffc092a4: 81 6b 28 18 lwz r11,10264(r11) ffc092a8: 2f 8b 00 00 cmpwi cr7,r11,0 ffc092ac: 38 0b 00 01 addi r0,r11,1 ffc092b0: 40 be 00 28 bne+ cr7,ffc092d8 <== ALWAYS TAKEN ffc092b4: 38 00 00 01 li r0,1 <== NOT EXECUTED ffc092b8: 48 00 00 20 b ffc092d8 <== 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; ffc092bc: 81 49 00 00 lwz r10,0(r9) ffc092c0: 2f 8a 00 00 cmpwi cr7,r10,0 ffc092c4: 40 be 00 b0 bne+ cr7,ffc09374 ffc092c8: 81 49 00 04 lwz r10,4(r9) ffc092cc: 2f 8a 00 00 cmpwi cr7,r10,0 ffc092d0: 40 be 00 a4 bne+ cr7,ffc09374 ffc092d4: 48 00 00 0c b ffc092e0 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 ) { ffc092d8: 34 00 ff ff addic. r0,r0,-1 ffc092dc: 40 82 ff e0 bne+ ffc092bc } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) ffc092e0: 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; ffc092e4: 93 e5 00 00 stw r31,0(r5) if ( m != n ) ffc092e8: 40 be 00 48 bne+ cr7,ffc09330 ffc092ec: 48 00 00 94 b ffc09380 _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; ffc092f0: 1c 1f 00 18 mulli r0,r31,24 ffc092f4: 81 29 28 1c lwz r9,10268(r9) ffc092f8: 7d 69 02 14 add r11,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; ffc092fc: 7d 29 00 2e lwzx r9,r9,r0 ffc09300: 38 00 00 00 li r0,0 ffc09304: 2f 89 00 00 cmpwi cr7,r9,0 ffc09308: 40 be 00 10 bne+ cr7,ffc09318 return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; } rtems_status_code rtems_io_register_driver( ffc0930c: 80 0b 00 04 lwz r0,4(r11) ffc09310: 7c 00 00 34 cntlzw r0,r0 ffc09314: 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 ) ) { ffc09318: 2f 80 00 00 cmpwi cr7,r0,0 ffc0931c: 40 9e 00 10 bne- cr7,ffc0932c _Thread_Enable_dispatch(); ffc09320: 48 00 20 25 bl ffc0b344 <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; ffc09324: 38 60 00 0c li r3,12 ffc09328: 48 00 00 34 b ffc0935c } *registered_major = major; ffc0932c: 93 e5 00 00 stw r31,0(r5) } _IO_Driver_address_table [major] = *driver_table; ffc09330: 3d 20 00 00 lis r9,0 ffc09334: 81 69 28 1c lwz r11,10268(r9) ffc09338: 1c 1f 00 18 mulli r0,r31,24 ffc0933c: 7d 6b 02 14 add r11,r11,r0 ffc09340: 7c a4 c4 aa lswi r5,r4,24 ffc09344: 7c ab c5 aa stswi r5,r11,24 _Thread_Enable_dispatch(); ffc09348: 48 00 1f fd bl ffc0b344 <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); ffc0934c: 7f e3 fb 78 mr r3,r31 ffc09350: 38 80 00 00 li r4,0 ffc09354: 38 a0 00 00 li r5,0 ffc09358: 48 00 88 29 bl ffc11b80 } ffc0935c: 39 61 00 10 addi r11,r1,16 ffc09360: 48 00 fe b4 b ffc19214 <_restgpr_31_x> return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc09364: 7f 9f 00 40 cmplw cr7,r31,r0 return RTEMS_INVALID_NUMBER; ffc09368: 38 60 00 0a li r3,10 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) ffc0936c: 41 9c ff 14 blt+ cr7,ffc09280 ffc09370: 4b ff ff ec b ffc0935c 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 ) { ffc09374: 3b ff 00 01 addi r31,r31,1 ffc09378: 39 29 00 18 addi r9,r9,24 ffc0937c: 4b ff ff 5c b ffc092d8 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); ffc09380: 48 00 1f c5 bl ffc0b344 <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; ffc09384: 38 60 00 05 li r3,5 if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); return sc; ffc09388: 4b ff ff d4 b ffc0935c =============================================================================== ffc0abfc : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0abfc: 94 21 ff e0 stwu r1,-32(r1) ffc0ac00: 7c 08 02 a6 mflr r0 ffc0ac04: bf 61 00 0c stmw r27,12(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0ac08: 7c 7b 1b 79 mr. r27,r3 #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { ffc0ac0c: 90 01 00 24 stw r0,36(r1) uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) ffc0ac10: 41 82 00 5c beq- ffc0ac6c <== NEVER TAKEN ffc0ac14: 3f e0 00 01 lis r31,1 ffc0ac18: 3b ff aa 40 addi r31,r31,-21952 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) ffc0ac1c: 3b 9f 00 0c addi r28,r31,12 #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0ac20: 85 3f 00 04 lwzu r9,4(r31) if ( !information ) ffc0ac24: 3b c0 00 01 li r30,1 #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; ffc0ac28: 83 a9 00 04 lwz r29,4(r9) if ( !information ) ffc0ac2c: 2f 9d 00 00 cmpwi cr7,r29,0 ffc0ac30: 40 be 00 28 bne+ cr7,ffc0ac58 ffc0ac34: 48 00 00 30 b ffc0ac64 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; ffc0ac38: 81 3d 00 1c lwz r9,28(r29) ffc0ac3c: 57 c0 10 3a rlwinm r0,r30,2,0,29 ffc0ac40: 7c 69 00 2e lwzx r3,r9,r0 if ( !the_thread ) ffc0ac44: 2f 83 00 00 cmpwi cr7,r3,0 ffc0ac48: 41 9e 00 0c beq- cr7,ffc0ac54 continue; (*routine)(the_thread); ffc0ac4c: 7f 69 03 a6 mtctr r27 ffc0ac50: 4e 80 04 21 bctrl information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { ffc0ac54: 3b de 00 01 addi r30,r30,1 ffc0ac58: a0 1d 00 10 lhz r0,16(r29) ffc0ac5c: 7f 9e 00 40 cmplw cr7,r30,r0 ffc0ac60: 40 9d ff d8 ble+ cr7,ffc0ac38 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { ffc0ac64: 7f 9f e0 00 cmpw cr7,r31,r28 ffc0ac68: 40 9e ff b8 bne+ cr7,ffc0ac20 (*routine)(the_thread); } } } ffc0ac6c: 39 61 00 20 addi r11,r1,32 ffc0ac70: 4b ff 66 d0 b ffc01340 <_restgpr_27_x> =============================================================================== ffc164d8 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc164d8: 94 21 ff d0 stwu r1,-48(r1) ffc164dc: 7c 08 02 a6 mflr r0 ffc164e0: bf 21 00 14 stmw r25,20(r1) register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc164e4: 7c 7b 1b 79 mr. r27,r3 uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { ffc164e8: 7c bf 2b 78 mr r31,r5 ffc164ec: 90 01 00 34 stw r0,52(r1) ffc164f0: 7c fa 3b 78 mr r26,r7 ffc164f4: 7d 1d 43 78 mr r29,r8 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; ffc164f8: 38 00 00 03 li r0,3 rtems_id *id ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) ffc164fc: 41 82 00 cc beq- ffc165c8 return RTEMS_INVALID_NAME; if ( !starting_address ) ffc16500: 2f 84 00 00 cmpwi cr7,r4,0 return RTEMS_INVALID_ADDRESS; ffc16504: 38 00 00 09 li r0,9 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !starting_address ) ffc16508: 41 9e 00 c0 beq- cr7,ffc165c8 return RTEMS_INVALID_ADDRESS; if ( !id ) ffc1650c: 2f 88 00 00 cmpwi cr7,r8,0 ffc16510: 41 9e 00 b8 beq- cr7,ffc165c8 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc16514: 2f 85 00 00 cmpwi cr7,r5,0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; ffc16518: 38 00 00 08 li r0,8 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || ffc1651c: 41 9e 00 ac beq- cr7,ffc165c8 ffc16520: 2f 86 00 00 cmpwi cr7,r6,0 ffc16524: 41 9e 00 a4 beq- cr7,ffc165c8 ffc16528: 7f 85 30 40 cmplw cr7,r5,r6 ffc1652c: 41 9c 00 9c blt- cr7,ffc165c8 ffc16530: 70 c9 00 07 andi. r9,r6,7 ffc16534: 40 82 00 94 bne- ffc165c8 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc16538: 70 99 00 07 andi. r25,r4,7 return RTEMS_INVALID_ADDRESS; ffc1653c: 38 00 00 09 li r0,9 if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) ffc16540: 40 a2 00 88 bne+ ffc165c8 ffc16544: 3d 20 00 00 lis r9,0 ffc16548: 81 69 28 a0 lwz r11,10400(r9) ffc1654c: 38 0b 00 01 addi r0,r11,1 ffc16550: 90 09 28 a0 stw r0,10400(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 ); ffc16554: 3f 80 00 00 lis r28,0 ffc16558: 90 81 00 08 stw r4,8(r1) ffc1655c: 3b 9c 6e e0 addi r28,r28,28384 ffc16560: 7f 83 e3 78 mr r3,r28 ffc16564: 90 c1 00 0c stw r6,12(r1) ffc16568: 48 00 4e b9 bl ffc1b420 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { ffc1656c: 7c 7e 1b 79 mr. r30,r3 ffc16570: 80 81 00 08 lwz r4,8(r1) ffc16574: 80 c1 00 0c lwz r6,12(r1) ffc16578: 40 a2 00 10 bne+ ffc16588 _Thread_Enable_dispatch(); ffc1657c: 48 00 60 f9 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; ffc16580: 38 00 00 05 li r0,5 ffc16584: 48 00 00 44 b ffc165c8 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, ffc16588: 7c bf 33 96 divwu r5,r31,r6 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; ffc1658c: 90 9e 00 10 stw r4,16(r30) the_partition->length = length; the_partition->buffer_size = buffer_size; ffc16590: 90 de 00 18 stw r6,24(r30) return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; ffc16594: 93 fe 00 14 stw r31,20(r30) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; ffc16598: 93 5e 00 1c stw r26,28(r30) the_partition->number_of_used_blocks = 0; ffc1659c: 93 3e 00 20 stw r25,32(r30) _Chain_Initialize( &the_partition->Memory, starting_address, ffc165a0: 38 7e 00 24 addi r3,r30,36 ffc165a4: 48 00 35 7d bl ffc19b20 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc165a8: 80 1e 00 08 lwz r0,8(r30) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc165ac: 81 7c 00 1c lwz r11,28(r28) ffc165b0: 54 09 13 ba rlwinm r9,r0,2,14,29 ffc165b4: 7f cb 49 2e stwx r30,r11,r9 information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; ffc165b8: 93 7e 00 0c stw r27,12(r30) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; ffc165bc: 90 1d 00 00 stw r0,0(r29) name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); ffc165c0: 48 00 60 b5 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc165c4: 38 00 00 00 li r0,0 } ffc165c8: 39 61 00 30 addi r11,r1,48 ffc165cc: 7c 03 03 78 mr r3,r0 ffc165d0: 4b ff 7c d4 b ffc0e2a4 <_restgpr_25_x> =============================================================================== ffc16720 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { ffc16720: 94 21 ff e0 stwu r1,-32(r1) ffc16724: 7c 08 02 a6 mflr r0 ffc16728: 90 01 00 24 stw r0,36(r1) ffc1672c: 7c 60 1b 78 mr r0,r3 Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); ffc16730: 3c 60 00 00 lis r3,0 ffc16734: bf c1 00 18 stmw r30,24(r1) ffc16738: 38 63 6e e0 addi r3,r3,28384 ffc1673c: 7c 9f 23 78 mr r31,r4 ffc16740: 38 a1 00 08 addi r5,r1,8 ffc16744: 7c 04 03 78 mr r4,r0 ffc16748: 48 00 52 35 bl ffc1b97c <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1674c: 80 01 00 08 lwz r0,8(r1) ffc16750: 7c 7e 1b 78 mr r30,r3 ffc16754: 2f 80 00 00 cmpwi cr7,r0,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc16758: 38 60 00 04 li r3,4 { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { ffc1675c: 40 9e 00 58 bne- cr7,ffc167b4 ) { void *starting; void *ending; starting = the_partition->starting_address; ffc16760: 80 1e 00 10 lwz r0,16(r30) ending = _Addresses_Add_offset( starting, the_partition->length ); ffc16764: 81 3e 00 14 lwz r9,20(r30) const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc16768: 7f 9f 00 40 cmplw cr7,r31,r0 ffc1676c: 41 9c 00 50 blt- cr7,ffc167bc RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); ffc16770: 7d 20 4a 14 add r9,r0,r9 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); ffc16774: 7f 9f 48 40 cmplw cr7,r31,r9 ffc16778: 41 9d 00 44 bgt- cr7,ffc167bc <== NEVER TAKEN offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); ffc1677c: 81 3e 00 18 lwz r9,24(r30) RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); ffc16780: 7c 00 f8 50 subf r0,r0,r31 ffc16784: 7d 60 4b 96 divwu r11,r0,r9 ffc16788: 7d 2b 49 d6 mullw r9,r11,r9 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && ffc1678c: 7f 80 48 00 cmpw cr7,r0,r9 ffc16790: 40 9e 00 2c bne- cr7,ffc167bc RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); ffc16794: 38 7e 00 24 addi r3,r30,36 ffc16798: 7f e4 fb 78 mr r4,r31 ffc1679c: 48 00 32 ed bl ffc19a88 <_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; ffc167a0: 81 3e 00 20 lwz r9,32(r30) ffc167a4: 38 09 ff ff addi r0,r9,-1 ffc167a8: 90 1e 00 20 stw r0,32(r30) _Thread_Enable_dispatch(); ffc167ac: 48 00 5e c9 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc167b0: 38 60 00 00 li r3,0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } ffc167b4: 39 61 00 20 addi r11,r1,32 ffc167b8: 4b ff 7b 00 b ffc0e2b8 <_restgpr_30_x> _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); ffc167bc: 48 00 5e b9 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_INVALID_ADDRESS; ffc167c0: 38 60 00 09 li r3,9 ffc167c4: 4b ff ff f0 b ffc167b4 =============================================================================== ffc08c24 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { ffc08c24: 94 21 ff d8 stwu r1,-40(r1) ffc08c28: 7c 08 02 a6 mflr r0 ffc08c2c: bf 81 00 18 stmw r28,24(r1) ffc08c30: 7c 7e 1b 78 mr r30,r3 Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); ffc08c34: 3c 60 00 00 lis r3,0 ffc08c38: 7c 9f 23 78 mr r31,r4 ffc08c3c: 90 01 00 2c stw r0,44(r1) ffc08c40: 38 63 2c 58 addi r3,r3,11352 ffc08c44: 7f c4 f3 78 mr r4,r30 ffc08c48: 38 a1 00 08 addi r5,r1,8 ffc08c4c: 48 00 26 19 bl ffc0b264 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { ffc08c50: 80 01 00 08 lwz r0,8(r1) ffc08c54: 7c 7d 1b 78 mr r29,r3 ffc08c58: 2f 80 00 00 cmpwi cr7,r0,0 ffc08c5c: 40 9e 01 70 bne- cr7,ffc08dcc case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { ffc08c60: 3d 60 00 00 lis r11,0 ffc08c64: 81 23 00 40 lwz r9,64(r3) ffc08c68: 80 0b 32 30 lwz r0,12848(r11) ffc08c6c: 7f 89 00 00 cmpw cr7,r9,r0 ffc08c70: 41 9e 00 10 beq- cr7,ffc08c80 _Thread_Enable_dispatch(); ffc08c74: 48 00 32 e9 bl ffc0bf5c <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; ffc08c78: 3b c0 00 17 li r30,23 ffc08c7c: 48 00 01 54 b ffc08dd0 } if ( length == RTEMS_PERIOD_STATUS ) { ffc08c80: 2f 9f 00 00 cmpwi cr7,r31,0 ffc08c84: 40 9e 00 2c bne- cr7,ffc08cb0 switch ( the_period->state ) { ffc08c88: 80 03 00 38 lwz r0,56(r3) ffc08c8c: 3b c0 00 00 li r30,0 ffc08c90: 2b 80 00 04 cmplwi cr7,r0,4 ffc08c94: 41 9d 00 14 bgt- cr7,ffc08ca8 <== NEVER TAKEN ffc08c98: 3d 20 ff c2 lis r9,-62 ffc08c9c: 54 00 10 3a rlwinm r0,r0,2,0,29 ffc08ca0: 39 29 f2 e4 addi r9,r9,-3356 ffc08ca4: 7f c9 00 2e lwzx r30,r9,r0 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); ffc08ca8: 48 00 32 b5 bl ffc0bf5c <_Thread_Enable_dispatch> return( return_value ); ffc08cac: 48 00 01 24 b ffc08dd0 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08cb0: 7f 80 00 a6 mfmsr r28 ffc08cb4: 7c 10 42 a6 mfsprg r0,0 ffc08cb8: 7f 80 00 78 andc r0,r28,r0 ffc08cbc: 7c 00 01 24 mtmsr r0 } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { ffc08cc0: 80 03 00 38 lwz r0,56(r3) ffc08cc4: 2f 80 00 00 cmpwi cr7,r0,0 ffc08cc8: 40 be 00 4c bne+ cr7,ffc08d14 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08ccc: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); ffc08cd0: 4b ff fd cd bl ffc08a9c <_Rate_monotonic_Initiate_statistics> the_period->state = RATE_MONOTONIC_ACTIVE; ffc08cd4: 38 00 00 02 li r0,2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc08cd8: 3d 20 ff c1 lis r9,-63 ffc08cdc: 90 1d 00 38 stw r0,56(r29) ffc08ce0: 39 29 90 d8 addi r9,r9,-28456 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08ce4: 38 00 00 00 li r0,0 the_watchdog->routine = routine; ffc08ce8: 91 3d 00 2c stw r9,44(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08cec: 3c 60 00 00 lis r3,0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc08cf0: 90 1d 00 18 stw r0,24(r29) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08cf4: 38 63 2e 48 addi r3,r3,11848 ffc08cf8: 38 9d 00 10 addi r4,r29,16 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; ffc08cfc: 93 dd 00 30 stw r30,48(r29) the_watchdog->user_data = user_data; ffc08d00: 90 1d 00 34 stw r0,52(r29) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; ffc08d04: 93 fd 00 3c stw r31,60(r29) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08d08: 93 fd 00 1c stw r31,28(r29) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08d0c: 48 00 44 6d bl ffc0d178 <_Watchdog_Insert> ffc08d10: 48 00 00 70 b ffc08d80 _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { ffc08d14: 2f 80 00 02 cmpwi cr7,r0,2 ffc08d18: 40 be 00 74 bne+ cr7,ffc08d8c /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); ffc08d1c: 4b ff fe 01 bl ffc08b1c <_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; ffc08d20: 38 00 00 01 li r0,1 ffc08d24: 90 1d 00 38 stw r0,56(r29) the_period->next_length = length; ffc08d28: 93 fd 00 3c stw r31,60(r29) ffc08d2c: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; ffc08d30: 3d 20 00 00 lis r9,0 ffc08d34: 80 1d 00 08 lwz r0,8(r29) ffc08d38: 80 69 32 30 lwz r3,12848(r9) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc08d3c: 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; ffc08d40: 90 03 00 20 stw r0,32(r3) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc08d44: 48 00 3b a5 bl ffc0c8e8 <_Thread_Set_state> static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc08d48: 7d 20 00 a6 mfmsr r9 ffc08d4c: 7c 10 42 a6 mfsprg r0,0 ffc08d50: 7d 20 00 78 andc r0,r9,r0 ffc08d54: 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; ffc08d58: 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; ffc08d5c: 80 1d 00 38 lwz r0,56(r29) the_period->state = RATE_MONOTONIC_ACTIVE; ffc08d60: 91 7d 00 38 stw r11,56(r29) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08d64: 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 ) ffc08d68: 2f 80 00 03 cmpwi cr7,r0,3 ffc08d6c: 40 be 00 14 bne+ cr7,ffc08d80 <== ALWAYS TAKEN _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); ffc08d70: 3d 20 00 00 lis r9,0 <== NOT EXECUTED ffc08d74: 80 69 32 30 lwz r3,12848(r9) <== NOT EXECUTED ffc08d78: 38 80 40 00 li r4,16384 <== NOT EXECUTED ffc08d7c: 48 00 2e 05 bl ffc0bb80 <_Thread_Clear_state> <== NOT EXECUTED _Thread_Enable_dispatch(); ffc08d80: 48 00 31 dd bl ffc0bf5c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc08d84: 3b c0 00 00 li r30,0 ffc08d88: 48 00 00 48 b ffc08dd0 } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc08d8c: 2f 80 00 04 cmpwi cr7,r0,4 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc08d90: 3b c0 00 04 li r30,4 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { ffc08d94: 40 be 00 3c bne+ cr7,ffc08dd0 <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); ffc08d98: 4b ff fd 85 bl ffc08b1c <_Rate_monotonic_Update_statistics> ffc08d9c: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc08da0: 38 00 00 02 li r0,2 the_period->next_length = length; ffc08da4: 93 fd 00 3c stw r31,60(r29) ffc08da8: 3c 60 00 00 lis r3,0 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; ffc08dac: 90 1d 00 38 stw r0,56(r29) ffc08db0: 38 63 2e 48 addi r3,r3,11848 ffc08db4: 38 9d 00 10 addi r4,r29,16 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc08db8: 93 fd 00 1c stw r31,28(r29) the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; ffc08dbc: 3b c0 00 06 li r30,6 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc08dc0: 48 00 43 b9 bl ffc0d178 <_Watchdog_Insert> the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); ffc08dc4: 48 00 31 99 bl ffc0bf5c <_Thread_Enable_dispatch> return RTEMS_TIMEOUT; ffc08dc8: 48 00 00 08 b ffc08dd0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc08dcc: 3b c0 00 04 li r30,4 } ffc08dd0: 39 61 00 28 addi r11,r1,40 ffc08dd4: 7f c3 f3 78 mr r3,r30 ffc08dd8: 4b ff 83 e8 b ffc011c0 <_restgpr_28_x> =============================================================================== ffc08ddc : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc08ddc: 94 21 ff 58 stwu r1,-168(r1) ffc08de0: 7c 08 02 a6 mflr r0 ffc08de4: 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 ) ffc08de8: 7c 80 23 79 mr. r0,r4 */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { ffc08dec: be 41 00 70 stmw r18,112(r1) ffc08df0: 7c 7f 1b 78 mr r31,r3 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) ffc08df4: 90 01 00 68 stw r0,104(r1) ffc08df8: 41 82 01 fc beq- ffc08ff4 <== NEVER TAKEN return; (*print)( context, "Period information by period\n" ); ffc08dfc: 3c 80 ff c2 lis r4,-62 ffc08e00: 7c 09 03 a6 mtctr r0 ffc08e04: 38 84 f2 f8 addi r4,r4,-3336 /* * 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 ; ffc08e08: 3e 60 00 00 lis r19,0 rtems_object_get_name( the_status.owner, sizeof(name), name ); /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc08e0c: 3e c0 ff c2 lis r22,-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, ffc08e10: 3f 00 ff c2 lis r24,-62 char name[5]; if ( !print ) return; (*print)( context, "Period information by period\n" ); ffc08e14: 4c c6 31 82 crclr 4*cr1+eq ffc08e18: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc08e1c: 80 01 00 68 lwz r0,104(r1) ffc08e20: 3c 80 ff c2 lis r4,-62 ffc08e24: 7c 09 03 a6 mtctr r0 ffc08e28: 38 84 f3 16 addi r4,r4,-3306 ffc08e2c: 7f e3 fb 78 mr r3,r31 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, ffc08e30: 3f 40 ff c2 lis r26,-62 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc08e34: 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 ); ffc08e38: 3a 81 00 30 addi r20,r1,48 if ( !print ) return; (*print)( context, "Period information by period\n" ); #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); ffc08e3c: 4c c6 31 82 crclr 4*cr1+eq ffc08e40: 4e 80 04 21 bctrl (*print)( context, "--- Wall times are in seconds ---\n" ); ffc08e44: 80 01 00 68 lwz r0,104(r1) ffc08e48: 3c 80 ff c2 lis r4,-62 ffc08e4c: 7c 09 03 a6 mtctr r0 ffc08e50: 38 84 f3 38 addi r4,r4,-3272 ffc08e54: 7f e3 fb 78 mr r3,r31 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc08e58: 3a a1 00 18 addi r21,r1,24 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc08e5c: 3b 61 00 08 addi r27,r1,8 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc08e60: 3a d6 f3 f2 addi r22,r22,-3086 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" ); ffc08e64: 4c c6 31 82 crclr 4*cr1+eq ffc08e68: 4e 80 04 21 bctrl Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc08e6c: 80 01 00 68 lwz r0,104(r1) ffc08e70: 3c 80 ff c2 lis r4,-62 ffc08e74: 7c 09 03 a6 mtctr r0 ffc08e78: 38 84 f3 5b addi r4,r4,-3237 ffc08e7c: 7f e3 fb 78 mr r3,r31 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ 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; ffc08e80: 3a e1 00 48 addi r23,r1,72 _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); ffc08e84: 3b 81 00 10 addi r28,r1,16 (*print)( context, ffc08e88: 3b 18 f4 09 addi r24,r24,-3063 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " ffc08e8c: 4c c6 31 82 crclr 4*cr1+eq ffc08e90: 4e 80 04 21 bctrl #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc08e94: 80 01 00 68 lwz r0,104(r1) ffc08e98: 3c 80 ff c2 lis r4,-62 ffc08e9c: 7f e3 fb 78 mr r3,r31 ffc08ea0: 7c 09 03 a6 mtctr r0 ffc08ea4: 38 84 f3 a6 addi r4,r4,-3162 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, ffc08ea8: 3b c0 03 e8 li r30,1000 { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ 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; ffc08eac: 3b 21 00 60 addi r25,r1,96 _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, ffc08eb0: 3b 5a f4 28 addi r26,r26,-3032 #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " ffc08eb4: 4c c6 31 82 crclr 4*cr1+eq ffc08eb8: 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 ; ffc08ebc: 39 33 2c 58 addi r9,r19,11352 ffc08ec0: 83 a9 00 08 lwz r29,8(r9) /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); ffc08ec4: 3a 52 f2 96 addi r18,r18,-3434 /* * 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 ; ffc08ec8: 48 00 01 1c b ffc08fe4 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); ffc08ecc: 7f a3 eb 78 mr r3,r29 ffc08ed0: 7e 84 a3 78 mr r4,r20 ffc08ed4: 48 00 68 f5 bl ffc0f7c8 if ( status != RTEMS_SUCCESSFUL ) ffc08ed8: 2f 83 00 00 cmpwi cr7,r3,0 ffc08edc: 40 be 01 04 bne+ cr7,ffc08fe0 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); ffc08ee0: 7e a4 ab 78 mr r4,r21 ffc08ee4: 7f a3 eb 78 mr r3,r29 ffc08ee8: 48 00 69 ad bl ffc0f894 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); ffc08eec: 80 61 00 18 lwz r3,24(r1) ffc08ef0: 38 80 00 05 li r4,5 ffc08ef4: 7f 65 db 78 mr r5,r27 ffc08ef8: 48 00 02 a1 bl ffc09198 /* * Print part of report line that is not dependent on granularity */ (*print)( context, ffc08efc: 80 01 00 68 lwz r0,104(r1) ffc08f00: 7e c4 b3 78 mr r4,r22 ffc08f04: 80 e1 00 30 lwz r7,48(r1) ffc08f08: 7f e3 fb 78 mr r3,r31 ffc08f0c: 81 01 00 34 lwz r8,52(r1) ffc08f10: 7f a5 eb 78 mr r5,r29 ffc08f14: 7c 09 03 a6 mtctr r0 ffc08f18: 7f 66 db 78 mr r6,r27 ffc08f1c: 4c c6 31 82 crclr 4*cr1+eq ffc08f20: 4e 80 04 21 bctrl ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { ffc08f24: 80 81 00 30 lwz r4,48(r1) ffc08f28: 2f 84 00 00 cmpwi cr7,r4,0 ffc08f2c: 40 9e 00 20 bne- cr7,ffc08f4c (*print)( context, "\n" ); ffc08f30: 80 01 00 68 lwz r0,104(r1) ffc08f34: 7f e3 fb 78 mr r3,r31 ffc08f38: 7e 44 93 78 mr r4,r18 ffc08f3c: 7c 09 03 a6 mtctr r0 ffc08f40: 4c c6 31 82 crclr 4*cr1+eq ffc08f44: 4e 80 04 21 bctrl continue; ffc08f48: 48 00 00 98 b ffc08fe0 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 ); ffc08f4c: 7e e3 bb 78 mr r3,r23 ffc08f50: 7f 85 e3 78 mr r5,r28 ffc08f54: 48 00 3d 9d bl ffc0ccf0 <_Timespec_Divide_by_integer> (*print)( context, ffc08f58: 80 01 00 68 lwz r0,104(r1) ffc08f5c: 80 c1 00 3c lwz r6,60(r1) ffc08f60: 7f 04 c3 78 mr r4,r24 ffc08f64: 81 01 00 44 lwz r8,68(r1) ffc08f68: 7c 09 03 a6 mtctr r0 ffc08f6c: 81 41 00 14 lwz r10,20(r1) ffc08f70: 7c c6 f3 d6 divw r6,r6,r30 ffc08f74: 80 e1 00 40 lwz r7,64(r1) ffc08f78: 81 21 00 10 lwz r9,16(r1) ffc08f7c: 80 a1 00 38 lwz r5,56(r1) ffc08f80: 7d 08 f3 d6 divw r8,r8,r30 ffc08f84: 7d 4a f3 d6 divw r10,r10,r30 ffc08f88: 7f e3 fb 78 mr r3,r31 ffc08f8c: 4c c6 31 82 crclr 4*cr1+eq ffc08f90: 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); ffc08f94: 80 81 00 30 lwz r4,48(r1) ffc08f98: 7f 23 cb 78 mr r3,r25 ffc08f9c: 7f 85 e3 78 mr r5,r28 ffc08fa0: 48 00 3d 51 bl ffc0ccf0 <_Timespec_Divide_by_integer> (*print)( context, ffc08fa4: 80 c1 00 54 lwz r6,84(r1) ffc08fa8: 81 01 00 5c lwz r8,92(r1) ffc08fac: 7f e3 fb 78 mr r3,r31 ffc08fb0: 81 41 00 14 lwz r10,20(r1) ffc08fb4: 7f 44 d3 78 mr r4,r26 ffc08fb8: 80 01 00 68 lwz r0,104(r1) ffc08fbc: 7c c6 f3 d6 divw r6,r6,r30 ffc08fc0: 80 a1 00 50 lwz r5,80(r1) ffc08fc4: 80 e1 00 58 lwz r7,88(r1) ffc08fc8: 7c 09 03 a6 mtctr r0 ffc08fcc: 81 21 00 10 lwz r9,16(r1) ffc08fd0: 7d 08 f3 d6 divw r8,r8,r30 ffc08fd4: 7d 4a f3 d6 divw r10,r10,r30 ffc08fd8: 4c c6 31 82 crclr 4*cr1+eq ffc08fdc: 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++ ) { ffc08fe0: 3b bd 00 01 addi r29,r29,1 /* * Cycle through all possible ids and try to report on each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; ffc08fe4: 39 33 2c 58 addi r9,r19,11352 /* * 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 ; ffc08fe8: 80 09 00 0c lwz r0,12(r9) ffc08fec: 7f 9d 00 40 cmplw cr7,r29,r0 ffc08ff0: 40 9d fe dc ble+ cr7,ffc08ecc the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } ffc08ff4: 39 61 00 a8 addi r11,r1,168 ffc08ff8: 4b ff 81 a0 b ffc01198 <_restgpr_18_x> =============================================================================== ffc17c08 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc17c08: 7c 2b 0b 78 mr r11,r1 ffc17c0c: 94 21 ff e0 stwu r1,-32(r1) ffc17c10: 7c 08 02 a6 mflr r0 ffc17c14: 48 01 a3 1d bl ffc31f30 <_savegpr_31> register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc17c18: 7c 9f 23 79 mr. r31,r4 rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { ffc17c1c: 90 01 00 24 stw r0,36(r1) Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; ffc17c20: 38 00 00 0a li r0,10 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) ffc17c24: 41 82 00 bc beq- ffc17ce0 return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); ffc17c28: 38 81 00 08 addi r4,r1,8 ffc17c2c: 48 00 4a 69 bl ffc1c694 <_Thread_Get> switch ( location ) { ffc17c30: 80 01 00 08 lwz r0,8(r1) ffc17c34: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c38: 40 9e 00 a4 bne- cr7,ffc17cdc case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; ffc17c3c: 81 23 01 30 lwz r9,304(r3) asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { ffc17c40: 80 09 00 0c lwz r0,12(r9) ffc17c44: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c48: 41 9e 00 88 beq- cr7,ffc17cd0 if ( asr->is_enabled ) { ffc17c4c: 88 09 00 08 lbz r0,8(r9) ffc17c50: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c54: 41 9e 00 50 beq- cr7,ffc17ca4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc17c58: 7c 00 00 a6 mfmsr r0 ffc17c5c: 7d 70 42 a6 mfsprg r11,0 ffc17c60: 7c 0b 58 78 andc r11,r0,r11 ffc17c64: 7d 60 01 24 mtmsr r11 ) { ISR_Level _level; _ISR_Disable( _level ); *signal_set |= signals; ffc17c68: 81 69 00 14 lwz r11,20(r9) ffc17c6c: 7d 7f fb 78 or r31,r11,r31 ffc17c70: 93 e9 00 14 stw r31,20(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc17c74: 7c 00 01 24 mtmsr r0 _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) ffc17c78: 3d 20 00 00 lis r9,0 ffc17c7c: 39 29 75 24 addi r9,r9,29988 ffc17c80: 80 09 00 08 lwz r0,8(r9) ffc17c84: 2f 80 00 00 cmpwi cr7,r0,0 ffc17c88: 41 9e 00 3c beq- cr7,ffc17cc4 ffc17c8c: 80 09 00 0c lwz r0,12(r9) ffc17c90: 7f 83 00 00 cmpw cr7,r3,r0 ffc17c94: 40 be 00 30 bne+ cr7,ffc17cc4 <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc17c98: 38 00 00 01 li r0,1 ffc17c9c: 98 09 00 18 stb r0,24(r9) ffc17ca0: 48 00 00 24 b ffc17cc4 static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc17ca4: 7c 00 00 a6 mfmsr r0 ffc17ca8: 7d 70 42 a6 mfsprg r11,0 ffc17cac: 7c 0b 58 78 andc r11,r0,r11 ffc17cb0: 7d 60 01 24 mtmsr r11 ffc17cb4: 81 69 00 18 lwz r11,24(r9) ffc17cb8: 7d 7f fb 78 or r31,r11,r31 ffc17cbc: 93 e9 00 18 stw r31,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc17cc0: 7c 00 01 24 mtmsr r0 } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); ffc17cc4: 48 00 49 b1 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc17cc8: 38 00 00 00 li r0,0 ffc17ccc: 48 00 00 14 b ffc17ce0 } _Thread_Enable_dispatch(); ffc17cd0: 48 00 49 a5 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_NOT_DEFINED; ffc17cd4: 38 00 00 0b li r0,11 ffc17cd8: 48 00 00 08 b ffc17ce0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc17cdc: 38 00 00 04 li r0,4 } ffc17ce0: 39 61 00 20 addi r11,r1,32 ffc17ce4: 7c 03 03 78 mr r3,r0 ffc17ce8: 4b ff 65 d4 b ffc0e2bc <_restgpr_31_x> =============================================================================== ffc0fbdc : ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc0fbdc: 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 ) { ffc0fbe0: 7c 08 02 a6 mflr r0 ffc0fbe4: 94 21 ff f8 stwu r1,-8(r1) ffc0fbe8: 90 01 00 0c stw r0,12(r1) ffc0fbec: 7c 60 1b 78 mr r0,r3 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; ffc0fbf0: 38 60 00 09 li r3,9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) ffc0fbf4: 41 82 01 8c beq- ffc0fd80 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; ffc0fbf8: 3d 20 00 00 lis r9,0 ffc0fbfc: 81 69 31 10 lwz r11,12560(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 ) ffc0fc00: 81 0b 00 7c lwz r8,124(r11) executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc0fc04: 89 4b 00 74 lbz r10,116(r11) if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0fc08: 2f 88 00 00 cmpwi cr7,r8,0 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; ffc0fc0c: 81 2b 01 30 lwz r9,304(r11) asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; ffc0fc10: 7d 4a 00 34 cntlzw r10,r10 ffc0fc14: 55 4a d9 7e rlwinm r10,r10,27,5,31 ffc0fc18: 55 4a 40 2e rlwinm r10,r10,8,0,23 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) ffc0fc1c: 41 9e 00 08 beq- cr7,ffc0fc24 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; ffc0fc20: 61 4a 02 00 ori r10,r10,512 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; ffc0fc24: 89 09 00 08 lbz r8,8(r9) ffc0fc28: 7d 08 00 34 cntlzw r8,r8 ffc0fc2c: 55 08 d9 7e rlwinm r8,r8,27,5,31 ffc0fc30: 55 08 50 2a rlwinm r8,r8,10,0,21 ffc0fc34: 7d 08 53 78 or r8,r8,r10 #ifndef ASM static inline uint32_t _CPU_ISR_Get_level( void ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0fc38: 39 40 00 00 li r10,0 ffc0fc3c: 7d 40 00 a6 mfmsr r10 if (msr & MSR_EE) return 0; ffc0fc40: 71 47 80 00 andi. r7,r10,32768 ffc0fc44: 7c e0 00 26 mfcr r7 ffc0fc48: 54 e7 1f fe rlwinm r7,r7,3,31,31 old_mode |= _ISR_Get_level(); ffc0fc4c: 7d 0a 3b 78 or r10,r8,r7 *previous_mode_set = old_mode; ffc0fc50: 91 45 00 00 stw r10,0(r5) /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) ffc0fc54: 70 8a 01 00 andi. r10,r4,256 ffc0fc58: 41 82 00 14 beq- ffc0fc6c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; ffc0fc5c: 70 07 01 00 andi. r7,r0,256 ffc0fc60: 7d 40 00 26 mfcr r10 ffc0fc64: 55 4a 1f fe rlwinm r10,r10,3,31,31 ffc0fc68: 99 4b 00 74 stb r10,116(r11) if ( mask & RTEMS_TIMESLICE_MASK ) { ffc0fc6c: 70 8a 02 00 andi. r10,r4,512 ffc0fc70: 41 82 00 28 beq- ffc0fc98 if ( _Modes_Is_timeslice(mode_set) ) { ffc0fc74: 70 0a 02 00 andi. r10,r0,512 ffc0fc78: 41 82 00 1c beq- ffc0fc94 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; ffc0fc7c: 39 40 00 01 li r10,1 ffc0fc80: 91 4b 00 7c stw r10,124(r11) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; ffc0fc84: 3d 40 00 00 lis r10,0 ffc0fc88: 81 4a 27 a4 lwz r10,10148(r10) ffc0fc8c: 91 4b 00 78 stw r10,120(r11) ffc0fc90: 48 00 00 08 b ffc0fc98 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; ffc0fc94: 91 4b 00 7c stw r10,124(r11) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) ffc0fc98: 70 8b 00 01 andi. r11,r4,1 ffc0fc9c: 41 82 00 2c beq- ffc0fcc8 } static inline void _CPU_ISR_Set_level( uint32_t level ) { register unsigned int msr; _CPU_MSR_GET(msr); ffc0fca0: 39 60 00 00 li r11,0 ffc0fca4: 7d 60 00 a6 mfmsr r11 if (!(level & CPU_MODES_INTERRUPT_MASK)) { ffc0fca8: 70 07 00 01 andi. r7,r0,1 ffc0fcac: 40 82 00 10 bne- ffc0fcbc static inline uint32_t ppc_interrupt_get_disable_mask( void ) { uint32_t mask; asm volatile ( ffc0fcb0: 7d 50 42 a6 mfsprg r10,0 msr |= ppc_interrupt_get_disable_mask(); ffc0fcb4: 7d 4b 5b 78 or r11,r10,r11 ffc0fcb8: 48 00 00 0c b ffc0fcc4 ffc0fcbc: 7d 50 42 a6 mfsprg r10,0 } else { msr &= ~ppc_interrupt_get_disable_mask(); ffc0fcc0: 7d 6b 50 78 andc r11,r11,r10 } _CPU_MSR_SET(msr); ffc0fcc4: 7d 60 01 24 mtmsr r11 * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { ffc0fcc8: 70 8a 04 00 andi. r10,r4,1024 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc0fccc: 39 60 00 00 li r11,0 if ( mask & RTEMS_ASR_MASK ) { ffc0fcd0: 41 82 00 58 beq- ffc0fd28 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc0fcd4: 70 07 04 00 andi. r7,r0,1024 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc0fcd8: 89 49 00 08 lbz r10,8(r9) * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( ffc0fcdc: 7c 00 00 26 mfcr r0 ffc0fce0: 54 00 1f fe rlwinm r0,r0,3,31,31 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { ffc0fce4: 7f 8a 00 00 cmpw cr7,r10,r0 ffc0fce8: 41 9e 00 40 beq- cr7,ffc0fd28 asr->is_enabled = is_asr_enabled; ffc0fcec: 98 09 00 08 stb r0,8(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc0fcf0: 7c 00 00 a6 mfmsr r0 ffc0fcf4: 7d 70 42 a6 mfsprg r11,0 ffc0fcf8: 7c 0b 58 78 andc r11,r0,r11 ffc0fcfc: 7d 60 01 24 mtmsr r11 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; ffc0fd00: 81 69 00 18 lwz r11,24(r9) information->signals_pending = information->signals_posted; ffc0fd04: 81 49 00 14 lwz r10,20(r9) information->signals_posted = _signals; ffc0fd08: 91 69 00 14 stw r11,20(r9) rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; ffc0fd0c: 91 49 00 18 stw r10,24(r9) return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0fd10: 7c 00 01 24 mtmsr r0 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc0fd14: 80 09 00 14 lwz r0,20(r9) needs_asr_dispatching = true; ffc0fd18: 39 60 00 01 li r11,1 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { asr->is_enabled = is_asr_enabled; _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { ffc0fd1c: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fd20: 40 9e 00 08 bne- cr7,ffc0fd28 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; ffc0fd24: 39 60 00 00 li r11,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc0fd28: 3d 20 00 00 lis r9,0 ffc0fd2c: 80 09 27 ec lwz r0,10220(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; ffc0fd30: 38 60 00 00 li r3,0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { ffc0fd34: 2f 80 00 03 cmpwi cr7,r0,3 ffc0fd38: 40 be 00 48 bne+ cr7,ffc0fd80 <== NEVER TAKEN { Thread_Control *executing; executing = _Thread_Executing; if ( are_signals_pending || ffc0fd3c: 2f 8b 00 00 cmpwi cr7,r11,0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; ffc0fd40: 3d 40 00 00 lis r10,0 ffc0fd44: 39 4a 31 04 addi r10,r10,12548 ffc0fd48: 81 2a 00 0c lwz r9,12(r10) if ( are_signals_pending || ffc0fd4c: 40 9e 00 1c bne- cr7,ffc0fd68 ffc0fd50: 80 0a 00 10 lwz r0,16(r10) ffc0fd54: 7f 89 00 00 cmpw cr7,r9,r0 ffc0fd58: 41 9e 00 28 beq- cr7,ffc0fd80 (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { ffc0fd5c: 88 09 00 74 lbz r0,116(r9) ffc0fd60: 2f 80 00 00 cmpwi cr7,r0,0 ffc0fd64: 41 9e 00 1c beq- cr7,ffc0fd80 <== NEVER TAKEN _Thread_Dispatch_necessary = true; ffc0fd68: 3d 20 00 00 lis r9,0 ffc0fd6c: 38 00 00 01 li r0,1 ffc0fd70: 39 29 31 04 addi r9,r9,12548 ffc0fd74: 98 09 00 18 stb r0,24(r9) if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); ffc0fd78: 4b ff a0 e5 bl ffc09e5c <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; ffc0fd7c: 38 60 00 00 li r3,0 } ffc0fd80: 80 01 00 0c lwz r0,12(r1) ffc0fd84: 38 21 00 08 addi r1,r1,8 ffc0fd88: 7c 08 03 a6 mtlr r0 ffc0fd8c: 4e 80 00 20 blr =============================================================================== ffc0c500 : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { ffc0c500: 94 21 ff e0 stwu r1,-32(r1) ffc0c504: 7c 08 02 a6 mflr r0 ffc0c508: bf c1 00 18 stmw r30,24(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0c50c: 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 ) { ffc0c510: 7c be 2b 78 mr r30,r5 ffc0c514: 90 01 00 24 stw r0,36(r1) register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0c518: 41 82 00 18 beq- ffc0c530 RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); ffc0c51c: 3d 20 00 00 lis r9,0 ffc0c520: 89 29 27 2c lbz r9,10028(r9) !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; ffc0c524: 38 00 00 13 li r0,19 ) { register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && ffc0c528: 7f 9f 48 40 cmplw cr7,r31,r9 ffc0c52c: 41 9d 00 6c bgt- cr7,ffc0c598 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0c530: 2f 9e 00 00 cmpwi cr7,r30,0 return RTEMS_INVALID_ADDRESS; ffc0c534: 38 00 00 09 li r0,9 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) ffc0c538: 41 9e 00 60 beq- cr7,ffc0c598 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); ffc0c53c: 38 81 00 08 addi r4,r1,8 ffc0c540: 48 00 25 bd bl ffc0eafc <_Thread_Get> switch ( location ) { ffc0c544: 80 01 00 08 lwz r0,8(r1) ffc0c548: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c54c: 40 9e 00 48 bne- cr7,ffc0c594 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0c550: 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; ffc0c554: 80 03 00 14 lwz r0,20(r3) ffc0c558: 90 1e 00 00 stw r0,0(r30) if ( new_priority != RTEMS_CURRENT_PRIORITY ) { ffc0c55c: 41 9e 00 2c beq- cr7,ffc0c588 the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || ffc0c560: 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; ffc0c564: 93 e3 00 18 stw r31,24(r3) if ( the_thread->resource_count == 0 || ffc0c568: 2f 80 00 00 cmpwi cr7,r0,0 ffc0c56c: 41 9e 00 10 beq- cr7,ffc0c57c ffc0c570: 80 03 00 14 lwz r0,20(r3) ffc0c574: 7f 80 f8 40 cmplw cr7,r0,r31 ffc0c578: 40 9d 00 10 ble- cr7,ffc0c588 <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); ffc0c57c: 7f e4 fb 78 mr r4,r31 ffc0c580: 38 a0 00 00 li r5,0 ffc0c584: 48 00 1f f1 bl ffc0e574 <_Thread_Change_priority> } _Thread_Enable_dispatch(); ffc0c588: 48 00 25 55 bl ffc0eadc <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc0c58c: 38 00 00 00 li r0,0 ffc0c590: 48 00 00 08 b ffc0c598 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc0c594: 38 00 00 04 li r0,4 } ffc0c598: 39 61 00 20 addi r11,r1,32 ffc0c59c: 7c 03 03 78 mr r3,r0 ffc0c5a0: 4b ff 4b 80 b ffc01120 <_restgpr_30_x> =============================================================================== ffc186e4 : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { ffc186e4: 94 21 ff e8 stwu r1,-24(r1) ffc186e8: 7c 08 02 a6 mflr r0 ffc186ec: 7c 64 1b 78 mr r4,r3 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); ffc186f0: 3c 60 00 00 lis r3,0 ffc186f4: 90 01 00 1c stw r0,28(r1) ffc186f8: 38 63 79 5c addi r3,r3,31068 ffc186fc: 38 a1 00 08 addi r5,r1,8 ffc18700: 48 00 32 7d bl ffc1b97c <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18704: 80 01 00 08 lwz r0,8(r1) ffc18708: 2f 80 00 00 cmpwi cr7,r0,0 ffc1870c: 40 9e 00 24 bne- cr7,ffc18730 case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) ffc18710: 80 03 00 38 lwz r0,56(r3) ffc18714: 2f 80 00 04 cmpwi cr7,r0,4 ffc18718: 41 9e 00 0c beq- cr7,ffc18724 <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); ffc1871c: 38 63 00 10 addi r3,r3,16 ffc18720: 48 00 55 0d bl ffc1dc2c <_Watchdog_Remove> _Thread_Enable_dispatch(); ffc18724: 48 00 3f 51 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc18728: 38 60 00 00 li r3,0 ffc1872c: 48 00 00 08 b ffc18734 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc18730: 38 60 00 04 li r3,4 } ffc18734: 80 01 00 1c lwz r0,28(r1) ffc18738: 38 21 00 18 addi r1,r1,24 ffc1873c: 7c 08 03 a6 mtlr r0 ffc18740: 4e 80 00 20 blr =============================================================================== ffc18c64 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18c64: 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; ffc18c68: 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 ) { ffc18c6c: 7c 08 02 a6 mflr r0 ffc18c70: bf 01 00 18 stmw r24,24(r1) ffc18c74: 7c 7f 1b 78 mr r31,r3 ffc18c78: 7c 9c 23 78 mr r28,r4 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; ffc18c7c: 83 a9 28 fc lwz r29,10492(r9) rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { ffc18c80: 7c be 2b 78 mr r30,r5 ffc18c84: 90 01 00 3c stw r0,60(r1) ffc18c88: 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 ) ffc18c8c: 2f 9d 00 00 cmpwi cr7,r29,0 return RTEMS_INCORRECT_STATE; ffc18c90: 3b 20 00 0e li r25,14 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) ffc18c94: 41 9e 00 c8 beq- cr7,ffc18d5c return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc18c98: 3d 20 00 00 lis r9,0 ffc18c9c: 88 09 28 a4 lbz r0,10404(r9) return RTEMS_NOT_DEFINED; ffc18ca0: 3b 20 00 0b li r25,11 Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) ffc18ca4: 2f 80 00 00 cmpwi cr7,r0,0 ffc18ca8: 41 9e 00 b4 beq- cr7,ffc18d5c <== NEVER TAKEN return RTEMS_NOT_DEFINED; if ( !routine ) ffc18cac: 2f 85 00 00 cmpwi cr7,r5,0 return RTEMS_INVALID_ADDRESS; ffc18cb0: 3b 20 00 09 li r25,9 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) ffc18cb4: 41 9e 00 a8 beq- cr7,ffc18d5c return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc18cb8: 7c 83 23 78 mr r3,r4 ffc18cbc: 4b ff cc 5d bl ffc15918 <_TOD_Validate> return RTEMS_INVALID_CLOCK; ffc18cc0: 3b 20 00 14 li r25,20 return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) ffc18cc4: 2f 83 00 00 cmpwi cr7,r3,0 ffc18cc8: 41 9e 00 94 beq- cr7,ffc18d5c return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc18ccc: 7f 83 e3 78 mr r3,r28 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18cd0: 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 ); ffc18cd4: 4b ff cb b9 bl ffc1588c <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18cd8: 80 1b 28 b8 lwz r0,10424(r27) return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); ffc18cdc: 7c 7c 1b 78 mr r28,r3 if ( seconds <= _TOD_Seconds_since_epoch() ) ffc18ce0: 7f 83 00 40 cmplw cr7,r3,r0 ffc18ce4: 40 9d 00 78 ble- cr7,ffc18d5c ffc18ce8: 3c 60 00 00 lis r3,0 ffc18cec: 38 63 79 5c addi r3,r3,31068 ffc18cf0: 7f e4 fb 78 mr r4,r31 ffc18cf4: 38 a1 00 08 addi r5,r1,8 ffc18cf8: 48 00 2c 85 bl ffc1b97c <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { ffc18cfc: 83 01 00 08 lwz r24,8(r1) ffc18d00: 7c 79 1b 78 mr r25,r3 ffc18d04: 2f 98 00 00 cmpwi cr7,r24,0 ffc18d08: 40 9e 00 50 bne- cr7,ffc18d58 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); ffc18d0c: 38 63 00 10 addi r3,r3,16 ffc18d10: 48 00 4f 1d bl ffc1dc2c <_Watchdog_Remove> the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; ffc18d14: 38 00 00 03 li r0,3 ffc18d18: 90 19 00 38 stw r0,56(r25) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc18d1c: 7f 24 cb 78 mr r4,r25 ffc18d20: 7f a3 eb 78 mr r3,r29 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); ffc18d24: 80 1b 28 b8 lwz r0,10424(r27) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc18d28: 93 19 00 18 stw r24,24(r25) ffc18d2c: 7f 80 e0 50 subf r28,r0,r28 (*timer_server->schedule_operation)( timer_server, the_timer ); ffc18d30: 80 1d 00 04 lwz r0,4(r29) the_watchdog->routine = routine; ffc18d34: 93 d9 00 2c stw r30,44(r25) ffc18d38: 7c 09 03 a6 mtctr r0 the_watchdog->id = id; ffc18d3c: 93 f9 00 30 stw r31,48(r25) the_watchdog->user_data = user_data; ffc18d40: 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(); ffc18d44: 93 99 00 1c stw r28,28(r25) (*timer_server->schedule_operation)( timer_server, the_timer ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; ffc18d48: 3b 20 00 00 li r25,0 (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); (*timer_server->schedule_operation)( timer_server, the_timer ); ffc18d4c: 4e 80 04 21 bctrl _Thread_Enable_dispatch(); ffc18d50: 48 00 39 25 bl ffc1c674 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; ffc18d54: 48 00 00 08 b ffc18d5c #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; ffc18d58: 3b 20 00 04 li r25,4 } ffc18d5c: 39 61 00 38 addi r11,r1,56 ffc18d60: 7f 23 cb 78 mr r3,r25 ffc18d64: 4b ff 55 3c b ffc0e2a0 <_restgpr_24_x> =============================================================================== ffc082b0 : int sched_get_priority_max( int policy ) { switch ( policy ) { ffc082b0: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_max( int policy ) { ffc082b4: 94 21 ff f8 stwu r1,-8(r1) ffc082b8: 7c 08 02 a6 mflr r0 ffc082bc: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc082c0: 41 9d 00 14 bgt- cr7,ffc082d4 ffc082c4: 38 00 00 01 li r0,1 ffc082c8: 7c 03 18 30 slw r3,r0,r3 ffc082cc: 70 60 00 17 andi. r0,r3,23 ffc082d0: 40 82 00 18 bne- ffc082e8 <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc082d4: 48 00 8f 6d bl ffc11240 <__errno> ffc082d8: 38 00 00 16 li r0,22 ffc082dc: 90 03 00 00 stw r0,0(r3) ffc082e0: 38 60 ff ff li r3,-1 ffc082e4: 48 00 00 10 b ffc082f4 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; ffc082e8: 3d 20 00 00 lis r9,0 ffc082ec: 88 69 27 14 lbz r3,10004(r9) ffc082f0: 38 63 ff ff addi r3,r3,-1 } ffc082f4: 80 01 00 0c lwz r0,12(r1) ffc082f8: 38 21 00 08 addi r1,r1,8 ffc082fc: 7c 08 03 a6 mtlr r0 ffc08300: 4e 80 00 20 blr =============================================================================== ffc08304 : int sched_get_priority_min( int policy ) { switch ( policy ) { ffc08304: 2b 83 00 04 cmplwi cr7,r3,4 #include int sched_get_priority_min( int policy ) { ffc08308: 94 21 ff f8 stwu r1,-8(r1) ffc0830c: 7c 08 02 a6 mflr r0 ffc08310: 90 01 00 0c stw r0,12(r1) switch ( policy ) { ffc08314: 41 9d 00 18 bgt- cr7,ffc0832c ffc08318: 38 00 00 01 li r0,1 ffc0831c: 7c 00 18 30 slw r0,r0,r3 ffc08320: 70 09 00 17 andi. r9,r0,23 default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; ffc08324: 38 60 00 01 li r3,1 int sched_get_priority_min( int policy ) { switch ( policy ) { ffc08328: 40 82 00 14 bne- ffc0833c <== ALWAYS TAKEN case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); ffc0832c: 48 00 8f 15 bl ffc11240 <__errno> ffc08330: 38 00 00 16 li r0,22 ffc08334: 90 03 00 00 stw r0,0(r3) ffc08338: 38 60 ff ff li r3,-1 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } ffc0833c: 80 01 00 0c lwz r0,12(r1) ffc08340: 38 21 00 08 addi r1,r1,8 ffc08344: 7c 08 03 a6 mtlr r0 ffc08348: 4e 80 00 20 blr =============================================================================== ffc0834c : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc0834c: 7c 2b 0b 78 mr r11,r1 ffc08350: 94 21 ff e8 stwu r1,-24(r1) ffc08354: 7c 08 02 a6 mflr r0 ffc08358: 48 01 4a 6d bl ffc1cdc4 <_savegpr_31> /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc0835c: 7c 7f 1b 79 mr. r31,r3 int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { ffc08360: 90 01 00 1c stw r0,28(r1) /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) ffc08364: 41 a2 00 24 beq+ ffc08388 <== NEVER TAKEN ffc08368: 90 81 00 08 stw r4,8(r1) ffc0836c: 4b ff c8 49 bl ffc04bb4 ffc08370: 7f 9f 18 00 cmpw cr7,r31,r3 ffc08374: 80 81 00 08 lwz r4,8(r1) ffc08378: 41 be 00 10 beq+ cr7,ffc08388 rtems_set_errno_and_return_minus_one( ESRCH ); ffc0837c: 48 00 8e c5 bl ffc11240 <__errno> ffc08380: 38 00 00 03 li r0,3 ffc08384: 48 00 00 14 b ffc08398 if ( !interval ) ffc08388: 2f 84 00 00 cmpwi cr7,r4,0 ffc0838c: 40 be 00 18 bne+ cr7,ffc083a4 rtems_set_errno_and_return_minus_one( EINVAL ); ffc08390: 48 00 8e b1 bl ffc11240 <__errno> ffc08394: 38 00 00 16 li r0,22 ffc08398: 90 03 00 00 stw r0,0(r3) ffc0839c: 38 60 ff ff li r3,-1 ffc083a0: 48 00 00 14 b ffc083b4 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); ffc083a4: 3d 20 00 00 lis r9,0 ffc083a8: 80 69 27 ec lwz r3,10220(r9) ffc083ac: 48 00 3d 9d bl ffc0c148 <_Timespec_From_ticks> return 0; ffc083b0: 38 60 00 00 li r3,0 } ffc083b4: 39 61 00 18 addi r11,r1,24 ffc083b8: 4b ff 88 2c b ffc00be4 <_restgpr_31_x> =============================================================================== ffc0aed0 : rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc0aed0: 3d 20 00 00 lis r9,0 int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { ffc0aed4: 94 21 ff b8 stwu r1,-72(r1) ffc0aed8: 7c 08 02 a6 mflr r0 ffc0aedc: 81 69 27 e8 lwz r11,10216(r9) ffc0aee0: 90 01 00 4c stw r0,76(r1) ffc0aee4: 38 0b 00 01 addi r0,r11,1 ffc0aee8: bf 61 00 34 stmw r27,52(r1) ffc0aeec: 7c 7f 1b 78 mr r31,r3 ffc0aef0: 7c 9e 23 78 mr r30,r4 ffc0aef4: 90 a1 00 28 stw r5,40(r1) ffc0aef8: 90 c1 00 2c stw r6,44(r1) ffc0aefc: 90 09 27 e8 stw r0,10216(r9) POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0af00: 70 9c 02 00 andi. r28,r4,512 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; ffc0af04: 3b a0 00 00 li r29,0 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { ffc0af08: 41 a2 00 20 beq+ ffc0af28 va_start(arg, oflag); ffc0af0c: 38 01 00 50 addi r0,r1,80 ffc0af10: 90 01 00 18 stw r0,24(r1) ffc0af14: 39 21 00 20 addi r9,r1,32 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0af18: 38 00 00 04 li r0,4 Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); ffc0af1c: 91 21 00 1c stw r9,28(r1) mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); ffc0af20: 98 01 00 14 stb r0,20(r1) ffc0af24: 83 a9 00 0c lwz r29,12(r9) va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); ffc0af28: 7f e3 fb 78 mr r3,r31 ffc0af2c: 38 81 00 08 addi r4,r1,8 ffc0af30: 48 00 6b 15 bl ffc11a44 <_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 ) { ffc0af34: 7c 7b 1b 79 mr. r27,r3 ffc0af38: 41 82 00 24 beq- ffc0af5c /* * 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) ) ) { ffc0af3c: 2f 9b 00 02 cmpwi cr7,r27,2 ffc0af40: 40 9e 00 0c bne- cr7,ffc0af4c <== NEVER TAKEN ffc0af44: 2f 9c 00 00 cmpwi cr7,r28,0 ffc0af48: 40 9e 00 68 bne- cr7,ffc0afb0 _Thread_Enable_dispatch(); ffc0af4c: 48 00 31 79 bl ffc0e0c4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); ffc0af50: 48 00 9d 25 bl ffc14c74 <__errno> ffc0af54: 93 63 00 00 stw r27,0(r3) ffc0af58: 48 00 00 20 b ffc0af78 /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { ffc0af5c: 73 de 0a 00 andi. r30,r30,2560 ffc0af60: 2f 9e 0a 00 cmpwi cr7,r30,2560 ffc0af64: 40 be 00 1c bne+ cr7,ffc0af80 _Thread_Enable_dispatch(); ffc0af68: 48 00 31 5d bl ffc0e0c4 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); ffc0af6c: 48 00 9d 09 bl ffc14c74 <__errno> ffc0af70: 38 00 00 11 li r0,17 ffc0af74: 90 03 00 00 stw r0,0(r3) ffc0af78: 38 60 ff ff li r3,-1 ffc0af7c: 48 00 00 64 b ffc0afe0 ffc0af80: 80 81 00 08 lwz r4,8(r1) ffc0af84: 3c 60 00 00 lis r3,0 ffc0af88: 38 a1 00 10 addi r5,r1,16 ffc0af8c: 38 63 30 ac addi r3,r3,12460 ffc0af90: 48 00 23 a1 bl ffc0d330 <_Objects_Get> } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; ffc0af94: 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 ); ffc0af98: 90 61 00 0c stw r3,12(r1) the_semaphore->open_count += 1; ffc0af9c: 38 09 00 01 addi r0,r9,1 ffc0afa0: 90 03 00 18 stw r0,24(r3) _Thread_Enable_dispatch(); ffc0afa4: 48 00 31 21 bl ffc0e0c4 <_Thread_Enable_dispatch> _Thread_Enable_dispatch(); ffc0afa8: 48 00 31 1d bl ffc0e0c4 <_Thread_Enable_dispatch> goto return_id; ffc0afac: 48 00 00 2c b ffc0afd8 /* * 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( ffc0afb0: 7f e3 fb 78 mr r3,r31 ffc0afb4: 38 80 00 00 li r4,0 ffc0afb8: 7f a5 eb 78 mr r5,r29 ffc0afbc: 38 c1 00 0c addi r6,r1,12 ffc0afc0: 48 00 69 11 bl ffc118d0 <_POSIX_Semaphore_Create_support> ffc0afc4: 7c 7f 1b 78 mr r31,r3 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); ffc0afc8: 48 00 30 fd bl ffc0e0c4 <_Thread_Enable_dispatch> if ( status == -1 ) ffc0afcc: 2f 9f ff ff cmpwi cr7,r31,-1 return SEM_FAILED; ffc0afd0: 38 60 ff ff li r3,-1 * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) ffc0afd4: 41 9e 00 0c beq- cr7,ffc0afe0 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; ffc0afd8: 80 61 00 0c lwz r3,12(r1) ffc0afdc: 38 63 00 08 addi r3,r3,8 #endif return id; } ffc0afe0: 39 61 00 48 addi r11,r1,72 ffc0afe4: 4b ff 8d b0 b ffc03d94 <_restgpr_27_x> =============================================================================== ffc08148 : struct sigaction *oact ) { ISR_Level level; if ( oact ) ffc08148: 7c a9 2b 79 mr. r9,r5 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { ffc0814c: 94 21 ff e8 stwu r1,-24(r1) ffc08150: 7c 08 02 a6 mflr r0 ffc08154: bf 81 00 08 stmw r28,8(r1) ffc08158: 7c 9f 23 78 mr r31,r4 ffc0815c: 90 01 00 1c stw r0,28(r1) ISR_Level level; if ( oact ) ffc08160: 41 82 00 1c beq- ffc0817c *oact = _POSIX_signals_Vectors[ sig ]; ffc08164: 1c 03 00 0c mulli r0,r3,12 ffc08168: 3d 60 00 00 lis r11,0 ffc0816c: 39 6b 31 c0 addi r11,r11,12736 ffc08170: 7d 6b 02 14 add r11,r11,r0 ffc08174: 7c ab 64 aa lswi r5,r11,12 ffc08178: 7c a9 65 aa stswi r5,r9,12 if ( !sig ) ffc0817c: 2f 83 00 00 cmpwi cr7,r3,0 ffc08180: 41 9e 00 18 beq- cr7,ffc08198 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc08184: 38 03 ff ff addi r0,r3,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) ffc08188: 2b 80 00 1f cmplwi cr7,r0,31 ffc0818c: 41 9d 00 0c bgt- cr7,ffc08198 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) ffc08190: 2f 83 00 09 cmpwi cr7,r3,9 ffc08194: 40 be 00 18 bne+ cr7,ffc081ac rtems_set_errno_and_return_minus_one( EINVAL ); ffc08198: 48 00 94 29 bl ffc115c0 <__errno> ffc0819c: 38 00 00 16 li r0,22 ffc081a0: 90 03 00 00 stw r0,0(r3) ffc081a4: 38 00 ff ff li r0,-1 ffc081a8: 48 00 00 6c b ffc08214 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { ffc081ac: 2f 9f 00 00 cmpwi cr7,r31,0 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; ffc081b0: 38 00 00 00 li r0,0 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { ffc081b4: 41 9e 00 60 beq- cr7,ffc08214 <== NEVER TAKEN static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc081b8: 7f c0 00 a6 mfmsr r30 ffc081bc: 7c 10 42 a6 mfsprg r0,0 ffc081c0: 7f c0 00 78 andc r0,r30,r0 ffc081c4: 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 ) { ffc081c8: 80 1f 00 08 lwz r0,8(r31) ffc081cc: 3f 80 00 00 lis r28,0 ffc081d0: 3b 9c 31 c0 addi r28,r28,12736 ffc081d4: 2f 80 00 00 cmpwi cr7,r0,0 ffc081d8: 1f a3 00 0c mulli r29,r3,12 ffc081dc: 40 be 00 20 bne+ cr7,ffc081fc _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; ffc081e0: 3d 20 ff c2 lis r9,-62 ffc081e4: 39 29 02 f0 addi r9,r9,752 ffc081e8: 7d 7c ea 14 add r11,r28,r29 ffc081ec: 7d 29 ea 14 add r9,r9,r29 ffc081f0: 7c a9 64 aa lswi r5,r9,12 ffc081f4: 7c ab 65 aa stswi r5,r11,12 ffc081f8: 48 00 00 14 b ffc0820c } else { _POSIX_signals_Clear_process_signals( sig ); ffc081fc: 48 00 60 cd bl ffc0e2c8 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; ffc08200: 7d 3c ea 14 add r9,r28,r29 ffc08204: 7c bf 64 aa lswi r5,r31,12 ffc08208: 7c a9 65 aa stswi r5,r9,12 return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc0820c: 7f c0 01 24 mtmsr r30 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; ffc08210: 38 00 00 00 li r0,0 } ffc08214: 39 61 00 18 addi r11,r1,24 ffc08218: 7c 03 03 78 mr r3,r0 ffc0821c: 4b ff 87 14 b ffc00930 <_restgpr_28_x> =============================================================================== ffc08674 : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc08674: 94 21 ff d0 stwu r1,-48(r1) ffc08678: 7c 08 02 a6 mflr r0 ffc0867c: bf 61 00 1c stmw r27,28(r1) ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc08680: 7c 7d 1b 79 mr. r29,r3 int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { ffc08684: 7c 9f 23 78 mr r31,r4 ffc08688: 90 01 00 34 stw r0,52(r1) ffc0868c: 7c be 2b 78 mr r30,r5 ISR_Level level; /* * Error check parameters before disabling interrupts. */ if ( !set ) ffc08690: 41 82 00 2c beq- ffc086bc /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { ffc08694: 2f 85 00 00 cmpwi cr7,r5,0 ffc08698: 41 9e 00 30 beq- cr7,ffc086c8 if ( !_Timespec_Is_valid( timeout ) ) ffc0869c: 7c a3 2b 78 mr r3,r5 ffc086a0: 48 00 3e 09 bl ffc0c4a8 <_Timespec_Is_valid> ffc086a4: 2f 83 00 00 cmpwi cr7,r3,0 ffc086a8: 41 9e 00 14 beq- cr7,ffc086bc rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); ffc086ac: 7f c3 f3 78 mr r3,r30 ffc086b0: 48 00 3e 7d bl ffc0c52c <_Timespec_To_ticks> if ( !interval ) ffc086b4: 7c 64 1b 79 mr. r4,r3 ffc086b8: 40 a2 00 14 bne+ ffc086cc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc086bc: 48 00 96 01 bl ffc11cbc <__errno> ffc086c0: 38 00 00 16 li r0,22 ffc086c4: 48 00 01 7c b ffc08840 /* NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; ffc086c8: 38 80 00 00 li r4,0 /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; ffc086cc: 2f 9f 00 00 cmpwi cr7,r31,0 ffc086d0: 40 be 00 08 bne+ cr7,ffc086d8 ffc086d4: 3b e1 00 08 addi r31,r1,8 the_thread = _Thread_Executing; ffc086d8: 3d 20 00 00 lis r9,0 ffc086dc: 81 29 31 70 lwz r9,12656(r9) api = the_thread->API_Extensions[ THREAD_API_POSIX ]; ffc086e0: 83 69 01 34 lwz r27,308(r9) static inline uint32_t ppc_interrupt_disable( void ) { uint32_t level; uint32_t mask; asm volatile ( ffc086e4: 7f 80 00 a6 mfmsr r28 ffc086e8: 7c 10 42 a6 mfsprg r0,0 ffc086ec: 7f 80 00 78 andc r0,r28,r0 ffc086f0: 7c 00 01 24 mtmsr r0 */ /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { ffc086f4: 80 1d 00 00 lwz r0,0(r29) ffc086f8: 80 7b 00 d4 lwz r3,212(r27) ffc086fc: 7c 0b 18 39 and. r11,r0,r3 ffc08700: 41 a2 00 40 beq+ ffc08740 /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending ); ffc08704: 4b ff ff 19 bl ffc0861c <_POSIX_signals_Get_lowest> _POSIX_signals_Clear_signals( ffc08708: 7f e5 fb 78 mr r5,r31 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_lowest( api->signals_pending ); ffc0870c: 90 7f 00 00 stw r3,0(r31) ffc08710: 7c 64 1b 78 mr r4,r3 _POSIX_signals_Clear_signals( ffc08714: 38 c0 00 00 li r6,0 ffc08718: 7f 63 db 78 mr r3,r27 ffc0871c: 38 e0 00 00 li r7,0 ffc08720: 48 00 63 69 bl ffc0ea88 <_POSIX_signals_Clear_signals> return level; } static inline void ppc_interrupt_enable( uint32_t level ) { asm volatile ( ffc08724: 7f 80 01 24 mtmsr r28 false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; ffc08728: 38 00 00 01 li r0,1 the_info->si_value.sival_int = 0; return the_info->si_signo; ffc0872c: 83 df 00 00 lwz r30,0(r31) false, false ); _ISR_Enable( level ); the_info->si_code = SI_USER; ffc08730: 90 1f 00 04 stw r0,4(r31) the_info->si_value.sival_int = 0; ffc08734: 38 00 00 00 li r0,0 ffc08738: 90 1f 00 08 stw r0,8(r31) return the_info->si_signo; ffc0873c: 48 00 01 0c b ffc08848 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { ffc08740: 3d 60 00 00 lis r11,0 ffc08744: 80 6b 28 84 lwz r3,10372(r11) ffc08748: 7c 0b 18 39 and. r11,r0,r3 ffc0874c: 41 a2 00 40 beq+ ffc0878c signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); ffc08750: 4b ff fe cd bl ffc0861c <_POSIX_signals_Get_lowest> _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc08754: 7f e5 fb 78 mr r5,r31 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); ffc08758: 7c 7e 1b 78 mr r30,r3 _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); ffc0875c: 7f c4 f3 78 mr r4,r30 ffc08760: 7f 63 db 78 mr r3,r27 ffc08764: 38 c0 00 01 li r6,1 ffc08768: 38 e0 00 00 li r7,0 ffc0876c: 48 00 63 1d bl ffc0ea88 <_POSIX_signals_Clear_signals> ffc08770: 7f 80 01 24 mtmsr r28 _ISR_Enable( level ); the_info->si_signo = signo; the_info->si_code = SI_USER; ffc08774: 38 00 00 01 li r0,1 if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_lowest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, true, false ); _ISR_Enable( level ); the_info->si_signo = signo; ffc08778: 93 df 00 00 stw r30,0(r31) the_info->si_code = SI_USER; ffc0877c: 90 1f 00 04 stw r0,4(r31) the_info->si_value.sival_int = 0; ffc08780: 38 00 00 00 li r0,0 ffc08784: 90 1f 00 08 stw r0,8(r31) return signo; ffc08788: 48 00 00 c0 b ffc08848 ffc0878c: 3d 60 00 00 lis r11,0 ffc08790: 81 4b 28 38 lwz r10,10296(r11) } the_info->si_signo = -1; ffc08794: 38 00 ff ff li r0,-1 ffc08798: 90 1f 00 00 stw r0,0(r31) ffc0879c: 38 0a 00 01 addi r0,r10,1 ffc087a0: 90 0b 28 38 stw r0,10296(r11) _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; ffc087a4: 38 00 00 04 li r0,4 ffc087a8: 90 09 00 34 stw r0,52(r9) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc087ac: 3d 60 00 00 lis r11,0 ffc087b0: 39 6b 33 4c addi r11,r11,13132 the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; ffc087b4: 80 1d 00 00 lwz r0,0(r29) } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; ffc087b8: 91 69 00 44 stw r11,68(r9) the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; ffc087bc: 90 09 00 30 stw r0,48(r9) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; ffc087c0: 38 00 00 01 li r0,1 the_thread->Wait.return_argument = the_info; ffc087c4: 93 e9 00 28 stw r31,40(r9) ffc087c8: 90 0b 00 30 stw r0,48(r11) ffc087cc: 7f 80 01 24 mtmsr r28 _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); ffc087d0: 3c 60 00 00 lis r3,0 ffc087d4: 3c a0 ff c1 lis r5,-63 ffc087d8: 38 63 33 4c addi r3,r3,13132 ffc087dc: 38 a5 c0 20 addi r5,r5,-16352 ffc087e0: 48 00 34 89 bl ffc0bc68 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); ffc087e4: 48 00 2f 31 bl ffc0b714 <_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 ); ffc087e8: 80 9f 00 00 lwz r4,0(r31) ffc087ec: 7f 63 db 78 mr r3,r27 ffc087f0: 7f e5 fb 78 mr r5,r31 ffc087f4: 38 c0 00 00 li r6,0 ffc087f8: 38 e0 00 00 li r7,0 ffc087fc: 48 00 62 8d bl ffc0ea88 <_POSIX_signals_Clear_signals> /* Set errno only if return code is not EINTR or * if EINTR was caused by a signal being caught, which * was not in our set. */ if ( (_Thread_Executing->Wait.return_code != EINTR) ffc08800: 3d 20 00 00 lis r9,0 ffc08804: 81 29 31 70 lwz r9,12656(r9) ffc08808: 80 09 00 34 lwz r0,52(r9) ffc0880c: 2f 80 00 04 cmpwi cr7,r0,4 ffc08810: 40 9e 00 20 bne- cr7,ffc08830 || !(*set & signo_to_mask( the_info->si_signo )) ) { ffc08814: 83 df 00 00 lwz r30,0(r31) ffc08818: 39 20 00 01 li r9,1 ffc0881c: 38 1e ff ff addi r0,r30,-1 ffc08820: 7d 29 00 30 slw r9,r9,r0 ffc08824: 80 1d 00 00 lwz r0,0(r29) ffc08828: 7d 2b 00 39 and. r11,r9,r0 ffc0882c: 40 a2 00 1c bne+ ffc08848 errno = _Thread_Executing->Wait.return_code; ffc08830: 48 00 94 8d bl ffc11cbc <__errno> ffc08834: 3d 20 00 00 lis r9,0 ffc08838: 81 29 31 70 lwz r9,12656(r9) ffc0883c: 80 09 00 34 lwz r0,52(r9) ffc08840: 90 03 00 00 stw r0,0(r3) return -1; ffc08844: 3b c0 ff ff li r30,-1 } return the_info->si_signo; } ffc08848: 39 61 00 30 addi r11,r1,48 ffc0884c: 7f c3 f3 78 mr r3,r30 ffc08850: 4b ff 84 94 b ffc00ce4 <_restgpr_27_x> =============================================================================== ffc0ac38 : int sigwait( const sigset_t *set, int *sig ) { ffc0ac38: 7c 2b 0b 78 mr r11,r1 ffc0ac3c: 94 21 ff f0 stwu r1,-16(r1) ffc0ac40: 7c 08 02 a6 mflr r0 int status; status = sigtimedwait( set, NULL, NULL ); ffc0ac44: 38 a0 00 00 li r5,0 int sigwait( const sigset_t *set, int *sig ) { ffc0ac48: 4b ff 7d c1 bl ffc02a08 <_savegpr_31> ffc0ac4c: 7c 9f 23 78 mr r31,r4 int status; status = sigtimedwait( set, NULL, NULL ); ffc0ac50: 38 80 00 00 li r4,0 int sigwait( const sigset_t *set, int *sig ) { ffc0ac54: 90 01 00 14 stw r0,20(r1) int status; status = sigtimedwait( set, NULL, NULL ); ffc0ac58: 4b ff fd dd bl ffc0aa34 if ( status != -1 ) { ffc0ac5c: 2f 83 ff ff cmpwi cr7,r3,-1 ffc0ac60: 41 9e 00 18 beq- cr7,ffc0ac78 if ( sig ) ffc0ac64: 2f 9f 00 00 cmpwi cr7,r31,0 *sig = status; return 0; ffc0ac68: 38 00 00 00 li r0,0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) ffc0ac6c: 41 9e 00 14 beq- cr7,ffc0ac80 <== NEVER TAKEN *sig = status; ffc0ac70: 90 7f 00 00 stw r3,0(r31) ffc0ac74: 48 00 00 0c b ffc0ac80 return 0; } return errno; ffc0ac78: 48 00 90 39 bl ffc13cb0 <__errno> ffc0ac7c: 80 03 00 00 lwz r0,0(r3) } ffc0ac80: 39 61 00 10 addi r11,r1,16 ffc0ac84: 7c 03 03 78 mr r3,r0 ffc0ac88: 4b ff 7d cc b ffc02a54 <_restgpr_31_x> =============================================================================== ffc07898 : timer_t *timerid ) { POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc07898: 2f 83 00 01 cmpwi cr7,r3,1 int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { ffc0789c: 94 21 ff f0 stwu r1,-16(r1) ffc078a0: 7c 08 02 a6 mflr r0 ffc078a4: bf c1 00 08 stmw r30,8(r1) ffc078a8: 7c 9f 23 78 mr r31,r4 ffc078ac: 7c be 2b 78 mr r30,r5 ffc078b0: 90 01 00 14 stw r0,20(r1) POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) ffc078b4: 40 9e 00 3c bne- cr7,ffc078f0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !timerid ) ffc078b8: 2f 85 00 00 cmpwi cr7,r5,0 ffc078bc: 41 9e 00 34 beq- cr7,ffc078f0 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { ffc078c0: 2f 84 00 00 cmpwi cr7,r4,0 ffc078c4: 41 9e 00 38 beq- cr7,ffc078fc /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && ffc078c8: 81 24 00 00 lwz r9,0(r4) ffc078cc: 38 09 ff ff addi r0,r9,-1 ffc078d0: 2b 80 00 01 cmplwi cr7,r0,1 ffc078d4: 41 9d 00 1c bgt- cr7,ffc078f0 <== 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 ) ffc078d8: 81 24 00 04 lwz r9,4(r4) ffc078dc: 2f 89 00 00 cmpwi cr7,r9,0 ffc078e0: 41 9e 00 10 beq- cr7,ffc078f0 <== NEVER TAKEN static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); ffc078e4: 39 29 ff ff addi r9,r9,-1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) ffc078e8: 2b 89 00 1f cmplwi cr7,r9,31 ffc078ec: 40 bd 00 10 ble+ cr7,ffc078fc <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); ffc078f0: 48 00 99 21 bl ffc11210 <__errno> ffc078f4: 38 00 00 16 li r0,22 ffc078f8: 48 00 00 34 b ffc0792c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; ffc078fc: 3d 20 00 00 lis r9,0 ffc07900: 81 69 28 14 lwz r11,10260(r9) ffc07904: 38 0b 00 01 addi r0,r11,1 ffc07908: 90 09 28 14 stw r0,10260(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 ); ffc0790c: 3c 60 00 00 lis r3,0 ffc07910: 38 63 2f 2c addi r3,r3,12076 ffc07914: 48 00 21 29 bl ffc09a3c <_Objects_Allocate> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { ffc07918: 2c 03 00 00 cmpwi r3,0 ffc0791c: 40 a2 00 1c bne+ ffc07938 _Thread_Enable_dispatch(); ffc07920: 48 00 33 29 bl ffc0ac48 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); ffc07924: 48 00 98 ed bl ffc11210 <__errno> ffc07928: 38 00 00 0b li r0,11 ffc0792c: 90 03 00 00 stw r0,0(r3) ffc07930: 38 60 ff ff li r3,-1 ffc07934: 48 00 00 88 b ffc079bc } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ffc07938: 38 00 00 02 li r0,2 ffc0793c: 98 03 00 3c stb r0,60(r3) ptimer->thread_id = _Thread_Executing->Object.id; ffc07940: 3d 20 00 00 lis r9,0 if ( evp != NULL ) { ffc07944: 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; ffc07948: 81 29 31 70 lwz r9,12656(r9) ffc0794c: 80 09 00 08 lwz r0,8(r9) ffc07950: 90 03 00 38 stw r0,56(r3) if ( evp != NULL ) { ffc07954: 41 9e 00 1c beq- cr7,ffc07970 ptimer->inf.sigev_notify = evp->sigev_notify; ffc07958: 80 1f 00 00 lwz r0,0(r31) ffc0795c: 90 03 00 40 stw r0,64(r3) ptimer->inf.sigev_signo = evp->sigev_signo; ffc07960: 80 1f 00 04 lwz r0,4(r31) ffc07964: 90 03 00 44 stw r0,68(r3) ptimer->inf.sigev_value = evp->sigev_value; ffc07968: 80 1f 00 08 lwz r0,8(r31) ffc0796c: 90 03 00 48 stw r0,72(r3) uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), ffc07970: 81 23 00 08 lwz r9,8(r3) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; ffc07974: 3d 60 00 00 lis r11,0 ffc07978: 81 4b 2f 48 lwz r10,12104(r11) } ptimer->overrun = 0; ffc0797c: 38 00 00 00 li r0,0 ffc07980: 55 2b 13 ba rlwinm r11,r9,2,14,29 ffc07984: 90 03 00 68 stw r0,104(r3) ptimer->timer_data.it_value.tv_sec = 0; ffc07988: 90 03 00 5c stw r0,92(r3) ptimer->timer_data.it_value.tv_nsec = 0; ffc0798c: 90 03 00 60 stw r0,96(r3) ptimer->timer_data.it_interval.tv_sec = 0; ffc07990: 90 03 00 54 stw r0,84(r3) ptimer->timer_data.it_interval.tv_nsec = 0; ffc07994: 90 03 00 58 stw r0,88(r3) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc07998: 90 03 00 18 stw r0,24(r3) the_watchdog->routine = routine; ffc0799c: 90 03 00 2c stw r0,44(r3) the_watchdog->id = id; ffc079a0: 90 03 00 30 stw r0,48(r3) the_watchdog->user_data = user_data; ffc079a4: 90 03 00 34 stw r0,52(r3) ffc079a8: 7c 6a 59 2e stwx r3,r10,r11 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; ffc079ac: 90 03 00 0c stw r0,12(r3) _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0); *timerid = ptimer->Object.id; ffc079b0: 91 3e 00 00 stw r9,0(r30) _Thread_Enable_dispatch(); ffc079b4: 48 00 32 95 bl ffc0ac48 <_Thread_Enable_dispatch> return 0; ffc079b8: 38 60 00 00 li r3,0 } ffc079bc: 39 61 00 10 addi r11,r1,16 ffc079c0: 4b ff 8c 60 b ffc00620 <_restgpr_30_x> =============================================================================== ffc079c4 : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc079c4: 94 21 ff c0 stwu r1,-64(r1) ffc079c8: 7c 08 02 a6 mflr r0 ffc079cc: bf 61 00 2c stmw r27,44(r1) Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc079d0: 7c bd 2b 79 mr. r29,r5 timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { ffc079d4: 7c 7f 1b 78 mr r31,r3 ffc079d8: 90 01 00 44 stw r0,68(r1) ffc079dc: 7c 9c 23 78 mr r28,r4 ffc079e0: 7c de 33 78 mr r30,r6 Objects_Locations location; bool activated; uint32_t initial_period; struct itimerspec normalize; if ( !value ) ffc079e4: 41 82 01 68 beq- ffc07b4c <== NEVER TAKEN /* * First, it verifies if the structure "value" is correct * if the number of nanoseconds is not correct return EINVAL */ if ( !_Timespec_Is_valid( &(value->it_value) ) ) { ffc079e8: 38 7d 00 08 addi r3,r29,8 ffc079ec: 48 00 40 2d bl ffc0ba18 <_Timespec_Is_valid> ffc079f0: 2f 83 00 00 cmpwi cr7,r3,0 ffc079f4: 41 9e 01 58 beq- cr7,ffc07b4c rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !_Timespec_Is_valid( &(value->it_interval) ) ) { ffc079f8: 7f a3 eb 78 mr r3,r29 ffc079fc: 48 00 40 1d bl ffc0ba18 <_Timespec_Is_valid> ffc07a00: 2f 83 00 00 cmpwi cr7,r3,0 ffc07a04: 41 9e 01 48 beq- cr7,ffc07b4c rtems_set_errno_and_return_minus_one( EINVAL ); } if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { ffc07a08: 2f 9c 00 04 cmpwi cr7,r28,4 ffc07a0c: 41 9e 00 0c beq- cr7,ffc07a18 ffc07a10: 2f 9c 00 00 cmpwi cr7,r28,0 ffc07a14: 40 9e 01 38 bne- cr7,ffc07b4c <== NEVER TAKEN } normalize = *value; /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { ffc07a18: 2f 9c 00 04 cmpwi cr7,r28,4 if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { rtems_set_errno_and_return_minus_one( EINVAL ); } normalize = *value; ffc07a1c: 39 21 00 14 addi r9,r1,20 ffc07a20: 7c bd 84 aa lswi r5,r29,16 ffc07a24: 7c a9 85 aa stswi r5,r9,16 /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { ffc07a28: 40 be 00 38 bne+ cr7,ffc07a60 struct timespec now; _TOD_Get( &now ); ffc07a2c: 3b 81 00 0c addi r28,r1,12 ffc07a30: 7f 83 e3 78 mr r3,r28 /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc07a34: 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 ); ffc07a38: 48 00 1a 91 bl ffc094c8 <_TOD_Get> /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) ffc07a3c: 7f 83 e3 78 mr r3,r28 ffc07a40: 7f 64 db 78 mr r4,r27 ffc07a44: 48 00 3f 99 bl ffc0b9dc <_Timespec_Greater_than> ffc07a48: 2f 83 00 00 cmpwi cr7,r3,0 ffc07a4c: 40 9e 01 00 bne- cr7,ffc07b4c <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value ); ffc07a50: 7f 83 e3 78 mr r3,r28 ffc07a54: 7f 64 db 78 mr r4,r27 ffc07a58: 7f 65 db 78 mr r5,r27 ffc07a5c: 48 00 3f fd bl ffc0ba58 <_Timespec_Subtract> timer_t id, Objects_Locations *location ) { return (POSIX_Timer_Control *) _Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location ); ffc07a60: 3c 60 00 00 lis r3,0 ffc07a64: 7f e4 fb 78 mr r4,r31 ffc07a68: 38 63 2f 2c addi r3,r3,12076 ffc07a6c: 38 a1 00 08 addi r5,r1,8 ffc07a70: 48 00 24 e1 bl ffc09f50 <_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 ) { ffc07a74: 80 01 00 08 lwz r0,8(r1) ffc07a78: 7c 7f 1b 78 mr r31,r3 ffc07a7c: 2f 80 00 00 cmpwi cr7,r0,0 ffc07a80: 40 9e 00 cc bne- cr7,ffc07b4c <== NEVER TAKEN case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) { ffc07a84: 80 01 00 1c lwz r0,28(r1) ffc07a88: 2f 80 00 00 cmpwi cr7,r0,0 ffc07a8c: 40 9e 00 48 bne- cr7,ffc07ad4 ffc07a90: 80 01 00 20 lwz r0,32(r1) ffc07a94: 2f 80 00 00 cmpwi cr7,r0,0 ffc07a98: 40 be 00 3c bne+ cr7,ffc07ad4 /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); ffc07a9c: 38 63 00 10 addi r3,r3,16 ffc07aa0: 48 00 44 f5 bl ffc0bf94 <_Watchdog_Remove> /* The old data of the timer are returned */ if ( ovalue ) ffc07aa4: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07aa8: 41 9e 00 10 beq- cr7,ffc07ab8 *ovalue = ptimer->timer_data; ffc07aac: 39 3f 00 54 addi r9,r31,84 ffc07ab0: 7c a9 84 aa lswi r5,r9,16 ffc07ab4: 7c be 85 aa stswi r5,r30,16 /* The new data are set */ ptimer->timer_data = normalize; ffc07ab8: 39 3f 00 54 addi r9,r31,84 ffc07abc: 39 61 00 14 addi r11,r1,20 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc07ac0: 38 00 00 04 li r0,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; ffc07ac4: 7c ab 84 aa lswi r5,r11,16 ffc07ac8: 7c a9 85 aa stswi r5,r9,16 /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; ffc07acc: 98 1f 00 3c stb r0,60(r31) ffc07ad0: 48 00 00 70 b ffc07b40 _Thread_Enable_dispatch(); return 0; } /* Convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_interval ); ffc07ad4: 7f a3 eb 78 mr r3,r29 ffc07ad8: 48 00 3f c5 bl ffc0ba9c <_Timespec_To_ticks> ffc07adc: 90 7f 00 64 stw r3,100(r31) initial_period = _Timespec_To_ticks( &normalize.it_value ); ffc07ae0: 38 61 00 1c addi r3,r1,28 ffc07ae4: 48 00 3f b9 bl ffc0ba9c <_Timespec_To_ticks> activated = _POSIX_Timer_Insert_helper( ffc07ae8: 80 bf 00 08 lwz r5,8(r31) ffc07aec: 3c c0 ff c0 lis r6,-64 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 ); ffc07af0: 7c 64 1b 78 mr r4,r3 activated = _POSIX_Timer_Insert_helper( ffc07af4: 38 c6 7b 64 addi r6,r6,31588 ffc07af8: 38 7f 00 10 addi r3,r31,16 ffc07afc: 7f e7 fb 78 mr r7,r31 ffc07b00: 48 00 68 c1 bl ffc0e3c0 <_POSIX_Timer_Insert_helper> initial_period, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { ffc07b04: 2f 83 00 00 cmpwi cr7,r3,0 ffc07b08: 41 9e 00 38 beq- cr7,ffc07b40 /* * The timer has been started and is running. So we return the * old ones in "ovalue" */ if ( ovalue ) ffc07b0c: 2f 9e 00 00 cmpwi cr7,r30,0 ffc07b10: 41 9e 00 10 beq- cr7,ffc07b20 *ovalue = ptimer->timer_data; ffc07b14: 39 3f 00 54 addi r9,r31,84 ffc07b18: 7c a9 84 aa lswi r5,r9,16 ffc07b1c: 7c be 85 aa stswi r5,r30,16 ptimer->timer_data = normalize; ffc07b20: 39 3f 00 54 addi r9,r31,84 ffc07b24: 39 61 00 14 addi r11,r1,20 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc07b28: 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; ffc07b2c: 7c ab 84 aa lswi r5,r11,16 ffc07b30: 7c a9 85 aa stswi r5,r9,16 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); ffc07b34: 38 7f 00 6c addi r3,r31,108 if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = normalize; /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; ffc07b38: 98 1f 00 3c stb r0,60(r31) _TOD_Get( &ptimer->time ); ffc07b3c: 48 00 19 8d bl ffc094c8 <_TOD_Get> _Thread_Enable_dispatch(); ffc07b40: 48 00 31 09 bl ffc0ac48 <_Thread_Enable_dispatch> return 0; ffc07b44: 38 60 00 00 li r3,0 ffc07b48: 48 00 00 14 b ffc07b5c #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EINVAL ); ffc07b4c: 48 00 96 c5 bl ffc11210 <__errno> ffc07b50: 38 00 00 16 li r0,22 ffc07b54: 90 03 00 00 stw r0,0(r3) ffc07b58: 38 60 ff ff li r3,-1 } ffc07b5c: 39 61 00 40 addi r11,r1,64 ffc07b60: 4b ff 8a b4 b ffc00614 <_restgpr_27_x> =============================================================================== ffc07724 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc07724: 94 21 ff d8 stwu r1,-40(r1) ffc07728: 7c 08 02 a6 mflr r0 ffc0772c: bf a1 00 1c stmw r29,28(r1) /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc07730: 3f a0 00 00 lis r29,0 ffc07734: 3b bd 35 34 addi r29,r29,13620 useconds_t ualarm( useconds_t useconds, useconds_t interval ) { ffc07738: 90 01 00 2c stw r0,44(r1) ffc0773c: 7c 7e 1b 78 mr r30,r3 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { ffc07740: 80 1d 00 1c lwz r0,28(r29) ffc07744: 2f 80 00 00 cmpwi cr7,r0,0 ffc07748: 40 be 00 24 bne+ cr7,ffc0776c Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; ffc0774c: 3d 20 ff c0 lis r9,-64 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; ffc07750: 90 1d 00 08 stw r0,8(r29) the_watchdog->routine = routine; ffc07754: 39 29 76 dc addi r9,r9,30428 ffc07758: 91 3d 00 1c stw r9,28(r29) useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; ffc0775c: 3b e0 00 00 li r31,0 the_watchdog->id = id; ffc07760: 90 1d 00 20 stw r0,32(r29) the_watchdog->user_data = user_data; ffc07764: 90 1d 00 24 stw r0,36(r29) ffc07768: 48 00 00 58 b ffc077c0 if ( !the_timer->routine ) { _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); ffc0776c: 7f a3 eb 78 mr r3,r29 ffc07770: 48 00 42 f1 bl ffc0ba60 <_Watchdog_Remove> useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; ffc07774: 3b e0 00 00 li r31,0 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { ffc07778: 38 63 ff fe addi r3,r3,-2 ffc0777c: 2b 83 00 01 cmplwi cr7,r3,1 ffc07780: 41 bd 00 40 bgt+ cr7,ffc077c0 <== 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); ffc07784: 80 1d 00 0c lwz r0,12(r29) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc07788: 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); ffc0778c: 80 7d 00 14 lwz r3,20(r29) ffc07790: 7c 63 02 14 add r3,r3,r0 ffc07794: 80 1d 00 18 lwz r0,24(r29) /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); ffc07798: 7c 60 18 50 subf r3,r0,r3 ffc0779c: 48 00 3c a1 bl ffc0b43c <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; ffc077a0: 81 21 00 08 lwz r9,8(r1) ffc077a4: 3c 00 00 0f lis r0,15 remaining += tp.tv_nsec / 1000; ffc077a8: 83 e1 00 0c lwz r31,12(r1) ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; ffc077ac: 60 00 42 40 ori r0,r0,16960 ffc077b0: 7c 00 49 d6 mullw r0,r0,r9 remaining += tp.tv_nsec / 1000; ffc077b4: 39 20 03 e8 li r9,1000 ffc077b8: 7f ff 4b d6 divw r31,r31,r9 ffc077bc: 7f ff 02 14 add r31,r31,r0 /* * 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 ) { ffc077c0: 2f 9e 00 00 cmpwi cr7,r30,0 ffc077c4: 41 be 00 50 beq+ cr7,ffc07814 Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; ffc077c8: 3c 00 00 0f lis r0,15 ffc077cc: 60 00 42 40 ori r0,r0,16960 ffc077d0: 7d 3e 03 96 divwu r9,r30,r0 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc077d4: 7c 09 01 d6 mullw r0,r9,r0 * 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; ffc077d8: 91 21 00 08 stw r9,8(r1) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ffc077dc: 7f c0 f0 50 subf r30,r0,r30 ffc077e0: 1f de 03 e8 mulli r30,r30,1000 ffc077e4: 93 c1 00 0c stw r30,12(r1) ticks = _Timespec_To_ticks( &tp ); ffc077e8: 3b c1 00 08 addi r30,r1,8 ffc077ec: 7f c3 f3 78 mr r3,r30 ffc077f0: 48 00 3c c1 bl ffc0b4b0 <_Timespec_To_ticks> if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); ffc077f4: 7f c3 f3 78 mr r3,r30 ffc077f8: 48 00 3c b9 bl ffc0b4b0 <_Timespec_To_ticks> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; ffc077fc: 3c 80 00 00 lis r4,0 ffc07800: 38 84 35 34 addi r4,r4,13620 ffc07804: 90 64 00 0c stw r3,12(r4) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); ffc07808: 3c 60 00 00 lis r3,0 ffc0780c: 38 63 2d 88 addi r3,r3,11656 ffc07810: 48 00 40 f5 bl ffc0b904 <_Watchdog_Insert> } return remaining; } ffc07814: 39 61 00 28 addi r11,r1,40 ffc07818: 7f e3 fb 78 mr r3,r31 ffc0781c: 4b ff 8c dc b ffc004f8 <_restgpr_29_x>