4002769c : assert( 0 ); return 0; } int POSIX_BOTTOM_REACHED() { 4002769c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 400276a0: 92 10 20 22 mov 0x22, %o1 <== NOT EXECUTED 400276a4: 11 10 00 ad sethi %hi(0x4002b400), %o0 <== NOT EXECUTED 400276a8: 15 10 00 9e sethi %hi(0x40027800), %o2 <== NOT EXECUTED 400276ac: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED 400276b0: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 400276b4: 7f ff 89 20 call 40009b34 <__assert> <== NOT EXECUTED 400276b8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 400276bc: 81 c7 e0 08 ret <== NOT EXECUTED 400276c0: 81 e8 00 00 restore <== NOT EXECUTED 400276c4 : */ #include int POSIX_MP_NOT_IMPLEMENTED() { 400276c4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 400276c8: 92 10 20 1c mov 0x1c, %o1 <== NOT EXECUTED 400276cc: 11 10 00 ad sethi %hi(0x4002b400), %o0 <== NOT EXECUTED 400276d0: 15 10 00 9e sethi %hi(0x40027800), %o2 <== NOT EXECUTED 400276d4: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED 400276d8: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 400276dc: 7f ff 89 16 call 40009b34 <__assert> <== NOT EXECUTED 400276e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 400276e4: 81 c7 e0 08 ret <== NOT EXECUTED 400276e8: 81 e8 00 00 restore <== NOT EXECUTED 40027674 : assert( 0 ); return 0; } int POSIX_NOT_IMPLEMENTED() { 40027674: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 40027678: 92 10 20 28 mov 0x28, %o1 <== NOT EXECUTED 4002767c: 11 10 00 ad sethi %hi(0x4002b400), %o0 <== NOT EXECUTED 40027680: 15 10 00 9e sethi %hi(0x40027800), %o2 <== NOT EXECUTED 40027684: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED 40027688: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 4002768c: 7f ff 89 2a call 40009b34 <__assert> <== NOT EXECUTED 40027690: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40027694: 81 c7 e0 08 ret <== NOT EXECUTED 40027698: 81 e8 00 00 restore <== NOT EXECUTED 40007de8 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40007de8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007dec: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007df0: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 4001c070 <_API_extensions_List> 40007df4: 82 10 60 70 or %g1, 0x70, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40007df8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007dfc: 80 a4 00 11 cmp %l0, %l1 40007e00: 02 80 00 0c be 40007e30 <_API_extensions_Run_postdriver+0x48> 40007e04: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40007e08: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007e0c: 80 a0 60 00 cmp %g1, 0 40007e10: 22 80 00 05 be,a 40007e24 <_API_extensions_Run_postdriver+0x3c> 40007e14: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40007e18: 9f c0 40 00 call %g1 40007e1c: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40007e20: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007e24: 80 a4 00 11 cmp %l0, %l1 40007e28: 32 bf ff f9 bne,a 40007e0c <_API_extensions_Run_postdriver+0x24> 40007e2c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007e30: 81 c7 e0 08 ret 40007e34: 81 e8 00 00 restore 40007ea4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40007ea4: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007ea8: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007eac: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 4001c070 <_API_extensions_List> 40007eb0: 82 10 60 70 or %g1, 0x70, %g1 40007eb4: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007eb8: 80 a4 00 11 cmp %l0, %l1 40007ebc: 02 80 00 0c be 40007eec <_API_extensions_Run_postswitch+0x48> 40007ec0: 25 10 00 6f sethi %hi(0x4001bc00), %l2 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 40007ec4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007ec8: 80 a0 60 00 cmp %g1, 0 40007ecc: 22 80 00 05 be,a 40007ee0 <_API_extensions_Run_postswitch+0x3c> 40007ed0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40007ed4: 9f c0 40 00 call %g1 40007ed8: d0 04 a2 bc ld [ %l2 + 0x2bc ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40007edc: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007ee0: 80 a4 00 11 cmp %l0, %l1 40007ee4: 32 bf ff f9 bne,a 40007ec8 <_API_extensions_Run_postswitch+0x24> 40007ee8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007eec: 81 c7 e0 08 ret 40007ef0: 81 e8 00 00 restore 40007e54 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40007e54: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007e58: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007e5c: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 4001c070 <_API_extensions_List> 40007e60: 82 10 60 70 or %g1, 0x70, %g1 40007e64: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007e68: 80 a4 00 11 cmp %l0, %l1 40007e6c: 02 80 00 0c be 40007e9c <_API_extensions_Run_predriver+0x48> 40007e70: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 40007e74: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007e78: 80 a0 60 00 cmp %g1, 0 40007e7c: 22 80 00 05 be,a 40007e90 <_API_extensions_Run_predriver+0x3c> 40007e80: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40007e84: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007e88: 01 00 00 00 nop <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40007e8c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007e90: 80 a4 00 11 cmp %l0, %l1 40007e94: 32 bf ff f9 bne,a 40007e78 <_API_extensions_Run_predriver+0x24> 40007e98: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007e9c: 81 c7 e0 08 ret 40007ea0: 81 e8 00 00 restore 4000a378 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 4000a378: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 4000a37c: 03 10 00 7a sethi %hi(0x4001e800), %g1 * Otherwise, we have to block. * If locked for reading and no waiters, then OK to read. * If any thread is waiting, then we wait. */ _ISR_Disable( level ); 4000a380: 7f ff e2 f9 call 40002f64 4000a384: e0 00 63 1c ld [ %g1 + 0x31c ], %l0 ! 4001eb1c <_Thread_Executing> 4000a388: 84 10 00 08 mov %o0, %g2 switch ( the_rwlock->current_state ) { 4000a38c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 4000a390: 80 a0 60 01 cmp %g1, 1 4000a394: 22 80 00 2d be,a 4000a448 <_CORE_RWLock_Release+0xd0> 4000a398: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000a39c: 0a 80 00 24 bcs 4000a42c <_CORE_RWLock_Release+0xb4> 4000a3a0: 80 a0 60 02 cmp %g1, 2 4000a3a4: 22 80 00 02 be,a 4000a3ac <_CORE_RWLock_Release+0x34> 4000a3a8: c0 24 20 34 clr [ %l0 + 0x34 ] /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 4000a3ac: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 4000a3b0: 7f ff e2 f1 call 40002f74 4000a3b4: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 4000a3b8: 40 00 09 93 call 4000ca04 <_Thread_queue_Dequeue> 4000a3bc: 90 10 00 18 mov %i0, %o0 if ( next ) { 4000a3c0: 80 a2 20 00 cmp %o0, 0 4000a3c4: 22 80 00 1f be,a 4000a440 <_CORE_RWLock_Release+0xc8> 4000a3c8: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 4000a3cc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 4000a3d0: 80 a0 60 01 cmp %g1, 1 4000a3d4: 02 80 00 26 be 4000a46c <_CORE_RWLock_Release+0xf4> 4000a3d8: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 4000a3dc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000a3e0: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4000a3e4: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 4000a3e8: 10 80 00 0a b 4000a410 <_CORE_RWLock_Release+0x98> 4000a3ec: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || 4000a3f0: 80 a0 60 01 cmp %g1, 1 4000a3f4: 02 80 00 12 be 4000a43c <_CORE_RWLock_Release+0xc4> 4000a3f8: 92 10 00 08 mov %o0, %o1 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 4000a3fc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4000a400: 90 10 00 18 mov %i0, %o0 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; 4000a404: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4000a408: 40 00 0a cd call 4000cf3c <_Thread_queue_Extract> 4000a40c: c2 26 20 48 st %g1, [ %i0 + 0x48 ] /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 4000a410: 40 00 0b 3b call 4000d0fc <_Thread_queue_First> 4000a414: 90 10 00 18 mov %i0, %o0 if ( !next || 4000a418: 80 a2 20 00 cmp %o0, 0 4000a41c: 32 bf ff f5 bne,a 4000a3f0 <_CORE_RWLock_Release+0x78> 4000a420: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4000a424: 81 c7 e0 08 ret 4000a428: 91 e8 20 00 restore %g0, 0, %o0 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: _ISR_Enable( level ); 4000a42c: 7f ff e2 d2 call 40002f74 <== NOT EXECUTED 4000a430: 01 00 00 00 nop <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4000a434: 82 10 20 02 mov 2, %g1 ! 2 <== NOT EXECUTED 4000a438: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4000a43c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000a440: 81 c7 e0 08 ret 4000a444: 81 e8 00 00 restore _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; case CORE_RWLOCK_LOCKED_FOR_READING: the_rwlock->number_of_readers -= 1; 4000a448: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 4000a44c: 80 a0 60 00 cmp %g1, 0 4000a450: 12 80 00 04 bne 4000a460 <_CORE_RWLock_Release+0xe8> 4000a454: c2 26 20 48 st %g1, [ %i0 + 0x48 ] return CORE_RWLOCK_SUCCESSFUL; } executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; break; case CORE_RWLOCK_LOCKED_FOR_WRITING: executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4000a458: 10 bf ff d5 b 4000a3ac <_CORE_RWLock_Release+0x34> 4000a45c: c0 24 20 34 clr [ %l0 + 0x34 ] case CORE_RWLOCK_LOCKED_FOR_READING: the_rwlock->number_of_readers -= 1; if ( the_rwlock->number_of_readers != 0 ) { /* must be unlocked again */ _ISR_Enable( level ); 4000a460: 7f ff e2 c5 call 40002f74 4000a464: b0 10 20 00 clr %i0 4000a468: 30 bf ff f6 b,a 4000a440 <_CORE_RWLock_Release+0xc8> next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 4000a46c: 82 10 20 02 mov 2, %g1 4000a470: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4000a474: 81 c7 e0 08 ret 4000a478: 91 e8 20 00 restore %g0, 0, %o0 4000a47c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 4000a47c: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000a480: 92 96 20 00 orcc %i0, 0, %o1 4000a484: 12 80 00 1a bne 4000a4ec <_CORE_RWLock_Timeout+0x70> 4000a488: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000a48c: 31 10 00 7a sethi %hi(0x4001e800), %i0 <== NOT EXECUTED 4000a490: c2 06 22 40 ld [ %i0 + 0x240 ], %g1 ! 4001ea40 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000a494: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000a498: c2 26 22 40 st %g1, [ %i0 + 0x240 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000a49c: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000a4a0: d2 00 63 1c ld [ %g1 + 0x31c ], %o1 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000a4a4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000a4a8: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && 4000a4ac: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000a4b0: 80 a0 e0 00 cmp %g3, 0 4000a4b4: 02 80 00 06 be 4000a4cc <_CORE_RWLock_Timeout+0x50> 4000a4b8: 03 10 00 7a sethi %hi(0x4001e800), %g1 4000a4bc: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED 4000a4c0: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 4000a4c4: 02 80 00 20 be 4000a544 <_CORE_RWLock_Timeout+0xc8> <== NOT EXECUTED 4000a4c8: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000a4cc: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000a4d0: 40 00 0a 9b call 4000cf3c <_Thread_queue_Extract> 4000a4d4: c2 22 60 34 st %g1, [ %o1 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000a4d8: c2 06 22 40 ld [ %i0 + 0x240 ], %g1 4000a4dc: 82 00 7f ff add %g1, -1, %g1 4000a4e0: c2 26 22 40 st %g1, [ %i0 + 0x240 ] 4000a4e4: 81 c7 e0 08 ret 4000a4e8: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000a4ec: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000a4f0: 80 a0 a0 04 cmp %g2, 4 4000a4f4: 18 bf ff fc bgu 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a4f8: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000a4fc: 80 a0 60 01 cmp %g1, 1 4000a500: 12 bf ff f9 bne 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a504: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000a508: 05 10 00 7a sethi %hi(0x4001e800), %g2 4000a50c: 84 10 a1 a0 or %g2, 0x1a0, %g2 ! 4001e9a0 <_Objects_Information_table> 4000a510: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000a514: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000a518: 80 a2 20 00 cmp %o0, 0 4000a51c: 02 bf ff f2 be 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a520: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000a524: 40 00 03 4a call 4000b24c <_Objects_Get> 4000a528: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000a52c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a530: 80 a0 60 00 cmp %g1, 0 4000a534: 12 bf ff ec bne 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a538: 92 10 00 08 mov %o0, %o1 4000a53c: 10 bf ff db b 4000a4a8 <_CORE_RWLock_Timeout+0x2c> 4000a540: 31 10 00 7a sethi %hi(0x4001e800), %i0 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 4000a544: 02 bf ff e5 be 4000a4d8 <_CORE_RWLock_Timeout+0x5c> <== NOT EXECUTED 4000a548: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 4000a54c: 10 bf ff e3 b 4000a4d8 <_CORE_RWLock_Timeout+0x5c> <== NOT EXECUTED 4000a550: c2 22 20 30 st %g1, [ %o0 + 0x30 ] <== NOT EXECUTED 40015150 <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 40015150: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40015154: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 40015158: a4 10 00 18 mov %i0, %l2 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 4001515c: 80 a0 40 1a cmp %g1, %i2 40015160: 0a 80 00 17 bcs 400151bc <_CORE_message_queue_Broadcast+0x6c> 40015164: b0 10 20 01 mov 1, %i0 * 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 ) { 40015168: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 4001516c: 80 a0 60 00 cmp %g1, 0 40015170: 02 80 00 0a be 40015198 <_CORE_message_queue_Broadcast+0x48> 40015174: a2 10 20 00 clr %l1 *count = 0; 40015178: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 4001517c: 81 c7 e0 08 ret <== NOT EXECUTED 40015180: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015184: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40015188: 40 00 24 ab call 4001e434 4001518c: a2 04 60 01 inc %l1 buffer, waitp->return_argument, size ); *(uint32_t *)the_thread->Wait.return_argument_1 = size; 40015190: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 40015194: f4 20 40 00 st %i2, [ %g1 ] * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { 40015198: 40 00 0b 94 call 40017fe8 <_Thread_queue_Dequeue> 4001519c: 90 10 00 12 mov %l2, %o0 400151a0: 92 10 00 19 mov %i1, %o1 400151a4: a0 10 00 08 mov %o0, %l0 400151a8: 80 a2 20 00 cmp %o0, 0 400151ac: 12 bf ff f6 bne 40015184 <_CORE_message_queue_Broadcast+0x34> 400151b0: 94 10 00 1a mov %i2, %o2 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 400151b4: e2 27 40 00 st %l1, [ %i5 ] 400151b8: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 400151bc: 81 c7 e0 08 ret 400151c0: 81 e8 00 00 restore 40015ab8 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, uint32_t maximum_message_size ) { 40015ab8: 9d e3 bf 98 save %sp, -104, %sp uint32_t message_buffering_required; uint32_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 40015abc: c0 26 20 48 clr [ %i0 + 0x48 ] ) { uint32_t message_buffering_required; uint32_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 40015ac0: f4 26 20 44 st %i2, [ %i0 + 0x44 ] the_message_queue->number_of_pending_messages = 0; the_message_queue->maximum_message_size = maximum_message_size; 40015ac4: f6 26 20 4c st %i3, [ %i0 + 0x4c ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 40015ac8: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 40015acc: c0 26 20 64 clr [ %i0 + 0x64 ] * 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)) { 40015ad0: 80 8e e0 03 btst 3, %i3 40015ad4: 02 80 00 07 be 40015af0 <_CORE_message_queue_Initialize+0x38> 40015ad8: a0 10 00 1b mov %i3, %l0 allocated_message_size += sizeof(uint32_t); 40015adc: 82 06 e0 04 add %i3, 4, %g1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 40015ae0: a0 08 7f fc and %g1, -4, %l0 } if (allocated_message_size < maximum_message_size) 40015ae4: 80 a6 c0 10 cmp %i3, %l0 40015ae8: 18 80 00 09 bgu 40015b0c <_CORE_message_queue_Initialize+0x54> 40015aec: 01 00 00 00 nop /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = maximum_pending_messages * 40015af0: b6 04 20 14 add %l0, 0x14, %i3 40015af4: 92 10 00 1a mov %i2, %o1 40015af8: 40 00 2a d1 call 4002063c <.umul> 40015afc: 90 10 00 1b mov %i3, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 40015b00: 80 a2 00 10 cmp %o0, %l0 40015b04: 1a 80 00 04 bcc 40015b14 <_CORE_message_queue_Initialize+0x5c> 40015b08: 92 10 00 08 mov %o0, %o1 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return TRUE; } 40015b0c: 81 c7 e0 08 ret <== NOT EXECUTED 40015b10: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40015b14: 11 10 00 9c sethi %hi(0x40027000), %o0 40015b18: 7f ff e6 5b call 4000f484 <_Heap_Allocate> 40015b1c: 90 12 22 dc or %o0, 0x2dc, %o0 ! 400272dc <_Workspace_Area> * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 40015b20: 80 a2 20 00 cmp %o0, 0 40015b24: 02 bf ff fa be 40015b0c <_CORE_message_queue_Initialize+0x54> 40015b28: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 40015b2c: 92 10 00 08 mov %o0, %o1 40015b30: 94 10 00 1a mov %i2, %o2 40015b34: 90 06 20 68 add %i0, 0x68, %o0 40015b38: 7f ff ff 73 call 40015904 <_Chain_Initialize> 40015b3c: 96 10 00 1b mov %i3, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 40015b40: c2 06 40 00 ld [ %i1 ], %g1 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015b44: 84 06 20 50 add %i0, 0x50, %g2 40015b48: 82 18 60 01 xor %g1, 1, %g1 40015b4c: 80 a0 00 01 cmp %g0, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40015b50: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 40015b54: c0 26 20 54 clr [ %i0 + 0x54 ] 40015b58: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40015b5c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015b60: c4 26 20 58 st %g2, [ %i0 + 0x58 ] 40015b64: 92 60 3f ff subx %g0, -1, %o1 40015b68: 94 10 20 80 mov 0x80, %o2 40015b6c: 96 10 20 06 mov 6, %o3 40015b70: 7f ff f0 5f call 40011cec <_Thread_queue_Initialize> 40015b74: b0 10 20 01 mov 1, %i0 40015b78: 81 c7 e0 08 ret 40015b7c: 81 e8 00 00 restore 40017d50 <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, boolean wait, Watchdog_Interval timeout ) { 40017d50: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40017d54: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, boolean wait, Watchdog_Interval timeout ) { 40017d58: a2 10 00 18 mov %i0, %l1 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40017d5c: 80 a0 40 1a cmp %g1, %i2 40017d60: 0a 80 00 22 bcs 40017de8 <_CORE_message_queue_Submit+0x98> 40017d64: b0 10 20 01 mov 1, %i0 /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 40017d68: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40017d6c: 80 a0 a0 00 cmp %g2, 0 40017d70: 02 80 00 22 be 40017df8 <_CORE_message_queue_Submit+0xa8> 40017d74: 01 00 00 00 nop /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 40017d78: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40017d7c: 80 a0 40 02 cmp %g1, %g2 40017d80: 18 80 00 2b bgu 40017e2c <_CORE_message_queue_Submit+0xdc> 40017d84: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 40017d88: 80 a0 60 00 cmp %g1, 0 40017d8c: 02 80 00 17 be 40017de8 <_CORE_message_queue_Submit+0x98> 40017d90: b0 10 20 02 mov 2, %i0 /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 40017d94: 03 10 00 b6 sethi %hi(0x4002d800), %g1 40017d98: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2 ! 4002dbf4 <_ISR_Nest_level> 40017d9c: 80 a0 a0 00 cmp %g2, 0 40017da0: 12 80 00 14 bne 40017df0 <_CORE_message_queue_Submit+0xa0> 40017da4: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 */ { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); 40017da8: 7f ff aa 99 call 4000280c 40017dac: e0 00 60 0c ld [ %g1 + 0xc ], %l0 ! 4002dc0c <_Thread_Executing> 40017db0: 82 10 20 01 mov 1, %g1 _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument = buffer; executing->Wait.option = size; executing->Wait.count = submit_type; 40017db4: fa 24 20 24 st %i5, [ %l0 + 0x24 ] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 40017db8: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument = buffer; 40017dbc: f2 24 20 28 st %i1, [ %l0 + 0x28 ] executing->Wait.option = size; 40017dc0: f4 24 20 30 st %i2, [ %l0 + 0x30 ] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 40017dc4: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 40017dc8: c2 24 60 30 st %g1, [ %l1 + 0x30 ] executing->Wait.id = id; executing->Wait.return_argument = buffer; executing->Wait.option = size; executing->Wait.count = submit_type; _ISR_Enable( level ); 40017dcc: 7f ff aa 94 call 4000281c 40017dd0: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40017dd4: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 40017dd8: 90 10 00 11 mov %l1, %o0 40017ddc: 15 10 00 48 sethi %hi(0x40012000), %o2 40017de0: 7f ff e7 89 call 40011c04 <_Thread_queue_Enqueue_with_handler> 40017de4: 94 12 a1 44 or %o2, 0x144, %o2 ! 40012144 <_Thread_queue_Timeout> 40017de8: 81 c7 e0 08 ret 40017dec: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 40017df0: 81 c7 e0 08 ret <== NOT EXECUTED 40017df4: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 40017df8: 7f ff e7 15 call 40011a4c <_Thread_queue_Dequeue> 40017dfc: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40017e00: a0 92 20 00 orcc %o0, 0, %l0 40017e04: 02 80 00 1b be 40017e70 <_CORE_message_queue_Submit+0x120> 40017e08: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40017e0c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40017e10: 40 00 13 b0 call 4001ccd0 40017e14: 94 10 00 1a mov %i2, %o2 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument, size ); *(size_t *)the_thread->Wait.return_argument_1 = size; 40017e18: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 the_thread->Wait.count = submit_type; 40017e1c: fa 24 20 24 st %i5, [ %l0 + 0x24 ] _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument, size ); *(size_t *)the_thread->Wait.return_argument_1 = size; 40017e20: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40017e24: 81 c7 e0 08 ret 40017e28: 91 e8 20 00 restore %g0, 0, %o0 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 40017e2c: 7f ff dc d3 call 4000f178 <_Chain_Get> 40017e30: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40017e34: a0 92 20 00 orcc %o0, 0, %l0 40017e38: 02 bf ff ee be 40017df0 <_CORE_message_queue_Submit+0xa0> 40017e3c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40017e40: 94 10 00 1a mov %i2, %o2 40017e44: 40 00 13 a3 call 4001ccd0 40017e48: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40017e4c: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40017e50: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40017e54: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40017e58: 92 10 00 10 mov %l0, %o1 40017e5c: 94 10 00 1d mov %i5, %o2 40017e60: 40 00 0c 60 call 4001afe0 <_CORE_message_queue_Insert_message> 40017e64: b0 10 20 00 clr %i0 40017e68: 81 c7 e0 08 ret 40017e6c: 81 e8 00 00 restore * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 40017e70: 10 bf ff c2 b 40017d78 <_CORE_message_queue_Submit+0x28> 40017e74: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40007f80 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 40007f80: 9d e3 bf 98 save %sp, -104, %sp /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007f84: c2 06 40 00 ld [ %i1 ], %g1 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 40007f88: 90 10 00 18 mov %i0, %o0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007f8c: c2 26 20 40 st %g1, [ %i0 + 0x40 ] 40007f90: c4 06 60 04 ld [ %i1 + 4 ], %g2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 40007f94: 80 a6 a0 00 cmp %i2, 0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007f98: c4 26 20 44 st %g2, [ %i0 + 0x44 ] 40007f9c: c8 06 60 08 ld [ %i1 + 8 ], %g4 40007fa0: c8 26 20 48 st %g4, [ %i0 + 0x48 ] 40007fa4: da 06 60 0c ld [ %i1 + 0xc ], %o5 the_mutex->lock = initial_lock; 40007fa8: f4 26 20 50 st %i2, [ %i0 + 0x50 ] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007fac: da 26 20 4c st %o5, [ %i0 + 0x4c ] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 40007fb0: 12 80 00 1c bne 40008020 <_CORE_mutex_Initialize+0xa0> 40007fb4: c0 26 20 58 clr [ %i0 + 0x58 ] the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 40007fb8: 19 10 00 6f sethi %hi(0x4001bc00), %o4 40007fbc: c6 03 22 bc ld [ %o4 + 0x2bc ], %g3 ! 4001bebc <_Thread_Executing> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 40007fc0: 82 10 20 01 mov 1, %g1 40007fc4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 40007fc8: c4 00 e0 08 ld [ %g3 + 8 ], %g2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 40007fcc: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40007fd0: 80 a1 20 02 cmp %g4, 2 40007fd4: 12 80 00 1f bne 40008050 <_CORE_mutex_Initialize+0xd0> 40007fd8: c4 26 20 60 st %g2, [ %i0 + 0x60 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < 40007fdc: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40007fe0: 80 a0 40 0d cmp %g1, %o5 40007fe4: 0a 80 00 0d bcs 40008018 <_CORE_mutex_Initialize+0x98> 40007fe8: b0 10 20 06 mov 6, %i0 the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40007fec: c4 03 22 bc ld [ %o4 + 0x2bc ], %g2 the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40007ff0: 94 10 24 00 mov 0x400, %o2 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40007ff4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40007ff8: 96 10 20 05 mov 5, %o3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40007ffc: 82 00 60 01 inc %g1 40008000: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40008004: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008008: b0 10 20 00 clr %i0 4000800c: 80 a0 00 01 cmp %g0, %g1 40008010: 40 00 0b 60 call 4000ad90 <_Thread_queue_Initialize> 40008014: 92 40 20 00 addx %g0, 0, %o1 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 40008018: 81 c7 e0 08 ret 4000801c: 81 e8 00 00 restore the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40008020: c2 06 60 08 ld [ %i1 + 8 ], %g1 if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; } else { the_mutex->nest_count = 0; 40008024: c0 26 20 54 clr [ %i0 + 0x54 ] the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40008028: 80 a0 00 01 cmp %g0, %g1 the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 4000802c: c0 26 20 5c clr [ %i0 + 0x5c ] the_mutex->holder_id = 0; 40008030: c0 26 20 60 clr [ %i0 + 0x60 ] } _Thread_queue_Initialize( 40008034: 92 40 20 00 addx %g0, 0, %o1 40008038: 94 10 24 00 mov 0x400, %o2 4000803c: 96 10 20 05 mov 5, %o3 40008040: 40 00 0b 54 call 4000ad90 <_Thread_queue_Initialize> 40008044: b0 10 20 00 clr %i0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 40008048: 81 c7 e0 08 ret 4000804c: 81 e8 00 00 restore if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008050: 80 a1 20 03 cmp %g4, 3 40008054: 32 bf ff e7 bne,a 40007ff0 <_CORE_mutex_Initialize+0x70> 40008058: c4 03 22 bc ld [ %o4 + 0x2bc ], %g2 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < 4000805c: 10 bf ff e1 b 40007fe0 <_CORE_mutex_Initialize+0x60> <== NOT EXECUTED 40008060: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 40008064 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 40008064: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40008068: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Watchdog_Interval timeout ) { Thread_Control *executing; executing = _Thread_Executing; 4000806c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40008070: 80 a0 a0 02 cmp %g2, 2 40008074: 12 80 00 08 bne 40008094 <_CORE_mutex_Seize_interrupt_blocking+0x30> 40008078: d2 00 62 bc ld [ %g1 + 0x2bc ], %o1 if ( the_mutex->holder->current_priority > executing->current_priority ) { 4000807c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 40008080: d2 02 60 14 ld [ %o1 + 0x14 ], %o1 40008084: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40008088: 80 a0 40 09 cmp %g1, %o1 4000808c: 18 80 00 16 bgu 400080e4 <_CORE_mutex_Seize_interrupt_blocking+0x80> 40008090: 01 00 00 00 nop FALSE ); } } the_mutex->blocked_count++; 40008094: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 40008098: 90 10 00 18 mov %i0, %o0 FALSE ); } } the_mutex->blocked_count++; 4000809c: 82 00 60 01 inc %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 400080a0: 92 10 00 19 mov %i1, %o1 FALSE ); } } the_mutex->blocked_count++; 400080a4: c2 26 20 58 st %g1, [ %i0 + 0x58 ] _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 400080a8: 15 10 00 2b sethi %hi(0x4000ac00), %o2 400080ac: 40 00 0a 2b call 4000a958 <_Thread_queue_Enqueue_with_handler> 400080b0: 94 12 a2 98 or %o2, 0x298, %o2 ! 4000ae98 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400080b4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400080b8: c2 00 a1 e0 ld [ %g2 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400080bc: 82 00 7f ff add %g1, -1, %g1 400080c0: c2 20 a1 e0 st %g1, [ %g2 + 0x1e0 ] 400080c4: c6 00 a1 e0 ld [ %g2 + 0x1e0 ], %g3 400080c8: 80 a0 e0 00 cmp %g3, 0 400080cc: 02 80 00 04 be 400080dc <_CORE_mutex_Seize_interrupt_blocking+0x78> 400080d0: 01 00 00 00 nop 400080d4: 81 c7 e0 08 ret <== NOT EXECUTED 400080d8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400080dc: 40 00 08 af call 4000a398 <_Thread_Dispatch> 400080e0: 81 e8 00 00 restore Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( the_mutex->holder->current_priority > executing->current_priority ) { _Thread_Change_priority( 400080e4: 40 00 07 89 call 40009f08 <_Thread_Change_priority> 400080e8: 94 10 20 00 clr %o2 FALSE ); } } the_mutex->blocked_count++; 400080ec: 10 bf ff eb b 40008098 <_CORE_mutex_Seize_interrupt_blocking+0x34> 400080f0: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 400080f4 <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 400080f4: 9d e3 bf 98 save %sp, -104, %sp * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 400080f8: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 400080fc: a0 10 00 18 mov %i0, %l0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 40008100: 80 a0 60 00 cmp %g1, 0 40008104: 02 80 00 07 be 40008120 <_CORE_mutex_Surrender+0x2c> 40008108: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 4000810c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40008110: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> 40008114: 80 a2 00 02 cmp %o0, %g2 40008118: 12 80 00 49 bne 4000823c <_CORE_mutex_Surrender+0x148> 4000811c: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 40008120: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40008124: 80 a0 60 00 cmp %g1, 0 40008128: 22 80 00 45 be,a 4000823c <_CORE_mutex_Surrender+0x148> 4000812c: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 40008130: 82 00 7f ff add %g1, -1, %g1 if ( the_mutex->nest_count != 0 ) { 40008134: 80 a0 60 00 cmp %g1, 0 40008138: 02 80 00 09 be 4000815c <_CORE_mutex_Surrender+0x68> 4000813c: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008140: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40008144: 80 a0 60 00 cmp %g1, 0 40008148: 02 80 00 3d be 4000823c <_CORE_mutex_Surrender+0x148> 4000814c: b0 10 20 00 clr %i0 40008150: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008154: 02 80 00 3a be 4000823c <_CORE_mutex_Surrender+0x148> <== NOT EXECUTED 40008158: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000815c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008160: 80 a0 a0 02 cmp %g2, 2 40008164: 22 80 00 2a be,a 4000820c <_CORE_mutex_Surrender+0x118> 40008168: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000816c: 80 a0 a0 03 cmp %g2, 3 40008170: 22 80 00 27 be,a 4000820c <_CORE_mutex_Surrender+0x118> 40008174: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) holder->resource_count--; the_mutex->holder = NULL; 40008178: c0 24 20 5c clr [ %l0 + 0x5c ] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000817c: 80 a0 a0 02 cmp %g2, 2 40008180: 02 80 00 17 be 400081dc <_CORE_mutex_Surrender+0xe8> 40008184: c0 24 20 60 clr [ %l0 + 0x60 ] 40008188: 80 a0 a0 03 cmp %g2, 3 4000818c: 22 80 00 15 be,a 400081e0 <_CORE_mutex_Surrender+0xec> 40008190: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 40008194: 40 00 09 83 call 4000a7a0 <_Thread_queue_Dequeue> 40008198: 90 10 00 10 mov %l0, %o0 4000819c: 86 92 20 00 orcc %o0, 0, %g3 400081a0: 02 80 00 2e be 40008258 <_CORE_mutex_Surrender+0x164> 400081a4: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400081a8: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 400081ac: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400081b0: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400081b4: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400081b8: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 400081bc: 80 a0 a0 02 cmp %g2, 2 400081c0: 02 80 00 21 be 40008244 <_CORE_mutex_Surrender+0x150> 400081c4: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 400081c8: 80 a0 a0 03 cmp %g2, 3 400081cc: 22 80 00 13 be,a 40008218 <_CORE_mutex_Surrender+0x124> 400081d0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400081d4: 81 c7 e0 08 ret 400081d8: 91 e8 20 00 restore %g0, 0, %o0 * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( holder->resource_count == 0 && 400081dc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400081e0: 80 a0 60 00 cmp %g1, 0 400081e4: 12 bf ff ec bne 40008194 <_CORE_mutex_Surrender+0xa0> 400081e8: 01 00 00 00 nop 400081ec: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 400081f0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 400081f4: 80 a2 40 01 cmp %o1, %g1 400081f8: 02 bf ff e7 be 40008194 <_CORE_mutex_Surrender+0xa0> 400081fc: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40008200: 40 00 07 42 call 40009f08 <_Thread_Change_priority> 40008204: 94 10 20 01 mov 1, %o2 ! 1 40008208: 30 bf ff e3 b,a 40008194 <_CORE_mutex_Surrender+0xa0> * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) holder->resource_count--; 4000820c: 82 00 7f ff add %g1, -1, %g1 40008210: 10 bf ff da b 40008178 <_CORE_mutex_Surrender+0x84> 40008214: c2 22 20 1c st %g1, [ %o0 + 0x1c ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < 40008218: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; 4000821c: 82 00 60 01 inc %g1 40008220: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 40008224: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 40008228: 80 a2 40 02 cmp %o1, %g2 4000822c: 1a 80 00 04 bcc 4000823c <_CORE_mutex_Surrender+0x148> 40008230: b0 10 20 00 clr %i0 the_thread->current_priority){ _Thread_Change_priority( 40008234: 40 00 07 35 call 40009f08 <_Thread_Change_priority> 40008238: 94 10 20 00 clr %o2 4000823c: 81 c7 e0 08 ret 40008240: 81 e8 00 00 restore switch ( the_mutex->Attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; 40008244: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40008248: 82 00 60 01 inc %g1 4000824c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 40008250: 81 c7 e0 08 ret 40008254: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008258: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 4000825c: 81 c7 e0 08 ret 40008260: 91 e8 20 00 restore %g0, 0, %o0 40008e00 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 40008e00: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 40008e04: 7f ff e6 28 call 400026a4 40008e08: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008e0c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008e10: 80 a0 60 00 cmp %g1, 0 40008e14: 12 80 00 06 bne 40008e2c <_CORE_spinlock_Release+0x2c> 40008e18: 03 10 00 58 sethi %hi(0x40016000), %g1 _ISR_Enable( level ); 40008e1c: 7f ff e6 26 call 400026b4 40008e20: b0 10 20 06 mov 6, %i0 40008e24: 81 c7 e0 08 ret 40008e28: 81 e8 00 00 restore } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 40008e2c: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 40008e30: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40008e34: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008e38: 80 a0 c0 01 cmp %g3, %g1 40008e3c: 02 80 00 06 be 40008e54 <_CORE_spinlock_Release+0x54> 40008e40: 01 00 00 00 nop _ISR_Enable( level ); 40008e44: 7f ff e6 1c call 400026b4 <== NOT EXECUTED 40008e48: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 40008e4c: 81 c7 e0 08 ret <== NOT EXECUTED 40008e50: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40008e54: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008e58: 82 00 7f ff add %g1, -1, %g1 40008e5c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40008e60: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40008e64: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40008e68: 7f ff e6 13 call 400026b4 40008e6c: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40008e70: 81 c7 e0 08 ret 40008e74: 81 e8 00 00 restore 40008e78 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, boolean wait, Watchdog_Interval timeout ) { 40008e78: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 40008e7c: 23 10 00 58 sethi %hi(0x40016000), %l1 40008e80: c2 04 63 a4 ld [ %l1 + 0x3a4 ], %g1 ! 400163a4 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 40008e84: 7f ff e6 08 call 400026a4 40008e88: a0 06 80 01 add %i2, %g1, %l0 40008e8c: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40008e90: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008e94: 80 a0 60 01 cmp %g1, 1 40008e98: 02 80 00 45 be 40008fac <_CORE_spinlock_Wait+0x134> 40008e9c: 03 10 00 58 sethi %hi(0x40016000), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40008ea0: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008ea4: 82 00 60 01 inc %g1 40008ea8: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008eac: c4 06 20 04 ld [ %i0 + 4 ], %g2 40008eb0: 80 a0 a0 00 cmp %g2, 0 40008eb4: 02 80 00 2b be 40008f60 <_CORE_spinlock_Wait+0xe8> 40008eb8: 80 a6 60 00 cmp %i1, 0 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40008ebc: 12 80 00 0d bne 40008ef0 <_CORE_spinlock_Wait+0x78> 40008ec0: 33 10 00 58 sethi %hi(0x40016000), %i1 40008ec4: 30 80 00 32 b,a 40008f8c <_CORE_spinlock_Wait+0x114> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008ec8: c2 06 62 20 ld [ %i1 + 0x220 ], %g1 ! 40016220 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008ecc: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008ed0: c2 26 62 20 st %g1, [ %i1 + 0x220 ] <== NOT EXECUTED /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40008ed4: 7f ff e5 f4 call 400026a4 <== NOT EXECUTED 40008ed8: 01 00 00 00 nop <== NOT EXECUTED 40008edc: 88 10 00 08 mov %o0, %g4 <== NOT EXECUTED _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008ee0: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40008ee4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008ee8: 02 80 00 1f be 40008f64 <_CORE_spinlock_Wait+0xec> <== NOT EXECUTED 40008eec: 03 10 00 58 sethi %hi(0x40016000), %g1 <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 40008ef0: 80 a6 a0 00 cmp %i2, 0 40008ef4: 02 80 00 06 be 40008f0c <_CORE_spinlock_Wait+0x94> 40008ef8: 01 00 00 00 nop 40008efc: c2 04 63 a4 ld [ %l1 + 0x3a4 ], %g1 <== NOT EXECUTED 40008f00: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40008f04: 08 80 00 34 bleu 40008fd4 <_CORE_spinlock_Wait+0x15c> <== NOT EXECUTED 40008f08: 01 00 00 00 nop <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 40008f0c: 7f ff e5 ea call 400026b4 40008f10: 90 10 00 04 mov %g4, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008f14: c2 06 62 20 ld [ %i1 + 0x220 ], %g1 40008f18: 82 00 7f ff add %g1, -1, %g1 40008f1c: c2 26 62 20 st %g1, [ %i1 + 0x220 ] 40008f20: c4 06 62 20 ld [ %i1 + 0x220 ], %g2 40008f24: 80 a0 a0 00 cmp %g2, 0 40008f28: 12 bf ff e8 bne 40008ec8 <_CORE_spinlock_Wait+0x50> 40008f2c: 01 00 00 00 nop _Thread_Dispatch(); 40008f30: 40 00 08 17 call 4000af8c <_Thread_Dispatch> 40008f34: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008f38: c2 06 62 20 ld [ %i1 + 0x220 ], %g1 40008f3c: 82 00 60 01 inc %g1 40008f40: c2 26 62 20 st %g1, [ %i1 + 0x220 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40008f44: 7f ff e5 d8 call 400026a4 40008f48: 01 00 00 00 nop 40008f4c: 88 10 00 08 mov %o0, %g4 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008f50: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008f54: 80 a0 60 00 cmp %g1, 0 40008f58: 12 bf ff e7 bne 40008ef4 <_CORE_spinlock_Wait+0x7c> 40008f5c: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 40008f60: 03 10 00 58 sethi %hi(0x40016000), %g1 40008f64: c6 00 62 fc ld [ %g1 + 0x2fc ], %g3 ! 400162fc <_Thread_Executing> return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 40008f68: 84 10 20 01 mov 1, %g2 40008f6c: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 40008f70: c2 00 e0 08 ld [ %g3 + 8 ], %g1 40008f74: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 40008f78: b0 10 20 00 clr %i0 40008f7c: 7f ff e5 ce call 400026b4 40008f80: 90 10 00 04 mov %g4, %o0 40008f84: 81 c7 e0 08 ret 40008f88: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 40008f8c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008f90: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008f94: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008f98: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 40008f9c: 7f ff e5 c6 call 400026b4 <== NOT EXECUTED 40008fa0: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40008fa4: 81 c7 e0 08 ret <== NOT EXECUTED 40008fa8: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40008fac: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 40008fb0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40008fb4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008fb8: 80 a0 c0 01 cmp %g3, %g1 40008fbc: 12 bf ff b9 bne 40008ea0 <_CORE_spinlock_Wait+0x28> 40008fc0: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40008fc4: 7f ff e5 bc call 400026b4 40008fc8: b0 10 20 01 mov 1, %i0 ! 1 40008fcc: 81 c7 e0 08 ret 40008fd0: 81 e8 00 00 restore /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 40008fd4: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008fd8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008fdc: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008fe0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40008fe4: 7f ff e5 b4 call 400026b4 <== NOT EXECUTED 40008fe8: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40008fec: 81 c7 e0 08 ret <== NOT EXECUTED 40008ff0: 81 e8 00 00 restore <== NOT EXECUTED 4000e4ac <_Debug_Is_enabled>: */ boolean _Debug_Is_enabled( rtems_debug_control level ) { 4000e4ac: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000e4b0: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 4001bec0 <_Debug_Level> <== NOT EXECUTED 4000e4b4: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? TRUE : FALSE; } 4000e4b8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000e4bc: 81 c3 e0 08 retl <== NOT EXECUTED 4000e4c0: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 4000668c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4000668c: 9d e3 bf 98 save %sp, -104, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Event_Sync_states sync_state; executing = _Thread_Executing; 40006690: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006694: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 ! 4001bebc <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 40006698: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 4000669c: 7f ff ee 53 call 40001fe8 400066a0: e4 04 21 6c ld [ %l0 + 0x16c ], %l2 400066a4: 84 10 00 08 mov %o0, %g2 pending_events = api->pending_events; 400066a8: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 400066ac: a2 8e 00 01 andcc %i0, %g1, %l1 400066b0: 02 80 00 0e be 400066e8 <_Event_Seize+0x5c> 400066b4: 80 8e 60 01 btst 1, %i1 400066b8: 80 a6 00 11 cmp %i0, %l1 400066bc: 02 80 00 04 be 400066cc <_Event_Seize+0x40> 400066c0: 80 8e 60 02 btst 2, %i1 400066c4: 02 80 00 09 be 400066e8 <_Event_Seize+0x5c> 400066c8: 80 8e 60 01 btst 1, %i1 (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 400066cc: 82 28 40 11 andn %g1, %l1, %g1 400066d0: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 400066d4: 7f ff ee 49 call 40001ff8 400066d8: 01 00 00 00 nop *event_out = seized_events; 400066dc: e2 26 c0 00 st %l1, [ %i3 ] 400066e0: 81 c7 e0 08 ret 400066e4: 81 e8 00 00 restore return; } if ( _Options_Is_no_wait( option_set ) ) { 400066e8: 12 80 00 1e bne 40006760 <_Event_Seize+0xd4> 400066ec: 82 10 20 01 mov 1, %g1 executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED; 400066f0: 23 10 00 71 sethi %hi(0x4001c400), %l1 executing->Wait.option = (uint32_t ) option_set; 400066f4: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t ) event_in; 400066f8: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 400066fc: f6 24 20 28 st %i3, [ %l0 + 0x28 ] executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED; 40006700: c2 24 63 c4 st %g1, [ %l1 + 0x3c4 ] executing->Wait.option = (uint32_t ) option_set; executing->Wait.count = (uint32_t ) event_in; executing->Wait.return_argument = event_out; _ISR_Enable( level ); 40006704: 7f ff ee 3d call 40001ff8 40006708: 90 10 00 02 mov %g2, %o0 if ( ticks ) { 4000670c: 80 a6 a0 00 cmp %i2, 0 40006710: 32 80 00 24 bne,a 400067a0 <_Event_Seize+0x114> 40006714: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 40006718: 90 10 00 10 mov %l0, %o0 4000671c: 40 00 12 2f call 4000afd8 <_Thread_Set_state> 40006720: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 40006724: 7f ff ee 31 call 40001fe8 40006728: 01 00 00 00 nop 4000672c: b0 10 00 08 mov %o0, %i0 sync_state = _Event_Sync_state; 40006730: c4 04 63 c4 ld [ %l1 + 0x3c4 ], %g2 _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED; 40006734: c0 24 63 c4 clr [ %l1 + 0x3c4 ] switch ( sync_state ) { 40006738: 80 a0 a0 02 cmp %g2, 2 4000673c: 02 80 00 30 be 400067fc <_Event_Seize+0x170> 40006740: 82 10 20 06 mov 6, %g1 40006744: 80 a0 a0 03 cmp %g2, 3 40006748: 02 80 00 0d be 4000677c <_Event_Seize+0xf0> 4000674c: 80 a0 a0 01 cmp %g2, 1 40006750: 02 80 00 31 be 40006814 <_Event_Seize+0x188> 40006754: 01 00 00 00 nop 40006758: 81 c7 e0 08 ret <== NOT EXECUTED 4000675c: 81 e8 00 00 restore <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 40006760: 7f ff ee 26 call 40001ff8 40006764: 90 10 00 02 mov %g2, %o0 executing->Wait.return_code = RTEMS_UNSATISFIED; 40006768: 82 10 20 0d mov 0xd, %g1 4000676c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 40006770: e2 26 c0 00 st %l1, [ %i3 ] 40006774: 81 c7 e0 08 ret 40006778: 81 e8 00 00 restore _ISR_Enable( level ); _Thread_Unblock( executing ); return; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { 4000677c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40006780: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006784: 22 80 00 26 be,a 4000681c <_Event_Seize+0x190> <== NOT EXECUTED 40006788: c4 24 20 50 st %g2, [ %l0 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &executing->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &executing->Timer ); } else _ISR_Enable( level ); 4000678c: 7f ff ee 1b call 40001ff8 <== NOT EXECUTED 40006790: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006794: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40006798: 40 00 0e 4b call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000679c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400067a0: 92 04 20 48 add %l0, 0x48, %o1 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 400067a4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400067a8: 03 10 00 1a sethi %hi(0x40006800), %g1 400067ac: 82 10 62 50 or %g1, 0x250, %g1 ! 40006a50 <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400067b0: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400067b4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400067b8: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400067bc: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400067c0: 11 10 00 6f sethi %hi(0x4001bc00), %o0 400067c4: 40 00 14 1c call 4000b834 <_Watchdog_Insert> 400067c8: 90 12 22 dc or %o0, 0x2dc, %o0 ! 4001bedc <_Watchdog_Ticks_chain> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 400067cc: 90 10 00 10 mov %l0, %o0 400067d0: 40 00 12 02 call 4000afd8 <_Thread_Set_state> 400067d4: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 400067d8: 7f ff ee 04 call 40001fe8 400067dc: 01 00 00 00 nop 400067e0: b0 10 00 08 mov %o0, %i0 sync_state = _Event_Sync_state; 400067e4: c4 04 63 c4 ld [ %l1 + 0x3c4 ], %g2 _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED; 400067e8: c0 24 63 c4 clr [ %l1 + 0x3c4 ] switch ( sync_state ) { 400067ec: 80 a0 a0 02 cmp %g2, 2 400067f0: 12 bf ff d6 bne 40006748 <_Event_Seize+0xbc> 400067f4: 80 a0 a0 03 cmp %g2, 3 case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); return; case EVENT_SYNC_TIMEOUT: executing->Wait.return_code = RTEMS_TIMEOUT; 400067f8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 400067fc: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40006800: 7f ff ed fe call 40001ff8 <== NOT EXECUTED 40006804: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 40006808: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000680c: 40 00 0e 2e call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 40006810: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED * enter the synchronization states above. */ return; case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); 40006814: 7f ff ed f9 call 40001ff8 40006818: 81 e8 00 00 restore return; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { _Watchdog_Deactivate( &executing->Timer ); _ISR_Enable( level ); 4000681c: 7f ff ed f7 call 40001ff8 <== NOT EXECUTED 40006820: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &executing->Timer ); 40006824: 40 00 14 6e call 4000b9dc <_Watchdog_Remove> <== NOT EXECUTED 40006828: 90 04 20 48 add %l0, 0x48, %o0 <== NOT EXECUTED 4000682c: 10 bf ff db b 40006798 <_Event_Seize+0x10c> <== NOT EXECUTED 40006830: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 40006930 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40006930: 9d e3 bf 98 save %sp, -104, %sp 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 ]; 40006934: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 option_set = (rtems_option) the_thread->Wait.option; 40006938: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 _ISR_Disable( level ); 4000693c: 7f ff ed ab call 40001fe8 40006940: b2 10 00 18 mov %i0, %i1 40006944: a2 10 00 08 mov %o0, %l1 pending_events = api->pending_events; 40006948: c8 04 20 40 ld [ %l0 + 0x40 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 4000694c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { 40006950: 9a 88 c0 04 andcc %g3, %g4, %o5 40006954: 02 80 00 20 be 400069d4 <_Event_Surrender+0xa4> 40006958: 01 00 00 00 nop if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 4000695c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40006960: 80 88 61 00 btst 0x100, %g1 40006964: 02 80 00 08 be 40006984 <_Event_Surrender+0x54> 40006968: 19 10 00 71 sethi %hi(0x4001c400), %o4 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 4000696c: 80 a0 c0 0d cmp %g3, %o5 40006970: 02 80 00 1b be 400069dc <_Event_Surrender+0xac> 40006974: 80 8c a0 02 btst 2, %l2 40006978: 12 80 00 1a bne 400069e0 <_Event_Surrender+0xb0> 4000697c: 82 29 00 0d andn %g4, %o5, %g1 } return; } } switch ( _Event_Sync_state ) { 40006980: 19 10 00 71 sethi %hi(0x4001c400), %o4 <== NOT EXECUTED 40006984: c2 03 23 c4 ld [ %o4 + 0x3c4 ], %g1 ! 4001c7c4 <_Event_Sync_state> <== NOT EXECUTED 40006988: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000698c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40006990: 18 80 00 11 bgu 400069d4 <_Event_Surrender+0xa4> <== NOT EXECUTED 40006994: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED case EVENT_SYNC_SATISFIED: break; case EVENT_SYNC_NOTHING_HAPPENED: case EVENT_SYNC_TIMEOUT: if ( !_Thread_Is_executing( the_thread ) ) 40006998: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 4000699c: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED 400069a0: 12 80 00 0d bne 400069d4 <_Event_Surrender+0xa4> <== NOT EXECUTED 400069a4: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED break; if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 400069a8: 02 80 00 04 be 400069b8 <_Event_Surrender+0x88> <== NOT EXECUTED 400069ac: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED 400069b0: 02 80 00 09 be 400069d4 <_Event_Surrender+0xa4> <== NOT EXECUTED 400069b4: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = 400069b8: 82 29 00 0d andn %g4, %o5, %g1 <== NOT EXECUTED _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069bc: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED case EVENT_SYNC_TIMEOUT: if ( !_Thread_Is_executing( the_thread ) ) break; if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = 400069c0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 400069c4: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = EVENT_SYNC_SATISFIED; 400069c8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069cc: da 20 80 00 st %o5, [ %g2 ] <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_SATISFIED; 400069d0: c2 23 23 c4 st %g1, [ %o4 + 0x3c4 ] <== NOT EXECUTED } break; } } _ISR_Enable( level ); 400069d4: 7f ff ed 89 call 40001ff8 400069d8: 91 e8 00 11 restore %g0, %l1, %o0 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = 400069dc: 82 29 00 0d andn %g4, %o5, %g1 _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069e0: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = 400069e4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 400069e8: c0 26 60 24 clr [ %i1 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069ec: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400069f0: 7f ff ed 82 call 40001ff8 400069f4: 01 00 00 00 nop 400069f8: 7f ff ed 7c call 40001fe8 400069fc: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40006a00: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 40006a04: 80 a0 60 02 cmp %g1, 2 40006a08: 02 80 00 08 be 40006a28 <_Event_Surrender+0xf8> 40006a0c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40006a10: 90 10 00 11 mov %l1, %o0 40006a14: 7f ff ed 79 call 40001ff8 40006a18: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006a1c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006a20: 40 00 0d a9 call 4000a0c4 <_Thread_Clear_state> 40006a24: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40006a28: c2 26 60 50 st %g1, [ %i1 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 40006a2c: 7f ff ed 73 call 40001ff8 40006a30: 90 10 00 11 mov %l1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40006a34: 40 00 13 ea call 4000b9dc <_Watchdog_Remove> 40006a38: 90 06 60 48 add %i1, 0x48, %o0 40006a3c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40006a40: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006a44: 40 00 0d a0 call 4000a0c4 <_Thread_Clear_state> 40006a48: 81 e8 00 00 restore 40006a4c: 01 00 00 00 nop 40006a50 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40006a50: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40006a54: 92 96 20 00 orcc %i0, 0, %o1 40006a58: 12 80 00 25 bne 40006aec <_Event_Timeout+0x9c> 40006a5c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006a60: 21 10 00 6f sethi %hi(0x4001bc00), %l0 <== NOT EXECUTED 40006a64: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006a68: 82 00 60 01 inc %g1 <== NOT EXECUTED 40006a6c: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40006a70: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40006a74: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40006a78: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ _ISR_Disable( level ); 40006a7c: 7f ff ed 5b call 40001fe8 40006a80: 01 00 00 00 nop 40006a84: 88 10 00 08 mov %o0, %g4 if ( the_thread->Wait.count ) { /* verify thread is waiting */ 40006a88: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40006a8c: 80 a0 60 00 cmp %g1, 0 40006a90: 02 80 00 3a be 40006b78 <_Event_Timeout+0x128> 40006a94: 07 10 00 71 sethi %hi(0x4001c400), %g3 the_thread->Wait.count = 0; if ( _Event_Sync_state != EVENT_SYNC_SYNCHRONIZED && 40006a98: c2 00 e3 c4 ld [ %g3 + 0x3c4 ], %g1 ! 4001c7c4 <_Event_Sync_state> 40006a9c: 80 a0 60 00 cmp %g1, 0 40006aa0: 02 80 00 29 be 40006b44 <_Event_Timeout+0xf4> 40006aa4: c0 26 20 24 clr [ %i0 + 0x24 ] 40006aa8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40006aac: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 40006ab0: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40006ab4: 12 80 00 25 bne 40006b48 <_Event_Timeout+0xf8> <== NOT EXECUTED 40006ab8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) { 40006abc: c2 00 e3 c4 ld [ %g3 + 0x3c4 ], %g1 <== NOT EXECUTED 40006ac0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40006ac4: 02 80 00 03 be 40006ad0 <_Event_Timeout+0x80> <== NOT EXECUTED 40006ac8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_TIMEOUT; 40006acc: c2 20 e3 c4 st %g1, [ %g3 + 0x3c4 ] <== NOT EXECUTED } _ISR_Enable( level ); 40006ad0: 7f ff ed 4a call 40001ff8 <== NOT EXECUTED 40006ad4: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006ad8: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 <== NOT EXECUTED 40006adc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006ae0: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] <== NOT EXECUTED 40006ae4: 81 c7 e0 08 ret <== NOT EXECUTED 40006ae8: 81 e8 00 00 restore <== NOT EXECUTED 40006aec: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40006af0: 80 a0 a0 04 cmp %g2, 4 40006af4: 18 bf ff fc bgu 40006ae4 <_Event_Timeout+0x94> 40006af8: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40006afc: 80 a0 60 01 cmp %g1, 1 40006b00: 12 bf ff f9 bne 40006ae4 <_Event_Timeout+0x94> 40006b04: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40006b08: 05 10 00 6f sethi %hi(0x4001bc00), %g2 40006b0c: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 40006b10: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40006b14: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40006b18: 80 a2 20 00 cmp %o0, 0 40006b1c: 02 80 00 15 be 40006b70 <_Event_Timeout+0x120> 40006b20: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40006b24: 40 00 08 f5 call 40008ef8 <_Objects_Get> 40006b28: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40006b2c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006b30: 80 a0 60 00 cmp %g1, 0 40006b34: 12 bf ff ec bne 40006ae4 <_Event_Timeout+0x94> 40006b38: b0 10 00 08 mov %o0, %i0 40006b3c: 10 bf ff d0 b 40006a7c <_Event_Timeout+0x2c> 40006b40: 21 10 00 6f sethi %hi(0x4001bc00), %l0 if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) { _Event_Sync_state = EVENT_SYNC_TIMEOUT; } _ISR_Enable( level ); } else { the_thread->Wait.return_code = RTEMS_TIMEOUT; 40006b44: 82 10 20 06 mov 6, %g1 40006b48: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 40006b4c: 7f ff ed 2b call 40001ff8 40006b50: 90 10 00 04 mov %g4, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006b54: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006b58: 90 10 00 18 mov %i0, %o0 40006b5c: 40 00 0d 5a call 4000a0c4 <_Thread_Clear_state> 40006b60: 92 12 63 f8 or %o1, 0x3f8, %o1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006b64: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 40006b68: 82 00 7f ff add %g1, -1, %g1 40006b6c: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 40006b70: 81 c7 e0 08 ret 40006b74: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } } else { _ISR_Enable( level ); 40006b78: 7f ff ed 20 call 40001ff8 <== NOT EXECUTED 40006b7c: 01 00 00 00 nop <== NOT EXECUTED 40006b80: 30 bf ff f9 b,a 40006b64 <_Event_Timeout+0x114> <== NOT EXECUTED 40008438 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 40008438: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 4000843c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 40008440: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40008444: 90 10 00 19 mov %i1, %o0 40008448: 40 00 00 cd call 4000877c <_Heap_Calc_block_size> 4000844c: a0 10 00 18 mov %i0, %l0 _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 40008450: 80 a2 20 00 cmp %o0, 0 40008454: 22 80 00 1a be,a 400084bc <_Heap_Allocate+0x84> 40008458: b0 10 20 00 clr %i0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000845c: f0 06 20 08 ld [ %i0 + 8 ], %i0 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 40008460: 80 a4 00 18 cmp %l0, %i0 40008464: 22 80 00 16 be,a 400084bc <_Heap_Allocate+0x84> 40008468: b0 10 20 00 clr %i0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 4000846c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008470: 80 a2 00 01 cmp %o0, %g1 40008474: 08 80 00 16 bleu 400084cc <_Heap_Allocate+0x94> 40008478: b2 10 20 00 clr %i1 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 4000847c: 10 80 00 07 b 40008498 <_Heap_Allocate+0x60> 40008480: f0 06 20 08 ld [ %i0 + 8 ], %i0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 40008484: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008488: 80 a2 00 01 cmp %o0, %g1 4000848c: 08 80 00 11 bleu 400084d0 <_Heap_Allocate+0x98> 40008490: 94 10 00 08 mov %o0, %o2 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 40008494: f0 06 20 08 ld [ %i0 + 8 ], %i0 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 40008498: 80 a4 00 18 cmp %l0, %i0 4000849c: 12 bf ff fa bne 40008484 <_Heap_Allocate+0x4c> 400084a0: b2 06 60 01 inc %i1 400084a4: b0 10 20 00 clr %i0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 400084a8: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 400084ac: 80 a6 40 01 cmp %i1, %g1 400084b0: 08 80 00 05 bleu 400084c4 <_Heap_Allocate+0x8c> 400084b4: 01 00 00 00 nop stats->max_search = search_count; 400084b8: f2 24 20 44 st %i1, [ %l0 + 0x44 ] 400084bc: 81 c7 e0 08 ret 400084c0: 81 e8 00 00 restore return ptr; } 400084c4: 81 c7 e0 08 ret 400084c8: 81 e8 00 00 restore _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 400084cc: 94 10 00 08 mov %o0, %o2 400084d0: 92 10 00 18 mov %i0, %o1 400084d4: 40 00 00 7e call 400086cc <_Heap_Block_allocate> 400084d8: 90 10 00 10 mov %l0, %o0 ptr = _Heap_User_area(the_block); stats->allocs += 1; 400084dc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 stats->searches += search_count + 1; 400084e0: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 400084e4: 82 00 60 01 inc %g1 stats->searches += search_count + 1; 400084e8: 84 00 a0 01 inc %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 400084ec: c2 24 20 48 st %g1, [ %l0 + 0x48 ] stats->searches += search_count + 1; 400084f0: 84 00 80 19 add %g2, %i1, %g2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 400084f4: b0 06 20 08 add %i0, 8, %i0 400084f8: 10 bf ff ec b 400084a8 <_Heap_Allocate+0x70> 400084fc: c4 24 20 4c st %g2, [ %l0 + 0x4c ] 4001c548 <_Heap_Get_free_information>: */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4001c548: da 02 20 08 ld [ %o0 + 8 ], %o5 <== NOT EXECUTED ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Tail(the_heap); info->number = 0; 4001c54c: c0 22 40 00 clr [ %o1 ] <== NOT EXECUTED info->largest = 0; 4001c550: c0 22 60 04 clr [ %o1 + 4 ] <== NOT EXECUTED info->total = 0; 4001c554: c0 22 60 08 clr [ %o1 + 8 ] <== NOT EXECUTED for(the_block = _Heap_First(the_heap); the_block != tail; 4001c558: 80 a2 00 0d cmp %o0, %o5 <== NOT EXECUTED 4001c55c: 02 80 00 12 be 4001c5a4 <_Heap_Get_free_information+0x5c> <== NOT EXECUTED 4001c560: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001c564: 84 10 00 0c mov %o4, %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4001c568: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 4001c56c: c6 02 60 04 ld [ %o1 + 4 ], %g3 <== NOT EXECUTED 4001c570: 88 08 7f fe and %g1, -2, %g4 <== NOT EXECUTED uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 4001c574: 84 00 a0 01 inc %g2 <== NOT EXECUTED info->total += the_size; 4001c578: 82 03 00 04 add %o4, %g4, %g1 <== NOT EXECUTED uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 4001c57c: c4 22 40 00 st %g2, [ %o1 ] <== NOT EXECUTED info->total += the_size; 4001c580: c2 22 60 08 st %g1, [ %o1 + 8 ] <== NOT EXECUTED if ( info->largest < the_size ) 4001c584: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 4001c588: 08 80 00 03 bleu 4001c594 <_Heap_Get_free_information+0x4c> <== NOT EXECUTED 4001c58c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED info->largest = the_size; 4001c590: c8 22 60 04 st %g4, [ %o1 + 4 ] <== NOT EXECUTED info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; the_block = the_block->next) 4001c594: da 03 60 08 ld [ %o5 + 8 ], %o5 <== NOT EXECUTED info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 4001c598: 80 a2 00 0d cmp %o0, %o5 <== NOT EXECUTED 4001c59c: 32 bf ff f4 bne,a 4001c56c <_Heap_Get_free_information+0x24> <== NOT EXECUTED 4001c5a0: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED 4001c5a4: 81 c3 e0 08 retl <== NOT EXECUTED 4001c5a8: 01 00 00 00 nop 400087cc <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 400087cc: 9d e3 bf 98 save %sp, -104, %sp _H_uptr_t start; _H_uptr_t aligned_start; uint32_t overhead; Heap_Statistics *const stats = &the_heap->stats; if (page_size == 0) 400087d0: 80 a6 e0 00 cmp %i3, 0 400087d4: 12 80 00 43 bne 400088e0 <_Heap_Initialize+0x114> 400087d8: 84 8e e0 07 andcc %i3, 7, %g2 400087dc: b6 10 20 08 mov 8, %i3 <== NOT EXECUTED 400087e0: a4 10 20 00 clr %l2 <== NOT EXECUTED /* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; 400087e4: a0 06 60 08 add %i1, 8, %l0 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 400087e8: 92 10 00 1b mov %i3, %o1 400087ec: 40 00 3a b6 call 400172c4 <.urem> 400087f0: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 400087f4: 80 a2 20 00 cmp %o0, 0 400087f8: 02 80 00 05 be 4000880c <_Heap_Initialize+0x40> 400087fc: a2 04 3f f8 add %l0, -8, %l1 40008800: 82 06 c0 10 add %i3, %l0, %g1 40008804: a0 20 40 08 sub %g1, %o0, %l0 _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 40008808: a2 04 3f f8 add %l0, -8, %l1 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 4000880c: 80 a4 a0 00 cmp %l2, 0 40008810: 02 80 00 04 be 40008820 <_Heap_Initialize+0x54> 40008814: 82 10 20 10 mov 0x10, %g1 40008818: 82 06 e0 10 add %i3, 0x10, %g1 4000881c: 82 20 40 12 sub %g1, %l2, %g1 40008820: c2 26 20 14 st %g1, [ %i0 + 0x14 ] /* Calculate 'the_size' -- size of the first block so that there is enough space at the end for the permanent last block. It is equal to 'size' minus total overhead aligned down to the nearest multiple of 'page_size'. */ overhead = HEAP_OVERHEAD + (aligned_start - start); 40008824: 82 24 40 19 sub %l1, %i1, %g1 40008828: 82 00 60 08 add %g1, 8, %g1 if ( size < overhead ) 4000882c: 80 a0 40 1a cmp %g1, %i2 40008830: 18 80 00 2a bgu 400088d8 <_Heap_Initialize+0x10c> 40008834: a0 26 80 01 sub %i2, %g1, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40008838: 92 10 00 1b mov %i3, %o1 4000883c: 40 00 3a a2 call 400172c4 <.urem> 40008840: 90 10 00 10 mov %l0, %o0 return 0; /* Too small area for the heap */ the_size = size - overhead; _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 40008844: a0 a4 00 08 subcc %l0, %o0, %l0 40008848: 02 80 00 24 be 400088d8 <_Heap_Initialize+0x10c> 4000884c: 09 10 00 6e sethi %hi(0x4001b800), %g4 return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 40008850: f6 26 20 10 st %i3, [ %i0 + 0x10 ] the_heap->begin = starting_address; the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; 40008854: f6 24 40 00 st %i3, [ %l1 ] the_block->size = the_size | HEAP_PREV_USED; 40008858: 82 14 20 01 or %l0, 1, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 4000885c: c6 01 23 bc ld [ %g4 + 0x3bc ], %g3 the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; 40008860: c2 24 60 04 st %g1, [ %l1 + 4 ] _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ 40008864: e0 24 40 10 st %l0, [ %l1 + %l0 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40008868: 9a 04 40 10 add %l1, %l0, %o5 the_block->size = page_size; 4000886c: f6 23 60 04 st %i3, [ %o5 + 4 ] the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); 40008870: f0 24 60 08 st %i0, [ %l1 + 8 ] the_block->prev = _Heap_Head( the_heap ); 40008874: f0 24 60 0c st %i0, [ %l1 + 0xc ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 40008878: c6 26 20 28 st %g3, [ %i0 + 0x28 ] the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ the_block->size = page_size; stats->size = size; 4000887c: f4 26 20 2c st %i2, [ %i0 + 0x2c ] stats->free_size = the_size; 40008880: e0 26 20 30 st %l0, [ %i0 + 0x30 ] stats->min_free_size = the_size; 40008884: e0 26 20 34 st %l0, [ %i0 + 0x34 ] stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; 40008888: c0 26 20 40 clr [ %i0 + 0x40 ] stats->max_search = 0; 4000888c: c0 26 20 44 clr [ %i0 + 0x44 ] stats->allocs = 0; 40008890: c0 26 20 48 clr [ %i0 + 0x48 ] stats->searches = 0; 40008894: c0 26 20 4c clr [ %i0 + 0x4c ] stats->frees = 0; 40008898: c0 26 20 50 clr [ %i0 + 0x50 ] stats->resizes = 0; 4000889c: c0 26 20 54 clr [ %i0 + 0x54 ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 400088a0: 84 10 20 01 mov 1, %g2 stats->max_free_blocks = 1; 400088a4: c4 26 20 3c st %g2, [ %i0 + 0x3c ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 400088a8: c4 26 20 38 st %g2, [ %i0 + 0x38 ] if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 400088ac: 82 06 40 1a add %i1, %i2, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 400088b0: 86 00 e0 01 inc %g3 if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 400088b4: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; 400088b8: f2 26 20 18 st %i1, [ %i0 + 0x18 ] the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); the_block->prev = _Heap_Head( the_heap ); _Heap_Head(the_heap)->next = the_block; 400088bc: e2 26 20 08 st %l1, [ %i0 + 8 ] _Heap_Tail(the_heap)->prev = the_block; 400088c0: e2 26 20 0c st %l1, [ %i0 + 0xc ] the_heap->start = the_block; 400088c4: e2 26 20 20 st %l1, [ %i0 + 0x20 ] _HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT)); _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ 400088c8: da 26 20 24 st %o5, [ %i0 + 0x24 ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 400088cc: c6 21 23 bc st %g3, [ %g4 + 0x3bc ] return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 400088d0: 81 c7 e0 08 ret 400088d4: 91 ec 3f fc restore %l0, -4, %o0 } 400088d8: 81 c7 e0 08 ret 400088dc: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 400088e0: 02 80 00 04 be 400088f0 <_Heap_Initialize+0x124> 400088e4: 90 10 20 10 mov 0x10, %o0 400088e8: 82 06 e0 08 add %i3, 8, %g1 400088ec: b6 20 40 02 sub %g1, %g2, %i3 400088f0: 40 00 3a 75 call 400172c4 <.urem> 400088f4: 92 10 00 1b mov %i3, %o1 400088f8: 10 bf ff bb b 400087e4 <_Heap_Initialize+0x18> 400088fc: a4 10 00 08 mov %o0, %l2 4000e6d0 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 4000e6d0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 4000e6d4: e6 06 20 10 ld [ %i0 + 0x10 ], %l3 <== NOT EXECUTED Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 4000e6d8: ee 06 20 14 ld [ %i0 + 0x14 ], %l7 <== NOT EXECUTED uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 4000e6dc: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED *avail_mem_size = 0; 4000e6e0: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 4000e6e4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000e6e8: 40 00 22 f7 call 400172c4 <.urem> <== NOT EXECUTED 4000e6ec: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 4000e6f0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 4000e6f4: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000e6f8: a4 02 3f f8 add %o0, -8, %l2 <== NOT EXECUTED _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 4000e6fc: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000e700: 1a 80 00 05 bcc 4000e714 <_Heap_Resize_block+0x44> <== NOT EXECUTED 4000e704: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 4000e708: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED } 4000e70c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e710: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED *old_mem_size = 0; *avail_mem_size = 0; _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 4000e714: 80 a4 80 02 cmp %l2, %g2 <== NOT EXECUTED 4000e718: 38 bf ff fd bgu,a 4000e70c <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000e71c: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 4000e720: c6 04 a0 04 ld [ %l2 + 4 ], %g3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000e724: a8 08 ff fe and %g3, -2, %l4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e728: a2 04 80 14 add %l2, %l4, %l1 <== NOT EXECUTED old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 4000e72c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000e730: 2a bf ff f7 bcs,a 4000e70c <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000e734: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 4000e738: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000e73c: 38 bf ff f4 bgu,a 4000e70c <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000e740: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000e744: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED 4000e748: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000e74c: 02 bf ff ef be 4000e708 <_Heap_Resize_block+0x38> <== NOT EXECUTED 4000e750: aa 08 7f fe and %g1, -2, %l5 <== NOT EXECUTED !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 4000e754: 80 a0 80 11 cmp %g2, %l1 <== NOT EXECUTED 4000e758: ac 10 20 01 mov 1, %l6 <== NOT EXECUTED 4000e75c: 02 80 00 04 be 4000e76c <_Heap_Resize_block+0x9c> <== NOT EXECUTED 4000e760: ba 04 40 15 add %l1, %l5, %i5 <== NOT EXECUTED 4000e764: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED 4000e768: ac 08 60 01 and %g1, 1, %l6 <== NOT EXECUTED _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 4000e76c: 82 24 40 19 sub %l1, %i1, %g1 <== NOT EXECUTED 4000e770: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 4000e774: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED if (size > old_user_size) { 4000e778: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 4000e77c: 1a 80 00 16 bcc 4000e7d4 <_Heap_Resize_block+0x104> <== NOT EXECUTED 4000e780: b6 08 e0 01 and %g3, 1, %i3 <== NOT EXECUTED /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 4000e784: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000e788: 12 80 00 10 bne 4000e7c8 <_Heap_Resize_block+0xf8> <== NOT EXECUTED 4000e78c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 4000e790: a0 26 80 01 sub %i2, %g1, %l0 <== NOT EXECUTED uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 4000e794: 40 00 22 cc call 400172c4 <.urem> <== NOT EXECUTED 4000e798: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED *value = r ? v - r + a : v; 4000e79c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e7a0: 02 80 00 05 be 4000e7b4 <_Heap_Resize_block+0xe4> <== NOT EXECUTED 4000e7a4: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED 4000e7a8: 82 04 00 13 add %l0, %l3, %g1 <== NOT EXECUTED 4000e7ac: a0 20 40 08 sub %g1, %o0, %l0 <== NOT EXECUTED 4000e7b0: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED 4000e7b4: 0a 80 00 1d bcs 4000e828 <_Heap_Resize_block+0x158> <== NOT EXECUTED 4000e7b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 4000e7bc: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED 4000e7c0: 1a 80 00 1f bcc 4000e83c <_Heap_Resize_block+0x16c> <== NOT EXECUTED 4000e7c4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 4000e7c8: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED } 4000e7cc: 81 c7 e0 08 ret <== NOT EXECUTED 4000e7d0: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4000e7d4: a0 20 40 1a sub %g1, %i2, %l0 <== NOT EXECUTED uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 4000e7d8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4000e7dc: 40 00 22 ba call 400172c4 <.urem> <== NOT EXECUTED 4000e7e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4000e7e4: a0 a4 00 08 subcc %l0, %o0, %l0 <== NOT EXECUTED 4000e7e8: 22 80 00 0b be,a 4000e814 <_Heap_Resize_block+0x144> <== NOT EXECUTED 4000e7ec: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 4000e7f0: 86 25 00 10 sub %l4, %l0, %g3 <== NOT EXECUTED if (new_block_size < min_block_size) { 4000e7f4: 80 a5 c0 03 cmp %l7, %g3 <== NOT EXECUTED 4000e7f8: 08 80 00 1c bleu 4000e868 <_Heap_Resize_block+0x198> <== NOT EXECUTED 4000e7fc: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED uint32_t delta = min_block_size - new_block_size; 4000e800: 82 25 c0 03 sub %l7, %g3, %g1 <== NOT EXECUTED _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 4000e804: a0 a4 00 01 subcc %l0, %g1, %l0 <== NOT EXECUTED 4000e808: 32 80 00 17 bne,a 4000e864 <_Heap_Resize_block+0x194> <== NOT EXECUTED 4000e80c: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 4000e810: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000e814: 84 10 20 00 clr %g2 <== NOT EXECUTED 4000e818: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000e81c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] <== NOT EXECUTED return HEAP_RESIZE_SUCCESSFUL; } 4000e820: 81 c7 e0 08 ret <== NOT EXECUTED 4000e824: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 4000e828: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED else { uint32_t add_block_size = size - old_user_size; _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 4000e82c: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED 4000e830: 0a bf ff e7 bcs 4000e7cc <_Heap_Resize_block+0xfc> <== NOT EXECUTED 4000e834: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 4000e838: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000e83c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4000e840: 7f ff e7 a3 call 400086cc <_Heap_Block_allocate> <== NOT EXECUTED 4000e844: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 4000e848: 90 02 00 14 add %o0, %l4, %o0 <== NOT EXECUTED 4000e84c: 90 12 00 1b or %o0, %i3, %o0 <== NOT EXECUTED 4000e850: d0 24 a0 04 st %o0, [ %l2 + 4 ] <== NOT EXECUTED --stats->used_blocks; 4000e854: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED 4000e858: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000e85c: 10 bf ff ed b 4000e810 <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000e860: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 4000e864: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000e868: 12 80 00 15 bne 4000e8bc <_Heap_Resize_block+0x1ec> <== NOT EXECUTED 4000e86c: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 4000e870: 82 10 c0 1b or %g3, %i3, %g1 <== NOT EXECUTED 4000e874: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e878: 86 04 80 03 add %l2, %g3, %g3 <== NOT EXECUTED if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 4000e87c: 88 04 00 15 add %l0, %l5, %g4 <== NOT EXECUTED Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000e880: d8 04 60 0c ld [ %l1 + 0xc ], %o4 <== NOT EXECUTED _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 4000e884: c8 27 40 00 st %g4, [ %i5 ] <== NOT EXECUTED Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 4000e888: da 04 60 08 ld [ %l1 + 8 ], %o5 <== NOT EXECUTED _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 4000e88c: 84 11 20 01 or %g4, 1, %g2 <== NOT EXECUTED 4000e890: c4 20 e0 04 st %g2, [ %g3 + 4 ] <== NOT EXECUTED next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 4000e894: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED Heap_Block *prev = block->prev; block = new_block; block->next = next; 4000e898: da 20 e0 08 st %o5, [ %g3 + 8 ] <== NOT EXECUTED 4000e89c: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED block->prev = prev; 4000e8a0: d8 20 e0 0c st %o4, [ %g3 + 0xc ] <== NOT EXECUTED 4000e8a4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000e8a8: 88 01 3f fc add %g4, -4, %g4 <== NOT EXECUTED next->prev = prev->next = block; 4000e8ac: c6 23 60 0c st %g3, [ %o5 + 0xc ] <== NOT EXECUTED 4000e8b0: c6 23 20 08 st %g3, [ %o4 + 8 ] <== NOT EXECUTED 4000e8b4: 10 bf ff d7 b 4000e810 <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000e8b8: c8 27 00 00 st %g4, [ %i4 ] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { 4000e8bc: 2a bf ff d6 bcs,a 4000e814 <_Heap_Resize_block+0x144> <== NOT EXECUTED 4000e8c0: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 4000e8c4: 82 10 c0 1b or %g3, %i3, %g1 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 4000e8c8: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 4000e8cc: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e8d0: 92 04 80 03 add %l2, %g3, %o1 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 4000e8d4: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 4000e8d8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000e8dc: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 4000e8e0: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000e8e4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 4000e8e8: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000e8ec: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 4000e8f0: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4000e8f4: 7f ff e7 03 call 40008500 <_Heap_Free> <== NOT EXECUTED 4000e8f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000e8fc: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 4000e900: 10 bf ff c4 b 4000e810 <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000e904: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 4000e908 <_Heap_Size_of_user_area>: boolean _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 4000e908: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Heap_Block *the_block; Heap_Block *next_block; uint32_t the_size; if ( !_Addresses_Is_in_range( 4000e90c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 <== NOT EXECUTED 4000e910: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED 4000e914: 0a 80 00 05 bcs 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e918: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 <== NOT EXECUTED 4000e91c: 80 a6 40 11 cmp %i1, %l1 <== NOT EXECUTED 4000e920: 28 80 00 04 bleu,a 4000e930 <_Heap_Size_of_user_area+0x28> <== NOT EXECUTED 4000e924: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 <== NOT EXECUTED *size = _Addresses_Subtract ( next_block, starting_address ) + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); } 4000e928: 81 c7 e0 08 ret <== NOT EXECUTED 4000e92c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 4000e930: 40 00 22 65 call 400172c4 <.urem> <== NOT EXECUTED 4000e934: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000e938: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000e93c: 90 02 3f f8 add %o0, -8, %o0 <== NOT EXECUTED return( FALSE ); _Heap_Start_of_block( the_heap, starting_address, &the_block ); _HAssert(_Heap_Is_block_in( the_heap, the_block )); if ( !_Heap_Is_block_in( the_heap, the_block ) ) 4000e940: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000e944: 0a bf ff f9 bcs 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e948: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000e94c: 18 bf ff f7 bgu 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e950: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e954: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000e958: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000e95c: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); _HAssert(_Heap_Is_block_in( the_heap, next_block )); _HAssert(_Heap_Is_prev_used( next_block )); if ( 4000e960: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000e964: 0a bf ff f1 bcs 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e968: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000e96c: 18 bf ff ef bgu 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e970: 01 00 00 00 nop <== NOT EXECUTED 4000e974: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000e978: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000e97c: 02 bf ff eb be 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e980: 82 22 00 19 sub %o0, %i1, %g1 <== NOT EXECUTED and then add correction equal to the offset of the 'size' field of the 'Heap_Block' structure. The correction is due to the fact that 'prev_size' field of the next block is actually used as user accessible area of 'the_block'. */ *size = _Addresses_Subtract ( next_block, starting_address ) 4000e984: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 4000e988: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 4000e98c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e990: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40007c08 <_IO_Manager_initialization>: void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, uint32_t number_of_drivers ) { 40007c08: 9d e3 bf 98 save %sp, -104, %sp /* * 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 ) 40007c0c: 80 a6 80 19 cmp %i2, %i1 40007c10: 08 80 00 27 bleu 40007cac <_IO_Manager_initialization+0xa4> 40007c14: 03 10 00 72 sethi %hi(0x4001c800), %g1 /* * 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 *) 40007c18: 83 2e a0 03 sll %i2, 3, %g1 <== NOT EXECUTED 40007c1c: a1 2e a0 05 sll %i2, 5, %l0 <== NOT EXECUTED 40007c20: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40007c24: 40 00 0f cf call 4000bb60 <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED 40007c28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 40007c2c: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED memset( 40007c30: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 40007c34: f4 20 60 14 st %i2, [ %g1 + 0x14 ] <== NOT EXECUTED /* * 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 *) 40007c38: 21 10 00 72 sethi %hi(0x4001c800), %l0 <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 40007c3c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007c40: 40 00 22 ce call 40010778 <== NOT EXECUTED 40007c44: d0 24 20 18 st %o0, [ %l0 + 0x18 ] <== NOT EXECUTED _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c48: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40007c4c: 02 80 00 16 be 40007ca4 <_IO_Manager_initialization+0x9c> <== NOT EXECUTED 40007c50: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c54: 96 10 20 00 clr %o3 <== NOT EXECUTED 40007c58: 98 10 20 00 clr %o4 <== NOT EXECUTED 40007c5c: c2 03 00 18 ld [ %o4 + %i0 ], %g1 <== NOT EXECUTED 40007c60: 9a 03 00 18 add %o4, %i0, %o5 <== NOT EXECUTED 40007c64: c2 23 00 0a st %g1, [ %o4 + %o2 ] <== NOT EXECUTED 40007c68: c4 03 60 04 ld [ %o5 + 4 ], %g2 <== NOT EXECUTED 40007c6c: 86 03 00 0a add %o4, %o2, %g3 <== NOT EXECUTED 40007c70: c4 20 e0 04 st %g2, [ %g3 + 4 ] <== NOT EXECUTED 40007c74: c2 03 60 08 ld [ %o5 + 8 ], %g1 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c78: 96 02 e0 01 inc %o3 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c7c: c2 20 e0 08 st %g1, [ %g3 + 8 ] <== NOT EXECUTED 40007c80: c4 03 60 0c ld [ %o5 + 0xc ], %g2 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c84: 98 03 20 18 add %o4, 0x18, %o4 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c88: c4 20 e0 0c st %g2, [ %g3 + 0xc ] <== NOT EXECUTED 40007c8c: c8 03 60 10 ld [ %o5 + 0x10 ], %g4 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c90: 80 a2 c0 19 cmp %o3, %i1 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c94: c8 20 e0 10 st %g4, [ %g3 + 0x10 ] <== NOT EXECUTED 40007c98: c2 03 60 14 ld [ %o5 + 0x14 ], %g1 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c9c: 12 bf ff f0 bne 40007c5c <_IO_Manager_initialization+0x54> <== NOT EXECUTED 40007ca0: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] <== NOT EXECUTED 40007ca4: 81 c7 e0 08 ret <== NOT EXECUTED 40007ca8: 81 e8 00 00 restore <== NOT EXECUTED * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; _IO_Number_of_drivers = number_of_drivers; 40007cac: 05 10 00 72 sethi %hi(0x4001c800), %g2 * 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; 40007cb0: f0 20 60 18 st %i0, [ %g1 + 0x18 ] _IO_Number_of_drivers = number_of_drivers; 40007cb4: f2 20 a0 14 st %i1, [ %g2 + 0x14 ] 40007cb8: 81 c7 e0 08 ret 40007cbc: 81 e8 00 00 restore 40008940 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 40008940: 9d e3 bf 98 save %sp, -104, %sp _ISR_Signals_to_thread_executing = FALSE; 40008944: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _ISR_Nest_level = 0; 40008948: 05 10 00 6f sethi %hi(0x4001bc00), %g2 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = FALSE; 4000894c: c0 20 63 68 clr [ %g1 + 0x368 ] _ISR_Nest_level = 0; 40008950: c0 20 a2 a4 clr [ %g2 + 0x2a4 ] _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 40008954: 40 00 0c 83 call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008958: 90 10 24 00 mov 0x400, %o0 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 4000895c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40008960: a0 10 61 f4 or %g1, 0x1f4, %l0 ! 4001bdf4 <_CPU_Table> 40008964: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 { _ISR_Signals_to_thread_executing = FALSE; _ISR_Nest_level = 0; _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 40008968: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 4000896c: 80 a0 af ff cmp %g2, 0xfff 40008970: 18 80 00 07 bgu 4000898c <_ISR_Handler_initialization+0x4c> 40008974: d0 20 62 84 st %o0, [ %g1 + 0x284 ] _Internal_error_Occurred( 40008978: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000897c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40008980: 7f ff ff e0 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40008984: 94 10 20 05 mov 5, %o2 <== NOT EXECUTED 40008988: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 4000898c: 40 00 0c 75 call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008990: 90 10 00 02 mov %g2, %o0 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 40008994: c6 04 20 18 ld [ %l0 + 0x18 ], %g3 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40008998: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 4000899c: 86 02 00 03 add %o0, %g3, %g3 400089a0: 05 10 00 6f sethi %hi(0x4001bc00), %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 400089a4: d0 20 61 f0 st %o0, [ %g1 + 0x1f0 ] _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 400089a8: c6 20 a1 3c st %g3, [ %g2 + 0x13c ] #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 400089ac: 81 c7 e0 08 ret 400089b0: 81 e8 00 00 restore 4001b134 <_Objects_Copy_name_raw>: const size_t length ) { uint32_t *source_p = (uint32_t *) source; uint32_t *destination_p = (uint32_t *) destination; size_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; 4001b134: 95 32 a0 02 srl %o2, 2, %o2 <== NOT EXECUTED while ( tmp_length-- ) 4001b138: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 4001b13c: 02 80 00 09 be 4001b160 <_Objects_Copy_name_raw+0x2c> <== NOT EXECUTED 4001b140: 86 10 20 00 clr %g3 <== NOT EXECUTED 4001b144: 84 10 20 00 clr %g2 <== NOT EXECUTED *destination_p++ = *source_p++; 4001b148: c2 00 80 08 ld [ %g2 + %o0 ], %g1 <== NOT EXECUTED 4001b14c: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4001b150: c2 20 80 09 st %g1, [ %g2 + %o1 ] <== NOT EXECUTED { uint32_t *source_p = (uint32_t *) source; uint32_t *destination_p = (uint32_t *) destination; size_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; while ( tmp_length-- ) 4001b154: 80 a0 c0 0a cmp %g3, %o2 <== NOT EXECUTED 4001b158: 12 bf ff fc bne 4001b148 <_Objects_Copy_name_raw+0x14> <== NOT EXECUTED 4001b15c: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED 4001b160: 81 c3 e0 08 retl <== NOT EXECUTED 4001b164: 01 00 00 00 nop 40008a68 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40008a68: 9d e3 bf 88 save %sp, -120, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 40008a6c: c4 06 20 08 ld [ %i0 + 8 ], %g2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 40008a70: e4 16 20 10 lduh [ %i0 + 0x10 ], %l2 40008a74: 03 00 00 3f sethi %hi(0xfc00), %g1 40008a78: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008a7c: a2 08 80 01 and %g2, %g1, %l1 40008a80: 80 a4 40 12 cmp %l1, %l2 40008a84: 08 80 00 8c bleu 40008cb4 <_Objects_Extend_information+0x24c> 40008a88: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40008a8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 40008a90: a8 10 00 11 mov %l1, %l4 40008a94: ac 10 20 00 clr %l6 40008a98: a6 10 20 01 mov 1, %l3 40008a9c: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40008aa0: 80 a0 60 00 cmp %g1, 0 40008aa4: 12 80 00 a4 bne 40008d34 <_Objects_Extend_information+0x2cc> 40008aa8: ba 04 00 12 add %l0, %l2, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40008aac: 90 02 00 11 add %o0, %l1, %o0 40008ab0: 90 02 00 1d add %o0, %i5, %o0 40008ab4: 40 00 0c 2b call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008ab8: 91 2a 20 02 sll %o0, 2, %o0 40008abc: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40008ac0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 40008ac4: 83 2c e0 02 sll %l3, 2, %g1 /* * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; 40008ac8: 86 04 ff ff add %l3, -1, %g3 if ( information->maximum > minimum_index ) { 40008acc: 80 a4 40 02 cmp %l1, %g2 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40008ad0: a6 05 c0 01 add %l7, %g1, %l3 object_blocks, block_count * sizeof(void*) ); name_table = (Objects_Name *) _Addresses_Add_offset( 40008ad4: aa 00 40 13 add %g1, %l3, %l5 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40008ad8: 0a 80 00 ac bcs 40008d88 <_Objects_Extend_information+0x320> 40008adc: a4 00 40 15 add %g1, %l5, %l2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40008ae0: 80 a4 60 00 cmp %l1, 0 40008ae4: 02 80 00 09 be 40008b08 <_Objects_Extend_information+0xa0> 40008ae8: a1 28 e0 02 sll %g3, 2, %l0 information->inactive_per_block, block_count * sizeof(uint32_t ) ); memcpy( name_table, information->name_table, block_count * sizeof(Objects_Name *) ); memcpy( local_table, 40008aec: 84 10 20 00 clr %g2 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 40008af0: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40008af4: 84 00 a0 01 inc %g2 40008af8: 80 a0 80 11 cmp %g2, %l1 40008afc: 12 bf ff fd bne 40008af0 <_Objects_Extend_information+0x88> 40008b00: c0 20 40 12 clr [ %g1 + %l2 ] 40008b04: a1 28 e0 02 sll %g3, 2, %l0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40008b08: c0 24 00 17 clr [ %l0 + %l7 ] inactive_per_block[block_count] = 0; 40008b0c: c0 24 00 13 clr [ %l0 + %l3 ] name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40008b10: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40008b14: 86 05 00 01 add %l4, %g1, %g3 40008b18: 80 a0 c0 14 cmp %g3, %l4 40008b1c: 08 80 00 0a bleu 40008b44 <_Objects_Extend_information+0xdc> 40008b20: c0 25 40 10 clr [ %l5 + %l0 ] 40008b24: 83 2d 20 02 sll %l4, 2, %g1 40008b28: 84 04 80 01 add %l2, %g1, %g2 40008b2c: 82 10 00 14 mov %l4, %g1 index++ ) { local_table[ index ] = NULL; 40008b30: c0 20 80 00 clr [ %g2 ] inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 40008b34: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40008b38: 80 a0 40 03 cmp %g1, %g3 40008b3c: 12 bf ff fd bne 40008b30 <_Objects_Extend_information+0xc8> 40008b40: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40008b44: 7f ff e5 29 call 40001fe8 40008b48: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b4c: c4 06 00 00 ld [ %i0 ], %g2 40008b50: c8 16 20 04 lduh [ %i0 + 4 ], %g4 40008b54: 87 2f 60 10 sll %i5, 0x10, %g3 40008b58: 89 29 20 1b sll %g4, 0x1b, %g4 40008b5c: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40008b60: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b64: 03 00 00 40 sethi %hi(0x10000), %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40008b68: e6 26 20 38 st %l3, [ %i0 + 0x38 ] information->name_table = name_table; 40008b6c: ea 26 20 24 st %l5, [ %i0 + 0x24 ] information->local_table = local_table; 40008b70: e4 26 20 20 st %l2, [ %i0 + 0x20 ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b74: 85 28 a0 18 sll %g2, 0x18, %g2 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; 40008b78: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40008b7c: 84 10 80 01 or %g2, %g1, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40008b80: ee 26 20 3c st %l7, [ %i0 + 0x3c ] information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b84: 84 10 80 04 or %g2, %g4, %g2 40008b88: 84 10 80 03 or %g2, %g3, %g2 40008b8c: c4 26 20 0c st %g2, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40008b90: 7f ff e5 1a call 40001ff8 40008b94: 01 00 00 00 nop if ( old_tables ) 40008b98: 80 a4 20 00 cmp %l0, 0 40008b9c: 02 80 00 05 be 40008bb0 <_Objects_Extend_information+0x148> 40008ba0: 92 10 00 10 mov %l0, %o1 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40008ba4: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40008ba8: 7f ff fe 56 call 40008500 <_Heap_Free> 40008bac: 90 12 22 2c or %o0, 0x22c, %o0 ! 4001be2c <_Workspace_Area> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40008bb0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008bb4: 80 a0 60 00 cmp %g1, 0 40008bb8: 02 80 00 6a be 40008d60 <_Objects_Extend_information+0x2f8> 40008bbc: c2 16 20 44 lduh [ %i0 + 0x44 ], %g1 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40008bc0: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40008bc4: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 information->object_blocks[ block ] = 40008bc8: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 40008bcc: 40 00 38 d8 call 40016f2c <.umul> 40008bd0: 90 00 40 08 add %g1, %o0, %o0 40008bd4: 92 10 00 08 mov %o0, %o1 40008bd8: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40008bdc: 7f ff fe 17 call 40008438 <_Heap_Allocate> 40008be0: 90 12 22 2c or %o0, 0x22c, %o0 ! 4001be2c <_Workspace_Area> _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40008be4: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40008be8: a7 2d a0 02 sll %l6, 2, %l3 40008bec: d0 24 c0 10 st %o0, [ %l3 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40008bf0: c2 04 c0 12 ld [ %l3 + %l2 ], %g1 40008bf4: 80 a0 60 00 cmp %g1, 0 40008bf8: 02 80 00 7b be 40008de4 <_Objects_Extend_information+0x37c> 40008bfc: 01 00 00 00 nop 40008c00: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40008c04: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 40008c08: 40 00 38 c9 call 40016f2c <.umul> 40008c0c: a2 10 00 14 mov %l4, %l1 40008c10: c2 04 80 13 ld [ %l2 + %l3 ], %g1 name_area = (Objects_Name *) _Addresses_Add_offset( information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 40008c14: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 40008c18: a0 02 00 01 add %o0, %g1, %l0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008c1c: d4 06 20 18 ld [ %i0 + 0x18 ], %o2 name_area = (Objects_Name *) _Addresses_Add_offset( information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 40008c20: e0 20 80 13 st %l0, [ %g2 + %l3 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008c24: d6 06 20 1c ld [ %i0 + 0x1c ], %o3 40008c28: d2 04 80 13 ld [ %l2 + %l3 ], %o1 40008c2c: a8 07 bf ec add %fp, -20, %l4 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40008c30: 2b 00 00 40 sethi %hi(0x10000), %l5 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008c34: 90 10 00 14 mov %l4, %o0 40008c38: 40 00 16 42 call 4000e540 <_Chain_Initialize> 40008c3c: a4 06 20 28 add %i0, 0x28, %l2 40008c40: 30 80 00 0f b,a 40008c7c <_Objects_Extend_information+0x214> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40008c44: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40008c48: c6 16 20 44 lduh [ %i0 + 0x44 ], %g3 40008c4c: 83 28 60 18 sll %g1, 0x18, %g1 40008c50: 85 28 a0 1b sll %g2, 0x1b, %g2 40008c54: 82 10 40 15 or %g1, %l5, %g1 40008c58: 82 10 40 02 or %g1, %g2, %g1 40008c5c: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); the_object->name = (void *) name_area; 40008c60: e0 22 20 0c st %l0, [ %o0 + 0xc ] index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40008c64: c2 22 20 08 st %g1, [ %o0 + 8 ] the_object->name = (void *) name_area; name_area = _Addresses_Add_offset( name_area, information->name_length ); _Chain_Append( &information->Inactive, &the_object->Node ); 40008c68: 92 10 00 08 mov %o0, %o1 40008c6c: a0 04 00 03 add %l0, %g3, %l0 index++; 40008c70: a2 04 60 01 inc %l1 the_object->name = (void *) name_area; name_area = _Addresses_Add_offset( name_area, information->name_length ); _Chain_Append( &information->Inactive, &the_object->Node ); 40008c74: 7f ff fc a0 call 40007ef4 <_Chain_Append> 40008c78: 90 10 00 12 mov %l2, %o0 * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { 40008c7c: 7f ff fc aa call 40007f24 <_Chain_Get> 40008c80: 90 10 00 14 mov %l4, %o0 40008c84: 80 a2 20 00 cmp %o0, 0 40008c88: 32 bf ff ef bne,a 40008c44 <_Objects_Extend_information+0x1dc> 40008c8c: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008c90: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 40008c94: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 information->inactive += information->allocation_size; 40008c98: c8 16 20 34 lduh [ %i0 + 0x34 ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008c9c: c4 20 c0 13 st %g2, [ %g3 + %l3 ] information->inactive += information->allocation_size; 40008ca0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40008ca4: 82 00 40 04 add %g1, %g4, %g1 40008ca8: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 40008cac: 81 c7 e0 08 ret 40008cb0: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40008cb4: 90 10 00 12 mov %l2, %o0 40008cb8: 40 00 38 d7 call 40017014 <.udiv> 40008cbc: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40008cc0: 80 a2 20 00 cmp %o0, 0 40008cc4: 02 80 00 46 be 40008ddc <_Objects_Extend_information+0x374> 40008cc8: a8 10 00 11 mov %l1, %l4 if ( information->object_blocks[ block ] == NULL ) 40008ccc: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40008cd0: c2 00 80 00 ld [ %g2 ], %g1 40008cd4: 80 a0 60 00 cmp %g1, 0 40008cd8: 12 80 00 08 bne 40008cf8 <_Objects_Extend_information+0x290> 40008cdc: ac 10 20 00 clr %l6 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008ce0: 10 80 00 0c b 40008d10 <_Objects_Extend_information+0x2a8> <== NOT EXECUTED 40008ce4: 80 a5 00 12 cmp %l4, %l2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40008ce8: c2 00 40 02 ld [ %g1 + %g2 ], %g1 40008cec: 80 a0 60 00 cmp %g1, 0 40008cf0: 02 80 00 08 be 40008d10 <_Objects_Extend_information+0x2a8> 40008cf4: 80 a5 00 12 cmp %l4, %l2 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008cf8: ac 05 a0 01 inc %l6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008cfc: a8 05 00 10 add %l4, %l0, %l4 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008d00: 80 a5 80 08 cmp %l6, %o0 40008d04: 12 bf ff f9 bne 40008ce8 <_Objects_Extend_information+0x280> 40008d08: 83 2d a0 02 sll %l6, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008d0c: 80 a5 00 12 cmp %l4, %l2 40008d10: 2a bf ff a9 bcs,a 40008bb4 <_Objects_Extend_information+0x14c> 40008d14: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008d18: a6 02 20 01 add %o0, 1, %l3 40008d1c: 83 2c e0 01 sll %l3, 1, %g1 40008d20: 90 00 40 13 add %g1, %l3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40008d24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008d28: 80 a0 60 00 cmp %g1, 0 40008d2c: 02 bf ff 60 be 40008aac <_Objects_Extend_information+0x44> 40008d30: ba 04 00 12 add %l0, %l2, %i5 40008d34: 92 02 00 11 add %o0, %l1, %o1 40008d38: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40008d3c: 92 02 40 1d add %o1, %i5, %o1 40008d40: 90 12 22 2c or %o0, 0x22c, %o0 40008d44: 7f ff fd bd call 40008438 <_Heap_Allocate> 40008d48: 93 2a 60 02 sll %o1, 2, %o1 block_count * (sizeof(void *) + sizeof(uint32_t ) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 40008d4c: ae 92 20 00 orcc %o0, 0, %l7 40008d50: 32 bf ff 5d bne,a 40008ac4 <_Objects_Extend_information+0x5c> 40008d54: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 40008d58: 81 c7 e0 08 ret <== NOT EXECUTED 40008d5c: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 40008d60: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 40008d64: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40008d68: 40 00 38 71 call 40016f2c <.umul> 40008d6c: 90 00 40 08 add %g1, %o0, %o0 40008d70: 40 00 0b 7c call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008d74: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 40008d78: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 40008d7c: a7 2d a0 02 sll %l6, 2, %l3 40008d80: 10 bf ff a0 b 40008c00 <_Objects_Extend_information+0x198> 40008d84: d0 24 c0 10 st %o0, [ %l3 + %l0 ] /* * 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, 40008d88: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 40008d8c: a1 28 e0 02 sll %g3, 2, %l0 40008d90: 90 10 00 17 mov %l7, %o0 40008d94: 40 00 1e 4c call 400106c4 40008d98: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008d9c: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 40008da0: 94 10 00 10 mov %l0, %o2 40008da4: 40 00 1e 48 call 400106c4 40008da8: 90 10 00 13 mov %l3, %o0 information->inactive_per_block, block_count * sizeof(uint32_t ) ); memcpy( name_table, 40008dac: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 40008db0: 94 10 00 10 mov %l0, %o2 40008db4: 40 00 1e 44 call 400106c4 40008db8: 90 10 00 15 mov %l5, %o0 information->name_table, block_count * sizeof(Objects_Name *) ); memcpy( local_table, 40008dbc: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40008dc0: d2 06 20 20 ld [ %i0 + 0x20 ], %o1 40008dc4: 94 02 80 11 add %o2, %l1, %o2 40008dc8: 90 10 00 12 mov %l2, %o0 40008dcc: 40 00 1e 3e call 400106c4 40008dd0: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40008dd4: 10 bf ff 4e b 40008b0c <_Objects_Extend_information+0xa4> 40008dd8: c0 24 00 17 clr [ %l0 + %l7 ] if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008ddc: 10 bf ff cc b 40008d0c <_Objects_Extend_information+0x2a4> <== NOT EXECUTED 40008de0: ac 10 20 00 clr %l6 <== NOT EXECUTED 40008de4: 81 c7 e0 08 ret <== NOT EXECUTED 40008de8: 81 e8 00 00 restore <== NOT EXECUTED 4000a994 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 4000a994: 9d e3 bf 88 save %sp, -120, %sp 4000a998: 92 10 00 18 mov %i0, %o1 uint32_t i; char lname[5]; Objects_Control *the_object; Objects_Locations location; if ( length == 0 ) 4000a99c: 80 a6 60 00 cmp %i1, 0 4000a9a0: 12 80 00 04 bne 4000a9b0 <_Objects_Get_name_as_string+0x1c> 4000a9a4: b0 10 00 1a mov %i2, %i0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 4000a9a8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9ac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED Objects_Locations location; if ( length == 0 ) return NULL; if ( name == NULL ) 4000a9b0: 80 a6 a0 00 cmp %i2, 0 4000a9b4: 02 80 00 40 be 4000aab4 <_Objects_Get_name_as_string+0x120> 4000a9b8: 87 32 60 16 srl %o1, 0x16, %g3 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 4000a9bc: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000a9c0: 86 08 e0 1c and %g3, 0x1c, %g3 4000a9c4: 82 10 62 60 or %g1, 0x260, %g1 4000a9c8: c8 00 40 03 ld [ %g1 + %g3 ], %g4 4000a9cc: 85 32 60 1b srl %o1, 0x1b, %g2 4000a9d0: 85 28 a0 02 sll %g2, 2, %g2 4000a9d4: f4 01 00 02 ld [ %g4 + %g2 ], %i2 return NULL; information = _Objects_Get_information( id ); if ( !information ) 4000a9d8: 80 a6 a0 00 cmp %i2, 0 4000a9dc: 22 80 00 36 be,a 4000aab4 <_Objects_Get_name_as_string+0x120> 4000a9e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; the_object = _Objects_Get( information, id, &location ); 4000a9e4: 90 10 00 1a mov %i2, %o0 4000a9e8: 40 00 00 3f call 4000aae4 <_Objects_Get> 4000a9ec: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 4000a9f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a9f4: 80 a0 60 00 cmp %g1, 0 4000a9f8: 32 80 00 2f bne,a 4000aab4 <_Objects_Get_name_as_string+0x120> 4000a9fc: b0 10 20 00 clr %i0 <== NOT EXECUTED case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 4000aa00: c2 06 a0 40 ld [ %i2 + 0x40 ], %g1 4000aa04: 80 a0 60 00 cmp %g1, 0 4000aa08: 22 80 00 2d be,a 4000aabc <_Objects_Get_name_as_string+0x128> 4000aa0c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name; 4000aa10: d0 02 20 0c ld [ %o0 + 0xc ], %o0 lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { 4000aa14: 80 a6 60 01 cmp %i1, 1 4000aa18: 02 80 00 1c be 4000aa88 <_Objects_Get_name_as_string+0xf4> 4000aa1c: 9a 10 00 18 mov %i0, %o5 4000aa20: c8 0a 00 00 ldub [ %o0 ], %g4 4000aa24: 85 29 20 18 sll %g4, 0x18, %g2 4000aa28: 80 a0 a0 00 cmp %g2, 0 4000aa2c: 22 80 00 18 be,a 4000aa8c <_Objects_Get_name_as_string+0xf8> 4000aa30: c0 2b 40 00 clrb [ %o5 ] <== NOT EXECUTED 4000aa34: b2 06 7f ff add %i1, -1, %i1 4000aa38: 98 10 20 00 clr %o4 4000aa3c: 10 80 00 07 b 4000aa58 <_Objects_Get_name_as_string+0xc4> 4000aa40: 17 10 00 80 sethi %hi(0x40020000), %o3 4000aa44: c8 0a 00 00 ldub [ %o0 ], %g4 4000aa48: 85 29 20 18 sll %g4, 0x18, %g2 4000aa4c: 80 a0 a0 00 cmp %g2, 0 4000aa50: 22 80 00 0f be,a 4000aa8c <_Objects_Get_name_as_string+0xf8> 4000aa54: c0 2b 40 00 clrb [ %o5 ] <== NOT EXECUTED *d = (!isprint(*s)) ? '*' : *s; 4000aa58: c2 02 e3 30 ld [ %o3 + 0x330 ], %g1 4000aa5c: 85 38 a0 18 sra %g2, 0x18, %g2 4000aa60: c6 48 80 01 ldsb [ %g2 + %g1 ], %g3 4000aa64: 80 88 e0 97 btst 0x97, %g3 4000aa68: 12 80 00 03 bne 4000aa74 <_Objects_Get_name_as_string+0xe0> 4000aa6c: 90 02 20 01 inc %o0 4000aa70: 88 10 20 2a mov 0x2a, %g4 <== NOT EXECUTED 4000aa74: c8 2b 40 00 stb %g4, [ %o5 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { 4000aa78: 98 03 20 01 inc %o4 4000aa7c: 80 a3 00 19 cmp %o4, %i1 4000aa80: 12 bf ff f1 bne 4000aa44 <_Objects_Get_name_as_string+0xb0> 4000aa84: 9a 03 60 01 inc %o5 *d = (!isprint(*s)) ? '*' : *s; } *d = '\0'; 4000aa88: c0 2b 40 00 clrb [ %o5 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000aa8c: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000aa90: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 40028b00 <_Thread_Dispatch_disable_level> 4000aa94: 84 00 bf ff add %g2, -1, %g2 4000aa98: c4 20 63 00 st %g2, [ %g1 + 0x300 ] 4000aa9c: c6 00 63 00 ld [ %g1 + 0x300 ], %g3 4000aaa0: 80 a0 e0 00 cmp %g3, 0 4000aaa4: 12 80 00 04 bne 4000aab4 <_Objects_Get_name_as_string+0x120> 4000aaa8: 01 00 00 00 nop _Thread_Dispatch(); 4000aaac: 40 00 04 fa call 4000be94 <_Thread_Dispatch> 4000aab0: 01 00 00 00 nop 4000aab4: 81 c7 e0 08 ret 4000aab8: 81 e8 00 00 restore lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4000aabc: c0 2f bf f3 clrb [ %fp + -13 ] if ( information->is_string ) { s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; 4000aac0: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; 4000aac4: 87 30 60 10 srl %g1, 0x10, %g3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 4000aac8: c2 2f bf f2 stb %g1, [ %fp + -14 ] if ( information->is_string ) { s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; 4000aacc: c4 2f bf ef stb %g2, [ %fp + -17 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4000aad0: 83 30 60 08 srl %g1, 8, %g1 s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4000aad4: c6 2f bf f0 stb %g3, [ %fp + -16 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 4000aad8: c2 2f bf f1 stb %g1, [ %fp + -15 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4000aadc: 10 bf ff ce b 4000aa14 <_Objects_Get_name_as_string+0x80> 4000aae0: 90 07 bf ef add %fp, -17, %o0 4001b168 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 4001b168: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 4001b16c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001b170: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4001b174: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 4001b178: 22 80 00 02 be,a 4001b180 <_Objects_Get_next+0x18> <== NOT EXECUTED 4001b17c: f2 06 20 08 ld [ %i0 + 8 ], %i1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 4001b180: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001b184: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 4001b188: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 4001b18c: 82 0e 40 10 and %i1, %l0, %g1 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 4001b190: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001b194: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 4001b198: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4001b19c: 18 80 00 0b bgu 4001b1c8 <_Objects_Get_next+0x60> <== NOT EXECUTED 4001b1a0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 4001b1a4: 7f ff d3 ea call 4001014c <_Objects_Get> <== NOT EXECUTED 4001b1a8: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 4001b1ac: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4001b1b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001b1b4: 32 bf ff f6 bne,a 4001b18c <_Objects_Get_next+0x24> <== NOT EXECUTED 4001b1b8: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 4001b1bc: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 4001b1c0: 81 c7 e0 08 ret <== NOT EXECUTED 4001b1c4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 4001b1c8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001b1cc: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 4001b1d0: 90 10 20 00 clr %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 4001b1d4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001b1d8: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 4001b1dc: 81 c7 e0 08 ret <== NOT EXECUTED 4001b1e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400166f0 <_Objects_Get_no_protection>: ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 400166f0: c2 02 20 08 ld [ %o0 + 8 ], %g1 if ( information->maximum >= index ) { 400166f4: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 400166f8: 92 22 40 01 sub %o1, %g1, %o1 400166fc: 82 02 60 01 add %o1, 1, %g1 if ( information->maximum >= index ) { 40016700: 80 a0 40 02 cmp %g1, %g2 40016704: 18 80 00 09 bgu 40016728 <_Objects_Get_no_protection+0x38> 40016708: 83 28 60 02 sll %g1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 4001670c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40016710: d0 00 80 01 ld [ %g2 + %g1 ], %o0 40016714: 80 a2 20 00 cmp %o0, 0 40016718: 02 80 00 08 be 40016738 <_Objects_Get_no_protection+0x48> 4001671c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_LOCAL; 40016720: 81 c3 e0 08 retl 40016724: c0 22 80 00 clr [ %o2 ] return the_object; } *location = OBJECTS_ERROR; return NULL; } *location = OBJECTS_ERROR; 40016728: 82 10 20 02 mov 2, %g1 4001672c: 90 10 20 00 clr %o0 /* * Not supported for multiprocessing */ return NULL; } 40016730: 81 c3 e0 08 retl 40016734: c2 22 80 00 st %g1, [ %o2 ] if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; return the_object; } *location = OBJECTS_ERROR; 40016738: 81 c3 e0 08 retl <== NOT EXECUTED 4001673c: c2 22 80 00 st %g1, [ %o2 ] <== NOT EXECUTED 4000915c <_Objects_Handler_initialization>: uint32_t node, uint32_t maximum_nodes, uint32_t maximum_global_objects ) { if ( node < 1 || node > maximum_nodes ) 4000915c: 80 a2 20 00 cmp %o0, 0 40009160: 22 80 00 07 be,a 4000917c <_Objects_Handler_initialization+0x20> 40009164: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009168: 80 a2 00 09 cmp %o0, %o1 4000916c: 18 80 00 04 bgu 4000917c <_Objects_Handler_initialization+0x20> 40009170: 90 10 20 00 clr %o0 40009174: 81 c3 e0 08 retl 40009178: 01 00 00 00 nop _Internal_error_Occurred( 4000917c: 92 10 20 01 mov 1, %o1 ! 1 <== NOT EXECUTED 40009180: 94 10 20 08 mov 8, %o2 <== NOT EXECUTED 40009184: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009188: 7f ff fd de call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000918c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40009190: 01 00 00 00 nop 4000a490 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4000a490: 9d e3 bf 90 save %sp, -112, %sp 4000a494: 92 10 00 18 mov %i0, %o1 uint32_t the_class; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 4000a498: 80 a6 60 00 cmp %i1, 0 4000a49c: 02 80 00 24 be 4000a52c <_Objects_Id_to_name+0x9c> 4000a4a0: b0 10 20 01 mov 1, %i0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000a4a4: 83 32 60 18 srl %o1, 0x18, %g1 4000a4a8: 82 08 60 07 and %g1, 7, %g1 return OBJECTS_INVALID_NAME; the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) 4000a4ac: 80 a0 60 04 cmp %g1, 4 4000a4b0: 18 80 00 25 bgu 4000a544 <_Objects_Id_to_name+0xb4> 4000a4b4: 87 28 60 02 sll %g1, 2, %g3 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( id ); information = _Objects_Information_table[ the_api ][ the_class ]; 4000a4b8: 03 10 00 81 sethi %hi(0x40020400), %g1 4000a4bc: 82 10 63 d0 or %g1, 0x3d0, %g1 ! 400207d0 <_Objects_Information_table> 4000a4c0: c8 00 40 03 ld [ %g1 + %g3 ], %g4 4000a4c4: 85 32 60 1b srl %o1, 0x1b, %g2 4000a4c8: 85 28 a0 02 sll %g2, 2, %g2 4000a4cc: d0 01 00 02 ld [ %g4 + %g2 ], %o0 if ( !information ) 4000a4d0: 80 a2 20 00 cmp %o0, 0 4000a4d4: 02 80 00 1c be 4000a544 <_Objects_Id_to_name+0xb4> 4000a4d8: 01 00 00 00 nop return OBJECTS_INVALID_ID; if ( information->is_string ) 4000a4dc: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4000a4e0: 80 a0 60 00 cmp %g1, 0 4000a4e4: 12 80 00 18 bne 4000a544 <_Objects_Id_to_name+0xb4> 4000a4e8: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, id, &ignored_location ); 4000a4ec: 7f ff ff c2 call 4000a3f4 <_Objects_Get> 4000a4f0: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 4000a4f4: 80 a2 20 00 cmp %o0, 0 4000a4f8: 02 80 00 13 be 4000a544 <_Objects_Id_to_name+0xb4> 4000a4fc: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 4000a500: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4000a504: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a508: 07 10 00 82 sethi %hi(0x40020800), %g3 4000a50c: c2 00 e0 70 ld [ %g3 + 0x70 ], %g1 ! 40020870 <_Thread_Dispatch_disable_level> 4000a510: b0 10 20 00 clr %i0 4000a514: 82 00 7f ff add %g1, -1, %g1 4000a518: c2 20 e0 70 st %g1, [ %g3 + 0x70 ] 4000a51c: c4 00 e0 70 ld [ %g3 + 0x70 ], %g2 4000a520: 80 a0 a0 00 cmp %g2, 0 4000a524: 02 80 00 04 be 4000a534 <_Objects_Id_to_name+0xa4> 4000a528: 01 00 00 00 nop _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4000a52c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a530: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000a534: 40 00 05 07 call 4000b950 <_Thread_Dispatch> 4000a538: 01 00 00 00 nop 4000a53c: 81 c7 e0 08 ret 4000a540: 81 e8 00 00 restore 4000a544: 81 c7 e0 08 ret <== NOT EXECUTED 4000a548: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 4000906c <_Objects_Name_to_id>: Objects_Information *information, Objects_Name name, uint32_t node, Objects_Id *id ) { 4000906c: 9d e3 bf 98 save %sp, -104, %sp 40009070: a2 10 00 18 mov %i0, %l1 Objects_Control *the_object; uint32_t index; uint32_t name_length; Objects_Name_comparators compare_them; if ( !id ) 40009074: 80 a6 e0 00 cmp %i3, 0 40009078: 02 80 00 2d be 4000912c <_Objects_Name_to_id+0xc0> 4000907c: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 40009080: 80 a6 60 00 cmp %i1, 0 40009084: 02 80 00 28 be 40009124 <_Objects_Name_to_id+0xb8> 40009088: 01 00 00 00 nop return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 4000908c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40009090: 86 90 60 00 orcc %g1, 0, %g3 40009094: 02 80 00 24 be 40009124 <_Objects_Name_to_id+0xb8> 40009098: 80 a6 a0 00 cmp %i2, 0 4000909c: 12 80 00 26 bne 40009134 <_Objects_Name_to_id+0xc8> 400090a0: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; 400090a4: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 400090a8: 05 10 00 3a sethi %hi(0x4000e800), %g2 400090ac: 80 a0 60 00 cmp %g1, 0 400090b0: a4 10 a1 94 or %g2, 0x194, %l2 400090b4: 02 80 00 04 be 400090c4 <_Objects_Name_to_id+0x58> 400090b8: c8 14 60 44 lduh [ %l1 + 0x44 ], %g4 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400090bc: 03 10 00 3a sethi %hi(0x4000e800), %g1 400090c0: a4 10 61 a4 or %g1, 0x1a4, %l2 ! 4000e9a4 <_Objects_Compare_name_string> for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 400090c4: 83 29 20 10 sll %g4, 0x10, %g1 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400090c8: a0 10 20 01 mov 1, %l0 for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 400090cc: b1 30 60 10 srl %g1, 0x10, %i0 if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 400090d0: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 400090d4: 83 2c 20 02 sll %l0, 2, %g1 400090d8: f4 00 80 01 ld [ %g2 + %g1 ], %i2 if ( !the_object || !the_object->name ) 400090dc: 80 a6 a0 00 cmp %i2, 0 400090e0: 02 80 00 0c be 40009110 <_Objects_Name_to_id+0xa4> 400090e4: a0 04 20 01 inc %l0 400090e8: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 400090ec: 80 a2 60 00 cmp %o1, 0 400090f0: 02 80 00 08 be 40009110 <_Objects_Name_to_id+0xa4> 400090f4: 90 10 00 19 mov %i1, %o0 continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 400090f8: 9f c4 80 00 call %l2 400090fc: 94 10 00 18 mov %i0, %o2 40009100: 80 a2 20 00 cmp %o0, 0 40009104: 32 80 00 13 bne,a 40009150 <_Objects_Name_to_id+0xe4> 40009108: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000910c: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { 40009110: 83 28 e0 10 sll %g3, 0x10, %g1 40009114: 83 30 60 10 srl %g1, 0x10, %g1 40009118: 80 a0 40 10 cmp %g1, %l0 4000911c: 3a bf ff ee bcc,a 400090d4 <_Objects_Name_to_id+0x68> 40009120: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 40009124: 81 c7 e0 08 ret 40009128: 91 e8 20 01 restore %g0, 1, %o0 return ( _Objects_MP_Global_name_search( information, name, node, id ) ); #else return OBJECTS_INVALID_NAME; #endif } 4000912c: 81 c7 e0 08 ret <== NOT EXECUTED 40009130: 81 e8 00 00 restore <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40009134: 82 10 63 ff or %g1, 0x3ff, %g1 40009138: 80 a6 80 01 cmp %i2, %g1 4000913c: 02 bf ff da be 400090a4 <_Objects_Name_to_id+0x38> 40009140: 80 a6 a0 01 cmp %i2, 1 40009144: 22 bf ff d9 be,a 400090a8 <_Objects_Name_to_id+0x3c> 40009148: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 4000914c: 30 bf ff f6 b,a 40009124 <_Objects_Name_to_id+0xb8> the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { *id = the_object->id; 40009150: c2 26 c0 00 st %g1, [ %i3 ] 40009154: 81 c7 e0 08 ret 40009158: 91 e8 20 00 restore %g0, 0, %o0 40009194 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40009194: 9d e3 bf 98 save %sp, -104, %sp 40009198: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 4000919c: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 400091a0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 400091a4: 03 00 00 3f sethi %hi(0xfc00), %g1 400091a8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400091ac: 92 10 00 10 mov %l0, %o1 400091b0: a2 08 80 01 and %g2, %g1, %l1 400091b4: 40 00 37 98 call 40017014 <.udiv> 400091b8: 90 22 00 11 sub %o0, %l1, %o0 for ( block = 0; block < block_count; block++ ) { 400091bc: 80 a2 20 00 cmp %o0, 0 400091c0: 02 80 00 15 be 40009214 <_Objects_Shrink_information+0x80> 400091c4: 86 10 20 00 clr %g3 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400091c8: c8 06 20 38 ld [ %i0 + 0x38 ], %g4 400091cc: c2 01 00 00 ld [ %g4 ], %g1 400091d0: 84 10 20 04 mov 4, %g2 400091d4: 80 a4 00 01 cmp %l0, %g1 400091d8: a8 10 20 00 clr %l4 400091dc: 12 80 00 0a bne 40009204 <_Objects_Shrink_information+0x70> 400091e0: a4 10 20 00 clr %l2 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 400091e4: 10 80 00 10 b 40009224 <_Objects_Shrink_information+0x90> <== NOT EXECUTED 400091e8: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400091ec: a2 04 40 10 add %l1, %l0, %l1 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400091f0: 80 a4 00 01 cmp %l0, %g1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400091f4: a4 10 00 02 mov %g2, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400091f8: 02 80 00 09 be 4000921c <_Objects_Shrink_information+0x88> 400091fc: 82 00 a0 04 add %g2, 4, %g1 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 40009200: 84 10 00 01 mov %g1, %g2 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40009204: 86 00 e0 01 inc %g3 40009208: 80 a0 c0 08 cmp %g3, %o0 4000920c: 32 bf ff f8 bne,a 400091ec <_Objects_Shrink_information+0x58> 40009210: c2 00 80 04 ld [ %g2 + %g4 ], %g1 40009214: 81 c7 e0 08 ret 40009218: 81 e8 00 00 restore if ( information->inactive_per_block[ block ] == information->allocation_size ) { 4000921c: a8 10 00 02 mov %g2, %l4 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 40009220: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 40009224: 03 00 00 3f sethi %hi(0xfc00), %g1 40009228: e0 02 00 00 ld [ %o0 ], %l0 4000922c: 10 80 00 10 b 4000926c <_Objects_Shrink_information+0xd8> 40009230: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40009234: 82 04 40 01 add %l1, %g1, %g1 40009238: 80 a0 80 01 cmp %g2, %g1 4000923c: 3a 80 00 12 bcc,a 40009284 <_Objects_Shrink_information+0xf0> 40009240: 90 10 00 10 mov %l0, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 40009244: 40 00 14 b5 call 4000e518 <_Chain_Extract> 40009248: 01 00 00 00 nop 4000924c: 90 10 00 10 mov %l0, %o0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40009250: 80 a2 20 00 cmp %o0, 0 40009254: 22 80 00 10 be,a 40009294 <_Objects_Shrink_information+0x100> 40009258: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_last( const Chain_Node *the_node ) { return (the_node->next == NULL); 4000925c: e0 02 00 00 ld [ %o0 ], %l0 40009260: 80 a4 20 00 cmp %l0, 0 40009264: 22 80 00 0c be,a 40009294 <_Objects_Shrink_information+0x100> 40009268: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 4000926c: c2 02 20 08 ld [ %o0 + 8 ], %g1 40009270: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40009274: 80 a4 40 02 cmp %l1, %g2 40009278: 28 bf ff ef bleu,a 40009234 <_Objects_Shrink_information+0xa0> 4000927c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40009280: 90 10 00 10 mov %l0, %o0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40009284: 80 a2 20 00 cmp %o0, 0 40009288: 32 bf ff f6 bne,a 40009260 <_Objects_Shrink_information+0xcc> 4000928c: e0 02 00 00 ld [ %o0 ], %l0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40009290: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40009294: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40009298: d2 00 40 14 ld [ %g1 + %l4 ], %o1 4000929c: 7f ff fc 99 call 40008500 <_Heap_Free> 400092a0: 90 12 22 2c or %o0, 0x22c, %o0 */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 400092a4: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 400092a8: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 400092ac: c0 24 80 02 clr [ %l2 + %g2 ] information->inactive -= information->allocation_size; 400092b0: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; 400092b4: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400092b8: c6 06 20 18 ld [ %i0 + 0x18 ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 400092bc: c0 25 00 04 clr [ %l4 + %g4 ] information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400092c0: 82 20 40 03 sub %g1, %g3, %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; 400092c4: c0 25 00 02 clr [ %l4 + %g2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400092c8: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 400092cc: 81 c7 e0 08 ret 400092d0: 81 e8 00 00 restore 40007cc0 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40007cc0: 9d e3 bf 98 save %sp, -104, %sp /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; 40007cc4: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 if ( !api_configuration ) 40007cc8: 80 a6 20 00 cmp %i0, 0 40007ccc: 02 80 00 1f be 40007d48 <_POSIX_API_Initialize+0x88> 40007cd0: 03 10 00 6e sethi %hi(0x4001b800), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 40007cd4: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 40007cd8: 05 10 00 6f sethi %hi(0x4001bc00), %g2 40007cdc: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007ce0: 82 10 63 78 or %g1, 0x378, %g1 ! 4001c378 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 40007ce4: 40 00 17 69 call 4000da88 <_POSIX_signals_Manager_Initialization> 40007ce8: c2 20 a1 4c st %g1, [ %g2 + 0x14c ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 40007cec: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 40007cf0: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 40007cf4: 40 00 17 da call 4000dc5c <_POSIX_Threads_Manager_initialization> 40007cf8: d0 06 00 00 ld [ %i0 ], %o0 api_configuration->maximum_threads, api_configuration->number_of_initialization_threads, api_configuration->User_initialization_threads_table ); _POSIX_Condition_variables_Manager_initialization( 40007cfc: 40 00 17 11 call 4000d940 <_POSIX_Condition_variables_Manager_initialization> 40007d00: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 40007d04: 40 00 17 1b call 4000d970 <_POSIX_Key_Manager_initialization> 40007d08: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 40007d0c: 40 00 17 3b call 4000d9f8 <_POSIX_Mutex_Manager_initialization> 40007d10: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 40007d14: 40 00 17 23 call 4000d9a0 <_POSIX_Message_queue_Manager_initialization> 40007d18: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 40007d1c: 40 00 18 a5 call 4000dfb0 <_POSIX_Semaphore_Manager_initialization> 40007d20: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 40007d24: 40 00 18 96 call 4000df7c <_POSIX_Timer_Manager_initialization> 40007d28: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 40007d2c: 40 00 17 3f call 4000da28 <_POSIX_Barrier_Manager_initialization> 40007d30: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 40007d34: 40 00 17 49 call 4000da58 <_POSIX_RWLock_Manager_initialization> 40007d38: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40007d3c: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40007d40: 40 00 17 b1 call 4000dc04 <_POSIX_Spinlock_Manager_initialization> 40007d44: 81 e8 00 00 restore /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) 40007d48: 10 bf ff e3 b 40007cd4 <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 40007d4c: b0 10 63 88 or %g1, 0x388, %i0 <== NOT EXECUTED 4000f0e0 <_POSIX_Barrier_Translate_core_barrier_return_code>: int _POSIX_Barrier_Translate_core_barrier_return_code( CORE_barrier_Status the_barrier_status ) { if ( the_barrier_status <= CORE_BARRIER_TIMEOUT ) 4000f0e0: 80 a2 20 03 cmp %o0, 3 4000f0e4: 18 80 00 06 bgu 4000f0fc <_POSIX_Barrier_Translate_core_barrier_return_code+0x1c> 4000f0e8: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Barrier_Return_codes[the_barrier_status]; return POSIX_BOTTOM_REACHED(); } 4000f0ec: 03 10 00 6e sethi %hi(0x4001b800), %g1 4000f0f0: 82 10 61 d8 or %g1, 0x1d8, %g1 ! 4001b9d8 <_POSIX_Barrier_Return_codes> 4000f0f4: 81 c3 e0 08 retl 4000f0f8: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_barrier_Status the_barrier_status ) { if ( the_barrier_status <= CORE_BARRIER_TIMEOUT ) return _POSIX_Barrier_Return_codes[the_barrier_status]; return POSIX_BOTTOM_REACHED(); 4000f0fc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000f100: 7f ff e1 9e call 40007778 <== NOT EXECUTED 4000f104: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000f108: 01 00 00 00 nop 400079f4 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, boolean is_broadcast ) { 400079f4: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 400079f8: 80 a6 20 00 cmp %i0, 0 400079fc: 32 80 00 05 bne,a 40007a10 <_POSIX_Condition_variables_Signal_support+0x1c> 40007a00: d2 06 00 00 ld [ %i0 ], %o1 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007a04: 90 10 20 16 mov 0x16, %o0 } 40007a08: 81 c7 e0 08 ret 40007a0c: 91 e8 00 08 restore %g0, %o0, %o0 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40007a10: 80 a2 7f ff cmp %o1, -1 40007a14: 22 80 00 27 be,a 40007ab0 <_POSIX_Condition_variables_Signal_support+0xbc> 40007a18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40007a1c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007a20: 94 07 bf f4 add %fp, -12, %o2 40007a24: 40 00 0f 68 call 4000b7c4 <_Objects_Get> 40007a28: 90 12 21 bc or %o0, 0x1bc, %o0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40007a2c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007a30: a0 10 00 08 mov %o0, %l0 40007a34: 80 a0 60 00 cmp %g1, 0 40007a38: 02 80 00 08 be 40007a58 <_POSIX_Condition_variables_Signal_support+0x64> 40007a3c: b0 02 20 18 add %o0, 0x18, %i0 40007a40: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007a44: 28 bf ff f1 bleu,a 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED 40007a48: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007a4c: 40 00 04 b6 call 40008d24 <== NOT EXECUTED 40007a50: 01 00 00 00 nop <== NOT EXECUTED 40007a54: 30 bf ff ed b,a 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 40007a58: 40 00 15 49 call 4000cf7c <_Thread_queue_Dequeue> 40007a5c: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) 40007a60: 80 a2 20 00 cmp %o0, 0 40007a64: 02 80 00 11 be 40007aa8 <_POSIX_Condition_variables_Signal_support+0xb4> 40007a68: 80 a6 60 00 cmp %i1, 0 the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 40007a6c: 12 bf ff fb bne 40007a58 <_POSIX_Condition_variables_Signal_support+0x64> 40007a70: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007a74: 03 10 00 69 sethi %hi(0x4001a400), %g1 40007a78: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 4001a470 <_Thread_Dispatch_disable_level> 40007a7c: 90 10 20 00 clr %o0 40007a80: 84 00 bf ff add %g2, -1, %g2 40007a84: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 40007a88: c6 00 60 70 ld [ %g1 + 0x70 ], %g3 40007a8c: 80 a0 e0 00 cmp %g3, 0 40007a90: 12 bf ff de bne 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> 40007a94: 01 00 00 00 nop _Thread_Dispatch(); 40007a98: 40 00 14 37 call 4000cb74 <_Thread_Dispatch> 40007a9c: 01 00 00 00 nop 40007aa0: 10 bf ff da b 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> 40007aa4: 90 10 20 00 clr %o0 ! 0 case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 40007aa8: 10 bf ff f3 b 40007a74 <_POSIX_Condition_variables_Signal_support+0x80> 40007aac: c0 24 20 14 clr [ %l0 + 0x14 ] if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40007ab0: 7f ff ff 83 call 400078bc <== NOT EXECUTED 40007ab4: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40007ab8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007abc: 32 bf ff d3 bne,a 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED 40007ac0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007ac4: 10 bf ff d6 b 40007a1c <_POSIX_Condition_variables_Signal_support+0x28> <== NOT EXECUTED 40007ac8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007b44 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, boolean already_timedout ) { 40007b44: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007b48: 80 a6 60 00 cmp %i1, 0 40007b4c: 32 80 00 04 bne,a 40007b5c <_POSIX_Condition_variables_Wait_support+0x18> 40007b50: d2 06 40 00 ld [ %i1 ], %o1 return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40007b54: 81 c7 e0 08 ret 40007b58: 91 e8 20 16 restore %g0, 0x16, %o0 40007b5c: 80 a2 7f ff cmp %o1, -1 40007b60: 22 80 00 37 be,a 40007c3c <_POSIX_Condition_variables_Wait_support+0xf8> 40007b64: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007b68: a2 07 bf f4 add %fp, -12, %l1 40007b6c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007b70: 94 10 00 11 mov %l1, %o2 40007b74: 40 00 0f 14 call 4000b7c4 <_Objects_Get> 40007b78: 90 12 20 d4 or %o0, 0xd4, %o0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 40007b7c: 80 a2 20 00 cmp %o0, 0 40007b80: 02 bf ff f5 be 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> 40007b84: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40007b88: 21 10 00 69 sethi %hi(0x4001a400), %l0 40007b8c: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 ! 4001a470 <_Thread_Dispatch_disable_level> ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40007b90: 80 a6 20 00 cmp %i0, 0 40007b94: 82 00 7f ff add %g1, -1, %g1 40007b98: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 40007b9c: 02 bf ff ee be 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> 40007ba0: 01 00 00 00 nop *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40007ba4: d2 06 00 00 ld [ %i0 ], %o1 40007ba8: 80 a2 7f ff cmp %o1, -1 40007bac: 22 80 00 42 be,a 40007cb4 <_POSIX_Condition_variables_Wait_support+0x170> 40007bb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40007bb4: 94 10 00 11 mov %l1, %o2 40007bb8: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007bbc: 40 00 0f 02 call 4000b7c4 <_Objects_Get> 40007bc0: 90 12 21 bc or %o0, 0x1bc, %o0 ! 4001a9bc <_POSIX_Condition_variables_Information> } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40007bc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007bc8: 80 a0 60 00 cmp %g1, 0 40007bcc: 12 80 00 15 bne 40007c20 <_POSIX_Condition_variables_Wait_support+0xdc> 40007bd0: a2 10 00 08 mov %o0, %l1 #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40007bd4: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40007bd8: 80 a0 a0 00 cmp %g2, 0 40007bdc: 02 80 00 1f be 40007c58 <_POSIX_Condition_variables_Wait_support+0x114> 40007be0: 01 00 00 00 nop 40007be4: c2 06 40 00 ld [ %i1 ], %g1 40007be8: 80 a0 80 01 cmp %g2, %g1 40007bec: 02 80 00 1b be 40007c58 <_POSIX_Condition_variables_Wait_support+0x114> 40007bf0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007bf4: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 <== NOT EXECUTED 40007bf8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007bfc: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED 40007c00: c4 04 20 70 ld [ %l0 + 0x70 ], %g2 <== NOT EXECUTED 40007c04: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40007c08: 12 bf ff d3 bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007c0c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40007c10: 40 00 13 d9 call 4000cb74 <_Thread_Dispatch> <== NOT EXECUTED 40007c14: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40007c18: 81 c7 e0 08 ret <== NOT EXECUTED 40007c1c: 81 e8 00 00 restore <== NOT EXECUTED } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40007c20: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007c24: 08 bf ff cc bleu 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007c28: 01 00 00 00 nop <== NOT EXECUTED if ( mutex_status ) return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); 40007c2c: 40 00 04 3e call 40008d24 <== NOT EXECUTED 40007c30: 01 00 00 00 nop <== NOT EXECUTED 40007c34: 81 c7 e0 08 ret <== NOT EXECUTED 40007c38: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007c3c: 40 00 00 94 call 40007e8c <== NOT EXECUTED 40007c40: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007c44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c48: 12 bf ff c3 bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007c4c: 01 00 00 00 nop <== NOT EXECUTED 40007c50: 10 bf ff c6 b 40007b68 <_POSIX_Condition_variables_Wait_support+0x24> <== NOT EXECUTED 40007c54: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40007c58: 40 00 01 a2 call 400082e0 40007c5c: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 40007c60: 80 a6 e0 00 cmp %i3, 0 40007c64: 22 80 00 1b be,a 40007cd0 <_POSIX_Condition_variables_Wait_support+0x18c> 40007c68: c2 06 40 00 ld [ %i1 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007c6c: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 40007c70: b0 10 20 74 mov 0x74, %i0 40007c74: 82 00 7f ff add %g1, -1, %g1 40007c78: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 40007c7c: c4 04 20 70 ld [ %l0 + 0x70 ], %g2 40007c80: 80 a0 a0 00 cmp %g2, 0 40007c84: 02 80 00 09 be 40007ca8 <_POSIX_Condition_variables_Wait_support+0x164> 40007c88: 01 00 00 00 nop /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 40007c8c: 40 00 00 e8 call 4000802c 40007c90: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 40007c94: 80 a2 20 00 cmp %o0, 0 40007c98: 12 bf ff af bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> 40007c9c: 01 00 00 00 nop return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore _Thread_Dispatch(); 40007ca8: 40 00 13 b3 call 4000cb74 <_Thread_Dispatch> 40007cac: 01 00 00 00 nop 40007cb0: 30 bf ff f7 b,a 40007c8c <_POSIX_Condition_variables_Wait_support+0x148> if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40007cb4: 7f ff ff 02 call 400078bc <== NOT EXECUTED 40007cb8: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40007cbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007cc0: 12 bf ff a5 bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007cc4: 01 00 00 00 nop <== NOT EXECUTED 40007cc8: 10 bf ff bb b 40007bb4 <_POSIX_Condition_variables_Wait_support+0x70> <== NOT EXECUTED 40007ccc: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40007cd0: 37 10 00 69 sethi %hi(0x4001a400), %i3 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 40007cd4: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40007cd8: c2 06 e1 4c ld [ %i3 + 0x14c ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 40007cdc: c4 06 00 00 ld [ %i0 ], %g2 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 40007ce0: 90 04 60 18 add %l1, 0x18, %o0 _Thread_Executing->Wait.id = *cond; 40007ce4: c4 20 60 20 st %g2, [ %g1 + 0x20 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 40007ce8: d0 20 60 44 st %o0, [ %g1 + 0x44 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40007cec: c0 20 60 34 clr [ %g1 + 0x34 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007cf0: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 40007cf4: 92 10 00 1a mov %i2, %o1 40007cf8: c2 24 60 48 st %g1, [ %l1 + 0x48 ] 40007cfc: 15 10 00 35 sethi %hi(0x4000d400), %o2 40007d00: 40 00 15 0d call 4000d134 <_Thread_queue_Enqueue_with_handler> 40007d04: 94 12 a2 fc or %o2, 0x2fc, %o2 ! 4000d6fc <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d08: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 40007d0c: 82 00 7f ff add %g1, -1, %g1 40007d10: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 40007d14: c4 04 20 70 ld [ %l0 + 0x70 ], %g2 40007d18: 80 a0 a0 00 cmp %g2, 0 40007d1c: 12 80 00 05 bne 40007d30 <_POSIX_Condition_variables_Wait_support+0x1ec> 40007d20: c2 06 e1 4c ld [ %i3 + 0x14c ], %g1 _Thread_Dispatch(); 40007d24: 40 00 13 94 call 4000cb74 <_Thread_Dispatch> 40007d28: 01 00 00 00 nop /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 40007d2c: c2 06 e1 4c ld [ %i3 + 0x14c ], %g1 40007d30: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 40007d34: 80 a6 20 00 cmp %i0, 0 40007d38: 02 bf ff d5 be 40007c8c <_POSIX_Condition_variables_Wait_support+0x148> 40007d3c: 80 a6 20 74 cmp %i0, 0x74 40007d40: 02 bf ff d3 be 40007c8c <_POSIX_Condition_variables_Wait_support+0x148> 40007d44: 01 00 00 00 nop return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40007d48: 81 c7 e0 08 ret <== NOT EXECUTED 40007d4c: 81 e8 00 00 restore <== NOT EXECUTED 4000f518 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000f518: 9d e3 bf 98 save %sp, -104, %sp uint32_t iterations; boolean are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4000f51c: c2 06 20 08 ld [ %i0 + 8 ], %g1 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { value = the_key->Values[ thread_api ][ thread_index ]; 4000f520: 05 00 00 3f sethi %hi(0xfc00), %g2 4000f524: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000f528: 84 08 40 02 and %g1, %g2, %g2 4000f52c: aa 10 20 00 clr %l5 4000f530: a9 28 a0 02 sll %g2, 2, %l4 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000f534: 83 30 60 16 srl %g1, 0x16, %g1 4000f538: 05 10 00 70 sethi %hi(0x4001c000), %g2 4000f53c: a6 08 60 1c and %g1, 0x1c, %l3 4000f540: a2 10 a2 e0 or %g2, 0x2e0, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000f544: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000f548: 80 a0 60 00 cmp %g1, 0 4000f54c: 02 80 00 27 be 4000f5e8 <_POSIX_Keys_Run_destructors+0xd0> 4000f550: b0 10 20 01 mov 1, %i0 4000f554: a4 10 20 01 mov 1, %l2 the_key = (POSIX_Keys_Control *) 4000f558: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000f55c: 83 2e 20 02 sll %i0, 2, %g1 4000f560: c4 00 80 01 ld [ %g2 + %g1 ], %g2 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000f564: 80 a0 a0 00 cmp %g2, 0 4000f568: 02 80 00 16 be 4000f5c0 <_POSIX_Keys_Run_destructors+0xa8> 4000f56c: b0 06 20 01 inc %i0 4000f570: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000f574: 80 a0 60 00 cmp %g1, 0 4000f578: 02 80 00 12 be 4000f5c0 <_POSIX_Keys_Run_destructors+0xa8> 4000f57c: a0 04 c0 02 add %l3, %g2, %l0 4000f580: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 4000f584: 80 a0 e0 00 cmp %g3, 0 4000f588: 22 80 00 0f be,a 4000f5c4 <_POSIX_Keys_Run_destructors+0xac> 4000f58c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000f590: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000f594: c4 00 40 14 ld [ %g1 + %l4 ], %g2 if ( value ) { 4000f598: 90 90 a0 00 orcc %g2, 0, %o0 4000f59c: 22 80 00 0a be,a 4000f5c4 <_POSIX_Keys_Run_destructors+0xac> 4000f5a0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000f5a4: 9f c0 c0 00 call %g3 4000f5a8: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000f5ac: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000f5b0: c4 05 00 01 ld [ %l4 + %g1 ], %g2 4000f5b4: 80 a0 00 02 cmp %g0, %g2 4000f5b8: 82 40 3f ff addx %g0, -1, %g1 4000f5bc: a4 0c 80 01 and %l2, %g1, %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000f5c0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000f5c4: 80 a0 40 18 cmp %g1, %i0 4000f5c8: 3a bf ff e5 bcc,a 4000f55c <_POSIX_Keys_Run_destructors+0x44> 4000f5cc: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000f5d0: 80 a4 a0 01 cmp %l2, 1 4000f5d4: 02 80 00 05 be 4000f5e8 <_POSIX_Keys_Run_destructors+0xd0> 4000f5d8: aa 05 60 01 inc %l5 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4000f5dc: 80 a5 60 04 cmp %l5, 4 4000f5e0: 32 bf ff da bne,a 4000f548 <_POSIX_Keys_Run_destructors+0x30> 4000f5e4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000f5e8: 81 c7 e0 08 ret 4000f5ec: 81 e8 00 00 restore 40014ac8 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40014ac8: 9d e3 bf 98 save %sp, -104, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 40014acc: 92 10 20 ff mov 0xff, %o1 40014ad0: 90 10 00 18 mov %i0, %o0 40014ad4: 40 00 12 6f call 40019490 40014ad8: aa 10 00 18 mov %i0, %l5 if ( n > NAME_MAX ) 40014adc: b0 10 20 5b mov 0x5b, %i0 40014ae0: 80 a2 20 ff cmp %o0, 0xff 40014ae4: 18 80 00 42 bgu 40014bec <_POSIX_Message_queue_Create_support+0x124> 40014ae8: a4 10 00 08 mov %o0, %l2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40014aec: 27 10 00 9c sethi %hi(0x40027000), %l3 40014af0: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 40014af4: 82 00 60 01 inc %g1 40014af8: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 40014afc: 80 a6 a0 00 cmp %i2, 0 40014b00: 22 80 00 41 be,a 40014c04 <_POSIX_Message_queue_Create_support+0x13c> 40014b04: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40014b08: e2 06 a0 04 ld [ %i2 + 4 ], %l1 40014b0c: 80 a4 60 00 cmp %l1, 0 40014b10: 04 80 00 4c ble 40014c40 <_POSIX_Message_queue_Create_support+0x178> 40014b14: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 40014b18: f4 06 a0 08 ld [ %i2 + 8 ], %i2 40014b1c: 80 a6 a0 00 cmp %i2, 0 40014b20: 04 80 00 48 ble 40014c40 <_POSIX_Message_queue_Create_support+0x178> 40014b24: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 40014b28: 29 10 00 9d sethi %hi(0x40027400), %l4 40014b2c: 7f ff eb b5 call 4000fa00 <_Objects_Allocate> 40014b30: 90 15 22 a8 or %l4, 0x2a8, %o0 ! 400276a8 <_POSIX_Message_queue_Information> rtems_set_errno_and_return_minus_one( ENFILE ); } #endif the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 40014b34: a0 92 20 00 orcc %o0, 0, %l0 40014b38: 02 80 00 35 be 40014c0c <_POSIX_Message_queue_Create_support+0x144> 40014b3c: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 40014b40: f2 24 20 10 st %i1, [ %l0 + 0x10 ] 40014b44: 92 10 00 12 mov %l2, %o1 the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 40014b48: c2 24 20 18 st %g1, [ %l0 + 0x18 ] _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 40014b4c: c2 24 20 14 st %g1, [ %l0 + 0x14 ] the_mq->open_count = 1; 40014b50: c2 24 20 1c st %g1, [ %l0 + 0x1c ] 40014b54: 25 10 00 9c sethi %hi(0x40027000), %l2 40014b58: 7f ff ea 4b call 4000f484 <_Heap_Allocate> 40014b5c: 90 14 a2 dc or %l2, 0x2dc, %o0 ! 400272dc <_Workspace_Area> * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); if (!name) { 40014b60: b2 92 20 00 orcc %o0, 0, %i1 40014b64: 22 80 00 56 be,a 40014cbc <_POSIX_Message_queue_Create_support+0x1f4> 40014b68: 90 15 22 a8 or %l4, 0x2a8, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 40014b6c: 40 00 0f e4 call 40018afc 40014b70: 92 10 00 15 mov %l5, %o1 */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 40014b74: 94 10 00 11 mov %l1, %o2 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 40014b78: c0 24 20 60 clr [ %l0 + 0x60 ] if ( ! _CORE_message_queue_Initialize( 40014b7c: 96 10 00 1a mov %i2, %o3 40014b80: 90 04 20 20 add %l0, 0x20, %o0 40014b84: 40 00 03 cd call 40015ab8 <_CORE_message_queue_Initialize> 40014b88: 92 04 20 60 add %l0, 0x60, %o1 40014b8c: 80 a2 20 00 cmp %o0, 0 40014b90: 02 80 00 39 be 40014c74 <_POSIX_Message_queue_Create_support+0x1ac> 40014b94: 90 15 22 a8 or %l4, 0x2a8, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40014b98: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40014b9c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40014ba0: 05 00 00 3f sethi %hi(0xfc00), %g2 40014ba4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40014ba8: 82 08 40 02 and %g1, %g2, %g1 40014bac: 80 a0 40 03 cmp %g1, %g3 40014bb0: 38 80 00 06 bgu,a 40014bc8 <_POSIX_Message_queue_Create_support+0x100> 40014bb4: e0 26 c0 00 st %l0, [ %i3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40014bb8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40014bbc: 83 28 60 02 sll %g1, 2, %g1 40014bc0: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_POSIX_Message_queue_Information, &the_mq->Object, (char *) name ); *message_queue = the_mq; 40014bc4: e0 26 c0 00 st %l0, [ %i3 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40014bc8: f2 24 20 0c st %i1, [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014bcc: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 40014bd0: b0 10 20 00 clr %i0 40014bd4: 82 00 7f ff add %g1, -1, %g1 40014bd8: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] 40014bdc: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 40014be0: 80 a0 a0 00 cmp %g2, 0 40014be4: 02 80 00 04 be 40014bf4 <_POSIX_Message_queue_Create_support+0x12c> 40014be8: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return 0; } 40014bec: 81 c7 e0 08 ret 40014bf0: 81 e8 00 00 restore _Thread_Dispatch(); 40014bf4: 7f ff f1 c0 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014bf8: 01 00 00 00 nop <== NOT EXECUTED 40014bfc: 81 c7 e0 08 ret <== NOT EXECUTED 40014c00: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40014c04: 10 bf ff c9 b 40014b28 <_POSIX_Message_queue_Create_support+0x60> 40014c08: a2 10 20 0a mov 0xa, %l1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014c0c: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 <== NOT EXECUTED 40014c10: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014c14: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] <== NOT EXECUTED 40014c18: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 <== NOT EXECUTED 40014c1c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40014c20: 02 80 00 36 be 40014cf8 <_POSIX_Message_queue_Create_support+0x230> <== NOT EXECUTED 40014c24: 01 00 00 00 nop <== NOT EXECUTED #endif the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 40014c28: 40 00 0a d1 call 4001776c <__errno> <== NOT EXECUTED 40014c2c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40014c30: 82 10 20 17 mov 0x17, %g1 <== NOT EXECUTED 40014c34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014c38: 81 c7 e0 08 ret <== NOT EXECUTED 40014c3c: 81 e8 00 00 restore <== NOT EXECUTED 40014c40: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 40014c44: 82 00 7f ff add %g1, -1, %g1 40014c48: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] 40014c4c: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 40014c50: 80 a0 a0 00 cmp %g2, 0 40014c54: 02 80 00 2c be 40014d04 <_POSIX_Message_queue_Create_support+0x23c> 40014c58: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40014c5c: 40 00 0a c4 call 4001776c <__errno> 40014c60: b0 10 3f ff mov -1, %i0 ! ffffffff 40014c64: 82 10 20 16 mov 0x16, %g1 40014c68: c2 22 00 00 st %g1, [ %o0 ] 40014c6c: 81 c7 e0 08 ret 40014c70: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 40014c74: 7f ff ec 71 call 4000fe38 <_Objects_Free> <== NOT EXECUTED 40014c78: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40014c7c: 90 14 a2 dc or %l2, 0x2dc, %o0 <== NOT EXECUTED 40014c80: 7f ff ea 33 call 4000f54c <_Heap_Free> <== NOT EXECUTED 40014c84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40014c88: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 <== NOT EXECUTED 40014c8c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014c90: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] <== NOT EXECUTED 40014c94: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 <== NOT EXECUTED 40014c98: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40014c9c: 02 80 00 1d be 40014d10 <_POSIX_Message_queue_Create_support+0x248> <== NOT EXECUTED 40014ca0: 01 00 00 00 nop <== NOT EXECUTED #endif _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 40014ca4: 40 00 0a b2 call 4001776c <__errno> <== NOT EXECUTED 40014ca8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40014cac: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40014cb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014cb4: 81 c7 e0 08 ret <== NOT EXECUTED 40014cb8: 81 e8 00 00 restore <== NOT EXECUTED 40014cbc: 7f ff ec 5f call 4000fe38 <_Objects_Free> <== NOT EXECUTED 40014cc0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40014cc4: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 <== NOT EXECUTED 40014cc8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014ccc: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] <== NOT EXECUTED 40014cd0: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 <== NOT EXECUTED 40014cd4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40014cd8: 02 80 00 11 be 40014d1c <_POSIX_Message_queue_Create_support+0x254> <== NOT EXECUTED 40014cdc: 01 00 00 00 nop <== NOT EXECUTED name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); 40014ce0: 40 00 0a a3 call 4001776c <__errno> <== NOT EXECUTED 40014ce4: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40014ce8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40014cec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014cf0: 81 c7 e0 08 ret <== NOT EXECUTED 40014cf4: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40014cf8: 7f ff f1 7f call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014cfc: 01 00 00 00 nop <== NOT EXECUTED 40014d00: 30 bf ff ca b,a 40014c28 <_POSIX_Message_queue_Create_support+0x160> <== NOT EXECUTED 40014d04: 7f ff f1 7c call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014d08: 01 00 00 00 nop <== NOT EXECUTED 40014d0c: 30 bf ff d4 b,a 40014c5c <_POSIX_Message_queue_Create_support+0x194> <== NOT EXECUTED 40014d10: 7f ff f1 79 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014d14: 01 00 00 00 nop <== NOT EXECUTED 40014d18: 30 bf ff e3 b,a 40014ca4 <_POSIX_Message_queue_Create_support+0x1dc> <== NOT EXECUTED 40014d1c: 7f ff f1 76 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014d20: 01 00 00 00 nop <== NOT EXECUTED 40014d24: 30 bf ff ef b,a 40014ce0 <_POSIX_Message_queue_Create_support+0x218> <== NOT EXECUTED 4000b094 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 4000b094: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 4000b098: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000b09c: 80 a0 60 00 cmp %g1, 0 4000b0a0: 12 80 00 1f bne 4000b11c <_POSIX_Message_queue_Delete+0x88> 4000b0a4: b2 10 00 18 mov %i0, %i1 4000b0a8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000b0ac: 80 a0 60 00 cmp %g1, 0 4000b0b0: 12 80 00 1b bne 4000b11c <_POSIX_Message_queue_Delete+0x88> 4000b0b4: 01 00 00 00 nop /* the name memory may have been freed by unlink. */ if ( the_mq->Object.name ) 4000b0b8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 4000b0bc: 80 a2 60 00 cmp %o1, 0 4000b0c0: 02 80 00 04 be 4000b0d0 <_POSIX_Message_queue_Delete+0x3c> 4000b0c4: 11 10 00 9c sethi %hi(0x40027000), %o0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000b0c8: 40 00 11 21 call 4000f54c <_Heap_Free> <== NOT EXECUTED 4000b0cc: 90 12 22 dc or %o0, 0x2dc, %o0 ! 400272dc <_Workspace_Area> <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b0d0: 03 10 00 9d sethi %hi(0x40027400), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000b0d4: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b0d8: b0 10 62 a8 or %g1, 0x2a8, %i0 4000b0dc: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 4000b0e0: 03 00 00 3f sethi %hi(0xfc00), %g1 4000b0e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000b0e8: 82 08 c0 01 and %g3, %g1, %g1 4000b0ec: 80 a0 40 02 cmp %g1, %g2 4000b0f0: 18 80 00 05 bgu 4000b104 <_POSIX_Message_queue_Delete+0x70> 4000b0f4: 90 06 60 20 add %i1, 0x20, %o0 information->local_table[ index ] = the_object; 4000b0f8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 4000b0fc: 83 28 60 02 sll %g1, 2, %g1 4000b100: c0 20 80 01 clr [ %g2 + %g1 ] _Workspace_Free( the_mq->Object.name ); _Objects_Close( &_POSIX_Message_queue_Information, &the_mq->Object ); _CORE_message_queue_Close( 4000b104: 92 10 20 00 clr %o1 4000b108: 94 10 20 05 mov 5, %o2 4000b10c: 40 00 0e dc call 4000ec7c <_CORE_message_queue_Close> 4000b110: c0 26 60 0c clr [ %i1 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4000b114: 40 00 13 49 call 4000fe38 <_Objects_Free> 4000b118: 81 e8 00 00 restore 4000b11c: 81 c7 e0 08 ret 4000b120: 81 e8 00 00 restore 4000b6b4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000b6b4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 4000b6b8: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b6bc: 94 07 bf f4 add %fp, -12, %o2 4000b6c0: 90 12 20 60 or %o0, 0x60, %o0 4000b6c4: 40 00 12 20 call 4000ff44 <_Objects_Get> 4000b6c8: 92 10 00 18 mov %i0, %o1 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b6cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000b6d0: 94 10 00 19 mov %i1, %o2 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b6d4: 80 a0 60 01 cmp %g1, 1 4000b6d8: 02 80 00 43 be 4000b7e4 <_POSIX_Message_queue_Receive_support+0x130> 4000b6dc: 9a 10 00 1d mov %i5, %o5 4000b6e0: 80 a0 60 01 cmp %g1, 1 4000b6e4: 1a 80 00 29 bcc 4000b788 <_POSIX_Message_queue_Receive_support+0xd4> 4000b6e8: 80 a0 60 02 cmp %g1, 2 case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4000b6ec: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000b6f0: 82 08 a0 03 and %g2, 3, %g1 4000b6f4: 80 a0 60 01 cmp %g1, 1 4000b6f8: 02 80 00 2a be 4000b7a0 <_POSIX_Message_queue_Receive_support+0xec> 4000b6fc: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000b700: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4000b704: c2 02 20 6c ld [ %o0 + 0x6c ], %g1 4000b708: 80 a0 40 1a cmp %g1, %i2 4000b70c: 18 80 00 44 bgu 4000b81c <_POSIX_Message_queue_Receive_support+0x168> 4000b710: 80 a7 20 00 cmp %i4, 0 length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000b714: 12 80 00 3a bne 4000b7fc <_POSIX_Message_queue_Receive_support+0x148> 4000b718: 98 10 20 00 clr %o4 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4000b71c: 82 10 3f ff mov -1, %g1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4000b720: 90 02 20 20 add %o0, 0x20, %o0 4000b724: 92 10 00 18 mov %i0, %o1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4000b728: c2 27 bf f0 st %g1, [ %fp + -16 ] do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4000b72c: 40 00 0d 7a call 4000ed14 <_CORE_message_queue_Seize> 4000b730: 96 07 bf f0 add %fp, -16, %o3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b734: 05 10 00 9c sethi %hi(0x40027000), %g2 4000b738: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000b73c: 82 00 7f ff add %g1, -1, %g1 4000b740: c2 20 a2 90 st %g1, [ %g2 + 0x290 ] 4000b744: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 4000b748: 80 a0 e0 00 cmp %g3, 0 4000b74c: 02 80 00 30 be 4000b80c <_POSIX_Message_queue_Receive_support+0x158> 4000b750: 01 00 00 00 nop do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000b754: 3b 10 00 9c sethi %hi(0x40027000), %i5 <== NOT EXECUTED 4000b758: c4 07 63 6c ld [ %i5 + 0x36c ], %g2 ! 4002736c <_Thread_Executing> <== NOT EXECUTED 4000b75c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4000b760: c8 00 a0 34 ld [ %g2 + 0x34 ], %g4 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000b764: 87 38 60 1f sra %g1, 0x1f, %g3 4000b768: 82 18 c0 01 xor %g3, %g1, %g1 4000b76c: 82 20 40 03 sub %g1, %g3, %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4000b770: 80 a1 20 00 cmp %g4, 0 4000b774: 12 80 00 38 bne 4000b854 <_POSIX_Message_queue_Receive_support+0x1a0> 4000b778: c2 26 c0 00 st %g1, [ %i3 ] return length_out; 4000b77c: d0 07 bf f0 ld [ %fp + -16 ], %o0 _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000b780: 81 c7 e0 08 ret 4000b784: 91 e8 00 08 restore %g0, %o0, %o0 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b788: 02 80 00 10 be 4000b7c8 <_POSIX_Message_queue_Receive_support+0x114> 4000b78c: 01 00 00 00 nop _POSIX_Message_queue_Translate_core_message_queue_return_code( _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); 4000b790: 40 00 06 8e call 4000d1c8 <== NOT EXECUTED 4000b794: 01 00 00 00 nop <== NOT EXECUTED } 4000b798: 81 c7 e0 08 ret 4000b79c: 91 e8 00 08 restore %g0, %o0, %o0 4000b7a0: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b7a4: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b7a8: 84 00 bf ff add %g2, -1, %g2 4000b7ac: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b7b0: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b7b4: 80 a0 e0 00 cmp %g3, 0 4000b7b8: 12 80 00 04 bne 4000b7c8 <_POSIX_Message_queue_Receive_support+0x114> 4000b7bc: 01 00 00 00 nop _Thread_Dispatch(); 4000b7c0: 40 00 16 cd call 400112f4 <_Thread_Dispatch> 4000b7c4: 01 00 00 00 nop return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4000b7c8: 40 00 2f e9 call 4001776c <__errno> 4000b7cc: 01 00 00 00 nop 4000b7d0: 82 10 20 09 mov 9, %g1 ! 9 4000b7d4: c2 22 00 00 st %g1, [ %o0 ] 4000b7d8: 90 10 3f ff mov -1, %o0 _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000b7dc: 81 c7 e0 08 ret 4000b7e0: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b7e4: 40 00 16 c4 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b7e8: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b7ec: 40 00 06 81 call 4000d1f0 <== NOT EXECUTED 4000b7f0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000b7f4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b7f8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 4000b7fc: 83 30 a0 0e srl %g2, 0xe, %g1 4000b800: 82 18 60 01 xor %g1, 1, %g1 4000b804: 10 bf ff c6 b 4000b71c <_POSIX_Message_queue_Receive_support+0x68> 4000b808: 98 08 60 01 and %g1, 1, %o4 4000b80c: 40 00 16 ba call 400112f4 <_Thread_Dispatch> 4000b810: 3b 10 00 9c sethi %hi(0x40027000), %i5 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000b814: 10 bf ff d2 b 4000b75c <_POSIX_Message_queue_Receive_support+0xa8> 4000b818: c4 07 63 6c ld [ %i5 + 0x36c ], %g2 ! 4002736c <_Thread_Executing> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b81c: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b820: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b824: 84 00 bf ff add %g2, -1, %g2 4000b828: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b82c: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b830: 80 a0 e0 00 cmp %g3, 0 4000b834: 02 80 00 11 be 4000b878 <_POSIX_Message_queue_Receive_support+0x1c4> 4000b838: 01 00 00 00 nop the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4000b83c: 40 00 2f cc call 4001776c <__errno> 4000b840: 01 00 00 00 nop 4000b844: 82 10 20 7a mov 0x7a, %g1 ! 7a 4000b848: c2 22 00 00 st %g1, [ %o0 ] 4000b84c: 10 bf ff d3 b 4000b798 <_POSIX_Message_queue_Receive_support+0xe4> 4000b850: 90 10 3f ff mov -1, %o0 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4000b854: 40 00 2f c6 call 4001776c <__errno> 4000b858: 01 00 00 00 nop 4000b85c: c2 07 63 6c ld [ %i5 + 0x36c ], %g1 4000b860: a0 10 00 08 mov %o0, %l0 4000b864: 40 00 00 e5 call 4000bbf8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000b868: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 4000b86c: d0 24 00 00 st %o0, [ %l0 ] 4000b870: 10 bf ff ca b 4000b798 <_POSIX_Message_queue_Receive_support+0xe4> 4000b874: 90 10 3f ff mov -1, %o0 _Thread_Dispatch(); 4000b878: 40 00 16 9f call 400112f4 <_Thread_Dispatch> 4000b87c: 01 00 00 00 nop 4000b880: 30 bf ff ef b,a 4000b83c <_POSIX_Message_queue_Receive_support+0x188> 4000b89c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000b89c: 9d e3 bf 88 save %sp, -120, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4000b8a0: 80 a6 e0 20 cmp %i3, 0x20 4000b8a4: 18 80 00 5b bgu 4000ba10 <_POSIX_Message_queue_Send_support+0x174> 4000b8a8: 92 10 00 18 mov %i0, %o1 4000b8ac: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b8b0: 90 12 20 60 or %o0, 0x60, %o0 ! 40027860 <_POSIX_Message_queue_Information_fds> 4000b8b4: 40 00 11 a4 call 4000ff44 <_Objects_Get> 4000b8b8: 94 07 bf f4 add %fp, -12, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b8bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000b8c0: 80 a0 60 01 cmp %g1, 1 4000b8c4: 02 80 00 42 be 4000b9cc <_POSIX_Message_queue_Send_support+0x130> 4000b8c8: 01 00 00 00 nop 4000b8cc: 2a 80 00 09 bcs,a 4000b8f0 <_POSIX_Message_queue_Send_support+0x54> 4000b8d0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000b8d4: 80 a0 60 02 cmp %g1, 2 4000b8d8: 02 80 00 36 be 4000b9b0 <_POSIX_Message_queue_Send_support+0x114> 4000b8dc: 01 00 00 00 nop _POSIX_Message_queue_Translate_core_message_queue_return_code( msg_status ) ); } return POSIX_BOTTOM_REACHED(); 4000b8e0: 40 00 06 3a call 4000d1c8 <== NOT EXECUTED 4000b8e4: 01 00 00 00 nop <== NOT EXECUTED } 4000b8e8: 81 c7 e0 08 ret 4000b8ec: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4000b8f0: 80 88 60 03 btst 3, %g1 4000b8f4: 02 80 00 25 be 4000b988 <_POSIX_Message_queue_Send_support+0xec> 4000b8f8: 80 a7 20 00 cmp %i4, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000b8fc: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000b900: 12 80 00 39 bne 4000b9e4 <_POSIX_Message_queue_Send_support+0x148> 4000b904: 84 10 20 00 clr %g2 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000b908: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 4000b90c: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 4000b910: 92 10 00 19 mov %i1, %o1 4000b914: 94 10 00 1a mov %i2, %o2 4000b918: 96 10 00 18 mov %i0, %o3 4000b91c: 9a 20 00 1b neg %i3, %o5 4000b920: 98 10 20 00 clr %o4 4000b924: 40 00 0d 43 call 4000ee30 <_CORE_message_queue_Submit> 4000b928: 90 02 20 20 add %o0, 0x20, %o0 4000b92c: ba 10 00 08 mov %o0, %i5 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b930: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b934: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b938: 84 00 bf ff add %g2, -1, %g2 4000b93c: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b940: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b944: 80 a0 e0 00 cmp %g3, 0 4000b948: 02 80 00 2b be 4000b9f4 <_POSIX_Message_queue_Send_support+0x158> 4000b94c: 01 00 00 00 nop * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4000b950: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 4000b954: 02 80 00 2c be 4000ba04 <_POSIX_Message_queue_Send_support+0x168> 4000b958: 03 10 00 9c sethi %hi(0x40027000), %g1 msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4000b95c: 80 a7 60 00 cmp %i5, 0 4000b960: 02 bf ff e2 be 4000b8e8 <_POSIX_Message_queue_Send_support+0x4c> 4000b964: 90 10 20 00 clr %o0 return msg_status; rtems_set_errno_and_return_minus_one( 4000b968: 40 00 2f 81 call 4001776c <__errno> 4000b96c: 01 00 00 00 nop 4000b970: a0 10 00 08 mov %o0, %l0 4000b974: 40 00 00 a1 call 4000bbf8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000b978: 90 10 00 1d mov %i5, %o0 4000b97c: d0 24 00 00 st %o0, [ %l0 ] 4000b980: 10 bf ff da b 4000b8e8 <_POSIX_Message_queue_Send_support+0x4c> 4000b984: 90 10 3f ff mov -1, %o0 4000b988: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b98c: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b990: 84 00 bf ff add %g2, -1, %g2 4000b994: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b998: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b99c: 80 a0 e0 00 cmp %g3, 0 4000b9a0: 12 80 00 04 bne 4000b9b0 <_POSIX_Message_queue_Send_support+0x114> 4000b9a4: 01 00 00 00 nop _Thread_Dispatch(); 4000b9a8: 40 00 16 53 call 400112f4 <_Thread_Dispatch> 4000b9ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4000b9b0: 40 00 2f 6f call 4001776c <__errno> 4000b9b4: 01 00 00 00 nop 4000b9b8: 82 10 20 09 mov 9, %g1 ! 9 4000b9bc: c2 22 00 00 st %g1, [ %o0 ] 4000b9c0: 90 10 3f ff mov -1, %o0 msg_status ) ); } return POSIX_BOTTOM_REACHED(); } 4000b9c4: 81 c7 e0 08 ret 4000b9c8: 91 e8 00 08 restore %g0, %o0, %o0 switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b9cc: 40 00 16 4a call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b9d0: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b9d4: 40 00 06 07 call 4000d1f0 <== NOT EXECUTED 4000b9d8: 01 00 00 00 nop <== NOT EXECUTED msg_status ) ); } return POSIX_BOTTOM_REACHED(); } 4000b9dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000b9e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 4000b9e4: 83 30 60 0e srl %g1, 0xe, %g1 4000b9e8: 82 18 60 01 xor %g1, 1, %g1 4000b9ec: 10 bf ff c7 b 4000b908 <_POSIX_Message_queue_Send_support+0x6c> 4000b9f0: 84 08 60 01 and %g1, 1, %g2 4000b9f4: 40 00 16 40 call 400112f4 <_Thread_Dispatch> 4000b9f8: 01 00 00 00 nop * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4000b9fc: 10 bf ff d6 b 4000b954 <_POSIX_Message_queue_Send_support+0xb8> 4000ba00: 80 a7 60 07 cmp %i5, 7 msg_status = _Thread_Executing->Wait.return_code; 4000ba04: c4 00 63 6c ld [ %g1 + 0x36c ], %g2 4000ba08: 10 bf ff d5 b 4000b95c <_POSIX_Message_queue_Send_support+0xc0> 4000ba0c: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000ba10: 40 00 2f 57 call 4001776c <__errno> 4000ba14: 01 00 00 00 nop 4000ba18: 82 10 20 16 mov 0x16, %g1 ! 16 4000ba1c: c2 22 00 00 st %g1, [ %o0 ] 4000ba20: 10 bf ff b2 b 4000b8e8 <_POSIX_Message_queue_Send_support+0x4c> 4000ba24: 90 10 3f ff mov -1, %o0 4000bbf8 <_POSIX_Message_queue_Translate_core_message_queue_return_code>: */ int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { 4000bbf8: 9d e3 bf 98 save %sp, -104, %sp switch ( the_message_queue_status ) { 4000bbfc: 80 a6 20 03 cmp %i0, 3 4000bc00: 02 80 00 21 be 4000bc84 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x8c> 4000bc04: 94 10 00 18 mov %i0, %o2 4000bc08: 80 a6 20 03 cmp %i0, 3 4000bc0c: 08 80 00 12 bleu 4000bc54 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x5c> 4000bc10: 80 a6 20 01 cmp %i0, 1 4000bc14: 80 a6 20 05 cmp %i0, 5 4000bc18: 02 80 00 19 be 4000bc7c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x84> 4000bc1c: 01 00 00 00 nop 4000bc20: 2a 80 00 13 bcs,a 4000bc6c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x74> 4000bc24: b0 10 20 0b mov 0xb, %i0 ! b 4000bc28: 80 a6 20 06 cmp %i0, 6 4000bc2c: 02 80 00 1a be 4000bc94 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x9c> 4000bc30: 03 00 44 44 sethi %hi(0x1111000), %g1 4000bc34: 82 10 61 11 or %g1, 0x111, %g1 ! 1111111 <== NOT EXECUTED 4000bc38: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4000bc3c: 02 80 00 14 be 4000bc8c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x94> <== NOT EXECUTED 4000bc40: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED * RTEMS POSIX API implementation does not support multiprocessing. */ case THREAD_STATUS_PROXY_BLOCKING: return ENOSYS; } _Internal_error_Occurred( 4000bc44: 40 00 0f 42 call 4000f94c <_Internal_error_Occurred> <== NOT EXECUTED 4000bc48: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED INTERNAL_ERROR_POSIX_API, TRUE, the_message_queue_status ); return POSIX_BOTTOM_REACHED(); 4000bc4c: 40 00 05 5f call 4000d1c8 <== NOT EXECUTED 4000bc50: 81 e8 00 00 restore <== NOT EXECUTED int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000bc54: 02 80 00 06 be 4000bc6c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x74> 4000bc58: b0 10 20 7a mov 0x7a, %i0 4000bc5c: 80 a2 a0 01 cmp %o2, 1 4000bc60: 08 80 00 05 bleu 4000bc74 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x7c> 4000bc64: 01 00 00 00 nop _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, the_message_queue_status ); return POSIX_BOTTOM_REACHED(); 4000bc68: b0 10 20 0b mov 0xb, %i0 ! b } 4000bc6c: 81 c7 e0 08 ret 4000bc70: 81 e8 00 00 restore int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000bc74: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Out of message buffers to queue pending message */ case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED: return ENOMEM; 4000bc7c: 81 c7 e0 08 ret 4000bc80: 91 e8 20 09 restore %g0, 9, %o0 /* * Bad message size */ case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE: return EMSGSIZE; 4000bc84: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc88: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000bc8c: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc90: 91 e8 20 58 restore %g0, 0x58, %o0 <== NOT EXECUTED 4000bc94: 81 c7 e0 08 ret 4000bc98: 91 e8 20 74 restore %g0, 0x74, %o0 400113dc <_POSIX_Mutex_From_core_mutex_status>: */ int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { 400113dc: 9d e3 bf 98 save %sp, -104, %sp switch ( status ) { 400113e0: 80 a6 20 06 cmp %i0, 6 400113e4: 08 80 00 0b bleu 40011410 <_POSIX_Mutex_From_core_mutex_status+0x34> 400113e8: 83 2e 20 02 sll %i0, 2, %g1 case CORE_MUTEX_STATUS_CEILING_VIOLATED: return EINVAL; default: break; } assert( 0 ); 400113ec: 92 10 20 32 mov 0x32, %o1 <== NOT EXECUTED 400113f0: 11 10 00 6a sethi %hi(0x4001a800), %o0 <== NOT EXECUTED 400113f4: 15 10 00 63 sethi %hi(0x40018c00), %o2 <== NOT EXECUTED 400113f8: 90 12 20 38 or %o0, 0x38, %o0 <== NOT EXECUTED 400113fc: 94 12 a2 d0 or %o2, 0x2d0, %o2 <== NOT EXECUTED 40011400: 7f ff cf 64 call 40005190 <__assert> <== NOT EXECUTED 40011404: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40011408: 81 c7 e0 08 ret <== NOT EXECUTED 4001140c: 81 e8 00 00 restore <== NOT EXECUTED int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { switch ( status ) { 40011410: 05 10 00 44 sethi %hi(0x40011000), %g2 40011414: 84 10 a3 c0 or %g2, 0x3c0, %g2 ! 400113c0 <_POSIX_Message_queue_Manager_initialization+0x58> 40011418: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4001141c: 81 c0 c0 00 jmp %g3 40011420: 01 00 00 00 nop 40011424: 81 c7 e0 08 ret 40011428: 91 e8 20 74 restore %g0, 0x74, %o0 4001142c: 81 c7 e0 08 ret 40011430: 91 e8 20 00 restore %g0, 0, %o0 case CORE_MUTEX_STATUS_SUCCESSFUL: return 0; 40011434: 81 c7 e0 08 ret 40011438: 91 e8 20 10 restore %g0, 0x10, %o0 case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT: return EBUSY; 4001143c: 81 c7 e0 08 ret 40011440: 91 e8 20 2d restore %g0, 0x2d, %o0 case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED: return EDEADLK; 40011444: 81 c7 e0 08 ret 40011448: 91 e8 20 01 restore %g0, 1, %o0 int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { switch ( status ) { 4001144c: 81 c7 e0 08 ret 40011450: 91 e8 20 16 restore %g0, 0x16, %o0 40008b58 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, boolean blocking, Watchdog_Interval timeout ) { 40008b58: 9d e3 bf 90 save %sp, -112, %sp ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008b5c: 80 a6 20 00 cmp %i0, 0 40008b60: 32 80 00 05 bne,a 40008b74 <_POSIX_Mutex_Lock_support+0x1c> 40008b64: d2 06 00 00 ld [ %i0 ], %o1 ); return _POSIX_Mutex_From_core_mutex_status( (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40008b68: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40008b6c: 81 c7 e0 08 ret 40008b70: 91 e8 00 08 restore %g0, %o0, %o0 40008b74: 80 a2 7f ff cmp %o1, -1 40008b78: 02 80 00 94 be 40008dc8 <_POSIX_Mutex_Lock_support+0x270> 40008b7c: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 40008b80: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008b84: 94 07 bf f4 add %fp, -12, %o2 40008b88: 90 12 23 e4 or %o0, 0x3e4, %o0 40008b8c: 40 00 0e d8 call 4000c6ec <_Objects_Get_isr_disable> 40008b90: 96 07 bf f0 add %fp, -16, %o3 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 40008b94: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008b98: 80 a0 60 00 cmp %g1, 0 40008b9c: 12 80 00 21 bne 40008c20 <_POSIX_Mutex_Lock_support+0xc8> 40008ba0: a0 10 00 08 mov %o0, %l0 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40008ba4: 31 10 00 70 sethi %hi(0x4001c000), %i0 40008ba8: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008bac: 80 a0 60 00 cmp %g1, 0 40008bb0: 12 80 00 22 bne 40008c38 <_POSIX_Mutex_Lock_support+0xe0> 40008bb4: 80 a6 60 00 cmp %i1, 0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008bb8: 23 10 00 71 sethi %hi(0x4001c400), %l1 40008bbc: c4 04 60 5c ld [ %l1 + 0x5c ], %g2 ! 4001c45c <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40008bc0: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40008bc4: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40008bc8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 40008bcc: 80 a0 60 00 cmp %g1, 0 40008bd0: 22 80 00 26 be,a 40008c68 <_POSIX_Mutex_Lock_support+0x110> 40008bd4: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 40008bd8: c0 24 20 64 clr [ %l0 + 0x64 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008bdc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40008be0: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40008be4: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008be8: c2 24 20 74 st %g1, [ %l0 + 0x74 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40008bec: c4 24 20 70 st %g2, [ %l0 + 0x70 ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008bf0: 80 a0 e0 02 cmp %g3, 2 40008bf4: 02 80 00 2b be 40008ca0 <_POSIX_Mutex_Lock_support+0x148> 40008bf8: c8 24 20 68 st %g4, [ %l0 + 0x68 ] 40008bfc: 80 a0 e0 03 cmp %g3, 3 40008c00: 22 80 00 2a be,a 40008ca8 <_POSIX_Mutex_Lock_support+0x150> 40008c04: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40008c08: 7f ff ed 2b call 400040b4 40008c0c: 01 00 00 00 nop the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40008c10: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 40008c14: 40 00 21 f2 call 400113dc <_POSIX_Mutex_From_core_mutex_status> 40008c18: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 40008c1c: 30 bf ff d4 b,a 40008b6c <_POSIX_Mutex_Lock_support+0x14> register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 40008c20: 80 a0 60 02 cmp %g1, 2 40008c24: 28 bf ff d2 bleu,a 40008b6c <_POSIX_Mutex_Lock_support+0x14> 40008c28: 90 10 20 16 mov 0x16, %o0 ); return _POSIX_Mutex_From_core_mutex_status( (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40008c2c: 40 00 04 15 call 40009c80 <== NOT EXECUTED 40008c30: 01 00 00 00 nop <== NOT EXECUTED 40008c34: 30 bf ff ce b,a 40008b6c <_POSIX_Mutex_Lock_support+0x14> <== NOT EXECUTED ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40008c38: 02 bf ff e1 be 40008bbc <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40008c3c: 23 10 00 71 sethi %hi(0x4001c400), %l1 <== NOT EXECUTED 40008c40: 03 10 00 71 sethi %hi(0x4001c400), %g1 <== NOT EXECUTED 40008c44: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 4001c560 <_System_state_Current> <== NOT EXECUTED 40008c48: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40008c4c: 08 bf ff dc bleu 40008bbc <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40008c50: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008c54: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008c58: 40 00 0d 45 call 4000c16c <_Internal_error_Occurred> <== NOT EXECUTED 40008c5c: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008c60: 10 bf ff d7 b 40008bbc <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40008c64: 23 10 00 71 sethi %hi(0x4001c400), %l1 <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40008c68: 80 a0 40 02 cmp %g1, %g2 40008c6c: 12 80 00 2d bne 40008d20 <_POSIX_Mutex_Lock_support+0x1c8> 40008c70: 80 a6 60 00 cmp %i1, 0 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008c74: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40008c78: 80 a0 60 00 cmp %g1, 0 40008c7c: 12 80 00 41 bne 40008d80 <_POSIX_Mutex_Lock_support+0x228> 40008c80: 80 a0 60 01 cmp %g1, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40008c84: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 <== NOT EXECUTED 40008c88: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008c8c: c2 24 20 68 st %g1, [ %l0 + 0x68 ] <== NOT EXECUTED _ISR_Enable( level ); 40008c90: 7f ff ed 09 call 400040b4 <== NOT EXECUTED 40008c94: 01 00 00 00 nop <== NOT EXECUTED the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40008c98: 10 bf ff df b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> <== NOT EXECUTED 40008c9c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008ca0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008ca4: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008ca8: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008cac: 12 bf ff d7 bne 40008c08 <_POSIX_Mutex_Lock_support+0xb0> 40008cb0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40008cb4: c6 04 20 60 ld [ %l0 + 0x60 ], %g3 current = executing->current_priority; 40008cb8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 40008cbc: 80 a0 40 03 cmp %g1, %g3 40008cc0: 02 80 00 49 be 40008de4 <_POSIX_Mutex_Lock_support+0x28c> 40008cc4: 80 a0 c0 01 cmp %g3, %g1 _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40008cc8: 1a 80 00 36 bcc 40008da0 <_POSIX_Mutex_Lock_support+0x248> 40008ccc: 82 10 20 06 mov 6, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008cd0: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 40008cd4: 82 00 60 01 inc %g1 40008cd8: c2 26 23 80 st %g1, [ %i0 + 0x380 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 40008cdc: 7f ff ec f6 call 400040b4 40008ce0: 01 00 00 00 nop _Thread_Change_priority( 40008ce4: d2 04 20 60 ld [ %l0 + 0x60 ], %o1 40008ce8: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 40008cec: 40 00 12 66 call 4000d684 <_Thread_Change_priority> 40008cf0: 94 10 20 00 clr %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008cf4: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 40008cf8: 82 00 7f ff add %g1, -1, %g1 40008cfc: c2 26 23 80 st %g1, [ %i0 + 0x380 ] 40008d00: c4 06 23 80 ld [ %i0 + 0x380 ], %g2 40008d04: 80 a0 a0 00 cmp %g2, 0 40008d08: 32 bf ff c3 bne,a 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d0c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 40008d10: 40 00 13 81 call 4000db14 <_Thread_Dispatch> 40008d14: 01 00 00 00 nop 40008d18: 10 bf ff bf b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d1c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40008d20: 32 80 00 08 bne,a 40008d40 <_POSIX_Mutex_Lock_support+0x1e8> 40008d24: c4 04 20 08 ld [ %l0 + 8 ], %g2 40008d28: 7f ff ec e3 call 400040b4 40008d2c: d0 07 bf f0 ld [ %fp + -16 ], %o0 40008d30: c4 04 60 5c ld [ %l1 + 0x5c ], %g2 40008d34: 82 10 20 01 mov 1, %g1 40008d38: 10 bf ff b6 b 40008c10 <_POSIX_Mutex_Lock_support+0xb8> 40008d3c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] 40008d40: c6 04 60 5c ld [ %l1 + 0x5c ], %g3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008d44: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 40008d48: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] 40008d4c: 82 00 60 01 inc %g1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40008d50: 84 10 20 01 mov 1, %g2 40008d54: c2 26 23 80 st %g1, [ %i0 + 0x380 ] 40008d58: c4 24 20 44 st %g2, [ %l0 + 0x44 ] 40008d5c: a0 04 20 14 add %l0, 0x14, %l0 40008d60: e0 20 e0 44 st %l0, [ %g3 + 0x44 ] 40008d64: 7f ff ec d4 call 400040b4 40008d68: d0 07 bf f0 ld [ %fp + -16 ], %o0 40008d6c: 90 10 00 10 mov %l0, %o0 40008d70: 40 00 0a ae call 4000b828 <_CORE_mutex_Seize_interrupt_blocking> 40008d74: 92 10 00 1a mov %i2, %o1 the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40008d78: 10 bf ff a7 b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d7c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008d80: 12 bf ff e8 bne 40008d20 <_POSIX_Mutex_Lock_support+0x1c8> 40008d84: 80 a6 60 00 cmp %i1, 0 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40008d88: 82 10 20 02 mov 2, %g1 40008d8c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] _ISR_Enable( level ); 40008d90: 7f ff ec c9 call 400040b4 40008d94: 01 00 00 00 nop 40008d98: 10 bf ff 9f b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d9c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40008da0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008da4: c8 24 20 64 st %g4, [ %l0 + 0x64 ] the_mutex->nest_count = 0; /* undo locking above */ 40008da8: c0 24 20 68 clr [ %l0 + 0x68 ] executing->resource_count--; /* undo locking above */ 40008dac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40008db0: 82 00 7f ff add %g1, -1, %g1 40008db4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40008db8: 7f ff ec bf call 400040b4 40008dbc: 01 00 00 00 nop 40008dc0: 10 bf ff 95 b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008dc4: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008dc8: 7f ff fe f6 call 400089a0 <== NOT EXECUTED 40008dcc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008dd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008dd4: 12 bf ff 66 bne 40008b6c <_POSIX_Mutex_Lock_support+0x14> <== NOT EXECUTED 40008dd8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40008ddc: 10 bf ff 69 b 40008b80 <_POSIX_Mutex_Lock_support+0x28> <== NOT EXECUTED 40008de0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40008de4: 7f ff ec b4 call 400040b4 <== NOT EXECUTED 40008de8: 01 00 00 00 nop <== NOT EXECUTED 40008dec: 10 bf ff 8a b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> <== NOT EXECUTED 40008df0: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code>: int _POSIX_RWLock_Translate_core_RWLock_return_code( CORE_RWLock_Status the_rwlock_status ) { if ( the_rwlock_status <= CORE_RWLOCK_STATUS_LAST ) 400078f8: 80 a2 20 03 cmp %o0, 3 400078fc: 18 80 00 06 bgu 40007914 <_POSIX_RWLock_Translate_core_RWLock_return_code+0x1c> 40007900: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_RWLock_Return_codes[the_rwlock_status]; return POSIX_BOTTOM_REACHED(); } 40007904: 03 10 00 72 sethi %hi(0x4001c800), %g1 40007908: 82 10 62 cc or %g1, 0x2cc, %g1 ! 4001cacc <_POSIX_RWLock_Return_codes> 4000790c: 81 c3 e0 08 retl 40007910: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_RWLock_Status the_rwlock_status ) { if ( the_rwlock_status <= CORE_RWLOCK_STATUS_LAST ) return _POSIX_RWLock_Return_codes[the_rwlock_status]; return POSIX_BOTTOM_REACHED(); 40007914: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40007918: 40 00 02 95 call 4000836c <== NOT EXECUTED 4000791c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40007920: 01 00 00 00 nop 40010570 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 40010570: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010574: 21 10 00 85 sethi %hi(0x40021400), %l0 40010578: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 4001057c: 82 00 60 01 inc %g1 40010580: c2 24 22 30 st %g1, [ %l0 + 0x230 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 40010584: 80 a6 60 00 cmp %i1, 0 40010588: 12 80 00 3b bne 40010674 <_POSIX_Semaphore_Create_support+0x104> 4001058c: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 40010590: 02 80 00 07 be 400105ac <_POSIX_Semaphore_Create_support+0x3c> 40010594: 23 10 00 86 sethi %hi(0x40021800), %l1 if( strlen(name) > PATH_MAX ) { 40010598: 40 00 0f b9 call 4001447c 4001059c: 90 10 00 18 mov %i0, %o0 400105a0: 80 a2 20 ff cmp %o0, 0xff 400105a4: 18 80 00 41 bgu 400106a8 <_POSIX_Semaphore_Create_support+0x138> 400105a8: 23 10 00 86 sethi %hi(0x40021800), %l1 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 400105ac: 7f ff e9 91 call 4000abf0 <_Objects_Allocate> 400105b0: 90 14 61 b0 or %l1, 0x1b0, %o0 ! 400219b0 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 400105b4: b2 92 20 00 orcc %o0, 0, %i1 400105b8: 02 80 00 4f be 400106f4 <_POSIX_Semaphore_Create_support+0x184> 400105bc: 80 a6 20 00 cmp %i0, 0 } #endif the_semaphore->process_shared = pshared; if ( name ) { 400105c0: 02 80 00 29 be 40010664 <_POSIX_Semaphore_Create_support+0xf4> 400105c4: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; 400105c8: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 400105cc: c2 26 60 18 st %g1, [ %i1 + 0x18 ] #endif the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 400105d0: c2 26 60 14 st %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; 400105d4: c2 26 60 1c st %g1, [ %i1 + 0x1c ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 400105d8: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 400105dc: 90 06 60 20 add %i1, 0x20, %o0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 400105e0: c2 26 60 60 st %g1, [ %i1 + 0x60 ] * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 400105e4: c0 26 60 64 clr [ %i1 + 0x64 ] * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 400105e8: 94 10 00 1a mov %i2, %o2 400105ec: 7f ff e7 b1 call 4000a4b0 <_CORE_semaphore_Initialize> 400105f0: 92 06 60 60 add %i1, 0x60, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400105f4: 90 14 61 b0 or %l1, 0x1b0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400105f8: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400105fc: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40010600: 03 00 00 3f sethi %hi(0xfc00), %g1 40010604: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40010608: 82 08 80 01 and %g2, %g1, %g1 4001060c: 80 a0 40 03 cmp %g1, %g3 40010610: 38 80 00 06 bgu,a 40010628 <_POSIX_Semaphore_Create_support+0xb8> 40010614: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40010618: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4001061c: 83 28 60 02 sll %g1, 2, %g1 40010620: f2 20 80 01 st %i1, [ %g2 + %g1 ] * Make the semaphore available for use. */ _Objects_Open(&_POSIX_Semaphore_Information, &the_semaphore->Object, name_p); *the_sem = the_semaphore; 40010624: f2 26 c0 00 st %i1, [ %i3 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40010628: f0 26 60 0c st %i0, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001062c: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40010630: b0 10 20 00 clr %i0 40010634: 82 00 7f ff add %g1, -1, %g1 40010638: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 4001063c: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40010640: 80 a0 a0 00 cmp %g2, 0 40010644: 02 80 00 04 be 40010654 <_POSIX_Semaphore_Create_support+0xe4> 40010648: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return 0; } 4001064c: 81 c7 e0 08 ret 40010650: 81 e8 00 00 restore _Thread_Dispatch(); 40010654: 7f ff ef a4 call 4000c4e4 <_Thread_Dispatch> 40010658: 01 00 00 00 nop 4001065c: 81 c7 e0 08 ret 40010660: 81 e8 00 00 restore if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 40010664: c0 26 60 14 clr [ %i1 + 0x14 ] the_semaphore->open_count = 0; 40010668: c0 26 60 1c clr [ %i1 + 0x1c ] the_semaphore->linked = FALSE; 4001066c: 10 bf ff db b 400105d8 <_POSIX_Semaphore_Create_support+0x68> 40010670: c0 26 60 18 clr [ %i1 + 0x18 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010674: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40010678: 82 00 7f ff add %g1, -1, %g1 4001067c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40010680: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40010684: 80 a0 a0 00 cmp %g2, 0 40010688: 02 80 00 15 be 400106dc <_POSIX_Semaphore_Create_support+0x16c> 4001068c: 01 00 00 00 nop _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); 40010690: 40 00 09 03 call 40012a9c <__errno> 40010694: b0 10 3f ff mov -1, %i0 ! ffffffff 40010698: 82 10 20 58 mov 0x58, %g1 4001069c: c2 22 00 00 st %g1, [ %o0 ] 400106a0: 81 c7 e0 08 ret 400106a4: 81 e8 00 00 restore 400106a8: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 <== NOT EXECUTED 400106ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400106b0: c2 24 22 30 st %g1, [ %l0 + 0x230 ] <== NOT EXECUTED 400106b4: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 <== NOT EXECUTED 400106b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400106bc: 02 80 00 0b be 400106e8 <_POSIX_Semaphore_Create_support+0x178> <== NOT EXECUTED 400106c0: 01 00 00 00 nop <== NOT EXECUTED } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 400106c4: 40 00 08 f6 call 40012a9c <__errno> <== NOT EXECUTED 400106c8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400106cc: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED 400106d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400106d4: 81 c7 e0 08 ret <== NOT EXECUTED 400106d8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400106dc: 7f ff ef 82 call 4000c4e4 <_Thread_Dispatch> 400106e0: 01 00 00 00 nop 400106e4: 30 bf ff eb b,a 40010690 <_POSIX_Semaphore_Create_support+0x120> 400106e8: 7f ff ef 7f call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400106ec: 01 00 00 00 nop <== NOT EXECUTED 400106f0: 30 bf ff f5 b,a 400106c4 <_POSIX_Semaphore_Create_support+0x154> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400106f4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 400106f8: 82 00 7f ff add %g1, -1, %g1 400106fc: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40010700: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40010704: 80 a0 a0 00 cmp %g2, 0 40010708: 02 80 00 08 be 40010728 <_POSIX_Semaphore_Create_support+0x1b8> 4001070c: 01 00 00 00 nop the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 40010710: 40 00 08 e3 call 40012a9c <__errno> 40010714: b0 10 3f ff mov -1, %i0 ! ffffffff 40010718: 82 10 20 1c mov 0x1c, %g1 4001071c: c2 22 00 00 st %g1, [ %o0 ] 40010720: 81 c7 e0 08 ret 40010724: 81 e8 00 00 restore _Thread_Dispatch(); 40010728: 7f ff ef 6f call 4000c4e4 <_Thread_Dispatch> 4001072c: 01 00 00 00 nop 40010730: 30 bf ff f8 b,a 40010710 <_POSIX_Semaphore_Create_support+0x1a0> 40010824 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 40010824: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 40010828: d2 06 00 00 ld [ %i0 ], %o1 4001082c: 94 07 bf f4 add %fp, -12, %o2 40010830: 11 10 00 86 sethi %hi(0x40021800), %o0 40010834: 7f ff ea 40 call 4000b134 <_Objects_Get> 40010838: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 400219b0 <_POSIX_Semaphore_Information> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4001083c: c2 07 bf f4 ld [ %fp + -12 ], %g1 int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 40010840: 94 10 00 19 mov %i1, %o2 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40010844: 80 a0 60 01 cmp %g1, 1 40010848: 02 80 00 24 be 400108d8 <_POSIX_Semaphore_Wait_support+0xb4> 4001084c: 96 10 00 1a mov %i2, %o3 40010850: 80 a0 60 01 cmp %g1, 1 40010854: 2a 80 00 07 bcs,a 40010870 <_POSIX_Semaphore_Wait_support+0x4c> 40010858: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001085c: 80 a0 60 02 cmp %g1, 2 40010860: 02 80 00 20 be 400108e0 <_POSIX_Semaphore_Wait_support+0xbc> 40010864: 01 00 00 00 nop */ break; } } return 0; } 40010868: 81 c7 e0 08 ret 4001086c: 91 e8 20 00 restore %g0, 0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _CORE_semaphore_Seize( 40010870: 40 00 01 9b call 40010edc <_CORE_semaphore_Seize> 40010874: 90 02 20 20 add %o0, 0x20, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010878: 03 10 00 85 sethi %hi(0x40021400), %g1 4001087c: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> 40010880: 84 00 bf ff add %g2, -1, %g2 40010884: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 40010888: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 4001088c: 80 a0 e0 00 cmp %g3, 0 40010890: 02 80 00 1a be 400108f8 <_POSIX_Semaphore_Wait_support+0xd4> 40010894: 01 00 00 00 nop the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); switch ( _Thread_Executing->Wait.return_code ) { 40010898: 03 10 00 85 sethi %hi(0x40021400), %g1 <== NOT EXECUTED 4001089c: c4 00 63 0c ld [ %g1 + 0x30c ], %g2 ! 4002170c <_Thread_Executing> 400108a0: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 400108a4: 80 a0 60 02 cmp %g1, 2 400108a8: 02 80 00 06 be 400108c0 <_POSIX_Semaphore_Wait_support+0x9c> 400108ac: 80 a0 60 03 cmp %g1, 3 400108b0: 02 80 00 16 be 40010908 <_POSIX_Semaphore_Wait_support+0xe4> 400108b4: 80 a0 60 01 cmp %g1, 1 400108b8: 12 bf ff ec bne 40010868 <_POSIX_Semaphore_Wait_support+0x44> 400108bc: 01 00 00 00 nop case CORE_SEMAPHORE_STATUS_SUCCESSFUL: break; case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: rtems_set_errno_and_return_minus_one( EAGAIN ); case CORE_SEMAPHORE_WAS_DELETED: rtems_set_errno_and_return_minus_one( EAGAIN ); 400108c0: 40 00 08 77 call 40012a9c <__errno> 400108c4: b0 10 3f ff mov -1, %i0 ! ffffffff 400108c8: 82 10 20 0b mov 0xb, %g1 400108cc: c2 22 00 00 st %g1, [ %o0 ] 400108d0: 81 c7 e0 08 ret 400108d4: 81 e8 00 00 restore the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400108d8: 7f ff ef 03 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400108dc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 400108e0: 40 00 08 6f call 40012a9c <__errno> 400108e4: b0 10 3f ff mov -1, %i0 ! ffffffff 400108e8: 82 10 20 16 mov 0x16, %g1 400108ec: c2 22 00 00 st %g1, [ %o0 ] 400108f0: 81 c7 e0 08 ret 400108f4: 81 e8 00 00 restore _Thread_Dispatch(); 400108f8: 7f ff ee fb call 4000c4e4 <_Thread_Dispatch> 400108fc: 01 00 00 00 nop the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); switch ( _Thread_Executing->Wait.return_code ) { 40010900: 10 bf ff e7 b 4001089c <_POSIX_Semaphore_Wait_support+0x78> 40010904: 03 10 00 85 sethi %hi(0x40021400), %g1 case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: rtems_set_errno_and_return_minus_one( EAGAIN ); case CORE_SEMAPHORE_WAS_DELETED: rtems_set_errno_and_return_minus_one( EAGAIN ); case CORE_SEMAPHORE_TIMEOUT: rtems_set_errno_and_return_minus_one( ETIMEDOUT ); 40010908: 40 00 08 65 call 40012a9c <__errno> 4001090c: b0 10 3f ff mov -1, %i0 40010910: 82 10 20 74 mov 0x74, %g1 40010914: c2 22 00 00 st %g1, [ %o0 ] 40010918: 81 c7 e0 08 ret 4001091c: 81 e8 00 00 restore 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code>: int _POSIX_Spinlock_Translate_core_spinlock_return_code( CORE_spinlock_Status the_spinlock_status ) { if ( the_spinlock_status <= CORE_SPINLOCK_STATUS_LAST ) 40006cfc: 80 a2 20 06 cmp %o0, 6 40006d00: 18 80 00 06 bgu 40006d18 <_POSIX_Spinlock_Translate_core_spinlock_return_code+0x1c> 40006d04: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Spinlock_Return_codes[the_spinlock_status]; return POSIX_BOTTOM_REACHED(); } 40006d08: 03 10 00 51 sethi %hi(0x40014400), %g1 40006d0c: 82 10 62 5c or %g1, 0x25c, %g1 ! 4001465c <_POSIX_Spinlock_Return_codes> 40006d10: 81 c3 e0 08 retl 40006d14: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_spinlock_Status the_spinlock_status ) { if ( the_spinlock_status <= CORE_SPINLOCK_STATUS_LAST ) return _POSIX_Spinlock_Return_codes[the_spinlock_status]; return POSIX_BOTTOM_REACHED(); 40006d18: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006d1c: 40 00 00 66 call 40006eb4 <== NOT EXECUTED 40006d20: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006d24: 01 00 00 00 nop 40007b3c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body( void ) { 40007b3c: 9d e3 bf 58 save %sp, -168, %sp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = _POSIX_Threads_User_initialization_threads; 40007b40: 03 10 00 80 sethi %hi(0x40020000), %g1 40007b44: e4 00 61 fc ld [ %g1 + 0x1fc ], %l2 ! 400201fc <_POSIX_Threads_User_initialization_threads> maximum = _POSIX_Threads_Number_of_initialization_threads; 40007b48: 03 10 00 80 sethi %hi(0x40020000), %g1 if ( !user_threads || maximum == 0 ) 40007b4c: 80 a4 a0 00 cmp %l2, 0 40007b50: 02 80 00 54 be 40007ca0 <_POSIX_Threads_Initialize_user_threads_body+0x164> 40007b54: ec 00 62 cc ld [ %g1 + 0x2cc ], %l6 40007b58: 80 a5 a0 00 cmp %l6, 0 40007b5c: 02 80 00 51 be 40007ca0 <_POSIX_Threads_Initialize_user_threads_body+0x164> 40007b60: 03 10 00 77 sethi %hi(0x4001dc00), %g1 * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); assert( !status ); 40007b64: 05 10 00 74 sethi %hi(0x4001d000), %g2 40007b68: aa 10 60 c8 or %g1, 0xc8, %l5 40007b6c: a8 10 a0 f8 or %g2, 0xf8, %l4 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40007b70: a6 10 20 00 clr %l3 40007b74: a2 10 20 00 clr %l1 40007b78: a0 07 bf bc add %fp, -68, %l0 40007b7c: 10 80 00 1a b 40007be4 <_POSIX_Threads_Initialize_user_threads_body+0xa8> 40007b80: ae 07 bf f4 add %fp, -12, %l7 status = pthread_attr_init( &attr ); assert( !status ); status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40007b84: 40 00 20 db call 4000fef0 40007b88: 90 10 00 10 mov %l0, %o0 assert( !status ); 40007b8c: 80 a2 20 00 cmp %o0, 0 40007b90: 12 80 00 26 bne 40007c28 <_POSIX_Threads_Initialize_user_threads_body+0xec> 40007b94: 94 10 00 14 mov %l4, %o2 status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); 40007b98: 82 04 80 11 add %l2, %l1, %g1 40007b9c: d2 00 60 04 ld [ %g1 + 4 ], %o1 40007ba0: 40 00 20 e4 call 4000ff30 40007ba4: 90 10 00 10 mov %l0, %o0 assert( !status ); 40007ba8: 80 a2 20 00 cmp %o0, 0 40007bac: 12 80 00 2a bne 40007c54 <_POSIX_Threads_Initialize_user_threads_body+0x118> 40007bb0: 90 10 00 15 mov %l5, %o0 status = pthread_create( 40007bb4: d4 04 40 12 ld [ %l1 + %l2 ], %o2 40007bb8: 92 10 00 10 mov %l0, %o1 40007bbc: 96 10 20 00 clr %o3 40007bc0: 90 10 00 17 mov %l7, %o0 40007bc4: 7f ff fe dd call 40007738 40007bc8: a2 04 60 08 add %l1, 8, %l1 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); assert( !status ); 40007bcc: 80 a2 20 00 cmp %o0, 0 40007bd0: 12 80 00 2e bne 40007c88 <_POSIX_Threads_Initialize_user_threads_body+0x14c> 40007bd4: 90 10 00 15 mov %l5, %o0 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40007bd8: 80 a4 c0 16 cmp %l3, %l6 40007bdc: 02 80 00 31 be 40007ca0 <_POSIX_Threads_Initialize_user_threads_body+0x164> 40007be0: 01 00 00 00 nop status = pthread_attr_init( &attr ); 40007be4: 90 10 00 10 mov %l0, %o0 40007be8: 40 00 20 b7 call 4000fec4 40007bec: a6 04 e0 01 inc %l3 assert( !status ); 40007bf0: 80 a2 20 00 cmp %o0, 0 40007bf4: 02 bf ff e4 be 40007b84 <_POSIX_Threads_Initialize_user_threads_body+0x48> 40007bf8: 92 10 20 02 mov 2, %o1 40007bfc: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 40007c00: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c04: 7f ff f0 ff call 40004000 <__assert> <== NOT EXECUTED 40007c08: 92 10 20 47 mov 0x47, %o1 <== NOT EXECUTED status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40007c0c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40007c10: 40 00 20 b8 call 4000fef0 <== NOT EXECUTED 40007c14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED assert( !status ); 40007c18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c1c: 02 bf ff e0 be 40007b9c <_POSIX_Threads_Initialize_user_threads_body+0x60> <== NOT EXECUTED 40007c20: 82 04 80 11 add %l2, %l1, %g1 <== NOT EXECUTED 40007c24: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 40007c28: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c2c: 7f ff f0 f5 call 40004000 <__assert> <== NOT EXECUTED 40007c30: 92 10 20 4a mov 0x4a, %o1 <== NOT EXECUTED status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); 40007c34: 82 04 80 11 add %l2, %l1, %g1 <== NOT EXECUTED 40007c38: d2 00 60 04 ld [ %g1 + 4 ], %o1 <== NOT EXECUTED 40007c3c: 40 00 20 bd call 4000ff30 <== NOT EXECUTED 40007c40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED assert( !status ); 40007c44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c48: 22 bf ff dc be,a 40007bb8 <_POSIX_Threads_Initialize_user_threads_body+0x7c> <== NOT EXECUTED 40007c4c: d4 04 40 12 ld [ %l1 + %l2 ], %o2 <== NOT EXECUTED 40007c50: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c54: 92 10 20 4d mov 0x4d, %o1 <== NOT EXECUTED 40007c58: 7f ff f0 ea call 40004000 <__assert> <== NOT EXECUTED 40007c5c: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED status = pthread_create( 40007c60: d4 04 40 12 ld [ %l1 + %l2 ], %o2 <== NOT EXECUTED 40007c64: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40007c68: 96 10 20 00 clr %o3 <== NOT EXECUTED 40007c6c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40007c70: 7f ff fe b2 call 40007738 <== NOT EXECUTED 40007c74: a2 04 60 08 add %l1, 8, %l1 <== NOT EXECUTED &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); assert( !status ); 40007c78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c7c: 02 bf ff d8 be 40007bdc <_POSIX_Threads_Initialize_user_threads_body+0xa0> <== NOT EXECUTED 40007c80: 80 a4 c0 16 cmp %l3, %l6 <== NOT EXECUTED 40007c84: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c88: 92 10 20 55 mov 0x55, %o1 <== NOT EXECUTED 40007c8c: 7f ff f0 dd call 40004000 <__assert> <== NOT EXECUTED 40007c90: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40007c94: 80 a4 c0 16 cmp %l3, %l6 <== NOT EXECUTED 40007c98: 12 bf ff d4 bne 40007be8 <_POSIX_Threads_Initialize_user_threads_body+0xac> <== NOT EXECUTED 40007c9c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore 4000dea0 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000dea0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000dea4: f0 06 61 70 ld [ %i1 + 0x170 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000dea8: 40 00 04 09 call 4000eecc <_Timespec_To_ticks> 4000deac: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000deb0: 80 a2 20 00 cmp %o0, 0 4000deb4: 22 80 00 02 be,a 4000debc <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000deb8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000debc: c2 06 20 98 ld [ %i0 + 0x98 ], %g1 the_thread->cpu_time_budget = ticks; new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000dec0: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000dec4: 84 10 20 ff mov 0xff, %g2 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); if ( !ticks ) ticks = 1; the_thread->cpu_time_budget = ticks; 4000dec8: d0 26 60 84 st %o0, [ %i1 + 0x84 ] 4000decc: 92 20 80 01 sub %g2, %g1, %o1 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000ded0: 80 a0 e0 00 cmp %g3, 0 4000ded4: 02 80 00 10 be 4000df14 <_POSIX_Threads_Sporadic_budget_TSR+0x74> 4000ded8: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000dedc: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000dee0: 80 a2 40 01 cmp %o1, %g1 4000dee4: 0a 80 00 0d bcs 4000df18 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 4000dee8: 90 10 00 19 mov %i1, %o0 the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000deec: 40 00 03 f8 call 4000eecc <_Timespec_To_ticks> <== NOT EXECUTED 4000def0: 90 06 20 88 add %i0, 0x88, %o0 <== NOT EXECUTED if ( !ticks ) 4000def4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000def8: 22 80 00 10 be,a 4000df38 <_POSIX_Threads_Sporadic_budget_TSR+0x98> <== NOT EXECUTED 4000defc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000df00: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000df04: b2 06 20 9c add %i0, 0x9c, %i1 4000df08: 31 10 00 6f sethi %hi(0x4001bc00), %i0 4000df0c: 7f ff f6 4a call 4000b834 <_Watchdog_Insert> 4000df10: 91 ee 22 dc restore %i0, 0x2dc, %o0 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000df14: 90 10 00 19 mov %i1, %o0 4000df18: 7f ff ef fc call 40009f08 <_Thread_Change_priority> 4000df1c: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000df20: 40 00 03 eb call 4000eecc <_Timespec_To_ticks> 4000df24: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000df28: 80 a2 20 00 cmp %o0, 0 4000df2c: 32 bf ff f6 bne,a 4000df04 <_POSIX_Threads_Sporadic_budget_TSR+0x64> 4000df30: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] 4000df34: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000df38: b2 06 20 9c add %i0, 0x9c, %i1 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000df3c: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000df40: 31 10 00 6f sethi %hi(0x4001bc00), %i0 <== NOT EXECUTED 4000df44: 7f ff f6 3c call 4000b834 <_Watchdog_Insert> <== NOT EXECUTED 4000df48: 91 ee 22 dc restore %i0, 0x2dc, %o0 <== NOT EXECUTED 4000df4c: 01 00 00 00 nop 4000de50 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000de50: c4 02 21 70 ld [ %o0 + 0x170 ], %g2 the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000de54: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000de58: c6 00 a0 84 ld [ %g2 + 0x84 ], %g3 * 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 */ 4000de5c: 82 10 3f ff mov -1, %g1 4000de60: 84 10 20 ff mov 0xff, %g2 4000de64: c2 22 20 84 st %g1, [ %o0 + 0x84 ] 4000de68: 92 20 80 03 sub %g2, %g3, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000de6c: 80 a1 20 00 cmp %g4, 0 4000de70: 02 80 00 06 be 4000de88 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000de74: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000de78: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000de7c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 4000de80: 1a 80 00 06 bcc 4000de98 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000de84: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000de88: 94 10 20 01 mov 1, %o2 ! 1 4000de8c: 82 13 c0 00 mov %o7, %g1 4000de90: 7f ff f0 1e call 40009f08 <_Thread_Change_priority> 4000de94: 9e 10 40 00 mov %g1, %o7 4000de98: 81 c3 e0 08 retl <== NOT EXECUTED 4000de9c: 01 00 00 00 nop 400065a0 <_POSIX_Threads_cancel_run>: */ void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 400065a0: 9d e3 bf 98 save %sp, -104, %sp POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400065a4: e2 06 21 70 ld [ %i0 + 0x170 ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 400065a8: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 400065ac: c4 04 60 d8 ld [ %l1 + 0xd8 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400065b0: b2 04 60 dc add %l1, 0xdc, %i1 400065b4: 80 a0 80 19 cmp %g2, %i1 400065b8: 02 80 00 17 be 40006614 <_POSIX_Threads_cancel_run+0x74> 400065bc: c2 24 60 cc st %g1, [ %l1 + 0xcc ] 400065c0: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED 400065c4: a4 10 63 1c or %g1, 0x31c, %l2 ! 40018f1c <_Workspace_Area> <== NOT EXECUTED _ISR_Disable( level ); 400065c8: 7f ff ee c6 call 400020e0 <== NOT EXECUTED 400065cc: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 400065d0: e0 06 60 04 ld [ %i1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 400065d4: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 400065d8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 400065dc: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 400065e0: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 400065e4: 7f ff ee c3 call 400020f0 <== NOT EXECUTED 400065e8: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 400065ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400065f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400065f4: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 400065f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400065fc: 40 00 0a e8 call 4000919c <_Heap_Free> <== NOT EXECUTED 40006600: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 40006604: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 40006608: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000660c: 12 bf ff ef bne 400065c8 <_POSIX_Threads_cancel_run+0x28> <== NOT EXECUTED 40006610: 01 00 00 00 nop <== NOT EXECUTED } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; _Thread_Close( 40006614: c6 06 20 08 ld [ %i0 + 8 ], %g3 40006618: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000661c: 85 30 e0 16 srl %g3, 0x16, %g2 40006620: 82 10 62 30 or %g1, 0x230, %g1 40006624: 84 08 a0 1c and %g2, 0x1c, %g2 40006628: c8 00 40 02 ld [ %g1 + %g2 ], %g4 4000662c: 87 30 e0 1b srl %g3, 0x1b, %g3 40006630: 87 28 e0 02 sll %g3, 2, %g3 40006634: d0 01 00 03 ld [ %g4 + %g3 ], %o0 40006638: 92 10 00 18 mov %i0, %o1 _Workspace_Free( handler ); } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; 4000663c: 82 10 3f ff mov -1, %g1 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 40006640: b2 10 00 18 mov %i0, %i1 40006644: c2 26 20 28 st %g1, [ %i0 + 0x28 ] _Thread_Close( 40006648: 40 00 11 c1 call 4000ad4c <_Thread_Close> 4000664c: 31 10 00 64 sethi %hi(0x40019000), %i0 40006650: 40 00 0d 0e call 40009a88 <_Objects_Free> 40006654: 91 ee 21 b8 restore %i0, 0x1b8, %o0 40006658: 01 00 00 00 nop 4000c818 <_POSIX_Timer_TSR>: * Description: This is the operation that is ran when a timer expires * ***************************************************************************/ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 4000c818: 9d e3 bf 98 save %sp, -104, %sp boolean activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4000c81c: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000c820: c4 06 60 54 ld [ %i1 + 0x54 ], %g2 boolean activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4000c824: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000c828: 80 a0 a0 00 cmp %g2, 0 4000c82c: 12 80 00 0e bne 4000c864 <_POSIX_Timer_TSR+0x4c> 4000c830: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 4000c834: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 4000c838: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c83c: 32 80 00 0b bne,a 4000c868 <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 4000c840: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000c844: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 4000c848: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 4000c84c: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 4000c850: 40 00 22 7b call 4001523c 4000c854: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 4000c858: c0 26 60 68 clr [ %i1 + 0x68 ] 4000c85c: 81 c7 e0 08 ret 4000c860: 81 e8 00 00 restore ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { #if 0 status = rtems_timer_fire_after( ptimer->timer_id, ptimer->ticks, _POSIX_Timer_TSR, ptimer ); #endif activated = _Watchdog_Insert_ticks_helper( 4000c864: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 4000c868: d4 06 60 08 ld [ %i1 + 8 ], %o2 4000c86c: 90 06 60 10 add %i1, 0x10, %o0 4000c870: 17 10 00 32 sethi %hi(0x4000c800), %o3 4000c874: 98 10 00 19 mov %i1, %o4 4000c878: 7f ff ff cd call 4000c7ac <_Watchdog_Insert_ticks_helper> 4000c87c: 96 12 e0 18 or %o3, 0x18, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 4000c880: 80 a2 20 00 cmp %o0, 0 4000c884: 02 bf ff f6 be 4000c85c <_POSIX_Timer_TSR+0x44> 4000c888: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 4000c88c: 40 00 0a 9b call 4000f2f8 <_TOD_Get> 4000c890: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000c894: 82 10 20 03 mov 3, %g1 4000c898: 10 bf ff ed b 4000c84c <_POSIX_Timer_TSR+0x34> 4000c89c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000dbf4 <_POSIX_signals_Abnormal_termination_handler>: /*** PROCESS WIDE STUFF ****/ sigset_t _POSIX_signals_Pending; void _POSIX_signals_Abnormal_termination_handler( int signo ) { 4000dbf4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED exit( 1 ); 4000dbf8: 40 00 08 e1 call 4000ff7c <== NOT EXECUTED 4000dbfc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000dc00: 01 00 00 00 nop 4000f5f0 <_POSIX_signals_Check_signal>: boolean _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, boolean is_global ) { 4000f5f0: 9d e3 bf 88 save %sp, -120, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4000f5f4: 98 10 20 01 mov 1, %o4 4000f5f8: 96 10 00 1a mov %i2, %o3 4000f5fc: a6 07 bf ec add %fp, -20, %l3 4000f600: 90 10 00 18 mov %i0, %o0 4000f604: 92 10 00 19 mov %i1, %o1 4000f608: 40 00 00 2f call 4000f6c4 <_POSIX_signals_Clear_signals> 4000f60c: 94 10 00 13 mov %l3, %o2 4000f610: 80 a2 20 00 cmp %o0, 0 4000f614: 02 80 00 23 be 4000f6a0 <_POSIX_signals_Check_signal+0xb0> 4000f618: 03 10 00 71 sethi %hi(0x4001c400), %g1 /* * Since we made a union of these, only one test is necessary but this is * safer. */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || 4000f61c: a4 10 60 74 or %g1, 0x74, %l2 ! 4001c474 <_POSIX_signals_Vectors> 4000f620: 83 2e 60 04 sll %i1, 4, %g1 4000f624: 85 2e 60 02 sll %i1, 2, %g2 4000f628: a0 20 40 02 sub %g1, %g2, %l0 4000f62c: b4 04 00 12 add %l0, %l2, %i2 4000f630: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000f634: 80 a0 60 00 cmp %g1, 0 4000f638: 02 80 00 1c be 4000f6a8 <_POSIX_signals_Check_signal+0xb8> 4000f63c: 11 10 00 68 sethi %hi(0x4001a000), %o0 /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4000f640: 80 a0 60 01 cmp %g1, 1 4000f644: 02 80 00 17 be 4000f6a0 <_POSIX_signals_Check_signal+0xb0> 4000f648: 01 00 00 00 nop /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4000f64c: e2 06 20 c4 ld [ %i0 + 0xc4 ], %l1 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000f650: c2 06 a0 04 ld [ %i2 + 4 ], %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000f654: c4 04 80 10 ld [ %l2 + %l0 ], %g2 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000f658: 82 10 40 11 or %g1, %l1, %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000f65c: 80 a0 a0 02 cmp %g2, 2 4000f660: 02 80 00 08 be 4000f680 <_POSIX_signals_Check_signal+0x90> 4000f664: c2 26 20 c4 st %g1, [ %i0 + 0xc4 ] &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4000f668: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000f66c: 9f c0 40 00 call %g1 4000f670: 90 10 00 19 mov %i1, %o0 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000f674: e2 26 20 c4 st %l1, [ %i0 + 0xc4 ] 4000f678: 81 c7 e0 08 ret 4000f67c: 91 e8 20 01 restore %g0, 1, %o0 case SA_SIGINFO: /* * * assert( is_global ); */ (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4000f680: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000f684: 90 10 00 19 mov %i1, %o0 4000f688: 92 10 00 13 mov %l3, %o1 4000f68c: 9f c0 40 00 call %g1 4000f690: 94 10 20 00 clr %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000f694: e2 26 20 c4 st %l1, [ %i0 + 0xc4 ] 4000f698: 81 c7 e0 08 ret 4000f69c: 91 e8 20 01 restore %g0, 1, %o0 return TRUE; } 4000f6a0: 81 c7 e0 08 ret 4000f6a4: 91 e8 20 00 restore %g0, 0, %o0 /* * Since we made a union of these, only one test is necessary but this is * safer. */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || 4000f6a8: 92 10 20 33 mov 0x33, %o1 <== NOT EXECUTED 4000f6ac: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED 4000f6b0: 15 10 00 68 sethi %hi(0x4001a000), %o2 <== NOT EXECUTED 4000f6b4: 7f ff ce 88 call 400030d4 <__assert> <== NOT EXECUTED 4000f6b8: 94 12 a2 70 or %o2, 0x270, %o2 ! 4001a270 <_POSIX_Threads_Default_attributes+0x178> <== NOT EXECUTED 4000f6bc: 10 bf ff e1 b 4000f640 <_POSIX_signals_Check_signal+0x50> <== NOT EXECUTED 4000f6c0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED 4000f6c4 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, boolean is_global, boolean check_blocked ) { 4000f6c4: 9d e3 bf 98 save %sp, -104, %sp sigset_t signals_blocked; ISR_Level level; boolean do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000f6c8: 82 10 20 01 mov 1, %g1 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4000f6cc: 80 a7 20 00 cmp %i4, 0 sigset_t signals_blocked; ISR_Level level; boolean do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000f6d0: 84 06 7f ff add %i1, -1, %g2 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4000f6d4: b8 10 3f ff mov -1, %i4 4000f6d8: 02 80 00 04 be 4000f6e8 <_POSIX_signals_Clear_signals+0x24> 4000f6dc: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000f6e0: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000f6e4: b8 38 00 01 xnor %g0, %g1, %i4 signals_blocked = SIGNAL_ALL_MASK; /* XXX this is not right for siginfo type signals yet */ /* XXX since they can't be cleared the same way */ _ISR_Disable( level ); 4000f6e8: 7f ff ca 40 call 40001fe8 4000f6ec: 01 00 00 00 nop 4000f6f0: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000f6f4: 80 a6 e0 00 cmp %i3, 0 4000f6f8: 22 80 00 16 be,a 4000f750 <_POSIX_signals_Clear_signals+0x8c> 4000f6fc: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000f700: 05 10 00 71 sethi %hi(0x4001c400), %g2 4000f704: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001c640 <_POSIX_signals_Pending> 4000f708: 82 0c 00 01 and %l0, %g1, %g1 4000f70c: 80 88 40 1c btst %g1, %i4 4000f710: 02 80 00 1a be 4000f778 <_POSIX_signals_Clear_signals+0xb4> 4000f714: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000f718: 87 2e 60 04 sll %i1, 4, %g3 4000f71c: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f720: 86 20 c0 02 sub %g3, %g2, %g3 4000f724: 82 10 60 74 or %g1, 0x74, %g1 4000f728: c4 00 40 03 ld [ %g1 + %g3 ], %g2 4000f72c: 80 a0 a0 02 cmp %g2, 2 4000f730: 02 80 00 17 be 4000f78c <_POSIX_signals_Clear_signals+0xc8> 4000f734: 90 10 00 10 mov %l0, %o0 &psiginfo->Node ); } else do_callout = FALSE; } else _POSIX_signals_Clear_process_signals( mask ); 4000f738: 40 00 01 f6 call 4000ff10 <_POSIX_signals_Clear_process_signals> 4000f73c: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = TRUE; } } _ISR_Enable( level ); 4000f740: 7f ff ca 2e call 40001ff8 4000f744: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f748: 81 c7 e0 08 ret 4000f74c: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000f750: 82 0c 00 08 and %l0, %o0, %g1 4000f754: 80 88 40 1c btst %g1, %i4 4000f758: 02 80 00 08 be 4000f778 <_POSIX_signals_Clear_signals+0xb4> 4000f75c: 82 2a 00 10 andn %o0, %l0, %g1 api->signals_pending &= ~mask; 4000f760: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000f764: b0 10 20 01 mov 1, %i0 do_callout = TRUE; } } _ISR_Enable( level ); 4000f768: 7f ff ca 24 call 40001ff8 4000f76c: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f770: 81 c7 e0 08 ret 4000f774: 81 e8 00 00 restore _POSIX_signals_Clear_process_signals( mask ); do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4000f778: b0 10 20 00 clr %i0 do_callout = TRUE; } } _ISR_Enable( level ); 4000f77c: 7f ff ca 1f call 40001ff8 4000f780: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f784: 81 c7 e0 08 ret 4000f788: 81 e8 00 00 restore _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4000f78c: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f790: 82 10 62 44 or %g1, 0x244, %g1 ! 4001c644 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000f794: f8 00 c0 01 ld [ %g3 + %g1 ], %i4 4000f798: 88 00 c0 01 add %g3, %g1, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000f79c: 9a 01 20 04 add %g4, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4000f7a0: 80 a7 00 0d cmp %i4, %o5 4000f7a4: 32 80 00 1b bne,a 4000f810 <_POSIX_signals_Clear_signals+0x14c> 4000f7a8: c4 07 00 00 ld [ %i4 ], %g2 4000f7ac: b8 10 20 00 clr %i4 <== NOT EXECUTED 4000f7b0: b6 10 20 00 clr %i3 <== NOT EXECUTED _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) _POSIX_signals_Clear_process_signals( mask ); 4000f7b4: 40 00 01 d7 call 4000ff10 <_POSIX_signals_Clear_process_signals> 4000f7b8: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000f7bc: 80 a7 20 00 cmp %i4, 0 4000f7c0: 02 bf ff ea be 4000f768 <_POSIX_signals_Clear_signals+0xa4> 4000f7c4: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000f7c8: c2 06 e0 08 ld [ %i3 + 8 ], %g1 4000f7cc: c2 26 80 00 st %g1, [ %i2 ] 4000f7d0: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000f7d4: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f7d8: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000f7dc: 82 10 61 f8 or %g1, 0x1f8, %g1 4000f7e0: c6 06 e0 10 ld [ %i3 + 0x10 ], %g3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000f7e4: c2 26 c0 00 st %g1, [ %i3 ] old_last_node = the_chain->last; 4000f7e8: 82 00 7f fc add %g1, -4, %g1 4000f7ec: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000f7f0: f6 20 60 08 st %i3, [ %g1 + 8 ] 4000f7f4: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000f7f8: c4 26 e0 04 st %g2, [ %i3 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000f7fc: f6 20 80 00 st %i3, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = TRUE; } } _ISR_Enable( level ); 4000f800: 7f ff c9 fe call 40001ff8 4000f804: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f808: 81 c7 e0 08 ret 4000f80c: 81 e8 00 00 restore Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4000f810: c4 20 c0 01 st %g2, [ %g3 + %g1 ] new_first->previous = _Chain_Head(the_chain); 4000f814: c8 20 a0 04 st %g4, [ %g2 + 4 ] if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000f818: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 4000f81c: 80 a3 40 01 cmp %o5, %g1 4000f820: 12 bf ff e7 bne 4000f7bc <_POSIX_signals_Clear_signals+0xf8> 4000f824: b6 10 00 1c mov %i4, %i3 4000f828: 30 bf ff e3 b,a 4000f7b4 <_POSIX_signals_Clear_signals+0xf0> 40007a30 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 40007a30: 86 10 00 08 mov %o0, %g3 40007a34: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 40007a38: 84 02 3f ff add %o0, -1, %g2 40007a3c: 82 10 20 01 mov 1, %g1 40007a40: 83 28 40 02 sll %g1, %g2, %g1 40007a44: 80 88 40 03 btst %g1, %g3 40007a48: 12 80 00 11 bne 40007a8c <_POSIX_signals_Get_highest+0x5c> 40007a4c: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 40007a50: 90 02 20 01 inc %o0 40007a54: 80 a2 20 20 cmp %o0, 0x20 40007a58: 12 bf ff f9 bne 40007a3c <_POSIX_signals_Get_highest+0xc> 40007a5c: 84 02 3f ff add %o0, -1, %g2 40007a60: 10 80 00 05 b 40007a74 <_POSIX_signals_Get_highest+0x44> 40007a64: 90 10 20 01 mov 1, %o0 return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 40007a68: 80 a2 20 1b cmp %o0, 0x1b 40007a6c: 02 80 00 0a be 40007a94 <_POSIX_signals_Get_highest+0x64> 40007a70: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 40007a74: 84 02 3f ff add %o0, -1, %g2 40007a78: 82 10 20 01 mov 1, %g1 40007a7c: 83 28 40 02 sll %g1, %g2, %g1 40007a80: 80 88 40 03 btst %g1, %g3 40007a84: 22 bf ff f9 be,a 40007a68 <_POSIX_signals_Get_highest+0x38> 40007a88: 90 02 20 01 inc %o0 return signo; } return 0; } 40007a8c: 81 c3 e0 08 retl 40007a90: 01 00 00 00 nop 40007a94: 81 c3 e0 08 retl <== NOT EXECUTED 40007a98: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4000db20 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000db20: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000db24: e0 06 21 70 ld [ %i0 + 0x170 ], %l0 4000db28: 23 10 00 71 sethi %hi(0x4001c400), %l1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ restart: _ISR_Disable( level ); 4000db2c: 7f ff d1 2f call 40001fe8 4000db30: 01 00 00 00 nop 4000db34: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000db38: c2 04 62 40 ld [ %l1 + 0x240 ], %g1 4000db3c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000db40: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000db44: 82 10 40 02 or %g1, %g2, %g1 4000db48: 80 a8 40 03 andncc %g1, %g3, %g0 4000db4c: 02 80 00 27 be 4000dbe8 <_POSIX_signals_Post_switch_extension+0xc8> 4000db50: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); return; } _ISR_Enable( level ); 4000db54: 7f ff d1 29 call 40001ff8 4000db58: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) 4000db5c: 92 10 00 18 mov %i0, %o1 4000db60: 94 10 20 00 clr %o2 4000db64: 40 00 06 a3 call 4000f5f0 <_POSIX_signals_Check_signal> 4000db68: 90 10 00 10 mov %l0, %o0 4000db6c: 80 a2 20 00 cmp %o0, 0 4000db70: 12 bf ff ef bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000db74: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000db78: 90 10 00 10 mov %l0, %o0 4000db7c: 94 10 20 01 mov 1, %o2 4000db80: 40 00 06 9c call 4000f5f0 <_POSIX_signals_Check_signal> 4000db84: b0 06 20 01 inc %i0 4000db88: 80 a2 20 00 cmp %o0, 0 4000db8c: 12 bf ff e8 bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000db90: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); return; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000db94: 12 bf ff f3 bne 4000db60 <_POSIX_signals_Post_switch_extension+0x40> 4000db98: 92 10 00 18 mov %i0, %o1 4000db9c: b0 10 20 01 mov 1, %i0 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) 4000dba0: 92 10 00 18 mov %i0, %o1 4000dba4: 94 10 20 00 clr %o2 4000dba8: 40 00 06 92 call 4000f5f0 <_POSIX_signals_Check_signal> 4000dbac: 90 10 00 10 mov %l0, %o0 4000dbb0: 80 a2 20 00 cmp %o0, 0 4000dbb4: 12 bf ff de bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000dbb8: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000dbbc: 90 10 00 10 mov %l0, %o0 4000dbc0: 94 10 20 01 mov 1, %o2 4000dbc4: 40 00 06 8b call 4000f5f0 <_POSIX_signals_Check_signal> 4000dbc8: b0 06 20 01 inc %i0 4000dbcc: 80 a2 20 00 cmp %o0, 0 4000dbd0: 12 bf ff d7 bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000dbd4: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000dbd8: 12 bf ff f3 bne 4000dba4 <_POSIX_signals_Post_switch_extension+0x84> 4000dbdc: 92 10 00 18 mov %i0, %o1 if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) goto restart; } } 4000dbe0: 81 c7 e0 08 ret <== NOT EXECUTED 4000dbe4: 81 e8 00 00 restore <== NOT EXECUTED restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000dbe8: 7f ff d1 04 call 40001ff8 4000dbec: 81 e8 00 00 restore 4000dbf0: 01 00 00 00 nop 40027400 <_POSIX_signals_Unblock_thread>: boolean _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 40027400: 9d e3 bf 98 save %sp, -104, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027404: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 40027408: 07 04 00 20 sethi %hi(0x10008000), %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 4002740c: 84 06 7f ff add %i1, -1, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027410: 82 09 00 03 and %g4, %g3, %g1 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 40027414: 9a 10 20 01 mov 1, %o5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027418: 80 a0 40 03 cmp %g1, %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 4002741c: 85 2b 40 02 sll %o5, %g2, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027420: 02 80 00 1d be 40027494 <_POSIX_signals_Unblock_thread+0x94> 40027424: c6 06 21 70 ld [ %i0 + 0x170 ], %g3 */ return FALSE; } if ( ~api->signals_blocked & mask ) { 40027428: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 4002742c: 80 a8 80 01 andncc %g2, %g1, %g0 40027430: 02 80 00 21 be 400274b4 <_POSIX_signals_Unblock_thread+0xb4> 40027434: 03 04 00 00 sethi %hi(0x10000000), %g1 the_thread->do_post_task_switch_extension = TRUE; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40027438: 80 89 00 01 btst %g4, %g1 4002743c: 02 80 00 1e be 400274b4 <_POSIX_signals_Unblock_thread+0xb4> 40027440: da 26 20 78 st %o5, [ %i0 + 0x78 ] the_thread->Wait.return_code = EINTR; 40027444: 84 10 20 04 mov 4, %g2 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 40027448: 03 00 00 ef sethi %hi(0x3bc00), %g1 4002744c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40027450: 80 89 00 01 btst %g4, %g1 40027454: 12 80 00 29 bne 400274f8 <_POSIX_signals_Unblock_thread+0xf8> 40027458: c4 26 20 34 st %g2, [ %i0 + 0x34 ] _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state)){ 4002745c: 80 89 20 08 btst 8, %g4 40027460: 02 80 00 15 be 400274b4 <_POSIX_signals_Unblock_thread+0xb4> 40027464: 01 00 00 00 nop if ( _Watchdog_Is_active( &the_thread->Timer ) ) 40027468: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4002746c: 80 a0 60 02 cmp %g1, 2 40027470: 02 80 00 2b be 4002751c <_POSIX_signals_Unblock_thread+0x11c> 40027474: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40027478: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002747c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40027480: b0 10 20 00 clr %i0 40027484: 7f ff a7 a5 call 40011318 <_Thread_Clear_state> 40027488: 92 12 63 f8 or %o1, 0x3f8, %o1 4002748c: 81 c7 e0 08 ret 40027490: 81 e8 00 00 restore * 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) ) { 40027494: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40027498: 80 88 80 01 btst %g2, %g1 4002749c: 12 80 00 08 bne 400274bc <_POSIX_signals_Unblock_thread+0xbc> 400274a0: 82 10 20 04 mov 4, %g1 400274a4: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 400274a8: 80 a8 80 01 andncc %g2, %g1, %g0 400274ac: 12 80 00 04 bne 400274bc <_POSIX_signals_Unblock_thread+0xbc> 400274b0: 82 10 20 04 mov 4, %g1 } } } return FALSE; } 400274b4: 81 c7 e0 08 ret 400274b8: 91 e8 20 00 restore %g0, 0, %o0 */ 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; 400274bc: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 400274c0: 80 a6 a0 00 cmp %i2, 0 400274c4: 02 80 00 12 be 4002750c <_POSIX_signals_Unblock_thread+0x10c> 400274c8: c6 06 20 28 ld [ %i0 + 0x28 ], %g3 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 400274cc: c2 06 80 00 ld [ %i2 ], %g1 400274d0: c2 20 c0 00 st %g1, [ %g3 ] 400274d4: c4 06 a0 04 ld [ %i2 + 4 ], %g2 400274d8: c4 20 e0 04 st %g2, [ %g3 + 4 ] 400274dc: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400274e0: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 400274e4: 90 10 00 18 mov %i0, %o0 400274e8: 7f ff aa a7 call 40011f84 <_Thread_queue_Extract_with_proxy> 400274ec: b0 10 20 01 mov 1, %i0 400274f0: 81 c7 e0 08 ret 400274f4: 81 e8 00 00 restore the_thread->do_post_task_switch_extension = TRUE; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { the_thread->Wait.return_code = EINTR; if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 400274f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400274fc: 7f ff aa a2 call 40011f84 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED 40027500: b0 10 20 00 clr %i0 <== NOT EXECUTED 40027504: 81 c7 e0 08 ret <== NOT EXECUTED 40027508: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 4002750c: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; 40027510: da 20 e0 04 st %o5, [ %g3 + 4 ] the_info->si_value.sival_int = 0; 40027514: 10 bf ff f4 b 400274e4 <_POSIX_signals_Unblock_thread+0xe4> 40027518: c0 20 e0 08 clr [ %g3 + 8 ] the_thread->Wait.return_code = EINTR; if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state)){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4002751c: 7f ff ad f9 call 40012d00 <_Watchdog_Remove> 40027520: 90 06 20 48 add %i0, 0x48, %o0 40027524: 10 bf ff d6 b 4002747c <_POSIX_signals_Unblock_thread+0x7c> 40027528: 90 10 00 18 mov %i0, %o0 400092d4 <_Protected_heap_Allocate>: void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ) { 400092d4: 9d e3 bf 98 save %sp, -104, %sp void *p; _RTEMS_Lock_allocator(); 400092d8: 7f ff e3 44 call 40001fe8 400092dc: 01 00 00 00 nop 400092e0: a4 10 00 08 mov %o0, %l2 400092e4: 23 10 00 6f sethi %hi(0x4001bc00), %l1 400092e8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400092ec: 80 a0 60 00 cmp %g1, 0 400092f0: 02 80 00 0b be 4000931c <_Protected_heap_Allocate+0x48> 400092f4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 400092f8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400092fc: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> 40009300: 80 a0 a0 01 cmp %g2, 1 40009304: 08 80 00 06 bleu 4000931c <_Protected_heap_Allocate+0x48> 40009308: 90 10 20 00 clr %o0 4000930c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009310: 7f ff fd 7c call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009314: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009318: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000931c: 09 10 00 6f sethi %hi(0x4001bc00), %g4 40009320: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 40009324: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009328: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000932c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40009330: 80 a0 60 00 cmp %g1, 0 40009334: 22 80 00 27 be,a 400093d0 <_Protected_heap_Allocate+0xfc> 40009338: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000933c: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009340: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009344: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009348: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000934c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009350: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009354: 80 a0 e0 02 cmp %g3, 2 40009358: 12 80 00 2d bne 4000940c <_Protected_heap_Allocate+0x138> 4000935c: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009360: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009364: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009368: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000936c: 02 80 00 46 be 40009484 <_Protected_heap_Allocate+0x1b0> 40009370: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40009374: 7f ff e3 21 call 40001ff8 40009378: 90 10 00 12 mov %l2, %o0 p = _Heap_Allocate( the_heap, size ); 4000937c: 90 10 00 18 mov %i0, %o0 40009380: 7f ff fc 2e call 40008438 <_Heap_Allocate> 40009384: 92 10 00 19 mov %i1, %o1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009388: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 4000938c: b0 10 00 08 mov %o0, %i0 40009390: 82 00 60 01 inc %g1 40009394: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] _RTEMS_Unlock_allocator(); 40009398: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 4000939c: 94 10 20 00 clr %o2 400093a0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400093a4: 7f ff fb 54 call 400080f4 <_CORE_mutex_Surrender> 400093a8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400093ac: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 400093b0: 82 00 7f ff add %g1, -1, %g1 400093b4: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 400093b8: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 400093bc: 80 a0 a0 00 cmp %g2, 0 400093c0: 02 80 00 2d be 40009474 <_Protected_heap_Allocate+0x1a0> 400093c4: 01 00 00 00 nop return p; } 400093c8: 81 c7 e0 08 ret 400093cc: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 400093d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400093d4: 12 80 00 16 bne 4000942c <_Protected_heap_Allocate+0x158> <== NOT EXECUTED 400093d8: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400093dc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400093e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400093e4: 22 80 00 43 be,a 400094f0 <_Protected_heap_Allocate+0x21c> <== NOT EXECUTED 400093e8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400093ec: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400093f0: 12 80 00 0f bne 4000942c <_Protected_heap_Allocate+0x158> <== NOT EXECUTED 400093f4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400093f8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400093fc: 7f ff e2 ff call 40001ff8 <== NOT EXECUTED 40009400: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { void *p; _RTEMS_Lock_allocator(); p = _Heap_Allocate( the_heap, size ); 40009404: 10 bf ff df b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40009408: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000940c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009410: 12 bf ff d9 bne 40009374 <_Protected_heap_Allocate+0xa0> <== NOT EXECUTED 40009414: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009418: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000941c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009420: 02 80 00 19 be 40009484 <_Protected_heap_Allocate+0x1b0> <== NOT EXECUTED 40009424: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009428: 30 bf ff d3 b,a 40009374 <_Protected_heap_Allocate+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000942c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED size_t size ) { void *p; _RTEMS_Lock_allocator(); 40009430: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009434: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009438: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000943c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009440: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009444: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40009448: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000944c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009450: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009454: 7f ff e2 e9 call 40001ff8 <== NOT EXECUTED 40009458: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000945c: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009460: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009464: 7f ff fb 00 call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009468: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED p = _Heap_Allocate( the_heap, size ); 4000946c: 10 bf ff c5 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40009470: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009474: 40 00 03 c9 call 4000a398 <_Thread_Dispatch> 40009478: 01 00 00 00 nop 4000947c: 81 c7 e0 08 ret 40009480: 81 e8 00 00 restore */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009484: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009488: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000948c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009490: 02 80 00 28 be 40009530 <_Protected_heap_Allocate+0x25c> <== NOT EXECUTED 40009494: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009498: 1a 80 00 1c bcc 40009508 <_Protected_heap_Allocate+0x234> <== NOT EXECUTED 4000949c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400094a0: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400094a4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400094a8: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400094ac: 7f ff e2 d3 call 40001ff8 <== NOT EXECUTED 400094b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 400094b4: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400094b8: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400094bc: 40 00 02 93 call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 400094c0: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400094c4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400094c8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400094cc: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400094d0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 400094d4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400094d8: 32 bf ff aa bne,a 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 400094dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400094e0: 40 00 03 ae call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400094e4: 01 00 00 00 nop <== NOT EXECUTED 400094e8: 10 bf ff a6 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 400094ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 400094f0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400094f4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400094f8: 7f ff e2 c0 call 40001ff8 <== NOT EXECUTED 400094fc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009500: 10 bf ff a0 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40009504: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40009508: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000950c: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009510: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009514: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009518: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000951c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009520: 7f ff e2 b6 call 40001ff8 <== NOT EXECUTED 40009524: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009528: 10 bf ff 96 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 4000952c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009530: 7f ff e2 b2 call 40001ff8 <== NOT EXECUTED 40009534: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009538: 10 bf ff 92 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 4000953c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009540 <_Protected_heap_Extend>: boolean _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 40009540: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 40009544: 7f ff e2 a9 call 40001fe8 <== NOT EXECUTED 40009548: 01 00 00 00 nop <== NOT EXECUTED 4000954c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40009550: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 40009554: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009558: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000955c: 02 80 00 0b be 40009588 <_Protected_heap_Extend+0x48> <== NOT EXECUTED 40009560: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40009564: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40009568: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 4000956c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40009570: 08 80 00 06 bleu 40009588 <_Protected_heap_Extend+0x48> <== NOT EXECUTED 40009574: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009578: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000957c: 7f ff fc e1 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009580: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009584: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40009588: 09 10 00 6f sethi %hi(0x4001bc00), %g4 <== NOT EXECUTED 4000958c: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 <== NOT EXECUTED 40009590: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009594: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40009598: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000959c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400095a0: 22 80 00 2d be,a 40009654 <_Protected_heap_Extend+0x114> <== NOT EXECUTED 400095a4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400095a8: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400095ac: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400095b0: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 400095b4: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400095b8: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 400095bc: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400095c0: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 400095c4: 12 80 00 33 bne 40009690 <_Protected_heap_Extend+0x150> <== NOT EXECUTED 400095c8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400095cc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400095d0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400095d4: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400095d8: 02 80 00 48 be 400096f8 <_Protected_heap_Extend+0x1b8> <== NOT EXECUTED 400095dc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400095e0: 7f ff e2 86 call 40001ff8 <== NOT EXECUTED 400095e4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 400095e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400095ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400095f0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 400095f4: 40 00 14 04 call 4000e604 <_Heap_Extend> <== NOT EXECUTED 400095f8: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400095fc: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009600: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40009604: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009608: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 4000960c: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009610: 94 10 20 00 clr %o2 <== NOT EXECUTED 40009614: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40009618: 7f ff fa b7 call 400080f4 <_CORE_mutex_Surrender> <== NOT EXECUTED 4000961c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009620: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009624: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009628: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 4000962c: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009630: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009634: 12 80 00 05 bne 40009648 <_Protected_heap_Extend+0x108> <== NOT EXECUTED 40009638: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED _Thread_Dispatch(); 4000963c: 40 00 03 57 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009640: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_EXTEND_SUCCESSFUL); } 40009644: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 40009648: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 4000964c: 81 c7 e0 08 ret <== NOT EXECUTED 40009650: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40009654: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40009658: 12 80 00 16 bne 400096b0 <_Protected_heap_Extend+0x170> <== NOT EXECUTED 4000965c: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40009660: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40009664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009668: 22 80 00 3f be,a 40009764 <_Protected_heap_Extend+0x224> <== NOT EXECUTED 4000966c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40009670: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009674: 12 80 00 0f bne 400096b0 <_Protected_heap_Extend+0x170> <== NOT EXECUTED 40009678: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000967c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40009680: 7f ff e2 5e call 40001ff8 <== NOT EXECUTED 40009684: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED { Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 40009688: 10 bf ff d9 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 4000968c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009690: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009694: 12 bf ff d3 bne 400095e0 <_Protected_heap_Extend+0xa0> <== NOT EXECUTED 40009698: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000969c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400096a0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400096a4: 02 80 00 15 be 400096f8 <_Protected_heap_Extend+0x1b8> <== NOT EXECUTED 400096a8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 400096ac: 30 bf ff cd b,a 400095e0 <_Protected_heap_Extend+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400096b0: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED ) { Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 400096b4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 400096b8: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 400096bc: 82 00 60 01 inc %g1 <== NOT EXECUTED 400096c0: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 400096c4: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400096c8: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 400096cc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400096d0: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 400096d4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400096d8: 7f ff e2 48 call 40001ff8 <== NOT EXECUTED 400096dc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400096e0: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 400096e4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400096e8: 7f ff fa 5f call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400096ec: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 400096f0: 10 bf ff bf b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400096f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 400096f8: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 400096fc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40009700: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009704: 02 80 00 28 be 400097a4 <_Protected_heap_Extend+0x264> <== NOT EXECUTED 40009708: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000970c: 1a 80 00 1c bcc 4000977c <_Protected_heap_Extend+0x23c> <== NOT EXECUTED 40009710: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 40009714: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009718: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000971c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40009720: 7f ff e2 36 call 40001ff8 <== NOT EXECUTED 40009724: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009728: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000972c: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40009730: 40 00 01 f6 call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 40009734: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009738: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 4000973c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009740: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009744: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009748: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000974c: 32 bf ff a8 bne,a 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40009750: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009754: 40 00 03 11 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009758: 01 00 00 00 nop <== NOT EXECUTED 4000975c: 10 bf ff a4 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40009760: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40009764: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009768: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000976c: 7f ff e2 23 call 40001ff8 <== NOT EXECUTED 40009770: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009774: 10 bf ff 9e b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40009778: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000977c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40009780: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009784: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009788: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000978c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009790: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009794: 7f ff e2 19 call 40001ff8 <== NOT EXECUTED 40009798: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000979c: 10 bf ff 94 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400097a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 400097a4: 7f ff e2 15 call 40001ff8 <== NOT EXECUTED 400097a8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400097ac: 10 bf ff 90 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400097b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400097b4 <_Protected_heap_Free>: boolean _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 400097b4: 9d e3 bf 98 save %sp, -104, %sp boolean status; _RTEMS_Lock_allocator(); 400097b8: 7f ff e2 0c call 40001fe8 400097bc: 01 00 00 00 nop 400097c0: a4 10 00 08 mov %o0, %l2 400097c4: 23 10 00 6f sethi %hi(0x4001bc00), %l1 400097c8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400097cc: 80 a0 60 00 cmp %g1, 0 400097d0: 02 80 00 0b be 400097fc <_Protected_heap_Free+0x48> 400097d4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 400097d8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 400097dc: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 400097e0: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400097e4: 08 80 00 06 bleu 400097fc <_Protected_heap_Free+0x48> <== NOT EXECUTED 400097e8: 90 10 20 00 clr %o0 <== NOT EXECUTED 400097ec: 92 10 20 00 clr %o1 <== NOT EXECUTED 400097f0: 7f ff fc 44 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 400097f4: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 400097f8: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 400097fc: 09 10 00 6f sethi %hi(0x4001bc00), %g4 40009800: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 40009804: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009808: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000980c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40009810: 80 a0 60 00 cmp %g1, 0 40009814: 22 80 00 27 be,a 400098b0 <_Protected_heap_Free+0xfc> 40009818: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000981c: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009820: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009824: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009828: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000982c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009830: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009834: 80 a0 e0 02 cmp %g3, 2 40009838: 12 80 00 2d bne 400098ec <_Protected_heap_Free+0x138> 4000983c: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009840: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009844: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009848: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000984c: 02 80 00 46 be 40009964 <_Protected_heap_Free+0x1b0> 40009850: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40009854: 7f ff e1 e9 call 40001ff8 40009858: 90 10 00 12 mov %l2, %o0 status = _Heap_Free( the_heap, start_address ); 4000985c: 90 10 00 18 mov %i0, %o0 40009860: 7f ff fb 28 call 40008500 <_Heap_Free> 40009864: 92 10 00 19 mov %i1, %o1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009868: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 4000986c: b0 10 00 08 mov %o0, %i0 40009870: 82 00 60 01 inc %g1 40009874: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] _RTEMS_Unlock_allocator(); 40009878: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 4000987c: 94 10 20 00 clr %o2 40009880: d2 02 20 08 ld [ %o0 + 8 ], %o1 40009884: 7f ff fa 1c call 400080f4 <_CORE_mutex_Surrender> 40009888: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000988c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40009890: 82 00 7f ff add %g1, -1, %g1 40009894: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 40009898: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 4000989c: 80 a0 a0 00 cmp %g2, 0 400098a0: 02 80 00 2d be 40009954 <_Protected_heap_Free+0x1a0> 400098a4: 01 00 00 00 nop return status; } 400098a8: 81 c7 e0 08 ret <== NOT EXECUTED 400098ac: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 400098b0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400098b4: 12 80 00 16 bne 4000990c <_Protected_heap_Free+0x158> <== NOT EXECUTED 400098b8: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400098bc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400098c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400098c4: 22 80 00 43 be,a 400099d0 <_Protected_heap_Free+0x21c> <== NOT EXECUTED 400098c8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400098cc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400098d0: 12 80 00 0f bne 4000990c <_Protected_heap_Free+0x158> <== NOT EXECUTED 400098d4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400098d8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400098dc: 7f ff e1 c7 call 40001ff8 <== NOT EXECUTED 400098e0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { boolean status; _RTEMS_Lock_allocator(); status = _Heap_Free( the_heap, start_address ); 400098e4: 10 bf ff df b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400098e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400098ec: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400098f0: 12 bf ff d9 bne 40009854 <_Protected_heap_Free+0xa0> <== NOT EXECUTED 400098f4: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400098f8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400098fc: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009900: 02 80 00 19 be 40009964 <_Protected_heap_Free+0x1b0> <== NOT EXECUTED 40009904: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009908: 30 bf ff d3 b,a 40009854 <_Protected_heap_Free+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000990c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED void *start_address ) { boolean status; _RTEMS_Lock_allocator(); 40009910: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009914: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009918: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000991c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009920: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009924: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40009928: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000992c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009930: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009934: 7f ff e1 b1 call 40001ff8 <== NOT EXECUTED 40009938: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000993c: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009940: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009944: 7f ff f9 c8 call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009948: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Free( the_heap, start_address ); 4000994c: 10 bf ff c5 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 40009950: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009954: 40 00 02 91 call 4000a398 <_Thread_Dispatch> 40009958: 01 00 00 00 nop 4000995c: 81 c7 e0 08 ret 40009960: 81 e8 00 00 restore */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009964: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009968: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000996c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009970: 02 80 00 28 be 40009a10 <_Protected_heap_Free+0x25c> <== NOT EXECUTED 40009974: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009978: 1a 80 00 1c bcc 400099e8 <_Protected_heap_Free+0x234> <== NOT EXECUTED 4000997c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009980: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009984: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009988: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000998c: 7f ff e1 9b call 40001ff8 <== NOT EXECUTED 40009990: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009994: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40009998: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000999c: 40 00 01 5b call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 400099a0: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400099a4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400099a8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400099ac: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400099b0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 400099b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400099b8: 32 bf ff aa bne,a 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400099bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400099c0: 40 00 02 76 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400099c4: 01 00 00 00 nop <== NOT EXECUTED 400099c8: 10 bf ff a6 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400099cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 400099d0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400099d4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400099d8: 7f ff e1 88 call 40001ff8 <== NOT EXECUTED 400099dc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400099e0: 10 bf ff a0 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400099e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400099e8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400099ec: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 400099f0: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 400099f4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400099f8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400099fc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009a00: 7f ff e1 7e call 40001ff8 <== NOT EXECUTED 40009a04: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009a08: 10 bf ff 96 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 40009a0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009a10: 7f ff e1 7a call 40001ff8 <== NOT EXECUTED 40009a14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009a18: 10 bf ff 92 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 40009a1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009a20 <_Protected_heap_Get_block_size>: boolean _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size ) { 40009a20: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED boolean status; _RTEMS_Lock_allocator(); 40009a24: 7f ff e1 71 call 40001fe8 <== NOT EXECUTED 40009a28: 01 00 00 00 nop <== NOT EXECUTED 40009a2c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40009a30: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 40009a34: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009a38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009a3c: 02 80 00 0b be 40009a68 <_Protected_heap_Get_block_size+0x48> <== NOT EXECUTED 40009a40: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40009a44: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40009a48: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 40009a4c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40009a50: 08 80 00 06 bleu 40009a68 <_Protected_heap_Get_block_size+0x48> <== NOT EXECUTED 40009a54: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009a58: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009a5c: 7f ff fb a9 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009a60: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009a64: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40009a68: 09 10 00 6f sethi %hi(0x4001bc00), %g4 <== NOT EXECUTED 40009a6c: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 <== NOT EXECUTED 40009a70: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009a74: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40009a78: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40009a7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009a80: 22 80 00 28 be,a 40009b20 <_Protected_heap_Get_block_size+0x100> <== NOT EXECUTED 40009a84: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40009a88: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009a8c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009a90: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009a94: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009a98: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009a9c: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009aa0: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40009aa4: 12 80 00 2e bne 40009b5c <_Protected_heap_Get_block_size+0x13c> <== NOT EXECUTED 40009aa8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009aac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009ab0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009ab4: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009ab8: 02 80 00 47 be 40009bd4 <_Protected_heap_Get_block_size+0x1b4> <== NOT EXECUTED 40009abc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009ac0: 7f ff e1 4e call 40001ff8 <== NOT EXECUTED 40009ac4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40009ac8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009acc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009ad0: 40 00 13 8e call 4000e908 <_Heap_Size_of_user_area> <== NOT EXECUTED 40009ad4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009ad8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009adc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40009ae0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009ae4: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 40009ae8: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009aec: 94 10 20 00 clr %o2 <== NOT EXECUTED 40009af0: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40009af4: 7f ff f9 80 call 400080f4 <_CORE_mutex_Surrender> <== NOT EXECUTED 40009af8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009afc: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009b00: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009b04: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009b08: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009b0c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009b10: 02 80 00 2d be 40009bc4 <_Protected_heap_Get_block_size+0x1a4> <== NOT EXECUTED 40009b14: 01 00 00 00 nop <== NOT EXECUTED return status; } 40009b18: 81 c7 e0 08 ret <== NOT EXECUTED 40009b1c: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40009b20: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40009b24: 12 80 00 16 bne 40009b7c <_Protected_heap_Get_block_size+0x15c> <== NOT EXECUTED 40009b28: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40009b2c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40009b30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009b34: 22 80 00 43 be,a 40009c40 <_Protected_heap_Get_block_size+0x220> <== NOT EXECUTED 40009b38: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40009b3c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009b40: 12 80 00 0f bne 40009b7c <_Protected_heap_Get_block_size+0x15c> <== NOT EXECUTED 40009b44: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40009b48: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40009b4c: 7f ff e1 2b call 40001ff8 <== NOT EXECUTED 40009b50: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { boolean status; _RTEMS_Lock_allocator(); status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40009b54: 10 bf ff de b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009b58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009b5c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009b60: 12 bf ff d8 bne 40009ac0 <_Protected_heap_Get_block_size+0xa0> <== NOT EXECUTED 40009b64: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009b68: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009b6c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009b70: 02 80 00 19 be 40009bd4 <_Protected_heap_Get_block_size+0x1b4> <== NOT EXECUTED 40009b74: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009b78: 30 bf ff d2 b,a 40009ac0 <_Protected_heap_Get_block_size+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009b7c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED size_t *size ) { boolean status; _RTEMS_Lock_allocator(); 40009b80: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009b84: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009b88: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009b8c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009b90: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009b94: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40009b98: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40009b9c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009ba0: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009ba4: 7f ff e1 15 call 40001ff8 <== NOT EXECUTED 40009ba8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009bac: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009bb0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009bb4: 7f ff f9 2c call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009bb8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40009bbc: 10 bf ff c4 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009bc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009bc4: 40 00 01 f5 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009bc8: 01 00 00 00 nop <== NOT EXECUTED 40009bcc: 81 c7 e0 08 ret <== NOT EXECUTED 40009bd0: 81 e8 00 00 restore <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009bd4: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009bd8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40009bdc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009be0: 02 80 00 28 be 40009c80 <_Protected_heap_Get_block_size+0x260> <== NOT EXECUTED 40009be4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009be8: 1a 80 00 1c bcc 40009c58 <_Protected_heap_Get_block_size+0x238> <== NOT EXECUTED 40009bec: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009bf0: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009bf4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009bf8: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40009bfc: 7f ff e0 ff call 40001ff8 <== NOT EXECUTED 40009c00: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009c04: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40009c08: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40009c0c: 40 00 00 bf call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 40009c10: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009c14: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009c18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009c1c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009c20: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009c24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009c28: 32 bf ff a9 bne,a 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009c30: 40 00 01 da call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009c34: 01 00 00 00 nop <== NOT EXECUTED 40009c38: 10 bf ff a5 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40009c40: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009c44: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40009c48: 7f ff e0 ec call 40001ff8 <== NOT EXECUTED 40009c4c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009c50: 10 bf ff 9f b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40009c58: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40009c5c: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009c60: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009c64: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009c68: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009c6c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009c70: 7f ff e0 e2 call 40001ff8 <== NOT EXECUTED 40009c74: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009c78: 10 bf ff 95 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009c80: 7f ff e0 de call 40001ff8 <== NOT EXECUTED 40009c84: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009c88: 10 bf ff 91 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d46c <_Protected_heap_Get_free_information>: void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 4000d46c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _RTEMS_Lock_allocator(); 4000d470: 7f ff da 91 call 40003eb4 <== NOT EXECUTED 4000d474: 01 00 00 00 nop <== NOT EXECUTED 4000d478: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 4000d47c: 23 10 00 ff sethi %hi(0x4003fc00), %l1 <== NOT EXECUTED 4000d480: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000d484: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d488: 02 80 00 0b be 4000d4b4 <_Protected_heap_Get_free_information+0x48> <== NOT EXECUTED 4000d48c: 27 10 00 ff sethi %hi(0x4003fc00), %l3 <== NOT EXECUTED 4000d490: 03 10 00 ff sethi %hi(0x4003fc00), %g1 <== NOT EXECUTED 4000d494: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 4003fe30 <_System_state_Current> <== NOT EXECUTED 4000d498: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 4000d49c: 08 80 00 06 bleu 4000d4b4 <_Protected_heap_Get_free_information+0x48> <== NOT EXECUTED 4000d4a0: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000d4a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d4a8: 7f ff fb 49 call 4000c1cc <_Internal_error_Occurred> <== NOT EXECUTED 4000d4ac: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 4000d4b0: 27 10 00 ff sethi %hi(0x4003fc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000d4b4: 09 10 00 ff sethi %hi(0x4003fc00), %g4 <== NOT EXECUTED 4000d4b8: e0 04 e1 24 ld [ %l3 + 0x124 ], %l0 <== NOT EXECUTED 4000d4bc: c4 01 21 2c ld [ %g4 + 0x12c ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000d4c0: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000d4c4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000d4c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d4cc: 22 80 00 26 be,a 4000d564 <_Protected_heap_Get_free_information+0xf8> <== NOT EXECUTED 4000d4d0: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000d4d4: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000d4d8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000d4dc: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000d4e0: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000d4e4: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000d4e8: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000d4ec: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 4000d4f0: 12 80 00 2c bne 4000d5a0 <_Protected_heap_Get_free_information+0x134> <== NOT EXECUTED 4000d4f4: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000d4f8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000d4fc: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000d500: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000d504: 02 80 00 43 be 4000d610 <_Protected_heap_Get_free_information+0x1a4> <== NOT EXECUTED 4000d508: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000d50c: 7f ff da 6e call 40003ec4 <== NOT EXECUTED 4000d510: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000d514: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d518: 40 00 3c 0c call 4001c548 <_Heap_Get_free_information> <== NOT EXECUTED 4000d51c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000d520: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d524: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d528: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 4000d52c: d0 04 e1 24 ld [ %l3 + 0x124 ], %o0 <== NOT EXECUTED 4000d530: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d534: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4000d538: 7f ff f9 22 call 4000b9c0 <_CORE_mutex_Surrender> <== NOT EXECUTED 4000d53c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000d540: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d544: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d548: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED 4000d54c: c4 04 60 50 ld [ %l1 + 0x50 ], %g2 <== NOT EXECUTED 4000d550: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d554: 02 80 00 2d be 4000d608 <_Protected_heap_Get_free_information+0x19c> <== NOT EXECUTED 4000d558: 01 00 00 00 nop <== NOT EXECUTED 4000d55c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d560: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000d564: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000d568: 12 80 00 16 bne 4000d5c0 <_Protected_heap_Get_free_information+0x154> <== NOT EXECUTED 4000d56c: c6 04 e1 24 ld [ %l3 + 0x124 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000d570: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4000d574: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d578: 22 80 00 41 be,a 4000d67c <_Protected_heap_Get_free_information+0x210> <== NOT EXECUTED 4000d57c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 4000d580: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000d584: 12 80 00 0f bne 4000d5c0 <_Protected_heap_Get_free_information+0x154> <== NOT EXECUTED 4000d588: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000d58c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000d590: 7f ff da 4d call 40003ec4 <== NOT EXECUTED 4000d594: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED Heap_Control *the_heap, Heap_Information *info ) { _RTEMS_Lock_allocator(); _Heap_Get_free_information( the_heap, info ); 4000d598: 10 bf ff e0 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d59c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000d5a0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000d5a4: 12 bf ff da bne 4000d50c <_Protected_heap_Get_free_information+0xa0> <== NOT EXECUTED 4000d5a8: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000d5ac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000d5b0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000d5b4: 02 80 00 17 be 4000d610 <_Protected_heap_Get_free_information+0x1a4> <== NOT EXECUTED 4000d5b8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 4000d5bc: 30 bf ff d4 b,a 4000d50c <_Protected_heap_Get_free_information+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000d5c0: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { _RTEMS_Lock_allocator(); 4000d5c4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 4000d5c8: c8 01 21 2c ld [ %g4 + 0x12c ], %g4 <== NOT EXECUTED 4000d5cc: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d5d0: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 4000d5d4: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED 4000d5d8: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 4000d5dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000d5e0: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 4000d5e4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4000d5e8: 7f ff da 37 call 40003ec4 <== NOT EXECUTED 4000d5ec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d5f0: d0 04 e1 24 ld [ %l3 + 0x124 ], %o0 <== NOT EXECUTED 4000d5f4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d5f8: 7f ff f8 ce call 4000b930 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4000d5fc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000d600: 10 bf ff c6 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d604: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000d608: 40 00 01 f3 call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4000d60c: 81 e8 00 00 restore <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000d610: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 4000d614: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000d618: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000d61c: 02 80 00 28 be 4000d6bc <_Protected_heap_Get_free_information+0x250> <== NOT EXECUTED 4000d620: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000d624: 1a 80 00 1c bcc 4000d694 <_Protected_heap_Get_free_information+0x228> <== NOT EXECUTED 4000d628: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000d62c: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d630: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d634: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000d638: 7f ff da 23 call 40003ec4 <== NOT EXECUTED 4000d63c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 4000d640: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000d644: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000d648: 40 00 00 bf call 4000d944 <_Thread_Change_priority> <== NOT EXECUTED 4000d64c: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000d650: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d654: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d658: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED 4000d65c: c4 04 60 50 ld [ %l1 + 0x50 ], %g2 <== NOT EXECUTED 4000d660: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d664: 32 bf ff ad bne,a 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d668: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000d66c: 40 00 01 da call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4000d670: 01 00 00 00 nop <== NOT EXECUTED 4000d674: 10 bf ff a9 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d678: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000d67c: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d680: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000d684: 7f ff da 10 call 40003ec4 <== NOT EXECUTED 4000d688: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d68c: 10 bf ff a3 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d690: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000d694: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000d698: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000d69c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4000d6a0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000d6a4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d6a8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000d6ac: 7f ff da 06 call 40003ec4 <== NOT EXECUTED 4000d6b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d6b4: 10 bf ff 99 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d6b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000d6bc: 7f ff da 02 call 40003ec4 <== NOT EXECUTED 4000d6c0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d6c4: 10 bf ff 95 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d6c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009c90 <_Protected_heap_Resize_block>: boolean _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, size_t size ) { 40009c90: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); 40009c94: 7f ff e0 d5 call 40001fe8 <== NOT EXECUTED 40009c98: 01 00 00 00 nop <== NOT EXECUTED 40009c9c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40009ca0: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 40009ca4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009ca8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009cac: 02 80 00 0b be 40009cd8 <_Protected_heap_Resize_block+0x48> <== NOT EXECUTED 40009cb0: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40009cb4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40009cb8: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 40009cbc: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40009cc0: 08 80 00 06 bleu 40009cd8 <_Protected_heap_Resize_block+0x48> <== NOT EXECUTED 40009cc4: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009cc8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009ccc: 7f ff fb 0d call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009cd0: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009cd4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40009cd8: 09 10 00 6f sethi %hi(0x4001bc00), %g4 <== NOT EXECUTED 40009cdc: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 <== NOT EXECUTED 40009ce0: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009ce4: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40009ce8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40009cec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009cf0: 22 80 00 2e be,a 40009da8 <_Protected_heap_Resize_block+0x118> <== NOT EXECUTED 40009cf4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40009cf8: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009cfc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009d00: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009d04: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009d08: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009d0c: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009d10: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40009d14: 12 80 00 34 bne 40009de4 <_Protected_heap_Resize_block+0x154> <== NOT EXECUTED 40009d18: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009d1c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009d20: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009d24: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009d28: 02 80 00 49 be 40009e4c <_Protected_heap_Resize_block+0x1bc> <== NOT EXECUTED 40009d2c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009d30: 7f ff e0 b2 call 40001ff8 <== NOT EXECUTED 40009d34: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Resize_block( 40009d38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009d3c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009d40: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40009d44: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED 40009d48: 40 00 12 62 call 4000e6d0 <_Heap_Resize_block> <== NOT EXECUTED 40009d4c: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009d50: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009d54: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40009d58: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009d5c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED the_heap, starting_address, size, &old_mem_size, &avail_mem_size ); _RTEMS_Unlock_allocator(); 40009d60: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009d64: 94 10 20 00 clr %o2 <== NOT EXECUTED 40009d68: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40009d6c: 7f ff f8 e2 call 400080f4 <_CORE_mutex_Surrender> <== NOT EXECUTED 40009d70: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009d74: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009d78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009d7c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009d80: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009d84: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009d88: 12 80 00 05 bne 40009d9c <_Protected_heap_Resize_block+0x10c> <== NOT EXECUTED 40009d8c: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED _Thread_Dispatch(); 40009d90: 40 00 01 82 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009d94: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_RESIZE_SUCCESSFUL); } 40009d98: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 40009d9c: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 40009da0: 81 c7 e0 08 ret <== NOT EXECUTED 40009da4: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40009da8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40009dac: 12 80 00 16 bne 40009e04 <_Protected_heap_Resize_block+0x174> <== NOT EXECUTED 40009db0: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40009db4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40009db8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009dbc: 22 80 00 3f be,a 40009eb8 <_Protected_heap_Resize_block+0x228> <== NOT EXECUTED 40009dc0: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40009dc4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009dc8: 12 80 00 0f bne 40009e04 <_Protected_heap_Resize_block+0x174> <== NOT EXECUTED 40009dcc: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40009dd0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40009dd4: 7f ff e0 89 call 40001ff8 <== NOT EXECUTED 40009dd8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); status = _Heap_Resize_block( 40009ddc: 10 bf ff d8 b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009de0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009de4: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009de8: 12 bf ff d2 bne 40009d30 <_Protected_heap_Resize_block+0xa0> <== NOT EXECUTED 40009dec: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009df0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009df4: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009df8: 02 80 00 15 be 40009e4c <_Protected_heap_Resize_block+0x1bc> <== NOT EXECUTED 40009dfc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009e00: 30 bf ff cc b,a 40009d30 <_Protected_heap_Resize_block+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009e04: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED { Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); 40009e08: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009e0c: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009e10: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009e14: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009e18: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009e1c: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40009e20: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40009e24: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009e28: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009e2c: 7f ff e0 73 call 40001ff8 <== NOT EXECUTED 40009e30: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009e34: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009e38: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009e3c: 7f ff f8 8a call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009e40: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Resize_block( 40009e44: 10 bf ff be b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009e48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009e4c: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009e50: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40009e54: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009e58: 02 80 00 28 be 40009ef8 <_Protected_heap_Resize_block+0x268> <== NOT EXECUTED 40009e5c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009e60: 1a 80 00 1c bcc 40009ed0 <_Protected_heap_Resize_block+0x240> <== NOT EXECUTED 40009e64: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 40009e68: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009e6c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009e70: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40009e74: 7f ff e0 61 call 40001ff8 <== NOT EXECUTED 40009e78: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009e7c: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40009e80: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40009e84: 40 00 00 21 call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 40009e88: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009e8c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009e90: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009e94: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009e98: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009e9c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009ea0: 32 bf ff a7 bne,a 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009ea4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009ea8: 40 00 01 3c call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009eac: 01 00 00 00 nop <== NOT EXECUTED 40009eb0: 10 bf ff a3 b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009eb4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40009eb8: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009ebc: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40009ec0: 7f ff e0 4e call 40001ff8 <== NOT EXECUTED 40009ec4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009ec8: 10 bf ff 9d b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009ecc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40009ed0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40009ed4: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009ed8: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009edc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009ee0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009ee4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009ee8: 7f ff e0 44 call 40001ff8 <== NOT EXECUTED 40009eec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009ef0: 10 bf ff 93 b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009ef4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009ef8: 7f ff e0 40 call 40001ff8 <== NOT EXECUTED 40009efc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009f00: 10 bf ff 8f b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009f04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000e3b4 <_RTEMS_tasks_Delete_extension>: User_extensions_routine _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4000e3b4: 9d e3 bf 98 save %sp, -104, %sp /* * Free per task variable memory */ tvp = deleted->task_variables; 4000e3b8: e0 06 61 7c ld [ %i1 + 0x17c ], %l0 deleted->task_variables = NULL; 4000e3bc: c0 26 61 7c clr [ %i1 + 0x17c ] while (tvp) { 4000e3c0: 80 a4 20 00 cmp %l0, 0 4000e3c4: 02 80 00 25 be 4000e458 <_RTEMS_tasks_Delete_extension+0xa4> 4000e3c8: 29 10 00 6f sethi %hi(0x4001bc00), %l4 4000e3cc: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 4000e3d0: 10 80 00 12 b 4000e418 <_RTEMS_tasks_Delete_extension+0x64> <== NOT EXECUTED 4000e3d4: a4 15 22 2c or %l4, 0x22c, %l2 <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { if (tvp->dtor) 4000e3d8: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED 4000e3dc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000e3e0: 22 80 00 06 be,a 4000e3f8 <_RTEMS_tasks_Delete_extension+0x44> <== NOT EXECUTED 4000e3e4: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED (*tvp->dtor)(*tvp->ptr); 4000e3e8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000e3ec: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000e3f0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 4000e3f4: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 4000e3f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000e3fc: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000e400: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000e404: 7f ff e8 3f call 40008500 <_Heap_Free> <== NOT EXECUTED 4000e408: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4000e40c: a0 94 60 00 orcc %l1, 0, %l0 <== NOT EXECUTED 4000e410: 22 80 00 13 be,a 4000e45c <_RTEMS_tasks_Delete_extension+0xa8> <== NOT EXECUTED 4000e414: d2 06 61 6c ld [ %i1 + 0x16c ], %o1 <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { 4000e418: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED 4000e41c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000e420: 02 bf ff ee be 4000e3d8 <_RTEMS_tasks_Delete_extension+0x24> <== NOT EXECUTED 4000e424: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (tvp->dtor) (*tvp->dtor)(*tvp->ptr); *tvp->ptr = tvp->gval; } else { if (tvp->dtor) 4000e428: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000e42c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e430: 02 bf ff f5 be 4000e404 <_RTEMS_tasks_Delete_extension+0x50> <== NOT EXECUTED 4000e434: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 4000e438: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000e43c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 4000e440: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000e444: 7f ff e8 2f call 40008500 <_Heap_Free> <== NOT EXECUTED 4000e448: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4000e44c: a0 94 60 00 orcc %l1, 0, %l0 <== NOT EXECUTED 4000e450: 12 bf ff f3 bne 4000e41c <_RTEMS_tasks_Delete_extension+0x68> <== NOT EXECUTED 4000e454: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED 4000e458: d2 06 61 6c ld [ %i1 + 0x16c ], %o1 4000e45c: 7f ff e8 29 call 40008500 <_Heap_Free> 4000e460: 90 15 22 2c or %l4, 0x22c, %o0 /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4000e464: c0 26 61 6c clr [ %i1 + 0x16c ] } 4000e468: 81 c7 e0 08 ret 4000e46c: 81 e8 00 00 restore 400076bc <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 400076bc: 9d e3 bf 90 save %sp, -112, %sp rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 400076c0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400076c4: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 4001bea0 <_Configuration_Table> 400076c8: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3 /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 400076cc: d0 00 e0 28 ld [ %g3 + 0x28 ], %o0 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 400076d0: 80 a2 20 00 cmp %o0, 0 400076d4: 02 80 00 2f be 40007790 <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 400076d8: e4 00 e0 24 ld [ %g3 + 0x24 ], %l2 400076dc: 80 a4 a0 00 cmp %l2, 0 400076e0: 02 80 00 2c be 40007790 <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 400076e4: a0 10 00 08 mov %o0, %l0 return; for ( index=0 ; index < maximum ; index++ ) { 400076e8: a2 10 20 00 clr %l1 400076ec: 10 80 00 0c b 4000771c <_RTEMS_tasks_Initialize_user_tasks_body+0x60> 400076f0: a6 07 bf f4 add %fp, -12, %l3 ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 400076f4: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 400076f8: d0 07 bf f4 ld [ %fp + -12 ], %o0 400076fc: 40 00 00 27 call 40007798 40007700: a2 04 60 01 inc %l1 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 40007704: 80 a2 20 00 cmp %o0, 0 40007708: 12 80 00 1c bne 40007778 <_RTEMS_tasks_Initialize_user_tasks_body+0xbc> 4000770c: 94 10 00 08 mov %o0, %o2 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 40007710: 80 a4 40 12 cmp %l1, %l2 40007714: 02 80 00 1f be 40007790 <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 40007718: a0 04 20 1c add %l0, 0x1c, %l0 return_value = rtems_task_create( 4000771c: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 40007720: d8 04 20 0c ld [ %l0 + 0xc ], %o4 40007724: d2 04 20 08 ld [ %l0 + 8 ], %o1 40007728: d4 04 20 04 ld [ %l0 + 4 ], %o2 4000772c: d0 04 00 00 ld [ %l0 ], %o0 40007730: 7f ff ff 1a call 40007398 40007734: 9a 10 00 13 mov %l3, %o5 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 40007738: 80 a2 20 00 cmp %o0, 0 4000773c: 22 bf ff ee be,a 400076f4 <_RTEMS_tasks_Initialize_user_tasks_body+0x38> 40007740: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 40007744: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007748: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000774c: 40 00 04 6d call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007750: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED return_value = rtems_task_start( 40007754: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40007758: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 <== NOT EXECUTED 4000775c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40007760: 40 00 00 0e call 40007798 <== NOT EXECUTED 40007764: a2 04 60 01 inc %l1 <== NOT EXECUTED id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 40007768: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000776c: 02 bf ff ea be 40007714 <_RTEMS_tasks_Initialize_user_tasks_body+0x58> <== NOT EXECUTED 40007770: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 40007774: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007778: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000777c: 40 00 04 61 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007780: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 40007784: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 40007788: 12 bf ff e5 bne 4000771c <_RTEMS_tasks_Initialize_user_tasks_body+0x60> <== NOT EXECUTED 4000778c: a0 04 20 1c add %l0, 0x1c, %l0 <== NOT EXECUTED 40007790: 81 c7 e0 08 ret 40007794: 81 e8 00 00 restore 4000837c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 4000837c: 9d e3 bf 90 save %sp, -112, %sp 40008380: 11 10 00 82 sethi %hi(0x40020800), %o0 40008384: 92 10 00 18 mov %i0, %o1 40008388: 90 12 23 dc or %o0, 0x3dc, %o0 4000838c: 40 00 09 cd call 4000aac0 <_Objects_Get> 40008390: 94 07 bf f4 add %fp, -12, %o2 * 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 ) { 40008394: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008398: 80 a0 60 00 cmp %g1, 0 4000839c: 12 80 00 11 bne 400083e0 <_Rate_monotonic_Timeout+0x64> 400083a0: b0 10 00 08 mov %o0, %i0 case OBJECTS_REMOTE: /* impossible */ case OBJECTS_ERROR: break; case OBJECTS_LOCAL: the_thread = the_period->owner; 400083a4: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 400083a8: 03 00 00 10 sethi %hi(0x4000), %g1 400083ac: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 400083b0: 80 88 80 01 btst %g2, %g1 400083b4: 32 80 00 0d bne,a 400083e8 <_Rate_monotonic_Timeout+0x6c> 400083b8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 400083bc: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 400083c0: 80 a0 60 01 cmp %g1, 1 400083c4: 02 80 00 17 be 40008420 <_Rate_monotonic_Timeout+0xa4> 400083c8: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 400083cc: c2 26 20 38 st %g1, [ %i0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 400083d0: 05 10 00 83 sethi %hi(0x40020c00), %g2 400083d4: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 400083d8: 82 00 7f ff add %g1, -1, %g1 400083dc: c2 20 a1 70 st %g1, [ %g2 + 0x170 ] 400083e0: 81 c7 e0 08 ret 400083e4: 81 e8 00 00 restore case OBJECTS_ERROR: break; case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 400083e8: c2 06 20 08 ld [ %i0 + 8 ], %g1 400083ec: 80 a0 80 01 cmp %g2, %g1 400083f0: 32 bf ff f4 bne,a 400083c0 <_Rate_monotonic_Timeout+0x44> 400083f4: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400083f8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400083fc: 40 00 0e 24 call 4000bc8c <_Thread_Clear_state> 40008400: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008404: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008408: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000840c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008410: 11 10 00 83 sethi %hi(0x40020c00), %o0 40008414: 40 00 14 59 call 4000d578 <_Watchdog_Insert> 40008418: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> 4000841c: 30 bf ff ed b,a 400083d0 <_Rate_monotonic_Timeout+0x54> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008420: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 <== NOT EXECUTED the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 40008424: 84 10 20 03 mov 3, %g2 <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008428: 92 06 20 10 add %i0, 0x10, %o1 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000842c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] <== NOT EXECUTED 40008430: c4 26 20 38 st %g2, [ %i0 + 0x38 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008434: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40008438: 40 00 14 50 call 4000d578 <_Watchdog_Insert> <== NOT EXECUTED 4000843c: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> <== NOT EXECUTED 40008440: 30 bf ff e4 b,a 400083d0 <_Rate_monotonic_Timeout+0x54> <== NOT EXECUTED 4001bf64 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 4001bf64: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001bf68: 27 10 00 d7 sethi %hi(0x40035c00), %l3 4001bf6c: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 4001bf70: 82 00 60 01 inc %g1 4001bf74: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] 4001bf78: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 4001bf7c: 82 00 60 01 inc %g1 4001bf80: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 4001bf84: 03 10 00 d7 sethi %hi(0x40035c00), %g1 4001bf88: d0 00 63 c4 ld [ %g1 + 0x3c4 ], %o0 ! 40035fc4 <_RTEMS_Allocator_Mutex> 4001bf8c: 94 10 20 00 clr %o2 4001bf90: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001bf94: 7f ff e5 e0 call 40015714 <_CORE_mutex_Surrender> 4001bf98: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001bf9c: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 4001bfa0: a2 06 20 10 add %i0, 0x10, %l1 4001bfa4: 82 00 7f ff add %g1, -1, %g1 4001bfa8: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] 4001bfac: c4 04 e2 f0 ld [ %l3 + 0x2f0 ], %g2 4001bfb0: 80 a0 a0 00 cmp %g2, 0 4001bfb4: 02 80 00 21 be 4001c038 <_Region_Process_queue+0xd4> 4001bfb8: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 4001bfbc: 10 80 00 10 b 4001bffc <_Region_Process_queue+0x98> 4001bfc0: a4 06 20 68 add %i0, 0x68, %l2 the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 4001bfc4: 7f ff e6 e8 call 40015b64 <_Heap_Allocate> 4001bfc8: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 4001bfcc: 80 a2 20 00 cmp %o0, 0 4001bfd0: 02 80 00 11 be 4001c014 <_Region_Process_queue+0xb0> 4001bfd4: 01 00 00 00 nop break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; 4001bfd8: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 4001bfdc: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 the_region->number_of_used_blocks += 1; 4001bfe0: 82 00 60 01 inc %g1 ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 4001bfe4: d0 20 80 00 st %o0, [ %g2 ] the_region->number_of_used_blocks += 1; 4001bfe8: c2 26 20 64 st %g1, [ %i0 + 0x64 ] _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 4001bfec: 90 10 00 11 mov %l1, %o0 4001bff0: 40 00 02 79 call 4001c9d4 <_Thread_queue_Extract> 4001bff4: 92 10 00 10 mov %l0, %o1 the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 4001bff8: c0 24 20 34 clr [ %l0 + 0x34 ] /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 4001bffc: 40 00 02 c0 call 4001cafc <_Thread_queue_First> 4001c000: 90 10 00 11 mov %l1, %o0 4001c004: a0 10 00 08 mov %o0, %l0 if ( the_thread == NULL ) 4001c008: 80 a4 20 00 cmp %l0, 0 4001c00c: 12 bf ff ee bne 4001bfc4 <_Region_Process_queue+0x60> 4001c010: 90 10 00 12 mov %l2, %o0 4001c014: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 4001c018: 82 00 7f ff add %g1, -1, %g1 4001c01c: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] 4001c020: c4 04 e2 f0 ld [ %l3 + 0x2f0 ], %g2 4001c024: 80 a0 a0 00 cmp %g2, 0 4001c028: 02 80 00 07 be 4001c044 <_Region_Process_queue+0xe0> 4001c02c: 01 00 00 00 nop 4001c030: 81 c7 e0 08 ret <== NOT EXECUTED 4001c034: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4001c038: 7f ff ee ea call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 4001c03c: a4 06 20 68 add %i0, 0x68, %l2 <== NOT EXECUTED 4001c040: 30 bf ff ef b,a 4001bffc <_Region_Process_queue+0x98> <== NOT EXECUTED 4001c044: 7f ff ee e7 call 40017be0 <_Thread_Dispatch> 4001c048: 81 e8 00 00 restore 4001c04c: 01 00 00 00 nop 40009d08 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 40009d08: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009d0c: 23 10 00 a2 sethi %hi(0x40028800), %l1 40009d10: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 ! 40028b00 <_Thread_Dispatch_disable_level> 40009d14: 82 00 60 01 inc %g1 40009d18: c2 24 63 00 st %g1, [ %l1 + 0x300 ] _Thread_Disable_dispatch(); _TOD_Deactivate(); if ( time->tv_sec < _TOD_Seconds_since_epoch ) 40009d1c: 21 10 00 a2 sethi %hi(0x40028800), %l0 40009d20: c2 06 00 00 ld [ %i0 ], %g1 40009d24: d4 04 23 b8 ld [ %l0 + 0x3b8 ], %o2 40009d28: 80 a0 40 0a cmp %g1, %o2 40009d2c: 36 80 00 18 bge,a 40009d8c <_TOD_Set+0x84> 40009d30: 94 20 40 0a sub %g1, %o2, %o2 Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 40009d34: 11 10 00 a2 sethi %hi(0x40028800), %o0 40009d38: 94 22 80 01 sub %o2, %g1, %o2 40009d3c: 90 12 23 f0 or %o0, 0x3f0, %o0 40009d40: 40 00 0e ea call 4000d8e8 <_Watchdog_Adjust> 40009d44: 92 10 20 01 mov 1, %o1 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40009d48: c4 06 00 00 ld [ %i0 ], %g2 40009d4c: 86 14 23 b8 or %l0, 0x3b8, %g3 40009d50: c4 24 23 b8 st %g2, [ %l0 + 0x3b8 ] 40009d54: c2 06 20 04 ld [ %i0 + 4 ], %g1 _TOD_Is_set = TRUE; 40009d58: 84 10 20 01 mov 1, %g2 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40009d5c: c2 20 e0 04 st %g1, [ %g3 + 4 ] _TOD_Is_set = TRUE; 40009d60: 03 10 00 a2 sethi %hi(0x40028800), %g1 40009d64: c4 20 63 3c st %g2, [ %g1 + 0x33c ] ! 40028b3c <_TOD_Is_set> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009d68: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 40009d6c: 82 00 7f ff add %g1, -1, %g1 40009d70: c2 24 63 00 st %g1, [ %l1 + 0x300 ] 40009d74: c4 04 63 00 ld [ %l1 + 0x300 ], %g2 40009d78: 80 a0 a0 00 cmp %g2, 0 40009d7c: 02 80 00 0a be 40009da4 <_TOD_Set+0x9c> 40009d80: 01 00 00 00 nop 40009d84: 81 c7 e0 08 ret 40009d88: 81 e8 00 00 restore 40009d8c: 11 10 00 a2 sethi %hi(0x40028800), %o0 40009d90: 92 10 20 00 clr %o1 40009d94: 40 00 0e d5 call 4000d8e8 <_Watchdog_Adjust> 40009d98: 90 12 23 f0 or %o0, 0x3f0, %o0 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40009d9c: 10 bf ff ec b 40009d4c <_TOD_Set+0x44> 40009da0: c4 06 00 00 ld [ %i0 ], %g2 _Thread_Dispatch(); 40009da4: 40 00 08 3c call 4000be94 <_Thread_Dispatch> <== NOT EXECUTED 40009da8: 81 e8 00 00 restore <== NOT EXECUTED 40009dac: 01 00 00 00 nop 4000a248 <_Thread_Create_idle>: */ const char *_Thread_Idle_name = "IDLE"; void _Thread_Create_idle( void ) { 4000a248: 9d e3 bf 80 save %sp, -128, %sp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 4000a24c: 39 10 00 6f sethi %hi(0x4001bc00), %i4 4000a250: 7f ff f9 d9 call 400089b4 <_Objects_Allocate> 4000a254: 90 17 23 70 or %i4, 0x370, %o0 ! 4001bf70 <_Thread_Internal_information> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 4000a258: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a25c: 96 10 61 f4 or %g1, 0x1f4, %o3 ! 4001bdf4 <_CPU_Table> 4000a260: c4 02 e0 0c ld [ %o3 + 0xc ], %g2 * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 4000a264: 37 10 00 6f sethi %hi(0x4001bc00), %i3 4000a268: d0 26 e3 c8 st %o0, [ %i3 + 0x3c8 ] ! 4001bfc8 <_Thread_Idle> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 4000a26c: 03 10 00 29 sethi %hi(0x4000a400), %g1 4000a270: 92 10 00 08 mov %o0, %o1 4000a274: 80 a0 a0 00 cmp %g2, 0 4000a278: 02 80 00 03 be 4000a284 <_Thread_Create_idle+0x3c> 4000a27c: b4 10 60 f4 or %g1, 0xf4, %i2 idle = _CPU_Table.idle_task; 4000a280: b4 10 00 02 mov %g2, %i2 <== NOT EXECUTED idle_task_stack_size = _CPU_Table.idle_task_stack_size; 4000a284: d6 02 e0 14 ld [ %o3 + 0x14 ], %o3 if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) 4000a288: 80 a2 ef ff cmp %o3, 0xfff 4000a28c: 28 80 00 02 bleu,a 4000a294 <_Thread_Create_idle+0x4c> 4000a290: 17 00 00 04 sethi %hi(0x1000), %o3 idle_task_stack_size = STACK_MINIMUM_SIZE; _Thread_Initialize( 4000a294: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a298: c4 00 63 88 ld [ %g1 + 0x388 ], %g2 ! 4001af88 <_Thread_Idle_name> 4000a29c: 82 10 20 01 mov 1, %g1 4000a2a0: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 4000a2a4: 90 17 23 70 or %i4, 0x370, %o0 4000a2a8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000a2ac: c0 23 a0 60 clr [ %sp + 0x60 ] 4000a2b0: c0 23 a0 64 clr [ %sp + 0x64 ] 4000a2b4: c0 23 a0 68 clr [ %sp + 0x68 ] 4000a2b8: 94 10 20 00 clr %o2 4000a2bc: 98 10 20 00 clr %o4 4000a2c0: 40 00 00 8e call 4000a4f8 <_Thread_Initialize> 4000a2c4: 9a 10 20 ff mov 0xff, %o5 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000a2c8: c6 06 e3 c8 ld [ %i3 + 0x3c8 ], %g3 4000a2cc: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a2d0: 05 10 00 6f sethi %hi(0x4001bc00), %g2 _Thread_Executing = _Thread_Idle; _Thread_Start( 4000a2d4: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000a2d8: c6 20 62 bc st %g3, [ %g1 + 0x2bc ] 4000a2dc: c6 20 a2 94 st %g3, [ %g2 + 0x294 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 4000a2e0: b2 10 20 00 clr %i1 4000a2e4: b6 10 20 00 clr %i3 4000a2e8: 40 00 04 07 call 4000b304 <_Thread_Start> 4000a2ec: 99 e8 20 00 restore %g0, 0, %o4 4000a2f0: 01 00 00 00 nop 4000a2f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 4000a2f4: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000a2f8: 92 96 20 00 orcc %i0, 0, %o1 4000a2fc: 12 80 00 11 bne 4000a340 <_Thread_Delay_ended+0x4c> 4000a300: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000a304: 31 10 00 6f sethi %hi(0x4001bc00), %i0 <== NOT EXECUTED 4000a308: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000a30c: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000a310: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000a314: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a318: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000a31c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000a320: 13 04 00 ff sethi %hi(0x1003fc00), %o1 <== NOT EXECUTED 4000a324: 7f ff ff 68 call 4000a0c4 <_Thread_Clear_state> 4000a328: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000a32c: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 4000a330: 82 00 7f ff add %g1, -1, %g1 4000a334: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] 4000a338: 81 c7 e0 08 ret 4000a33c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000a340: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000a344: 80 a0 a0 04 cmp %g2, 4 4000a348: 18 bf ff fc bgu 4000a338 <_Thread_Delay_ended+0x44> 4000a34c: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000a350: 80 a0 60 01 cmp %g1, 1 4000a354: 12 bf ff f9 bne 4000a338 <_Thread_Delay_ended+0x44> 4000a358: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000a35c: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000a360: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 4000a364: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000a368: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000a36c: 80 a2 20 00 cmp %o0, 0 4000a370: 02 bf ff f2 be 4000a338 <_Thread_Delay_ended+0x44> 4000a374: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000a378: 7f ff fa e0 call 40008ef8 <_Objects_Get> 4000a37c: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000a380: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a384: 80 a0 60 00 cmp %g1, 0 4000a388: 12 bf ff ec bne 4000a338 <_Thread_Delay_ended+0x44> 4000a38c: 31 10 00 6f sethi %hi(0x4001bc00), %i0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000a390: 10 bf ff e5 b 4000a324 <_Thread_Delay_ended+0x30> 4000a394: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000fc94 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000fc94: 9d e3 bf 98 save %sp, -104, %sp #endif #if defined(__USE__MAIN__) extern void _main(void); #endif executing = _Thread_Executing; 4000fc98: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000fc9c: f4 00 62 bc ld [ %g1 + 0x2bc ], %i2 ! 4001bebc <_Thread_Executing> /* * Some CPUs need to tinker with the call frame or registers when the * thread actually begins to execute for the first time. This is a * hook point where the port gets a shot at doing whatever it requires. */ _Context_Initialization_at_thread_begin(); 4000fca0: 3f 10 00 3f sethi %hi(0x4000fc00), %i7 4000fca4: be 17 e0 94 or %i7, 0x94, %i7 ! 4000fc94 <_Thread_Handler> * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 4000fca8: d0 06 a0 c4 ld [ %i2 + 0xc4 ], %o0 4000fcac: 7f ff c8 d3 call 40001ff8 4000fcb0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000fcb4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 doneConstructors = 1; 4000fcb8: 82 10 20 01 mov 1, %g1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000fcbc: f2 08 a0 00 ldub [ %g2 ], %i1 * 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 ); 4000fcc0: 90 10 00 1a mov %i2, %o0 4000fcc4: 7f ff ee 4e call 4000b5fc <_User_extensions_Thread_begin> 4000fcc8: c2 28 a0 00 stb %g1, [ %g2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000fccc: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000fcd0: c2 00 a1 e0 ld [ %g2 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000fcd4: 82 00 7f ff add %g1, -1, %g1 4000fcd8: c2 20 a1 e0 st %g1, [ %g2 + 0x1e0 ] 4000fcdc: c6 00 a1 e0 ld [ %g2 + 0x1e0 ], %g3 4000fce0: 80 a0 e0 00 cmp %g3, 0 4000fce4: 02 80 00 36 be 4000fdbc <_Thread_Handler+0x128> 4000fce8: 01 00 00 00 nop /* * _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) */ 4000fcec: 83 2e 60 18 sll %i1, 0x18, %g1 <== NOT EXECUTED 4000fcf0: 80 a0 60 00 cmp %g1, 0 4000fcf4: 02 80 00 22 be 4000fd7c <_Thread_Handler+0xe8> 4000fcf8: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000fcfc: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 4000fd00: 80 a0 60 01 cmp %g1, 1 4000fd04: 22 80 00 25 be,a 4000fd98 <_Thread_Handler+0x104> 4000fd08: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000fd0c: 80 a0 60 01 cmp %g1, 1 4000fd10: 1a 80 00 0c bcc 4000fd40 <_Thread_Handler+0xac> 4000fd14: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000fd18: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000fd1c: 9f c0 40 00 call %g1 4000fd20: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 4000fd24: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] * 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 ); 4000fd28: 90 10 00 1a mov %i2, %o0 4000fd2c: 7f ff ee 5c call 4000b69c <_User_extensions_Thread_exitted> 4000fd30: b0 10 20 00 clr %i0 _Internal_error_Occurred( 4000fd34: b2 10 20 01 mov 1, %i1 4000fd38: 7f ff e2 f2 call 40008900 <_Internal_error_Occurred> 4000fd3c: 95 e8 20 06 restore %g0, 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000fd40: 02 80 00 23 be 4000fdcc <_Thread_Handler+0x138> <== NOT EXECUTED 4000fd44: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000fd48: 12 bf ff f9 bne 4000fd2c <_Thread_Handler+0x98> <== NOT EXECUTED 4000fd4c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000fd50: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED 4000fd54: d2 06 a0 b0 ld [ %i2 + 0xb0 ], %o1 <== NOT EXECUTED 4000fd58: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 <== NOT EXECUTED 4000fd5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000fd60: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000fd64: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] <== NOT EXECUTED * 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 ); 4000fd68: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4000fd6c: 7f ff ee 4c call 4000b69c <_User_extensions_Thread_exitted> <== NOT EXECUTED 4000fd70: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED _Internal_error_Occurred( 4000fd74: 7f ff e2 e3 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000fd78: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED * _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) */ _init (); 4000fd7c: 40 00 2b 1b call 4001a9e8 <_init> 4000fd80: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000fd84: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 4000fd88: 80 a0 60 01 cmp %g1, 1 4000fd8c: 12 bf ff e1 bne 4000fd10 <_Thread_Handler+0x7c> 4000fd90: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000fd94: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000fd98: d0 06 a0 b0 ld [ %i2 + 0xb0 ], %o0 4000fd9c: 9f c0 40 00 call %g1 4000fda0: b0 10 20 00 clr %i0 4000fda4: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] * 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 ); 4000fda8: 90 10 00 1a mov %i2, %o0 4000fdac: 7f ff ee 3c call 4000b69c <_User_extensions_Thread_exitted> 4000fdb0: b2 10 20 01 mov 1, %i1 _Internal_error_Occurred( 4000fdb4: 7f ff e2 d3 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000fdb8: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED _Thread_Dispatch(); 4000fdbc: 7f ff e9 77 call 4000a398 <_Thread_Dispatch> 4000fdc0: 01 00 00 00 nop /* * _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) */ 4000fdc4: 10 bf ff cb b 4000fcf0 <_Thread_Handler+0x5c> 4000fdc8: 83 2e 60 18 sll %i1, 0x18, %g1 (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000fdcc: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED 4000fdd0: d0 1e a0 b0 ldd [ %i2 + 0xb0 ], %o0 <== NOT EXECUTED 4000fdd4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000fdd8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000fddc: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] <== NOT EXECUTED * 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 ); 4000fde0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4000fde4: 7f ff ee 2e call 4000b69c <_User_extensions_Thread_exitted> <== NOT EXECUTED 4000fde8: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED _Internal_error_Occurred( 4000fdec: 7f ff e2 c5 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000fdf0: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED 4000fdf4: 01 00 00 00 nop 4000a6b4 <_Thread_Handler_initialization>: void _Thread_Handler_initialization( uint32_t ticks_per_timeslice, uint32_t maximum_extensions, uint32_t maximum_proxies ) { 4000a6b4: 9d e3 bf 90 save %sp, -112, %sp /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( ( _CPU_Table.stack_allocate_hook == 0 ) 4000a6b8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a6bc: 82 10 61 f4 or %g1, 0x1f4, %g1 ! 4001bdf4 <_CPU_Table> 4000a6c0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4000a6c4: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 4000a6c8: 80 a0 00 02 cmp %g0, %g2 4000a6cc: 88 60 3f ff subx %g0, -1, %g4 4000a6d0: 80 a0 00 03 cmp %g0, %g3 4000a6d4: 82 60 3f ff subx %g0, -1, %g1 4000a6d8: 80 a1 00 01 cmp %g4, %g1 4000a6dc: 12 80 00 2c bne 4000a78c <_Thread_Handler_initialization+0xd8> 4000a6e0: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 4000a6e4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _Thread_Executing = NULL; 4000a6e8: 05 10 00 6f sethi %hi(0x4001bc00), %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 4000a6ec: c0 20 62 cc clr [ %g1 + 0x2cc ] _Thread_Executing = NULL; 4000a6f0: c0 20 a2 bc clr [ %g2 + 0x2bc ] _Thread_Heir = NULL; 4000a6f4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 4000a6f8: 05 10 00 6f sethi %hi(0x4001bc00), %g2 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; _Thread_Executing = NULL; _Thread_Heir = NULL; 4000a6fc: c0 20 62 94 clr [ %g1 + 0x294 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 4000a700: c0 20 a2 ac clr [ %g2 + 0x2ac ] _Thread_Maximum_extensions = maximum_extensions; 4000a704: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4000a708: 05 10 00 6f sethi %hi(0x4001bc00), %g2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 4000a70c: f2 20 62 a8 st %i1, [ %g1 + 0x2a8 ] _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4000a710: f0 20 a1 38 st %i0, [ %g2 + 0x138 ] _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 4000a714: 40 00 05 13 call 4000bb60 <_Workspace_Allocate_or_fatal_error> 4000a718: 90 10 2c 00 mov 0xc00, %o0 4000a71c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a720: 84 10 00 08 mov %o0, %g2 4000a724: d0 20 61 34 st %o0, [ %g1 + 0x134 ] 4000a728: 86 02 2c 00 add %o0, 0xc00, %g3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a72c: 82 00 a0 04 add %g2, 4, %g1 the_chain->permanent_null = NULL; 4000a730: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 4000a734: c4 20 a0 08 st %g2, [ %g2 + 8 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a738: c2 20 80 00 st %g1, [ %g2 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000a73c: 84 00 a0 0c add %g2, 0xc, %g2 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4000a740: 80 a0 80 03 cmp %g2, %g3 4000a744: 12 bf ff fb bne 4000a730 <_Thread_Handler_initialization+0x7c> 4000a748: 82 00 a0 04 add %g2, 4, %g1 /* * Initialize this class of objects. */ _Objects_Initialize_information( 4000a74c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a750: c4 00 62 e8 ld [ %g1 + 0x2e8 ], %g2 ! 4001bee8 <_System_state_Is_multiprocessing> 4000a754: 82 10 20 08 mov 8, %g1 4000a758: 80 a0 00 02 cmp %g0, %g2 4000a75c: 96 10 20 02 mov 2, %o3 4000a760: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000a764: 96 42 ff ff addx %o3, -1, %o3 4000a768: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000a76c: 92 10 20 01 mov 1, %o1 4000a770: 90 12 23 70 or %o0, 0x370, %o0 4000a774: 94 10 20 01 mov 1, %o2 4000a778: 98 10 21 80 mov 0x180, %o4 4000a77c: 7f ff fa 06 call 40008f94 <_Objects_Initialize_information> 4000a780: 9a 10 20 01 mov 1, %o5 FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4000a784: 81 c7 e0 08 ret 4000a788: 81 e8 00 00 restore * Do not allow mixture. */ if ( !( ( _CPU_Table.stack_allocate_hook == 0 ) == ( _CPU_Table.stack_free_hook == 0 ) ) ) _Internal_error_Occurred( 4000a78c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000a790: 7f ff f8 5c call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000a794: 94 10 20 0f mov 0xf, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 4000a798: 10 bf ff d4 b 4000a6e8 <_Thread_Handler_initialization+0x34> <== NOT EXECUTED 4000a79c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a4f8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 4000a4f8: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the Ada self pointer */ the_thread->rtems_ada_self = NULL; 4000a4fc: c0 26 60 80 clr [ %i1 + 0x80 ] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 4000a500: 80 a6 a0 00 cmp %i2, 0 4000a504: 02 80 00 59 be 4000a668 <_Thread_Initialize+0x170> 4000a508: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 4000a50c: c0 26 60 cc clr [ %i1 + 0xcc ] <== NOT EXECUTED 4000a510: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 4000a514: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000a518: d2 04 22 a8 ld [ %l0 + 0x2a8 ], %o1 ! 4001bea8 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 4000a51c: f4 26 60 d4 st %i2, [ %i1 + 0xd4 ] the_stack->size = size; 4000a520: d0 26 60 d0 st %o0, [ %i1 + 0xd0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000a524: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 4000a528: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 4000a52c: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 4000a530: c0 26 60 6c clr [ %i1 + 0x6c ] 4000a534: 80 a2 60 00 cmp %o1, 0 4000a538: 12 80 00 38 bne 4000a618 <_Thread_Initialize+0x120> 4000a53c: c0 26 61 68 clr [ %i1 + 0x168 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 4000a540: c0 26 61 78 clr [ %i1 + 0x178 ] 4000a544: b6 10 20 00 clr %i3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 4000a548: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 the_thread->Start.budget_algorithm = budget_algorithm; 4000a54c: e2 26 60 bc st %l1, [ %i1 + 0xbc ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 4000a550: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 4000a554: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 switch ( budget_algorithm ) { 4000a558: 80 a4 60 02 cmp %l1, 2 4000a55c: 12 80 00 05 bne 4000a570 <_Thread_Initialize+0x78> 4000a560: c2 26 60 c0 st %g1, [ %i1 + 0xc0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 4000a564: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a568: c4 00 61 38 ld [ %g1 + 0x138 ], %g2 ! 4001bd38 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 4000a56c: c4 26 60 84 st %g2, [ %i1 + 0x84 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 4000a570: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 4000a574: c0 26 60 44 clr [ %i1 + 0x44 ] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 4000a578: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ] the_thread->current_state = STATES_DORMANT; 4000a57c: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 4000a580: c0 26 60 1c clr [ %i1 + 0x1c ] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 4000a584: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; 4000a588: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 4000a58c: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 4000a590: fa 26 60 c8 st %i5, [ %i1 + 0xc8 ] _Thread_Set_priority( the_thread, priority ); 4000a594: 92 10 00 1d mov %i5, %o1 4000a598: 40 00 02 76 call 4000af70 <_Thread_Set_priority> 4000a59c: 90 10 00 19 mov %i1, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000a5a0: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000a5a4: c6 16 20 10 lduh [ %i0 + 0x10 ], %g3 /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 4000a5a8: c0 26 60 90 clr [ %i1 + 0x90 ] 4000a5ac: 03 00 00 3f sethi %hi(0xfc00), %g1 4000a5b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000a5b4: 82 08 80 01 and %g2, %g1, %g1 4000a5b8: 80 a0 40 03 cmp %g1, %g3 4000a5bc: 08 80 00 13 bleu 4000a608 <_Thread_Initialize+0x110> 4000a5c0: c0 26 60 94 clr [ %i1 + 0x94 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000a5c4: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Invoke create extensions */ if ( !_User_extensions_Thread_create( the_thread ) ) { 4000a5c8: 90 10 00 19 mov %i1, %o0 4000a5cc: c2 26 60 0c st %g1, [ %i1 + 0xc ] 4000a5d0: 40 00 04 46 call 4000b6e8 <_User_extensions_Thread_create> 4000a5d4: b0 10 20 01 mov 1, %i0 4000a5d8: 80 a2 20 00 cmp %o0, 0 4000a5dc: 12 80 00 34 bne 4000a6ac <_Thread_Initialize+0x1b4> 4000a5e0: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 4000a5e4: 02 80 00 05 be 4000a5f8 <_Thread_Initialize+0x100> <== NOT EXECUTED 4000a5e8: 11 10 00 6f sethi %hi(0x4001bc00), %o0 <== NOT EXECUTED 4000a5ec: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000a5f0: 7f ff f7 c4 call 40008500 <_Heap_Free> <== NOT EXECUTED 4000a5f4: 90 12 22 2c or %o0, 0x22c, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 4000a5f8: 40 00 03 22 call 4000b280 <_Thread_Stack_Free> <== NOT EXECUTED 4000a5fc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000a600: 81 c7 e0 08 ret 4000a604: 91 e8 20 00 restore %g0, 0, %o0 uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) information->local_table[ index ] = the_object; 4000a608: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 4000a60c: 83 28 60 02 sll %g1, 2, %g1 4000a610: 10 bf ff ed b 4000a5c4 <_Thread_Initialize+0xcc> 4000a614: f2 20 80 01 st %i1, [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4000a618: 92 02 60 01 inc %o1 4000a61c: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000a620: 93 2a 60 02 sll %o1, 2, %o1 4000a624: 7f ff f7 85 call 40008438 <_Heap_Allocate> 4000a628: 90 12 22 2c or %o0, 0x22c, %o0 if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 4000a62c: b6 92 20 00 orcc %o0, 0, %i3 4000a630: 02 80 00 1c be 4000a6a0 <_Thread_Initialize+0x1a8> 4000a634: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 4000a638: 80 a0 7f ff cmp %g1, -1 4000a63c: 02 bf ff c3 be 4000a548 <_Thread_Initialize+0x50> 4000a640: f6 26 61 78 st %i3, [ %i1 + 0x178 ] 4000a644: 86 00 60 01 add %g1, 1, %g3 4000a648: 84 10 20 00 clr %g2 the_thread->extensions[i] = NULL; 4000a64c: 83 28 a0 02 sll %g2, 2, %g1 * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 4000a650: 84 00 a0 01 inc %g2 4000a654: 80 a0 80 03 cmp %g2, %g3 4000a658: 12 bf ff fd bne 4000a64c <_Thread_Initialize+0x154> 4000a65c: c0 26 c0 01 clr [ %i3 + %g1 ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 4000a660: 10 bf ff bb b 4000a54c <_Thread_Initialize+0x54> 4000a664: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { if ( !_Stack_Is_enough( stack_size ) ) 4000a668: 80 a6 ef ff cmp %i3, 0xfff 4000a66c: 08 80 00 03 bleu 4000a678 <_Thread_Initialize+0x180> 4000a670: 13 00 00 04 sethi %hi(0x1000), %o1 4000a674: 92 10 00 1b mov %i3, %o1 actual_stack_size = STACK_MINIMUM_SIZE; else actual_stack_size = stack_size; actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size ); 4000a678: 40 00 02 e7 call 4000b214 <_Thread_Stack_Allocate> 4000a67c: 90 10 00 19 mov %i1, %o0 if ( !actual_stack_size || actual_stack_size < stack_size ) 4000a680: 80 a2 20 00 cmp %o0, 0 4000a684: 02 bf ff df be 4000a600 <_Thread_Initialize+0x108> 4000a688: 80 a6 c0 08 cmp %i3, %o0 4000a68c: 18 bf ff dd bgu 4000a600 <_Thread_Initialize+0x108> 4000a690: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 4000a694: f4 06 60 d8 ld [ %i1 + 0xd8 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 4000a698: 10 bf ff 9f b 4000a514 <_Thread_Initialize+0x1c> 4000a69c: c2 26 60 cc st %g1, [ %i1 + 0xcc ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 4000a6a0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000a6a4: 40 00 02 f7 call 4000b280 <_Thread_Stack_Free> <== NOT EXECUTED 4000a6a8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000a6ac: 81 c7 e0 08 ret 4000a6b0: 81 e8 00 00 restore 4000fc28 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { 4000fc28: 9d e3 bf 98 save %sp, -104, %sp the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000fc2c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000fc30: c4 06 20 bc ld [ %i0 + 0xbc ], %g2 the_thread->budget_callout = the_thread->Start.budget_callout; 4000fc34: c6 06 20 c0 ld [ %i0 + 0xc0 ], %g3 uint32_t numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000fc38: c2 26 20 7c st %g1, [ %i0 + 0x7c ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 4000fc3c: c4 3e 20 88 std %g2, [ %i0 + 0x88 ] the_thread->Start.pointer_argument = pointer_argument; 4000fc40: f2 26 20 b0 st %i1, [ %i0 + 0xb0 ] the_thread->Start.numeric_argument = numeric_argument; 4000fc44: f4 26 20 b4 st %i2, [ %i0 + 0xb4 ] Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { the_thread->resource_count = 0; 4000fc48: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000fc4c: c0 26 20 70 clr [ %i0 + 0x70 ] the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4000fc50: 7f ff ef 4f call 4000b98c <_Thread_queue_Extract_with_proxy> 4000fc54: 90 10 00 18 mov %i0, %o0 4000fc58: 80 a2 20 00 cmp %o0, 0 4000fc5c: 32 80 00 07 bne,a 4000fc78 <_Thread_Reset+0x50> 4000fc60: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000fc64: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000fc68: 80 a0 60 02 cmp %g1, 2 4000fc6c: 02 80 00 0c be 4000fc9c <_Thread_Reset+0x74> 4000fc70: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000fc74: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 4000fc78: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000fc7c: 80 a0 40 19 cmp %g1, %i1 4000fc80: 02 80 00 05 be 4000fc94 <_Thread_Reset+0x6c> 4000fc84: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000fc88: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000fc8c: 7f ff f0 01 call 4000bc90 <_Thread_Set_priority> 4000fc90: 81 e8 00 00 restore 4000fc94: 81 c7 e0 08 ret 4000fc98: 81 e8 00 00 restore the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4000fc9c: 7f ff f2 ac call 4000c74c <_Watchdog_Remove> <== NOT EXECUTED 4000fca0: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000fca4: 10 bf ff f5 b 4000fc78 <_Thread_Reset+0x50> <== NOT EXECUTED 4000fca8: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 <== NOT EXECUTED 4000ee30 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000ee30: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000ee34: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ee38: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 ! 4001bebc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000ee3c: 7f ff cc 6b call 40001fe8 4000ee40: e2 04 20 98 ld [ %l0 + 0x98 ], %l1 4000ee44: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000ee48: c4 04 40 00 ld [ %l1 ], %g2 4000ee4c: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000ee50: 80 a0 80 01 cmp %g2, %g1 4000ee54: 32 80 00 04 bne,a 4000ee64 <_Thread_Reset_timeslice+0x34> 4000ee58: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000ee5c: 7f ff cc 67 call 40001ff8 4000ee60: 81 e8 00 00 restore { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000ee64: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000ee68: 82 04 60 04 add %l1, 4, %g1 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 4000ee6c: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000ee70: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000ee74: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000ee78: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000ee7c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000ee80: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000ee84: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000ee88: 7f ff cc 5c call 40001ff8 4000ee8c: 01 00 00 00 nop 4000ee90: 7f ff cc 56 call 40001fe8 4000ee94: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000ee98: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000ee9c: c2 00 a2 94 ld [ %g2 + 0x294 ], %g1 ! 4001be94 <_Thread_Heir> 4000eea0: 80 a4 00 01 cmp %l0, %g1 4000eea4: 32 80 00 05 bne,a 4000eeb8 <_Thread_Reset_timeslice+0x88> 4000eea8: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000eeac: c2 04 40 00 ld [ %l1 ], %g1 4000eeb0: c2 20 a2 94 st %g1, [ %g2 + 0x294 ] _Context_Switch_necessary = TRUE; 4000eeb4: 84 10 20 01 mov 1, %g2 4000eeb8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000eebc: c4 20 62 cc st %g2, [ %g1 + 0x2cc ] ! 4001becc <_Context_Switch_necessary> _ISR_Enable( level ); 4000eec0: 7f ff cc 4e call 40001ff8 4000eec4: 81 e8 00 00 restore 4000eec8: 01 00 00 00 nop 4000cac4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, boolean force ) { 4000cac4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000cac8: 7f ff d8 90 call 40002d08 4000cacc: 01 00 00 00 nop 4000cad0: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000cad4: 80 a6 60 01 cmp %i1, 1 4000cad8: 22 80 00 13 be,a 4000cb24 <_Thread_Resume+0x60> 4000cadc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 the_thread->suspend_count = 0; else the_thread->suspend_count--; 4000cae0: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED 4000cae4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000cae8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000caec: 12 80 00 0c bne 4000cb1c <_Thread_Resume+0x58> <== NOT EXECUTED 4000caf0: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); return; } current_state = the_thread->current_state; 4000caf4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED if ( current_state & STATES_SUSPENDED ) { 4000caf8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4000cafc: 02 80 00 06 be 4000cb14 <_Thread_Resume+0x50> <== NOT EXECUTED 4000cb00: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4000cb04: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4000cb08: 80 a0 60 00 cmp %g1, 0 4000cb0c: 02 80 00 0b be 4000cb38 <_Thread_Resume+0x74> 4000cb10: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 4000cb14: 7f ff d8 81 call 40002d18 4000cb18: 91 e8 00 10 restore %g0, %l0, %o0 the_thread->suspend_count = 0; else the_thread->suspend_count--; if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); 4000cb1c: 7f ff d8 7f call 40002d18 <== NOT EXECUTED 4000cb20: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 4000cb24: 80 88 60 02 btst 2, %g1 4000cb28: 02 bf ff fb be 4000cb14 <_Thread_Resume+0x50> 4000cb2c: c0 26 20 70 clr [ %i0 + 0x70 ] 4000cb30: 10 bf ff f6 b 4000cb08 <_Thread_Resume+0x44> 4000cb34: 82 08 7f fd and %g1, -3, %g1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000cb38: c8 06 20 9c ld [ %i0 + 0x9c ], %g4 4000cb3c: c4 16 20 a2 lduh [ %i0 + 0xa2 ], %g2 4000cb40: c2 11 00 00 lduh [ %g4 ], %g1 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4000cb44: c6 06 20 98 ld [ %i0 + 0x98 ], %g3 4000cb48: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000cb4c: 1b 10 00 a2 sethi %hi(0x40028800), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000cb50: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000cb54: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000cb58: d8 16 20 a0 lduh [ %i0 + 0xa0 ], %o4 4000cb5c: c2 26 00 00 st %g1, [ %i0 ] 4000cb60: c4 13 63 d0 lduh [ %o5 + 0x3d0 ], %g2 old_last_node = the_chain->last; 4000cb64: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 4000cb68: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000cb6c: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000cb70: c8 26 20 04 st %g4, [ %i0 + 4 ] 4000cb74: c4 33 63 d0 sth %g2, [ %o5 + 0x3d0 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000cb78: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 4000cb7c: 7f ff d8 67 call 40002d18 4000cb80: 90 10 00 10 mov %l0, %o0 4000cb84: 7f ff d8 61 call 40002d08 4000cb88: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000cb8c: 09 10 00 a2 sethi %hi(0x40028800), %g4 4000cb90: c4 01 23 b4 ld [ %g4 + 0x3b4 ], %g2 ! 40028bb4 <_Thread_Heir> 4000cb94: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000cb98: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 4000cb9c: 80 a0 c0 01 cmp %g3, %g1 4000cba0: 1a bf ff dd bcc 4000cb14 <_Thread_Resume+0x50> 4000cba4: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000cba8: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000cbac: c4 00 63 dc ld [ %g1 + 0x3dc ], %g2 ! 40028bdc <_Thread_Executing> _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; 4000cbb0: f0 21 23 b4 st %i0, [ %g4 + 0x3b4 ] if ( _Thread_Executing->is_preemptible || 4000cbb4: c2 00 a0 7c ld [ %g2 + 0x7c ], %g1 4000cbb8: 80 a0 60 00 cmp %g1, 0 4000cbbc: 02 80 00 06 be 4000cbd4 <_Thread_Resume+0x110> 4000cbc0: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000cbc4: 84 10 20 01 mov 1, %g2 4000cbc8: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000cbcc: c4 20 63 ec st %g2, [ %g1 + 0x3ec ] ! 40028bec <_Context_Switch_necessary> 4000cbd0: 30 bf ff d1 b,a 4000cb14 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000cbd4: 12 bf ff d0 bne 4000cb14 <_Thread_Resume+0x50> 4000cbd8: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000cbdc: 10 bf ff fc b 4000cbcc <_Thread_Resume+0x108> <== NOT EXECUTED 4000cbe0: 03 10 00 a2 sethi %hi(0x40028800), %g1 <== NOT EXECUTED 4000b214 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 4000b214: 9d e3 bf 98 save %sp, -104, %sp void *stack_addr = 0; size_t the_stack_size = stack_size; if ( !_Stack_Is_enough( the_stack_size ) ) 4000b218: 80 a6 6f ff cmp %i1, 0xfff 4000b21c: 28 80 00 02 bleu,a 4000b224 <_Thread_Stack_Allocate+0x10> 4000b220: 33 00 00 04 sethi %hi(0x1000), %i1 <== NOT EXECUTED * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _CPU_Table.stack_allocate_hook ) { 4000b224: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b228: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 4001be14 <_CPU_Table+0x20> 4000b22c: 80 a0 60 00 cmp %g1, 0 4000b230: 02 80 00 0a be 4000b258 <_Thread_Stack_Allocate+0x44> 4000b234: 92 06 60 10 add %i1, 0x10, %o1 stack_addr = (*_CPU_Table.stack_allocate_hook)( the_stack_size ); 4000b238: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b23c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000b240: d0 26 20 d8 st %o0, [ %i0 + 0xd8 ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 4000b244: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000b248: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 4000b24c: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 4000b250: 81 c7 e0 08 ret <== NOT EXECUTED 4000b254: 81 e8 00 00 restore <== NOT EXECUTED 4000b258: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000b25c: b2 10 00 09 mov %o1, %i1 4000b260: 7f ff f4 76 call 40008438 <_Heap_Allocate> 4000b264: 90 12 22 2c or %o0, 0x22c, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000b268: d0 26 20 d8 st %o0, [ %i0 + 0xd8 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 4000b26c: 80 a0 00 08 cmp %g0, %o0 4000b270: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 4000b274: b0 0e 40 18 and %i1, %i0, %i0 4000b278: 81 c7 e0 08 ret 4000b27c: 81 e8 00 00 restore 4000b280 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000b280: 9d e3 bf 98 save %sp, -104, %sp /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 4000b284: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 4000b288: 80 a0 60 00 cmp %g1, 0 4000b28c: 02 80 00 08 be 4000b2ac <_Thread_Stack_Free+0x2c> 4000b290: 03 10 00 6f sethi %hi(0x4001bc00), %g1 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _CPU_Table.stack_free_hook ) 4000b294: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 4001be18 <_CPU_Table+0x24> 4000b298: 80 a0 60 00 cmp %g1, 0 4000b29c: 22 80 00 06 be,a 4000b2b4 <_Thread_Stack_Free+0x34> 4000b2a0: f2 06 20 d4 ld [ %i0 + 0xd4 ], %i1 (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area ); 4000b2a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b2a8: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 4000b2ac: 81 c7 e0 08 ret <== NOT EXECUTED 4000b2b0: 81 e8 00 00 restore <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000b2b4: 31 10 00 6f sethi %hi(0x4001bc00), %i0 4000b2b8: 7f ff f4 92 call 40008500 <_Heap_Free> 4000b2bc: 91 ee 22 2c restore %i0, 0x22c, %o0 4000b2c0: 01 00 00 00 nop 4000b3f8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 4000b3f8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000b3fc: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b400: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 ! 4001bebc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000b404: 7f ff da f9 call 40001fe8 4000b408: e2 04 20 98 ld [ %l0 + 0x98 ], %l1 4000b40c: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 4000b410: c4 04 40 00 ld [ %l1 ], %g2 4000b414: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000b418: 80 a0 80 01 cmp %g2, %g1 4000b41c: 12 80 00 0b bne 4000b448 <_Thread_Yield_processor+0x50> 4000b420: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 4000b424: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 4001be94 <_Thread_Heir> 4000b428: 80 a4 00 02 cmp %l0, %g2 4000b42c: 02 80 00 05 be 4000b440 <_Thread_Yield_processor+0x48> 4000b430: 01 00 00 00 nop _Context_Switch_necessary = TRUE; 4000b434: 84 10 20 01 mov 1, %g2 ! 1 4000b438: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b43c: c4 20 62 cc st %g2, [ %g1 + 0x2cc ] ! 4001becc <_Context_Switch_necessary> _ISR_Enable( level ); 4000b440: 7f ff da ee call 40001ff8 4000b444: 81 e8 00 00 restore ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000b448: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000b44c: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b450: 82 04 60 04 add %l1, 4, %g1 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 4000b454: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b458: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000b45c: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000b460: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000b464: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000b468: c2 24 20 04 st %g1, [ %l0 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000b46c: e0 20 40 00 st %l0, [ %g1 ] _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000b470: 7f ff da e2 call 40001ff8 4000b474: 01 00 00 00 nop 4000b478: 7f ff da dc call 40001fe8 4000b47c: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000b480: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000b484: c2 00 a2 94 ld [ %g2 + 0x294 ], %g1 ! 4001be94 <_Thread_Heir> 4000b488: 80 a4 00 01 cmp %l0, %g1 4000b48c: 32 bf ff eb bne,a 4000b438 <_Thread_Yield_processor+0x40> 4000b490: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000b494: c2 04 40 00 ld [ %l1 ], %g1 4000b498: 10 bf ff e7 b 4000b434 <_Thread_Yield_processor+0x3c> 4000b49c: c2 20 a2 94 st %g1, [ %g2 + 0x294 ] 4000a7a0 <_Thread_queue_Dequeue>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000a7a0: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000a7a4: 80 a0 60 00 cmp %g1, 0 4000a7a8: 12 80 00 05 bne 4000a7bc <_Thread_queue_Dequeue+0x1c> 4000a7ac: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); 4000a7b0: 82 13 c0 00 mov %o7, %g1 4000a7b4: 40 00 10 97 call 4000ea10 <_Thread_queue_Dequeue_fifo> 4000a7b8: 9e 10 40 00 mov %g1, %o7 Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000a7bc: 02 80 00 04 be 4000a7cc <_Thread_queue_Dequeue+0x2c> 4000a7c0: 01 00 00 00 nop the_thread = NULL; break; } return( the_thread ); } 4000a7c4: 81 c3 e0 08 retl <== NOT EXECUTED 4000a7c8: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED switch ( the_thread_queue->discipline ) { case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_Dequeue_priority( the_thread_queue ); 4000a7cc: 82 13 c0 00 mov %o7, %g1 4000a7d0: 40 00 00 03 call 4000a7dc <_Thread_queue_Dequeue_priority> 4000a7d4: 9e 10 40 00 mov %g1, %o7 4000a7d8: 01 00 00 00 nop 4000ea10 <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4000ea10: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4000ea14: 7f ff cd 75 call 40001fe8 4000ea18: a0 10 00 18 mov %i0, %l0 4000ea1c: 84 10 00 08 mov %o0, %g2 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000ea20: f0 06 00 00 ld [ %i0 ], %i0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { 4000ea24: 82 04 20 04 add %l0, 4, %g1 4000ea28: 80 a6 00 01 cmp %i0, %g1 4000ea2c: 22 80 00 1d be,a 4000eaa0 <_Thread_queue_Dequeue_fifo+0x90> 4000ea30: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4000ea34: c2 06 00 00 ld [ %i0 ], %g1 the_chain->first = new_first; 4000ea38: c2 24 00 00 st %g1, [ %l0 ] the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000ea3c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 new_first->previous = _Chain_Head(the_chain); 4000ea40: e0 20 60 04 st %l0, [ %g1 + 4 ] 4000ea44: 80 a0 a0 02 cmp %g2, 2 4000ea48: 02 80 00 0a be 4000ea70 <_Thread_queue_Dequeue_fifo+0x60> 4000ea4c: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 4000ea50: 7f ff cd 6a call 40001ff8 4000ea54: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000ea58: 90 10 00 18 mov %i0, %o0 4000ea5c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000ea60: 7f ff ed 99 call 4000a0c4 <_Thread_Clear_state> 4000ea64: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000ea68: 81 c7 e0 08 ret 4000ea6c: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000ea70: 82 10 20 03 mov 3, %g1 4000ea74: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000ea78: 7f ff cd 60 call 40001ff8 4000ea7c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000ea80: 7f ff f3 d7 call 4000b9dc <_Watchdog_Remove> 4000ea84: 90 06 20 48 add %i0, 0x48, %o0 4000ea88: 90 10 00 18 mov %i0, %o0 4000ea8c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000ea90: 7f ff ed 8d call 4000a0c4 <_Thread_Clear_state> 4000ea94: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000ea98: 81 c7 e0 08 ret 4000ea9c: 81 e8 00 00 restore #endif return the_thread; } switch ( the_thread_queue->sync_state ) { 4000eaa0: 80 a0 60 02 cmp %g1, 2 4000eaa4: 18 80 00 0c bgu 4000ead4 <_Thread_queue_Dequeue_fifo+0xc4> 4000eaa8: 80 a0 60 03 cmp %g1, 3 4000eaac: 80 a0 60 01 cmp %g1, 1 4000eab0: 0a 80 00 0b bcs 4000eadc <_Thread_queue_Dequeue_fifo+0xcc> 4000eab4: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 4000eab8: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 4000eabc: 7f ff cd 4f call 40001ff8 <== NOT EXECUTED 4000eac0: 01 00 00 00 nop <== NOT EXECUTED return _Thread_Executing; 4000eac4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000eac8: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED } return NULL; /* this is only to prevent warnings */ } 4000eacc: 81 c7 e0 08 ret <== NOT EXECUTED 4000ead0: 81 e8 00 00 restore <== NOT EXECUTED #endif return the_thread; } switch ( the_thread_queue->sync_state ) { 4000ead4: 12 bf ff e5 bne 4000ea68 <_Thread_queue_Dequeue_fifo+0x58> <== NOT EXECUTED 4000ead8: b0 10 20 00 clr %i0 <== NOT EXECUTED case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 4000eadc: b0 10 20 00 clr %i0 4000eae0: 7f ff cd 46 call 40001ff8 4000eae4: 90 10 00 02 mov %g2, %o0 4000eae8: 81 c7 e0 08 ret 4000eaec: 81 e8 00 00 restore 4000a7dc <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4000a7dc: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4000a7e0: 7f ff de 02 call 40001fe8 4000a7e4: 01 00 00 00 nop 4000a7e8: 9a 10 00 08 mov %o0, %o5 4000a7ec: 86 10 20 00 clr %g3 4000a7f0: 88 10 20 00 clr %g4 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000a7f4: d0 01 00 18 ld [ %g4 + %i0 ], %o0 for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 4000a7f8: 85 28 e0 02 sll %g3, 2, %g2 4000a7fc: 83 28 e0 04 sll %g3, 4, %g1 4000a800: 82 20 40 02 sub %g1, %g2, %g1 4000a804: 82 06 00 01 add %i0, %g1, %g1 4000a808: 82 00 60 04 add %g1, 4, %g1 4000a80c: 80 a2 00 01 cmp %o0, %g1 4000a810: 12 80 00 50 bne 4000a950 <_Thread_queue_Dequeue_priority+0x174> 4000a814: 88 01 20 0c add %g4, 0xc, %g4 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 4000a818: 86 00 e0 01 inc %g3 Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 4000a81c: 80 a0 e0 04 cmp %g3, 4 4000a820: 32 bf ff f6 bne,a 4000a7f8 <_Thread_queue_Dequeue_priority+0x1c> 4000a824: d0 01 00 18 ld [ %g4 + %i0 ], %o0 the_thread_queue->Queues.Priority[ index ].first; goto dequeue; } } switch ( the_thread_queue->sync_state ) { 4000a828: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000a82c: 80 a0 60 02 cmp %g1, 2 4000a830: 08 80 00 23 bleu 4000a8bc <_Thread_queue_Dequeue_priority+0xe0> 4000a834: 80 a0 60 01 cmp %g1, 1 4000a838: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000a83c: 02 80 00 29 be 4000a8e0 <_Thread_queue_Dequeue_priority+0x104> <== NOT EXECUTED 4000a840: b0 10 20 00 clr %i0 <== NOT EXECUTED return _Thread_Executing; } dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 4000a844: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000a848: 82 06 20 3c add %i0, 0x3c, %g1 _ISR_Enable( level ); return _Thread_Executing; } dequeue: the_thread->Wait.queue = NULL; 4000a84c: c0 26 20 44 clr [ %i0 + 0x44 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000a850: 80 a0 c0 01 cmp %g3, %g1 dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4000a854: c4 06 00 00 ld [ %i0 ], %g2 previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000a858: 02 80 00 27 be 4000a8f4 <_Thread_queue_Dequeue_priority+0x118> 4000a85c: c2 06 20 04 ld [ %i0 + 4 ], %g1 last_node = the_thread->Wait.Block2n.last; 4000a860: d8 06 20 40 ld [ %i0 + 0x40 ], %o4 new_second_node = new_first_node->next; 4000a864: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000a868: c6 20 a0 04 st %g3, [ %g2 + 4 ] if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4000a86c: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000a870: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000a874: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000a878: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 4000a87c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000a880: 80 a0 80 01 cmp %g2, %g1 4000a884: 12 80 00 2d bne 4000a938 <_Thread_queue_Dequeue_priority+0x15c> 4000a888: 82 00 e0 38 add %g3, 0x38, %g1 } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000a88c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000a890: 80 a0 60 02 cmp %g1, 2 4000a894: 02 80 00 1e be 4000a90c <_Thread_queue_Dequeue_priority+0x130> 4000a898: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000a89c: 7f ff dd d7 call 40001ff8 4000a8a0: 90 10 00 0d mov %o5, %o0 4000a8a4: 90 10 00 18 mov %i0, %o0 4000a8a8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000a8ac: 7f ff fe 06 call 4000a0c4 <_Thread_Clear_state> 4000a8b0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000a8b4: 81 c7 e0 08 ret 4000a8b8: 81 e8 00 00 restore the_thread_queue->Queues.Priority[ index ].first; goto dequeue; } } switch ( the_thread_queue->sync_state ) { 4000a8bc: 0a 80 00 09 bcs 4000a8e0 <_Thread_queue_Dequeue_priority+0x104> 4000a8c0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 4000a8c4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 4000a8c8: 7f ff dd cc call 40001ff8 <== NOT EXECUTED 4000a8cc: 90 10 00 0d mov %o5, %o0 <== NOT EXECUTED return _Thread_Executing; 4000a8d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a8d4: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 4000a8d8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a8dc: 81 e8 00 00 restore <== NOT EXECUTED } switch ( the_thread_queue->sync_state ) { case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 4000a8e0: b0 10 20 00 clr %i0 4000a8e4: 7f ff dd c5 call 40001ff8 4000a8e8: 90 10 00 0d mov %o5, %o0 4000a8ec: 81 c7 e0 08 ret 4000a8f0: 81 e8 00 00 restore last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000a8f4: c2 20 a0 04 st %g1, [ %g2 + 4 ] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4000a8f8: c4 20 40 00 st %g2, [ %g1 ] next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000a8fc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000a900: 80 a0 60 02 cmp %g1, 2 4000a904: 12 bf ff e6 bne 4000a89c <_Thread_queue_Dequeue_priority+0xc0> 4000a908: 82 10 20 03 mov 3, %g1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000a90c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000a910: 7f ff dd ba call 40001ff8 4000a914: 90 10 00 0d mov %o5, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 4000a918: 40 00 04 31 call 4000b9dc <_Watchdog_Remove> 4000a91c: 90 06 20 48 add %i0, 0x48, %o0 4000a920: 90 10 00 18 mov %i0, %o0 4000a924: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000a928: 7f ff fd e7 call 4000a0c4 <_Thread_Clear_state> 4000a92c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4000a930: 81 c7 e0 08 ret 4000a934: 81 e8 00 00 restore new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = 4000a938: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000a93c: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000a940: d8 20 e0 40 st %o4, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000a944: 82 00 e0 3c add %g3, 0x3c, %g1 4000a948: 10 bf ff d1 b 4000a88c <_Thread_queue_Dequeue_priority+0xb0> 4000a94c: c2 23 00 00 st %g1, [ %o4 ] _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 4000a950: 10 bf ff bd b 4000a844 <_Thread_queue_Dequeue_priority+0x68> 4000a954: b0 10 00 08 mov %o0, %i0 4000eaf0 <_Thread_queue_Enqueue_fifo>: void _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000eaf0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_queue_States sync_state; _ISR_Disable( level ); 4000eaf4: 7f ff cd 3d call 40001fe8 4000eaf8: 01 00 00 00 nop sync_state = the_thread_queue->sync_state; 4000eafc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; switch ( sync_state ) { 4000eb00: 80 a0 a0 02 cmp %g2, 2 4000eb04: 02 80 00 22 be 4000eb8c <_Thread_queue_Enqueue_fifo+0x9c> 4000eb08: c0 26 20 30 clr [ %i0 + 0x30 ] 4000eb0c: 80 a0 a0 03 cmp %g2, 3 4000eb10: 02 80 00 11 be 4000eb54 <_Thread_queue_Enqueue_fifo+0x64> 4000eb14: 80 a0 a0 01 cmp %g2, 1 4000eb18: 02 80 00 07 be 4000eb34 <_Thread_queue_Enqueue_fifo+0x44> 4000eb1c: 82 06 20 04 add %i0, 4, %g1 4000eb20: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000eb24: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000eb28: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000eb2c: 7f ff ed 66 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000eb30: 81 e8 00 00 restore <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000eb34: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 4000eb38: c4 06 20 08 ld [ %i0 + 8 ], %g2 the_chain->last = the_node; 4000eb3c: f2 26 20 08 st %i1, [ %i0 + 8 ] case THREAD_QUEUE_NOTHING_HAPPENED: _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 4000eb40: f0 26 60 44 st %i0, [ %i1 + 0x44 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000eb44: c4 26 60 04 st %g2, [ %i1 + 4 ] Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; the_chain->last = the_node; old_last_node->next = the_node; 4000eb48: f2 20 80 00 st %i1, [ %g2 ] _ISR_Enable( level ); 4000eb4c: 7f ff cd 2b call 40001ff8 4000eb50: 91 e8 00 08 restore %g0, %o0, %o0 the_thread->Wait.queue = NULL; _ISR_Enable( level ); break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 4000eb54: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED 4000eb58: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000eb5c: 12 80 00 16 bne 4000ebb4 <_Thread_queue_Enqueue_fifo+0xc4> <== NOT EXECUTED 4000eb60: 01 00 00 00 nop <== NOT EXECUTED 4000eb64: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 4000eb68: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 4000eb6c: 7f ff cd 23 call 40001ff8 <== NOT EXECUTED 4000eb70: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000eb74: 7f ff f3 9a call 4000b9dc <_Watchdog_Remove> <== NOT EXECUTED 4000eb78: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 4000eb7c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000eb80: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000eb84: 7f ff ed 50 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000eb88: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000eb8c: c4 06 60 44 ld [ %i1 + 0x44 ], %g2 <== NOT EXECUTED the_thread->Wait.queue = NULL; 4000eb90: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000eb94: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED 4000eb98: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 4000eb9c: 7f ff cd 17 call 40001ff8 <== NOT EXECUTED 4000eba0: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000eba4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000eba8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ebac: 7f ff ed 46 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ebb0: 81 e8 00 00 restore <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4000ebb4: 7f ff cd 11 call 40001ff8 <== NOT EXECUTED 4000ebb8: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ebbc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ebc0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ebc4: 7f ff ed 40 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ebc8: 81 e8 00 00 restore <== NOT EXECUTED 4000ebcc: 01 00 00 00 nop 4000a9dc <_Thread_queue_Enqueue_priority>: void _Thread_queue_Enqueue_priority( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000a9dc: 9d e3 bf 98 save %sp, -104, %sp States_Control block_state; Thread_queue_States sync_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 4000a9e0: e4 06 60 14 ld [ %i1 + 0x14 ], %l2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a9e4: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000a9e8: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a9ec: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 4000a9f0: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 4000a9f4: c4 26 60 40 st %g2, [ %i1 + 0x40 ] void _Thread_queue_Enqueue_priority( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000a9f8: aa 10 00 18 mov %i0, %l5 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 4000a9fc: 80 8c a0 20 btst 0x20, %l2 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 4000aa00: 83 34 a0 06 srl %l2, 6, %g1 4000aa04: 12 80 00 40 bne 4000ab04 <_Thread_queue_Enqueue_priority+0x128> 4000aa08: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 4000aa0c: 85 28 60 04 sll %g1, 4, %g2 4000aa10: 83 28 60 02 sll %g1, 2, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 4000aa14: ac 20 80 01 sub %g2, %g1, %l6 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000aa18: 82 06 00 16 add %i0, %l6, %g1 4000aa1c: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4000aa20: 7f ff dd 72 call 40001fe8 4000aa24: 01 00 00 00 nop 4000aa28: b0 10 00 08 mov %o0, %i0 search_thread = (Thread_Control *) header->first; 4000aa2c: e0 05 40 16 ld [ %l5 + %l6 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4000aa30: 80 a4 00 13 cmp %l0, %l3 4000aa34: 02 80 00 24 be 4000aac4 <_Thread_queue_Enqueue_priority+0xe8> 4000aa38: a2 10 3f ff mov -1, %l1 search_priority = search_thread->current_priority; 4000aa3c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 4000aa40: 80 a4 80 11 cmp %l2, %l1 4000aa44: 28 80 00 21 bleu,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aa48: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 4000aa4c: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 4000aa50: 80 a4 c0 10 cmp %l3, %l0 4000aa54: 32 80 00 19 bne,a 4000aab8 <_Thread_queue_Enqueue_priority+0xdc> 4000aa58: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000aa5c: 10 80 00 1b b 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aa60: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4000aa64: 7f ff dd 65 call 40001ff8 4000aa68: 90 10 00 18 mov %i0, %o0 4000aa6c: 7f ff dd 5f call 40001fe8 4000aa70: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000aa74: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000aa78: 80 8d 00 01 btst %l4, %g1 4000aa7c: 02 80 00 91 be 4000acc0 <_Thread_queue_Enqueue_priority+0x2e4> 4000aa80: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 4000aa84: e0 04 00 00 ld [ %l0 ], %l0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4000aa88: 80 a4 00 13 cmp %l0, %l3 4000aa8c: 22 80 00 0f be,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aa90: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 search_priority = search_thread->current_priority; 4000aa94: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 4000aa98: 80 a4 80 11 cmp %l2, %l1 4000aa9c: 28 80 00 0b bleu,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aaa0: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 4000aaa4: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 4000aaa8: 80 a4 00 13 cmp %l0, %l3 4000aaac: 22 80 00 07 be,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aab0: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 4000aab4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 4000aab8: 80 a4 80 11 cmp %l2, %l1 4000aabc: 18 bf ff ea bgu 4000aa64 <_Thread_queue_Enqueue_priority+0x88> 4000aac0: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000aac4: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 4000aac8: 80 a0 60 01 cmp %g1, 1 4000aacc: 02 80 00 63 be 4000ac58 <_Thread_queue_Enqueue_priority+0x27c> 4000aad0: 80 a4 80 11 cmp %l2, %l1 return; synchronize: sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; 4000aad4: c0 25 60 30 clr [ %l5 + 0x30 ] <== NOT EXECUTED switch ( sync_state ) { 4000aad8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000aadc: 02 80 00 54 be 4000ac2c <_Thread_queue_Enqueue_priority+0x250> <== NOT EXECUTED 4000aae0: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 4000aae4: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000aae8: 22 80 00 43 be,a 4000abf4 <_Thread_queue_Enqueue_priority+0x218> <== NOT EXECUTED 4000aaec: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED 4000aaf0: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000aaf4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000aaf8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000aafc: 7f ff fd 72 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ab00: 81 e8 00 00 restore <== NOT EXECUTED 4000ab04: 85 28 60 04 sll %g1, 4, %g2 4000ab08: 83 28 60 02 sll %g1, 2, %g1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 4000ab0c: 82 20 80 01 sub %g2, %g1, %g1 4000ab10: a6 00 40 18 add %g1, %i0, %l3 return; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4000ab14: 7f ff dd 35 call 40001fe8 4000ab18: 01 00 00 00 nop 4000ab1c: b0 10 00 08 mov %o0, %i0 search_thread = (Thread_Control *) header->last; 4000ab20: e0 04 e0 08 ld [ %l3 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4000ab24: 80 a4 00 13 cmp %l0, %l3 4000ab28: 02 80 00 24 be 4000abb8 <_Thread_queue_Enqueue_priority+0x1dc> 4000ab2c: a2 10 21 00 mov 0x100, %l1 search_priority = search_thread->current_priority; 4000ab30: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 4000ab34: 80 a4 80 11 cmp %l2, %l1 4000ab38: 3a 80 00 21 bcc,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> 4000ab3c: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 4000ab40: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 4000ab44: 80 a4 c0 10 cmp %l3, %l0 4000ab48: 32 80 00 19 bne,a 4000abac <_Thread_queue_Enqueue_priority+0x1d0> 4000ab4c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000ab50: 10 80 00 1b b 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> 4000ab54: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4000ab58: 7f ff dd 28 call 40001ff8 4000ab5c: 90 10 00 18 mov %i0, %o0 4000ab60: 7f ff dd 22 call 40001fe8 4000ab64: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000ab68: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000ab6c: 80 8d 00 01 btst %l4, %g1 4000ab70: 02 80 00 57 be 4000accc <_Thread_queue_Enqueue_priority+0x2f0> 4000ab74: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4000ab78: e0 04 20 04 ld [ %l0 + 4 ], %l0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4000ab7c: 80 a4 00 13 cmp %l0, %l3 4000ab80: 22 80 00 0f be,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> 4000ab84: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 search_priority = search_thread->current_priority; 4000ab88: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 4000ab8c: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 4000ab90: 3a 80 00 0b bcc,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> <== NOT EXECUTED 4000ab94: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 <== NOT EXECUTED break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 4000ab98: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 4000ab9c: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 4000aba0: 22 80 00 07 be,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> <== NOT EXECUTED 4000aba4: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 4000aba8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 4000abac: 80 a4 80 11 cmp %l2, %l1 4000abb0: 0a bf ff ea bcs 4000ab58 <_Thread_queue_Enqueue_priority+0x17c> 4000abb4: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000abb8: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 4000abbc: 80 a0 60 01 cmp %g1, 1 4000abc0: 12 bf ff c6 bne 4000aad8 <_Thread_queue_Enqueue_priority+0xfc> 4000abc4: c0 25 60 30 clr [ %l5 + 0x30 ] goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 4000abc8: 80 a4 80 11 cmp %l2, %l1 4000abcc: 22 80 00 35 be,a 4000aca0 <_Thread_queue_Enqueue_priority+0x2c4> 4000abd0: 82 04 20 3c add %l0, 0x3c, %g1 goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4000abd4: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4000abd8: e0 26 60 04 st %l0, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4000abdc: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4000abe0: ea 26 60 44 st %l5, [ %i1 + 0x44 ] next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; search_node->next = the_node; 4000abe4: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; 4000abe8: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000abec: 7f ff dd 03 call 40001ff8 4000abf0: 81 e8 00 00 restore the_thread->Wait.queue = NULL; _ISR_Enable( level ); break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 4000abf4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000abf8: 12 80 00 22 bne 4000ac80 <_Thread_queue_Enqueue_priority+0x2a4> <== NOT EXECUTED 4000abfc: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000ac00: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 4000ac04: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 4000ac08: 7f ff dc fc call 40001ff8 <== NOT EXECUTED 4000ac0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000ac10: 40 00 03 73 call 4000b9dc <_Watchdog_Remove> <== NOT EXECUTED 4000ac14: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 4000ac18: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ac1c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ac20: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ac24: 7f ff fd 28 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ac28: 81 e8 00 00 restore <== NOT EXECUTED * This should never happen. All of this was dealt with above. */ break; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000ac2c: c4 06 60 44 ld [ %i1 + 0x44 ], %g2 <== NOT EXECUTED the_thread->Wait.queue = NULL; 4000ac30: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED * This should never happen. All of this was dealt with above. */ break; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000ac34: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED 4000ac38: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 4000ac3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ac40: 7f ff dc ee call 40001ff8 <== NOT EXECUTED 4000ac44: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ac48: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ac4c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ac50: 7f ff fd 1d call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ac54: 81 e8 00 00 restore <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 4000ac58: 02 80 00 11 be 4000ac9c <_Thread_queue_Enqueue_priority+0x2c0> 4000ac5c: c0 25 60 30 clr [ %l5 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 4000ac60: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000ac64: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 4000ac68: c2 26 60 04 st %g1, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4000ac6c: ea 26 60 44 st %l5, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 4000ac70: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 4000ac74: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000ac78: 7f ff dc e0 call 40001ff8 4000ac7c: 81 e8 00 00 restore _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4000ac80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ac84: 7f ff dc dd call 40001ff8 <== NOT EXECUTED 4000ac88: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ac8c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ac90: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ac94: 7f ff fd 0c call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ac98: 81 e8 00 00 restore <== NOT EXECUTED 4000ac9c: 82 04 20 3c add %l0, 0x3c, %g1 _ISR_Enable( level ); return; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 4000aca0: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000aca4: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 4000aca8: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4000acac: ea 26 60 44 st %l5, [ %i1 + 0x44 ] previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; previous_node->next = the_node; 4000acb0: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 4000acb4: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000acb8: 7f ff dc d0 call 40001ff8 4000acbc: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4000acc0: 7f ff dc ce call 40001ff8 <== NOT EXECUTED 4000acc4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000acc8: 30 bf ff 56 b,a 4000aa20 <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4000accc: 7f ff dc cb call 40001ff8 <== NOT EXECUTED 4000acd0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000acd4: 30 bf ff 90 b,a 4000ab14 <_Thread_queue_Enqueue_priority+0x138> <== NOT EXECUTED 4000a958 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 4000a958: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; the_thread = _Thread_Executing; 4000a95c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4000a960: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 Thread_queue_Timeout_callout handler ) { Thread_Control *the_thread; the_thread = _Thread_Executing; 4000a964: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 4000a968: a2 10 00 18 mov %i0, %l1 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4000a96c: 40 00 01 9b call 4000afd8 <_Thread_Set_state> 4000a970: 90 10 00 10 mov %l0, %o0 /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 4000a974: 80 a6 60 00 cmp %i1, 0 4000a978: 32 80 00 0e bne,a 4000a9b0 <_Thread_queue_Enqueue_with_handler+0x58> 4000a97c: c2 04 20 08 ld [ %l0 + 8 ], %g1 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 4000a980: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 4000a984: 80 a0 60 00 cmp %g1, 0 4000a988: 12 80 00 04 bne 4000a998 <_Thread_queue_Enqueue_with_handler+0x40> 4000a98c: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread ); 4000a990: 40 00 10 58 call 4000eaf0 <_Thread_queue_Enqueue_fifo> 4000a994: 93 e8 00 10 restore %g0, %l0, %o1 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 4000a998: 02 80 00 04 be 4000a9a8 <_Thread_queue_Enqueue_with_handler+0x50> 4000a99c: 01 00 00 00 nop 4000a9a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9a4: 81 e8 00 00 restore <== NOT EXECUTED case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Enqueue_priority( the_thread_queue, the_thread ); 4000a9a8: 40 00 00 0d call 4000a9dc <_Thread_queue_Enqueue_priority> 4000a9ac: 93 e8 00 10 restore %g0, %l0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000a9b0: f4 24 20 64 st %i2, [ %l0 + 0x64 ] the_watchdog->id = id; 4000a9b4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000a9b8: f2 24 20 54 st %i1, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000a9bc: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4000a9c0: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000a9c4: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000a9c8: 92 04 20 48 add %l0, 0x48, %o1 4000a9cc: 40 00 03 9a call 4000b834 <_Watchdog_Insert> 4000a9d0: 90 12 22 dc or %o0, 0x2dc, %o0 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 4000a9d4: 10 bf ff ec b 4000a984 <_Thread_queue_Enqueue_with_handler+0x2c> 4000a9d8: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 4000ebd0 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { switch ( the_thread_queue->discipline ) { 4000ebd0: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000ebd4: 80 a0 60 00 cmp %g1, 0 4000ebd8: 12 80 00 05 bne 4000ebec <_Thread_queue_Extract+0x1c> 4000ebdc: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 4000ebe0: 82 13 c0 00 mov %o7, %g1 4000ebe4: 40 00 04 85 call 4000fdf8 <_Thread_queue_Extract_fifo> 4000ebe8: 9e 10 40 00 mov %g1, %o7 void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { switch ( the_thread_queue->discipline ) { 4000ebec: 02 80 00 04 be 4000ebfc <_Thread_queue_Extract+0x2c> 4000ebf0: 94 10 20 00 clr %o2 4000ebf4: 81 c3 e0 08 retl <== NOT EXECUTED 4000ebf8: 01 00 00 00 nop <== NOT EXECUTED case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 4000ebfc: 82 13 c0 00 mov %o7, %g1 4000ec00: 40 00 00 03 call 4000ec0c <_Thread_queue_Extract_priority_helper> 4000ec04: 9e 10 40 00 mov %g1, %o7 4000ec08: 01 00 00 00 nop 4000fdf8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000fdf8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000fdfc: 7f ff c8 7b call 40001fe8 4000fe00: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000fe04: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000fe08: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000fe0c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000fe10: 80 88 80 01 btst %g2, %g1 4000fe14: 02 80 00 19 be 4000fe78 <_Thread_queue_Extract_fifo+0x80> 4000fe18: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000fe1c: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000fe20: c4 06 60 04 ld [ %i1 + 4 ], %g2 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000fe24: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000fe28: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000fe2c: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000fe30: 80 a0 e0 02 cmp %g3, 2 4000fe34: 12 80 00 0c bne 4000fe64 <_Thread_queue_Extract_fifo+0x6c> 4000fe38: c0 26 60 44 clr [ %i1 + 0x44 ] 4000fe3c: 82 10 20 03 mov 3, %g1 4000fe40: c2 26 60 50 st %g1, [ %i1 + 0x50 ] _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000fe44: 7f ff c8 6d call 40001ff8 4000fe48: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000fe4c: 7f ff ee e4 call 4000b9dc <_Watchdog_Remove> 4000fe50: 90 06 60 48 add %i1, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000fe54: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000fe58: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000fe5c: 7f ff e8 9a call 4000a0c4 <_Thread_Clear_state> 4000fe60: 81 e8 00 00 restore _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); 4000fe64: 7f ff c8 65 call 40001ff8 4000fe68: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000fe6c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000fe70: 7f ff e8 95 call 4000a0c4 <_Thread_Clear_state> 4000fe74: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000fe78: 7f ff c8 60 call 40001ff8 <== NOT EXECUTED 4000fe7c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000fe80: 01 00 00 00 nop 4000ec0c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, boolean requeuing ) { 4000ec0c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4000ec10: 7f ff cc f6 call 40001fe8 4000ec14: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000ec18: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000ec1c: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ec20: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000ec24: 80 88 80 01 btst %g2, %g1 4000ec28: 02 80 00 29 be 4000eccc <_Thread_queue_Extract_priority_helper+0xc0> 4000ec2c: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000ec30: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000ec34: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000ec38: 80 a0 c0 01 cmp %g3, %g1 4000ec3c: 12 80 00 10 bne 4000ec7c <_Thread_queue_Extract_priority_helper+0x70> 4000ec40: c2 06 60 04 ld [ %i1 + 4 ], %g1 new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000ec44: c2 20 a0 04 st %g1, [ %g2 + 4 ] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4000ec48: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000ec4c: 80 a6 a0 00 cmp %i2, 0 4000ec50: 12 80 00 1d bne 4000ecc4 <_Thread_queue_Extract_priority_helper+0xb8> 4000ec54: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000ec58: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000ec5c: 80 a0 60 02 cmp %g1, 2 4000ec60: 02 80 00 1d be 4000ecd4 <_Thread_queue_Extract_priority_helper+0xc8> 4000ec64: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000ec68: 7f ff cc e4 call 40001ff8 4000ec6c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000ec70: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000ec74: 7f ff ed 14 call 4000a0c4 <_Thread_Clear_state> 4000ec78: 81 e8 00 00 restore previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4000ec7c: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000ec80: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000ec84: c6 20 a0 04 st %g3, [ %g2 + 4 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4000ec88: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000ec8c: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000ec90: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000ec94: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000ec98: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000ec9c: 80 a0 80 01 cmp %g2, %g1 4000eca0: 02 bf ff ec be 4000ec50 <_Thread_queue_Extract_priority_helper+0x44> 4000eca4: 80 a6 a0 00 cmp %i2, 0 /* > two threads on 2-n */ new_second_node->previous = 4000eca8: 82 00 e0 38 add %g3, 0x38, %g1 <== NOT EXECUTED 4000ecac: c2 21 20 04 st %g1, [ %g4 + 4 ] <== NOT EXECUTED _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000ecb0: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] <== NOT EXECUTED new_first_thread->Wait.Block2n.last = last_node; 4000ecb4: da 20 e0 40 st %o5, [ %g3 + 0x40 ] <== NOT EXECUTED last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000ecb8: 82 00 e0 3c add %g3, 0x3c, %g1 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000ecbc: 02 bf ff e7 be 4000ec58 <_Thread_queue_Extract_priority_helper+0x4c> <== NOT EXECUTED 4000ecc0: c2 23 40 00 st %g1, [ %o5 ] <== NOT EXECUTED _ISR_Enable( level ); 4000ecc4: 7f ff cc cd call 40001ff8 4000ecc8: 91 e8 00 08 restore %g0, %o0, %o0 Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000eccc: 7f ff cc cb call 40001ff8 <== NOT EXECUTED 4000ecd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000ecd4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000ecd8: 7f ff cc c8 call 40001ff8 4000ecdc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000ece0: 7f ff f3 3f call 4000b9dc <_Watchdog_Remove> 4000ece4: 90 06 20 48 add %i0, 0x48, %o0 4000ece8: b2 16 63 f8 or %i1, 0x3f8, %i1 4000ecec: 7f ff ec f6 call 4000a0c4 <_Thread_Clear_state> 4000ecf0: 81 e8 00 00 restore 4000ecf4: 01 00 00 00 nop 4000acd8 <_Thread_queue_Extract_with_proxy>: */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 4000acd8: 9d e3 bf 98 save %sp, -104, %sp States_Control state; Objects_Information *the_information; Objects_Thread_queue_Extract_callout proxy_extract_callout; state = the_thread->current_state; 4000acdc: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 4000ace0: a0 10 00 18 mov %i0, %l0 Objects_Information *the_information; Objects_Thread_queue_Extract_callout proxy_extract_callout; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 4000ace4: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ace8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000acec: 80 88 80 01 btst %g2, %g1 4000acf0: 02 80 00 1e be 4000ad68 <_Thread_queue_Extract_with_proxy+0x90> 4000acf4: b0 10 20 00 clr %i0 if ( _States_Is_waiting_for_rpc_reply( state ) && 4000acf8: 03 00 00 08 sethi %hi(0x2000), %g1 4000acfc: 80 88 80 01 btst %g2, %g1 4000ad00: 22 80 00 17 be,a 4000ad5c <_Thread_queue_Extract_with_proxy+0x84> 4000ad04: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 4000ad08: 03 00 00 e7 sethi %hi(0x39c00), %g1 <== NOT EXECUTED 4000ad0c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 39ee0 <== NOT EXECUTED 4000ad10: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 4000ad14: 22 80 00 12 be,a 4000ad5c <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 4000ad18: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED _States_Is_locally_blocked( state ) ) { the_information = _Objects_Get_information( the_thread->Wait.id ); 4000ad1c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED proxy_extract_callout = 4000ad20: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000ad24: 85 30 e0 16 srl %g3, 0x16, %g2 <== NOT EXECUTED 4000ad28: 82 10 61 40 or %g1, 0x140, %g1 <== NOT EXECUTED 4000ad2c: 84 08 a0 1c and %g2, 0x1c, %g2 <== NOT EXECUTED 4000ad30: c8 00 40 02 ld [ %g1 + %g2 ], %g4 <== NOT EXECUTED 4000ad34: 87 30 e0 1b srl %g3, 0x1b, %g3 <== NOT EXECUTED 4000ad38: 87 28 e0 02 sll %g3, 2, %g3 <== NOT EXECUTED 4000ad3c: c2 01 00 03 ld [ %g4 + %g3 ], %g1 <== NOT EXECUTED 4000ad40: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 <== NOT EXECUTED (Objects_Thread_queue_Extract_callout) the_information->extract; if ( proxy_extract_callout ) 4000ad44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ad48: 22 80 00 05 be,a 4000ad5c <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 4000ad4c: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED (*proxy_extract_callout)( the_thread ); 4000ad50: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ad54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000ad58: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED 4000ad5c: 92 10 00 10 mov %l0, %o1 4000ad60: 40 00 0f 9c call 4000ebd0 <_Thread_queue_Extract> 4000ad64: b0 10 20 01 mov 1, %i0 return TRUE; } return FALSE; } 4000ad68: 81 c7 e0 08 ret 4000ad6c: 81 e8 00 00 restore 4000d54c <_Thread_queue_First>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000d54c: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000d550: 80 a0 60 00 cmp %g1, 0 4000d554: 12 80 00 05 bne 4000d568 <_Thread_queue_First+0x1c> 4000d558: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_First_fifo( the_thread_queue ); 4000d55c: 82 13 c0 00 mov %o7, %g1 4000d560: 40 00 10 43 call 4001166c <_Thread_queue_First_fifo> 4000d564: 9e 10 40 00 mov %g1, %o7 Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000d568: 02 80 00 04 be 4000d578 <_Thread_queue_First+0x2c> 4000d56c: 01 00 00 00 nop the_thread = NULL; break; } return the_thread; } 4000d570: 81 c3 e0 08 retl <== NOT EXECUTED 4000d574: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED switch ( the_thread_queue->discipline ) { case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_First_fifo( the_thread_queue ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_First_priority( the_thread_queue ); 4000d578: 82 13 c0 00 mov %o7, %g1 4000d57c: 40 00 00 03 call 4000d588 <_Thread_queue_First_priority> 4000d580: 9e 10 40 00 mov %g1, %o7 4000d584: 01 00 00 00 nop 4000ad90 <_Thread_queue_Initialize>: uint32_t timeout_status ) { uint32_t index; the_thread_queue->state = state; 4000ad90: d4 22 20 38 st %o2, [ %o0 + 0x38 ] the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 4000ad94: d6 22 20 3c st %o3, [ %o0 + 0x3c ] the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; 4000ad98: c0 22 20 30 clr [ %o0 + 0x30 ] switch ( the_discipline ) { 4000ad9c: 80 a2 60 00 cmp %o1, 0 4000ada0: 12 80 00 07 bne 4000adbc <_Thread_queue_Initialize+0x2c> 4000ada4: d2 22 20 34 st %o1, [ %o0 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000ada8: 82 02 20 04 add %o0, 4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000adac: d0 22 20 08 st %o0, [ %o0 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000adb0: c0 22 20 04 clr [ %o0 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000adb4: 81 c3 e0 08 retl 4000adb8: c2 22 00 00 st %g1, [ %o0 ] 4000adbc: 80 a2 60 01 cmp %o1, 1 4000adc0: 02 80 00 04 be 4000add0 <_Thread_queue_Initialize+0x40> 4000adc4: 82 02 20 04 add %o0, 4, %g1 4000adc8: 81 c3 e0 08 retl <== NOT EXECUTED 4000adcc: 01 00 00 00 nop <== NOT EXECUTED 4000add0: 84 02 20 10 add %o0, 0x10, %g2 4000add4: c2 22 00 00 st %g1, [ %o0 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000add8: 82 02 20 0c add %o0, 0xc, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000addc: c4 22 20 0c st %g2, [ %o0 + 0xc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ade0: c2 22 20 14 st %g1, [ %o0 + 0x14 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000ade4: 84 02 20 1c add %o0, 0x1c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ade8: 82 02 20 18 add %o0, 0x18, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000adec: c4 22 20 18 st %g2, [ %o0 + 0x18 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000adf0: c2 22 20 20 st %g1, [ %o0 + 0x20 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000adf4: 84 02 20 28 add %o0, 0x28, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000adf8: 82 02 20 24 add %o0, 0x24, %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000adfc: c0 22 20 04 clr [ %o0 + 4 ] the_chain->last = _Chain_Head(the_chain); 4000ae00: d0 22 20 08 st %o0, [ %o0 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000ae04: c0 22 20 10 clr [ %o0 + 0x10 ] 4000ae08: c0 22 20 1c clr [ %o0 + 0x1c ] 4000ae0c: c0 22 20 28 clr [ %o0 + 0x28 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000ae10: c4 22 20 24 st %g2, [ %o0 + 0x24 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ae14: 81 c3 e0 08 retl 4000ae18: c2 22 20 2c st %g1, [ %o0 + 0x2c ] 4000ae1c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000ae1c: 9d e3 bf 98 save %sp, -104, %sp /* just in case the thread really wasn't blocked here */ if ( !the_thread_queue ) { 4000ae20: 80 a6 20 00 cmp %i0, 0 4000ae24: 02 80 00 06 be 4000ae3c <_Thread_queue_Requeue+0x20> 4000ae28: 01 00 00 00 nop return; } switch ( the_thread_queue->discipline ) { 4000ae2c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 4000ae30: 80 a4 20 01 cmp %l0, 1 4000ae34: 02 80 00 04 be 4000ae44 <_Thread_queue_Requeue+0x28> 4000ae38: 01 00 00 00 nop 4000ae3c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae40: 81 e8 00 00 restore <== NOT EXECUTED break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; _ISR_Disable( level ); 4000ae44: 7f ff dc 69 call 40001fe8 4000ae48: 01 00 00 00 nop 4000ae4c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000ae50: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000ae54: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ae58: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000ae5c: 80 88 80 01 btst %g2, %g1 4000ae60: 12 80 00 04 bne 4000ae70 <_Thread_queue_Requeue+0x54> 4000ae64: 94 10 20 01 mov 1, %o2 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); _Thread_queue_Enqueue_priority( tq, the_thread ); } _ISR_Enable( level ); 4000ae68: 7f ff dc 64 call 40001ff8 <== NOT EXECUTED 4000ae6c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 4000ae70: 90 10 00 18 mov %i0, %o0 4000ae74: 92 10 00 19 mov %i1, %o1 4000ae78: 40 00 0f 65 call 4000ec0c <_Thread_queue_Extract_priority_helper> 4000ae7c: e0 26 20 30 st %l0, [ %i0 + 0x30 ] _Thread_queue_Enqueue_priority( tq, the_thread ); 4000ae80: 90 10 00 18 mov %i0, %o0 4000ae84: 7f ff fe d6 call 4000a9dc <_Thread_queue_Enqueue_priority> 4000ae88: 92 10 00 19 mov %i1, %o1 } _ISR_Enable( level ); 4000ae8c: 7f ff dc 5b call 40001ff8 4000ae90: 91 e8 00 11 restore %g0, %l1, %o0 4000ae94: 01 00 00 00 nop 4000ae98 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 4000ae98: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000ae9c: 92 96 20 00 orcc %i0, 0, %o1 4000aea0: 12 80 00 1a bne 4000af08 <_Thread_queue_Timeout+0x70> 4000aea4: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000aea8: 31 10 00 6f sethi %hi(0x4001bc00), %i0 <== NOT EXECUTED 4000aeac: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000aeb0: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000aeb4: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000aeb8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000aebc: d2 00 62 bc ld [ %g1 + 0x2bc ], %o1 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000aec0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000aec4: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && 4000aec8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000aecc: 80 a0 e0 00 cmp %g3, 0 4000aed0: 02 80 00 06 be 4000aee8 <_Thread_queue_Timeout+0x50> 4000aed4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000aed8: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 4000aedc: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 4000aee0: 02 80 00 20 be 4000af60 <_Thread_queue_Timeout+0xc8> <== NOT EXECUTED 4000aee4: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000aee8: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000aeec: 40 00 0f 39 call 4000ebd0 <_Thread_queue_Extract> 4000aef0: c2 22 60 34 st %g1, [ %o1 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000aef4: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 4000aef8: 82 00 7f ff add %g1, -1, %g1 4000aefc: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] 4000af00: 81 c7 e0 08 ret 4000af04: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000af08: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000af0c: 80 a0 a0 04 cmp %g2, 4 4000af10: 18 bf ff fc bgu 4000af00 <_Thread_queue_Timeout+0x68> 4000af14: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000af18: 80 a0 60 01 cmp %g1, 1 4000af1c: 12 bf ff f9 bne 4000af00 <_Thread_queue_Timeout+0x68> 4000af20: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000af24: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000af28: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 4000af2c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000af30: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000af34: 80 a2 20 00 cmp %o0, 0 4000af38: 02 bf ff f2 be 4000af00 <_Thread_queue_Timeout+0x68> 4000af3c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000af40: 7f ff f7 ee call 40008ef8 <_Objects_Get> 4000af44: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000af48: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000af4c: 80 a0 60 00 cmp %g1, 0 4000af50: 12 bf ff ec bne 4000af00 <_Thread_queue_Timeout+0x68> 4000af54: 92 10 00 08 mov %o0, %o1 4000af58: 10 bf ff db b 4000aec4 <_Thread_queue_Timeout+0x2c> 4000af5c: 31 10 00 6f sethi %hi(0x4001bc00), %i0 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 4000af60: 02 bf ff e5 be 4000aef4 <_Thread_queue_Timeout+0x5c> <== NOT EXECUTED 4000af64: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 4000af68: 10 bf ff e3 b 4000aef4 <_Thread_queue_Timeout+0x5c> <== NOT EXECUTED 4000af6c: c2 22 20 30 st %g1, [ %o0 + 0x30 ] <== NOT EXECUTED 40014560 <_Timer_Server_body>: */ Thread _Timer_Server_body( uint32_t ignored ) { 40014560: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 40014564: 03 10 00 d8 sethi %hi(0x40036000), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40014568: 21 10 00 d7 sethi %hi(0x40035c00), %l0 4001456c: c6 00 60 74 ld [ %g1 + 0x74 ], %g3 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 40014570: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40014574: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 40014578: c8 00 a3 a8 ld [ %g2 + 0x3a8 ], %g4 /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 4001457c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40014580: 82 00 60 01 inc %g1 40014584: c6 20 a1 fc st %g3, [ %g2 + 0x1fc ] 40014588: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 4001458c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40014590: c8 20 a1 f8 st %g4, [ %g2 + 0x1f8 ] ! 40035df8 <_Timer_Server_seconds_last_time> RTEMS_COMPILER_MEMORY_BARRIER(); 40014594: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40014598: 05 10 00 d7 sethi %hi(0x40035c00), %g2 4001459c: ba 10 61 f0 or %g1, 0x1f0, %i5 400145a0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400145a4: 39 10 00 da sethi %hi(0x40036800), %i4 /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 400145a8: b4 10 a3 ec or %g2, 0x3ec, %i2 400145ac: ae 10 62 04 or %g1, 0x204, %l7 400145b0: 05 10 00 d7 sethi %hi(0x40035c00), %g2 400145b4: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400145b8: a6 10 a2 0c or %g2, 0x20c, %l3 400145bc: b6 10 63 e0 or %g1, 0x3e0, %i3 400145c0: 2d 10 00 d7 sethi %hi(0x40035c00), %l6 400145c4: 2b 10 00 d7 sethi %hi(0x40035c00), %l5 400145c8: a4 10 00 1c mov %i4, %l2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400145cc: a2 10 00 10 mov %l0, %l1 400145d0: 10 80 00 18 b 40014630 <_Timer_Server_body+0xd0> 400145d4: a8 10 00 13 mov %l3, %l4 _Timer_Server_reset_ticks_timer(); _Timer_Server_reset_seconds_timer(); 400145d8: 80 a0 40 17 cmp %g1, %l7 400145dc: 32 80 00 27 bne,a 40014678 <_Timer_Server_body+0x118> 400145e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 400145e4: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 400145e8: 82 00 7f ff add %g1, -1, %g1 400145ec: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] 400145f0: c4 04 22 f0 ld [ %l0 + 0x2f0 ], %g2 400145f4: 80 a0 a0 00 cmp %g2, 0 400145f8: 02 80 00 2b be 400146a4 <_Timer_Server_body+0x144> 400145fc: 01 00 00 00 nop * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 40014600: d0 04 a1 78 ld [ %l2 + 0x178 ], %o0 <== NOT EXECUTED 40014604: 40 00 14 3f call 40019700 <_Watchdog_Remove> 40014608: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_stop_seconds_timer(); 4001460c: 40 00 14 3d call 40019700 <_Watchdog_Remove> 40014610: 90 10 00 14 mov %l4, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40014614: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40014618: 82 00 60 01 inc %g1 4001461c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] * This ensures that the primary difference is that _ISR_Nest_level * is 0 for task-based timers and non-zero for the others. */ _Thread_Disable_dispatch(); _Timer_Server_process_ticks_chain(); 40014620: 7f ff ff bf call 4001451c <_Timer_Server_process_ticks_chain> 40014624: 01 00 00 00 nop _Timer_Server_process_seconds_chain(); 40014628: 7f ff ff a2 call 400144b0 <_Timer_Server_process_seconds_chain> 4001462c: 01 00 00 00 nop /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 40014630: d0 07 21 78 ld [ %i4 + 0x178 ], %o0 40014634: 40 00 10 de call 400189ac <_Thread_Set_state> 40014638: 92 10 20 08 mov 8, %o1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001463c: c2 05 a1 ec ld [ %l6 + 0x1ec ], %g1 _Timer_Server_reset_ticks_timer(); 40014640: 80 a0 40 1d cmp %g1, %i5 40014644: 22 bf ff e5 be,a 400145d8 <_Timer_Server_body+0x78> 40014648: c2 05 62 00 ld [ %l5 + 0x200 ], %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4001464c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40014650: d2 04 a1 78 ld [ %l2 + 0x178 ], %o1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40014654: 90 10 00 1a mov %i2, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014658: c2 22 60 54 st %g1, [ %o1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4001465c: 40 00 13 bf call 40019558 <_Watchdog_Insert> 40014660: 92 02 60 48 add %o1, 0x48, %o1 40014664: c2 05 62 00 ld [ %l5 + 0x200 ], %g1 _Timer_Server_reset_seconds_timer(); 40014668: 80 a0 40 17 cmp %g1, %l7 4001466c: 02 bf ff de be 400145e4 <_Timer_Server_body+0x84> 40014670: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014674: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40014678: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4001467c: c2 24 e0 0c st %g1, [ %l3 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40014680: 40 00 13 b6 call 40019558 <_Watchdog_Insert> <== NOT EXECUTED 40014684: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014688: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED 4001468c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014690: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] <== NOT EXECUTED 40014694: c4 04 22 f0 ld [ %l0 + 0x2f0 ], %g2 <== NOT EXECUTED 40014698: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001469c: 32 bf ff da bne,a 40014604 <_Timer_Server_body+0xa4> <== NOT EXECUTED 400146a0: d0 04 a1 78 ld [ %l2 + 0x178 ], %o0 <== NOT EXECUTED _Thread_Dispatch(); 400146a4: 40 00 0d 4f call 40017be0 <_Thread_Dispatch> 400146a8: 01 00 00 00 nop * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 400146ac: 10 bf ff d6 b 40014604 <_Timer_Server_body+0xa4> 400146b0: d0 04 a1 78 ld [ %l2 + 0x178 ], %o0 4001451c <_Timer_Server_process_ticks_chain>: void _Timer_Server_process_ticks_chain(void) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 4001451c: 03 10 00 d8 sethi %hi(0x40036000), %g1 if ( snapshot >= _Timer_Server_ticks_last_time ) 40014520: 07 10 00 d7 sethi %hi(0x40035c00), %g3 void _Timer_Server_process_ticks_chain(void) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 40014524: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 if ( snapshot >= _Timer_Server_ticks_last_time ) 40014528: c2 00 e1 fc ld [ %g3 + 0x1fc ], %g1 4001452c: 80 a0 80 01 cmp %g2, %g1 40014530: 1a 80 00 04 bcc 40014540 <_Timer_Server_process_ticks_chain+0x24> 40014534: 94 20 80 01 sub %g2, %g1, %o2 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 40014538: 82 38 00 01 xnor %g0, %g1, %g1 <== NOT EXECUTED 4001453c: 94 00 40 02 add %g1, %g2, %o2 <== NOT EXECUTED _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 40014540: 11 10 00 d7 sethi %hi(0x40035c00), %o0 if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 40014544: c4 20 e1 fc st %g2, [ %g3 + 0x1fc ] _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 40014548: 90 12 21 ec or %o0, 0x1ec, %o0 4001454c: 92 10 20 00 clr %o1 40014550: 82 13 c0 00 mov %o7, %g1 40014554: 40 00 13 d0 call 40019494 <_Watchdog_Adjust> 40014558: 9e 10 40 00 mov %g1, %o7 4001455c: 01 00 00 00 nop 4000d330 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000d330: 9d e3 bf 98 save %sp, -104, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d334: c2 06 40 00 ld [ %i1 ], %g1 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 4000d338: de 06 20 04 ld [ %i0 + 4 ], %o7 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d33c: 96 10 00 01 mov %g1, %o3 4000d340: 95 38 60 1f sra %g1, 0x1f, %o2 4000d344: 83 30 60 1d srl %g1, 0x1d, %g1 4000d348: 9b 2a e0 03 sll %o3, 3, %o5 4000d34c: 99 2a a0 03 sll %o2, 3, %o4 4000d350: 98 10 40 0c or %g1, %o4, %o4 4000d354: 83 33 60 1b srl %o5, 0x1b, %g1 4000d358: 85 2b 20 05 sll %o4, 5, %g2 4000d35c: 87 2b 60 05 sll %o5, 5, %g3 4000d360: 84 10 40 02 or %g1, %g2, %g2 4000d364: 86 a0 c0 0d subcc %g3, %o5, %g3 4000d368: 83 30 e0 1a srl %g3, 0x1a, %g1 4000d36c: 84 60 80 0c subx %g2, %o4, %g2 4000d370: 9b 28 e0 06 sll %g3, 6, %o5 4000d374: 99 28 a0 06 sll %g2, 6, %o4 4000d378: 9a a3 40 03 subcc %o5, %g3, %o5 4000d37c: 98 10 40 0c or %g1, %o4, %o4 4000d380: 98 63 00 02 subx %o4, %g2, %o4 4000d384: 9a 83 40 0b addcc %o5, %o3, %o5 4000d388: 83 33 60 1e srl %o5, 0x1e, %g1 4000d38c: 98 43 00 0a addx %o4, %o2, %o4 4000d390: 87 2b 60 02 sll %o5, 2, %g3 4000d394: 85 2b 20 02 sll %o4, 2, %g2 4000d398: 9a 83 40 03 addcc %o5, %g3, %o5 4000d39c: 84 10 40 02 or %g1, %g2, %g2 4000d3a0: 83 33 60 1e srl %o5, 0x1e, %g1 4000d3a4: 98 43 00 02 addx %o4, %g2, %o4 4000d3a8: 87 2b 60 02 sll %o5, 2, %g3 4000d3ac: 85 2b 20 02 sll %o4, 2, %g2 4000d3b0: 9a 83 40 03 addcc %o5, %g3, %o5 4000d3b4: 84 10 40 02 or %g1, %g2, %g2 4000d3b8: 83 33 60 1e srl %o5, 0x1e, %g1 4000d3bc: 98 43 00 02 addx %o4, %g2, %o4 4000d3c0: 85 2b 20 02 sll %o4, 2, %g2 4000d3c4: 84 10 40 02 or %g1, %g2, %g2 right += rhs->tv_nsec; 4000d3c8: c2 06 60 04 ld [ %i1 + 4 ], %g1 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d3cc: 87 2b 60 02 sll %o5, 2, %g3 4000d3d0: 9a 83 40 03 addcc %o5, %g3, %o5 right += rhs->tv_nsec; 4000d3d4: 95 38 60 1f sra %g1, 0x1f, %o2 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d3d8: 98 43 00 02 addx %o4, %g2, %o4 4000d3dc: 89 33 60 17 srl %o5, 0x17, %g4 4000d3e0: 85 2b 20 09 sll %o4, 9, %g2 4000d3e4: 87 2b 60 09 sll %o5, 9, %g3 4000d3e8: 84 11 00 02 or %g4, %g2, %g2 right += rhs->tv_nsec; 4000d3ec: 96 80 c0 01 addcc %g3, %g1, %o3 4000d3f0: 94 40 80 0a addx %g2, %o2, %o2 if ( right == 0 ) { 4000d3f4: 80 92 80 0b orcc %o2, %o3, %g0 4000d3f8: 12 80 00 06 bne 4000d410 <_Timespec_Divide+0xe0> 4000d3fc: f0 06 00 00 ld [ %i0 ], %i0 *ival_percentage = 0; 4000d400: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000d404: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000d408: 81 c7 e0 08 ret <== NOT EXECUTED 4000d40c: 81 e8 00 00 restore <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d410: 83 36 20 1d srl %i0, 0x1d, %g1 4000d414: 9b 2e 20 03 sll %i0, 3, %o5 4000d418: 91 3e 20 1f sra %i0, 0x1f, %o0 4000d41c: 99 2a 20 03 sll %o0, 3, %o4 4000d420: 98 10 40 0c or %g1, %o4, %o4 4000d424: 83 33 60 1b srl %o5, 0x1b, %g1 4000d428: 85 2b 20 05 sll %o4, 5, %g2 4000d42c: 87 2b 60 05 sll %o5, 5, %g3 4000d430: 84 10 40 02 or %g1, %g2, %g2 4000d434: 86 a0 c0 0d subcc %g3, %o5, %g3 4000d438: 83 30 e0 1a srl %g3, 0x1a, %g1 4000d43c: 84 60 80 0c subx %g2, %o4, %g2 4000d440: 9b 28 e0 06 sll %g3, 6, %o5 4000d444: 99 28 a0 06 sll %g2, 6, %o4 4000d448: 9a a3 40 03 subcc %o5, %g3, %o5 4000d44c: 98 10 40 0c or %g1, %o4, %o4 4000d450: 98 63 00 02 subx %o4, %g2, %o4 4000d454: 9a 83 40 18 addcc %o5, %i0, %o5 4000d458: 83 33 60 1e srl %o5, 0x1e, %g1 4000d45c: 98 43 00 08 addx %o4, %o0, %o4 4000d460: 87 2b 60 02 sll %o5, 2, %g3 4000d464: 85 2b 20 02 sll %o4, 2, %g2 4000d468: 9a 83 40 03 addcc %o5, %g3, %o5 4000d46c: 84 10 40 02 or %g1, %g2, %g2 4000d470: 83 33 60 1e srl %o5, 0x1e, %g1 4000d474: 98 43 00 02 addx %o4, %g2, %o4 4000d478: 87 2b 60 02 sll %o5, 2, %g3 4000d47c: 85 2b 20 02 sll %o4, 2, %g2 4000d480: 9a 83 40 03 addcc %o5, %g3, %o5 4000d484: 84 10 40 02 or %g1, %g2, %g2 4000d488: 83 33 60 1e srl %o5, 0x1e, %g1 4000d48c: 98 43 00 02 addx %o4, %g2, %o4 4000d490: 87 2b 60 02 sll %o5, 2, %g3 4000d494: 85 2b 20 02 sll %o4, 2, %g2 4000d498: 9a 83 40 03 addcc %o5, %g3, %o5 4000d49c: 84 10 40 02 or %g1, %g2, %g2 4000d4a0: 83 33 60 17 srl %o5, 0x17, %g1 4000d4a4: 98 43 00 02 addx %o4, %g2, %o4 4000d4a8: 93 2b 60 09 sll %o5, 9, %o1 4000d4ac: 91 2b 20 09 sll %o4, 9, %o0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000d4b0: 92 82 40 0f addcc %o1, %o7, %o1 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d4b4: 90 10 40 08 or %g1, %o0, %o0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000d4b8: 83 32 60 1e srl %o1, 0x1e, %g1 4000d4bc: a1 3b e0 1f sra %o7, 0x1f, %l0 4000d4c0: 87 2a 60 02 sll %o1, 2, %g3 4000d4c4: 90 42 00 10 addx %o0, %l0, %o0 4000d4c8: 85 2a 20 02 sll %o0, 2, %g2 4000d4cc: 84 10 40 02 or %g1, %g2, %g2 4000d4d0: 83 30 e0 1b srl %g3, 0x1b, %g1 4000d4d4: 99 28 a0 05 sll %g2, 5, %o4 4000d4d8: 9b 28 e0 05 sll %g3, 5, %o5 4000d4dc: 98 10 40 0c or %g1, %o4, %o4 4000d4e0: 9a a3 40 03 subcc %o5, %g3, %o5 4000d4e4: 98 63 00 02 subx %o4, %g2, %o4 4000d4e8: 9a 83 40 09 addcc %o5, %o1, %o5 4000d4ec: 83 33 60 1e srl %o5, 0x1e, %g1 4000d4f0: 98 43 00 08 addx %o4, %o0, %o4 4000d4f4: 87 2b 60 02 sll %o5, 2, %g3 4000d4f8: 85 2b 20 02 sll %o4, 2, %g2 4000d4fc: 9a 83 40 03 addcc %o5, %g3, %o5 4000d500: 84 10 40 02 or %g1, %g2, %g2 4000d504: 83 33 60 1e srl %o5, 0x1e, %g1 4000d508: 87 2b 60 02 sll %o5, 2, %g3 4000d50c: 98 43 00 02 addx %o4, %g2, %o4 4000d510: 9a 83 40 03 addcc %o5, %g3, %o5 4000d514: 85 2b 20 02 sll %o4, 2, %g2 4000d518: 84 10 40 02 or %g1, %g2, %g2 4000d51c: 83 33 60 1b srl %o5, 0x1b, %g1 4000d520: 98 43 00 02 addx %o4, %g2, %o4 4000d524: 93 2b 60 05 sll %o5, 5, %o1 4000d528: 91 2b 20 05 sll %o4, 5, %o0 4000d52c: 40 00 36 56 call 4001ae84 <__udivdi3> 4000d530: 90 10 40 08 or %g1, %o0, %o0 *ival_percentage = answer / 1000; 4000d534: 94 10 20 00 clr %o2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000d538: a0 10 00 08 mov %o0, %l0 4000d53c: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000d540: 96 10 23 e8 mov 0x3e8, %o3 4000d544: 40 00 36 50 call 4001ae84 <__udivdi3> 4000d548: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000d54c: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000d550: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000d554: 94 10 20 00 clr %o2 4000d558: 92 10 00 11 mov %l1, %o1 4000d55c: 40 00 37 29 call 4001b200 <__umoddi3> 4000d560: 96 10 23 e8 mov 0x3e8, %o3 4000d564: d2 26 c0 00 st %o1, [ %i3 ] 4000d568: 81 c7 e0 08 ret 4000d56c: 81 e8 00 00 restore 4000b64c <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, boolean is_internal, uint32_t the_error ) { 4000b64c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 4000b650: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b654: 82 10 60 64 or %g1, 0x64, %g1 ! 4001c064 <_User_extensions_List> 4000b658: e0 00 60 08 ld [ %g1 + 8 ], %l0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 4000b65c: 80 a4 00 01 cmp %l0, %g1 4000b660: 02 80 00 0d be 4000b694 <_User_extensions_Fatal+0x48> 4000b664: a2 10 00 01 mov %g1, %l1 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 4000b668: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000b66c: 80 a0 60 00 cmp %g1, 0 4000b670: 02 80 00 05 be 4000b684 <_User_extensions_Fatal+0x38> 4000b674: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 4000b678: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b67c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b680: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 4000b684: e0 04 20 04 ld [ %l0 + 4 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 4000b688: 80 a4 00 11 cmp %l0, %l1 4000b68c: 32 bf ff f8 bne,a 4000b66c <_User_extensions_Fatal+0x20> 4000b690: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000b694: 81 c7 e0 08 ret 4000b698: 81 e8 00 00 restore 400128f4 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 400128f4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _Chain_Extract( &the_extension->Node ); 400128f8: 40 00 14 87 call 40017b14 <_Chain_Extract> <== NOT EXECUTED 400128fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 40012900: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40012904: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012908: 02 80 00 04 be 40012918 <_User_extensions_Remove_set+0x24> <== NOT EXECUTED 4001290c: 01 00 00 00 nop <== NOT EXECUTED _Chain_Extract( &the_extension->Switch.Node ); 40012910: 40 00 14 81 call 40017b14 <_Chain_Extract> <== NOT EXECUTED 40012914: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 40012918: 81 c7 e0 08 ret <== NOT EXECUTED 4001291c: 81 e8 00 00 restore <== NOT EXECUTED 4000b6e8 <_User_extensions_Thread_create>: */ boolean _User_extensions_Thread_create ( Thread_Control *the_thread ) { 4000b6e8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; 4000b6ec: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b6f0: e0 00 60 64 ld [ %g1 + 0x64 ], %l0 ! 4001c064 <_User_extensions_List> 4000b6f4: 82 10 60 64 or %g1, 0x64, %g1 4000b6f8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 4000b6fc: 80 a4 00 11 cmp %l0, %l1 4000b700: 02 80 00 0f be 4000b73c <_User_extensions_Thread_create+0x54> 4000b704: 25 10 00 6f sethi %hi(0x4001bc00), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 4000b708: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 4000b70c: 80 a0 60 00 cmp %g1, 0 4000b710: 02 80 00 07 be 4000b72c <_User_extensions_Thread_create+0x44> 4000b714: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 4000b718: 9f c0 40 00 call %g1 4000b71c: d0 04 a2 bc ld [ %l2 + 0x2bc ], %o0 _Thread_Executing, the_thread ); if ( !status ) 4000b720: 80 a2 20 00 cmp %o0, 0 4000b724: 02 80 00 08 be 4000b744 <_User_extensions_Thread_create+0x5c> 4000b728: 01 00 00 00 nop User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4000b72c: e0 04 00 00 ld [ %l0 ], %l0 Chain_Node *the_node; User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 4000b730: 80 a4 00 11 cmp %l0, %l1 4000b734: 32 bf ff f6 bne,a 4000b70c <_User_extensions_Thread_create+0x24> 4000b738: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 4000b73c: 81 c7 e0 08 ret 4000b740: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 4000b744: 81 c7 e0 08 ret <== NOT EXECUTED 4000b748: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000b834 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4000b834: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4000b838: 03 10 00 6f sethi %hi(0x4001bc00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4000b83c: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4000b840: e6 00 62 a4 ld [ %g1 + 0x2a4 ], %l3 _ISR_Disable( level ); 4000b844: 7f ff d9 e9 call 40001fe8 4000b848: 01 00 00 00 nop 4000b84c: b0 10 00 08 mov %o0, %i0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 4000b850: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000b854: 80 a0 60 00 cmp %g1, 0 4000b858: 12 80 00 49 bne 4000b97c <_Watchdog_Insert+0x148> 4000b85c: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4000b860: 2b 10 00 6f sethi %hi(0x4001bc00), %l5 4000b864: c2 05 63 60 ld [ %l5 + 0x360 ], %g1 ! 4001bf60 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4000b868: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 4000b86c: 82 00 60 01 inc %g1 4000b870: 29 10 00 6f sethi %hi(0x4001bc00), %l4 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4000b874: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 4000b878: c2 25 63 60 st %g1, [ %l5 + 0x360 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4000b87c: ae 10 00 14 mov %l4, %l7 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000b880: e4 06 60 0c ld [ %i1 + 0xc ], %l2 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 4000b884: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4000b888: 80 a4 a0 00 cmp %l2, 0 4000b88c: 02 80 00 2b be 4000b938 <_Watchdog_Insert+0x104> 4000b890: 03 10 00 6f sethi %hi(0x4001bc00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000b894: c2 04 40 00 ld [ %l1 ], %g1 4000b898: 80 a0 60 00 cmp %g1, 0 4000b89c: 02 80 00 27 be 4000b938 <_Watchdog_Insert+0x104> 4000b8a0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 break; if ( delta_interval < after->delta_interval ) { 4000b8a4: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 4000b8a8: 80 a4 80 10 cmp %l2, %l0 4000b8ac: 1a 80 00 13 bcc 4000b8f8 <_Watchdog_Insert+0xc4> 4000b8b0: 01 00 00 00 nop after->delta_interval -= delta_interval; 4000b8b4: 10 80 00 1f b 4000b930 <_Watchdog_Insert+0xfc> 4000b8b8: a0 24 00 12 sub %l0, %l2, %l0 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4000b8bc: c2 05 22 b8 ld [ %l4 + 0x2b8 ], %g1 4000b8c0: 80 a4 c0 01 cmp %l3, %g1 4000b8c4: 0a 80 00 30 bcs 4000b984 <_Watchdog_Insert+0x150> 4000b8c8: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4000b8cc: a4 a4 80 10 subcc %l2, %l0, %l2 4000b8d0: 02 80 00 19 be 4000b934 <_Watchdog_Insert+0x100> 4000b8d4: e2 04 40 00 ld [ %l1 ], %l1 4000b8d8: c2 04 40 00 ld [ %l1 ], %g1 4000b8dc: 80 a0 60 00 cmp %g1, 0 4000b8e0: 02 80 00 16 be 4000b938 <_Watchdog_Insert+0x104> 4000b8e4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 break; if ( delta_interval < after->delta_interval ) { 4000b8e8: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 4000b8ec: 80 a4 00 12 cmp %l0, %l2 4000b8f0: 38 80 00 10 bgu,a 4000b930 <_Watchdog_Insert+0xfc> 4000b8f4: a0 24 00 12 sub %l0, %l2, %l0 * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 4000b8f8: 7f ff d9 c0 call 40001ff8 4000b8fc: 90 10 00 18 mov %i0, %o0 4000b900: 7f ff d9 ba call 40001fe8 4000b904: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4000b908: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000b90c: 80 a0 60 01 cmp %g1, 1 4000b910: 02 bf ff eb be 4000b8bc <_Watchdog_Insert+0x88> 4000b914: 01 00 00 00 nop _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4000b918: e6 25 22 b8 st %l3, [ %l4 + 0x2b8 ] <== NOT EXECUTED _Watchdog_Sync_count--; 4000b91c: c2 05 63 60 ld [ %l5 + 0x360 ], %g1 <== NOT EXECUTED 4000b920: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b924: c2 25 63 60 st %g1, [ %l5 + 0x360 ] <== NOT EXECUTED _ISR_Enable( level ); 4000b928: 7f ff d9 b4 call 40001ff8 <== NOT EXECUTED 4000b92c: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 4000b930: e0 24 60 10 st %l0, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000b934: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b938: c6 00 63 64 ld [ %g1 + 0x364 ], %g3 ! 4001bf64 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 4000b93c: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000b940: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 4000b944: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4000b948: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4000b94c: c8 00 80 00 ld [ %g2 ], %g4 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4000b950: e6 25 22 b8 st %l3, [ %l4 + 0x2b8 ] 4000b954: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 4000b958: c2 05 63 60 ld [ %l5 + 0x360 ], %g1 after_node->next = the_node; 4000b95c: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4000b960: c4 26 60 04 st %g2, [ %i1 + 4 ] 4000b964: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 4000b968: f2 21 20 04 st %i1, [ %g4 + 4 ] Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; 4000b96c: c8 26 40 00 st %g4, [ %i1 ] 4000b970: c2 25 63 60 st %g1, [ %l5 + 0x360 ] _ISR_Enable( level ); 4000b974: 7f ff d9 a1 call 40001ff8 4000b978: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 4000b97c: 7f ff d9 9f call 40001ff8 <== NOT EXECUTED 4000b980: 81 e8 00 00 restore <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 4000b984: e6 25 e2 b8 st %l3, [ %l7 + 0x2b8 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000b988: 10 bf ff bf b 4000b884 <_Watchdog_Insert+0x50> 4000b98c: e4 06 60 0c ld [ %i1 + 0xc ], %l2 4000c7ac <_Watchdog_Insert_ticks_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000c7ac: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000c7b0: 40 00 18 b1 call 40012a74 <_Watchdog_Remove> 4000c7b4: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000c7b8: 7f ff e8 b2 call 40006a80 4000c7bc: 01 00 00 00 nop 4000c7c0: a0 10 00 08 mov %o0, %l0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 4000c7c4: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000c7c8: 80 a0 60 00 cmp %g1, 0 4000c7cc: 22 80 00 06 be,a 4000c7e4 <_Watchdog_Insert_ticks_helper+0x38> 4000c7d0: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 4000c7d4: 7f ff e8 af call 40006a90 <== NOT EXECUTED 4000c7d8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000c7dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000c7e0: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000c7e4: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000c7e8: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000c7ec: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000c7f0: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000c7f4: 92 10 00 18 mov %i0, %o1 4000c7f8: 11 10 00 9c sethi %hi(0x40027000), %o0 4000c7fc: 40 00 18 34 call 400128cc <_Watchdog_Insert> 4000c800: 90 12 23 8c or %o0, 0x38c, %o0 ! 4002738c <_Watchdog_Ticks_chain> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 4000c804: b0 10 20 01 mov 1, %i0 4000c808: 7f ff e8 a2 call 40006a90 4000c80c: 90 10 00 10 mov %l0, %o0 return TRUE; } 4000c810: 81 c7 e0 08 ret 4000c814: 81 e8 00 00 restore 4000b9dc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4000b9dc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000b9e0: 7f ff d9 82 call 40001fe8 4000b9e4: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 4000b9e8: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 4000b9ec: 80 a6 20 01 cmp %i0, 1 4000b9f0: 02 80 00 2a be 4000ba98 <_Watchdog_Remove+0xbc> 4000b9f4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b9f8: 1a 80 00 09 bcc 4000ba1c <_Watchdog_Remove+0x40> 4000b9fc: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000ba00: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ba04: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 4001bf64 <_Watchdog_Ticks_since_boot> 4000ba08: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000ba0c: 7f ff d9 7b call 40001ff8 4000ba10: 01 00 00 00 nop return( previous_state ); } 4000ba14: 81 c7 e0 08 ret 4000ba18: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4000ba1c: 18 bf ff fa bgu 4000ba04 <_Watchdog_Remove+0x28> 4000ba20: 03 10 00 6f sethi %hi(0x4001bc00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000ba24: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000ba28: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000ba2c: c2 01 00 00 ld [ %g4 ], %g1 4000ba30: 80 a0 60 00 cmp %g1, 0 4000ba34: 02 80 00 07 be 4000ba50 <_Watchdog_Remove+0x74> 4000ba38: 03 10 00 6f sethi %hi(0x4001bc00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000ba3c: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 4000ba40: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 4000ba44: 82 00 40 02 add %g1, %g2, %g1 4000ba48: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 4000ba4c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ba50: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001bf60 <_Watchdog_Sync_count> 4000ba54: 80 a0 a0 00 cmp %g2, 0 4000ba58: 22 80 00 07 be,a 4000ba74 <_Watchdog_Remove+0x98> 4000ba5c: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 4000ba60: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000ba64: c6 00 62 a4 ld [ %g1 + 0x2a4 ], %g3 ! 4001bea4 <_ISR_Nest_level> <== NOT EXECUTED 4000ba68: 05 10 00 6f sethi %hi(0x4001bc00), %g2 <== NOT EXECUTED 4000ba6c: c6 20 a2 b8 st %g3, [ %g2 + 0x2b8 ] ! 4001beb8 <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000ba70: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000ba74: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000ba78: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000ba7c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ba80: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 4001bf64 <_Watchdog_Ticks_since_boot> 4000ba84: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000ba88: 7f ff d9 5c call 40001ff8 4000ba8c: 01 00 00 00 nop return( previous_state ); } 4000ba90: 81 c7 e0 08 ret 4000ba94: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000ba98: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 <== NOT EXECUTED /* * 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; 4000ba9c: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000baa0: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 4000baa4: 7f ff d9 55 call 40001ff8 <== NOT EXECUTED 4000baa8: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 4000baac: 81 c7 e0 08 ret <== NOT EXECUTED 4000bab0: 81 e8 00 00 restore <== NOT EXECUTED 4000bb60 <_Workspace_Allocate_or_fatal_error>: */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 4000bb60: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4000bb64: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000bb68: 92 10 00 18 mov %i0, %o1 4000bb6c: 7f ff f2 33 call 40008438 <_Heap_Allocate> 4000bb70: 90 12 22 2c or %o0, 0x22c, %o0 void *memory; memory = _Workspace_Allocate( size ); if ( memory == NULL ) 4000bb74: b0 92 20 00 orcc %o0, 0, %i0 4000bb78: 12 80 00 04 bne 4000bb88 <_Workspace_Allocate_or_fatal_error+0x28> 4000bb7c: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 4000bb80: 7f ff f3 60 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000bb84: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED TRUE, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 4000bb88: 81 c7 e0 08 ret 4000bb8c: 81 e8 00 00 restore 4000bb90 <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000bb90: 9d e3 bf 98 save %sp, -104, %sp uint32_t *zero_out_array; uint32_t index; uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 4000bb94: 80 a6 20 00 cmp %i0, 0 4000bb98: 02 80 00 1d be 4000bc0c <_Workspace_Handler_initialization+0x7c> 4000bb9c: 80 8e 20 07 btst 7, %i0 4000bba0: 12 80 00 1c bne 4000bc10 <_Workspace_Handler_initialization+0x80> 4000bba4: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { 4000bba8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000bbac: c4 00 62 04 ld [ %g1 + 0x204 ], %g2 ! 4001be04 <_CPU_Table+0x10> 4000bbb0: 80 a0 a0 00 cmp %g2, 0 4000bbb4: 02 80 00 0c be 4000bbe4 <_Workspace_Handler_initialization+0x54> 4000bbb8: 92 10 00 18 mov %i0, %o1 for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; 4000bbbc: 87 36 60 02 srl %i1, 2, %g3 <== NOT EXECUTED 4000bbc0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000bbc4: 02 80 00 08 be 4000bbe4 <_Workspace_Handler_initialization+0x54> <== NOT EXECUTED 4000bbc8: 84 10 20 00 clr %g2 <== NOT EXECUTED index++ ) zero_out_array[ index ] = 0; 4000bbcc: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED ); if ( _CPU_Table.do_zero_of_workspace ) { for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; index++ ) 4000bbd0: 84 00 a0 01 inc %g2 <== NOT EXECUTED INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; 4000bbd4: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000bbd8: 12 bf ff fd bne 4000bbcc <_Workspace_Handler_initialization+0x3c> <== NOT EXECUTED 4000bbdc: c0 20 40 18 clr [ %g1 + %i0 ] <== NOT EXECUTED index++ ) zero_out_array[ index ] = 0; } memory_available = _Heap_Initialize( 4000bbe0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000bbe4: 94 10 00 19 mov %i1, %o2 4000bbe8: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000bbec: 96 10 20 08 mov 8, %o3 4000bbf0: 7f ff f2 f7 call 400087cc <_Heap_Initialize> 4000bbf4: 90 12 22 2c or %o0, 0x22c, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000bbf8: 80 a2 20 00 cmp %o0, 0 4000bbfc: 02 80 00 0a be 4000bc24 <_Workspace_Handler_initialization+0x94> 4000bc00: b0 10 20 00 clr %i0 4000bc04: 81 c7 e0 08 ret 4000bc08: 81 e8 00 00 restore uint32_t *zero_out_array; uint32_t index; uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 4000bc0c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000bc10: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000bc14: 7f ff f3 3b call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000bc18: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { 4000bc1c: 10 bf ff e4 b 4000bbac <_Workspace_Handler_initialization+0x1c> <== NOT EXECUTED 4000bc20: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4000bc24: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED 4000bc28: 7f ff f3 36 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000bc2c: 95 e8 20 03 restore %g0, 3, %o2 <== NOT EXECUTED 4000bc30: 01 00 00 00 nop 40026f20 <_kill_r>: struct _reent *ptr, pid_t pid, int sig ) { return kill( pid, sig ); 40026f20: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40026f24: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40026f28: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40026f2c: 7f ff ff f8 call 40026f0c <== NOT EXECUTED 40026f30: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40026f34: 01 00 00 00 nop 40007458 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 40007458: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 4000745c: 90 96 60 00 orcc %i1, 0, %o0 40007460: 02 80 00 1d be 400074d4 40007464: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 40007468: 02 80 00 09 be 4000748c 4000746c: 01 00 00 00 nop 40007470: 08 80 00 0b bleu 4000749c 40007474: 80 a6 20 01 cmp %i0, 1 40007478: 80 a6 20 03 cmp %i0, 3 <== NOT EXECUTED 4000747c: 02 80 00 14 be 400074cc <== NOT EXECUTED 40007480: 80 a6 20 04 cmp %i0, 4 <== NOT EXECUTED 40007484: 12 80 00 08 bne 400074a4 <== NOT EXECUTED 40007488: 01 00 00 00 nop <== NOT EXECUTED break; #endif #ifdef _POSIX_CPUTIME case CLOCK_PROCESS_CPUTIME: _TOD_Get_uptime(tp); 4000748c: 40 00 0b 87 call 4000a2a8 <_TOD_Get_uptime> <== NOT EXECUTED 40007490: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED 40007494: 81 c7 e0 08 ret <== NOT EXECUTED 40007498: 81 e8 00 00 restore <== NOT EXECUTED ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 4000749c: 02 80 00 08 be 400074bc 400074a0: 01 00 00 00 nop case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 400074a4: 40 00 29 a7 call 40011b40 <__errno> <== NOT EXECUTED 400074a8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400074ac: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400074b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 400074b4: 81 c7 e0 08 ret <== NOT EXECUTED 400074b8: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { case CLOCK_REALTIME: _TOD_Get(tp); 400074bc: 40 00 0b 62 call 4000a244 <_TOD_Get> 400074c0: b0 10 20 00 clr %i0 400074c4: 81 c7 e0 08 ret 400074c8: 81 e8 00 00 restore break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 400074cc: 40 00 03 56 call 40008224 <== NOT EXECUTED 400074d0: 81 e8 00 00 restore <== NOT EXECUTED clockid_t clock_id, struct timespec *tp ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); 400074d4: 40 00 29 9b call 40011b40 <__errno> <== NOT EXECUTED 400074d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400074dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400074e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400074e4: 81 c7 e0 08 ret <== NOT EXECUTED 400074e8: 81 e8 00 00 restore <== NOT EXECUTED 400074ec : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 400074ec: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 400074f0: 90 96 60 00 orcc %i1, 0, %o0 400074f4: 02 80 00 26 be 4000758c 400074f8: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 400074fc: 02 80 00 22 be 40007584 40007500: 80 a6 20 03 cmp %i0, 3 40007504: 02 80 00 20 be 40007584 40007508: 80 a6 20 01 cmp %i0, 1 4000750c: 22 80 00 08 be,a 4000752c 40007510: c4 02 00 00 ld [ %o0 ], %g2 case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 40007514: 40 00 29 8b call 40011b40 <__errno> 40007518: b0 10 3f ff mov -1, %i0 4000751c: 82 10 20 16 mov 0x16, %g1 40007520: c2 22 00 00 st %g1, [ %o0 ] } return 0; } 40007524: 81 c7 e0 08 ret 40007528: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { case CLOCK_REALTIME: if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 4000752c: 03 08 76 b9 sethi %hi(0x21dae400), %g1 40007530: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 40007534: 80 a0 80 01 cmp %g2, %g1 40007538: 08 80 00 15 bleu 4000758c 4000753c: 21 10 00 7f sethi %hi(0x4001fc00), %l0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007540: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 ! 4001fd00 <_Thread_Dispatch_disable_level> 40007544: 82 00 60 01 inc %g1 40007548: c2 24 21 00 st %g1, [ %l0 + 0x100 ] rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 4000754c: 40 00 0b 7f call 4000a348 <_TOD_Set> 40007550: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007554: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 40007558: b0 10 20 00 clr %i0 4000755c: 82 00 7f ff add %g1, -1, %g1 40007560: c2 24 21 00 st %g1, [ %l0 + 0x100 ] 40007564: c4 04 21 00 ld [ %l0 + 0x100 ], %g2 40007568: 80 a0 a0 00 cmp %g2, 0 4000756c: 12 80 00 0c bne 4000759c 40007570: 01 00 00 00 nop _Thread_Dispatch(); 40007574: 40 00 13 5d call 4000c2e8 <_Thread_Dispatch> 40007578: 01 00 00 00 nop 4000757c: 81 c7 e0 08 ret 40007580: 81 e8 00 00 restore break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 40007584: 40 00 03 28 call 40008224 <== NOT EXECUTED 40007588: 81 e8 00 00 restore <== NOT EXECUTED switch ( clock_id ) { case CLOCK_REALTIME: if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000758c: 40 00 29 6d call 40011b40 <__errno> <== NOT EXECUTED 40007590: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007594: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40007598: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000759c: 81 c7 e0 08 ret <== NOT EXECUTED 400075a0: 81 e8 00 00 restore <== NOT EXECUTED 40027024 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40027024: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40027028: 7f ff ff 11 call 40026c6c 4002702c: 01 00 00 00 nop 40027030: 80 a2 00 18 cmp %o0, %i0 40027034: 12 80 00 ca bne 4002735c 40027038: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 4002703c: 02 80 00 ce be 40027374 40027040: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40027044: 90 06 7f ff add %i1, -1, %o0 40027048: 80 a2 20 1f cmp %o0, 0x1f 4002704c: 18 80 00 ca bgu 40027374 40027050: 03 10 00 b8 sethi %hi(0x4002e000), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40027054: a5 2e 60 02 sll %i1, 2, %l2 40027058: ac 10 62 48 or %g1, 0x248, %l6 4002705c: a7 2e 60 04 sll %i1, 4, %l3 40027060: 82 24 c0 12 sub %l3, %l2, %g1 40027064: 82 00 40 16 add %g1, %l6, %g1 40027068: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002706c: 80 a0 a0 01 cmp %g2, 1 40027070: 02 80 00 4f be 400271ac 40027074: 80 a6 60 0b cmp %i1, 0xb * 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. */ switch ( sig ) { 40027078: 18 80 00 0c bgu 400270a8 4002707c: 82 10 20 01 mov 1, %g1 40027080: 83 28 40 19 sll %g1, %i1, %g1 <== NOT EXECUTED 40027084: 80 88 69 10 btst 0x910, %g1 <== NOT EXECUTED 40027088: 02 80 00 08 be 400270a8 <== NOT EXECUTED 4002708c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED case SIGFPE: case SIGILL: case SIGSEGV: return pthread_kill( pthread_self(), sig ); 40027090: 40 00 01 75 call 40027664 <== NOT EXECUTED 40027094: 01 00 00 00 nop <== NOT EXECUTED 40027098: 40 00 01 25 call 4002752c <== NOT EXECUTED 4002709c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400270a0: 81 c7 e0 08 ret 400270a4: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 400270a8: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 400270ac: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 400270b0: 80 a6 a0 00 cmp %i2, 0 400270b4: 02 80 00 46 be 400271cc 400270b8: b1 28 40 08 sll %g1, %o0, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 400270bc: c2 06 80 00 ld [ %i2 ], %g1 400270c0: c2 27 bf f4 st %g1, [ %fp + -12 ] 400270c4: 35 10 00 b6 sethi %hi(0x4002d800), %i2 400270c8: c2 06 a3 30 ld [ %i2 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 400270cc: 82 00 60 01 inc %g1 400270d0: c2 26 a3 30 st %g1, [ %i2 + 0x330 ] /* * 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; 400270d4: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 400270d8: c6 00 60 0c ld [ %g1 + 0xc ], %g3 ! 4002dc0c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 400270dc: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 400270e0: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 400270e4: 80 ae 00 01 andncc %i0, %g1, %g0 400270e8: 12 80 00 1a bne 40027150 400270ec: 03 10 00 b8 sethi %hi(0x4002e000), %g1 goto process_it; 400270f0: 98 10 63 d4 or %g1, 0x3d4, %o4 ! 4002e3d4 <_POSIX_signals_Wait_queue> */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400270f4: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 400270f8: c8 03 00 00 ld [ %o4 ], %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400270fc: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 40027100: 80 a1 00 0d cmp %g4, %o5 40027104: 02 80 00 34 be 400271d4 40027108: 86 10 00 04 mov %g4, %g3 the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 4002710c: c2 01 20 30 ld [ %g4 + 0x30 ], %g1 40027110: 80 8e 00 01 btst %i0, %g1 40027114: 02 80 00 0b be 40027140 40027118: c4 01 21 70 ld [ %g4 + 0x170 ], %g2 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 4002711c: 10 80 00 0e b 40027154 40027120: 82 10 20 01 mov 1, %g1 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 40027124: 80 a1 00 0d cmp %g4, %o5 <== NOT EXECUTED 40027128: 02 80 00 2b be 400271d4 <== NOT EXECUTED 4002712c: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40027130: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 <== NOT EXECUTED 40027134: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40027138: 12 80 00 06 bne 40027150 <== NOT EXECUTED 4002713c: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 <== NOT EXECUTED 40027140: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 <== NOT EXECUTED 40027144: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 40027148: 22 bf ff f7 be,a 40027124 <== NOT EXECUTED 4002714c: c8 01 00 00 ld [ %g4 ], %g4 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40027150: 82 10 20 01 mov 1, %g1 /* * 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 ) ) { 40027154: 90 10 00 03 mov %g3, %o0 40027158: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 4002715c: c2 20 e0 78 st %g1, [ %g3 + 0x78 ] /* * 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 ) ) { 40027160: 40 00 00 a8 call 40027400 <_POSIX_signals_Unblock_thread> 40027164: 94 07 bf ec add %fp, -20, %o2 40027168: 80 a2 20 00 cmp %o0, 0 4002716c: 12 80 00 09 bne 40027190 40027170: 01 00 00 00 nop /* * 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 ); 40027174: 40 00 00 93 call 400273c0 <_POSIX_signals_Set_process_signals> 40027178: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4002717c: b2 24 c0 12 sub %l3, %l2, %i1 40027180: c2 05 80 19 ld [ %l6 + %i1 ], %g1 40027184: 80 a0 60 02 cmp %g1, 2 40027188: 02 80 00 65 be 4002731c 4002718c: 11 10 00 b8 sethi %hi(0x4002e000), %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40027190: c2 06 a3 30 ld [ %i2 + 0x330 ], %g1 40027194: 82 00 7f ff add %g1, -1, %g1 40027198: c2 26 a3 30 st %g1, [ %i2 + 0x330 ] 4002719c: c4 06 a3 30 ld [ %i2 + 0x330 ], %g2 400271a0: 80 a0 a0 00 cmp %g2, 0 400271a4: 02 80 00 05 be 400271b8 400271a8: 01 00 00 00 nop _Thread_Dispatch(); 400271ac: 90 10 20 00 clr %o0 ! 0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400271b0: 81 c7 e0 08 ret 400271b4: 91 e8 00 08 restore %g0, %o0, %o0 400271b8: 7f ff a9 0d call 400115ec <_Thread_Dispatch> 400271bc: 01 00 00 00 nop 400271c0: 90 10 20 00 clr %o0 ! 0 400271c4: 81 c7 e0 08 ret 400271c8: 91 e8 00 08 restore %g0, %o0, %o0 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 400271cc: 10 bf ff be b 400270c4 400271d0: c0 27 bf f4 clr [ %fp + -12 ] index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 400271d4: 98 03 20 0c add %o4, 0xc, %o4 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400271d8: 80 a3 00 0b cmp %o4, %o3 400271dc: 32 bf ff c8 bne,a 400270fc 400271e0: c8 03 00 00 ld [ %o4 ], %g4 400271e4: 03 10 00 b6 sethi %hi(0x4002d800), %g1 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 400271e8: 05 10 00 ad sethi %hi(0x4002b400), %g2 400271ec: ba 10 62 90 or %g1, 0x290, %i5 400271f0: b6 10 a0 80 or %g2, 0x80, %i3 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400271f4: a8 10 21 00 mov 0x100, %l4 400271f8: ae 10 20 00 clr %l7 400271fc: aa 10 20 02 mov 2, %l5 * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 40027200: 39 04 00 00 sethi %hi(0x10000000), %i4 the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 40027204: 83 2d 60 02 sll %l5, 2, %g1 40027208: c2 07 40 01 ld [ %i5 + %g1 ], %g1 4002720c: 80 a0 60 00 cmp %g1, 0 40027210: 22 80 00 35 be,a 400272e4 40027214: aa 05 60 01 inc %l5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40027218: c2 00 60 04 ld [ %g1 + 4 ], %g1 if ( !the_info ) /* manager not installed */ 4002721c: 80 a0 60 00 cmp %g1, 0 40027220: 22 80 00 31 be,a 400272e4 40027224: aa 05 60 01 inc %l5 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 40027228: e2 00 60 20 ld [ %g1 + 0x20 ], %l1 assert( object_table ); /* always at least 1 entry */ 4002722c: 80 a4 60 00 cmp %l1, 0 40027230: 02 80 00 57 be 4002738c 40027234: e0 10 60 10 lduh [ %g1 + 0x10 ], %l0 for ( index = 1 ; index <= maximum ; index++ ) { 40027238: 80 a4 20 00 cmp %l0, 0 4002723c: 22 80 00 2a be,a 400272e4 40027240: aa 05 60 01 inc %l5 40027244: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 40027248: 83 29 20 02 sll %g4, 2, %g1 4002724c: c4 00 40 11 ld [ %g1 + %l1 ], %g2 if ( !the_thread ) 40027250: 80 a0 a0 00 cmp %g2, 0 40027254: 22 80 00 20 be,a 400272d4 40027258: 88 01 20 01 inc %g4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4002725c: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 40027260: 80 a0 c0 14 cmp %g3, %l4 40027264: 38 80 00 1c bgu,a 400272d4 40027268: 88 01 20 01 inc %g4 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4002726c: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 40027270: 80 a0 60 00 cmp %g1, 0 40027274: 22 80 00 18 be,a 400272d4 40027278: 88 01 20 01 inc %g4 <== NOT EXECUTED 4002727c: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40027280: 80 ae 00 01 andncc %i0, %g1, %g0 40027284: 22 80 00 14 be,a 400272d4 40027288: 88 01 20 01 inc %g4 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 4002728c: 80 a0 c0 14 cmp %g3, %l4 40027290: 2a 80 00 1c bcs,a 40027300 40027294: ae 10 00 02 mov %g2, %l7 * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 40027298: c2 05 e0 10 ld [ %l7 + 0x10 ], %g1 <== NOT EXECUTED 4002729c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400272a0: 22 80 00 0d be,a 400272d4 <== NOT EXECUTED 400272a4: 88 01 20 01 inc %g4 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 400272a8: da 00 a0 10 ld [ %g2 + 0x10 ], %o5 <== NOT EXECUTED 400272ac: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 400272b0: 22 80 00 14 be,a 40027300 <== NOT EXECUTED 400272b4: ae 10 00 02 mov %g2, %l7 <== NOT EXECUTED * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 400272b8: 80 88 40 1c btst %g1, %i4 <== NOT EXECUTED 400272bc: 32 80 00 06 bne,a 400272d4 <== NOT EXECUTED 400272c0: 88 01 20 01 inc %g4 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 400272c4: 80 8b 40 1c btst %o5, %i4 <== NOT EXECUTED 400272c8: 32 80 00 0e bne,a 40027300 <== NOT EXECUTED 400272cc: ae 10 00 02 mov %g2, %l7 <== NOT EXECUTED maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ for ( index = 1 ; index <= maximum ; index++ ) { 400272d0: 88 01 20 01 inc %g4 400272d4: 80 a4 00 04 cmp %l0, %g4 400272d8: 1a bf ff dd bcc 4002724c 400272dc: 83 29 20 02 sll %g4, 2, %g1 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 400272e0: aa 05 60 01 inc %l5 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; 400272e4: 80 a5 60 04 cmp %l5, 4 400272e8: 18 80 00 08 bgu 40027308 400272ec: 80 a5 60 01 cmp %l5, 1 the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) 400272f0: 22 bf ff c5 be,a 40027204 400272f4: aa 10 20 02 mov 2, %l5 <== NOT EXECUTED continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 400272f8: 10 bf ff c4 b 40027208 400272fc: 83 2d 60 02 sll %l5, 2, %g1 * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40027300: 10 bf ff f4 b 400272d0 40027304: a8 10 00 03 mov %g3, %l4 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 40027308: 80 a5 e0 00 cmp %l7, 0 4002730c: 02 bf ff 9a be 40027174 40027310: 86 10 00 17 mov %l7, %g3 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40027314: 10 bf ff 90 b 40027154 40027318: 82 10 20 01 mov 1, %g1 _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4002731c: 7f ff 9f 97 call 4000f178 <_Chain_Get> 40027320: 90 12 23 c8 or %o0, 0x3c8, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 40027324: 80 a2 20 00 cmp %o0, 0 40027328: 02 80 00 20 be 400273a8 4002732c: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 40027330: 92 10 00 08 mov %o0, %o1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 40027334: c2 22 20 08 st %g1, [ %o0 + 8 ] 40027338: c4 07 bf f0 ld [ %fp + -16 ], %g2 4002733c: c4 22 20 0c st %g2, [ %o0 + 0xc ] 40027340: c2 07 bf f4 ld [ %fp + -12 ], %g1 40027344: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 40027348: 11 10 00 b9 sethi %hi(0x4002e400), %o0 4002734c: 90 12 20 18 or %o0, 0x18, %o0 ! 4002e418 <_POSIX_signals_Siginfo> 40027350: 7f ff 9f 7e call 4000f148 <_Chain_Append> 40027354: 90 06 40 08 add %i1, %o0, %o0 40027358: 30 bf ff 8e b,a 40027190 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 4002735c: 7f ff d0 3c call 4001b44c <__errno> 40027360: 01 00 00 00 nop 40027364: 82 10 20 03 mov 3, %g1 ! 3 40027368: c2 22 00 00 st %g1, [ %o0 ] 4002736c: 10 bf ff 4d b 400270a0 40027370: 90 10 3f ff mov -1, %o0 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40027374: 7f ff d0 36 call 4001b44c <__errno> 40027378: 01 00 00 00 nop 4002737c: 82 10 20 16 mov 0x16, %g1 ! 16 40027380: c2 22 00 00 st %g1, [ %o0 ] 40027384: 10 bf ff 47 b 400270a0 40027388: 90 10 3f ff mov -1, %o0 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 4002738c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 40027390: 92 10 20 c1 mov 0xc1, %o1 <== NOT EXECUTED 40027394: 15 10 00 ad sethi %hi(0x4002b400), %o2 <== NOT EXECUTED 40027398: 7f ff 89 e7 call 40009b34 <__assert> <== NOT EXECUTED 4002739c: 94 12 a0 c8 or %o2, 0xc8, %o2 ! 4002b4c8 <_RTEMS_version+0x70> <== NOT EXECUTED for ( index = 1 ; index <= maximum ; index++ ) { 400273a0: 10 bf ff a7 b 4002723c <== NOT EXECUTED 400273a4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 400273a8: 7f ff d0 29 call 4001b44c <__errno> <== NOT EXECUTED 400273ac: 01 00 00 00 nop <== NOT EXECUTED 400273b0: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 400273b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400273b8: 10 bf ff 3a b 400270a0 <== NOT EXECUTED 400273bc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4000af88 : */ int mq_close( mqd_t mqdes ) { 4000af88: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 4000af8c: 21 10 00 9e sethi %hi(0x40027800), %l0 4000af90: 92 10 00 18 mov %i0, %o1 4000af94: 94 07 bf f4 add %fp, -12, %o2 4000af98: 40 00 13 eb call 4000ff44 <_Objects_Get> 4000af9c: 90 14 20 60 or %l0, 0x60, %o0 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000afa0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000afa4: 80 a0 60 01 cmp %g1, 1 4000afa8: 02 80 00 2e be 4000b060 4000afac: b0 10 00 08 mov %o0, %i0 4000afb0: 80 a0 60 01 cmp %g1, 1 4000afb4: 2a 80 00 09 bcs,a 4000afd8 4000afb8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 4000afbc: 80 a0 60 02 cmp %g1, 2 4000afc0: 02 80 00 2e be 4000b078 4000afc4: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000afc8: 40 00 08 80 call 4000d1c8 <== NOT EXECUTED 4000afcc: 01 00 00 00 nop <== NOT EXECUTED } 4000afd0: 81 c7 e0 08 ret <== NOT EXECUTED 4000afd4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; the_mq->open_count -= 1; 4000afd8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 _POSIX_Message_queue_Delete( the_mq ); 4000afdc: 90 10 00 02 mov %g2, %o0 * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; the_mq->open_count -= 1; 4000afe0: 82 00 7f ff add %g1, -1, %g1 _POSIX_Message_queue_Delete( the_mq ); 4000afe4: 40 00 00 2c call 4000b094 <_POSIX_Message_queue_Delete> 4000afe8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000afec: 90 14 20 60 or %l0, 0x60, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000aff0: c4 06 20 08 ld [ %i0 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000aff4: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000aff8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000affc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000b000: 82 08 80 01 and %g2, %g1, %g1 4000b004: 80 a0 40 03 cmp %g1, %g3 4000b008: 38 80 00 06 bgu,a 4000b020 4000b00c: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000b010: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000b014: 83 28 60 02 sll %g1, 2, %g1 4000b018: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000b01c: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4000b020: 40 00 13 86 call 4000fe38 <_Objects_Free> 4000b024: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b028: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b02c: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b030: 90 10 20 00 clr %o0 4000b034: 84 00 bf ff add %g2, -1, %g2 4000b038: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b03c: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b040: 80 a0 e0 00 cmp %g3, 0 4000b044: 12 bf ff e3 bne 4000afd0 4000b048: 01 00 00 00 nop _Thread_Dispatch(); 4000b04c: 40 00 18 aa call 400112f4 <_Thread_Dispatch> 4000b050: 01 00 00 00 nop 4000b054: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b058: 81 c7 e0 08 ret 4000b05c: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b060: 40 00 18 a5 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b064: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b068: 40 00 08 62 call 4000d1f0 <== NOT EXECUTED 4000b06c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b070: 81 c7 e0 08 ret <== NOT EXECUTED 4000b074: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000b078: 40 00 31 bd call 4001776c <__errno> 4000b07c: 01 00 00 00 nop 4000b080: 82 10 20 09 mov 9, %g1 ! 9 4000b084: c2 22 00 00 st %g1, [ %o0 ] 4000b088: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b08c: 81 c7 e0 08 ret 4000b090: 91 e8 00 08 restore %g0, %o0, %o0 4000b124 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 4000b124: 9d e3 bf 90 save %sp, -112, %sp POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 4000b128: 80 a6 60 00 cmp %i1, 0 4000b12c: 02 80 00 36 be 4000b204 4000b130: 92 10 00 18 mov %i0, %o1 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 4000b134: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b138: 94 07 bf f4 add %fp, -12, %o2 4000b13c: 40 00 13 82 call 4000ff44 <_Objects_Get> 4000b140: 90 12 20 60 or %o0, 0x60, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b144: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000b148: 80 a0 60 01 cmp %g1, 1 4000b14c: 02 80 00 28 be 4000b1ec 4000b150: 01 00 00 00 nop 4000b154: 2a 80 00 09 bcs,a 4000b178 4000b158: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 4000b15c: 80 a0 60 02 cmp %g1, 2 4000b160: 02 80 00 1c be 4000b1d0 4000b164: 01 00 00 00 nop mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000b168: 40 00 08 18 call 4000d1c8 <== NOT EXECUTED 4000b16c: 01 00 00 00 nop <== NOT EXECUTED } 4000b170: 81 c7 e0 08 ret 4000b174: 91 e8 00 08 restore %g0, %o0, %o0 * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 4000b178: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000b17c: c4 26 40 00 st %g2, [ %i1 ] mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 4000b180: c2 00 e0 6c ld [ %g3 + 0x6c ], %g1 4000b184: c2 26 60 08 st %g1, [ %i1 + 8 ] mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4000b188: c4 00 e0 64 ld [ %g3 + 0x64 ], %g2 4000b18c: c4 26 60 04 st %g2, [ %i1 + 4 ] mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 4000b190: c2 00 e0 68 ld [ %g3 + 0x68 ], %g1 4000b194: c2 26 60 0c st %g1, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b198: 07 10 00 9c sethi %hi(0x40027000), %g3 4000b19c: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000b1a0: 90 10 20 00 clr %o0 4000b1a4: 82 00 7f ff add %g1, -1, %g1 4000b1a8: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] 4000b1ac: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 4000b1b0: 80 a0 a0 00 cmp %g2, 0 4000b1b4: 12 bf ff ef bne 4000b170 4000b1b8: 01 00 00 00 nop _Thread_Dispatch(); 4000b1bc: 40 00 18 4e call 400112f4 <_Thread_Dispatch> 4000b1c0: 01 00 00 00 nop 4000b1c4: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b1c8: 81 c7 e0 08 ret 4000b1cc: 91 e8 00 08 restore %g0, %o0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000b1d0: 40 00 31 67 call 4001776c <__errno> 4000b1d4: 01 00 00 00 nop 4000b1d8: 82 10 20 09 mov 9, %g1 ! 9 4000b1dc: c2 22 00 00 st %g1, [ %o0 ] 4000b1e0: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b1e4: 81 c7 e0 08 ret 4000b1e8: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b1ec: 40 00 18 42 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b1f0: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b1f4: 40 00 07 ff call 4000d1f0 <== NOT EXECUTED 4000b1f8: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b1fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000b200: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000b204: 40 00 31 5a call 4001776c <__errno> 4000b208: 01 00 00 00 nop 4000b20c: 82 10 20 16 mov 0x16, %g1 ! 16 4000b210: c2 22 00 00 st %g1, [ %o0 ] 4000b214: 10 bf ff d7 b 4000b170 4000b218: 90 10 3f ff mov -1, %o0 4000b240 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 4000b240: 9d e3 bf 90 save %sp, -112, %sp 4000b244: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b248: 92 10 00 18 mov %i0, %o1 4000b24c: 90 12 20 60 or %o0, 0x60, %o0 4000b250: 40 00 13 3d call 4000ff44 <_Objects_Get> 4000b254: 94 07 bf f4 add %fp, -12, %o2 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b258: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000b25c: 80 a0 60 01 cmp %g1, 1 4000b260: 02 80 00 2e be 4000b318 4000b264: 01 00 00 00 nop 4000b268: 0a 80 00 09 bcs 4000b28c 4000b26c: 80 a6 60 00 cmp %i1, 0 4000b270: 80 a0 60 02 cmp %g1, 2 4000b274: 02 80 00 2f be 4000b330 4000b278: 01 00 00 00 nop } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000b27c: 40 00 07 d3 call 4000d1c8 <== NOT EXECUTED 4000b280: 01 00 00 00 nop <== NOT EXECUTED } 4000b284: 81 c7 e0 08 ret 4000b288: 91 e8 00 08 restore %g0, %o0, %o0 return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { 4000b28c: 02 80 00 3e be 4000b384 4000b290: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 4000b294: c2 02 20 80 ld [ %o0 + 0x80 ], %g1 4000b298: 80 a0 60 00 cmp %g1, 0 4000b29c: 12 80 00 2c bne 4000b34c 4000b2a0: 01 00 00 00 nop the_message_queue->notify_argument = the_argument; 4000b2a4: c0 22 20 84 clr [ %o0 + 0x84 ] rtems_set_errno_and_return_minus_one( EBUSY ); } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 4000b2a8: c2 06 40 00 ld [ %i1 ], %g1 4000b2ac: c2 22 20 94 st %g1, [ %o0 + 0x94 ] 4000b2b0: c4 06 60 04 ld [ %i1 + 4 ], %g2 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4000b2b4: 03 10 00 2c sethi %hi(0x4000b000), %g1 4000b2b8: c4 22 20 98 st %g2, [ %o0 + 0x98 ] 4000b2bc: c6 06 60 08 ld [ %i1 + 8 ], %g3 4000b2c0: 82 10 62 1c or %g1, 0x21c, %g1 4000b2c4: c6 22 20 9c st %g3, [ %o0 + 0x9c ] 4000b2c8: c2 22 20 80 st %g1, [ %o0 + 0x80 ] 4000b2cc: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4000b2d0: c2 22 20 a0 st %g1, [ %o0 + 0xa0 ] 4000b2d4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 the_message_queue->notify_argument = the_argument; 4000b2d8: d0 22 20 84 st %o0, [ %o0 + 0x84 ] 4000b2dc: c4 22 20 a4 st %g2, [ %o0 + 0xa4 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b2e0: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b2e4: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b2e8: 90 10 20 00 clr %o0 4000b2ec: 84 00 bf ff add %g2, -1, %g2 4000b2f0: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b2f4: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b2f8: 80 a0 e0 00 cmp %g3, 0 4000b2fc: 12 bf ff e2 bne 4000b284 4000b300: 01 00 00 00 nop _Thread_Dispatch(); 4000b304: 40 00 17 fc call 400112f4 <_Thread_Dispatch> 4000b308: 01 00 00 00 nop 4000b30c: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b310: 81 c7 e0 08 ret 4000b314: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b318: 40 00 17 f7 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b31c: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b320: 40 00 07 b4 call 4000d1f0 <== NOT EXECUTED 4000b324: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b328: 81 c7 e0 08 ret <== NOT EXECUTED 4000b32c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000b330: 40 00 31 0f call 4001776c <__errno> 4000b334: 01 00 00 00 nop 4000b338: 82 10 20 09 mov 9, %g1 ! 9 4000b33c: c2 22 00 00 st %g1, [ %o0 ] 4000b340: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b344: 81 c7 e0 08 ret 4000b348: 91 e8 00 08 restore %g0, %o0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b34c: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b350: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b354: 84 00 bf ff add %g2, -1, %g2 4000b358: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b35c: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b360: 80 a0 e0 00 cmp %g3, 0 4000b364: 02 80 00 0b be 4000b390 4000b368: 01 00 00 00 nop the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBUSY ); 4000b36c: 40 00 31 00 call 4001776c <__errno> 4000b370: 01 00 00 00 nop 4000b374: 82 10 20 10 mov 0x10, %g1 ! 10 4000b378: c2 22 00 00 st %g1, [ %o0 ] 4000b37c: 10 bf ff c2 b 4000b284 4000b380: 90 10 3f ff mov -1, %o0 4000b384: c0 22 20 84 clr [ %o0 + 0x84 ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4000b388: 10 bf ff d6 b 4000b2e0 4000b38c: c0 22 20 80 clr [ %o0 + 0x80 ] _Thread_Dispatch(); 4000b390: 40 00 17 d9 call 400112f4 <_Thread_Dispatch> 4000b394: 01 00 00 00 nop 4000b398: 30 bf ff f5 b,a 4000b36c 4000b39c : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 4000b39c: 9d e3 bf 88 save %sp, -120, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b3a0: 21 10 00 9c sethi %hi(0x40027000), %l0 4000b3a4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000b3a8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4000b3ac: 82 00 60 01 inc %g1 4000b3b0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4000b3b4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4000b3b8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 4000b3bc: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b3c0: a2 10 00 18 mov %i0, %l1 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 4000b3c4: ba 8e 62 00 andcc %i1, 0x200, %i5 4000b3c8: 12 80 00 16 bne 4000b420 4000b3cc: f4 07 a0 50 ld [ %fp + 0x50 ], %i2 4000b3d0: b4 10 20 00 clr %i2 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 4000b3d4: 39 10 00 9e sethi %hi(0x40027800), %i4 4000b3d8: 40 00 11 8a call 4000fa00 <_Objects_Allocate> 4000b3dc: 90 17 20 60 or %i4, 0x60, %o0 ! 40027860 <_POSIX_Message_queue_Information_fds> attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4000b3e0: b0 92 20 00 orcc %o0, 0, %i0 4000b3e4: 32 80 00 1a bne,a 4000b44c 4000b3e8: f2 26 20 14 st %i1, [ %i0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b3ec: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b3f0: 82 00 7f ff add %g1, -1, %g1 4000b3f4: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b3f8: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b3fc: 80 a0 a0 00 cmp %g2, 0 4000b400: 02 80 00 0b be 4000b42c 4000b404: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 4000b408: 40 00 30 d9 call 4001776c <__errno> <== NOT EXECUTED 4000b40c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000b410: 82 10 20 17 mov 0x17, %g1 <== NOT EXECUTED 4000b414: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b418: 81 c7 e0 08 ret <== NOT EXECUTED 4000b41c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 4000b420: 82 07 a0 54 add %fp, 0x54, %g1 4000b424: 10 bf ff ec b 4000b3d4 4000b428: c2 27 bf f4 st %g1, [ %fp + -12 ] _Thread_Dispatch(); 4000b42c: 40 00 17 b2 call 400112f4 <_Thread_Dispatch> 4000b430: b0 10 3f ff mov -1, %i0 } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 4000b434: 40 00 30 ce call 4001776c <__errno> 4000b438: 01 00 00 00 nop 4000b43c: 82 10 20 17 mov 0x17, %g1 ! 17 4000b440: c2 22 00 00 st %g1, [ %o0 ] 4000b444: 81 c7 e0 08 ret 4000b448: 81 e8 00 00 restore } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4000b44c: 90 10 00 11 mov %l1, %o0 4000b450: 40 00 26 36 call 40014d28 <_POSIX_Message_queue_Name_to_id> 4000b454: 92 07 bf f0 add %fp, -16, %o1 * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 4000b458: b6 92 20 00 orcc %o0, 0, %i3 4000b45c: 02 80 00 14 be 4000b4ac 4000b460: 82 0e 6a 00 and %i1, 0xa00, %g1 /* * 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) ) ) { 4000b464: 80 a6 e0 02 cmp %i3, 2 4000b468: 02 80 00 51 be 4000b5ac 4000b46c: 80 a7 60 00 cmp %i5, 0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4000b470: 90 17 20 60 or %i4, 0x60, %o0 4000b474: 40 00 12 71 call 4000fe38 <_Objects_Free> 4000b478: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b47c: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b480: 82 00 7f ff add %g1, -1, %g1 4000b484: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b488: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b48c: 80 a0 a0 00 cmp %g2, 0 4000b490: 02 80 00 1a be 4000b4f8 4000b494: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 4000b498: 40 00 30 b5 call 4001776c <__errno> 4000b49c: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b4a0: f6 22 00 00 st %i3, [ %o0 ] 4000b4a4: 81 c7 e0 08 ret 4000b4a8: 81 e8 00 00 restore /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4000b4ac: 80 a0 6a 00 cmp %g1, 0xa00 4000b4b0: 12 80 00 18 bne 4000b510 4000b4b4: d2 07 bf f0 ld [ %fp + -16 ], %o1 4000b4b8: 90 17 20 60 or %i4, 0x60, %o0 4000b4bc: 40 00 12 5f call 4000fe38 <_Objects_Free> 4000b4c0: 92 10 00 18 mov %i0, %o1 4000b4c4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b4c8: 82 00 7f ff add %g1, -1, %g1 4000b4cc: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b4d0: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b4d4: 80 a0 a0 00 cmp %g2, 0 4000b4d8: 02 80 00 0b be 4000b504 4000b4dc: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 4000b4e0: 40 00 30 a3 call 4001776c <__errno> 4000b4e4: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b4e8: 82 10 20 11 mov 0x11, %g1 4000b4ec: c2 22 00 00 st %g1, [ %o0 ] 4000b4f0: 81 c7 e0 08 ret 4000b4f4: 81 e8 00 00 restore _Thread_Dispatch(); 4000b4f8: 40 00 17 7f call 400112f4 <_Thread_Dispatch> 4000b4fc: 01 00 00 00 nop 4000b500: 30 bf ff e6 b,a 4000b498 4000b504: 40 00 17 7c call 400112f4 <_Thread_Dispatch> 4000b508: 01 00 00 00 nop 4000b50c: 30 bf ff f5 b,a 4000b4e0 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 4000b510: 11 10 00 9d sethi %hi(0x40027400), %o0 <== NOT EXECUTED 4000b514: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 4000b518: 40 00 12 8b call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000b51c: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 4000b520: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 4000b524: d0 27 bf ec st %o0, [ %fp + -20 ] <== NOT EXECUTED the_mq->open_count += 1; 4000b528: 82 00 60 01 inc %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b52c: 88 17 20 60 or %i4, 0x60, %g4 <== NOT EXECUTED 4000b530: c2 22 20 1c st %g1, [ %o0 + 0x1c ] <== NOT EXECUTED 4000b534: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000b538: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b53c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4000b540: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4000b544: 82 08 80 01 and %g2, %g1, %g1 <== NOT EXECUTED 4000b548: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000b54c: 18 80 00 05 bgu 4000b560 <== NOT EXECUTED 4000b550: d0 26 20 10 st %o0, [ %i0 + 0x10 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000b554: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 <== NOT EXECUTED 4000b558: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000b55c: f0 20 80 01 st %i0, [ %g2 + %g1 ] <== NOT EXECUTED if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000b560: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b564: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 <== NOT EXECUTED 4000b568: 23 10 00 9c sethi %hi(0x40027000), %l1 <== NOT EXECUTED 4000b56c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b570: c2 24 22 90 st %g1, [ %l0 + 0x290 ] <== NOT EXECUTED 4000b574: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 <== NOT EXECUTED 4000b578: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b57c: 02 80 00 28 be 4000b61c <== NOT EXECUTED 4000b580: 01 00 00 00 nop <== NOT EXECUTED 4000b584: c2 04 62 90 ld [ %l1 + 0x290 ], %g1 <== NOT EXECUTED 4000b588: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b58c: c2 24 62 90 st %g1, [ %l1 + 0x290 ] <== NOT EXECUTED 4000b590: c4 04 62 90 ld [ %l1 + 0x290 ], %g2 <== NOT EXECUTED 4000b594: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b598: 02 80 00 1c be 4000b608 <== NOT EXECUTED 4000b59c: 01 00 00 00 nop <== NOT EXECUTED &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); return (mqd_t)the_mq_fd->Object.id; 4000b5a0: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b5a4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b5a8: 81 e8 00 00 restore <== NOT EXECUTED /* * 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) ) ) { 4000b5ac: 02 bf ff b2 be 4000b474 4000b5b0: 90 17 20 60 or %i4, 0x60, %o0 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 4000b5b4: 90 10 00 11 mov %l1, %o0 4000b5b8: 94 10 00 1a mov %i2, %o2 4000b5bc: 92 10 20 01 mov 1, %o1 4000b5c0: 40 00 25 42 call 40014ac8 <_POSIX_Message_queue_Create_support> 4000b5c4: 96 07 bf ec add %fp, -20, %o3 /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 4000b5c8: 80 a2 3f ff cmp %o0, -1 4000b5cc: 12 80 00 1b bne 4000b638 4000b5d0: c4 07 bf ec ld [ %fp + -20 ], %g2 4000b5d4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b5d8: 82 00 7f ff add %g1, -1, %g1 4000b5dc: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b5e0: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b5e4: 80 a0 a0 00 cmp %g2, 0 4000b5e8: 02 80 00 10 be 4000b628 4000b5ec: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4000b5f0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000b5f4: 90 17 20 60 or %i4, 0x60, %o0 4000b5f8: 40 00 12 10 call 4000fe38 <_Objects_Free> 4000b5fc: b0 10 3f ff mov -1, %i0 4000b600: 81 c7 e0 08 ret 4000b604: 81 e8 00 00 restore _Thread_Dispatch(); 4000b608: 40 00 17 3b call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b60c: 01 00 00 00 nop <== NOT EXECUTED 4000b610: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b614: 81 c7 e0 08 ret <== NOT EXECUTED 4000b618: 81 e8 00 00 restore <== NOT EXECUTED 4000b61c: 40 00 17 36 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b620: 01 00 00 00 nop <== NOT EXECUTED 4000b624: 30 bf ff d8 b,a 4000b584 <== NOT EXECUTED 4000b628: 40 00 17 33 call 400112f4 <_Thread_Dispatch> 4000b62c: 01 00 00 00 nop 4000b630: 10 bf ff f1 b 4000b5f4 4000b634: 92 10 00 18 mov %i0, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b638: 90 17 20 60 or %i4, 0x60, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000b63c: c6 06 20 08 ld [ %i0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b640: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4 4000b644: 03 00 00 3f sethi %hi(0xfc00), %g1 4000b648: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000b64c: 82 08 c0 01 and %g3, %g1, %g1 4000b650: 80 a0 40 04 cmp %g1, %g4 4000b654: 18 80 00 05 bgu 4000b668 4000b658: c4 26 20 10 st %g2, [ %i0 + 0x10 ] information->local_table[ index ] = the_object; 4000b65c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000b660: 83 28 60 02 sll %g1, 2, %g1 4000b664: f0 20 80 01 st %i0, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000b668: c0 26 20 0c clr [ %i0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b66c: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b670: 82 00 7f ff add %g1, -1, %g1 4000b674: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b678: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b67c: 80 a0 a0 00 cmp %g2, 0 4000b680: 32 bf ff 66 bne,a 4000b418 4000b684: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000b688: 40 00 17 1b call 400112f4 <_Thread_Dispatch> 4000b68c: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; 4000b690: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 4000b694: 81 c7 e0 08 ret 4000b698: 81 e8 00 00 restore 4000ba28 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 4000ba28: 9d e3 bf 90 save %sp, -112, %sp POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 4000ba2c: 80 a6 60 00 cmp %i1, 0 4000ba30: 02 80 00 3a be 4000bb18 4000ba34: 92 10 00 18 mov %i0, %o1 4000ba38: 11 10 00 9e sethi %hi(0x40027800), %o0 4000ba3c: 94 07 bf f4 add %fp, -12, %o2 4000ba40: 40 00 11 41 call 4000ff44 <_Objects_Get> 4000ba44: 90 12 20 60 or %o0, 0x60, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000ba48: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ba4c: 80 a0 60 01 cmp %g1, 1 4000ba50: 02 80 00 2c be 4000bb00 4000ba54: 01 00 00 00 nop 4000ba58: 1a 80 00 1d bcc 4000bacc 4000ba5c: 80 a0 60 02 cmp %g1, 2 /* * Return the old values. */ if ( omqstat ) { 4000ba60: 80 a6 a0 00 cmp %i2, 0 4000ba64: 02 80 00 0a be 4000ba8c 4000ba68: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 omqstat->mq_flags = the_mq_fd->oflag; 4000ba6c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000ba70: c2 26 80 00 st %g1, [ %i2 ] omqstat->mq_msgsize = the_core_mq->maximum_message_size; 4000ba74: c4 00 e0 6c ld [ %g3 + 0x6c ], %g2 4000ba78: c4 26 a0 08 st %g2, [ %i2 + 8 ] omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 4000ba7c: c2 00 e0 64 ld [ %g3 + 0x64 ], %g1 4000ba80: c2 26 a0 04 st %g1, [ %i2 + 4 ] omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 4000ba84: c4 00 e0 68 ld [ %g3 + 0x68 ], %g2 4000ba88: c4 26 a0 0c st %g2, [ %i2 + 0xc ] } the_mq_fd->oflag = mqstat->mq_flags; 4000ba8c: c2 06 40 00 ld [ %i1 ], %g1 4000ba90: c2 22 20 14 st %g1, [ %o0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ba94: 07 10 00 9c sethi %hi(0x40027000), %g3 4000ba98: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000ba9c: 90 10 20 00 clr %o0 4000baa0: 82 00 7f ff add %g1, -1, %g1 4000baa4: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] 4000baa8: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 4000baac: 80 a0 a0 00 cmp %g2, 0 4000bab0: 12 80 00 0b bne 4000badc 4000bab4: 01 00 00 00 nop _Thread_Dispatch(); 4000bab8: 40 00 16 0f call 400112f4 <_Thread_Dispatch> 4000babc: 01 00 00 00 nop 4000bac0: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000bac4: 81 c7 e0 08 ret 4000bac8: 91 e8 00 08 restore %g0, %o0, %o0 if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000bacc: 02 80 00 06 be 4000bae4 4000bad0: 01 00 00 00 nop the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000bad4: 40 00 05 bd call 4000d1c8 <== NOT EXECUTED 4000bad8: 01 00 00 00 nop <== NOT EXECUTED } 4000badc: 81 c7 e0 08 ret 4000bae0: 91 e8 00 08 restore %g0, %o0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000bae4: 40 00 2f 22 call 4001776c <__errno> 4000bae8: 01 00 00 00 nop 4000baec: 82 10 20 09 mov 9, %g1 ! 9 4000baf0: c2 22 00 00 st %g1, [ %o0 ] 4000baf4: 90 10 3f ff mov -1, %o0 the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000baf8: 81 c7 e0 08 ret 4000bafc: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000bb00: 40 00 15 fd call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000bb04: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000bb08: 40 00 05 ba call 4000d1f0 <== NOT EXECUTED 4000bb0c: 01 00 00 00 nop <== NOT EXECUTED the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000bb10: 81 c7 e0 08 ret <== NOT EXECUTED 4000bb14: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000bb18: 40 00 2f 15 call 4001776c <__errno> 4000bb1c: 01 00 00 00 nop 4000bb20: 82 10 20 16 mov 0x16, %g1 ! 16 4000bb24: c2 22 00 00 st %g1, [ %o0 ] 4000bb28: 10 bf ff ed b 4000badc 4000bb2c: 90 10 3f ff mov -1, %o0 4000bb30 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000bb30: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb34: 92 07 bf f4 add %fp, -12, %o1 4000bb38: 40 00 00 95 call 4000bd8c <_POSIX_Absolute_timeout_to_ticks> 4000bb3c: 90 10 00 1c mov %i4, %o0 char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000bb40: 92 10 00 19 mov %i1, %o1 4000bb44: 94 10 00 1a mov %i2, %o2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb48: 80 a2 20 02 cmp %o0, 2 4000bb4c: 18 80 00 09 bgu 4000bb70 4000bb50: 96 10 00 1b mov %i3, %o3 4000bb54: b8 10 20 00 clr %i4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000bb58: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED 4000bb5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000bb60: 7f ff fe d5 call 4000b6b4 <_POSIX_Message_queue_Receive_support> <== NOT EXECUTED 4000bb64: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED msg_len, msg_prio, do_wait, ticks ); } 4000bb68: 81 c7 e0 08 ret <== NOT EXECUTED 4000bb6c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb70: 80 a2 20 03 cmp %o0, 3 4000bb74: 12 bf ff fa bne 4000bb5c 4000bb78: da 07 bf f4 ld [ %fp + -12 ], %o5 4000bb7c: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000bb80: 90 10 00 18 mov %i0, %o0 4000bb84: 7f ff fe cc call 4000b6b4 <_POSIX_Message_queue_Receive_support> 4000bb88: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000bb8c: 81 c7 e0 08 ret 4000bb90: 91 e8 00 08 restore %g0, %o0, %o0 4000bb94 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000bb94: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb98: 92 07 bf f4 add %fp, -12, %o1 4000bb9c: 40 00 00 7c call 4000bd8c <_POSIX_Absolute_timeout_to_ticks> 4000bba0: 90 10 00 1c mov %i4, %o0 const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000bba4: 92 10 00 19 mov %i1, %o1 4000bba8: 94 10 00 1a mov %i2, %o2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bbac: 80 a2 20 02 cmp %o0, 2 4000bbb0: 18 80 00 09 bgu 4000bbd4 4000bbb4: 96 10 00 1b mov %i3, %o3 4000bbb8: b8 10 20 00 clr %i4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000bbbc: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED 4000bbc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000bbc4: 7f ff ff 36 call 4000b89c <_POSIX_Message_queue_Send_support> <== NOT EXECUTED 4000bbc8: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED msg_len, msg_prio, do_wait, ticks ); } 4000bbcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000bbd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bbd4: 80 a2 20 03 cmp %o0, 3 4000bbd8: 12 bf ff fa bne 4000bbc0 4000bbdc: da 07 bf f4 ld [ %fp + -12 ], %o5 4000bbe0: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000bbe4: 90 10 00 18 mov %i0, %o0 4000bbe8: 7f ff ff 2d call 4000b89c <_POSIX_Message_queue_Send_support> 4000bbec: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000bbf0: 81 c7 e0 08 ret 4000bbf4: 91 e8 00 08 restore %g0, %o0, %o0 4000bc9c : */ int mq_unlink( const char *name ) { 4000bc9c: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000bca0: 21 10 00 9c sethi %hi(0x40027000), %l0 4000bca4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000bca8: 90 10 00 18 mov %i0, %o0 4000bcac: 82 00 60 01 inc %g1 4000bcb0: c2 24 22 90 st %g1, [ %l0 + 0x290 ] register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4000bcb4: 40 00 24 1d call 40014d28 <_POSIX_Message_queue_Name_to_id> 4000bcb8: 92 07 bf f4 add %fp, -12, %o1 if ( status != 0 ) { 4000bcbc: b0 92 20 00 orcc %o0, 0, %i0 4000bcc0: 12 80 00 24 bne 4000bd50 4000bcc4: 03 10 00 9d sethi %hi(0x40027400), %g1 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 4000bcc8: c4 07 bf f4 ld [ %fp + -12 ], %g2 4000bccc: 88 10 62 a8 or %g1, 0x2a8, %g4 4000bcd0: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 4000bcd4: 03 00 00 3f sethi %hi(0xfc00), %g1 4000bcd8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000bcdc: 82 08 80 01 and %g2, %g1, %g1 4000bce0: 80 a0 40 03 cmp %g1, %g3 4000bce4: 18 80 00 05 bgu 4000bcf8 4000bce8: b0 10 20 00 clr %i0 4000bcec: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000bcf0: 83 28 60 02 sll %g1, 2, %g1 4000bcf4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 4000bcf8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq_id ); } #endif the_mq->linked = FALSE; 4000bcfc: c0 26 20 18 clr [ %i0 + 0x18 ] 4000bd00: 11 10 00 9c sethi %hi(0x40027000), %o0 4000bd04: 40 00 0e 12 call 4000f54c <_Heap_Free> 4000bd08: 90 12 22 dc or %o0, 0x2dc, %o0 ! 400272dc <_Workspace_Area> _Workspace_Free( the_mq->Object.name ); _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 4000bd0c: 90 10 00 18 mov %i0, %o0 4000bd10: 7f ff fc e1 call 4000b094 <_POSIX_Message_queue_Delete> 4000bd14: c0 26 20 0c clr [ %i0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000bd18: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000bd1c: b0 10 20 00 clr %i0 4000bd20: 82 00 7f ff add %g1, -1, %g1 4000bd24: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000bd28: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000bd2c: 80 a0 a0 00 cmp %g2, 0 4000bd30: 02 80 00 04 be 4000bd40 4000bd34: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 4000bd38: 81 c7 e0 08 ret <== NOT EXECUTED 4000bd3c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000bd40: 40 00 15 6d call 400112f4 <_Thread_Dispatch> 4000bd44: 01 00 00 00 nop 4000bd48: 81 c7 e0 08 ret 4000bd4c: 81 e8 00 00 restore #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000bd50: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000bd54: 82 00 7f ff add %g1, -1, %g1 4000bd58: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000bd5c: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000bd60: 80 a0 a0 00 cmp %g2, 0 4000bd64: 02 80 00 07 be 4000bd80 4000bd68: 01 00 00 00 nop _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); 4000bd6c: 40 00 2e 80 call 4001776c <__errno> 4000bd70: 01 00 00 00 nop 4000bd74: f0 22 00 00 st %i0, [ %o0 ] 4000bd78: 81 c7 e0 08 ret 4000bd7c: 91 e8 3f ff restore %g0, -1, %o0 _Thread_Dispatch(); 4000bd80: 40 00 15 5d call 400112f4 <_Thread_Dispatch> 4000bd84: 01 00 00 00 nop 4000bd88: 30 bf ff f9 b,a 4000bd6c 40016c04 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 40016c04: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 40016c08: 40 00 06 fc call 400187f8 <_Timespec_Is_valid> 40016c0c: 90 10 00 18 mov %i0, %o0 40016c10: 80 a2 20 00 cmp %o0, 0 40016c14: 02 80 00 4d be 40016d48 40016c18: 01 00 00 00 nop * Return EINVAL if the delay interval is negative. * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) 40016c1c: c2 06 00 00 ld [ %i0 ], %g1 40016c20: 80 a0 60 00 cmp %g1, 0 40016c24: 06 80 00 49 bl 40016d48 40016c28: 01 00 00 00 nop 40016c2c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40016c30: 80 a0 60 00 cmp %g1, 0 40016c34: 06 80 00 45 bl 40016d48 40016c38: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 40016c3c: 40 00 07 00 call 4001883c <_Timespec_To_ticks> 40016c40: 90 10 00 18 mov %i0, %o0 * A nanosleep for zero time is implemented as a yield. * This behavior is also beyond the POSIX specification but is * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { 40016c44: b0 92 20 00 orcc %o0, 0, %i0 40016c48: 02 80 00 2d be 40016cfc 40016c4c: 21 10 00 b6 sethi %hi(0x4002d800), %l0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40016c50: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 40016c54: 82 00 60 01 inc %g1 40016c58: c2 24 23 30 st %g1, [ %l0 + 0x330 ] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 40016c5c: 23 10 00 b7 sethi %hi(0x4002dc00), %l1 40016c60: d0 04 60 0c ld [ %l1 + 0xc ], %o0 ! 4002dc0c <_Thread_Executing> 40016c64: 13 04 00 00 sethi %hi(0x10000000), %o1 40016c68: 7f ff ed 87 call 40012284 <_Thread_Set_state> 40016c6c: 92 12 60 08 or %o1, 8, %o1 ! 10000008 _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 40016c70: d2 04 60 0c ld [ %l1 + 0xc ], %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40016c74: 03 10 00 45 sethi %hi(0x40011400), %g1 40016c78: c4 02 60 08 ld [ %o1 + 8 ], %g2 40016c7c: 82 10 61 48 or %g1, 0x148, %g1 the_watchdog->id = id; 40016c80: c4 22 60 68 st %g2, [ %o1 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40016c84: c2 22 60 64 st %g1, [ %o1 + 0x64 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40016c88: f0 22 60 54 st %i0, [ %o1 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40016c8c: c0 22 60 50 clr [ %o1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40016c90: c0 22 60 6c clr [ %o1 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40016c94: 11 10 00 b7 sethi %hi(0x4002dc00), %o0 40016c98: 92 02 60 48 add %o1, 0x48, %o1 40016c9c: 7f ff ef af call 40012b58 <_Watchdog_Insert> 40016ca0: 90 12 20 2c or %o0, 0x2c, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40016ca4: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40016ca8: 82 00 7f ff add %g1, -1, %g1 40016cac: c2 24 23 30 st %g1, [ %l0 + 0x330 ] 40016cb0: c4 04 23 30 ld [ %l0 + 0x330 ], %g2 40016cb4: 80 a0 a0 00 cmp %g2, 0 40016cb8: 02 80 00 2a be 40016d60 40016cbc: 01 00 00 00 nop _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { 40016cc0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40016cc4: 02 80 00 0c be 40016cf4 40016cc8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 40016ccc: 92 10 00 19 mov %i1, %o1 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 40016cd0: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 40016cd4: e0 00 60 60 ld [ %g1 + 0x60 ], %l0 40016cd8: a0 24 00 02 sub %l0, %g2, %l0 40016cdc: a0 26 00 10 sub %i0, %l0, %l0 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 40016ce0: 40 00 06 b1 call 400187a4 <_Timespec_From_ticks> 40016ce4: 90 10 00 10 mov %l0, %o0 /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 40016ce8: 80 a4 20 00 cmp %l0, 0 40016cec: 12 80 00 25 bne 40016d80 40016cf0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); } return 0; } 40016cf4: 81 c7 e0 08 ret 40016cf8: 91 e8 20 00 restore %g0, 0, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40016cfc: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40016d00: 82 00 60 01 inc %g1 40016d04: c2 24 23 30 st %g1, [ %l0 + 0x330 ] * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); 40016d08: 7f ff ee 67 call 400126a4 <_Thread_Yield_processor> 40016d0c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40016d10: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40016d14: 82 00 7f ff add %g1, -1, %g1 40016d18: c2 24 23 30 st %g1, [ %l0 + 0x330 ] 40016d1c: c4 04 23 30 ld [ %l0 + 0x330 ], %g2 40016d20: 80 a0 a0 00 cmp %g2, 0 40016d24: 02 80 00 13 be 40016d70 40016d28: 01 00 00 00 nop _Thread_Enable_dispatch(); if ( rmtp ) { 40016d2c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40016d30: 02 bf ff f1 be 40016cf4 40016d34: 01 00 00 00 nop rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 40016d38: c0 26 60 04 clr [ %i1 + 4 ] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 40016d3c: c0 26 40 00 clr [ %i1 ] rmtp->tv_nsec = 0; 40016d40: 81 c7 e0 08 ret 40016d44: 91 e8 20 00 restore %g0, 0, %o0 * * NOTE: This behavior is beyond the POSIX specification. * FSU and GNU/Linux pthreads shares this behavior. */ if ( rqtp->tv_sec < 0 || rqtp->tv_nsec < 0 ) rtems_set_errno_and_return_minus_one( EINVAL ); 40016d48: 40 00 11 c1 call 4001b44c <__errno> 40016d4c: b0 10 3f ff mov -1, %i0 40016d50: 82 10 20 16 mov 0x16, %g1 40016d54: c2 22 00 00 st %g1, [ %o0 ] 40016d58: 81 c7 e0 08 ret 40016d5c: 81 e8 00 00 restore _Thread_Dispatch(); 40016d60: 7f ff ea 23 call 400115ec <_Thread_Dispatch> 40016d64: 01 00 00 00 nop _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { 40016d68: 10 bf ff d7 b 40016cc4 40016d6c: 80 a6 60 00 cmp %i1, 0 40016d70: 7f ff ea 1f call 400115ec <_Thread_Dispatch> 40016d74: 01 00 00 00 nop if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 40016d78: 10 bf ff ee b 40016d30 40016d7c: 80 a6 60 00 cmp %i1, 0 /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 40016d80: 40 00 11 b3 call 4001b44c <__errno> 40016d84: b0 10 3f ff mov -1, %i0 40016d88: 82 10 20 04 mov 4, %g1 40016d8c: c2 22 00 00 st %g1, [ %o0 ] 40016d90: 81 c7 e0 08 ret 40016d94: 81 e8 00 00 restore 40006de0 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 40006de0: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 40006de4: 80 a6 20 00 cmp %i0, 0 40006de8: 02 80 00 23 be 40006e74 40006dec: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 40006df0: d2 06 00 00 ld [ %i0 ], %o1 40006df4: 31 10 00 76 sethi %hi(0x4001d800), %i0 40006df8: 40 00 0d 56 call 4000a350 <_Objects_Get> 40006dfc: 90 16 23 40 or %i0, 0x340, %o0 ! 4001db40 <_POSIX_Barrier_Information> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40006e00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e04: 80 a0 60 00 cmp %g1, 0 40006e08: 12 80 00 14 bne 40006e58 40006e0c: 92 10 00 08 mov %o0, %o1 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 40006e10: c2 02 20 58 ld [ %o0 + 0x58 ], %g1 40006e14: 80 a0 60 00 cmp %g1, 0 40006e18: 02 80 00 1a be 40006e80 40006e1c: 90 16 23 40 or %i0, 0x340, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e20: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006e24: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 4001d690 <_Thread_Dispatch_disable_level> 40006e28: 90 10 20 10 mov 0x10, %o0 40006e2c: 84 00 bf ff add %g2, -1, %g2 40006e30: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 40006e34: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 40006e38: 80 a0 e0 00 cmp %g3, 0 40006e3c: 12 80 00 0c bne 40006e6c 40006e40: 01 00 00 00 nop _Thread_Dispatch(); 40006e44: 40 00 12 2f call 4000b700 <_Thread_Dispatch> 40006e48: 01 00 00 00 nop 40006e4c: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006e50: 81 c7 e0 08 ret 40006e54: 91 e8 00 08 restore %g0, %o0, %o0 if ( !barrier ) return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40006e58: 80 a0 60 02 cmp %g1, 2 40006e5c: 08 80 00 07 bleu 40006e78 40006e60: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006e64: 40 00 02 45 call 40007778 <== NOT EXECUTED 40006e68: 01 00 00 00 nop <== NOT EXECUTED } 40006e6c: 81 c7 e0 08 ret 40006e70: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006e74: 90 10 20 16 mov 0x16, %o0 } 40006e78: 81 c7 e0 08 ret 40006e7c: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006e80: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006e84: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006e88: 05 00 00 3f sethi %hi(0xfc00), %g2 40006e8c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40006e90: 82 08 40 02 and %g1, %g2, %g1 40006e94: 80 a0 40 03 cmp %g1, %g3 40006e98: 18 80 00 04 bgu 40006ea8 40006e9c: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 40006ea0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006ea4: c0 20 80 01 clr [ %g2 + %g1 ] */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 40006ea8: 40 00 0c e7 call 4000a244 <_Objects_Free> 40006eac: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006eb0: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006eb4: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 4001d690 <_Thread_Dispatch_disable_level> 40006eb8: 90 10 20 00 clr %o0 40006ebc: 84 00 bf ff add %g2, -1, %g2 40006ec0: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 40006ec4: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 40006ec8: 80 a0 e0 00 cmp %g3, 0 40006ecc: 12 bf ff e8 bne 40006e6c 40006ed0: 01 00 00 00 nop _Thread_Dispatch(); 40006ed4: 40 00 12 0b call 4000b700 <_Thread_Dispatch> 40006ed8: 01 00 00 00 nop 40006edc: 10 bf ff e4 b 40006e6c 40006ee0: 90 10 20 00 clr %o0 ! 0 40006ee4 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 40006ee4: 9d e3 bf 88 save %sp, -120, %sp const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 40006ee8: 80 a6 20 00 cmp %i0, 0 40006eec: 02 80 00 27 be 40006f88 40006ef0: a0 10 00 19 mov %i1, %l0 return EINVAL; if ( count == 0 ) 40006ef4: 80 a6 a0 00 cmp %i2, 0 40006ef8: 02 80 00 24 be 40006f88 40006efc: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40006f00: 22 80 00 25 be,a 40006f94 40006f04: a0 07 bf e8 add %fp, -24, %l0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40006f08: c2 04 00 00 ld [ %l0 ], %g1 40006f0c: 80 a0 60 00 cmp %g1, 0 40006f10: 22 80 00 1c be,a 40006f80 40006f14: b0 10 20 16 mov 0x16, %i0 return EINVAL; switch ( the_attr->process_shared ) { 40006f18: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006f1c: 80 a0 60 00 cmp %g1, 0 40006f20: 32 80 00 18 bne,a 40006f80 40006f24: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006f28: 33 10 00 75 sethi %hi(0x4001d400), %i1 40006f2c: c2 06 62 90 ld [ %i1 + 0x290 ], %g1 ! 4001d690 <_Thread_Dispatch_disable_level> /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 40006f30: f4 27 bf f4 st %i2, [ %fp + -12 ] 40006f34: 82 00 60 01 inc %g1 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 40006f38: c0 27 bf f0 clr [ %fp + -16 ] 40006f3c: c2 26 62 90 st %g1, [ %i1 + 0x290 ] * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) 40006f40: 35 10 00 76 sethi %hi(0x4001d800), %i2 40006f44: 40 00 0b b2 call 40009e0c <_Objects_Allocate> 40006f48: 90 16 a3 40 or %i2, 0x340, %o0 ! 4001db40 <_POSIX_Barrier_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 40006f4c: a0 92 20 00 orcc %o0, 0, %l0 40006f50: 12 80 00 15 bne 40006fa4 40006f54: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006f58: c2 06 62 90 ld [ %i1 + 0x290 ], %g1 40006f5c: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40006f60: 82 00 7f ff add %g1, -1, %g1 40006f64: c2 26 62 90 st %g1, [ %i1 + 0x290 ] 40006f68: c4 06 62 90 ld [ %i1 + 0x290 ], %g2 40006f6c: 80 a0 a0 00 cmp %g2, 0 40006f70: 12 80 00 07 bne 40006f8c 40006f74: 01 00 00 00 nop 40006f78: 40 00 11 e2 call 4000b700 <_Thread_Dispatch> 40006f7c: 01 00 00 00 nop 40006f80: 81 c7 e0 08 ret 40006f84: 81 e8 00 00 restore 40006f88: b0 10 20 16 mov 0x16, %i0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 40006f8c: 81 c7 e0 08 ret 40006f90: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 40006f94: 7f ff ff 7d call 40006d88 40006f98: 90 10 00 10 mov %l0, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40006f9c: 10 bf ff dc b 40006f0c 40006fa0: c2 04 00 00 ld [ %l0 ], %g1 if ( !the_barrier ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 40006fa4: 40 00 08 d9 call 40009308 <_CORE_barrier_Initialize> 40006fa8: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006fac: 90 16 a3 40 or %i2, 0x340, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006fb0: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006fb4: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40006fb8: 03 00 00 3f sethi %hi(0xfc00), %g1 40006fbc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006fc0: 82 08 c0 01 and %g3, %g1, %g1 40006fc4: 80 a0 40 02 cmp %g1, %g2 40006fc8: 38 80 00 06 bgu,a 40006fe0 40006fcc: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006fd0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006fd4: 83 28 60 02 sll %g1, 2, %g1 40006fd8: e0 20 80 01 st %l0, [ %g2 + %g1 ] ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 40006fdc: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006fe0: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006fe4: c2 06 62 90 ld [ %i1 + 0x290 ], %g1 40006fe8: 10 bf ff de b 40006f60 40006fec: b0 10 20 00 clr %i0 40006ff0 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 40006ff0: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 40006ff4: 80 a6 20 00 cmp %i0, 0 40006ff8: 02 80 00 24 be 40007088 40006ffc: 11 10 00 76 sethi %hi(0x4001d800), %o0 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 40007000: d2 06 00 00 ld [ %i0 ], %o1 40007004: 94 07 bf f4 add %fp, -12, %o2 40007008: 40 00 0c d2 call 4000a350 <_Objects_Get> 4000700c: 90 12 23 40 or %o0, 0x340, %o0 return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40007010: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007014: 80 a0 60 00 cmp %g1, 0 40007018: 22 80 00 09 be,a 4000703c 4000701c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40007020: 80 a0 60 02 cmp %g1, 2 40007024: 08 80 00 1a bleu 4000708c 40007028: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 4000702c: 40 00 01 d3 call 40007778 <== NOT EXECUTED 40007030: 01 00 00 00 nop <== NOT EXECUTED } 40007034: 81 c7 e0 08 ret <== NOT EXECUTED 40007038: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_barrier_Wait( 4000703c: 94 10 20 01 mov 1, %o2 40007040: 90 02 20 10 add %o0, 0x10, %o0 40007044: 96 10 20 00 clr %o3 40007048: 40 00 08 bc call 40009338 <_CORE_barrier_Wait> 4000704c: 98 10 20 00 clr %o4 40007050: 03 10 00 75 sethi %hi(0x4001d400), %g1 40007054: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 4001d690 <_Thread_Dispatch_disable_level> 40007058: 84 00 bf ff add %g2, -1, %g2 4000705c: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 40007060: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 40007064: 80 a0 e0 00 cmp %g3, 0 40007068: 02 80 00 0b be 40007094 4000706c: 01 00 00 00 nop TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 40007070: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40007074: c4 00 63 6c ld [ %g1 + 0x36c ], %g2 ! 4001d76c <_Thread_Executing> 40007078: 40 00 20 1a call 4000f0e0 <_POSIX_Barrier_Translate_core_barrier_return_code> 4000707c: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40007080: 81 c7 e0 08 ret 40007084: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007088: 90 10 20 16 mov 0x16, %o0 } 4000708c: 81 c7 e0 08 ret 40007090: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007094: 40 00 11 9b call 4000b700 <_Thread_Dispatch> 40007098: 01 00 00 00 nop TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 4000709c: 10 bf ff f6 b 40007074 400070a0: 03 10 00 75 sethi %hi(0x4001d400), %g1 400064c8 : */ int pthread_cancel( pthread_t thread ) { 400064c8: 9d e3 bf 90 save %sp, -112, %sp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 400064cc: 03 10 00 63 sethi %hi(0x40018c00), %g1 400064d0: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> */ int pthread_cancel( pthread_t thread ) { 400064d4: 92 10 00 18 mov %i0, %o1 /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 400064d8: 80 a0 a0 00 cmp %g2, 0 400064dc: 12 80 00 11 bne 40006520 400064e0: 90 10 20 47 mov 0x47, %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 400064e4: 11 10 00 64 sethi %hi(0x40019000), %o0 400064e8: 94 07 bf f4 add %fp, -12, %o2 400064ec: 40 00 0d aa call 40009b94 <_Objects_Get> 400064f0: 90 12 21 b8 or %o0, 0x1b8, %o0 return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400064f4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400064f8: 80 a0 60 01 cmp %g1, 1 400064fc: 02 80 00 22 be 40006584 40006500: 01 00 00 00 nop 40006504: 2a 80 00 09 bcs,a 40006528 40006508: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 4000650c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006510: 02 80 00 04 be 40006520 <== NOT EXECUTED 40006514: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006518: 40 00 02 d9 call 4000707c <== NOT EXECUTED 4000651c: 01 00 00 00 nop <== NOT EXECUTED } 40006520: 81 c7 e0 08 ret <== NOT EXECUTED 40006524: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: return POSIX_MP_NOT_IMPLEMENTED(); case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 40006528: 82 10 20 01 mov 1, %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000652c: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 40006530: 80 a0 a0 00 cmp %g2, 0 40006534: 12 80 00 06 bne 4000654c 40006538: c2 20 e0 d4 st %g1, [ %g3 + 0xd4 ] 4000653c: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 40006540: 80 a0 60 01 cmp %g1, 1 40006544: 02 80 00 14 be 40006594 40006548: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000654c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006550: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 40018ed0 <_Thread_Dispatch_disable_level> 40006554: 90 10 20 00 clr %o0 40006558: 84 00 bf ff add %g2, -1, %g2 4000655c: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ] 40006560: c6 00 62 d0 ld [ %g1 + 0x2d0 ], %g3 40006564: 80 a0 e0 00 cmp %g3, 0 40006568: 12 bf ff ee bne 40006520 4000656c: 01 00 00 00 nop _Thread_Dispatch(); 40006570: 40 00 12 75 call 4000af44 <_Thread_Dispatch> 40006574: 01 00 00 00 nop 40006578: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000657c: 81 c7 e0 08 ret 40006580: 91 e8 00 08 restore %g0, %o0, %o0 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_ERROR: return EINVAL; case OBJECTS_REMOTE: return POSIX_MP_NOT_IMPLEMENTED(); 40006584: 40 00 02 c8 call 400070a4 <== NOT EXECUTED 40006588: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000658c: 81 c7 e0 08 ret <== NOT EXECUTED 40006590: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED thread_support->cancelation_requested = 1; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS ) { _POSIX_Threads_cancel_run( the_thread ); 40006594: 40 00 00 03 call 400065a0 <_POSIX_Threads_cancel_run> 40006598: 01 00 00 00 nop 4000659c: 30 bf ff ec b,a 4000654c 4000778c : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 4000778c: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40007790: 80 a6 20 00 cmp %i0, 0 40007794: 32 80 00 05 bne,a 400077a8 40007798: d2 06 00 00 ld [ %i0 ], %o1 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000779c: 90 10 20 16 mov 0x16, %o0 } 400077a0: 81 c7 e0 08 ret 400077a4: 91 e8 00 08 restore %g0, %o0, %o0 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 400077a8: 80 a2 7f ff cmp %o1, -1 400077ac: 02 80 00 3d be 400078a0 400077b0: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 400077b4: 21 10 00 6a sethi %hi(0x4001a800), %l0 400077b8: 94 07 bf f4 add %fp, -12, %o2 400077bc: 40 00 10 02 call 4000b7c4 <_Objects_Get> 400077c0: 90 14 21 bc or %l0, 0x1bc, %o0 { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 400077c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400077c8: 80 a0 60 00 cmp %g1, 0 400077cc: 12 80 00 14 bne 4000781c 400077d0: b0 10 00 08 mov %o0, %i0 return EINVAL; case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 400077d4: 40 00 17 5e call 4000d54c <_Thread_queue_First> 400077d8: 90 02 20 18 add %o0, 0x18, %o0 400077dc: 80 a2 20 00 cmp %o0, 0 400077e0: 02 80 00 15 be 40007834 400077e4: 90 14 21 bc or %l0, 0x1bc, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400077e8: 03 10 00 69 sethi %hi(0x4001a400), %g1 400077ec: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 4001a470 <_Thread_Dispatch_disable_level> 400077f0: 90 10 20 10 mov 0x10, %o0 400077f4: 84 00 bf ff add %g2, -1, %g2 400077f8: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 400077fc: c6 00 60 70 ld [ %g1 + 0x70 ], %g3 40007800: 80 a0 e0 00 cmp %g3, 0 40007804: 12 bf ff e7 bne 400077a0 40007808: 01 00 00 00 nop _Thread_Dispatch(); 4000780c: 40 00 14 da call 4000cb74 <_Thread_Dispatch> 40007810: 01 00 00 00 nop 40007814: 10 bf ff e3 b 400077a0 40007818: 90 10 20 10 mov 0x10, %o0 ! 10 { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 4000781c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007820: 28 bf ff e0 bleu,a 400077a0 <== NOT EXECUTED 40007824: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007828: 40 00 05 3f call 40008d24 <== NOT EXECUTED 4000782c: 01 00 00 00 nop <== NOT EXECUTED 40007830: 30 bf ff dc b,a 400077a0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40007834: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007838: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000783c: 05 00 00 3f sethi %hi(0xfc00), %g2 40007840: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40007844: 82 08 40 02 and %g1, %g2, %g1 40007848: 80 a0 40 03 cmp %g1, %g3 4000784c: 38 80 00 06 bgu,a 40007864 40007850: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40007854: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007858: 83 28 60 02 sll %g1, 2, %g1 4000785c: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40007860: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 40007864: 40 00 0f 95 call 4000b6b8 <_Objects_Free> 40007868: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000786c: 03 10 00 69 sethi %hi(0x4001a400), %g1 40007870: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 4001a470 <_Thread_Dispatch_disable_level> 40007874: 90 10 20 00 clr %o0 40007878: 84 00 bf ff add %g2, -1, %g2 4000787c: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 40007880: c6 00 60 70 ld [ %g1 + 0x70 ], %g3 40007884: 80 a0 e0 00 cmp %g3, 0 40007888: 12 bf ff c6 bne 400077a0 4000788c: 01 00 00 00 nop _Thread_Dispatch(); 40007890: 40 00 14 b9 call 4000cb74 <_Thread_Dispatch> 40007894: 01 00 00 00 nop 40007898: 10 bf ff c2 b 400077a0 4000789c: 90 10 20 00 clr %o0 ! 0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 400078a0: 40 00 00 07 call 400078bc <== NOT EXECUTED 400078a4: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 400078a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400078ac: 12 bf ff bd bne 400077a0 <== NOT EXECUTED 400078b0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 400078b4: 10 bf ff c0 b 400077b4 <== NOT EXECUTED 400078b8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400078bc : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 400078bc: 9d e3 bf 98 save %sp, -104, %sp POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 400078c0: 03 10 00 61 sethi %hi(0x40018400), %g1 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 400078c4: a6 10 00 18 mov %i0, %l3 POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 400078c8: 80 a6 60 00 cmp %i1, 0 400078cc: 02 80 00 03 be 400078d8 400078d0: a0 10 61 94 or %g1, 0x194, %l0 400078d4: a0 10 00 19 mov %i1, %l0 /* * XXX: Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 400078d8: c2 04 20 04 ld [ %l0 + 4 ], %g1 400078dc: 80 a0 60 01 cmp %g1, 1 400078e0: 02 80 00 3d be 400079d4 400078e4: 01 00 00 00 nop return POSIX_MP_NOT_IMPLEMENTED(); if ( !the_attr->is_initialized ) 400078e8: c2 04 00 00 ld [ %l0 ], %g1 400078ec: 80 a0 60 00 cmp %g1, 0 400078f0: 02 80 00 16 be 40007948 400078f4: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400078f8: 23 10 00 69 sethi %hi(0x4001a400), %l1 400078fc: c2 04 60 70 ld [ %l1 + 0x70 ], %g1 ! 4001a470 <_Thread_Dispatch_disable_level> 40007900: 82 00 60 01 inc %g1 40007904: c2 24 60 70 st %g1, [ %l1 + 0x70 ] */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 40007908: 25 10 00 6a sethi %hi(0x4001a800), %l2 4000790c: 40 00 0e 5d call 4000b280 <_Objects_Allocate> 40007910: 90 14 a1 bc or %l2, 0x1bc, %o0 ! 4001a9bc <_POSIX_Condition_variables_Information> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 40007914: b2 92 20 00 orcc %o0, 0, %i1 40007918: 32 80 00 0e bne,a 40007950 4000791c: c2 04 20 04 ld [ %l0 + 4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007920: c2 04 60 70 ld [ %l1 + 0x70 ], %g1 40007924: b0 10 20 0c mov 0xc, %i0 40007928: 82 00 7f ff add %g1, -1, %g1 4000792c: c2 24 60 70 st %g1, [ %l1 + 0x70 ] 40007930: c4 04 60 70 ld [ %l1 + 0x70 ], %g2 40007934: 80 a0 a0 00 cmp %g2, 0 40007938: 12 80 00 25 bne 400079cc 4000793c: 01 00 00 00 nop _Thread_Dispatch(); 40007940: 40 00 14 8d call 4000cb74 <_Thread_Dispatch> 40007944: 01 00 00 00 nop 40007948: 81 c7 e0 08 ret 4000794c: 81 e8 00 00 restore the_cond->process_shared = the_attr->process_shared; the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 40007950: 90 06 60 18 add %i1, 0x18, %o0 _Thread_Enable_dispatch(); return EAGAIN; } #endif the_cond->process_shared = the_attr->process_shared; 40007954: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 40007958: c0 26 60 14 clr [ %i1 + 0x14 ] /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 4000795c: 92 10 20 00 clr %o1 40007960: 94 10 28 00 mov 0x800, %o2 40007964: 40 00 17 24 call 4000d5f4 <_Thread_queue_Initialize> 40007968: 96 10 20 74 mov 0x74, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000796c: 90 14 a1 bc or %l2, 0x1bc, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40007970: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007974: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40007978: 03 00 00 3f sethi %hi(0xfc00), %g1 4000797c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007980: 82 08 c0 01 and %g3, %g1, %g1 40007984: 80 a0 40 02 cmp %g1, %g2 40007988: 38 80 00 06 bgu,a 400079a0 4000798c: c6 24 c0 00 st %g3, [ %l3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40007990: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007994: 83 28 60 02 sll %g1, 2, %g1 40007998: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 4000799c: c6 24 c0 00 st %g3, [ %l3 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400079a0: c0 26 60 0c clr [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400079a4: c2 04 60 70 ld [ %l1 + 0x70 ], %g1 400079a8: b0 10 20 00 clr %i0 400079ac: 82 00 7f ff add %g1, -1, %g1 400079b0: c2 24 60 70 st %g1, [ %l1 + 0x70 ] 400079b4: c4 04 60 70 ld [ %l1 + 0x70 ], %g2 400079b8: 80 a0 a0 00 cmp %g2, 0 400079bc: 12 80 00 04 bne 400079cc 400079c0: 01 00 00 00 nop _Thread_Dispatch(); 400079c4: 40 00 14 6c call 4000cb74 <_Thread_Dispatch> 400079c8: 01 00 00 00 nop #endif _Thread_Enable_dispatch(); return 0; } 400079cc: 81 c7 e0 08 ret 400079d0: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return POSIX_MP_NOT_IMPLEMENTED(); 400079d4: 40 00 04 de call 40008d4c <== NOT EXECUTED 400079d8: 81 e8 00 00 restore <== NOT EXECUTED 400079dc: 01 00 00 00 nop 40007738 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 40007738: 9d e3 bf 68 save %sp, -152, %sp Thread_Control *the_thread; POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 4000773c: 03 10 00 77 sethi %hi(0x4001dc00), %g1 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 40007740: ac 10 00 18 mov %i0, %l6 Thread_Control *the_thread; POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40007744: 80 a6 60 00 cmp %i1, 0 40007748: 02 80 00 03 be 40007754 4000774c: a2 10 61 18 or %g1, 0x118, %l1 40007750: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 40007754: c2 04 40 00 ld [ %l1 ], %g1 40007758: 80 a0 60 00 cmp %g1, 0 4000775c: 02 80 00 10 be 4000779c 40007760: 01 00 00 00 nop /* * Core Thread Initialize insures we get the minimum amount of * stack space if it is allowed to allocate it itself. */ if ( the_attr->stackaddr && !_Stack_Is_enough( the_attr->stacksize ) ) 40007764: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007768: 80 a0 60 00 cmp %g1, 0 4000776c: 22 80 00 07 be,a 40007788 40007770: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40007774: c2 04 60 08 ld [ %l1 + 8 ], %g1 40007778: 80 a0 6f ff cmp %g1, 0xfff 4000777c: 08 80 00 08 bleu 4000779c 40007780: 01 00 00 00 nop * 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 ) { 40007784: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 40007788: 80 a0 60 01 cmp %g1, 1 4000778c: 02 80 00 34 be 4000785c 40007790: 80 a0 60 02 cmp %g1, 2 40007794: 22 80 00 04 be,a 400077a4 40007798: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 4000779c: 81 c7 e0 08 ret 400077a0: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 400077a4: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 400077a8: c4 27 bf e0 st %g2, [ %fp + -32 ] 400077ac: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 400077b0: c2 27 bf e4 st %g1, [ %fp + -28 ] 400077b4: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 400077b8: c4 27 bf e8 st %g2, [ %fp + -24 ] 400077bc: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 400077c0: c2 27 bf ec st %g1, [ %fp + -20 ] 400077c4: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 400077c8: c4 27 bf f0 st %g2, [ %fp + -16 ] 400077cc: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 400077d0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 400077d4: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400077d8: 80 a0 60 00 cmp %g1, 0 400077dc: 12 80 00 1e bne 40007854 400077e0: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 400077e4: e6 07 bf e0 ld [ %fp + -32 ], %l3 400077e8: 82 04 ff ff add %l3, -1, %g1 400077ec: 80 a0 60 fd cmp %g1, 0xfd 400077f0: 18 bf ff eb bgu 4000779c 400077f4: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400077f8: 02 80 00 41 be 400078fc 400077fc: a8 10 20 00 clr %l4 40007800: 04 80 00 41 ble 40007904 40007804: 80 a6 60 02 cmp %i1, 2 40007808: 02 80 00 26 be 400078a0 4000780c: 80 a6 60 03 cmp %i1, 3 40007810: 12 bf ff e3 bne 4000779c 40007814: 01 00 00 00 nop case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 40007818: 40 00 17 62 call 4000d5a0 <_Timespec_To_ticks> 4000781c: 90 07 bf e8 add %fp, -24, %o0 40007820: a0 10 00 08 mov %o0, %l0 40007824: 40 00 17 5f call 4000d5a0 <_Timespec_To_ticks> 40007828: 90 07 bf f0 add %fp, -16, %o0 4000782c: 80 a4 00 08 cmp %l0, %o0 40007830: 0a bf ff db bcs 4000779c 40007834: c2 07 bf e4 ld [ %fp + -28 ], %g1 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 40007838: 82 00 7f ff add %g1, -1, %g1 4000783c: 80 a0 60 fd cmp %g1, 0xfd 40007840: 18 bf ff d7 bgu 4000779c 40007844: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007848: a8 10 20 03 mov 3, %l4 4000784c: 10 80 00 17 b 400078a8 40007850: b0 10 62 c4 or %g1, 0x2c4, %i0 *thread = the_thread->Object.id; _Thread_Enable_dispatch(); return 0; } 40007854: 81 c7 e0 08 ret 40007858: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4000785c: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40007860: c4 00 61 dc ld [ %g1 + 0x1dc ], %g2 ! 4001fddc <_Thread_Executing> 40007864: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 40007868: c8 00 e0 80 ld [ %g3 + 0x80 ], %g4 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 4000786c: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 40007870: c8 27 bf e0 st %g4, [ %fp + -32 ] 40007874: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 40007878: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000787c: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 40007880: c4 27 bf e8 st %g2, [ %fp + -24 ] 40007884: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 40007888: c2 27 bf ec st %g1, [ %fp + -20 ] 4000788c: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40007890: c4 27 bf f0 st %g2, [ %fp + -16 ] 40007894: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 40007898: 10 bf ff cf b 400077d4 4000789c: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400078a0: a8 10 20 02 mov 2, %l4 <== NOT EXECUTED 400078a4: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400078a8: 25 10 00 7f sethi %hi(0x4001fc00), %l2 400078ac: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 ! 4001fd00 <_Thread_Dispatch_disable_level> 400078b0: 82 00 60 01 inc %g1 400078b4: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 400078b8: 2b 10 00 7f sethi %hi(0x4001fc00), %l5 400078bc: 40 00 0c 4e call 4000a9f4 <_Objects_Allocate> 400078c0: 90 15 63 e8 or %l5, 0x3e8, %o0 ! 4001ffe8 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 400078c4: a0 92 20 00 orcc %o0, 0, %l0 400078c8: 32 80 00 14 bne,a 40007918 400078cc: d4 04 60 04 ld [ %l1 + 4 ], %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400078d0: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 400078d4: 82 00 7f ff add %g1, -1, %g1 400078d8: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] 400078dc: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 400078e0: 80 a0 a0 00 cmp %g2, 0 400078e4: 12 bf ff dc bne 40007854 400078e8: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 400078ec: 40 00 12 7f call 4000c2e8 <_Thread_Dispatch> 400078f0: 01 00 00 00 nop 400078f4: 81 c7 e0 08 ret 400078f8: 81 e8 00 00 restore */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400078fc: 10 bf ff eb b 400078a8 40007900: b0 10 20 00 clr %i0 40007904: 80 a6 60 00 cmp %i1, 0 40007908: a8 10 20 01 mov 1, %l4 4000790c: 02 bf ff e7 be 400078a8 40007910: b0 10 20 00 clr %i0 40007914: 30 bf ff a2 b,a 4000779c /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 40007918: d6 04 60 08 ld [ %l1 + 8 ], %o3 4000791c: 9a 10 20 ff mov 0xff, %o5 40007920: e8 23 a0 60 st %l4, [ %sp + 0x60 ] 40007924: f0 23 a0 64 st %i0, [ %sp + 0x64 ] 40007928: c0 23 a0 68 clr [ %sp + 0x68 ] 4000792c: c0 23 a0 6c clr [ %sp + 0x6c ] 40007930: 9a 23 40 13 sub %o5, %l3, %o5 40007934: a8 10 20 01 mov 1, %l4 40007938: 90 15 63 e8 or %l5, 0x3e8, %o0 4000793c: e8 23 a0 5c st %l4, [ %sp + 0x5c ] 40007940: 92 10 00 10 mov %l0, %o1 40007944: 40 00 12 d7 call 4000c4a0 <_Thread_Initialize> 40007948: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ NULL /* posix threads don't have a name */ ); if ( !status ) { 4000794c: 80 a2 20 00 cmp %o0, 0 40007950: 12 80 00 05 bne 40007964 40007954: 90 15 63 e8 or %l5, 0x3e8, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 40007958: 40 00 0d 35 call 4000ae2c <_Objects_Free> 4000795c: 92 10 00 10 mov %l0, %o1 40007960: 30 bf ff dc b,a 400078d0 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40007964: e6 04 21 70 ld [ %l0 + 0x170 ], %l3 api->Attributes = *the_attr; 40007968: 92 10 00 11 mov %l1, %o1 4000796c: 94 10 20 38 mov 0x38, %o2 40007970: 40 00 2a 61 call 400122f4 40007974: 90 10 00 13 mov %l3, %o0 api->detachstate = the_attr->detachstate; 40007978: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 4000797c: f2 24 e0 7c st %i1, [ %l3 + 0x7c ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 40007980: c2 24 e0 38 st %g1, [ %l3 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007984: c2 07 bf e0 ld [ %fp + -32 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007988: 94 10 00 1a mov %i2, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000798c: c2 24 e0 80 st %g1, [ %l3 + 0x80 ] 40007990: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007994: 96 10 00 1b mov %i3, %o3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007998: c2 24 e0 84 st %g1, [ %l3 + 0x84 ] 4000799c: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079a0: 90 10 00 10 mov %l0, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400079a4: c2 24 e0 88 st %g1, [ %l3 + 0x88 ] 400079a8: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079ac: 92 10 20 01 mov 1, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400079b0: c2 24 e0 8c st %g1, [ %l3 + 0x8c ] 400079b4: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079b8: 98 10 20 00 clr %o4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400079bc: c2 24 e0 90 st %g1, [ %l3 + 0x90 ] 400079c0: c4 07 bf f4 ld [ %fp + -12 ], %g2 400079c4: c4 24 e0 94 st %g2, [ %l3 + 0x94 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079c8: 40 00 16 39 call 4000d2ac <_Thread_Start> 400079cc: e8 24 20 78 st %l4, [ %l0 + 0x78 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 400079d0: 80 a6 60 03 cmp %i1, 3 400079d4: 02 80 00 12 be 40007a1c 400079d8: a2 10 00 08 mov %o0, %l1 /* * _Thread_Start only fails if the thread was in the incorrect state */ if ( !status ) { 400079dc: 80 a4 60 00 cmp %l1, 0 400079e0: 12 80 00 18 bne 40007a40 400079e4: 90 15 63 e8 or %l5, 0x3e8, %o0 400079e8: 40 00 0d 11 call 4000ae2c <_Objects_Free> <== NOT EXECUTED 400079ec: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400079f0: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 <== NOT EXECUTED 400079f4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400079f8: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] <== NOT EXECUTED 400079fc: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 <== NOT EXECUTED 40007a00: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40007a04: 12 bf ff 66 bne 4000779c <== NOT EXECUTED 40007a08: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40007a0c: 40 00 12 37 call 4000c2e8 <_Thread_Dispatch> <== NOT EXECUTED 40007a10: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40007a14: 81 c7 e0 08 ret <== NOT EXECUTED 40007a18: 81 e8 00 00 restore <== NOT EXECUTED arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 40007a1c: 40 00 16 e1 call 4000d5a0 <_Timespec_To_ticks> 40007a20: 90 04 e0 88 add %l3, 0x88, %o0 40007a24: 92 04 e0 9c add %l3, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007a28: d0 24 e0 a8 st %o0, [ %l3 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007a2c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 40007a30: 40 00 17 ef call 4000d9ec <_Watchdog_Insert> 40007a34: 90 12 21 fc or %o0, 0x1fc, %o0 ! 4001fdfc <_Watchdog_Ticks_chain> /* * _Thread_Start only fails if the thread was in the incorrect state */ if ( !status ) { 40007a38: 10 bf ff ea b 400079e0 40007a3c: 80 a4 60 00 cmp %l1, 0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 40007a40: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007a44: c2 25 80 00 st %g1, [ %l6 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007a48: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 40007a4c: b0 10 20 00 clr %i0 40007a50: 82 00 7f ff add %g1, -1, %g1 40007a54: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] 40007a58: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 40007a5c: 80 a0 a0 00 cmp %g2, 0 40007a60: 12 80 00 04 bne 40007a70 40007a64: 01 00 00 00 nop _Thread_Dispatch(); 40007a68: 40 00 12 20 call 4000c2e8 <_Thread_Dispatch> 40007a6c: 01 00 00 00 nop 40007a70: 81 c7 e0 08 ret 40007a74: 81 e8 00 00 restore 40006df8 : #include int pthread_detach( pthread_t thread ) { 40006df8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40006dfc: 11 10 00 64 sethi %hi(0x40019000), %o0 40006e00: 92 10 00 18 mov %i0, %o1 40006e04: 90 12 20 18 or %o0, 0x18, %o0 40006e08: 40 00 0c 94 call 4000a058 <_Objects_Get> 40006e0c: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40006e10: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e14: 80 a0 60 00 cmp %g1, 0 40006e18: 12 80 00 0f bne 40006e54 40006e1c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 40006e20: c2 02 21 70 ld [ %o0 + 0x170 ], %g1 40006e24: c0 20 60 38 clr [ %g1 + 0x38 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e28: 07 10 00 63 sethi %hi(0x40018c00), %g3 40006e2c: c2 00 e1 30 ld [ %g3 + 0x130 ], %g1 ! 40018d30 <_Thread_Dispatch_disable_level> 40006e30: 90 10 20 00 clr %o0 40006e34: 82 00 7f ff add %g1, -1, %g1 40006e38: c2 20 e1 30 st %g1, [ %g3 + 0x130 ] 40006e3c: c4 00 e1 30 ld [ %g3 + 0x130 ], %g2 40006e40: 80 a0 a0 00 cmp %g2, 0 40006e44: 02 80 00 0a be 40006e6c 40006e48: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006e4c: 81 c7 e0 08 ret 40006e50: 91 e8 00 08 restore %g0, %o0, %o0 register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40006e54: 08 bf ff fe bleu 40006e4c 40006e58: 90 10 20 03 mov 3, %o0 api->detachstate = PTHREAD_CREATE_DETACHED; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006e5c: 40 00 01 c6 call 40007574 <== NOT EXECUTED 40006e60: 01 00 00 00 nop <== NOT EXECUTED } 40006e64: 81 c7 e0 08 ret <== NOT EXECUTED 40006e68: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40006e6c: 40 00 11 67 call 4000b408 <_Thread_Dispatch> 40006e70: 01 00 00 00 nop 40006e74: 90 10 20 00 clr %o0 ! 0 40006e78: 81 c7 e0 08 ret 40006e7c: 91 e8 00 08 restore %g0, %o0, %o0 4000f82c : #include void pthread_exit( void *value_ptr ) { 4000f82c: 9d e3 bf 98 save %sp, -104, %sp Objects_Information *the_information; the_information = _Objects_Get_information( _Thread_Executing->Object.id ); 4000f830: 25 10 00 6f sethi %hi(0x4001bc00), %l2 4000f834: c2 04 a2 bc ld [ %l2 + 0x2bc ], %g1 ! 4001bebc <_Thread_Executing> 4000f838: c6 00 60 08 ld [ %g1 + 8 ], %g3 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 4000f83c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000f840: 85 30 e0 16 srl %g3, 0x16, %g2 4000f844: 82 10 61 40 or %g1, 0x140, %g1 4000f848: 84 08 a0 1c and %g2, 0x1c, %g2 4000f84c: c8 00 40 02 ld [ %g1 + %g2 ], %g4 4000f850: 87 30 e0 1b srl %g3, 0x1b, %g3 4000f854: 87 28 e0 02 sll %g3, 2, %g3 4000f858: e2 01 00 03 ld [ %g4 + %g3 ], %l1 /* This should never happen if _Thread_Get() works right */ assert( the_information ); 4000f85c: 80 a4 60 00 cmp %l1, 0 4000f860: 22 80 00 19 be,a 4000f8c4 4000f864: 11 10 00 68 sethi %hi(0x4001a000), %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f868: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000f86c: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000f870: 82 00 60 01 inc %g1 4000f874: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] _Thread_Disable_dispatch(); _Thread_Executing->Wait.return_argument = value_ptr; 4000f878: d2 04 a2 bc ld [ %l2 + 0x2bc ], %o1 _Thread_Close( the_information, _Thread_Executing ); 4000f87c: 90 10 00 11 mov %l1, %o0 4000f880: 7f ff ea 48 call 4000a1a0 <_Thread_Close> 4000f884: f0 22 60 28 st %i0, [ %o1 + 0x28 ] RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 4000f888: d2 04 a2 bc ld [ %l2 + 0x2bc ], %o1 4000f88c: 11 10 00 70 sethi %hi(0x4001c000), %o0 4000f890: 7f ff e5 57 call 40008dec <_Objects_Free> 4000f894: 90 12 20 c8 or %o0, 0xc8, %o0 ! 4001c0c8 <_POSIX_Threads_Information> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f898: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 4000f89c: 82 00 7f ff add %g1, -1, %g1 4000f8a0: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 4000f8a4: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 4000f8a8: 80 a0 a0 00 cmp %g2, 0 4000f8ac: 02 80 00 04 be 4000f8bc 4000f8b0: 01 00 00 00 nop 4000f8b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000f8b8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000f8bc: 7f ff ea b7 call 4000a398 <_Thread_Dispatch> 4000f8c0: 81 e8 00 00 restore Objects_Information *the_information; the_information = _Objects_Get_information( _Thread_Executing->Object.id ); /* This should never happen if _Thread_Get() works right */ assert( the_information ); 4000f8c4: 15 10 00 68 sethi %hi(0x4001a000), %o2 <== NOT EXECUTED 4000f8c8: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED 4000f8cc: 94 12 a3 18 or %o2, 0x318, %o2 <== NOT EXECUTED 4000f8d0: 7f ff ce 01 call 400030d4 <__assert> <== NOT EXECUTED 4000f8d4: 92 10 20 25 mov 0x25, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f8d8: 10 bf ff e5 b 4000f86c <== NOT EXECUTED 4000f8dc: 21 10 00 6f sethi %hi(0x4001bc00), %l0 <== NOT EXECUTED 40009484 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 40009484: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 40009488: 80 a6 60 00 cmp %i1, 0 4000948c: 02 80 00 33 be 40009558 40009490: 92 10 00 18 mov %i0, %o1 40009494: 80 a6 a0 00 cmp %i2, 0 40009498: 02 80 00 30 be 40009558 4000949c: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 400094a0: 11 10 00 71 sethi %hi(0x4001c400), %o0 400094a4: 40 00 0c b0 call 4000c764 <_Objects_Get> 400094a8: 90 12 22 68 or %o0, 0x268, %o0 ! 4001c668 <_POSIX_Threads_Information> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400094ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 400094b0: 80 a0 60 00 cmp %g1, 0 400094b4: 22 80 00 09 be,a 400094d8 400094b8: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 400094bc: 80 a0 60 02 cmp %g1, 2 400094c0: 08 80 00 04 bleu 400094d0 400094c4: 90 10 20 03 mov 3, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400094c8: 40 00 01 ee call 40009c80 <== NOT EXECUTED 400094cc: 01 00 00 00 nop <== NOT EXECUTED } 400094d0: 81 c7 e0 08 ret 400094d4: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; 400094d8: c2 00 e0 7c ld [ %g3 + 0x7c ], %g1 400094dc: c2 26 40 00 st %g1, [ %i1 ] if ( param ) { *param = api->schedparam; 400094e0: c4 00 e0 80 ld [ %g3 + 0x80 ], %g2 400094e4: c4 26 80 00 st %g2, [ %i2 ] 400094e8: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 400094ec: c2 26 a0 04 st %g1, [ %i2 + 4 ] 400094f0: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 400094f4: c4 26 a0 08 st %g2, [ %i2 + 8 ] 400094f8: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 400094fc: c2 26 a0 0c st %g1, [ %i2 + 0xc ] 40009500: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40009504: c4 26 a0 10 st %g2, [ %i2 + 0x10 ] 40009508: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 4000950c: c2 26 a0 14 st %g1, [ %i2 + 0x14 ] param->sched_priority = 40009510: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40009514: 82 10 20 ff mov 0xff, %g1 40009518: 82 20 40 02 sub %g1, %g2, %g1 4000951c: c2 26 80 00 st %g1, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009520: 07 10 00 70 sethi %hi(0x4001c000), %g3 40009524: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40009528: 90 10 20 00 clr %o0 4000952c: 82 00 7f ff add %g1, -1, %g1 40009530: c2 20 e3 80 st %g1, [ %g3 + 0x380 ] 40009534: c4 00 e3 80 ld [ %g3 + 0x380 ], %g2 40009538: 80 a0 a0 00 cmp %g2, 0 4000953c: 12 bf ff e5 bne 400094d0 40009540: 01 00 00 00 nop _Thread_Dispatch(); 40009544: 40 00 11 74 call 4000db14 <_Thread_Dispatch> 40009548: 01 00 00 00 nop 4000954c: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); } 40009550: 81 c7 e0 08 ret 40009554: 91 e8 00 08 restore %g0, %o0, %o0 { Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 40009558: 10 bf ff de b 400094d0 4000955c: 90 10 20 16 mov 0x16, %o0 40006de4 : */ void *pthread_getspecific( pthread_key_t key ) { 40006de4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 40006de8: 11 10 00 65 sethi %hi(0x40019400), %o0 40006dec: 92 10 00 18 mov %i0, %o1 40006df0: 90 12 20 80 or %o0, 0x80, %o0 40006df4: 40 00 0d 4c call 4000a324 <_Objects_Get> 40006df8: 94 07 bf f4 add %fp, -12, %o2 uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006dfc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e00: 80 a0 60 00 cmp %g1, 0 40006e04: 12 80 00 18 bne 40006e64 40006e08: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return NULL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40006e0c: 03 10 00 64 sethi %hi(0x40019000), %g1 40006e10: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 ! 4001905c <_Thread_Executing> 40006e14: c6 00 a0 08 ld [ %g2 + 8 ], %g3 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 40006e18: 05 00 00 3f sethi %hi(0xfc00), %g2 40006e1c: 83 30 e0 16 srl %g3, 0x16, %g1 40006e20: 82 08 60 1c and %g1, 0x1c, %g1 40006e24: 82 00 40 08 add %g1, %o0, %g1 40006e28: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 40006e2c: 84 10 a3 ff or %g2, 0x3ff, %g2 40006e30: 86 08 c0 02 and %g3, %g2, %g3 40006e34: 87 28 e0 02 sll %g3, 2, %g3 40006e38: f0 01 00 03 ld [ %g4 + %g3 ], %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e3c: 05 10 00 63 sethi %hi(0x40018c00), %g2 40006e40: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 40018f80 <_Thread_Dispatch_disable_level> 40006e44: 82 00 7f ff add %g1, -1, %g1 40006e48: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] 40006e4c: c6 00 a3 80 ld [ %g2 + 0x380 ], %g3 40006e50: 80 a0 e0 00 cmp %g3, 0 40006e54: 02 80 00 0a be 40006e7c 40006e58: 01 00 00 00 nop _Thread_Enable_dispatch(); return key_data; } (void) POSIX_BOTTOM_REACHED(); return (void *)NULL; } 40006e5c: 81 c7 e0 08 ret 40006e60: 81 e8 00 00 restore uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006e64: 08 bf ff fe bleu 40006e5c 40006e68: b0 10 20 00 clr %i0 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; _Thread_Enable_dispatch(); return key_data; } (void) POSIX_BOTTOM_REACHED(); 40006e6c: 40 00 02 75 call 40007840 <== NOT EXECUTED 40006e70: 01 00 00 00 nop <== NOT EXECUTED return (void *)NULL; } 40006e74: 81 c7 e0 08 ret <== NOT EXECUTED 40006e78: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40006e7c: 40 00 12 16 call 4000b6d4 <_Thread_Dispatch> 40006e80: 01 00 00 00 nop 40006e84: 81 c7 e0 08 ret 40006e88: 81 e8 00 00 restore 40008954 : int pthread_join( pthread_t thread, void **value_ptr ) { 40008954: 9d e3 bf 90 save %sp, -112, %sp 40008958: 11 10 00 6d sethi %hi(0x4001b400), %o0 4000895c: 92 10 00 18 mov %i0, %o1 40008960: 90 12 23 68 or %o0, 0x368, %o0 40008964: 40 00 0c 65 call 4000baf8 <_Objects_Get> 40008968: 94 07 bf f4 add %fp, -12, %o2 POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4000896c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008970: 80 a0 60 00 cmp %g1, 0 40008974: 12 80 00 15 bne 400089c8 40008978: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000897c: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 40008980: c2 00 e0 38 ld [ %g3 + 0x38 ], %g1 40008984: 80 a0 60 00 cmp %g1, 0 40008988: 12 80 00 16 bne 400089e0 4000898c: 03 10 00 6d sethi %hi(0x4001b400), %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008990: 03 10 00 6d sethi %hi(0x4001b400), %g1 40008994: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 4001b480 <_Thread_Dispatch_disable_level> 40008998: 90 10 20 16 mov 0x16, %o0 4000899c: 84 00 bf ff add %g2, -1, %g2 400089a0: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 400089a4: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 400089a8: 80 a0 e0 00 cmp %g3, 0 400089ac: 12 80 00 05 bne 400089c0 400089b0: 01 00 00 00 nop _Thread_Dispatch(); 400089b4: 40 00 11 3d call 4000cea8 <_Thread_Dispatch> 400089b8: 01 00 00 00 nop 400089bc: 90 10 20 16 mov 0x16, %o0 ! 16 *value_ptr = return_pointer; return 0; } return POSIX_BOTTOM_REACHED(); } 400089c0: 81 c7 e0 08 ret 400089c4: 91 e8 00 08 restore %g0, %o0, %o0 POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400089c8: 08 bf ff fe bleu 400089c0 400089cc: 90 10 20 03 mov 3, %o0 if ( value_ptr ) *value_ptr = return_pointer; return 0; } return POSIX_BOTTOM_REACHED(); 400089d0: 40 00 01 91 call 40009014 <== NOT EXECUTED 400089d4: 01 00 00 00 nop <== NOT EXECUTED } 400089d8: 81 c7 e0 08 ret <== NOT EXECUTED 400089dc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 400089e0: c4 00 61 5c ld [ %g1 + 0x15c ], %g2 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 400089e4: 80 a2 00 02 cmp %o0, %g2 400089e8: 12 80 00 0f bne 40008a24 400089ec: 82 07 bf f0 add %fp, -16, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400089f0: 03 10 00 6d sethi %hi(0x4001b400), %g1 400089f4: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 4001b480 <_Thread_Dispatch_disable_level> 400089f8: 90 10 20 2d mov 0x2d, %o0 400089fc: 84 00 bf ff add %g2, -1, %g2 40008a00: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 40008a04: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 40008a08: 80 a0 e0 00 cmp %g3, 0 40008a0c: 12 bf ff ed bne 400089c0 40008a10: 01 00 00 00 nop _Thread_Dispatch(); 40008a14: 40 00 11 25 call 4000cea8 <_Thread_Dispatch> 40008a18: 01 00 00 00 nop 40008a1c: 10 bf ff e9 b 400089c0 40008a20: 90 10 20 2d mov 0x2d, %o0 ! 2d /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 40008a24: c2 20 a0 28 st %g1, [ %g2 + 0x28 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40008a28: 84 10 20 01 mov 1, %g2 _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 40008a2c: 90 00 e0 3c add %g3, 0x3c, %o0 40008a30: c4 20 e0 6c st %g2, [ %g3 + 0x6c ] 40008a34: 92 10 20 00 clr %o1 40008a38: 15 10 00 36 sethi %hi(0x4000d800), %o2 40008a3c: 40 00 12 8b call 4000d468 <_Thread_queue_Enqueue_with_handler> 40008a40: 94 12 a1 a8 or %o2, 0x1a8, %o2 ! 4000d9a8 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008a44: 05 10 00 6d sethi %hi(0x4001b400), %g2 40008a48: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 4001b480 <_Thread_Dispatch_disable_level> 40008a4c: 82 00 7f ff add %g1, -1, %g1 40008a50: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] 40008a54: c6 00 a0 80 ld [ %g2 + 0x80 ], %g3 40008a58: 80 a0 e0 00 cmp %g3, 0 40008a5c: 12 80 00 05 bne 40008a70 40008a60: 80 a6 60 00 cmp %i1, 0 _Thread_Dispatch(); 40008a64: 40 00 11 11 call 4000cea8 <_Thread_Dispatch> 40008a68: 01 00 00 00 nop _Thread_Enable_dispatch(); if ( value_ptr ) 40008a6c: 80 a6 60 00 cmp %i1, 0 40008a70: 02 bf ff d4 be 400089c0 40008a74: 90 10 20 00 clr %o0 *value_ptr = return_pointer; 40008a78: c2 07 bf f0 ld [ %fp + -16 ], %g1 40008a7c: 10 bf ff d1 b 400089c0 40008a80: c2 26 40 00 st %g1, [ %i1 ] 40006b54 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40006b54: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006b58: 25 10 00 63 sethi %hi(0x40018c00), %l2 40006b5c: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 ! 40018f80 <_Thread_Dispatch_disable_level> 40006b60: 82 00 60 01 inc %g1 40006b64: c2 24 a3 80 st %g1, [ %l2 + 0x380 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 40006b68: 29 10 00 65 sethi %hi(0x40019400), %l4 40006b6c: 40 00 0c 9d call 40009de0 <_Objects_Allocate> 40006b70: 90 15 20 80 or %l4, 0x80, %o0 ! 40019480 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 40006b74: a0 92 20 00 orcc %o0, 0, %l0 40006b78: 32 80 00 0e bne,a 40006bb0 40006b7c: f2 24 20 14 st %i1, [ %l0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006b80: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 40006b84: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40006b88: 82 00 7f ff add %g1, -1, %g1 40006b8c: c2 24 a3 80 st %g1, [ %l2 + 0x380 ] 40006b90: c4 04 a3 80 ld [ %l2 + 0x380 ], %g2 40006b94: 80 a0 a0 00 cmp %g2, 0 40006b98: 12 80 00 3d bne 40006c8c 40006b9c: 01 00 00 00 nop 40006ba0: 40 00 12 cd call 4000b6d4 <_Thread_Dispatch> 40006ba4: 01 00 00 00 nop 40006ba8: 81 c7 e0 08 ret 40006bac: 81 e8 00 00 restore 40006bb0: 03 10 00 63 sethi %hi(0x40018c00), %g1 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40006bb4: 2f 10 00 63 sethi %hi(0x40018c00), %l7 40006bb8: ac 10 62 e0 or %g1, 0x2e0, %l6 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 40006bbc: b2 10 00 10 mov %l0, %i1 40006bc0: a6 10 20 01 mov 1, %l3 40006bc4: aa 15 e3 cc or %l7, 0x3cc, %l5 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] && 40006bc8: 83 2c e0 02 sll %l3, 2, %g1 40006bcc: c2 00 40 16 ld [ %g1 + %l6 ], %g1 40006bd0: 80 a0 60 00 cmp %g1, 0 40006bd4: 02 80 00 30 be 40006c94 40006bd8: 90 10 00 15 mov %l5, %o0 40006bdc: c2 00 60 04 ld [ %g1 + 4 ], %g1 40006be0: 80 a0 60 00 cmp %g1, 0 40006be4: 22 80 00 0d be,a 40006c18 40006be8: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED _Objects_Information_table[ the_api ][ 1 ] ) { bytes_to_allocate = sizeof( void * ) * 40006bec: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 40006bf0: 82 00 60 01 inc %g1 40006bf4: a3 28 60 02 sll %g1, 2, %l1 40006bf8: 40 00 0b 1b call 40009864 <_Heap_Allocate> 40006bfc: 92 10 00 11 mov %l1, %o1 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { 40006c00: 82 92 20 00 orcc %o0, 0, %g1 40006c04: 02 80 00 26 be 40006c9c 40006c08: 94 10 00 11 mov %l1, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 40006c0c: c2 26 60 1c st %g1, [ %i1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 40006c10: 40 00 2b 92 call 40011a58 40006c14: 92 10 20 00 clr %o1 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 40006c18: a6 04 e0 01 inc %l3 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 40006c1c: 80 a4 e0 05 cmp %l3, 5 40006c20: 12 bf ff ea bne 40006bc8 40006c24: b2 06 60 04 add %i1, 4, %i1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c28: 90 15 20 80 or %l4, 0x80, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006c2c: c8 04 20 08 ld [ %l0 + 8 ], %g4 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c30: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 } } the_key->is_active = TRUE; 40006c34: 84 10 20 01 mov 1, %g2 40006c38: 03 00 00 3f sethi %hi(0xfc00), %g1 40006c3c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006c40: 82 09 00 01 and %g4, %g1, %g1 40006c44: 80 a0 40 03 cmp %g1, %g3 40006c48: 18 80 00 05 bgu 40006c5c 40006c4c: c4 24 20 10 st %g2, [ %l0 + 0x10 ] information->local_table[ index ] = the_object; 40006c50: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006c54: 83 28 60 02 sll %g1, 2, %g1 40006c58: e0 20 80 01 st %l0, [ %g2 + %g1 ] _Objects_Open( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40006c5c: c8 26 00 00 st %g4, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006c60: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c64: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 40006c68: b0 10 20 00 clr %i0 40006c6c: 82 00 7f ff add %g1, -1, %g1 40006c70: c2 24 a3 80 st %g1, [ %l2 + 0x380 ] 40006c74: c4 04 a3 80 ld [ %l2 + 0x380 ], %g2 40006c78: 80 a0 a0 00 cmp %g2, 0 40006c7c: 12 80 00 04 bne 40006c8c 40006c80: 01 00 00 00 nop _Thread_Dispatch(); 40006c84: 40 00 12 94 call 4000b6d4 <_Thread_Dispatch> 40006c88: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 40006c8c: 81 c7 e0 08 ret 40006c90: 81 e8 00 00 restore } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 40006c94: 10 bf ff e1 b 40006c18 40006c98: c0 26 60 1c clr [ %i1 + 0x1c ] bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 40006c9c: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED 40006ca0: 02 80 00 0d be 40006cd4 <== NOT EXECUTED 40006ca4: 90 15 20 80 or %l4, 0x80, %o0 <== NOT EXECUTED 40006ca8: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED 40006cac: b2 15 e3 cc or %l7, 0x3cc, %i1 <== NOT EXECUTED 40006cb0: 82 00 60 18 add %g1, 0x18, %g1 <== NOT EXECUTED 40006cb4: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40006cb8: d2 04 40 00 ld [ %l1 ], %o1 <== NOT EXECUTED 40006cbc: 40 00 0b 1c call 4000992c <_Heap_Free> <== NOT EXECUTED 40006cc0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40006cc4: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED 40006cc8: 12 bf ff fc bne 40006cb8 <== NOT EXECUTED 40006ccc: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 40006cd0: 90 15 20 80 or %l4, 0x80, %o0 <== NOT EXECUTED 40006cd4: 40 00 0d 51 call 4000a218 <_Objects_Free> <== NOT EXECUTED 40006cd8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006cdc: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 <== NOT EXECUTED 40006ce0: 10 bf ff aa b 40006b88 <== NOT EXECUTED 40006ce4: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED 40006ce8 : */ int pthread_key_delete( pthread_key_t key ) { 40006ce8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 40006cec: 23 10 00 65 sethi %hi(0x40019400), %l1 40006cf0: 92 10 00 18 mov %i0, %o1 40006cf4: 94 07 bf f4 add %fp, -12, %o2 40006cf8: 40 00 0d 8b call 4000a324 <_Objects_Get> 40006cfc: 90 14 60 80 or %l1, 0x80, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006d00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006d04: 80 a0 60 00 cmp %g1, 0 40006d08: 12 80 00 28 bne 40006da8 40006d0c: a0 10 00 08 mov %o0, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006d10: c6 02 20 08 ld [ %o0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006d14: 88 14 60 80 or %l1, 0x80, %g4 40006d18: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 40006d1c: 03 00 00 3f sethi %hi(0xfc00), %g1 40006d20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006d24: 82 08 c0 01 and %g3, %g1, %g1 40006d28: 80 a0 40 02 cmp %g1, %g2 40006d2c: 28 80 00 26 bleu,a 40006dc4 40006d30: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 40006d34: 03 10 00 63 sethi %hi(0x40018c00), %g1 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40006d38: c0 24 20 0c clr [ %l0 + 0xc ] case OBJECTS_REMOTE: /* should never happen */ return EINVAL; case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); the_key->is_active = FALSE; 40006d3c: c0 24 20 10 clr [ %l0 + 0x10 ] 40006d40: a4 10 63 cc or %g1, 0x3cc, %l2 40006d44: b0 10 20 00 clr %i0 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 40006d48: 82 04 00 18 add %l0, %i0, %g1 40006d4c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 40006d50: 80 a2 60 00 cmp %o1, 0 40006d54: 02 80 00 04 be 40006d64 40006d58: b0 06 20 04 add %i0, 4, %i0 40006d5c: 40 00 0a f4 call 4000992c <_Heap_Free> 40006d60: 90 10 00 12 mov %l2, %o0 _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 40006d64: 80 a6 20 10 cmp %i0, 0x10 40006d68: 12 bf ff f9 bne 40006d4c 40006d6c: 82 04 00 18 add %l0, %i0, %g1 RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 40006d70: 90 14 60 80 or %l1, 0x80, %o0 40006d74: 40 00 0d 29 call 4000a218 <_Objects_Free> 40006d78: 92 10 00 10 mov %l0, %o1 40006d7c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006d80: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 40018f80 <_Thread_Dispatch_disable_level> 40006d84: 90 10 20 00 clr %o0 40006d88: 84 00 bf ff add %g2, -1, %g2 40006d8c: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 40006d90: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40006d94: 80 a0 e0 00 cmp %g3, 0 40006d98: 02 80 00 0e be 40006dd0 40006d9c: 01 00 00 00 nop _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006da0: 81 c7 e0 08 ret 40006da4: 91 e8 00 08 restore %g0, %o0, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006da8: 80 a0 60 02 cmp %g1, 2 40006dac: 08 bf ff fd bleu 40006da0 40006db0: 90 10 20 16 mov 0x16, %o0 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006db4: 40 00 02 a3 call 40007840 <== NOT EXECUTED 40006db8: 01 00 00 00 nop <== NOT EXECUTED } 40006dbc: 81 c7 e0 08 ret <== NOT EXECUTED 40006dc0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) information->local_table[ index ] = the_object; 40006dc4: 83 28 60 02 sll %g1, 2, %g1 40006dc8: 10 bf ff db b 40006d34 40006dcc: c0 20 80 01 clr [ %g2 + %g1 ] _Thread_Dispatch(); 40006dd0: 40 00 12 41 call 4000b6d4 <_Thread_Dispatch> 40006dd4: 01 00 00 00 nop 40006dd8: 90 10 20 00 clr %o0 ! 0 40006ddc: 81 c7 e0 08 ret 40006de0: 91 e8 00 08 restore %g0, %o0, %o0 4002752c : int pthread_kill( pthread_t thread, int sig ) { 4002752c: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 40027530: 80 a6 60 00 cmp %i1, 0 40027534: 02 80 00 46 be 4002764c 40027538: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4002753c: a0 06 7f ff add %i1, -1, %l0 40027540: 80 a4 20 1f cmp %l0, 0x1f 40027544: 18 80 00 42 bgu 4002764c 40027548: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 4002754c: 11 10 00 b7 sethi %hi(0x4002dc00), %o0 40027550: 7f ff a2 ff call 4001014c <_Objects_Get> 40027554: 90 12 22 64 or %o0, 0x264, %o0 ! 4002de64 <_POSIX_Threads_Information> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) rtems_set_errno_and_return_minus_one( ENOSYS ); */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40027558: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002755c: 80 a0 60 00 cmp %g1, 0 40027560: 02 80 00 0c be 40027590 40027564: b0 10 00 08 mov %o0, %i0 40027568: 80 a0 60 02 cmp %g1, 2 4002756c: 18 80 00 34 bgu 4002763c 40027570: 01 00 00 00 nop case OBJECTS_ERROR: case OBJECTS_REMOTE: rtems_set_errno_and_return_minus_one( ESRCH ); 40027574: 7f ff cf b6 call 4001b44c <__errno> 40027578: 01 00 00 00 nop 4002757c: 82 10 20 03 mov 3, %g1 ! 3 40027580: c2 22 00 00 st %g1, [ %o0 ] 40027584: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40027588: 81 c7 e0 08 ret 4002758c: 91 e8 00 08 restore %g0, %o0, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40027590: 87 2e 60 02 sll %i1, 2, %g3 40027594: 85 2e 60 04 sll %i1, 4, %g2 40027598: 03 10 00 b8 sethi %hi(0x4002e000), %g1 4002759c: 84 20 80 03 sub %g2, %g3, %g2 400275a0: 82 10 62 48 or %g1, 0x248, %g1 400275a4: 84 00 80 01 add %g2, %g1, %g2 400275a8: c6 00 a0 08 ld [ %g2 + 8 ], %g3 400275ac: 80 a0 e0 01 cmp %g3, 1 400275b0: 02 80 00 15 be 40027604 400275b4: c8 02 21 70 ld [ %o0 + 0x170 ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 400275b8: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 400275bc: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 400275c0: b2 10 20 01 mov 1, %i1 400275c4: 83 2e 40 10 sll %i1, %l0, %g1 400275c8: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 400275cc: 94 10 20 00 clr %o2 400275d0: 7f ff ff 8c call 40027400 <_POSIX_signals_Unblock_thread> 400275d4: c4 21 20 c8 st %g2, [ %g4 + 0xc8 ] the_thread->do_post_task_switch_extension = TRUE; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 400275d8: 03 10 00 b6 sethi %hi(0x4002d800), %g1 400275dc: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2 ! 4002dbf4 <_ISR_Nest_level> 400275e0: 80 a0 a0 00 cmp %g2, 0 400275e4: 02 80 00 08 be 40027604 400275e8: f2 26 20 78 st %i1, [ %i0 + 0x78 ] 400275ec: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 400275f0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 4002dc0c <_Thread_Executing> 400275f4: 80 a6 00 02 cmp %i0, %g2 400275f8: 12 80 00 03 bne 40027604 400275fc: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 _ISR_Signals_to_thread_executing = TRUE; 40027600: f2 20 60 b8 st %i1, [ %g1 + 0xb8 ] ! 4002dcb8 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40027604: 03 10 00 b6 sethi %hi(0x4002d800), %g1 40027608: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 4002db30 <_Thread_Dispatch_disable_level> } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4002760c: 90 10 20 00 clr %o0 40027610: 84 00 bf ff add %g2, -1, %g2 40027614: c4 20 63 30 st %g2, [ %g1 + 0x330 ] 40027618: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 4002761c: 80 a0 e0 00 cmp %g3, 0 40027620: 12 bf ff da bne 40027588 40027624: 01 00 00 00 nop _Thread_Dispatch(); 40027628: 7f ff a7 f1 call 400115ec <_Thread_Dispatch> 4002762c: 01 00 00 00 nop 40027630: 90 10 20 00 clr %o0 ! 0 } 40027634: 81 c7 e0 08 ret 40027638: 91 e8 00 08 restore %g0, %o0, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4002763c: 40 00 00 18 call 4002769c <== NOT EXECUTED 40027640: 01 00 00 00 nop <== NOT EXECUTED } 40027644: 81 c7 e0 08 ret <== NOT EXECUTED 40027648: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4002764c: 7f ff cf 80 call 4001b44c <__errno> 40027650: 01 00 00 00 nop 40027654: 82 10 20 16 mov 0x16, %g1 ! 16 40027658: c2 22 00 00 st %g1, [ %o0 ] 4002765c: 10 bf ff cb b 40027588 40027660: 90 10 3f ff mov -1, %o0 400087a0 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 400087a0: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400087a4: 80 a6 20 00 cmp %i0, 0 400087a8: 32 80 00 05 bne,a 400087bc 400087ac: d2 06 00 00 ld [ %i0 ], %o1 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400087b0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 400087b4: 81 c7 e0 08 ret 400087b8: 91 e8 00 08 restore %g0, %o0, %o0 400087bc: 80 a2 7f ff cmp %o1, -1 400087c0: 02 80 00 40 be 400088c0 400087c4: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 400087c8: 21 10 00 71 sethi %hi(0x4001c400), %l0 400087cc: 94 07 bf f4 add %fp, -12, %o2 400087d0: 40 00 0f e5 call 4000c764 <_Objects_Get> 400087d4: 90 14 23 e4 or %l0, 0x3e4, %o0 { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 400087d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400087dc: 80 a0 60 00 cmp %g1, 0 400087e0: 12 80 00 13 bne 4000882c 400087e4: b0 10 00 08 mov %o0, %i0 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 400087e8: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 400087ec: 80 a0 60 00 cmp %g1, 0 400087f0: 32 80 00 15 bne,a 40008844 400087f4: a0 14 23 e4 or %l0, 0x3e4, %l0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400087f8: 03 10 00 70 sethi %hi(0x4001c000), %g1 400087fc: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40008800: 90 10 20 10 mov 0x10, %o0 40008804: 84 00 bf ff add %g2, -1, %g2 40008808: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 4000880c: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40008810: 80 a0 e0 00 cmp %g3, 0 40008814: 12 bf ff e8 bne 400087b4 40008818: 01 00 00 00 nop _Thread_Dispatch(); 4000881c: 40 00 14 be call 4000db14 <_Thread_Dispatch> 40008820: 01 00 00 00 nop 40008824: 10 bf ff e4 b 400087b4 40008828: 90 10 20 10 mov 0x10, %o0 ! 10 { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 4000882c: 80 a0 60 02 cmp %g1, 2 40008830: 28 bf ff e1 bleu,a 400087b4 40008834: 90 10 20 16 mov 0x16, %o0 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008838: 40 00 05 12 call 40009c80 <== NOT EXECUTED 4000883c: 01 00 00 00 nop <== NOT EXECUTED 40008840: 30 bf ff dd b,a 400087b4 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40008844: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40008848: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 4000884c: 05 00 00 3f sethi %hi(0xfc00), %g2 40008850: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40008854: 82 08 40 02 and %g1, %g2, %g1 40008858: 80 a0 40 03 cmp %g1, %g3 4000885c: 18 80 00 05 bgu 40008870 40008860: 94 10 20 16 mov 0x16, %o2 information->local_table[ index ] = the_object; 40008864: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40008868: 83 28 60 02 sll %g1, 2, %g1 4000886c: c0 20 80 01 clr [ %g2 + %g1 ] return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( 40008870: 90 06 20 14 add %i0, 0x14, %o0 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40008874: c0 26 20 0c clr [ %i0 + 0xc ] 40008878: 40 00 0b af call 4000b734 <_CORE_mutex_Flush> 4000887c: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 40008880: 90 10 00 10 mov %l0, %o0 40008884: 40 00 0f 75 call 4000c658 <_Objects_Free> 40008888: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000888c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008890: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40008894: 90 10 20 00 clr %o0 40008898: 84 00 bf ff add %g2, -1, %g2 4000889c: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 400088a0: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 400088a4: 80 a0 e0 00 cmp %g3, 0 400088a8: 12 bf ff c3 bne 400087b4 400088ac: 01 00 00 00 nop _Thread_Dispatch(); 400088b0: 40 00 14 99 call 4000db14 <_Thread_Dispatch> 400088b4: 01 00 00 00 nop 400088b8: 10 bf ff bf b 400087b4 400088bc: 90 10 20 00 clr %o0 ! 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400088c0: 40 00 00 38 call 400089a0 <== NOT EXECUTED 400088c4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400088c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400088cc: 12 bf ff ba bne 400087b4 <== NOT EXECUTED 400088d0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 400088d4: 10 bf ff bd b 400087c8 <== NOT EXECUTED 400088d8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400088dc : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 400088dc: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 400088e0: 80 a6 60 00 cmp %i1, 0 400088e4: 02 80 00 04 be 400088f4 400088e8: 80 a6 20 00 cmp %i0, 0 400088ec: 32 80 00 05 bne,a 40008900 400088f0: d2 06 00 00 ld [ %i0 ], %o1 the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400088f4: 90 10 20 16 mov 0x16, %o0 } 400088f8: 81 c7 e0 08 ret 400088fc: 91 e8 00 08 restore %g0, %o0, %o0 40008900: 80 a2 7f ff cmp %o1, -1 40008904: 22 80 00 20 be,a 40008984 40008908: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 4000890c: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008910: 94 07 bf f4 add %fp, -12, %o2 40008914: 40 00 0f 94 call 4000c764 <_Objects_Get> 40008918: 90 12 23 e4 or %o0, 0x3e4, %o0 if ( !prioceiling ) return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 4000891c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008920: 80 a0 60 00 cmp %g1, 0 40008924: 12 80 00 13 bne 40008970 40008928: 80 a0 60 02 cmp %g1, 2 return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */ #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 4000892c: c4 02 20 60 ld [ %o0 + 0x60 ], %g2 40008930: 82 10 20 ff mov 0xff, %g1 40008934: 82 20 40 02 sub %g1, %g2, %g1 40008938: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000893c: 07 10 00 70 sethi %hi(0x4001c000), %g3 40008940: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008944: 90 10 20 00 clr %o0 40008948: 82 00 7f ff add %g1, -1, %g1 4000894c: c2 20 e3 80 st %g1, [ %g3 + 0x380 ] 40008950: c4 00 e3 80 ld [ %g3 + 0x380 ], %g2 40008954: 80 a0 a0 00 cmp %g2, 0 40008958: 12 bf ff e8 bne 400088f8 4000895c: 01 00 00 00 nop _Thread_Dispatch(); 40008960: 40 00 14 6d call 4000db14 <_Thread_Dispatch> 40008964: 01 00 00 00 nop 40008968: 10 bf ff e4 b 400088f8 4000896c: 90 10 20 00 clr %o0 ! 0 if ( !prioceiling ) return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008970: 28 bf ff e2 bleu,a 400088f8 40008974: 90 10 20 16 mov 0x16, %o0 the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008978: 40 00 04 c2 call 40009c80 <== NOT EXECUTED 4000897c: 01 00 00 00 nop <== NOT EXECUTED 40008980: 30 bf ff de b,a 400088f8 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008984: 40 00 00 07 call 400089a0 <== NOT EXECUTED 40008988: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000898c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008990: 32 bf ff da bne,a 400088f8 <== NOT EXECUTED 40008994: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40008998: 10 bf ff dd b 4000890c <== NOT EXECUTED 4000899c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400089a0 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 400089a0: 9d e3 bf 98 save %sp, -104, %sp #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 400089a4: 03 10 00 69 sethi %hi(0x4001a400), %g1 400089a8: 80 a6 60 00 cmp %i1, 0 400089ac: 02 80 00 03 be 400089b8 400089b0: a0 10 60 4c or %g1, 0x4c, %l0 400089b4: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 400089b8: 80 a6 20 00 cmp %i0, 0 400089bc: 22 80 00 2c be,a 40008a6c 400089c0: b0 10 20 16 mov 0x16, %i0 return EBUSY; } } #endif if ( !the_attr->is_initialized ) 400089c4: c2 04 00 00 ld [ %l0 ], %g1 400089c8: 80 a0 60 00 cmp %g1, 0 400089cc: 22 80 00 28 be,a 40008a6c 400089d0: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 400089d4: c2 04 20 04 ld [ %l0 + 4 ], %g1 400089d8: 80 a0 60 00 cmp %g1, 0 400089dc: 12 80 00 2b bne 40008a88 400089e0: 11 10 00 69 sethi %hi(0x4001a400), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 400089e4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 400089e8: 80 a0 60 01 cmp %g1, 1 400089ec: 02 80 00 07 be 40008a08 400089f0: a4 10 20 02 mov 2, %l2 400089f4: 80 a0 60 02 cmp %g1, 2 400089f8: 02 80 00 22 be 40008a80 400089fc: 80 a0 60 00 cmp %g1, 0 40008a00: 12 80 00 1d bne 40008a74 40008a04: a4 10 20 00 clr %l2 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 40008a08: c2 04 20 08 ld [ %l0 + 8 ], %g1 40008a0c: 82 00 7f ff add %g1, -1, %g1 40008a10: 80 a0 60 fd cmp %g1, 0xfd 40008a14: 38 80 00 16 bgu,a 40008a6c 40008a18: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008a1c: 23 10 00 70 sethi %hi(0x4001c000), %l1 40008a20: c2 04 63 80 ld [ %l1 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008a24: 82 00 60 01 inc %g1 40008a28: c2 24 63 80 st %g1, [ %l1 + 0x380 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 40008a2c: 27 10 00 71 sethi %hi(0x4001c400), %l3 40008a30: 40 00 0d fc call 4000c220 <_Objects_Allocate> 40008a34: 90 14 e3 e4 or %l3, 0x3e4, %o0 ! 4001c7e4 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 40008a38: b2 92 20 00 orcc %o0, 0, %i1 40008a3c: 32 80 00 1e bne,a 40008ab4 40008a40: c2 04 20 04 ld [ %l0 + 4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008a44: c2 04 63 80 ld [ %l1 + 0x380 ], %g1 40008a48: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40008a4c: 82 00 7f ff add %g1, -1, %g1 40008a50: c2 24 63 80 st %g1, [ %l1 + 0x380 ] 40008a54: c4 04 63 80 ld [ %l1 + 0x380 ], %g2 40008a58: 80 a0 a0 00 cmp %g2, 0 40008a5c: 12 80 00 07 bne 40008a78 40008a60: 01 00 00 00 nop 40008a64: 40 00 14 2c call 4000db14 <_Thread_Dispatch> 40008a68: 01 00 00 00 nop 40008a6c: 81 c7 e0 08 ret 40008a70: 81 e8 00 00 restore 40008a74: b0 10 20 16 mov 0x16, %i0 ); #endif _Thread_Enable_dispatch(); return 0; } 40008a78: 81 c7 e0 08 ret 40008a7c: 81 e8 00 00 restore /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40008a80: 10 bf ff e2 b 40008a08 40008a84: a4 10 20 03 mov 3, %l2 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40008a88: 15 10 00 69 sethi %hi(0x4001a400), %o2 <== NOT EXECUTED 40008a8c: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40008a90: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 40008a94: 7f ff f1 bf call 40005190 <__assert> <== NOT EXECUTED 40008a98: 92 10 20 64 mov 0x64, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40008a9c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40008aa0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008aa4: 12 bf ff d5 bne 400089f8 <== NOT EXECUTED 40008aa8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008aac: 10 bf ff d7 b 40008a08 <== NOT EXECUTED 40008ab0: a4 10 20 02 mov 2, %l2 <== NOT EXECUTED _Thread_Enable_dispatch(); return EAGAIN; } #endif the_mutex->process_shared = the_attr->process_shared; 40008ab4: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 40008ab8: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008abc: 80 a0 a0 00 cmp %g2, 0 40008ac0: 32 80 00 04 bne,a 40008ad0 40008ac4: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 40008ac8: 82 10 20 01 mov 1, %g1 40008acc: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 40008ad0: c6 04 20 08 ld [ %l0 + 8 ], %g3 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 40008ad4: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 40008ad8: 82 10 20 ff mov 0xff, %g1 40008adc: 82 20 40 03 sub %g1, %g3, %g1 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 40008ae0: c4 26 60 58 st %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 40008ae4: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 40008ae8: e4 26 60 5c st %l2, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 40008aec: 90 06 60 14 add %i1, 0x14, %o0 40008af0: 92 06 60 54 add %i1, 0x54, %o1 40008af4: 40 00 0b 14 call 4000b744 <_CORE_mutex_Initialize> 40008af8: 94 10 20 01 mov 1, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40008afc: 90 14 e3 e4 or %l3, 0x3e4, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40008b00: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40008b04: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40008b08: 03 00 00 3f sethi %hi(0xfc00), %g1 40008b0c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008b10: 82 08 c0 01 and %g3, %g1, %g1 40008b14: 80 a0 40 02 cmp %g1, %g2 40008b18: 38 80 00 06 bgu,a 40008b30 40008b1c: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40008b20: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40008b24: 83 28 60 02 sll %g1, 2, %g1 40008b28: f2 20 80 01 st %i1, [ %g2 + %g1 ] CORE_MUTEX_UNLOCKED ); _Objects_Open( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 40008b2c: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40008b30: c0 26 60 0c clr [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008b34: c2 04 63 80 ld [ %l1 + 0x380 ], %g1 40008b38: 10 bf ff c5 b 40008a4c 40008b3c: b0 10 20 00 clr %i0 40008df4 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 40008df4: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 40008df8: 80 a6 a0 00 cmp %i2, 0 40008dfc: 02 80 00 06 be 40008e14 40008e00: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 40008e04: 82 06 7f ff add %i1, -1, %g1 40008e08: 80 a0 60 fd cmp %g1, 0xfd 40008e0c: 08 80 00 04 bleu 40008e1c 40008e10: 01 00 00 00 nop ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008e14: 81 c7 e0 08 ret 40008e18: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 40008e1c: 7f ff ff 49 call 40008b40 40008e20: 90 10 00 18 mov %i0, %o0 if ( status ) 40008e24: b0 92 20 00 orcc %o0, 0, %i0 40008e28: 12 80 00 24 bne 40008eb8 40008e2c: 80 a4 20 00 cmp %l0, 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008e30: 22 80 00 22 be,a 40008eb8 40008e34: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40008e38: d2 04 00 00 ld [ %l0 ], %o1 40008e3c: 80 a2 7f ff cmp %o1, -1 40008e40: 22 80 00 26 be,a 40008ed8 40008e44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40008e48: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008e4c: 94 07 bf f4 add %fp, -12, %o2 40008e50: 40 00 0e 45 call 4000c764 <_Objects_Get> 40008e54: 90 12 23 e4 or %o0, 0x3e4, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008e58: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008e5c: 80 a0 60 00 cmp %g1, 0 40008e60: 12 80 00 18 bne 40008ec0 40008e64: 80 a0 60 02 cmp %g1, 2 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e68: c6 02 20 60 ld [ %o0 + 0x60 ], %g3 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40008e6c: d2 02 20 08 ld [ %o0 + 8 ], %o1 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e70: 82 10 20 ff mov 0xff, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40008e74: 84 20 40 19 sub %g1, %i1, %g2 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e78: 82 20 40 03 sub %g1, %g3, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40008e7c: c4 22 20 60 st %g2, [ %o0 + 0x60 ] return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e80: c2 26 80 00 st %g1, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40008e84: 94 10 20 00 clr %o2 40008e88: 40 00 0a 8c call 4000b8b8 <_CORE_mutex_Surrender> 40008e8c: 90 02 20 14 add %o0, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008e90: 05 10 00 70 sethi %hi(0x4001c000), %g2 40008e94: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008e98: 82 00 7f ff add %g1, -1, %g1 40008e9c: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] 40008ea0: c6 00 a3 80 ld [ %g2 + 0x380 ], %g3 40008ea4: 80 a0 e0 00 cmp %g3, 0 40008ea8: 12 80 00 04 bne 40008eb8 40008eac: 01 00 00 00 nop _Thread_Dispatch(); 40008eb0: 40 00 13 19 call 4000db14 <_Thread_Dispatch> 40008eb4: 01 00 00 00 nop 40008eb8: 81 c7 e0 08 ret 40008ebc: 81 e8 00 00 restore status = pthread_mutex_lock( mutex ); if ( status ) return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008ec0: 28 bf ff fe bleu,a 40008eb8 <== NOT EXECUTED 40008ec4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008ec8: 40 00 03 6e call 40009c80 <== NOT EXECUTED 40008ecc: 01 00 00 00 nop <== NOT EXECUTED 40008ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40008ed4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008ed8: 7f ff fe b2 call 400089a0 <== NOT EXECUTED 40008edc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008ee0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008ee4: 32 bf ff f5 bne,a 40008eb8 <== NOT EXECUTED 40008ee8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40008eec: 10 bf ff d7 b 40008e48 <== NOT EXECUTED 40008ef0: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 40008ef4 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 40008ef4: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 40008ef8: 90 10 00 19 mov %i1, %o0 40008efc: 40 00 00 46 call 40009014 <_POSIX_Absolute_timeout_to_ticks> 40008f00: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40008f04: 80 a2 20 03 cmp %o0, 3 40008f08: 02 80 00 07 be 40008f24 40008f0c: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40008f10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008f14: 7f ff ff 11 call 40008b58 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 40008f18: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40008f1c: 81 c7 e0 08 ret <== NOT EXECUTED 40008f20: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40008f24: 90 10 00 18 mov %i0, %o0 40008f28: 7f ff ff 0c call 40008b58 <_POSIX_Mutex_Lock_support> 40008f2c: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40008f30: 81 c7 e0 08 ret 40008f34: 91 e8 00 08 restore %g0, %o0, %o0 40008f50 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 40008f50: 9d e3 bf 90 save %sp, -112, %sp 40008f54: 80 a6 20 00 cmp %i0, 0 40008f58: 32 80 00 05 bne,a 40008f6c 40008f5c: d2 06 00 00 ld [ %i0 ], %o1 ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); break; } return POSIX_BOTTOM_REACHED(); 40008f60: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40008f64: 81 c7 e0 08 ret 40008f68: 91 e8 00 08 restore %g0, %o0, %o0 40008f6c: 80 a2 7f ff cmp %o1, -1 40008f70: 22 80 00 22 be,a 40008ff8 40008f74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40008f78: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008f7c: 94 07 bf f4 add %fp, -12, %o2 40008f80: 40 00 0d f9 call 4000c764 <_Objects_Get> 40008f84: 90 12 23 e4 or %o0, 0x3e4, %o0 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008f88: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008f8c: 80 a0 60 00 cmp %g1, 0 40008f90: 12 80 00 12 bne 40008fd8 40008f94: 80 a0 60 02 cmp %g1, 2 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 40008f98: d2 02 20 08 ld [ %o0 + 8 ], %o1 40008f9c: 94 10 20 00 clr %o2 40008fa0: 40 00 0a 46 call 4000b8b8 <_CORE_mutex_Surrender> 40008fa4: 90 02 20 14 add %o0, 0x14, %o0 40008fa8: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008fac: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008fb0: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40008fb4: 84 00 bf ff add %g2, -1, %g2 40008fb8: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 40008fbc: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40008fc0: 80 a0 e0 00 cmp %g3, 0 40008fc4: 02 80 00 0a be 40008fec 40008fc8: 01 00 00 00 nop #else NULL #endif ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); 40008fcc: 40 00 21 04 call 400113dc <_POSIX_Mutex_From_core_mutex_status> 40008fd0: 90 10 00 18 mov %i0, %o0 40008fd4: 30 bf ff e4 b,a 40008f64 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008fd8: 28 bf ff e3 bleu,a 40008f64 40008fdc: 90 10 20 16 mov 0x16, %o0 ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); break; } return POSIX_BOTTOM_REACHED(); 40008fe0: 40 00 03 28 call 40009c80 <== NOT EXECUTED 40008fe4: 01 00 00 00 nop <== NOT EXECUTED 40008fe8: 30 bf ff df b,a 40008f64 <== NOT EXECUTED _Thread_Dispatch(); 40008fec: 40 00 12 ca call 4000db14 <_Thread_Dispatch> 40008ff0: 01 00 00 00 nop 40008ff4: 30 bf ff f6 b,a 40008fcc Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008ff8: 7f ff fe 6a call 400089a0 <== NOT EXECUTED 40008ffc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009000: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40009004: 32 bf ff d8 bne,a 40008f64 <== NOT EXECUTED 40009008: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 4000900c: 10 bf ff db b 40008f78 <== NOT EXECUTED 40009010: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007ff0 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 40007ff0: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 40007ff4: a0 96 20 00 orcc %i0, 0, %l0 40007ff8: 02 80 00 18 be 40008058 40007ffc: 80 a6 60 00 cmp %i1, 0 40008000: 02 80 00 16 be 40008058 40008004: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 40008008: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000800c: 80 a0 60 00 cmp %g1, 0 40008010: 12 80 00 10 bne 40008050 40008014: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 40008018: b0 07 bf f4 add %fp, -12, %i0 4000801c: 90 10 21 00 mov 0x100, %o0 40008020: 92 10 21 00 mov 0x100, %o1 40008024: 40 00 05 41 call 40009528 40008028: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 4000802c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40008030: 80 a0 60 00 cmp %g1, 0 40008034: 02 80 00 0b be 40008060 40008038: 82 10 20 01 mov 1, %g1 once_control->is_initialized = TRUE; once_control->init_executed = TRUE; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4000803c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40008040: 94 10 00 18 mov %i0, %o2 40008044: 92 10 21 00 mov 0x100, %o1 40008048: 40 00 05 38 call 40009528 4000804c: b0 10 20 00 clr %i0 } return 0; } 40008050: 81 c7 e0 08 ret 40008054: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 40008058: 81 c7 e0 08 ret 4000805c: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = TRUE; once_control->init_executed = TRUE; 40008060: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 40008064: 9f c6 40 00 call %i1 40008068: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4000806c: 10 bf ff f5 b 40008040 40008070: d0 07 bf f4 ld [ %fp + -12 ], %o0 400073e0 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 400073e0: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 400073e4: 80 a6 20 00 cmp %i0, 0 400073e8: 02 80 00 24 be 40007478 400073ec: 21 10 00 7b sethi %hi(0x4001ec00), %l0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 400073f0: d2 06 00 00 ld [ %i0 ], %o1 400073f4: 94 07 bf f4 add %fp, -12, %o2 400073f8: 40 00 0f 95 call 4000b24c <_Objects_Get> 400073fc: 90 14 20 dc or %l0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007400: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007404: 80 a0 60 00 cmp %g1, 0 40007408: 12 80 00 15 bne 4000745c 4000740c: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 40007410: 40 00 17 3b call 4000d0fc <_Thread_queue_First> 40007414: 90 02 20 10 add %o0, 0x10, %o0 40007418: 80 a2 20 00 cmp %o0, 0 4000741c: 02 80 00 1a be 40007484 40007420: 90 14 20 dc or %l0, 0xdc, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007424: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007428: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 4000742c: 90 10 20 10 mov 0x10, %o0 40007430: 84 00 bf ff add %g2, -1, %g2 40007434: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007438: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 4000743c: 80 a0 e0 00 cmp %g3, 0 40007440: 12 80 00 0c bne 40007470 40007444: 01 00 00 00 nop _Thread_Dispatch(); 40007448: 40 00 14 6d call 4000c5fc <_Thread_Dispatch> 4000744c: 01 00 00 00 nop 40007450: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40007454: 81 c7 e0 08 ret 40007458: 91 e8 00 08 restore %g0, %o0, %o0 if ( !rwlock ) return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000745c: 80 a0 60 02 cmp %g1, 2 40007460: 08 80 00 07 bleu 4000747c 40007464: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007468: 40 00 03 c1 call 4000836c <== NOT EXECUTED 4000746c: 01 00 00 00 nop <== NOT EXECUTED } 40007470: 81 c7 e0 08 ret 40007474: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007478: 90 10 20 16 mov 0x16, %o0 } 4000747c: 81 c7 e0 08 ret 40007480: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40007484: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007488: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000748c: 05 00 00 3f sethi %hi(0xfc00), %g2 40007490: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40007494: 82 08 40 02 and %g1, %g2, %g1 40007498: 80 a0 40 03 cmp %g1, %g3 4000749c: 38 80 00 06 bgu,a 400074b4 400074a0: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400074a4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400074a8: 83 28 60 02 sll %g1, 2, %g1 400074ac: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 400074b0: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 400074b4: 40 00 0f 23 call 4000b140 <_Objects_Free> 400074b8: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400074bc: 03 10 00 7a sethi %hi(0x4001e800), %g1 400074c0: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 400074c4: 90 10 20 00 clr %o0 400074c8: 84 00 bf ff add %g2, -1, %g2 400074cc: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 400074d0: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 400074d4: 80 a0 e0 00 cmp %g3, 0 400074d8: 12 bf ff e6 bne 40007470 400074dc: 01 00 00 00 nop _Thread_Dispatch(); 400074e0: 40 00 14 47 call 4000c5fc <_Thread_Dispatch> 400074e4: 01 00 00 00 nop 400074e8: 10 bf ff e2 b 40007470 400074ec: 90 10 20 00 clr %o0 ! 0 400074f0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 400074f0: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 400074f4: 80 a6 20 00 cmp %i0, 0 400074f8: 02 80 00 23 be 40007584 400074fc: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40007500: 80 a6 60 00 cmp %i1, 0 40007504: 22 80 00 23 be,a 40007590 40007508: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 4000750c: c2 04 00 00 ld [ %l0 ], %g1 40007510: 80 a0 60 00 cmp %g1, 0 40007514: 22 80 00 1a be,a 4000757c 40007518: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; switch ( the_attr->process_shared ) { 4000751c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007520: 80 a0 60 00 cmp %g1, 0 40007524: 32 80 00 16 bne,a 4000757c 40007528: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000752c: 33 10 00 7a sethi %hi(0x4001e800), %i1 40007530: c2 06 62 40 ld [ %i1 + 0x240 ], %g1 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007534: 82 00 60 01 inc %g1 40007538: c2 26 62 40 st %g1, [ %i1 + 0x240 ] * This function allocates a RWLock control block from * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) 4000753c: 23 10 00 7b sethi %hi(0x4001ec00), %l1 40007540: 40 00 0d f2 call 4000ad08 <_Objects_Allocate> 40007544: 90 14 60 dc or %l1, 0xdc, %o0 ! 4001ecdc <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 40007548: a0 92 20 00 orcc %o0, 0, %l0 4000754c: 12 80 00 15 bne 400075a0 40007550: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007554: c2 06 62 40 ld [ %i1 + 0x240 ], %g1 40007558: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 4000755c: 82 00 7f ff add %g1, -1, %g1 40007560: c2 26 62 40 st %g1, [ %i1 + 0x240 ] 40007564: c4 06 62 40 ld [ %i1 + 0x240 ], %g2 40007568: 80 a0 a0 00 cmp %g2, 0 4000756c: 12 80 00 07 bne 40007588 40007570: 01 00 00 00 nop 40007574: 40 00 14 22 call 4000c5fc <_Thread_Dispatch> 40007578: 01 00 00 00 nop 4000757c: 81 c7 e0 08 ret 40007580: 81 e8 00 00 restore 40007584: b0 10 20 16 mov 0x16, %i0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 40007588: 81 c7 e0 08 ret 4000758c: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 40007590: 40 00 03 4e call 400082c8 <== NOT EXECUTED 40007594: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40007598: 10 bf ff de b 40007510 <== NOT EXECUTED 4000759c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED if ( !the_rwlock ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 400075a0: 40 00 0b 14 call 4000a1f0 <_CORE_RWLock_Initialize> 400075a4: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400075a8: 90 14 60 dc or %l1, 0xdc, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400075ac: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400075b0: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400075b4: 03 00 00 3f sethi %hi(0xfc00), %g1 400075b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400075bc: 82 08 c0 01 and %g3, %g1, %g1 400075c0: 80 a0 40 02 cmp %g1, %g2 400075c4: 38 80 00 06 bgu,a 400075dc 400075c8: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400075cc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400075d0: 83 28 60 02 sll %g1, 2, %g1 400075d4: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 400075d8: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400075dc: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400075e0: c2 06 62 40 ld [ %i1 + 0x240 ], %g1 400075e4: 10 bf ff de b 4000755c 400075e8: b0 10 20 00 clr %i0 400075ec : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 400075ec: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 400075f0: 80 a6 20 00 cmp %i0, 0 400075f4: 02 80 00 24 be 40007684 400075f8: 11 10 00 7b sethi %hi(0x4001ec00), %o0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 400075fc: d2 06 00 00 ld [ %i0 ], %o1 40007600: 94 07 bf f4 add %fp, -12, %o2 40007604: 40 00 0f 12 call 4000b24c <_Objects_Get> 40007608: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000760c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007610: 80 a0 60 00 cmp %g1, 0 40007614: 22 80 00 09 be,a 40007638 40007618: d2 06 00 00 ld [ %i0 ], %o1 4000761c: 80 a0 60 02 cmp %g1, 2 40007620: 08 80 00 1a bleu 40007688 40007624: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007628: 40 00 03 51 call 4000836c <== NOT EXECUTED 4000762c: 01 00 00 00 nop <== NOT EXECUTED } 40007630: 81 c7 e0 08 ret <== NOT EXECUTED 40007634: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40007638: 90 02 20 10 add %o0, 0x10, %o0 4000763c: 94 10 20 01 mov 1, %o2 40007640: 96 10 20 00 clr %o3 40007644: 40 00 0a f6 call 4000a21c <_CORE_RWLock_Obtain_for_reading> 40007648: 98 10 20 00 clr %o4 4000764c: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007650: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007654: 84 00 bf ff add %g2, -1, %g2 40007658: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 4000765c: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007660: 80 a0 e0 00 cmp %g3, 0 40007664: 02 80 00 0b be 40007690 40007668: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 4000766c: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40007670: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 40007674: 40 00 00 a1 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007678: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 4000767c: 81 c7 e0 08 ret 40007680: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007684: 90 10 20 16 mov 0x16, %o0 } 40007688: 81 c7 e0 08 ret 4000768c: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007690: 40 00 13 db call 4000c5fc <_Thread_Dispatch> 40007694: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007698: 10 bf ff f6 b 40007670 4000769c: 03 10 00 7a sethi %hi(0x4001e800), %g1 400076a0 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 400076a0: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; boolean do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 400076a4: 80 a6 20 00 cmp %i0, 0 400076a8: 02 80 00 2b be 40007754 400076ac: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 400076b0: 40 00 22 b7 call 4001018c <_POSIX_Absolute_timeout_to_ticks> 400076b4: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 400076b8: 80 a2 20 02 cmp %o0, 2 400076bc: 08 80 00 29 bleu 40007760 400076c0: b2 10 00 08 mov %o0, %i1 400076c4: 80 a2 20 03 cmp %o0, 3 400076c8: 22 80 00 02 be,a 400076d0 400076cc: a0 10 20 01 mov 1, %l0 400076d0: d2 06 00 00 ld [ %i0 ], %o1 400076d4: 11 10 00 7b sethi %hi(0x4001ec00), %o0 400076d8: 94 07 bf f4 add %fp, -12, %o2 400076dc: 40 00 0e dc call 4000b24c <_Objects_Get> 400076e0: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400076e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400076e8: 80 a0 60 00 cmp %g1, 0 400076ec: 12 80 00 27 bne 40007788 400076f0: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 400076f4: d2 06 00 00 ld [ %i0 ], %o1 400076f8: d6 07 bf f0 ld [ %fp + -16 ], %o3 400076fc: 90 02 20 10 add %o0, 0x10, %o0 40007700: 94 10 00 10 mov %l0, %o2 40007704: 40 00 0a c6 call 4000a21c <_CORE_RWLock_Obtain_for_reading> 40007708: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000770c: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007710: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007714: 84 00 bf ff add %g2, -1, %g2 40007718: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 4000771c: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007720: 80 a0 e0 00 cmp %g3, 0 40007724: 02 80 00 26 be 400077bc 40007728: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 4000772c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40007730: 12 80 00 1e bne 400077a8 40007734: 07 10 00 7a sethi %hi(0x4001e800), %g3 40007738: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED 4000773c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 40007740: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40007744: 12 80 00 1a bne 400077ac <== NOT EXECUTED 40007748: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000774c: 12 80 00 15 bne 400077a0 <== NOT EXECUTED 40007750: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007754: 90 10 20 16 mov 0x16, %o0 } 40007758: 81 c7 e0 08 ret 4000775c: 91 e8 00 08 restore %g0, %o0, %o0 40007760: d2 06 00 00 ld [ %i0 ], %o1 40007764: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007768: 94 07 bf f4 add %fp, -12, %o2 4000776c: 40 00 0e b8 call 4000b24c <_Objects_Get> 40007770: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007774: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007778: 80 a0 60 00 cmp %g1, 0 4000777c: 02 bf ff de be 400076f4 40007780: a0 10 20 00 clr %l0 40007784: 80 a0 60 02 cmp %g1, 2 40007788: 08 bf ff f4 bleu 40007758 4000778c: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007790: 40 00 02 f7 call 4000836c <== NOT EXECUTED 40007794: 01 00 00 00 nop <== NOT EXECUTED } 40007798: 81 c7 e0 08 ret <== NOT EXECUTED 4000779c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400077a0: 08 bf ff ee bleu 40007758 <== NOT EXECUTED 400077a4: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400077a8: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 400077ac: 40 00 00 53 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400077b0: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400077b4: 81 c7 e0 08 ret 400077b8: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400077bc: 40 00 13 90 call 4000c5fc <_Thread_Dispatch> 400077c0: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 400077c4: 10 bf ff db b 40007730 400077c8: 80 a4 20 00 cmp %l0, 0 400077cc : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 400077cc: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; boolean do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 400077d0: 80 a6 20 00 cmp %i0, 0 400077d4: 02 80 00 2b be 40007880 400077d8: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 400077dc: 40 00 22 6c call 4001018c <_POSIX_Absolute_timeout_to_ticks> 400077e0: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 400077e4: 80 a2 20 02 cmp %o0, 2 400077e8: 08 80 00 29 bleu 4000788c 400077ec: b2 10 00 08 mov %o0, %i1 400077f0: 80 a2 20 03 cmp %o0, 3 400077f4: 22 80 00 02 be,a 400077fc 400077f8: a0 10 20 01 mov 1, %l0 400077fc: d2 06 00 00 ld [ %i0 ], %o1 40007800: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007804: 94 07 bf f4 add %fp, -12, %o2 40007808: 40 00 0e 91 call 4000b24c <_Objects_Get> 4000780c: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007810: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007814: 80 a0 60 00 cmp %g1, 0 40007818: 12 80 00 27 bne 400078b4 4000781c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40007820: d2 06 00 00 ld [ %i0 ], %o1 40007824: d6 07 bf f0 ld [ %fp + -16 ], %o3 40007828: 90 02 20 10 add %o0, 0x10, %o0 4000782c: 94 10 00 10 mov %l0, %o2 40007830: 40 00 0a b0 call 4000a2f0 <_CORE_RWLock_Obtain_for_writing> 40007834: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007838: 03 10 00 7a sethi %hi(0x4001e800), %g1 4000783c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007840: 84 00 bf ff add %g2, -1, %g2 40007844: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007848: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 4000784c: 80 a0 e0 00 cmp %g3, 0 40007850: 02 80 00 26 be 400078e8 40007854: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 40007858: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4000785c: 12 80 00 1e bne 400078d4 40007860: 07 10 00 7a sethi %hi(0x4001e800), %g3 40007864: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED 40007868: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 4000786c: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40007870: 12 80 00 1a bne 400078d8 <== NOT EXECUTED 40007874: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 40007878: 12 80 00 15 bne 400078cc <== NOT EXECUTED 4000787c: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007880: 90 10 20 16 mov 0x16, %o0 } 40007884: 81 c7 e0 08 ret 40007888: 91 e8 00 08 restore %g0, %o0, %o0 4000788c: d2 06 00 00 ld [ %i0 ], %o1 40007890: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007894: 94 07 bf f4 add %fp, -12, %o2 40007898: 40 00 0e 6d call 4000b24c <_Objects_Get> 4000789c: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400078a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400078a4: 80 a0 60 00 cmp %g1, 0 400078a8: 02 bf ff de be 40007820 400078ac: a0 10 20 00 clr %l0 400078b0: 80 a0 60 02 cmp %g1, 2 400078b4: 08 bf ff f4 bleu 40007884 400078b8: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400078bc: 40 00 02 ac call 4000836c <== NOT EXECUTED 400078c0: 01 00 00 00 nop <== NOT EXECUTED } 400078c4: 81 c7 e0 08 ret <== NOT EXECUTED 400078c8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400078cc: 08 bf ff ee bleu 40007884 <== NOT EXECUTED 400078d0: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400078d4: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 400078d8: 40 00 00 08 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400078dc: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400078e0: 81 c7 e0 08 ret 400078e4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400078e8: 40 00 13 45 call 4000c5fc <_Thread_Dispatch> 400078ec: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 400078f0: 10 bf ff db b 4000785c 400078f4: 80 a4 20 00 cmp %l0, 0 40007924 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 40007924: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40007928: 80 a6 20 00 cmp %i0, 0 4000792c: 02 80 00 24 be 400079bc 40007930: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007934: d2 06 00 00 ld [ %i0 ], %o1 40007938: 94 07 bf f4 add %fp, -12, %o2 4000793c: 40 00 0e 44 call 4000b24c <_Objects_Get> 40007940: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007944: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007948: 80 a0 60 00 cmp %g1, 0 4000794c: 22 80 00 09 be,a 40007970 40007950: d2 06 00 00 ld [ %i0 ], %o1 40007954: 80 a0 60 02 cmp %g1, 2 40007958: 08 80 00 1a bleu 400079c0 4000795c: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007960: 40 00 02 83 call 4000836c <== NOT EXECUTED 40007964: 01 00 00 00 nop <== NOT EXECUTED } 40007968: 81 c7 e0 08 ret <== NOT EXECUTED 4000796c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40007970: 90 02 20 10 add %o0, 0x10, %o0 40007974: 94 10 20 00 clr %o2 40007978: 96 10 20 00 clr %o3 4000797c: 40 00 0a 28 call 4000a21c <_CORE_RWLock_Obtain_for_reading> 40007980: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007984: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007988: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 4000798c: 84 00 bf ff add %g2, -1, %g2 40007990: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007994: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007998: 80 a0 e0 00 cmp %g3, 0 4000799c: 02 80 00 0b be 400079c8 400079a0: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400079a4: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 400079a8: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 400079ac: 7f ff ff d3 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400079b0: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400079b4: 81 c7 e0 08 ret 400079b8: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400079bc: 90 10 20 16 mov 0x16, %o0 } 400079c0: 81 c7 e0 08 ret 400079c4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400079c8: 40 00 13 0d call 4000c5fc <_Thread_Dispatch> 400079cc: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400079d0: 10 bf ff f6 b 400079a8 400079d4: 03 10 00 7a sethi %hi(0x4001e800), %g1 400079d8 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 400079d8: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 400079dc: 80 a6 20 00 cmp %i0, 0 400079e0: 02 80 00 24 be 40007a70 400079e4: 11 10 00 7b sethi %hi(0x4001ec00), %o0 400079e8: d2 06 00 00 ld [ %i0 ], %o1 400079ec: 94 07 bf f4 add %fp, -12, %o2 400079f0: 40 00 0e 17 call 4000b24c <_Objects_Get> 400079f4: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400079f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400079fc: 80 a0 60 00 cmp %g1, 0 40007a00: 22 80 00 09 be,a 40007a24 40007a04: d2 06 00 00 ld [ %i0 ], %o1 40007a08: 80 a0 60 02 cmp %g1, 2 40007a0c: 08 80 00 1a bleu 40007a74 40007a10: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007a14: 40 00 02 56 call 4000836c <== NOT EXECUTED 40007a18: 01 00 00 00 nop <== NOT EXECUTED } 40007a1c: 81 c7 e0 08 ret <== NOT EXECUTED 40007a20: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40007a24: 90 02 20 10 add %o0, 0x10, %o0 40007a28: 94 10 20 00 clr %o2 40007a2c: 96 10 20 00 clr %o3 40007a30: 40 00 0a 30 call 4000a2f0 <_CORE_RWLock_Obtain_for_writing> 40007a34: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007a38: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007a3c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007a40: 84 00 bf ff add %g2, -1, %g2 40007a44: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007a48: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007a4c: 80 a0 e0 00 cmp %g3, 0 40007a50: 02 80 00 0b be 40007a7c 40007a54: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007a58: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40007a5c: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 40007a60: 7f ff ff a6 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007a64: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40007a68: 81 c7 e0 08 ret 40007a6c: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007a70: 90 10 20 16 mov 0x16, %o0 } 40007a74: 81 c7 e0 08 ret 40007a78: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007a7c: 40 00 12 e0 call 4000c5fc <_Thread_Dispatch> 40007a80: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007a84: 10 bf ff f6 b 40007a5c 40007a88: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007a8c : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 40007a8c: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 40007a90: 80 a6 20 00 cmp %i0, 0 40007a94: 02 80 00 1f be 40007b10 40007a98: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007a9c: d2 06 00 00 ld [ %i0 ], %o1 40007aa0: 94 07 bf f4 add %fp, -12, %o2 40007aa4: 40 00 0d ea call 4000b24c <_Objects_Get> 40007aa8: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007aac: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007ab0: 80 a0 60 00 cmp %g1, 0 40007ab4: 02 80 00 08 be 40007ad4 40007ab8: 80 a0 60 02 cmp %g1, 2 40007abc: 08 80 00 16 bleu 40007b14 40007ac0: 90 10 20 16 mov 0x16, %o0 status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40007ac4: 40 00 02 2a call 4000836c <== NOT EXECUTED 40007ac8: 01 00 00 00 nop <== NOT EXECUTED } 40007acc: 81 c7 e0 08 ret <== NOT EXECUTED 40007ad0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 40007ad4: 40 00 0a 29 call 4000a378 <_CORE_RWLock_Release> 40007ad8: 90 02 20 10 add %o0, 0x10, %o0 40007adc: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007ae0: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007ae4: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007ae8: 84 00 bf ff add %g2, -1, %g2 40007aec: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007af0: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007af4: 80 a0 e0 00 cmp %g3, 0 40007af8: 02 80 00 09 be 40007b1c 40007afc: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 40007b00: 7f ff ff 7e call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007b04: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40007b08: 81 c7 e0 08 ret 40007b0c: 91 e8 00 08 restore %g0, %o0, %o0 status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40007b10: 90 10 20 16 mov 0x16, %o0 } 40007b14: 81 c7 e0 08 ret 40007b18: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007b1c: 40 00 12 b8 call 4000c5fc <_Thread_Dispatch> 40007b20: 01 00 00 00 nop 40007b24: 30 bf ff f7 b,a 40007b00 40007b28 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 40007b28: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40007b2c: 80 a6 20 00 cmp %i0, 0 40007b30: 02 80 00 24 be 40007bc0 40007b34: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007b38: d2 06 00 00 ld [ %i0 ], %o1 40007b3c: 94 07 bf f4 add %fp, -12, %o2 40007b40: 40 00 0d c3 call 4000b24c <_Objects_Get> 40007b44: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007b48: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b4c: 80 a0 60 00 cmp %g1, 0 40007b50: 22 80 00 09 be,a 40007b74 40007b54: d2 06 00 00 ld [ %i0 ], %o1 40007b58: 80 a0 60 02 cmp %g1, 2 40007b5c: 08 80 00 1a bleu 40007bc4 40007b60: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007b64: 40 00 02 02 call 4000836c <== NOT EXECUTED 40007b68: 01 00 00 00 nop <== NOT EXECUTED } 40007b6c: 81 c7 e0 08 ret <== NOT EXECUTED 40007b70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40007b74: 90 02 20 10 add %o0, 0x10, %o0 40007b78: 94 10 20 01 mov 1, %o2 40007b7c: 96 10 20 00 clr %o3 40007b80: 40 00 09 dc call 4000a2f0 <_CORE_RWLock_Obtain_for_writing> 40007b84: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007b88: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007b8c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007b90: 84 00 bf ff add %g2, -1, %g2 40007b94: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007b98: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007b9c: 80 a0 e0 00 cmp %g3, 0 40007ba0: 02 80 00 0b be 40007bcc 40007ba4: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007ba8: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40007bac: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 40007bb0: 7f ff ff 52 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007bb4: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40007bb8: 81 c7 e0 08 ret 40007bbc: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007bc0: 90 10 20 16 mov 0x16, %o0 } 40007bc4: 81 c7 e0 08 ret 40007bc8: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007bcc: 40 00 12 8c call 4000c5fc <_Thread_Dispatch> 40007bd0: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007bd4: 10 bf ff f6 b 40007bac 40007bd8: 03 10 00 7a sethi %hi(0x4001e800), %g1 40006e14 : int pthread_setcancelstate( int state, int *oldstate ) { 40006e14: 9d e3 bf 98 save %sp, -104, %sp * 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() ) 40006e18: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006e1c: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 40006e20: 86 10 00 18 mov %i0, %g3 * 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() ) 40006e24: 80 a0 a0 00 cmp %g2, 0 40006e28: 12 80 00 22 bne 40006eb0 40006e2c: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 40006e30: 80 a6 60 00 cmp %i1, 0 40006e34: 02 80 00 04 be 40006e44 40006e38: 80 a0 e0 01 cmp %g3, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 40006e3c: 08 80 00 04 bleu 40006e4c 40006e40: 21 10 00 63 sethi %hi(0x40018c00), %l0 thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); _Thread_Enable_dispatch(); return 0; } 40006e44: 81 c7 e0 08 ret <== NOT EXECUTED 40006e48: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006e4c: 09 10 00 63 sethi %hi(0x40018c00), %g4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006e50: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006e54: c4 01 23 ac ld [ %g4 + 0x3ac ], %g2 40006e58: 82 00 60 01 inc %g1 40006e5c: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40006e60: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006e64: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006e68: 80 a0 e0 00 cmp %g3, 0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006e6c: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006e70: 12 80 00 06 bne 40006e88 40006e74: c6 20 a0 cc st %g3, [ %g2 + 0xcc ] 40006e78: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40006e7c: 80 a0 60 01 cmp %g1, 1 40006e80: 22 80 00 0e be,a 40006eb8 40006e84: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e88: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006e8c: b0 10 20 00 clr %i0 40006e90: 82 00 7f ff add %g1, -1, %g1 40006e94: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 40006e98: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40006e9c: 80 a0 a0 00 cmp %g2, 0 40006ea0: 12 80 00 04 bne 40006eb0 40006ea4: 01 00 00 00 nop _Thread_Dispatch(); 40006ea8: 40 00 10 27 call 4000af44 <_Thread_Dispatch> 40006eac: 01 00 00 00 nop 40006eb0: 81 c7 e0 08 ret 40006eb4: 81 e8 00 00 restore 40006eb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006ebc: 02 bf ff f3 be 40006e88 <== NOT EXECUTED 40006ec0: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40006ec4: 7f ff fd b7 call 400065a0 <_POSIX_Threads_cancel_run> <== NOT EXECUTED 40006ec8: d0 01 23 ac ld [ %g4 + 0x3ac ], %o0 <== NOT EXECUTED 40006ecc: 30 bf ff ef b,a 40006e88 <== NOT EXECUTED 40006ed0 : int pthread_setcanceltype( int type, int *oldtype ) { 40006ed0: 9d e3 bf 98 save %sp, -104, %sp * 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() ) 40006ed4: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006ed8: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 40006edc: 88 10 00 18 mov %i0, %g4 * 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() ) 40006ee0: 80 a0 a0 00 cmp %g2, 0 40006ee4: 12 80 00 22 bne 40006f6c 40006ee8: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 40006eec: 80 a6 60 00 cmp %i1, 0 40006ef0: 02 80 00 04 be 40006f00 40006ef4: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 40006ef8: 08 80 00 04 bleu 40006f08 40006efc: 21 10 00 63 sethi %hi(0x40018c00), %l0 thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); _Thread_Enable_dispatch(); return 0; } 40006f00: 81 c7 e0 08 ret <== NOT EXECUTED 40006f04: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006f08: 1b 10 00 63 sethi %hi(0x40018c00), %o5 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006f0c: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006f10: c4 03 63 ac ld [ %o5 + 0x3ac ], %g2 40006f14: 82 00 60 01 inc %g1 40006f18: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 40006f1c: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 40006f20: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 40006f24: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006f28: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 40006f2c: 80 a0 a0 00 cmp %g2, 0 40006f30: 12 80 00 05 bne 40006f44 40006f34: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 40006f38: 80 a1 20 01 cmp %g4, 1 40006f3c: 22 80 00 0e be,a 40006f74 40006f40: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006f44: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006f48: b0 10 20 00 clr %i0 40006f4c: 82 00 7f ff add %g1, -1, %g1 40006f50: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 40006f54: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40006f58: 80 a0 a0 00 cmp %g2, 0 40006f5c: 12 80 00 04 bne 40006f6c 40006f60: 01 00 00 00 nop _Thread_Dispatch(); 40006f64: 40 00 0f f8 call 4000af44 <_Thread_Dispatch> 40006f68: 01 00 00 00 nop 40006f6c: 81 c7 e0 08 ret 40006f70: 81 e8 00 00 restore 40006f74: 80 a0 60 00 cmp %g1, 0 40006f78: 02 bf ff f3 be 40006f44 40006f7c: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40006f80: 7f ff fd 88 call 400065a0 <_POSIX_Threads_cancel_run> <== NOT EXECUTED 40006f84: d0 03 63 ac ld [ %o5 + 0x3ac ], %o0 <== NOT EXECUTED 40006f88: 30 bf ff ef b,a 40006f44 <== NOT EXECUTED 40009a24 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 40009a24: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 40009a28: 80 a6 a0 00 cmp %i2, 0 40009a2c: 02 80 00 10 be 40009a6c 40009a30: 90 10 20 16 mov 0x16, %o0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 40009a34: c2 06 80 00 ld [ %i2 ], %g1 40009a38: 82 00 7f ff add %g1, -1, %g1 40009a3c: 80 a0 60 fd cmp %g1, 0xfd 40009a40: 18 80 00 0b bgu 40009a6c 40009a44: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40009a48: 02 80 00 66 be 40009be0 40009a4c: a2 10 20 00 clr %l1 40009a50: 04 80 00 66 ble 40009be8 40009a54: 80 a6 60 02 cmp %i1, 2 40009a58: 02 80 00 07 be 40009a74 40009a5c: 80 a6 60 03 cmp %i1, 3 40009a60: 02 80 00 41 be 40009b64 40009a64: 01 00 00 00 nop } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009a68: 90 10 20 16 mov 0x16, %o0 ! 16 } 40009a6c: 81 c7 e0 08 ret 40009a70: 91 e8 00 08 restore %g0, %o0, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40009a74: a2 10 20 02 mov 2, %l1 40009a78: a4 10 20 00 clr %l2 40009a7c: 92 10 00 18 mov %i0, %o1 40009a80: 11 10 00 71 sethi %hi(0x4001c400), %o0 40009a84: 94 07 bf f4 add %fp, -12, %o2 40009a88: 40 00 0b 37 call 4000c764 <_Objects_Get> 40009a8c: 90 12 22 68 or %o0, 0x268, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40009a90: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009a94: 80 a0 60 00 cmp %g1, 0 40009a98: 12 80 00 4b bne 40009bc4 40009a9c: b0 10 00 08 mov %o0, %i0 case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40009aa0: e0 02 21 70 ld [ %o0 + 0x170 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40009aa4: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40009aa8: 80 a0 60 03 cmp %g1, 3 40009aac: 02 80 00 5e be 40009c24 40009ab0: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 40009ab4: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 40009ab8: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 40009abc: e2 26 20 88 st %l1, [ %i0 + 0x88 ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009ac0: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 40009ac4: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 40009ac8: e4 26 20 8c st %l2, [ %i0 + 0x8c ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009acc: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 40009ad0: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009ad4: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009ad8: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 40009adc: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 40009ae0: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40009ae4: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 40009ae8: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 40009aec: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009af0: 06 80 00 0f bl 40009b2c 40009af4: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 40009af8: 80 a6 60 02 cmp %i1, 2 40009afc: 14 80 00 41 bg 40009c00 40009b00: 80 a6 60 03 cmp %i1, 3 40009b04: c6 04 20 80 ld [ %l0 + 0x80 ], %g3 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40009b08: 03 10 00 70 sethi %hi(0x4001c000), %g1 40009b0c: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001c2d8 <_Thread_Ticks_per_timeslice> 40009b10: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009b14: 90 10 00 18 mov %i0, %o0 40009b18: 92 22 40 03 sub %o1, %g3, %o1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40009b1c: c4 26 20 84 st %g2, [ %i0 + 0x84 ] the_thread->real_priority = 40009b20: d2 26 20 18 st %o1, [ %i0 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009b24: 40 00 0e d8 call 4000d684 <_Thread_Change_priority> 40009b28: 94 10 20 01 mov 1, %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009b2c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40009b30: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40009b34: 90 10 20 00 clr %o0 40009b38: 84 00 bf ff add %g2, -1, %g2 40009b3c: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 40009b40: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40009b44: 80 a0 e0 00 cmp %g3, 0 40009b48: 12 bf ff c9 bne 40009a6c 40009b4c: 01 00 00 00 nop _Thread_Dispatch(); 40009b50: 40 00 0f f1 call 4000db14 <_Thread_Dispatch> 40009b54: 01 00 00 00 nop 40009b58: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009b5c: 81 c7 e0 08 ret 40009b60: 91 e8 00 08 restore %g0, %o0, %o0 case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 40009b64: 40 00 14 80 call 4000ed64 <_Timespec_To_ticks> 40009b68: 90 06 a0 08 add %i2, 8, %o0 40009b6c: a0 10 00 08 mov %o0, %l0 40009b70: 40 00 14 7d call 4000ed64 <_Timespec_To_ticks> 40009b74: 90 06 a0 10 add %i2, 0x10, %o0 40009b78: 80 a4 00 08 cmp %l0, %o0 40009b7c: 2a bf ff bc bcs,a 40009a6c 40009b80: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 40009b84: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40009b88: 82 00 7f ff add %g1, -1, %g1 40009b8c: 80 a0 60 fd cmp %g1, 0xfd 40009b90: 18 bf ff b6 bgu 40009a68 40009b94: 03 10 00 26 sethi %hi(0x40009800), %g1 40009b98: 92 10 00 18 mov %i0, %o1 40009b9c: a4 10 60 e8 or %g1, 0xe8, %l2 40009ba0: 11 10 00 71 sethi %hi(0x4001c400), %o0 40009ba4: 94 07 bf f4 add %fp, -12, %o2 40009ba8: 40 00 0a ef call 4000c764 <_Objects_Get> 40009bac: 90 12 22 68 or %o0, 0x268, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40009bb0: c2 07 bf f4 ld [ %fp + -12 ], %g1 if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 40009bb4: a2 10 20 03 mov 3, %l1 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40009bb8: 80 a0 60 00 cmp %g1, 0 40009bbc: 02 bf ff b9 be 40009aa0 40009bc0: b0 10 00 08 mov %o0, %i0 40009bc4: 80 a0 60 02 cmp %g1, 2 40009bc8: 08 bf ff a9 bleu 40009a6c 40009bcc: 90 10 20 03 mov 3, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009bd0: 40 00 00 2c call 40009c80 <== NOT EXECUTED 40009bd4: 01 00 00 00 nop <== NOT EXECUTED } 40009bd8: 81 c7 e0 08 ret <== NOT EXECUTED 40009bdc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40009be0: 10 bf ff a7 b 40009a7c 40009be4: a4 10 20 00 clr %l2 40009be8: 80 a6 60 00 cmp %i1, 0 40009bec: a2 10 20 01 mov 1, %l1 40009bf0: 02 bf ff a3 be 40009a7c 40009bf4: a4 10 20 00 clr %l2 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009bf8: 10 bf ff 9d b 40009a6c 40009bfc: 90 10 20 16 mov 0x16, %o0 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009c00: 12 bf ff cb bne 40009b2c 40009c04: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 40009c08: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 40009c0c: 40 00 15 d3 call 4000f358 <_Watchdog_Remove> 40009c10: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40009c14: 92 10 00 18 mov %i0, %o1 40009c18: 7f ff ff 48 call 40009938 <_POSIX_Threads_Sporadic_budget_TSR> 40009c1c: 90 10 20 00 clr %o0 40009c20: 30 bf ff c3 b,a 40009b2c return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 40009c24: 40 00 15 cd call 4000f358 <_Watchdog_Remove> 40009c28: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40009c2c: 10 bf ff a3 b 40009ab8 40009c30: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 40006e8c : int pthread_setspecific( pthread_key_t key, const void *value ) { 40006e8c: 9d e3 bf 90 save %sp, -112, %sp 40006e90: 11 10 00 65 sethi %hi(0x40019400), %o0 40006e94: 92 10 00 18 mov %i0, %o1 40006e98: 90 12 20 80 or %o0, 0x80, %o0 40006e9c: 40 00 0d 22 call 4000a324 <_Objects_Get> 40006ea0: 94 07 bf f4 add %fp, -12, %o2 uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006ea4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006ea8: 80 a0 60 00 cmp %g1, 0 40006eac: 12 80 00 19 bne 40006f10 40006eb0: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return EINVAL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40006eb4: 03 10 00 64 sethi %hi(0x40019000), %g1 40006eb8: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 ! 4001905c <_Thread_Executing> 40006ebc: c6 00 a0 08 ld [ %g2 + 8 ], %g3 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 40006ec0: 05 00 00 3f sethi %hi(0xfc00), %g2 40006ec4: 83 30 e0 16 srl %g3, 0x16, %g1 40006ec8: 82 08 60 1c and %g1, 0x1c, %g1 40006ecc: 82 00 40 08 add %g1, %o0, %g1 40006ed0: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 40006ed4: 84 10 a3 ff or %g2, 0x3ff, %g2 40006ed8: 86 08 c0 02 and %g3, %g2, %g3 40006edc: 87 28 e0 02 sll %g3, 2, %g3 40006ee0: f2 21 00 03 st %i1, [ %g4 + %g3 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006ee4: 07 10 00 63 sethi %hi(0x40018c00), %g3 40006ee8: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 40018f80 <_Thread_Dispatch_disable_level> 40006eec: 90 10 20 00 clr %o0 40006ef0: 82 00 7f ff add %g1, -1, %g1 40006ef4: c2 20 e3 80 st %g1, [ %g3 + 0x380 ] 40006ef8: c4 00 e3 80 ld [ %g3 + 0x380 ], %g2 40006efc: 80 a0 a0 00 cmp %g2, 0 40006f00: 02 80 00 0a be 40006f28 40006f04: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006f08: 81 c7 e0 08 ret 40006f0c: 91 e8 00 08 restore %g0, %o0, %o0 uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006f10: 08 bf ff fe bleu 40006f08 40006f14: 90 10 20 16 mov 0x16, %o0 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006f18: 40 00 02 4a call 40007840 <== NOT EXECUTED 40006f1c: 01 00 00 00 nop <== NOT EXECUTED } 40006f20: 81 c7 e0 08 ret <== NOT EXECUTED 40006f24: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40006f28: 40 00 11 eb call 4000b6d4 <_Thread_Dispatch> 40006f2c: 01 00 00 00 nop 40006f30: 90 10 20 00 clr %o0 ! 0 40006f34: 81 c7 e0 08 ret 40006f38: 91 e8 00 08 restore %g0, %o0, %o0 40006a8c : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 40006a8c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 40006a90: 80 a6 20 00 cmp %i0, 0 40006a94: 02 80 00 23 be 40006b20 40006a98: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 40006a9c: d2 06 00 00 ld [ %i0 ], %o1 40006aa0: 31 10 00 59 sethi %hi(0x40016400), %i0 40006aa4: 40 00 0c 4e call 40009bdc <_Objects_Get> 40006aa8: 90 16 21 54 or %i0, 0x154, %o0 ! 40016554 <_POSIX_Spinlock_Information> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006aac: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006ab0: 80 a0 60 00 cmp %g1, 0 40006ab4: 12 80 00 14 bne 40006b04 40006ab8: 92 10 00 08 mov %o0, %o1 RTEMS_INLINE_ROUTINE boolean _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 40006abc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 40006ac0: 80 a0 60 00 cmp %g1, 0 40006ac4: 02 80 00 1a be 40006b2c 40006ac8: 90 16 21 54 or %i0, 0x154, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006acc: 03 10 00 58 sethi %hi(0x40016000), %g1 40006ad0: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006ad4: 90 10 20 10 mov 0x10, %o0 40006ad8: 84 00 bf ff add %g2, -1, %g2 40006adc: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006ae0: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006ae4: 80 a0 e0 00 cmp %g3, 0 40006ae8: 12 80 00 0c bne 40006b18 40006aec: 01 00 00 00 nop _Thread_Dispatch(); 40006af0: 40 00 11 27 call 4000af8c <_Thread_Dispatch> 40006af4: 01 00 00 00 nop 40006af8: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006afc: 81 c7 e0 08 ret 40006b00: 91 e8 00 08 restore %g0, %o0, %o0 if ( !spinlock ) return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006b04: 80 a0 60 02 cmp %g1, 2 40006b08: 08 80 00 07 bleu 40006b24 40006b0c: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006b10: 40 00 00 e9 call 40006eb4 <== NOT EXECUTED 40006b14: 01 00 00 00 nop <== NOT EXECUTED } 40006b18: 81 c7 e0 08 ret 40006b1c: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006b20: 90 10 20 16 mov 0x16, %o0 } 40006b24: 81 c7 e0 08 ret 40006b28: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006b2c: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006b30: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006b34: 05 00 00 3f sethi %hi(0xfc00), %g2 40006b38: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40006b3c: 82 08 40 02 and %g1, %g2, %g1 40006b40: 80 a0 40 03 cmp %g1, %g3 40006b44: 18 80 00 04 bgu 40006b54 40006b48: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 40006b4c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006b50: c0 20 80 01 clr [ %g2 + %g1 ] */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 40006b54: 40 00 0b df call 40009ad0 <_Objects_Free> 40006b58: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006b5c: 03 10 00 58 sethi %hi(0x40016000), %g1 40006b60: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006b64: 90 10 20 00 clr %o0 40006b68: 84 00 bf ff add %g2, -1, %g2 40006b6c: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006b70: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006b74: 80 a0 e0 00 cmp %g3, 0 40006b78: 12 bf ff e8 bne 40006b18 40006b7c: 01 00 00 00 nop _Thread_Dispatch(); 40006b80: 40 00 11 03 call 4000af8c <_Thread_Dispatch> 40006b84: 01 00 00 00 nop 40006b88: 10 bf ff e4 b 40006b18 40006b8c: 90 10 20 00 clr %o0 ! 0 40006b90 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 40006b90: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 40006b94: 80 a6 20 00 cmp %i0, 0 40006b98: 02 80 00 1a be 40006c00 40006b9c: 80 a6 60 00 cmp %i1, 0 return EINVAL; switch ( pshared ) { 40006ba0: 32 80 00 16 bne,a 40006bf8 40006ba4: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006ba8: 21 10 00 58 sethi %hi(0x40016000), %l0 40006bac: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 ! 40016220 <_Thread_Dispatch_disable_level> 40006bb0: 82 00 60 01 inc %g1 40006bb4: c2 24 22 20 st %g1, [ %l0 + 0x220 ] * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 40006bb8: 23 10 00 59 sethi %hi(0x40016400), %l1 40006bbc: 40 00 0a b7 call 40009698 <_Objects_Allocate> 40006bc0: 90 14 61 54 or %l1, 0x154, %o0 ! 40016554 <_POSIX_Spinlock_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 40006bc4: b2 92 20 00 orcc %o0, 0, %i1 40006bc8: 12 80 00 11 bne 40006c0c 40006bcc: 90 06 60 10 add %i1, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006bd0: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 40006bd4: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40006bd8: 82 00 7f ff add %g1, -1, %g1 40006bdc: c2 24 22 20 st %g1, [ %l0 + 0x220 ] 40006be0: c4 04 22 20 ld [ %l0 + 0x220 ], %g2 40006be4: 80 a0 a0 00 cmp %g2, 0 40006be8: 12 80 00 07 bne 40006c04 40006bec: 01 00 00 00 nop 40006bf0: 40 00 10 e7 call 4000af8c <_Thread_Dispatch> 40006bf4: 01 00 00 00 nop 40006bf8: 81 c7 e0 08 ret 40006bfc: 81 e8 00 00 restore 40006c00: b0 10 20 16 mov 0x16, %i0 *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; } 40006c04: 81 c7 e0 08 ret 40006c08: 81 e8 00 00 restore if ( !the_spinlock ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 40006c0c: 40 00 08 76 call 40008de4 <_CORE_spinlock_Initialize> 40006c10: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c14: 90 14 61 54 or %l1, 0x154, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006c18: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c1c: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40006c20: 03 00 00 3f sethi %hi(0xfc00), %g1 40006c24: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006c28: 82 08 c0 01 and %g3, %g1, %g1 40006c2c: 80 a0 40 02 cmp %g1, %g2 40006c30: 38 80 00 06 bgu,a 40006c48 40006c34: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006c38: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006c3c: 83 28 60 02 sll %g1, 2, %g1 40006c40: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 40006c44: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006c48: c0 26 60 0c clr [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c4c: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 40006c50: 10 bf ff e2 b 40006bd8 40006c54: b0 10 20 00 clr %i0 40006c58 : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 40006c58: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40006c5c: 80 a6 20 00 cmp %i0, 0 40006c60: 02 80 00 21 be 40006ce4 40006c64: 11 10 00 59 sethi %hi(0x40016400), %o0 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 40006c68: d2 06 00 00 ld [ %i0 ], %o1 40006c6c: 94 07 bf f4 add %fp, -12, %o2 40006c70: 40 00 0b db call 40009bdc <_Objects_Get> 40006c74: 90 12 21 54 or %o0, 0x154, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006c78: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006c7c: 80 a0 60 00 cmp %g1, 0 40006c80: 02 80 00 09 be 40006ca4 40006c84: 92 10 20 01 mov 1, %o1 40006c88: 80 a0 60 02 cmp %g1, 2 40006c8c: 08 80 00 17 bleu 40006ce8 40006c90: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006c94: 40 00 00 88 call 40006eb4 <== NOT EXECUTED 40006c98: 01 00 00 00 nop <== NOT EXECUTED } 40006c9c: 81 c7 e0 08 ret <== NOT EXECUTED 40006ca0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); 40006ca4: 94 10 20 00 clr %o2 40006ca8: 40 00 08 74 call 40008e78 <_CORE_spinlock_Wait> 40006cac: 90 02 20 10 add %o0, 0x10, %o0 40006cb0: b0 10 00 08 mov %o0, %i0 40006cb4: 03 10 00 58 sethi %hi(0x40016000), %g1 40006cb8: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006cbc: 84 00 bf ff add %g2, -1, %g2 40006cc0: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006cc4: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006cc8: 80 a0 e0 00 cmp %g3, 0 40006ccc: 02 80 00 09 be 40006cf0 40006cd0: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40006cd4: 40 00 00 0a call 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40006cd8: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006cdc: 81 c7 e0 08 ret 40006ce0: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006ce4: 90 10 20 16 mov 0x16, %o0 } 40006ce8: 81 c7 e0 08 ret 40006cec: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006cf0: 40 00 10 a7 call 4000af8c <_Thread_Dispatch> 40006cf4: 01 00 00 00 nop 40006cf8: 30 bf ff f7 b,a 40006cd4 40006d28 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 40006d28: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40006d2c: 80 a6 20 00 cmp %i0, 0 40006d30: 02 80 00 21 be 40006db4 40006d34: 11 10 00 59 sethi %hi(0x40016400), %o0 40006d38: d2 06 00 00 ld [ %i0 ], %o1 40006d3c: 94 07 bf f4 add %fp, -12, %o2 40006d40: 40 00 0b a7 call 40009bdc <_Objects_Get> 40006d44: 90 12 21 54 or %o0, 0x154, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006d48: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006d4c: 80 a0 60 00 cmp %g1, 0 40006d50: 02 80 00 09 be 40006d74 40006d54: 92 10 20 00 clr %o1 40006d58: 80 a0 60 02 cmp %g1, 2 40006d5c: 08 80 00 17 bleu 40006db8 40006d60: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006d64: 40 00 00 54 call 40006eb4 <== NOT EXECUTED 40006d68: 01 00 00 00 nop <== NOT EXECUTED } 40006d6c: 81 c7 e0 08 ret <== NOT EXECUTED 40006d70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); 40006d74: 94 10 20 00 clr %o2 40006d78: 40 00 08 40 call 40008e78 <_CORE_spinlock_Wait> 40006d7c: 90 02 20 10 add %o0, 0x10, %o0 40006d80: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006d84: 03 10 00 58 sethi %hi(0x40016000), %g1 40006d88: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006d8c: 84 00 bf ff add %g2, -1, %g2 40006d90: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006d94: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006d98: 80 a0 e0 00 cmp %g3, 0 40006d9c: 02 80 00 09 be 40006dc0 40006da0: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40006da4: 7f ff ff d6 call 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40006da8: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006dac: 81 c7 e0 08 ret 40006db0: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006db4: 90 10 20 16 mov 0x16, %o0 } 40006db8: 81 c7 e0 08 ret 40006dbc: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006dc0: 40 00 10 73 call 4000af8c <_Thread_Dispatch> 40006dc4: 01 00 00 00 nop 40006dc8: 30 bf ff f7 b,a 40006da4 40006dcc : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 40006dcc: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40006dd0: 80 a6 20 00 cmp %i0, 0 40006dd4: 02 80 00 1f be 40006e50 40006dd8: 11 10 00 59 sethi %hi(0x40016400), %o0 40006ddc: d2 06 00 00 ld [ %i0 ], %o1 40006de0: 94 07 bf f4 add %fp, -12, %o2 40006de4: 40 00 0b 7e call 40009bdc <_Objects_Get> 40006de8: 90 12 21 54 or %o0, 0x154, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006dec: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006df0: 80 a0 60 00 cmp %g1, 0 40006df4: 02 80 00 08 be 40006e14 40006df8: 80 a0 60 02 cmp %g1, 2 40006dfc: 08 80 00 16 bleu 40006e54 40006e00: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006e04: 40 00 00 2c call 40006eb4 <== NOT EXECUTED 40006e08: 01 00 00 00 nop <== NOT EXECUTED } 40006e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40006e10: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 40006e14: 40 00 07 fb call 40008e00 <_CORE_spinlock_Release> 40006e18: 90 02 20 10 add %o0, 0x10, %o0 40006e1c: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e20: 03 10 00 58 sethi %hi(0x40016000), %g1 40006e24: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006e28: 84 00 bf ff add %g2, -1, %g2 40006e2c: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006e30: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006e34: 80 a0 e0 00 cmp %g3, 0 40006e38: 02 80 00 09 be 40006e5c 40006e3c: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40006e40: 7f ff ff af call 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40006e44: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006e48: 81 c7 e0 08 ret 40006e4c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006e50: 90 10 20 16 mov 0x16, %o0 } 40006e54: 81 c7 e0 08 ret 40006e58: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006e5c: 40 00 10 4c call 4000af8c <_Thread_Dispatch> 40006e60: 01 00 00 00 nop 40006e64: 30 bf ff f7 b,a 40006e40 40006fb0 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40006fb0: 9d e3 bf 98 save %sp, -104, %sp * 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() ) 40006fb4: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006fb8: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> 40006fbc: 80 a0 a0 00 cmp %g2, 0 40006fc0: 12 80 00 17 bne 4000701c 40006fc4: 21 10 00 63 sethi %hi(0x40018c00), %l0 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006fc8: 07 10 00 63 sethi %hi(0x40018c00), %g3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006fcc: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006fd0: c4 00 e3 ac ld [ %g3 + 0x3ac ], %g2 40006fd4: 82 00 60 01 inc %g1 40006fd8: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40006fdc: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006fe0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40006fe4: 80 a0 60 00 cmp %g1, 0 40006fe8: 12 80 00 06 bne 40007000 40006fec: 01 00 00 00 nop 40006ff0: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40006ff4: 80 a0 60 00 cmp %g1, 0 40006ff8: 12 80 00 0d bne 4000702c 40006ffc: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007000: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40007004: 82 00 7f ff add %g1, -1, %g1 40007008: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 4000700c: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40007010: 80 a0 a0 00 cmp %g2, 0 40007014: 02 80 00 04 be 40007024 40007018: 01 00 00 00 nop 4000701c: 81 c7 e0 08 ret <== NOT EXECUTED 40007020: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40007024: 40 00 0f c8 call 4000af44 <_Thread_Dispatch> 40007028: 81 e8 00 00 restore thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 4000702c: 7f ff fd 5d call 400065a0 <_POSIX_Threads_cancel_run> 40007030: d0 00 e3 ac ld [ %g3 + 0x3ac ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007034: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40007038: 82 00 7f ff add %g1, -1, %g1 4000703c: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 40007040: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40007044: 80 a0 a0 00 cmp %g2, 0 40007048: 12 bf ff f5 bne 4000701c 4000704c: 01 00 00 00 nop 40007050: 30 bf ff f5 b,a 40007024 400073d0 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 400073d0: 9d e3 bf 90 save %sp, -112, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 400073d4: a4 96 20 00 orcc %i0, 0, %l2 400073d8: 02 80 00 20 be 40007458 400073dc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400073e0: 80 a6 e0 00 cmp %i3, 0 400073e4: 02 80 00 1d be 40007458 400073e8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 400073ec: 80 8e 60 10 btst 0x10, %i1 400073f0: 02 80 00 39 be 400074d4 400073f4: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 400073f8: 02 80 00 18 be 40007458 400073fc: b0 10 20 0a mov 0xa, %i0 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 40007400: c0 27 bf f0 clr [ %fp + -16 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007404: 21 10 00 81 sethi %hi(0x40020400), %l0 40007408: c2 04 21 90 ld [ %l0 + 0x190 ], %g1 ! 40020590 <_Thread_Dispatch_disable_level> if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4000740c: f4 27 bf f4 st %i2, [ %fp + -12 ] 40007410: 82 00 60 01 inc %g1 40007414: c2 24 21 90 st %g1, [ %l0 + 0x190 ] * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 40007418: 23 10 00 80 sethi %hi(0x40020000), %l1 4000741c: 40 00 0a 6b call 40009dc8 <_Objects_Allocate> 40007420: 90 14 63 f8 or %l1, 0x3f8, %o0 ! 400203f8 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 40007424: b4 92 20 00 orcc %o0, 0, %i2 40007428: 12 80 00 0e bne 40007460 4000742c: 90 06 a0 14 add %i2, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007430: c2 04 21 90 ld [ %l0 + 0x190 ], %g1 40007434: b0 10 20 05 mov 5, %i0 40007438: 82 00 7f ff add %g1, -1, %g1 4000743c: c2 24 21 90 st %g1, [ %l0 + 0x190 ] 40007440: c4 04 21 90 ld [ %l0 + 0x190 ], %g2 40007444: 80 a0 a0 00 cmp %g2, 0 40007448: 12 80 00 21 bne 400074cc 4000744c: 01 00 00 00 nop _Thread_Dispatch(); 40007450: 40 00 10 d7 call 4000b7ac <_Thread_Dispatch> 40007454: 01 00 00 00 nop 40007458: 81 c7 e0 08 ret 4000745c: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 40007460: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 40007464: 40 00 07 8d call 40009298 <_CORE_barrier_Initialize> 40007468: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000746c: 90 14 63 f8 or %l1, 0x3f8, %o0 Objects_Name name ) { uint32_t index; index = _Objects_Get_index( the_object->id ); 40007470: c6 06 a0 08 ld [ %i2 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007474: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40007478: 03 00 00 3f sethi %hi(0xfc00), %g1 4000747c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007480: 82 08 c0 01 and %g3, %g1, %g1 40007484: 80 a0 40 02 cmp %g1, %g2 40007488: 38 80 00 06 bgu,a 400074a0 4000748c: e4 26 a0 0c st %l2, [ %i2 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40007490: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007494: 83 28 60 02 sll %g1, 2, %g1 40007498: f4 20 80 01 st %i2, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000749c: e4 26 a0 0c st %l2, [ %i2 + 0xc ] &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 400074a0: c6 26 c0 00 st %g3, [ %i3 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400074a4: c2 04 21 90 ld [ %l0 + 0x190 ], %g1 400074a8: b0 10 20 00 clr %i0 400074ac: 82 00 7f ff add %g1, -1, %g1 400074b0: c2 24 21 90 st %g1, [ %l0 + 0x190 ] 400074b4: c4 04 21 90 ld [ %l0 + 0x190 ], %g2 400074b8: 80 a0 a0 00 cmp %g2, 0 400074bc: 12 80 00 04 bne 400074cc 400074c0: 01 00 00 00 nop _Thread_Dispatch(); 400074c4: 40 00 10 ba call 4000b7ac <_Thread_Dispatch> 400074c8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400074cc: 81 c7 e0 08 ret 400074d0: 81 e8 00 00 restore if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 400074d4: 82 10 20 01 mov 1, %g1 400074d8: 10 bf ff cb b 40007404 400074dc: c2 27 bf f0 st %g1, [ %fp + -16 ] 400074e0 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 400074e0: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 400074e4: 21 10 00 80 sethi %hi(0x40020000), %l0 400074e8: 92 10 00 18 mov %i0, %o1 400074ec: 94 07 bf f4 add %fp, -12, %o2 400074f0: 40 00 0b 87 call 4000a30c <_Objects_Get> 400074f4: 90 14 23 f8 or %l0, 0x3f8, %o0 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 400074f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400074fc: 80 a0 60 00 cmp %g1, 0 40007500: 12 80 00 20 bne 40007580 40007504: b0 10 00 08 mov %o0, %i0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Flush( 40007508: 90 02 20 14 add %o0, 0x14, %o0 4000750c: 92 10 20 00 clr %o1 40007510: 40 00 13 1d call 4000c184 <_Thread_queue_Flush> 40007514: 94 10 20 02 mov 2, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007518: 90 14 23 f8 or %l0, 0x3f8, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000751c: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007520: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40007524: 05 00 00 3f sethi %hi(0xfc00), %g2 40007528: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000752c: 82 08 40 02 and %g1, %g2, %g1 40007530: 80 a0 40 03 cmp %g1, %g3 40007534: 38 80 00 06 bgu,a 4000754c 40007538: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000753c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007540: 83 28 60 02 sll %g1, 2, %g1 40007544: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40007548: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4000754c: 40 00 0b 2d call 4000a200 <_Objects_Free> 40007550: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007554: 03 10 00 81 sethi %hi(0x40020400), %g1 40007558: c4 00 61 90 ld [ %g1 + 0x190 ], %g2 ! 40020590 <_Thread_Dispatch_disable_level> 4000755c: b0 10 20 00 clr %i0 40007560: 84 00 bf ff add %g2, -1, %g2 40007564: c4 20 61 90 st %g2, [ %g1 + 0x190 ] 40007568: c6 00 61 90 ld [ %g1 + 0x190 ], %g3 4000756c: 80 a0 e0 00 cmp %g3, 0 40007570: 02 80 00 09 be 40007594 40007574: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007578: 81 c7 e0 08 ret 4000757c: 81 e8 00 00 restore { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40007580: 80 a0 60 02 cmp %g1, 2 40007584: 08 bf ff fd bleu 40007578 40007588: b0 10 20 04 mov 4, %i0 4000758c: 81 c7 e0 08 ret <== NOT EXECUTED 40007590: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40007594: 40 00 10 86 call 4000b7ac <_Thread_Dispatch> 40007598: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000759c: 81 c7 e0 08 ret 400075a0: 81 e8 00 00 restore 400075dc : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 400075dc: 9d e3 bf 90 save %sp, -112, %sp 400075e0: a0 10 00 18 mov %i0, %l0 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 400075e4: 80 a6 60 00 cmp %i1, 0 400075e8: 02 80 00 1f be 40007664 400075ec: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 400075f0: 11 10 00 80 sethi %hi(0x40020000), %o0 400075f4: 92 10 00 10 mov %l0, %o1 400075f8: 90 12 23 f8 or %o0, 0x3f8, %o0 400075fc: 40 00 0b 44 call 4000a30c <_Objects_Get> 40007600: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40007604: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007608: 80 a0 60 00 cmp %g1, 0 4000760c: 02 80 00 07 be 40007628 40007610: 92 10 00 10 mov %l0, %o1 40007614: 80 a0 60 02 cmp %g1, 2 40007618: 08 80 00 13 bleu 40007664 4000761c: b0 10 20 04 mov 4, %i0 40007620: 81 c7 e0 08 ret <== NOT EXECUTED 40007624: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 40007628: 94 10 20 00 clr %o2 4000762c: 40 00 07 27 call 400092c8 <_CORE_barrier_Release> 40007630: 90 02 20 14 add %o0, 0x14, %o0 40007634: d0 26 40 00 st %o0, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007638: 03 10 00 81 sethi %hi(0x40020400), %g1 4000763c: c4 00 61 90 ld [ %g1 + 0x190 ], %g2 ! 40020590 <_Thread_Dispatch_disable_level> 40007640: b0 10 20 00 clr %i0 40007644: 84 00 bf ff add %g2, -1, %g2 40007648: c4 20 61 90 st %g2, [ %g1 + 0x190 ] 4000764c: c6 00 61 90 ld [ %g1 + 0x190 ], %g3 40007650: 80 a0 e0 00 cmp %g3, 0 40007654: 12 80 00 04 bne 40007664 40007658: 01 00 00 00 nop _Thread_Dispatch(); 4000765c: 40 00 10 54 call 4000b7ac <_Thread_Dispatch> 40007660: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007664: 81 c7 e0 08 ret 40007668: 81 e8 00 00 restore 4000766c : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4000766c: 9d e3 bf 90 save %sp, -112, %sp 40007670: 11 10 00 80 sethi %hi(0x40020000), %o0 40007674: 92 10 00 18 mov %i0, %o1 40007678: 90 12 23 f8 or %o0, 0x3f8, %o0 4000767c: 40 00 0b 24 call 4000a30c <_Objects_Get> 40007680: 94 07 bf f4 add %fp, -12, %o2 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40007684: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007688: 80 a0 60 00 cmp %g1, 0 4000768c: 12 80 00 14 bne 400076dc 40007690: 96 10 00 19 mov %i1, %o3 case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Wait( 40007694: 90 02 20 14 add %o0, 0x14, %o0 40007698: 92 10 00 18 mov %i0, %o1 4000769c: 94 10 20 01 mov 1, %o2 400076a0: 40 00 07 15 call 400092f4 <_CORE_barrier_Wait> 400076a4: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400076a8: 03 10 00 81 sethi %hi(0x40020400), %g1 400076ac: c4 00 61 90 ld [ %g1 + 0x190 ], %g2 ! 40020590 <_Thread_Dispatch_disable_level> 400076b0: 84 00 bf ff add %g2, -1, %g2 400076b4: c4 20 61 90 st %g2, [ %g1 + 0x190 ] 400076b8: c6 00 61 90 ld [ %g1 + 0x190 ], %g3 400076bc: 80 a0 e0 00 cmp %g3, 0 400076c0: 02 80 00 0d be 400076f4 400076c4: 03 10 00 81 sethi %hi(0x40020400), %g1 TRUE, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 400076c8: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 4002066c <_Thread_Executing> <== NOT EXECUTED 400076cc: 40 00 1f 95 call 4000f520 <_Barrier_Translate_core_barrier_return_code> <== NOT EXECUTED 400076d0: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 <== NOT EXECUTED _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400076d4: 81 c7 e0 08 ret 400076d8: 91 e8 00 08 restore %g0, %o0, %o0 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 400076dc: 80 a0 60 02 cmp %g1, 2 400076e0: 08 bf ff fd bleu 400076d4 400076e4: 90 10 20 04 mov 4, %o0 400076e8: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400076ec: 81 c7 e0 08 ret <== NOT EXECUTED 400076f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400076f4: 40 00 10 2e call 4000b7ac <_Thread_Dispatch> 400076f8: 01 00 00 00 nop TRUE, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 400076fc: 03 10 00 81 sethi %hi(0x40020400), %g1 40007700: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 4002066c <_Thread_Executing> 40007704: 40 00 1f 87 call 4000f520 <_Barrier_Translate_core_barrier_return_code> 40007708: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 4000770c: 30 bf ff f2 b,a 400076d4 400063e4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 400063e4: 9d e3 bf 60 save %sp, -160, %sp 400063e8: 82 10 00 18 mov %i0, %g1 if ( !time_buffer ) 400063ec: 80 a6 60 00 cmp %i1, 0 400063f0: 02 80 00 19 be 40006454 400063f4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; switch ( option ) { 400063f8: 80 a0 60 04 cmp %g1, 4 400063fc: 18 80 00 16 bgu 40006454 40006400: b0 10 20 19 mov 0x19, %i0 40006404: 83 28 60 02 sll %g1, 2, %g1 40006408: 05 10 00 18 sethi %hi(0x40006000), %g2 4000640c: 84 10 a3 d0 or %g2, 0x3d0, %g2 ! 400063d0 40006410: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40006414: 81 c0 c0 00 jmp %g3 40006418: 01 00 00 00 nop } case RTEMS_CLOCK_GET_TIME_VALUE: { struct timeval *time = (struct timeval *)time_buffer; if ( !_TOD_Is_set ) 4000641c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40006420: c4 00 62 1c ld [ %g1 + 0x21c ], %g2 ! 4001be1c <_TOD_Is_set> <== NOT EXECUTED 40006424: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40006428: 12 80 00 46 bne 40006540 <== NOT EXECUTED 4000642c: 01 00 00 00 nop <== NOT EXECUTED } } return RTEMS_INTERNAL_ERROR; /* should never get here */ } 40006430: 81 c7 e0 08 ret 40006434: 91 e8 20 0b restore %g0, 0xb, %o0 } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick; 40006438: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000643c: d2 00 63 bc ld [ %g1 + 0x3bc ], %o1 ! 4001bfbc <_TOD_Microseconds_per_tick> 40006440: 11 00 03 d0 sethi %hi(0xf4000), %o0 40006444: b0 10 20 00 clr %i0 40006448: 40 00 42 f3 call 40017014 <.udiv> 4000644c: 90 12 22 40 or %o0, 0x240, %o0 40006450: d0 26 40 00 st %o0, [ %i1 ] 40006454: 81 c7 e0 08 ret 40006458: 81 e8 00 00 restore } case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = _Watchdog_Ticks_since_boot; 4000645c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006460: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 4001bf64 <_Watchdog_Ticks_since_boot> 40006464: c4 26 40 00 st %g2, [ %i1 ] 40006468: 81 c7 e0 08 ret 4000646c: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: { rtems_interval *interval = (rtems_interval *)time_buffer; if ( !_TOD_Is_set ) 40006470: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006474: c4 00 62 1c ld [ %g1 + 0x21c ], %g2 ! 4001be1c <_TOD_Is_set> 40006478: 80 a0 a0 00 cmp %g2, 0 4000647c: 02 bf ff ed be 40006430 40006480: 03 10 00 6f sethi %hi(0x4001bc00), %g1 return RTEMS_NOT_DEFINED; *interval = _TOD_Seconds_since_epoch; 40006484: c4 00 62 98 ld [ %g1 + 0x298 ], %g2 ! 4001be98 <_TOD_Now> 40006488: c4 26 40 00 st %g2, [ %i1 ] 4000648c: 81 c7 e0 08 ret 40006490: 91 e8 20 00 restore %g0, 0, %o0 case RTEMS_CLOCK_GET_TOD: { struct tm time; struct timeval now; rtems_time_of_day *tmbuf = (rtems_time_of_day *)time_buffer; if ( !_TOD_Is_set ) 40006494: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006498: c4 00 62 1c ld [ %g1 + 0x21c ], %g2 ! 4001be1c <_TOD_Is_set> 4000649c: 80 a0 a0 00 cmp %g2, 0 400064a0: 02 bf ff e4 be 40006430 400064a4: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 400064a8: 7f ff ee d0 call 40001fe8 400064ac: 01 00 00 00 nop 400064b0: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 400064b4: 40 00 07 97 call 40008310 <_TOD_Get> 400064b8: 90 07 bf e8 add %fp, -24, %o0 _ISR_Enable(level); 400064bc: 7f ff ee cf call 40001ff8 400064c0: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; 400064c4: c2 07 bf e8 ld [ %fp + -24 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 400064c8: d0 07 bf ec ld [ %fp + -20 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 400064cc: c2 27 bf f0 st %g1, [ %fp + -16 ] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 400064d0: 40 00 42 d1 call 40017014 <.udiv> 400064d4: 92 10 23 e8 mov 0x3e8, %o1 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 400064d8: 92 07 bf c4 add %fp, -60, %o1 400064dc: d0 27 bf f4 st %o0, [ %fp + -12 ] 400064e0: 40 00 28 74 call 400106b0 400064e4: 90 07 bf f0 add %fp, -16, %o0 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 400064e8: c4 07 bf d0 ld [ %fp + -48 ], %g2 tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 400064ec: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400064f0: d2 00 63 bc ld [ %g1 + 0x3bc ], %o1 ! 4001bfbc <_TOD_Microseconds_per_tick> gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 400064f4: c4 26 60 08 st %g2, [ %i1 + 8 ] tmbuf->hour = time.tm_hour; 400064f8: c2 07 bf cc ld [ %fp + -52 ], %g1 tmbuf->minute = time.tm_min; 400064fc: c4 07 bf c8 ld [ %fp + -56 ], %g2 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; 40006500: c2 26 60 0c st %g1, [ %i1 + 0xc ] tmbuf->minute = time.tm_min; 40006504: c4 26 60 10 st %g2, [ %i1 + 0x10 ] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 40006508: c2 07 bf d8 ld [ %fp + -40 ], %g1 tmbuf->month = time.tm_mon + 1; 4000650c: c4 07 bf d4 ld [ %fp + -44 ], %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 40006510: c6 07 bf c4 ld [ %fp + -60 ], %g3 tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 40006514: d0 07 bf f4 ld [ %fp + -12 ], %o0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 40006518: 82 00 67 6c add %g1, 0x76c, %g1 tmbuf->month = time.tm_mon + 1; 4000651c: 84 00 a0 01 inc %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 40006520: c6 26 60 14 st %g3, [ %i1 + 0x14 ] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 40006524: c2 26 40 00 st %g1, [ %i1 ] tmbuf->month = time.tm_mon + 1; 40006528: c4 26 60 04 st %g2, [ %i1 + 4 ] tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 4000652c: 40 00 42 ba call 40017014 <.udiv> 40006530: b0 10 20 00 clr %i0 40006534: d0 26 60 18 st %o0, [ %i1 + 0x18 ] 40006538: 81 c7 e0 08 ret 4000653c: 81 e8 00 00 restore ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 40006540: 7f ff ee aa call 40001fe8 <== NOT EXECUTED 40006544: 01 00 00 00 nop <== NOT EXECUTED 40006548: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED _TOD_Get( &now ); 4000654c: 40 00 07 71 call 40008310 <_TOD_Get> <== NOT EXECUTED 40006550: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED _ISR_Enable(level); 40006554: 7f ff ee a9 call 40001ff8 <== NOT EXECUTED 40006558: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED time->tv_sec = now.tv_sec; 4000655c: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 40006560: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED 40006564: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 40006568: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000656c: 40 00 42 aa call 40017014 <.udiv> <== NOT EXECUTED 40006570: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006574: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED 40006578: 81 c7 e0 08 ret <== NOT EXECUTED 4000657c: 81 e8 00 00 restore <== NOT EXECUTED 400065a0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 400065a0: 9d e3 bf 98 save %sp, -104, %sp _TOD_Tickle_ticks(); 400065a4: 40 00 07 83 call 400083b0 <_TOD_Tickle_ticks> 400065a8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 400065ac: 11 10 00 6f sethi %hi(0x4001bc00), %o0 400065b0: 40 00 15 41 call 4000bab4 <_Watchdog_Tickle> 400065b4: 90 12 22 dc or %o0, 0x2dc, %o0 ! 4001bedc <_Watchdog_Ticks_chain> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 400065b8: 40 00 13 65 call 4000b34c <_Thread_Tickle_timeslice> 400065bc: 01 00 00 00 nop * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 400065c0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400065c4: c4 00 62 cc ld [ %g1 + 0x2cc ], %g2 ! 4001becc <_Context_Switch_necessary> if ( _Thread_Is_context_switch_necessary() && 400065c8: 80 a0 a0 00 cmp %g2, 0 400065cc: 02 80 00 06 be 400065e4 400065d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 400065d4: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 400065d8: 80 a0 a0 00 cmp %g2, 0 400065dc: 02 80 00 04 be 400065ec 400065e0: 01 00 00 00 nop _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 400065e4: 81 c7 e0 08 ret 400065e8: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 400065ec: 40 00 0f 6b call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400065f0: b0 10 20 00 clr %i0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 400065f4: 81 c7 e0 08 ret <== NOT EXECUTED 400065f8: 81 e8 00 00 restore <== NOT EXECUTED 40006834 : rtems_status_code rtems_event_send( Objects_Id id, rtems_event_set event_in ) { 40006834: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40006838: 92 96 20 00 orcc %i0, 0, %o1 4000683c: 12 80 00 1c bne 400068ac 40006840: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006844: 23 10 00 6f sethi %hi(0x4001bc00), %l1 40006848: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000684c: 82 00 60 01 inc %g1 40006850: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40006854: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006858: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000685c: c0 27 bf f4 clr [ %fp + -12 ] rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 40006860: 7f ff ed e2 call 40001fe8 40006864: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 *the_event_set |= the_new_events; 40006868: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4000686c: 82 10 40 19 or %g1, %i1, %g1 40006870: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _ISR_Enable( level ); 40006874: 7f ff ed e1 call 40001ff8 40006878: 01 00 00 00 nop case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 4000687c: 40 00 00 2d call 40006930 <_Event_Surrender> 40006880: 90 10 00 18 mov %i0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006884: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40006888: b0 10 20 00 clr %i0 4000688c: 82 00 7f ff add %g1, -1, %g1 40006890: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 40006894: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 40006898: 80 a0 a0 00 cmp %g2, 0 4000689c: 02 80 00 0a be 400068c4 400068a0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400068a4: 81 c7 e0 08 ret 400068a8: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400068ac: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 400068b0: 80 a0 a0 04 cmp %g2, 4 400068b4: 08 80 00 08 bleu 400068d4 400068b8: 83 32 60 1b srl %o1, 0x1b, %g1 400068bc: 81 c7 e0 08 ret <== NOT EXECUTED 400068c0: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400068c4: 40 00 0e b5 call 4000a398 <_Thread_Dispatch> 400068c8: 01 00 00 00 nop 400068cc: 81 c7 e0 08 ret 400068d0: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400068d4: 80 a0 60 01 cmp %g1, 1 400068d8: 12 bf ff f3 bne 400068a4 400068dc: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400068e0: 83 28 a0 02 sll %g2, 2, %g1 400068e4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400068e8: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 400068ec: c6 00 80 01 ld [ %g2 + %g1 ], %g3 400068f0: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 400068f4: 80 a2 20 00 cmp %o0, 0 400068f8: 02 bf ff f5 be 400068cc 400068fc: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40006900: 40 00 09 7e call 40008ef8 <_Objects_Get> 40006904: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40006908: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000690c: b0 10 00 08 mov %o0, %i0 40006910: 80 a0 60 00 cmp %g1, 0 40006914: 02 bf ff d3 be 40006860 40006918: 23 10 00 6f sethi %hi(0x4001bc00), %l1 4000691c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006920: 18 bf ff e1 bgu 400068a4 <== NOT EXECUTED 40006924: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40006928: 81 c7 e0 08 ret <== NOT EXECUTED 4000692c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4000ec28 : rtems_status_code rtems_extension_create( rtems_name name, rtems_extensions_table *extension_table, Objects_Id *id ) { 4000ec28: 9d e3 bf 98 save %sp, -104, %sp Extension_Control *the_extension; if ( !rtems_is_name_valid( name ) ) 4000ec2c: a6 96 20 00 orcc %i0, 0, %l3 4000ec30: 02 80 00 16 be 4000ec88 4000ec34: b0 10 20 03 mov 3, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000ec38: 23 10 00 b6 sethi %hi(0x4002d800), %l1 4000ec3c: c2 04 63 30 ld [ %l1 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 4000ec40: 82 00 60 01 inc %g1 4000ec44: c2 24 63 30 st %g1, [ %l1 + 0x330 ] * the inactive chain of free extension control blocks. */ RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 4000ec48: 25 10 00 b7 sethi %hi(0x4002dc00), %l2 4000ec4c: 40 00 03 ef call 4000fc08 <_Objects_Allocate> 4000ec50: 90 14 a1 cc or %l2, 0x1cc, %o0 ! 4002ddcc <_Extension_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 4000ec54: a0 92 20 00 orcc %o0, 0, %l0 4000ec58: 12 80 00 0e bne 4000ec90 4000ec5c: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ec60: c2 04 63 30 ld [ %l1 + 0x330 ], %g1 <== NOT EXECUTED 4000ec64: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 4000ec68: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000ec6c: c2 24 63 30 st %g1, [ %l1 + 0x330 ] <== NOT EXECUTED 4000ec70: c4 04 63 30 ld [ %l1 + 0x330 ], %g2 <== NOT EXECUTED 4000ec74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000ec78: 12 80 00 20 bne 4000ecf8 <== NOT EXECUTED 4000ec7c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4000ec80: 40 00 0a 5b call 400115ec <_Thread_Dispatch> <== NOT EXECUTED 4000ec84: 01 00 00 00 nop <== NOT EXECUTED 4000ec88: 81 c7 e0 08 ret <== NOT EXECUTED 4000ec8c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set( &the_extension->Extension, extension_table ); 4000ec90: 40 00 0e df call 4001280c <_User_extensions_Add_set> 4000ec94: 92 10 00 19 mov %i1, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ec98: 90 14 a1 cc or %l2, 0x1cc, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000ec9c: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000eca0: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 4000eca4: 03 00 00 3f sethi %hi(0xfc00), %g1 4000eca8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000ecac: 82 08 c0 01 and %g3, %g1, %g1 4000ecb0: 80 a0 40 02 cmp %g1, %g2 4000ecb4: 38 80 00 06 bgu,a 4000eccc 4000ecb8: e6 24 20 0c st %l3, [ %l0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ecbc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000ecc0: 83 28 60 02 sll %g1, 2, %g1 4000ecc4: e0 20 80 01 st %l0, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000ecc8: e6 24 20 0c st %l3, [ %l0 + 0xc ] &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 4000eccc: c6 26 80 00 st %g3, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ecd0: c2 04 63 30 ld [ %l1 + 0x330 ], %g1 4000ecd4: b0 10 20 00 clr %i0 4000ecd8: 82 00 7f ff add %g1, -1, %g1 4000ecdc: c2 24 63 30 st %g1, [ %l1 + 0x330 ] 4000ece0: c4 04 63 30 ld [ %l1 + 0x330 ], %g2 4000ece4: 80 a0 a0 00 cmp %g2, 0 4000ece8: 12 80 00 04 bne 4000ecf8 4000ecec: 01 00 00 00 nop _Thread_Dispatch(); 4000ecf0: 40 00 0a 3f call 400115ec <_Thread_Dispatch> 4000ecf4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4000ecf8: 81 c7 e0 08 ret 4000ecfc: 81 e8 00 00 restore 4000ed00 : */ rtems_status_code rtems_extension_delete( Objects_Id id ) { 4000ed00: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 4000ed04: 21 10 00 b7 sethi %hi(0x4002dc00), %l0 <== NOT EXECUTED 4000ed08: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ed0c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000ed10: 40 00 05 0f call 4001014c <_Objects_Get> <== NOT EXECUTED 4000ed14: 90 14 21 cc or %l0, 0x1cc, %o0 <== NOT EXECUTED Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4000ed18: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000ed1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ed20: 12 80 00 1e bne 4000ed98 <== NOT EXECUTED 4000ed24: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never return this */ return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 4000ed28: 40 00 0e f3 call 400128f4 <_User_extensions_Remove_set> <== NOT EXECUTED 4000ed2c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ed30: 90 14 21 cc or %l0, 0x1cc, %o0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000ed34: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ed38: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 4000ed3c: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 4000ed40: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <== NOT EXECUTED 4000ed44: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4000ed48: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000ed4c: 38 80 00 06 bgu,a 4000ed64 <== NOT EXECUTED 4000ed50: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ed54: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 <== NOT EXECUTED 4000ed58: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000ed5c: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000ed60: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 4000ed64: 40 00 04 b7 call 40010040 <_Objects_Free> <== NOT EXECUTED 4000ed68: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ed6c: 03 10 00 b6 sethi %hi(0x4002d800), %g1 <== NOT EXECUTED 4000ed70: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 4002db30 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ed74: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ed78: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000ed7c: c4 20 63 30 st %g2, [ %g1 + 0x330 ] <== NOT EXECUTED 4000ed80: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 <== NOT EXECUTED 4000ed84: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000ed88: 02 80 00 09 be 4000edac <== NOT EXECUTED 4000ed8c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ed90: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed94: 81 e8 00 00 restore <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4000ed98: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ed9c: 08 bf ff fd bleu 4000ed90 <== NOT EXECUTED 4000eda0: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 4000eda4: 81 c7 e0 08 ret <== NOT EXECUTED 4000eda8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000edac: 40 00 0a 10 call 400115ec <_Thread_Dispatch> <== NOT EXECUTED 4000edb0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000edb4: 81 c7 e0 08 ret <== NOT EXECUTED 4000edb8: 81 e8 00 00 restore <== NOT EXECUTED 40007bb8 : #include const char *rtems_get_version_string(void) { return _RTEMS_version; } 40007bb8: 11 10 00 6a sethi %hi(0x4001a800), %o0 <== NOT EXECUTED 40007bbc: 81 c3 e0 08 retl <== NOT EXECUTED 40007bc0: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 4001a9c0 <_RTEMS_version> <== NOT EXECUTED 4000795c : rtems_interrupt_level rtems_initialize_executive_early( rtems_configuration_table *configuration_table, rtems_cpu_table *cpu_table ) { 4000795c: 9d e3 bf 80 save %sp, -128, %sp * Dispatching and interrupts are disabled until the end of the * initialization sequence. This prevents an inadvertent context * switch before the executive is initialized. */ _ISR_Disable( bsp_level ); 40007960: 7f ff e9 a2 call 40001fe8 40007964: 01 00 00 00 nop 40007968: a6 10 00 08 mov %o0, %l3 if ( configuration_table == NULL ) 4000796c: 80 a6 20 00 cmp %i0, 0 40007970: 22 80 00 79 be,a 40007b54 40007974: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Grab our own copy of the user's CPU table. */ _CPU_Table = *cpu_table; 40007978: 05 10 00 6f sethi %hi(0x4001bc00), %g2 RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( boolean is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; _System_state_Is_multiprocessing = is_multiprocessing; 4000797c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007980: a4 10 a1 f4 or %g2, 0x1f4, %l2 40007984: 94 10 20 28 mov 0x28, %o2 40007988: 92 10 00 19 mov %i1, %o1 4000798c: c0 20 62 e8 clr [ %g1 + 0x2e8 ] RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( boolean is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; 40007990: 29 10 00 6f sethi %hi(0x4001bc00), %l4 40007994: 90 10 00 12 mov %l2, %o0 40007998: 40 00 23 4b call 400106c4 4000799c: c0 25 23 c0 clr [ %l4 + 0x3c0 ] /* * Provided just for user convenience. */ _Configuration_Table = configuration_table; 400079a0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_NO_CPU_TABLE ); _CPU_Initialize( cpu_table, _Thread_Dispatch ); 400079a4: 90 10 00 19 mov %i1, %o0 400079a8: 13 10 00 28 sethi %hi(0x4000a000), %o1 400079ac: 92 12 63 98 or %o1, 0x398, %o1 ! 4000a398 <_Thread_Dispatch> 400079b0: 40 00 11 a6 call 4000c048 <_CPU_Initialize> 400079b4: f0 20 62 a0 st %i0, [ %g1 + 0x2a0 ] /* * Do this as early as possible to insure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 400079b8: 40 00 1a b8 call 4000e498 <_Debug_Manager_initialization> 400079bc: a2 10 20 01 mov 1, %l1 _API_extensions_Initialization(); 400079c0: 40 00 01 03 call 40007dcc <_API_extensions_Initialization> 400079c4: 01 00 00 00 nop _Thread_Dispatch_initialization(); _Workspace_Handler_initialization( 400079c8: d2 06 20 04 ld [ %i0 + 4 ], %o1 400079cc: d0 06 00 00 ld [ %i0 ], %o0 * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 400079d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400079d4: e2 20 61 e0 st %l1, [ %g1 + 0x1e0 ] ! 4001bde0 <_Thread_Dispatch_disable_level> 400079d8: 40 00 10 6e call 4000bb90 <_Workspace_Handler_initialization> 400079dc: 21 10 00 6f sethi %hi(0x4001bc00), %l0 (void *)configuration_table->work_space_start, configuration_table->work_space_size ); _User_extensions_Handler_initialization( 400079e0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 400079e4: 40 00 0e df call 4000b560 <_User_extensions_Handler_initialization> 400079e8: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 configuration_table->number_of_initial_extensions, configuration_table->User_extension_table ); _ISR_Handler_initialization(); 400079ec: 40 00 03 d5 call 40008940 <_ISR_Handler_initialization> 400079f0: 01 00 00 00 nop _Objects_Handler_initialization( 400079f4: 90 10 20 01 mov 1, %o0 ! 1 400079f8: 92 10 20 01 mov 1, %o1 400079fc: 40 00 05 d8 call 4000915c <_Objects_Handler_initialization> 40007a00: 94 10 20 00 clr %o2 multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40007a04: 05 10 00 6f sethi %hi(0x4001bc00), %g2 /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40007a08: c0 23 a0 5c clr [ %sp + 0x5c ] multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40007a0c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007a10: 82 10 62 20 or %g1, 0x220, %g1 ! 4001be20 <_Internal_Objects> /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40007a14: 92 10 20 01 mov 1, %o1 multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40007a18: c2 20 a1 44 st %g1, [ %g2 + 0x144 ] /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40007a1c: 94 10 20 02 mov 2, %o2 40007a20: 96 10 20 01 mov 1, %o3 40007a24: 98 10 20 74 mov 0x74, %o4 40007a28: 9a 10 20 00 clr %o5 40007a2c: 40 00 05 5a call 40008f94 <_Objects_Initialize_information> 40007a30: 90 14 22 ec or %l0, 0x2ec, %o0 _API_Mutex_Allocate( _RTEMS_Allocator_Mutex ); 40007a34: 82 10 20 02 mov 2, %g1 40007a38: e2 27 bf e8 st %l1, [ %fp + -24 ] 40007a3c: c2 27 bf f0 st %g1, [ %fp + -16 ] 40007a40: c0 27 bf ec clr [ %fp + -20 ] 40007a44: c0 27 bf f4 clr [ %fp + -12 ] 40007a48: 40 00 03 db call 400089b4 <_Objects_Allocate> 40007a4c: 90 14 22 ec or %l0, 0x2ec, %o0 40007a50: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007a54: 84 10 00 08 mov %o0, %g2 40007a58: 92 07 bf e8 add %fp, -24, %o1 40007a5c: c4 20 62 b4 st %g2, [ %g1 + 0x2b4 ] 40007a60: 90 02 20 10 add %o0, 0x10, %o0 40007a64: 40 00 01 47 call 40007f80 <_CORE_mutex_Initialize> 40007a68: 94 10 20 01 mov 1, %o2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 40007a6c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 40007a70: 05 10 00 6f sethi %hi(0x4001bc00), %g2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 40007a74: c0 30 62 b0 clrh [ %g1 + 0x2b0 ] for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 40007a78: c0 30 a3 40 clrh [ %g2 + 0x340 ] 40007a7c: 82 10 20 02 mov 2, %g1 40007a80: 84 10 a3 40 or %g2, 0x340, %g2 40007a84: c0 30 40 02 clrh [ %g1 + %g2 ] 40007a88: 82 00 60 02 add %g1, 2, %g1 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 40007a8c: 80 a0 60 20 cmp %g1, 0x20 40007a90: 32 bf ff fe bne,a 40007a88 40007a94: c0 30 40 02 clrh [ %g1 + %g2 ] _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 40007a98: 40 00 0f be call 4000b990 <_Watchdog_Handler_initialization> 40007a9c: 01 00 00 00 nop _TOD_Handler_initialization( configuration_table->microseconds_per_tick ); 40007aa0: 40 00 02 35 call 40008374 <_TOD_Handler_initialization> 40007aa4: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _Thread_Handler_initialization( 40007aa8: d2 06 20 08 ld [ %i0 + 8 ], %o1 40007aac: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 40007ab0: 40 00 0b 01 call 4000a6b4 <_Thread_Handler_initialization> 40007ab4: 94 10 20 00 clr %o2 ); #endif /* MANAGERS */ _RTEMS_API_Initialize( configuration_table ); 40007ab8: 40 00 00 a6 call 40007d50 <_RTEMS_API_Initialize> 40007abc: 90 10 00 18 mov %i0, %o0 _Extension_Manager_initialization( configuration_table->maximum_extensions ); 40007ac0: 40 00 00 2a call 40007b68 <_Extension_Manager_initialization> 40007ac4: d0 06 20 08 ld [ %i0 + 8 ], %o0 _IO_Manager_initialization( 40007ac8: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40007acc: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40007ad0: 40 00 00 4e call 40007c08 <_IO_Manager_initialization> 40007ad4: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 configuration_table->number_of_device_drivers, configuration_table->maximum_drivers ); #ifdef RTEMS_POSIX_API _POSIX_API_Initialize( configuration_table ); 40007ad8: 40 00 00 7a call 40007cc0 <_POSIX_API_Initialize> 40007adc: 90 10 00 18 mov %i0, %o0 RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 40007ae0: 82 10 20 01 mov 1, %g1 * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 40007ae4: 40 00 09 d9 call 4000a248 <_Thread_Create_idle> 40007ae8: c2 25 23 c0 st %g1, [ %l4 + 0x3c0 ] /* * Scheduling can properly occur now as long as we avoid dispatching. */ if ( cpu_table->pretasking_hook ) 40007aec: d0 06 40 00 ld [ %i1 ], %o0 40007af0: 80 a2 20 00 cmp %o0, 0 40007af4: 02 80 00 04 be 40007b04 40007af8: 01 00 00 00 nop (*cpu_table->pretasking_hook)(); 40007afc: 9f c2 00 00 call %o0 40007b00: 01 00 00 00 nop /* * Run the API and BSPs predriver hook. */ _API_extensions_Run_predriver(); 40007b04: 40 00 00 d4 call 40007e54 <_API_extensions_Run_predriver> 40007b08: 01 00 00 00 nop if ( _CPU_Table.predriver_hook ) 40007b0c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 40007b10: 80 a0 60 00 cmp %g1, 0 40007b14: 02 80 00 04 be 40007b24 40007b18: 01 00 00 00 nop (*_CPU_Table.predriver_hook)(); 40007b1c: 9f c0 40 00 call %g1 40007b20: 01 00 00 00 nop * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); 40007b24: 40 00 00 28 call 40007bc4 <_IO_Initialize_all_drivers> 40007b28: 01 00 00 00 nop * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 40007b2c: 40 00 00 af call 40007de8 <_API_extensions_Run_postdriver> 40007b30: 01 00 00 00 nop if ( _CPU_Table.postdriver_hook ) 40007b34: c4 04 a0 08 ld [ %l2 + 8 ], %g2 40007b38: 80 a0 a0 00 cmp %g2, 0 40007b3c: 02 80 00 04 be 40007b4c 40007b40: 01 00 00 00 nop (*_CPU_Table.postdriver_hook)(); 40007b44: 9f c0 80 00 call %g2 40007b48: 01 00 00 00 nop return bsp_level; } 40007b4c: 81 c7 e0 08 ret 40007b50: 91 e8 00 13 restore %g0, %l3, %o0 */ _ISR_Disable( bsp_level ); if ( configuration_table == NULL ) _Internal_error_Occurred( 40007b54: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40007b58: 40 00 03 6a call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007b5c: 94 10 20 00 clr %o2 <== NOT EXECUTED /* * Grab our own copy of the user's CPU table. */ _CPU_Table = *cpu_table; 40007b60: 10 bf ff 87 b 4000797c <== NOT EXECUTED 40007b64: 05 10 00 6f sethi %hi(0x4001bc00), %g2 <== NOT EXECUTED 40008ccc : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40008ccc: 9d e3 bf 98 save %sp, -104, %sp /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40008cd0: 80 a6 60 00 cmp %i1, 0 40008cd4: 02 80 00 3e be 40008dcc 40008cd8: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40008cdc: 80 a6 a0 00 cmp %i2, 0 40008ce0: 02 80 00 3b be 40008dcc 40008ce4: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40008ce8: c2 06 40 00 ld [ %i1 ], %g1 40008cec: 80 a0 60 00 cmp %g1, 0 40008cf0: 22 80 00 34 be,a 40008dc0 40008cf4: c2 06 60 04 ld [ %i1 + 4 ], %g1 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40008cf8: c0 26 80 00 clr [ %i2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40008cfc: 03 10 00 80 sethi %hi(0x40020000), %g1 40008d00: c6 00 63 fc ld [ %g1 + 0x3fc ], %g3 ! 400203fc <_IO_Number_of_drivers> 40008d04: 80 a0 c0 08 cmp %g3, %o0 40008d08: 08 80 00 43 bleu 40008e14 40008d0c: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40008d10: 80 a2 20 00 cmp %o0, 0 40008d14: 12 80 00 1f bne 40008d90 40008d18: 03 10 00 81 sethi %hi(0x40020400), %g1 boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40008d1c: 90 80 ff ff addcc %g3, -1, %o0 40008d20: 02 80 00 26 be 40008db8 40008d24: c8 00 60 00 ld [ %g1 ], %g4 if ( !_IO_Driver_address_table[major].initialization_entry && 40008d28: 85 28 e0 05 sll %g3, 5, %g2 40008d2c: 83 28 e0 03 sll %g3, 3, %g1 40008d30: 84 20 80 01 sub %g2, %g1, %g2 40008d34: 84 00 bf e8 add %g2, -24, %g2 40008d38: 10 80 00 04 b 40008d48 40008d3c: 84 00 80 04 add %g2, %g4, %g2 * in use. */ if ( major == 0 ) { boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40008d40: 02 80 00 1e be 40008db8 40008d44: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 40008d48: c2 00 80 00 ld [ %g2 ], %g1 40008d4c: 80 a0 60 00 cmp %g1, 0 40008d50: 32 bf ff fc bne,a 40008d40 40008d54: 90 82 3f ff addcc %o0, -1, %o0 40008d58: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40008d5c: 80 a0 60 00 cmp %g1, 0 40008d60: 32 bf ff f8 bne,a 40008d40 40008d64: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40008d68: 85 2a 20 03 sll %o0, 3, %g2 40008d6c: 83 2a 20 05 sll %o0, 5, %g1 40008d70: 82 20 40 02 sub %g1, %g2, %g1 40008d74: 88 01 00 01 add %g4, %g1, %g4 40008d78: c2 01 20 04 ld [ %g4 + 4 ], %g1 40008d7c: 80 a0 60 00 cmp %g1, 0 40008d80: 22 80 00 15 be,a 40008dd4 40008d84: c2 06 40 00 ld [ %i1 ], %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40008d88: 81 c7 e0 08 ret <== NOT EXECUTED 40008d8c: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40008d90: c8 00 60 00 ld [ %g1 ], %g4 40008d94: 85 2a 20 03 sll %o0, 3, %g2 40008d98: 83 2a 20 05 sll %o0, 5, %g1 40008d9c: 82 20 40 02 sub %g1, %g2, %g1 40008da0: c6 00 40 04 ld [ %g1 + %g4 ], %g3 40008da4: 80 a0 e0 00 cmp %g3, 0 40008da8: 02 bf ff f4 be 40008d78 40008dac: 88 00 40 04 add %g1, %g4, %g4 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40008db0: 81 c7 e0 08 ret 40008db4: 91 e8 20 0c restore %g0, 0xc, %o0 40008db8: 81 c7 e0 08 ret 40008dbc: 91 e8 20 05 restore %g0, 5, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40008dc0: 80 a0 60 00 cmp %g1, 0 40008dc4: 32 bf ff ce bne,a 40008cfc 40008dc8: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40008dcc: 81 c7 e0 08 ret 40008dd0: 91 e8 20 09 restore %g0, 9, %o0 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 40008dd4: d0 26 80 00 st %o0, [ %i2 ] if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008dd8: c2 21 00 00 st %g1, [ %g4 ] 40008ddc: c4 06 60 04 ld [ %i1 + 4 ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008de0: 92 10 20 00 clr %o1 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008de4: c4 21 20 04 st %g2, [ %g4 + 4 ] 40008de8: c2 06 60 08 ld [ %i1 + 8 ], %g1 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008dec: 94 10 20 00 clr %o2 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008df0: c2 21 20 08 st %g1, [ %g4 + 8 ] 40008df4: c4 06 60 0c ld [ %i1 + 0xc ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008df8: b0 10 20 00 clr %i0 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008dfc: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40008e00: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40008e04: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 40008e08: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008e0c: 7f ff ff 30 call 40008acc 40008e10: c4 21 20 14 st %g2, [ %g4 + 0x14 ] 40008e14: 81 c7 e0 08 ret 40008e18: 81 e8 00 00 restore 4000a3b4 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 4000a3b4: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 4000a3b8: 80 a6 20 00 cmp %i0, 0 4000a3bc: 02 80 00 23 be 4000a448 4000a3c0: 03 10 00 a2 sethi %hi(0x40028800), %g1 return; 4000a3c4: a4 10 62 64 or %g1, 0x264, %l2 ! 40028a64 <_Objects_Information_table+0x4> 4000a3c8: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 4000a3cc: c2 04 80 00 ld [ %l2 ], %g1 4000a3d0: 80 a0 60 00 cmp %g1, 0 4000a3d4: 22 80 00 1a be,a 4000a43c 4000a3d8: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 4000a3dc: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 4000a3e0: 80 a4 60 00 cmp %l1, 0 4000a3e4: 22 80 00 16 be,a 4000a43c 4000a3e8: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 4000a3ec: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000a3f0: 86 90 60 00 orcc %g1, 0, %g3 4000a3f4: 22 80 00 12 be,a 4000a43c 4000a3f8: a4 04 a0 04 add %l2, 4, %l2 4000a3fc: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 4000a400: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000a404: 83 2c 20 02 sll %l0, 2, %g1 4000a408: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 4000a40c: 80 a2 20 00 cmp %o0, 0 4000a410: 02 80 00 05 be 4000a424 4000a414: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 4000a418: 9f c6 00 00 call %i0 4000a41c: 01 00 00 00 nop 4000a420: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 4000a424: 83 28 e0 10 sll %g3, 0x10, %g1 4000a428: 83 30 60 10 srl %g1, 0x10, %g1 4000a42c: 80 a0 40 10 cmp %g1, %l0 4000a430: 3a bf ff f5 bcc,a 4000a404 4000a434: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000a438: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 4000a43c: 80 a4 80 13 cmp %l2, %l3 4000a440: 32 bf ff e4 bne,a 4000a3d0 4000a444: c2 04 80 00 ld [ %l2 ], %g1 4000a448: 81 c7 e0 08 ret 4000a44c: 81 e8 00 00 restore 40010110 : Objects_Id id, void *buffer, size_t size, uint32_t *count ) { 40010110: 9d e3 bf 90 save %sp, -112, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 40010114: 80 a6 60 00 cmp %i1, 0 40010118: 02 80 00 28 be 400101b8 4001011c: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( !count ) 40010120: 02 80 00 26 be 400101b8 40010124: 92 10 00 18 mov %i0, %o1 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40010128: 11 10 00 da sethi %hi(0x40036800), %o0 4001012c: 90 12 20 e0 or %o0, 0xe0, %o0 ! 400368e0 <_Message_queue_Information> 40010130: 40 00 19 84 call 40016740 <_Objects_Get> 40010134: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40010138: c2 07 bf f4 ld [ %fp + -12 ], %g1 4001013c: 80 a0 60 00 cmp %g1, 0 40010140: 02 80 00 08 be 40010160 40010144: 9a 10 00 1b mov %i3, %o5 40010148: 80 a0 60 02 cmp %g1, 2 4001014c: 08 80 00 03 bleu 40010158 40010150: 90 10 20 04 mov 4, %o0 40010154: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code( core_status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010158: 81 c7 e0 08 ret 4001015c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 40010160: 92 10 00 19 mov %i1, %o1 40010164: 94 10 00 1a mov %i2, %o2 40010168: 96 10 00 18 mov %i0, %o3 4001016c: 98 10 20 00 clr %o4 40010170: 40 00 13 f8 call 40015150 <_CORE_message_queue_Broadcast> 40010174: 90 02 20 14 add %o0, 0x14, %o0 40010178: b6 10 00 08 mov %o0, %i3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001017c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010180: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010184: 84 00 bf ff add %g2, -1, %g2 40010188: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 4001018c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010190: 80 a0 e0 00 cmp %g3, 0 40010194: 02 80 00 06 be 400101ac 40010198: 01 00 00 00 nop #endif count ); _Thread_Enable_dispatch(); return 4001019c: 40 00 01 35 call 40010670 <_Message_queue_Translate_core_message_queue_return_code> 400101a0: 90 10 00 1b mov %i3, %o0 _Message_queue_Translate_core_message_queue_return_code( core_status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400101a4: 81 c7 e0 08 ret 400101a8: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400101ac: 40 00 1e 8d call 40017be0 <_Thread_Dispatch> 400101b0: 01 00 00 00 nop 400101b4: 30 bf ff fa b,a 4001019c #endif count ); _Thread_Enable_dispatch(); return 400101b8: 10 bf ff e8 b 40010158 <== NOT EXECUTED 400101bc: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED 400101c0 : uint32_t count, uint32_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 400101c0: 9d e3 bf 90 save %sp, -112, %sp CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) boolean is_global; #endif if ( !rtems_is_name_valid( name ) ) 400101c4: a4 96 20 00 orcc %i0, 0, %l2 400101c8: 02 80 00 1f be 40010244 400101cc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400101d0: 80 a7 20 00 cmp %i4, 0 400101d4: 02 80 00 1c be 40010244 400101d8: b0 10 20 09 mov 9, %i0 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 400101dc: 80 a6 60 00 cmp %i1, 0 400101e0: 02 80 00 19 be 40010244 400101e4: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 400101e8: 80 a6 a0 00 cmp %i2, 0 400101ec: 02 80 00 16 be 40010244 400101f0: b0 10 20 08 mov 8, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400101f4: 23 10 00 d7 sethi %hi(0x40035c00), %l1 400101f8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400101fc: 82 00 60 01 inc %g1 40010200: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate( count, max_message_size ); 40010204: 90 10 00 19 mov %i1, %o0 40010208: 40 00 2f 2a call 4001beb0 <_Message_queue_Allocate> 4001020c: 92 10 00 1a mov %i2, %o1 if ( !the_message_queue ) { 40010210: a0 92 20 00 orcc %o0, 0, %l0 40010214: 12 80 00 0e bne 4001024c 40010218: 80 8e e0 04 btst 4, %i3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001021c: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40010220: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 40010224: 82 00 7f ff add %g1, -1, %g1 40010228: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 4001022c: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40010230: 80 a0 a0 00 cmp %g2, 0 40010234: 12 80 00 33 bne 40010300 40010238: 01 00 00 00 nop 4001023c: 40 00 1e 69 call 40017be0 <_Thread_Dispatch> 40010240: 01 00 00 00 nop 40010244: 81 c7 e0 08 ret 40010248: 81 e8 00 00 restore } #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) 4001024c: 12 80 00 11 bne 40010290 40010250: f6 24 20 10 st %i3, [ %l0 + 0x10 ] the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 40010254: c0 27 bf f4 clr [ %fp + -12 ] if ( ! _CORE_message_queue_Initialize( 40010258: 94 10 00 19 mov %i1, %o2 4001025c: 96 10 00 1a mov %i2, %o3 40010260: 90 04 20 14 add %l0, 0x14, %o0 40010264: 40 00 14 08 call 40015284 <_CORE_message_queue_Initialize> 40010268: 92 07 bf f4 add %fp, -12, %o1 4001026c: 80 a2 20 00 cmp %o0, 0 40010270: 12 80 00 0b bne 4001029c 40010274: 92 10 00 10 mov %l0, %o1 RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 40010278: 11 10 00 da sethi %hi(0x40036800), %o0 <== NOT EXECUTED 4001027c: 40 00 18 da call 400165e4 <_Objects_Free> <== NOT EXECUTED 40010280: 90 12 20 e0 or %o0, 0xe0, %o0 ! 400368e0 <_Message_queue_Information> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010284: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40010288: 10 bf ff e7 b 40010224 <== NOT EXECUTED 4001028c: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 40010290: 82 10 20 01 mov 1, %g1 40010294: 10 bf ff f1 b 40010258 40010298: c2 27 bf f4 st %g1, [ %fp + -12 ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4001029c: 03 10 00 da sethi %hi(0x40036800), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400102a0: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400102a4: 88 10 60 e0 or %g1, 0xe0, %g4 400102a8: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 400102ac: 03 00 00 3f sethi %hi(0xfc00), %g1 400102b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400102b4: 82 08 c0 01 and %g3, %g1, %g1 400102b8: 80 a0 40 02 cmp %g1, %g2 400102bc: 38 80 00 06 bgu,a 400102d4 400102c0: e4 24 20 0c st %l2, [ %l0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400102c4: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 400102c8: 83 28 60 02 sll %g1, 2, %g1 400102cc: e0 20 80 01 st %l0, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400102d0: e4 24 20 0c st %l2, [ %l0 + 0xc ] &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 400102d4: c6 27 00 00 st %g3, [ %i4 ] 400102d8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400102dc: b0 10 20 00 clr %i0 400102e0: 82 00 7f ff add %g1, -1, %g1 400102e4: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 400102e8: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 400102ec: 80 a0 a0 00 cmp %g2, 0 400102f0: 12 80 00 04 bne 40010300 400102f4: 01 00 00 00 nop _Thread_Dispatch(); 400102f8: 40 00 1e 3a call 40017be0 <_Thread_Dispatch> 400102fc: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40010300: 81 c7 e0 08 ret 40010304: 81 e8 00 00 restore 4001743c : */ rtems_status_code rtems_message_queue_delete( Objects_Id id ) { 4001743c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40017440: 21 10 00 b9 sethi %hi(0x4002e400), %l0 40017444: 92 10 00 18 mov %i0, %o1 40017448: 94 07 bf f4 add %fp, -12, %o2 4001744c: 7f ff e3 40 call 4001014c <_Objects_Get> 40017450: 90 14 21 9c or %l0, 0x19c, %o0 register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40017454: c2 07 bf f4 ld [ %fp + -12 ], %g1 40017458: 80 a0 60 00 cmp %g1, 0 4001745c: 12 80 00 20 bne 400174dc 40017460: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40017464: a0 14 21 9c or %l0, 0x19c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40017468: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4001746c: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40017470: 05 00 00 3f sethi %hi(0xfc00), %g2 40017474: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40017478: 82 08 40 02 and %g1, %g2, %g1 4001747c: 80 a0 40 03 cmp %g1, %g3 40017480: 18 80 00 05 bgu 40017494 40017484: 94 10 20 05 mov 5, %o2 information->local_table[ index ] = the_object; 40017488: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 4001748c: 83 28 60 02 sll %g1, 2, %g1 40017490: c0 20 80 01 clr [ %g2 + %g1 ] case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, &the_message_queue->Object ); _CORE_message_queue_Close( 40017494: 90 06 20 14 add %i0, 0x14, %o0 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40017498: c0 26 20 0c clr [ %i0 + 0xc ] 4001749c: 40 00 01 c0 call 40017b9c <_CORE_message_queue_Close> 400174a0: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 400174a4: 90 10 00 10 mov %l0, %o0 400174a8: 7f ff e2 e6 call 40010040 <_Objects_Free> 400174ac: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400174b0: 03 10 00 b6 sethi %hi(0x4002d800), %g1 400174b4: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 4002db30 <_Thread_Dispatch_disable_level> 400174b8: b0 10 20 00 clr %i0 400174bc: 84 00 bf ff add %g2, -1, %g2 400174c0: c4 20 63 30 st %g2, [ %g1 + 0x330 ] 400174c4: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 400174c8: 80 a0 e0 00 cmp %g3, 0 400174cc: 02 80 00 09 be 400174f0 400174d0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400174d4: 81 c7 e0 08 ret 400174d8: 81 e8 00 00 restore { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 400174dc: 80 a0 60 02 cmp %g1, 2 400174e0: 08 bf ff fd bleu 400174d4 400174e4: b0 10 20 04 mov 4, %i0 400174e8: 81 c7 e0 08 ret <== NOT EXECUTED 400174ec: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400174f0: 7f ff e8 3f call 400115ec <_Thread_Dispatch> 400174f4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400174f8: 81 c7 e0 08 ret 400174fc: 81 e8 00 00 restore 400103cc : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 400103cc: 9d e3 bf 90 save %sp, -112, %sp 400103d0: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 400103d4: 80 a6 60 00 cmp %i1, 0 400103d8: 02 80 00 1c be 40010448 400103dc: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 400103e0: 11 10 00 da sethi %hi(0x40036800), %o0 400103e4: 94 07 bf f4 add %fp, -12, %o2 400103e8: 40 00 18 d6 call 40016740 <_Objects_Get> 400103ec: 90 12 20 e0 or %o0, 0xe0, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 400103f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400103f4: 80 a0 60 00 cmp %g1, 0 400103f8: 02 80 00 06 be 40010410 400103fc: 80 a0 60 02 cmp %g1, 2 40010400: 08 80 00 12 bleu 40010448 40010404: b0 10 20 04 mov 4, %i0 40010408: 81 c7 e0 08 ret <== NOT EXECUTED 4001040c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 40010410: 40 00 13 7d call 40015204 <_CORE_message_queue_Flush> 40010414: 90 02 20 14 add %o0, 0x14, %o0 40010418: d0 26 40 00 st %o0, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001041c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010420: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010424: b0 10 20 00 clr %i0 40010428: 84 00 bf ff add %g2, -1, %g2 4001042c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010430: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010434: 80 a0 e0 00 cmp %g3, 0 40010438: 12 80 00 04 bne 40010448 4001043c: 01 00 00 00 nop _Thread_Dispatch(); 40010440: 40 00 1d e8 call 40017be0 <_Thread_Dispatch> 40010444: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010448: 81 c7 e0 08 ret 4001044c: 81 e8 00 00 restore 40010450 : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 40010450: 9d e3 bf 90 save %sp, -112, %sp 40010454: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 40010458: 80 a6 60 00 cmp %i1, 0 4001045c: 02 80 00 1b be 400104c8 40010460: b0 10 20 09 mov 9, %i0 40010464: 11 10 00 da sethi %hi(0x40036800), %o0 40010468: 94 07 bf f4 add %fp, -12, %o2 4001046c: 40 00 18 b5 call 40016740 <_Objects_Get> 40010470: 90 12 20 e0 or %o0, 0xe0, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40010474: c2 07 bf f4 ld [ %fp + -12 ], %g1 40010478: 80 a0 60 00 cmp %g1, 0 4001047c: 22 80 00 07 be,a 40010498 40010480: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 40010484: 80 a0 60 02 cmp %g1, 2 40010488: 08 80 00 10 bleu 400104c8 4001048c: b0 10 20 04 mov 4, %i0 40010490: 81 c7 e0 08 ret <== NOT EXECUTED 40010494: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 40010498: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001049c: 07 10 00 d7 sethi %hi(0x40035c00), %g3 400104a0: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400104a4: b0 10 20 00 clr %i0 400104a8: 82 00 7f ff add %g1, -1, %g1 400104ac: c2 20 e2 f0 st %g1, [ %g3 + 0x2f0 ] 400104b0: c4 00 e2 f0 ld [ %g3 + 0x2f0 ], %g2 400104b4: 80 a0 a0 00 cmp %g2, 0 400104b8: 12 80 00 04 bne 400104c8 400104bc: 01 00 00 00 nop _Thread_Dispatch(); 400104c0: 40 00 1d c8 call 40017be0 <_Thread_Dispatch> 400104c4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400104c8: 81 c7 e0 08 ret 400104cc: 81 e8 00 00 restore 40017534 : void *buffer, size_t *size, uint32_t option_set, rtems_interval timeout ) { 40017534: 9d e3 bf 90 save %sp, -112, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; boolean wait; if ( !buffer ) 40017538: 80 a6 60 00 cmp %i1, 0 4001753c: 02 80 00 2b be 400175e8 40017540: 92 10 00 18 mov %i0, %o1 return RTEMS_INVALID_ADDRESS; if ( !size ) 40017544: 80 a6 a0 00 cmp %i2, 0 40017548: 02 80 00 28 be 400175e8 4001754c: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40017550: 11 10 00 b9 sethi %hi(0x4002e400), %o0 40017554: 7f ff e2 fe call 4001014c <_Objects_Get> 40017558: 90 12 21 9c or %o0, 0x19c, %o0 ! 4002e59c <_Message_queue_Information> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4001755c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40017560: 80 a0 60 00 cmp %g1, 0 40017564: 22 80 00 08 be,a 40017584 40017568: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001756c: 80 a0 60 02 cmp %g1, 2 40017570: 08 80 00 03 bleu 4001757c 40017574: 90 10 20 04 mov 4, %o0 40017578: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001757c: 81 c7 e0 08 ret 40017580: 91 e8 00 08 restore %g0, %o0, %o0 40017584: 98 0e e0 01 and %i3, 1, %o4 if ( _Options_Is_no_wait( option_set ) ) wait = FALSE; else wait = TRUE; _CORE_message_queue_Seize( 40017588: 94 10 00 19 mov %i1, %o2 4001758c: 96 10 00 1a mov %i2, %o3 40017590: 98 1b 20 01 xor %o4, 1, %o4 40017594: 9a 10 00 1c mov %i4, %o5 40017598: 40 00 01 a7 call 40017c34 <_CORE_message_queue_Seize> 4001759c: 90 02 20 14 add %o0, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400175a0: 05 10 00 b6 sethi %hi(0x4002d800), %g2 400175a4: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 400175a8: 82 00 7f ff add %g1, -1, %g1 400175ac: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] 400175b0: c6 00 a3 30 ld [ %g2 + 0x330 ], %g3 400175b4: 80 a0 e0 00 cmp %g3, 0 400175b8: 02 80 00 08 be 400175d8 400175bc: 01 00 00 00 nop size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 400175c0: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 <== NOT EXECUTED 400175c4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 4002dc0c <_Thread_Executing> 400175c8: 40 00 00 36 call 400176a0 <_Message_queue_Translate_core_message_queue_return_code> 400175cc: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400175d0: 81 c7 e0 08 ret 400175d4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400175d8: 7f ff e8 05 call 400115ec <_Thread_Dispatch> 400175dc: 01 00 00 00 nop size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 400175e0: 10 bf ff f9 b 400175c4 400175e4: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 400175e8: 10 bf ff e5 b 4001757c <== NOT EXECUTED 400175ec: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED 400175f0 : rtems_status_code rtems_message_queue_send( Objects_Id id, void *buffer, size_t size ) { 400175f0: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 400175f4: 80 a6 60 00 cmp %i1, 0 400175f8: 02 80 00 20 be 40017678 400175fc: 90 10 20 09 mov 9, %o0 40017600: 11 10 00 b9 sethi %hi(0x4002e400), %o0 40017604: 92 10 00 18 mov %i0, %o1 40017608: 90 12 21 9c or %o0, 0x19c, %o0 4001760c: 7f ff e2 d0 call 4001014c <_Objects_Get> 40017610: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40017614: c2 07 bf f4 ld [ %fp + -12 ], %g1 40017618: 80 a0 60 00 cmp %g1, 0 4001761c: 12 80 00 19 bne 40017680 40017620: 80 a0 60 02 cmp %g1, 2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 40017624: 94 10 00 1a mov %i2, %o2 40017628: c0 23 a0 5c clr [ %sp + 0x5c ] 4001762c: c0 23 a0 60 clr [ %sp + 0x60 ] 40017630: 92 10 00 19 mov %i1, %o1 40017634: 96 10 00 18 mov %i0, %o3 40017638: 98 10 20 00 clr %o4 4001763c: 90 02 20 14 add %o0, 0x14, %o0 40017640: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5 40017644: 40 00 01 c3 call 40017d50 <_CORE_message_queue_Submit> 40017648: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff 4001764c: b4 10 00 08 mov %o0, %i2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40017650: 05 10 00 b6 sethi %hi(0x4002d800), %g2 40017654: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 40017658: 82 00 7f ff add %g1, -1, %g1 4001765c: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] 40017660: c6 00 a3 30 ld [ %g2 + 0x330 ], %g3 40017664: 80 a0 e0 00 cmp %g3, 0 40017668: 02 80 00 0b be 40017694 4001766c: 01 00 00 00 nop /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 40017670: 40 00 00 0c call 400176a0 <_Message_queue_Translate_core_message_queue_return_code> 40017674: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40017678: 81 c7 e0 08 ret 4001767c: 91 e8 00 08 restore %g0, %o0, %o0 if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40017680: 08 bf ff fe bleu 40017678 40017684: 90 10 20 04 mov 4, %o0 40017688: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code(status); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001768c: 81 c7 e0 08 ret <== NOT EXECUTED 40017690: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40017694: 7f ff e7 d6 call 400115ec <_Thread_Dispatch> 40017698: 01 00 00 00 nop 4001769c: 30 bf ff f5 b,a 40017670 40009a10 : rtems_status_code rtems_message_queue_urgent( Objects_Id id, void *buffer, size_t size ) { 40009a10: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 40009a14: 80 a6 60 00 cmp %i1, 0 40009a18: 02 80 00 1f be 40009a94 40009a1c: 90 10 20 09 mov 9, %o0 40009a20: 11 10 00 92 sethi %hi(0x40024800), %o0 40009a24: 92 10 00 18 mov %i0, %o1 40009a28: 90 12 20 18 or %o0, 0x18, %o0 40009a2c: 40 00 0a 47 call 4000c348 <_Objects_Get> 40009a30: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40009a34: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009a38: 80 a0 60 00 cmp %g1, 0 40009a3c: 12 80 00 18 bne 40009a9c 40009a40: 80 a0 60 02 cmp %g1, 2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 40009a44: 94 10 00 1a mov %i2, %o2 40009a48: c0 23 a0 5c clr [ %sp + 0x5c ] 40009a4c: c0 23 a0 60 clr [ %sp + 0x60 ] 40009a50: 92 10 00 19 mov %i1, %o1 40009a54: 96 10 00 18 mov %i0, %o3 40009a58: 98 10 20 00 clr %o4 40009a5c: 1b 20 00 00 sethi %hi(0x80000000), %o5 40009a60: 40 00 06 0e call 4000b298 <_CORE_message_queue_Submit> 40009a64: 90 02 20 14 add %o0, 0x14, %o0 40009a68: b4 10 00 08 mov %o0, %i2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009a6c: 03 10 00 8f sethi %hi(0x40023c00), %g1 40009a70: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40023e30 <_Thread_Dispatch_disable_level> 40009a74: 84 00 bf ff add %g2, -1, %g2 40009a78: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 40009a7c: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 40009a80: 80 a0 e0 00 cmp %g3, 0 40009a84: 02 80 00 0b be 40009ab0 40009a88: 01 00 00 00 nop /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 40009a8c: 7f ff ff d7 call 400099e8 <_Message_queue_Translate_core_message_queue_return_code> 40009a90: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009a94: 81 c7 e0 08 ret 40009a98: 91 e8 00 08 restore %g0, %o0, %o0 if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40009a9c: 08 bf ff fe bleu 40009a94 <== NOT EXECUTED 40009aa0: 90 10 20 04 mov 4, %o0 <== NOT EXECUTED 40009aa4: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code(status); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009aa8: 81 c7 e0 08 ret <== NOT EXECUTED 40009aac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009ab0: 40 00 0f 4e call 4000d7e8 <_Thread_Dispatch> 40009ab4: 01 00 00 00 nop 40009ab8: 30 bf ff f5 b,a 40009a8c 40010698 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 40010698: 9d e3 bf 98 save %sp, -104, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 4001069c: a8 96 20 00 orcc %i0, 0, %l4 400106a0: 02 80 00 29 be 40010744 400106a4: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 400106a8: 80 a6 60 00 cmp %i1, 0 400106ac: 02 80 00 11 be 400106f0 400106b0: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 400106b4: 02 80 00 0f be 400106f0 400106b8: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 400106bc: 12 80 00 04 bne 400106cc 400106c0: 80 a6 e0 00 cmp %i3, 0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400106c4: 81 c7 e0 08 ret 400106c8: 91 e8 20 08 restore %g0, 8, %o0 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 400106cc: 02 80 00 1e be 40010744 400106d0: b0 10 20 08 mov 8, %i0 400106d4: 80 a6 80 1b cmp %i2, %i3 400106d8: 0a 80 00 1b bcs 40010744 400106dc: 80 8e e0 07 btst 7, %i3 400106e0: 12 80 00 19 bne 40010744 400106e4: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 400106e8: 02 80 00 04 be 400106f8 400106ec: 25 10 00 d7 sethi %hi(0x40035c00), %l2 400106f0: 81 c7 e0 08 ret 400106f4: 91 e8 20 09 restore %g0, 9, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400106f8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400106fc: 82 00 60 01 inc %g1 40010700: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 40010704: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40010708: 40 00 16 a9 call 400161ac <_Objects_Allocate> 4001070c: 90 14 e0 70 or %l3, 0x70, %o0 ! 40035c70 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 40010710: a2 92 20 00 orcc %o0, 0, %l1 40010714: 12 80 00 0e bne 4001074c 40010718: 92 10 00 1b mov %i3, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001071c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40010720: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 40010724: 82 00 7f ff add %g1, -1, %g1 40010728: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 4001072c: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 40010730: 80 a0 a0 00 cmp %g2, 0 40010734: 12 80 00 04 bne 40010744 40010738: 01 00 00 00 nop 4001073c: 40 00 1d 29 call 40017be0 <_Thread_Dispatch> 40010740: 01 00 00 00 nop 40010744: 81 c7 e0 08 ret 40010748: 81 e8 00 00 restore #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 4001074c: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 40010750: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 40010754: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 40010758: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 4001075c: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 40010760: 40 00 58 44 call 40026870 <.udiv> 40010764: 90 10 00 1a mov %i2, %o0 40010768: a0 04 60 24 add %l1, 0x24, %l0 4001076c: 94 10 00 08 mov %o0, %o2 40010770: 92 10 00 19 mov %i1, %o1 40010774: 90 10 00 10 mov %l0, %o0 40010778: 40 00 12 5e call 400150f0 <_Chain_Initialize> 4001077c: 96 10 00 1b mov %i3, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010780: 90 14 e0 70 or %l3, 0x70, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40010784: c6 04 60 08 ld [ %l1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010788: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 4001078c: 03 00 00 3f sethi %hi(0xfc00), %g1 40010790: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40010794: 82 08 c0 01 and %g3, %g1, %g1 40010798: 80 a0 40 02 cmp %g1, %g2 4001079c: 38 80 00 06 bgu,a 400107b4 400107a0: e8 24 60 0c st %l4, [ %l1 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400107a4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400107a8: 83 28 60 02 sll %g1, 2, %g1 400107ac: e2 20 80 01 st %l1, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400107b0: e8 24 60 0c st %l4, [ %l1 + 0xc ] &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 400107b4: c6 27 40 00 st %g3, [ %i5 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400107b8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400107bc: 10 bf ff da b 40010724 400107c0: b0 10 20 00 clr %i0 400107c4 : */ rtems_status_code rtems_partition_delete( Objects_Id id ) { 400107c4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 400107c8: 92 10 00 18 mov %i0, %o1 400107cc: 94 07 bf f4 add %fp, -12, %o2 400107d0: 31 10 00 d7 sethi %hi(0x40035c00), %i0 400107d4: 40 00 17 db call 40016740 <_Objects_Get> 400107d8: 90 16 20 70 or %i0, 0x70, %o0 ! 40035c70 <_Partition_Information> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 400107dc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400107e0: 80 a0 60 00 cmp %g1, 0 400107e4: 12 80 00 13 bne 40010830 400107e8: 92 10 00 08 mov %o0, %o1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 400107ec: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 400107f0: 80 a0 60 00 cmp %g1, 0 400107f4: 02 80 00 14 be 40010844 400107f8: 90 16 20 70 or %i0, 0x70, %o0 400107fc: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010800: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010804: b0 10 20 0c mov 0xc, %i0 40010808: 84 00 bf ff add %g2, -1, %g2 4001080c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010810: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010814: 80 a0 e0 00 cmp %g3, 0 40010818: 12 80 00 22 bne 400108a0 4001081c: 01 00 00 00 nop _Thread_Dispatch(); 40010820: 40 00 1c f0 call 40017be0 <_Thread_Dispatch> 40010824: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010828: 81 c7 e0 08 ret 4001082c: 81 e8 00 00 restore { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 40010830: 80 a0 60 02 cmp %g1, 2 40010834: 08 bf ff fd bleu 40010828 40010838: b0 10 20 04 mov 4, %i0 4001083c: 81 c7 e0 08 ret <== NOT EXECUTED 40010840: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40010844: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010848: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4001084c: 05 00 00 3f sethi %hi(0xfc00), %g2 40010850: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40010854: 82 08 40 02 and %g1, %g2, %g1 40010858: 80 a0 40 03 cmp %g1, %g3 4001085c: 18 80 00 04 bgu 4001086c 40010860: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 40010864: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40010868: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4001086c: 40 00 17 5e call 400165e4 <_Objects_Free> 40010870: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010874: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010878: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 4001087c: b0 10 20 00 clr %i0 40010880: 84 00 bf ff add %g2, -1, %g2 40010884: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010888: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 4001088c: 80 a0 e0 00 cmp %g3, 0 40010890: 12 80 00 04 bne 400108a0 40010894: 01 00 00 00 nop _Thread_Dispatch(); 40010898: 40 00 1c d2 call 40017be0 <_Thread_Dispatch> 4001089c: 01 00 00 00 nop 400108a0: 81 c7 e0 08 ret 400108a4: 81 e8 00 00 restore 400108a8 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 400108a8: 9d e3 bf 90 save %sp, -112, %sp 400108ac: 92 10 00 18 mov %i0, %o1 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 400108b0: 80 a6 60 00 cmp %i1, 0 400108b4: 02 80 00 1a be 4001091c 400108b8: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 400108bc: 11 10 00 d7 sethi %hi(0x40035c00), %o0 400108c0: 94 07 bf f4 add %fp, -12, %o2 400108c4: 40 00 17 9f call 40016740 <_Objects_Get> 400108c8: 90 12 20 70 or %o0, 0x70, %o0 return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 400108cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400108d0: 80 a0 60 00 cmp %g1, 0 400108d4: 12 80 00 14 bne 40010924 400108d8: b0 10 00 08 mov %o0, %i0 RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 400108dc: 40 00 11 f2 call 400150a4 <_Chain_Get> 400108e0: 90 02 20 24 add %o0, 0x24, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 400108e4: a0 92 20 00 orcc %o0, 0, %l0 400108e8: 32 80 00 14 bne,a 40010938 400108ec: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400108f0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400108f4: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 400108f8: b0 10 20 0d mov 0xd, %i0 400108fc: 84 00 bf ff add %g2, -1, %g2 40010900: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010904: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010908: 80 a0 e0 00 cmp %g3, 0 4001090c: 12 80 00 04 bne 4001091c 40010910: 01 00 00 00 nop _Thread_Dispatch(); 40010914: 40 00 1c b3 call 40017be0 <_Thread_Dispatch> 40010918: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_UNSATISFIED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001091c: 81 c7 e0 08 ret 40010920: 81 e8 00 00 restore if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 40010924: 80 a0 60 02 cmp %g1, 2 40010928: 08 bf ff fd bleu 4001091c 4001092c: b0 10 20 04 mov 4, %i0 40010930: 81 c7 e0 08 ret <== NOT EXECUTED 40010934: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { the_partition->number_of_used_blocks += 1; 40010938: 82 00 60 01 inc %g1 4001093c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010940: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40010944: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010948: 82 00 7f ff add %g1, -1, %g1 4001094c: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 40010950: c6 00 a2 f0 ld [ %g2 + 0x2f0 ], %g3 40010954: 80 a0 e0 00 cmp %g3, 0 40010958: 02 80 00 05 be 4001096c 4001095c: 01 00 00 00 nop _Thread_Enable_dispatch(); *buffer = the_buffer; 40010960: e0 26 40 00 st %l0, [ %i1 ] <== NOT EXECUTED 40010964: 81 c7 e0 08 ret 40010968: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Dispatch(); 4001096c: 40 00 1c 9d call 40017be0 <_Thread_Dispatch> 40010970: 01 00 00 00 nop 40010974: 10 bf ff fc b 40010964 40010978: e0 26 40 00 st %l0, [ %i1 ] 400109b0 : rtems_status_code rtems_partition_return_buffer( Objects_Id id, void *buffer ) { 400109b0: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 400109b4: 11 10 00 d7 sethi %hi(0x40035c00), %o0 400109b8: 92 10 00 18 mov %i0, %o1 400109bc: 90 12 20 70 or %o0, 0x70, %o0 400109c0: 40 00 17 60 call 40016740 <_Objects_Get> 400109c4: 94 07 bf f4 add %fp, -12, %o2 register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 400109c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400109cc: 80 a0 60 00 cmp %g1, 0 400109d0: 12 80 00 12 bne 40010a18 400109d4: b0 10 00 08 mov %o0, %i0 ) { void *starting; void *ending; starting = the_partition->starting_address; 400109d8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 ending = _Addresses_Add_offset( starting, the_partition->length ); return ( 400109dc: 80 a0 80 19 cmp %g2, %i1 400109e0: 28 80 00 13 bleu,a 40010a2c 400109e4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400109e8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400109ec: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 400109f0: 84 00 bf ff add %g2, -1, %g2 400109f4: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 400109f8: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 400109fc: 80 a0 e0 00 cmp %g3, 0 40010a00: 12 80 00 27 bne 40010a9c 40010a04: 01 00 00 00 nop _Thread_Dispatch(); 40010a08: 40 00 1c 76 call 40017be0 <_Thread_Dispatch> 40010a0c: b0 10 20 09 mov 9, %i0 ! 9 40010a10: 81 c7 e0 08 ret 40010a14: 81 e8 00 00 restore 40010a18: 80 a0 60 02 cmp %g1, 2 40010a1c: 08 bf ff fd bleu 40010a10 40010a20: b0 10 20 04 mov 4, %i0 40010a24: 81 c7 e0 08 ret <== NOT EXECUTED 40010a28: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED 40010a2c: 82 00 80 01 add %g2, %g1, %g1 40010a30: 80 a0 40 19 cmp %g1, %i1 40010a34: 0a bf ff ed bcs 400109e8 40010a38: 01 00 00 00 nop 40010a3c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40010a40: 40 00 58 38 call 40026b20 <.urem> 40010a44: 90 26 40 02 sub %i1, %g2, %o0 40010a48: 80 a2 20 00 cmp %o0, 0 40010a4c: 12 bf ff e7 bne 400109e8 40010a50: 92 10 00 19 mov %i1, %o1 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 40010a54: 40 00 11 88 call 40015074 <_Chain_Append> 40010a58: 90 06 20 24 add %i0, 0x24, %o0 return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 40010a5c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40010a60: 82 00 7f ff add %g1, -1, %g1 40010a64: c2 26 20 20 st %g1, [ %i0 + 0x20 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010a68: 07 10 00 d7 sethi %hi(0x40035c00), %g3 40010a6c: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010a70: b0 10 20 00 clr %i0 40010a74: 82 00 7f ff add %g1, -1, %g1 40010a78: c2 20 e2 f0 st %g1, [ %g3 + 0x2f0 ] 40010a7c: c4 00 e2 f0 ld [ %g3 + 0x2f0 ], %g2 40010a80: 80 a0 a0 00 cmp %g2, 0 40010a84: 12 80 00 04 bne 40010a94 40010a88: 01 00 00 00 nop _Thread_Dispatch(); 40010a8c: 40 00 1c 55 call 40017be0 <_Thread_Dispatch> 40010a90: 01 00 00 00 nop 40010a94: 81 c7 e0 08 ret 40010a98: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010a9c: 81 c7 e0 08 ret <== NOT EXECUTED 40010aa0: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED 4000f91c : */ rtems_status_code rtems_port_delete( Objects_Id id ) { 4000f91c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4000f920: 92 10 00 18 mov %i0, %o1 4000f924: 94 07 bf f4 add %fp, -12, %o2 4000f928: 31 10 00 d7 sethi %hi(0x40035c00), %i0 4000f92c: 40 00 1b 85 call 40016740 <_Objects_Get> 4000f930: 90 16 20 24 or %i0, 0x24, %o0 ! 40035c24 <_Dual_ported_memory_Information> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4000f934: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f938: 80 a0 60 00 cmp %g1, 0 4000f93c: 12 80 00 1a bne 4000f9a4 4000f940: 92 10 00 08 mov %o0, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f944: 90 16 20 24 or %i0, 0x24, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000f948: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f94c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000f950: 05 00 00 3f sethi %hi(0xfc00), %g2 4000f954: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000f958: 82 08 40 02 and %g1, %g2, %g1 4000f95c: 80 a0 40 03 cmp %g1, %g3 4000f960: 18 80 00 04 bgu 4000f970 4000f964: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 4000f968: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000f96c: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 4000f970: 40 00 1b 1d call 400165e4 <_Objects_Free> 4000f974: c0 22 60 0c clr [ %o1 + 0xc ] 4000f978: 03 10 00 d7 sethi %hi(0x40035c00), %g1 4000f97c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 4000f980: b0 10 20 00 clr %i0 4000f984: 84 00 bf ff add %g2, -1, %g2 4000f988: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 4000f98c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 4000f990: 80 a0 e0 00 cmp %g3, 0 4000f994: 02 80 00 0a be 4000f9bc 4000f998: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f99c: 81 c7 e0 08 ret <== NOT EXECUTED 4000f9a0: 81 e8 00 00 restore <== NOT EXECUTED { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4000f9a4: 82 18 60 02 xor %g1, 2, %g1 4000f9a8: 80 a0 00 01 cmp %g0, %g1 4000f9ac: 84 60 20 00 subx %g0, 0, %g2 4000f9b0: b0 08 a0 15 and %g2, 0x15, %i0 4000f9b4: 81 c7 e0 08 ret 4000f9b8: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 4000f9bc: 40 00 20 89 call 40017be0 <_Thread_Dispatch> 4000f9c0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f9c4: 81 c7 e0 08 ret 4000f9c8: 81 e8 00 00 restore 40010cb8 : */ rtems_status_code rtems_rate_monotonic_delete( Objects_Id id ) { 40010cb8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 40010cbc: 21 10 00 d7 sethi %hi(0x40035c00), %l0 40010cc0: 92 10 00 18 mov %i0, %o1 40010cc4: 94 07 bf f4 add %fp, -12, %o2 40010cc8: 40 00 16 9e call 40016740 <_Objects_Get> 40010ccc: 90 14 20 bc or %l0, 0xbc, %o0 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40010cd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40010cd4: 80 a0 60 00 cmp %g1, 0 40010cd8: 12 80 00 20 bne 40010d58 40010cdc: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010ce0: a0 14 20 bc or %l0, 0xbc, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40010ce4: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010ce8: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40010cec: 05 00 00 3f sethi %hi(0xfc00), %g2 40010cf0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40010cf4: 82 08 40 02 and %g1, %g2, %g1 40010cf8: 80 a0 40 03 cmp %g1, %g3 40010cfc: 38 80 00 06 bgu,a 40010d14 40010d00: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40010d04: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40010d08: 83 28 60 02 sll %g1, 2, %g1 40010d0c: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40010d10: c0 26 20 0c clr [ %i0 + 0xc ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); 40010d14: 40 00 22 7b call 40019700 <_Watchdog_Remove> 40010d18: 90 06 20 10 add %i0, 0x10, %o0 RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); 40010d1c: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_INACTIVE; 40010d20: c0 26 20 38 clr [ %i0 + 0x38 ] 40010d24: 40 00 16 30 call 400165e4 <_Objects_Free> 40010d28: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010d2c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010d30: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010d34: b0 10 20 00 clr %i0 40010d38: 84 00 bf ff add %g2, -1, %g2 40010d3c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010d40: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010d44: 80 a0 e0 00 cmp %g3, 0 40010d48: 02 80 00 0a be 40010d70 40010d4c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010d50: 81 c7 e0 08 ret <== NOT EXECUTED 40010d54: 81 e8 00 00 restore <== NOT EXECUTED { Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40010d58: 82 18 60 02 xor %g1, 2, %g1 40010d5c: 80 a0 00 01 cmp %g0, %g1 40010d60: 84 60 20 00 subx %g0, 0, %g2 40010d64: b0 08 a0 15 and %g2, 0x15, %i0 40010d68: 81 c7 e0 08 ret 40010d6c: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40010d70: 40 00 1b 9c call 40017be0 <_Thread_Dispatch> 40010d74: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010d78: 81 c7 e0 08 ret 40010d7c: 81 e8 00 00 restore 4000ff34 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 4000ff34: 9d e3 bf 90 save %sp, -112, %sp 4000ff38: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 4000ff3c: 80 a6 60 00 cmp %i1, 0 4000ff40: 02 80 00 17 be 4000ff9c 4000ff44: b0 10 20 09 mov 9, %i0 4000ff48: 11 10 00 82 sethi %hi(0x40020800), %o0 4000ff4c: 94 07 bf f4 add %fp, -12, %o2 4000ff50: 7f ff ea dc call 4000aac0 <_Objects_Get> 4000ff54: 90 12 23 dc or %o0, 0x3dc, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000ff58: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ff5c: 80 a0 60 00 cmp %g1, 0 4000ff60: 12 80 00 11 bne 4000ffa4 4000ff64: 92 10 00 08 mov %o0, %o1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *statistics = the_period->Statistics; 4000ff68: 90 10 00 19 mov %i1, %o0 4000ff6c: 92 02 60 54 add %o1, 0x54, %o1 4000ff70: 40 00 09 2b call 4001241c 4000ff74: 94 10 20 38 mov 0x38, %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ff78: 03 10 00 83 sethi %hi(0x40020c00), %g1 4000ff7c: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 4000ff80: b0 10 20 00 clr %i0 4000ff84: 84 00 bf ff add %g2, -1, %g2 4000ff88: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 4000ff8c: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 4000ff90: 80 a0 e0 00 cmp %g3, 0 4000ff94: 02 80 00 0a be 4000ffbc 4000ff98: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ff9c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ffa0: 81 e8 00 00 restore <== NOT EXECUTED if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000ffa4: 82 18 60 02 xor %g1, 2, %g1 4000ffa8: 80 a0 00 01 cmp %g0, %g1 4000ffac: 84 60 20 00 subx %g0, 0, %g2 4000ffb0: b0 08 a0 15 and %g2, 0x15, %i0 4000ffb4: 81 c7 e0 08 ret 4000ffb8: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 4000ffbc: 7f ff ef e9 call 4000bf60 <_Thread_Dispatch> 4000ffc0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ffc4: 81 c7 e0 08 ret 4000ffc8: 81 e8 00 00 restore 4000ffcc : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 4000ffcc: 9d e3 bf 88 save %sp, -120, %sp 4000ffd0: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 4000ffd4: 80 a6 60 00 cmp %i1, 0 4000ffd8: 02 80 00 21 be 4001005c 4000ffdc: b0 10 20 09 mov 9, %i0 4000ffe0: 11 10 00 82 sethi %hi(0x40020800), %o0 4000ffe4: 94 07 bf f4 add %fp, -12, %o2 4000ffe8: 7f ff ea b6 call 4000aac0 <_Objects_Get> 4000ffec: 90 12 23 dc or %o0, 0x3dc, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000fff0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000fff4: 80 a0 60 00 cmp %g1, 0 4000fff8: 12 80 00 1b bne 40010064 4000fffc: b0 10 00 08 mov %o0, %i0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 40010000: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 40010004: 80 a0 60 00 cmp %g1, 0 40010008: 02 80 00 03 be 40010014 4001000c: 84 10 20 00 clr %g2 40010010: c4 00 60 08 ld [ %g1 + 8 ], %g2 status->state = the_period->state; 40010014: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 40010018: c4 26 40 00 st %g2, [ %i1 ] status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 4001001c: 80 a0 60 00 cmp %g1, 0 40010020: 12 80 00 1b bne 4001008c 40010024: c2 26 60 04 st %g1, [ %i1 + 4 ] #else status->ticks_since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 40010028: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 4001002c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 40010030: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED #else status->ticks_since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 40010034: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010038: 03 10 00 83 sethi %hi(0x40020c00), %g1 4001003c: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40010040: b0 10 20 00 clr %i0 40010044: 84 00 bf ff add %g2, -1, %g2 40010048: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 4001004c: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 40010050: 80 a0 e0 00 cmp %g3, 0 40010054: 02 80 00 0a be 4001007c 40010058: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001005c: 81 c7 e0 08 ret <== NOT EXECUTED 40010060: 81 e8 00 00 restore <== NOT EXECUTED if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40010064: 82 18 60 02 xor %g1, 2, %g1 <== NOT EXECUTED 40010068: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4001006c: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED 40010070: b0 08 a0 15 and %g2, 0x15, %i0 <== NOT EXECUTED 40010074: 81 c7 e0 08 ret <== NOT EXECUTED 40010078: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4001007c: 7f ff ef b9 call 4000bf60 <_Thread_Dispatch> 40010080: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010084: 81 c7 e0 08 ret 40010088: 81 e8 00 00 restore * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 4001008c: a0 07 bf ec add %fp, -20, %l0 40010090: 7f ff e7 3e call 40009d88 <_TOD_Get_uptime> 40010094: 90 10 00 10 mov %l0, %o0 #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 40010098: 90 06 20 44 add %i0, 0x44, %o0 4001009c: 92 10 00 10 mov %l0, %o1 400100a0: 7f ff f4 6b call 4000d24c <_Timespec_Subtract> 400100a4: 94 06 60 08 add %i1, 8, %o2 status->ticks_since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 400100a8: 92 10 00 10 mov %l0, %o1 400100ac: 94 06 60 10 add %i1, 0x10, %o2 400100b0: 11 10 00 83 sethi %hi(0x40020c00), %o0 400100b4: 7f ff f4 66 call 4000d24c <_Timespec_Subtract> 400100b8: 90 12 22 54 or %o0, 0x254, %o0 ! 40020e54 <_Thread_Time_of_last_context_switch> 400100bc: 30 bf ff df b,a 40010038 40007d54 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40007d54: 9d e3 bf 80 save %sp, -128, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 40007d58: 11 10 00 82 sethi %hi(0x40020800), %o0 40007d5c: 92 10 00 18 mov %i0, %o1 40007d60: 90 12 23 dc or %o0, 0x3dc, %o0 40007d64: 40 00 0b 57 call 4000aac0 <_Objects_Get> 40007d68: 94 07 bf f4 add %fp, -12, %o2 rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40007d6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007d70: 80 a0 60 00 cmp %g1, 0 40007d74: 12 80 00 15 bne 40007dc8 40007d78: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40007d7c: 25 10 00 83 sethi %hi(0x40020c00), %l2 40007d80: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40007d84: c2 04 a2 4c ld [ %l2 + 0x24c ], %g1 40007d88: 80 a0 80 01 cmp %g2, %g1 40007d8c: 02 80 00 14 be 40007ddc 40007d90: 80 a6 60 00 cmp %i1, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d94: 03 10 00 83 sethi %hi(0x40020c00), %g1 40007d98: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40007d9c: b0 10 20 17 mov 0x17, %i0 _Thread_Dispatch(); 40007da0: 84 00 bf ff add %g2, -1, %g2 40007da4: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 40007da8: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 40007dac: 80 a0 e0 00 cmp %g3, 0 40007db0: 12 80 00 66 bne 40007f48 40007db4: 01 00 00 00 nop 40007db8: 40 00 10 6a call 4000bf60 <_Thread_Dispatch> 40007dbc: 01 00 00 00 nop 40007dc0: 81 c7 e0 08 ret 40007dc4: 81 e8 00 00 restore rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40007dc8: 80 a0 60 02 cmp %g1, 2 40007dcc: 02 bf ff fd be 40007dc0 40007dd0: b0 10 20 04 mov 4, %i0 break; } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007dd4: 81 c7 e0 08 ret <== NOT EXECUTED 40007dd8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40007ddc: 22 80 00 73 be,a 40007fa8 40007de0: d0 02 20 38 ld [ %o0 + 0x38 ], %o0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007de4: 7f ff eb 73 call 40002bb0 40007de8: 01 00 00 00 nop 40007dec: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40007df0: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40007df4: 80 a4 e0 02 cmp %l3, 2 40007df8: 02 80 00 34 be 40007ec8 40007dfc: 80 a4 e0 04 cmp %l3, 4 40007e00: 02 80 00 54 be 40007f50 40007e04: 80 a4 e0 00 cmp %l3, 0 40007e08: 32 bf ff ee bne,a 40007dc0 40007e0c: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED /* * No need to update statistics -- there are not a period active */ _ISR_Enable( level ); 40007e10: 7f ff eb 6c call 40002bc0 40007e14: a0 07 bf ec add %fp, -20, %l0 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) _TOD_Get_uptime( &uptime ); 40007e18: 40 00 07 dc call 40009d88 <_TOD_Get_uptime> 40007e1c: 90 10 00 10 mov %l0, %o0 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 40007e20: c2 07 bf ec ld [ %fp + -20 ], %g1 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e24: c6 04 a2 4c ld [ %l2 + 0x24c ], %g3 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 40007e28: c2 24 60 44 st %g1, [ %l1 + 0x44 ] 40007e2c: c2 07 bf f0 ld [ %fp + -16 ], %g1 the_period->owner_executed_at_period = _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e30: 92 10 00 10 mov %l0, %o1 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 40007e34: c2 24 60 48 st %g1, [ %l1 + 0x48 ] #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e38: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e3c: a0 07 bf e4 add %fp, -28, %l0 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e40: c4 24 60 3c st %g2, [ %l1 + 0x3c ] 40007e44: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e48: 94 10 00 10 mov %l0, %o2 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e4c: c2 24 60 40 st %g1, [ %l1 + 0x40 ] _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e50: 11 10 00 83 sethi %hi(0x40020c00), %o0 40007e54: 40 00 14 fe call 4000d24c <_Timespec_Subtract> 40007e58: 90 12 22 54 or %o0, 0x254, %o0 ! 40020e54 <_Thread_Time_of_last_context_switch> /* The thread had executed before the last context switch also. * * the_period->owner_executed_at_period += ran */ _Timespec_Add_to( &the_period->owner_executed_at_period, &ran ); 40007e5c: 92 10 00 10 mov %l0, %o1 40007e60: 40 00 14 98 call 4000d0c0 <_Timespec_Add_to> 40007e64: 90 04 60 3c add %l1, 0x3c, %o0 #else the_period->owner_ticks_executed_at_period = _Thread_Executing->ticks_executed; #endif the_period->state = RATE_MONOTONIC_ACTIVE; 40007e68: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007e6c: 03 10 00 20 sethi %hi(0x40008000), %g1 40007e70: 82 10 63 7c or %g1, 0x37c, %g1 ! 4000837c <_Rate_monotonic_Timeout> the_watchdog->id = id; 40007e74: f0 24 60 30 st %i0, [ %l1 + 0x30 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007e78: f2 24 60 1c st %i1, [ %l1 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007e7c: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007e80: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007e84: f2 24 60 4c st %i1, [ %l1 + 0x4c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007e88: 92 04 60 10 add %l1, 0x10, %o1 #else the_period->owner_ticks_executed_at_period = _Thread_Executing->ticks_executed; #endif the_period->state = RATE_MONOTONIC_ACTIVE; 40007e8c: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007e90: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007e94: 11 10 00 83 sethi %hi(0x40020c00), %o0 40007e98: 40 00 15 b8 call 4000d578 <_Watchdog_Insert> 40007e9c: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007ea0: 05 10 00 83 sethi %hi(0x40020c00), %g2 40007ea4: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 40007ea8: 82 00 7f ff add %g1, -1, %g1 40007eac: c2 20 a1 70 st %g1, [ %g2 + 0x170 ] 40007eb0: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 40007eb4: 80 a0 e0 00 cmp %g3, 0 40007eb8: 02 80 00 22 be 40007f40 40007ebc: 01 00 00 00 nop _Thread_Dispatch(); 40007ec0: 81 c7 e0 08 ret <== NOT EXECUTED 40007ec4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007ec8: 7f ff ff 43 call 40007bd4 <_Rate_monotonic_Update_statistics> 40007ecc: 90 10 00 11 mov %l1, %o0 * 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; 40007ed0: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007ed4: f2 24 60 4c st %i1, [ %l1 + 0x4c ] * 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; 40007ed8: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40007edc: 7f ff eb 39 call 40002bc0 40007ee0: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40007ee4: c2 04 a2 4c ld [ %l2 + 0x24c ], %g1 40007ee8: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007eec: 90 10 00 01 mov %g1, %o0 the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; the_period->next_length = length; _ISR_Enable( level ); _Thread_Executing->Wait.id = the_period->Object.id; 40007ef0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007ef4: 40 00 13 41 call 4000cbf8 <_Thread_Set_state> 40007ef8: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40007efc: 7f ff eb 2d call 40002bb0 40007f00: 01 00 00 00 nop local_state = the_period->state; 40007f04: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007f08: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40007f0c: 7f ff eb 2d call 40002bc0 40007f10: 01 00 00 00 nop /* * 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 ) 40007f14: 80 a4 20 03 cmp %l0, 3 40007f18: 02 80 00 32 be 40007fe0 40007f1c: d0 04 a2 4c ld [ %l2 + 0x24c ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007f20: 03 10 00 83 sethi %hi(0x40020c00), %g1 40007f24: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40007f28: 84 00 bf ff add %g2, -1, %g2 40007f2c: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 40007f30: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 40007f34: 80 a0 e0 00 cmp %g3, 0 40007f38: 12 bf ff e2 bne 40007ec0 40007f3c: 01 00 00 00 nop _Thread_Dispatch(); 40007f40: 40 00 10 08 call 4000bf60 <_Thread_Dispatch> 40007f44: b0 10 20 00 clr %i0 ! 0 40007f48: 81 c7 e0 08 ret 40007f4c: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007f50: 7f ff ff 21 call 40007bd4 <_Rate_monotonic_Update_statistics> 40007f54: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40007f58: 7f ff eb 1a call 40002bc0 40007f5c: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007f60: 82 10 20 02 mov 2, %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007f64: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40007f68: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007f6c: 92 04 60 10 add %l1, 0x10, %o1 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40007f70: c2 24 60 38 st %g1, [ %l1 + 0x38 ] 40007f74: 11 10 00 83 sethi %hi(0x40020c00), %o0 40007f78: 40 00 15 80 call 4000d578 <_Watchdog_Insert> 40007f7c: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007f80: 07 10 00 83 sethi %hi(0x40020c00), %g3 40007f84: c2 00 e1 70 ld [ %g3 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 40007f88: b0 10 20 06 mov 6, %i0 40007f8c: 82 00 7f ff add %g1, -1, %g1 40007f90: c2 20 e1 70 st %g1, [ %g3 + 0x170 ] 40007f94: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 40007f98: 80 a0 a0 00 cmp %g2, 0 40007f9c: 02 bf ff 87 be 40007db8 40007fa0: 01 00 00 00 nop 40007fa4: 30 bf ff e9 b,a 40007f48 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 40007fa8: 80 a2 20 02 cmp %o0, 2 40007fac: 02 80 00 09 be 40007fd0 40007fb0: b0 10 20 00 clr %i0 40007fb4: 80 a2 20 04 cmp %o0, 4 40007fb8: 02 80 00 06 be 40007fd0 40007fbc: b0 10 20 06 mov 6, %i0 40007fc0: 80 a2 20 00 cmp %o0, 0 40007fc4: 02 80 00 03 be 40007fd0 40007fc8: b0 10 20 0b mov 0xb, %i0 40007fcc: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40007fd0: 03 10 00 83 sethi %hi(0x40020c00), %g1 40007fd4: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40007fd8: 10 bf ff 73 b 40007da4 40007fdc: 84 00 bf ff add %g2, -1, %g2 * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007fe0: 40 00 0f 2b call 4000bc8c <_Thread_Clear_state> <== NOT EXECUTED 40007fe4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40007fe8: 30 bf ff ce b,a 40007f20 <== NOT EXECUTED 40007fec : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40007fec: 9d e3 bf 30 save %sp, -208, %sp rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 40007ff0: 80 a6 60 00 cmp %i1, 0 40007ff4: 02 80 00 4e be 4000812c 40007ff8: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40007ffc: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008000: 9f c6 40 00 call %i1 40008004: 92 12 61 88 or %o1, 0x188, %o1 ! 4001e188 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40008008: 90 10 00 18 mov %i0, %o0 4000800c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008010: 9f c6 40 00 call %i1 40008014: 92 12 61 a8 or %o1, 0x1a8, %o1 ! 4001e1a8 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 40008018: 90 10 00 18 mov %i0, %o0 4000801c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008020: 9f c6 40 00 call %i1 40008024: 92 12 61 d0 or %o1, 0x1d0, %o1 ! 4001e1d0 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40008028: 90 10 00 18 mov %i0, %o0 4000802c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008030: 9f c6 40 00 call %i1 40008034: 92 12 61 f8 or %o1, 0x1f8, %o1 ! 4001e1f8 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 40008038: 90 10 00 18 mov %i0, %o0 4000803c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008040: 9f c6 40 00 call %i1 40008044: 92 12 62 48 or %o1, 0x248, %o1 ! 4001e248 /* * 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 ; 40008048: 03 10 00 82 sethi %hi(0x40020800), %g1 4000804c: a6 10 63 dc or %g1, 0x3dc, %l3 ! 40020bdc <_Rate_monotonic_Information> 40008050: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40008054: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40008058: 80 a4 80 01 cmp %l2, %g1 4000805c: 18 80 00 34 bgu 4000812c 40008060: 03 10 00 78 sethi %hi(0x4001e000), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40008064: 05 10 00 78 sethi %hi(0x4001e000), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40008068: b6 10 62 98 or %g1, 0x298, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 4000806c: b8 10 a1 c8 or %g2, 0x1c8, %i4 40008070: a8 07 bf 98 add %fp, -104, %l4 status = rtems_rate_monotonic_get_statistics( id, &the_stats ); if ( status != RTEMS_SUCCESSFUL ) continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 40008074: aa 07 bf d0 add %fp, -48, %l5 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40008078: ba 07 bf b0 add %fp, -80, %i5 4000807c: ac 07 bf e8 add %fp, -24, %l6 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40008080: b4 07 bf c8 add %fp, -56, %i2 40008084: 10 80 00 06 b 4000809c 40008088: ae 07 bf f3 add %fp, -13, %l7 * 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++ ) { 4000808c: a4 04 a0 01 inc %l2 /* * 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 ; 40008090: 80 a0 40 12 cmp %g1, %l2 40008094: 0a 80 00 26 bcs 4000812c 40008098: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 4000809c: 90 10 00 12 mov %l2, %o0 400080a0: 40 00 1f a5 call 4000ff34 400080a4: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 400080a8: 80 a2 20 00 cmp %o0, 0 400080ac: 32 bf ff f8 bne,a 4000808c 400080b0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400080b4: 92 10 00 15 mov %l5, %o1 400080b8: 40 00 1f c5 call 4000ffcc 400080bc: 90 10 00 12 mov %l2, %o0 if ( status != RTEMS_SUCCESSFUL ) 400080c0: 80 a2 20 00 cmp %o0, 0 400080c4: 32 bf ff f2 bne,a 4000808c 400080c8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED continue; name[ 0 ] = '\0'; if ( the_status.owner ) { 400080cc: d0 07 bf d0 ld [ %fp + -48 ], %o0 /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; name[ 0 ] = '\0'; 400080d0: c0 2f bf f3 clrb [ %fp + -13 ] if ( the_status.owner ) { 400080d4: 80 a2 20 00 cmp %o0, 0 400080d8: 12 80 00 4b bne 40008204 400080dc: a0 10 00 17 mov %l7, %l0 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400080e0: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 400080e4: 94 10 00 12 mov %l2, %o2 400080e8: 92 10 00 1b mov %i3, %o1 400080ec: 96 10 00 10 mov %l0, %o3 400080f0: 9f c6 40 00 call %i1 400080f4: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400080f8: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 400080fc: 94 10 00 16 mov %l6, %o2 40008100: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40008104: 80 a0 60 00 cmp %g1, 0 40008108: 12 80 00 0b bne 40008134 4000810c: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 40008110: 9f c6 40 00 call %i1 40008114: 90 10 00 18 mov %i0, %o0 /* * 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 ; 40008118: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 4000811c: a4 04 a0 01 inc %l2 /* * 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 ; 40008120: 80 a0 40 12 cmp %g1, %l2 40008124: 1a bf ff df bcc 400080a0 40008128: 90 10 00 12 mov %l2, %o0 4000812c: 81 c7 e0 08 ret 40008130: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40008134: 40 00 13 fd call 4000d128 <_Timespec_Divide_by_integer> 40008138: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 4000813c: d0 07 bf a4 ld [ %fp + -92 ], %o0 40008140: 40 00 49 c8 call 4001a860 <.div> 40008144: 92 10 23 e8 mov 0x3e8, %o1 40008148: a2 10 00 08 mov %o0, %l1 4000814c: d0 07 bf ac ld [ %fp + -84 ], %o0 40008150: 40 00 49 c4 call 4001a860 <.div> 40008154: 92 10 23 e8 mov 0x3e8, %o1 40008158: c2 07 bf e8 ld [ %fp + -24 ], %g1 4000815c: a0 10 00 08 mov %o0, %l0 40008160: d0 07 bf ec ld [ %fp + -20 ], %o0 40008164: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008168: 40 00 49 be call 4001a860 <.div> 4000816c: 92 10 23 e8 mov 0x3e8, %o1 40008170: d8 07 bf a8 ld [ %fp + -88 ], %o4 40008174: d4 07 bf a0 ld [ %fp + -96 ], %o2 40008178: 96 10 00 11 mov %l1, %o3 4000817c: 9a 10 00 10 mov %l0, %o5 40008180: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40008184: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008188: 90 10 00 18 mov %i0, %o0 4000818c: 9f c6 40 00 call %i1 40008190: 92 12 62 b0 or %o1, 0x2b0, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40008194: d2 07 bf 98 ld [ %fp + -104 ], %o1 40008198: 94 10 00 16 mov %l6, %o2 4000819c: 40 00 13 e3 call 4000d128 <_Timespec_Divide_by_integer> 400081a0: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 400081a4: d0 07 bf bc ld [ %fp + -68 ], %o0 400081a8: 40 00 49 ae call 4001a860 <.div> 400081ac: 92 10 23 e8 mov 0x3e8, %o1 400081b0: a2 10 00 08 mov %o0, %l1 400081b4: d0 07 bf c4 ld [ %fp + -60 ], %o0 400081b8: 40 00 49 aa call 4001a860 <.div> 400081bc: 92 10 23 e8 mov 0x3e8, %o1 400081c0: c2 07 bf e8 ld [ %fp + -24 ], %g1 400081c4: a0 10 00 08 mov %o0, %l0 400081c8: d0 07 bf ec ld [ %fp + -20 ], %o0 400081cc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400081d0: 40 00 49 a4 call 4001a860 <.div> 400081d4: 92 10 23 e8 mov 0x3e8, %o1 400081d8: d4 07 bf b8 ld [ %fp + -72 ], %o2 400081dc: d8 07 bf c0 ld [ %fp + -64 ], %o4 400081e0: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 400081e4: 96 10 00 11 mov %l1, %o3 400081e8: 9a 10 00 10 mov %l0, %o5 400081ec: 90 10 00 18 mov %i0, %o0 400081f0: 13 10 00 78 sethi %hi(0x4001e000), %o1 400081f4: 9f c6 40 00 call %i1 400081f8: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 4001e2d0 /* * 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 ; 400081fc: 10 bf ff a4 b 4000808c 40008200: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 40008204: 92 10 20 05 mov 5, %o1 40008208: 40 00 00 8f call 40008444 4000820c: 94 10 00 17 mov %l7, %o2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40008210: 10 bf ff b5 b 400080e4 40008214: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40008234 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 40008234: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008238: 25 10 00 83 sethi %hi(0x40020c00), %l2 4000823c: c2 04 a1 70 ld [ %l2 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 40008240: 82 00 60 01 inc %g1 40008244: c2 24 a1 70 st %g1, [ %l2 + 0x170 ] /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40008248: 03 10 00 82 sethi %hi(0x40020800), %g1 4000824c: a2 10 63 dc or %g1, 0x3dc, %l1 ! 40020bdc <_Rate_monotonic_Information> 40008250: e0 04 60 08 ld [ %l1 + 8 ], %l0 id <= _Rate_monotonic_Information.maximum_id ; 40008254: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40008258: 80 a4 00 01 cmp %l0, %g1 4000825c: 18 80 00 09 bgu 40008280 40008260: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 40008264: 40 00 00 13 call 400082b0 40008268: 90 10 00 10 mov %l0, %o0 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 4000826c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id++ ) { 40008270: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40008274: 80 a0 40 10 cmp %g1, %l0 40008278: 1a bf ff fb bcc 40008264 4000827c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008280: c2 04 a1 70 ld [ %l2 + 0x170 ], %g1 40008284: 82 00 7f ff add %g1, -1, %g1 40008288: c2 24 a1 70 st %g1, [ %l2 + 0x170 ] 4000828c: c4 04 a1 70 ld [ %l2 + 0x170 ], %g2 40008290: 80 a0 a0 00 cmp %g2, 0 40008294: 02 80 00 04 be 400082a4 40008298: 01 00 00 00 nop 4000829c: 81 c7 e0 08 ret <== NOT EXECUTED 400082a0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400082a4: 40 00 0f 2f call 4000bf60 <_Thread_Dispatch> 400082a8: 81 e8 00 00 restore 400082ac: 01 00 00 00 nop 40011298 : uint32_t length, uint32_t page_size, rtems_attribute attribute_set, Objects_Id *id ) { 40011298: 9d e3 bf 98 save %sp, -104, %sp Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 4001129c: a8 96 20 00 orcc %i0, 0, %l4 400112a0: 02 80 00 58 be 40011400 400112a4: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 400112a8: 80 a6 60 00 cmp %i1, 0 400112ac: 02 80 00 06 be 400112c4 400112b0: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 400112b4: 02 80 00 04 be 400112c4 400112b8: 80 8e 60 07 btst 7, %i1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 400112bc: 02 80 00 04 be 400112cc 400112c0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400112c4: 81 c7 e0 08 ret 400112c8: 91 e8 20 09 restore %g0, 9, %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 400112cc: 7f ff e6 8f call 4000ad08 400112d0: 01 00 00 00 nop 400112d4: a2 10 00 08 mov %o0, %l1 400112d8: 25 10 00 d7 sethi %hi(0x40035c00), %l2 400112dc: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400112e0: 80 a0 60 00 cmp %g1, 0 400112e4: 02 80 00 0b be 40011310 400112e8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400112ec: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 400112f0: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 400112f4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400112f8: 08 80 00 05 bleu 4001130c <== NOT EXECUTED 400112fc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40011300: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011304: 40 00 13 7d call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40011308: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4001130c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40011310: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40011314: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 40011318: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4001131c: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40011320: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011324: 80 a0 60 00 cmp %g1, 0 40011328: 22 80 00 12 be,a 40011370 4001132c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40011330: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011334: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011338: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4001133c: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011340: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011344: c6 24 20 6c st %g3, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011348: 80 a0 a0 02 cmp %g2, 2 4001134c: 12 80 00 2f bne 40011408 40011350: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011354: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40011358: 82 00 60 01 inc %g1 4001135c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40011360: 7f ff e6 6e call 4000ad18 40011364: 90 10 00 11 mov %l1, %o0 * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 40011368: 10 80 00 0f b 400113a4 4001136c: 23 10 00 d7 sethi %hi(0x40035c00), %l1 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40011370: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40011374: 32 80 00 48 bne,a 40011494 <== NOT EXECUTED 40011378: c4 04 20 08 ld [ %l0 + 8 ], %g2 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4001137c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40011380: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011384: 12 80 00 41 bne 40011488 <== NOT EXECUTED 40011388: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4001138c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011390: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011394: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011398: 7f ff e6 60 call 4000ad18 <== NOT EXECUTED 4001139c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400113a0: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED 400113a4: 40 00 13 82 call 400161ac <_Objects_Allocate> 400113a8: 90 14 61 08 or %l1, 0x108, %o0 ! 40035d08 <_Region_Information> the_region = _Region_Allocate(); if ( !the_region ) { 400113ac: a0 92 20 00 orcc %o0, 0, %l0 400113b0: 32 80 00 4e bne,a 400114e8 400113b4: 90 04 20 68 add %l0, 0x68, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400113b8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400113bc: 82 00 60 01 inc %g1 400113c0: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _RTEMS_Unlock_allocator(); 400113c4: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400113c8: 94 10 20 00 clr %o2 400113cc: d2 02 20 08 ld [ %o0 + 8 ], %o1 400113d0: 40 00 10 d1 call 40015714 <_CORE_mutex_Surrender> 400113d4: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400113d8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400113dc: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 400113e0: 82 00 7f ff add %g1, -1, %g1 400113e4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 400113e8: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 400113ec: 80 a0 a0 00 cmp %g2, 0 400113f0: 12 80 00 04 bne 40011400 400113f4: 01 00 00 00 nop 400113f8: 40 00 19 fa call 40017be0 <_Thread_Dispatch> 400113fc: 01 00 00 00 nop 40011400: 81 c7 e0 08 ret 40011404: 81 e8 00 00 restore if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011408: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 4001140c: 12 bf ff d5 bne 40011360 <== NOT EXECUTED 40011410: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011414: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40011418: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4001141c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011420: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40011424: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED current = executing->current_priority; if ( current == ceiling ) { 40011428: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001142c: 02 80 00 4e be 40011564 <== NOT EXECUTED 40011430: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40011434: 1a 80 00 42 bcc 4001153c <== NOT EXECUTED 40011438: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001143c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011440: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011444: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40011448: 7f ff e6 34 call 4000ad18 <== NOT EXECUTED 4001144c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 40011450: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40011454: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40011458: 40 00 18 be call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 4001145c: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011460: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011464: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011468: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 4001146c: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 <== NOT EXECUTED 40011470: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011474: 12 bf ff cc bne 400113a4 <== NOT EXECUTED 40011478: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED _Thread_Dispatch(); 4001147c: 40 00 19 d9 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011480: 01 00 00 00 nop <== NOT EXECUTED 40011484: 30 bf ff c8 b,a 400113a4 <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011488: 02 80 00 13 be 400114d4 <== NOT EXECUTED 4001148c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40011490: c4 04 20 08 ld [ %l0 + 8 ], %g2 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011494: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011498: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] <== NOT EXECUTED 4001149c: 82 00 60 01 inc %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 400114a0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 400114a4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 400114a8: c4 24 20 40 st %g2, [ %l0 + 0x40 ] <== NOT EXECUTED 400114ac: 82 04 20 10 add %l0, 0x10, %g1 <== NOT EXECUTED 400114b0: c2 20 e0 44 st %g1, [ %g3 + 0x44 ] <== NOT EXECUTED 400114b4: 7f ff e6 19 call 4000ad18 <== NOT EXECUTED 400114b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400114bc: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 400114c0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400114c4: 40 00 10 70 call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400114c8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 400114cc: 10 bf ff b6 b 400113a4 <== NOT EXECUTED 400114d0: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400114d4: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400114d8: 7f ff e6 10 call 4000ad18 <== NOT EXECUTED 400114dc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400114e0: 10 bf ff b1 b 400113a4 <== NOT EXECUTED 400114e4: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED if ( !the_region ) { _RTEMS_Unlock_allocator(); return RTEMS_TOO_MANY; } the_region->maximum_segment_size = 400114e8: 92 10 00 19 mov %i1, %o1 400114ec: 94 10 00 1a mov %i2, %o2 400114f0: 40 00 12 b5 call 40015fc4 <_Heap_Initialize> 400114f4: 96 10 00 1b mov %i3, %o3 _Heap_Initialize(&the_region->Memory, starting_address, length, page_size); if ( !the_region->maximum_segment_size ) { 400114f8: 80 a2 20 00 cmp %o0, 0 400114fc: 12 80 00 1e bne 40011574 40011500: d0 24 20 5c st %o0, [ %l0 + 0x5c ] RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 40011504: 90 14 61 08 or %l1, 0x108, %o0 40011508: 40 00 14 37 call 400165e4 <_Objects_Free> 4001150c: 92 10 00 10 mov %l0, %o1 40011510: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011514: 82 00 60 01 inc %g1 40011518: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 4001151c: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011520: 94 10 20 00 clr %o2 40011524: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011528: 40 00 10 7b call 40015714 <_CORE_mutex_Surrender> 4001152c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011530: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011534: 10 bf ff ab b 400113e0 40011538: b0 10 20 08 mov 8, %i0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4001153c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40011540: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40011544: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40011548: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4001154c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011550: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40011554: 7f ff e5 f1 call 4000ad18 <== NOT EXECUTED 40011558: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 4001155c: 10 bf ff 92 b 400113a4 <== NOT EXECUTED 40011560: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40011564: 7f ff e5 ed call 4000ad18 <== NOT EXECUTED 40011568: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4001156c: 10 bf ff 8e b 400113a4 <== NOT EXECUTED 40011570: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 40011574: 90 04 20 10 add %l0, 0x10, %o0 _Region_Free( the_region ); _RTEMS_Unlock_allocator(); return RTEMS_INVALID_SIZE; } the_region->starting_address = starting_address; 40011578: f2 24 20 50 st %i1, [ %l0 + 0x50 ] the_region->length = length; 4001157c: f4 24 20 54 st %i2, [ %l0 + 0x54 ] the_region->page_size = page_size; 40011580: f6 24 20 58 st %i3, [ %l0 + 0x58 ] the_region->attribute_set = attribute_set; 40011584: f8 24 20 60 st %i4, [ %l0 + 0x60 ] the_region->number_of_used_blocks = 0; 40011588: c0 24 20 64 clr [ %l0 + 0x64 ] _Thread_queue_Initialize( 4001158c: 93 37 20 02 srl %i4, 2, %o1 40011590: 94 10 20 40 mov 0x40, %o2 40011594: 92 0a 60 01 and %o1, 1, %o1 40011598: 40 00 1c 10 call 400185d8 <_Thread_queue_Initialize> 4001159c: 96 10 20 06 mov 6, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400115a0: 90 14 61 08 or %l1, 0x108, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400115a4: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400115a8: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400115ac: 03 00 00 3f sethi %hi(0xfc00), %g1 400115b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400115b4: 82 08 c0 01 and %g3, %g1, %g1 400115b8: 80 a0 40 02 cmp %g1, %g2 400115bc: 38 80 00 06 bgu,a 400115d4 400115c0: c6 27 40 00 st %g3, [ %i5 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400115c4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400115c8: 83 28 60 02 sll %g1, 2, %g1 400115cc: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 400115d0: c6 27 40 00 st %g3, [ %i5 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400115d4: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400115d8: e8 24 20 0c st %l4, [ %l0 + 0xc ] 400115dc: 82 00 60 01 inc %g1 400115e0: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _RTEMS_Unlock_allocator(); 400115e4: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400115e8: 94 10 20 00 clr %o2 400115ec: d2 02 20 08 ld [ %o0 + 8 ], %o1 400115f0: 40 00 10 49 call 40015714 <_CORE_mutex_Surrender> 400115f4: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400115f8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400115fc: 10 bf ff 79 b 400113e0 40011600: b0 10 20 00 clr %i0 40011604 : */ rtems_status_code rtems_region_delete( Objects_Id id ) { 40011604: 9d e3 bf 90 save %sp, -112, %sp register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); 40011608: 7f ff e5 c0 call 4000ad08 4001160c: 01 00 00 00 nop 40011610: a2 10 00 08 mov %o0, %l1 40011614: 25 10 00 d7 sethi %hi(0x40035c00), %l2 40011618: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 4001161c: 80 a0 60 00 cmp %g1, 0 40011620: 02 80 00 0b be 4001164c 40011624: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40011628: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 4001162c: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 40011630: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40011634: 08 80 00 06 bleu 4001164c <== NOT EXECUTED 40011638: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001163c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011640: 40 00 12 ae call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40011644: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40011648: 27 10 00 d7 sethi %hi(0x40035c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4001164c: 09 10 00 d7 sethi %hi(0x40035c00), %g4 40011650: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 40011654: c4 01 23 cc ld [ %g4 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40011658: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4001165c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011660: 80 a0 60 00 cmp %g1, 0 40011664: 22 80 00 36 be,a 4001173c 40011668: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4001166c: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011670: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011674: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40011678: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4001167c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011680: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011684: 80 a0 e0 02 cmp %g3, 2 40011688: 12 80 00 56 bne 400117e0 4001168c: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011690: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011694: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011698: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4001169c: 02 80 00 7c be 4001188c 400116a0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 400116a4: 7f ff e5 9d call 4000ad18 400116a8: 90 10 00 11 mov %l1, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 400116ac: 92 10 00 18 mov %i0, %o1 400116b0: 21 10 00 d7 sethi %hi(0x40035c00), %l0 400116b4: 94 07 bf f4 add %fp, -12, %o2 400116b8: 40 00 14 0e call 400166f0 <_Objects_Get_no_protection> 400116bc: 90 14 21 08 or %l0, 0x108, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 400116c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400116c4: 80 a0 60 01 cmp %g1, 1 400116c8: 02 80 00 33 be 40011794 400116cc: 92 10 00 08 mov %o0, %o1 400116d0: 80 a0 60 01 cmp %g1, 1 400116d4: 1a 80 00 5f bcc 40011850 400116d8: 80 a0 60 02 cmp %g1, 2 _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks == 0 ) { 400116dc: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 400116e0: 80 a0 60 00 cmp %g1, 0 400116e4: 22 80 00 99 be,a 40011948 400116e8: 90 14 21 08 or %l0, 0x108, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400116ec: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400116f0: 82 00 60 01 inc %g1 400116f4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _Objects_Close( &_Region_Information, &the_region->Object ); _Region_Free( the_region ); _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } _RTEMS_Unlock_allocator(); 400116f8: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400116fc: 94 10 20 00 clr %o2 40011700: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011704: 40 00 10 04 call 40015714 <_CORE_mutex_Surrender> 40011708: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001170c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011710: b0 10 20 0c mov 0xc, %i0 40011714: 82 00 7f ff add %g1, -1, %g1 40011718: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 4001171c: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 40011720: 80 a0 a0 00 cmp %g2, 0 40011724: 12 80 00 49 bne 40011848 40011728: 01 00 00 00 nop _Thread_Dispatch(); 4001172c: 40 00 19 2d call 40017be0 <_Thread_Dispatch> 40011730: 01 00 00 00 nop 40011734: 81 c7 e0 08 ret 40011738: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4001173c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011740: 12 80 00 30 bne 40011800 <== NOT EXECUTED 40011744: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011748: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4001174c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011750: 22 80 00 6a be,a 400118f8 <== NOT EXECUTED 40011754: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011758: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001175c: 12 80 00 29 bne 40011800 <== NOT EXECUTED 40011760: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40011764: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40011768: 7f ff e5 6c call 4000ad18 <== NOT EXECUTED 4001176c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011770: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40011774: 21 10 00 d7 sethi %hi(0x40035c00), %l0 <== NOT EXECUTED 40011778: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4001177c: 40 00 13 dd call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 40011780: 90 14 21 08 or %l0, 0x108, %o0 <== NOT EXECUTED register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011784: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011788: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001178c: 12 bf ff d2 bne 400116d4 <== NOT EXECUTED 40011790: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011794: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011798: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001179c: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 400117a0: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 400117a4: 94 10 20 00 clr %o2 <== NOT EXECUTED 400117a8: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 400117ac: 40 00 0f da call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 400117b0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400117b4: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 400117b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400117bc: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 400117c0: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 <== NOT EXECUTED 400117c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400117c8: 12 80 00 24 bne 40011858 <== NOT EXECUTED 400117cc: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 400117d0: 40 00 19 04 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 400117d4: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 400117d8: 81 c7 e0 08 ret <== NOT EXECUTED 400117dc: 81 e8 00 00 restore <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400117e0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400117e4: 12 bf ff b0 bne 400116a4 <== NOT EXECUTED 400117e8: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400117ec: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400117f0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400117f4: 02 80 00 26 be 4001188c <== NOT EXECUTED 400117f8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 400117fc: 30 bf ff aa b,a 400116a4 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011800: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED ) { register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); 40011804: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40011808: c8 01 23 cc ld [ %g4 + 0x3cc ], %g4 <== NOT EXECUTED 4001180c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011810: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40011814: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 40011818: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 4001181c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40011820: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40011824: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40011828: 7f ff e5 3c call 4000ad18 <== NOT EXECUTED 4001182c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011830: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40011834: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011838: 40 00 0f 93 call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4001183c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40011840: 10 bf ff 9c b 400116b0 <== NOT EXECUTED 40011844: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _RTEMS_Unlock_allocator(); return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40011848: 81 c7 e0 08 ret <== NOT EXECUTED 4001184c: 81 e8 00 00 restore <== NOT EXECUTED register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011850: 02 80 00 04 be 40011860 40011854: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40011858: 81 c7 e0 08 ret <== NOT EXECUTED 4001185c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011860: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011864: 82 00 60 01 inc %g1 40011868: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 4001186c: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011870: 94 10 20 00 clr %o2 40011874: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011878: 40 00 0f a7 call 40015714 <_CORE_mutex_Surrender> 4001187c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011880: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011884: 10 bf ff a4 b 40011714 40011888: b0 10 20 04 mov 4, %i0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4001188c: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40011890: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40011894: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40011898: 02 80 00 28 be 40011938 <== NOT EXECUTED 4001189c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 400118a0: 1a 80 00 1c bcc 40011910 <== NOT EXECUTED 400118a4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400118a8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 400118ac: 82 00 60 01 inc %g1 <== NOT EXECUTED 400118b0: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400118b4: 7f ff e5 19 call 4000ad18 <== NOT EXECUTED 400118b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 400118bc: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400118c0: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400118c4: 40 00 17 a3 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 400118c8: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400118cc: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 400118d0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400118d4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 400118d8: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 <== NOT EXECUTED 400118dc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400118e0: 32 bf ff 74 bne,a 400116b0 <== NOT EXECUTED 400118e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _Thread_Dispatch(); 400118e8: 40 00 18 be call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 400118ec: 01 00 00 00 nop <== NOT EXECUTED 400118f0: 10 bf ff 70 b 400116b0 <== NOT EXECUTED 400118f4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 400118f8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400118fc: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011900: 7f ff e5 06 call 4000ad18 <== NOT EXECUTED 40011904: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011908: 10 bf ff 6a b 400116b0 <== NOT EXECUTED 4001190c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40011910: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40011914: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40011918: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4001191c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40011920: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011924: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40011928: 7f ff e4 fc call 4000ad18 <== NOT EXECUTED 4001192c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011930: 10 bf ff 60 b 400116b0 <== NOT EXECUTED 40011934: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40011938: 7f ff e4 f8 call 4000ad18 <== NOT EXECUTED 4001193c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011940: 10 bf ff 5c b 400116b0 <== NOT EXECUTED 40011944: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40011948: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4001194c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40011950: 05 00 00 3f sethi %hi(0xfc00), %g2 40011954: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40011958: 82 08 40 02 and %g1, %g2, %g1 4001195c: 80 a0 40 03 cmp %g1, %g3 40011960: 18 80 00 05 bgu 40011974 40011964: 01 00 00 00 nop information->local_table[ index ] = the_object; 40011968: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4001196c: 83 28 60 02 sll %g1, 2, %g1 40011970: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 40011974: 40 00 13 1c call 400165e4 <_Objects_Free> 40011978: c0 22 60 0c clr [ %o1 + 0xc ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001197c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011980: 82 00 60 01 inc %g1 40011984: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks == 0 ) { _Objects_Close( &_Region_Information, &the_region->Object ); _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 40011988: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 4001198c: 94 10 20 00 clr %o2 40011990: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011994: 40 00 0f 60 call 40015714 <_CORE_mutex_Surrender> 40011998: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001199c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400119a0: 10 bf ff 5d b 40011714 400119a4: b0 10 20 00 clr %i0 400119a8 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 400119a8: 9d e3 bf 90 save %sp, -112, %sp 400119ac: a8 10 00 18 mov %i0, %l4 Objects_Locations location; uint32_t amount_extended; Heap_Extend_status heap_status; rtems_status_code status; if ( !starting_address ) 400119b0: 80 a6 60 00 cmp %i1, 0 400119b4: 02 80 00 59 be 40011b18 400119b8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ 400119bc: 7f ff e4 d3 call 4000ad08 400119c0: 01 00 00 00 nop 400119c4: a4 10 00 08 mov %o0, %l2 400119c8: 23 10 00 d7 sethi %hi(0x40035c00), %l1 400119cc: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400119d0: 80 a0 60 00 cmp %g1, 0 400119d4: 02 80 00 0b be 40011a00 400119d8: 27 10 00 d7 sethi %hi(0x40035c00), %l3 400119dc: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 400119e0: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 400119e4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400119e8: 08 80 00 06 bleu 40011a00 <== NOT EXECUTED 400119ec: 90 10 20 00 clr %o0 <== NOT EXECUTED 400119f0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400119f4: 40 00 11 c1 call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 400119f8: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 400119fc: 27 10 00 d7 sethi %hi(0x40035c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40011a00: 09 10 00 d7 sethi %hi(0x40035c00), %g4 40011a04: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 40011a08: c4 01 23 cc ld [ %g4 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40011a0c: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40011a10: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011a14: 80 a0 60 00 cmp %g1, 0 40011a18: 22 80 00 42 be,a 40011b20 40011a1c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40011a20: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011a24: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011a28: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40011a2c: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011a30: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011a34: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011a38: 80 a0 e0 02 cmp %g3, 2 40011a3c: 02 80 00 61 be 40011bc0 40011a40: c8 24 20 64 st %g4, [ %l0 + 0x64 ] 40011a44: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40011a48: 22 80 00 60 be,a 40011bc8 <== NOT EXECUTED 40011a4c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40011a50: 7f ff e4 b2 call 4000ad18 40011a54: 90 10 00 12 mov %l2, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40011a58: 92 10 00 14 mov %l4, %o1 40011a5c: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40011a60: 94 07 bf f4 add %fp, -12, %o2 40011a64: 40 00 13 23 call 400166f0 <_Objects_Get_no_protection> 40011a68: 90 12 21 08 or %o0, 0x108, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011a6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011a70: 80 a0 60 01 cmp %g1, 1 40011a74: 02 80 00 40 be 40011b74 40011a78: a0 10 00 08 mov %o0, %l0 40011a7c: 80 a0 60 01 cmp %g1, 1 40011a80: 1a 80 00 70 bcc 40011c40 40011a84: 80 a0 60 02 cmp %g1, 2 _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40011a88: 92 10 00 19 mov %i1, %o1 40011a8c: 94 10 00 1a mov %i2, %o2 40011a90: 90 02 20 68 add %o0, 0x68, %o0 40011a94: 96 07 bf f0 add %fp, -16, %o3 40011a98: 40 00 10 65 call 40015c2c <_Heap_Extend> 40011a9c: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 40011aa0: 80 a2 20 01 cmp %o0, 1 40011aa4: 02 80 00 0c be 40011ad4 40011aa8: 01 00 00 00 nop 40011aac: 1a 80 00 8e bcc 40011ce4 40011ab0: 82 1a 20 02 xor %o0, 2, %g1 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40011ab4: c6 07 bf f0 ld [ %fp + -16 ], %g3 40011ab8: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 40011abc: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40011ac0: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40011ac4: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40011ac8: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 40011acc: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40011ad0: b0 10 20 00 clr %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011ad4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011ad8: 82 00 60 01 inc %g1 40011adc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] break; case HEAP_EXTEND_NOT_IMPLEMENTED: status = RTEMS_NOT_IMPLEMENTED; break; } _RTEMS_Unlock_allocator(); 40011ae0: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011ae4: 94 10 20 00 clr %o2 40011ae8: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011aec: 40 00 0f 0a call 40015714 <_CORE_mutex_Surrender> 40011af0: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011af4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011af8: 82 00 7f ff add %g1, -1, %g1 40011afc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40011b00: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40011b04: 80 a0 a0 00 cmp %g2, 0 40011b08: 12 80 00 2c bne 40011bb8 40011b0c: 01 00 00 00 nop _Thread_Dispatch(); 40011b10: 40 00 18 34 call 40017be0 <_Thread_Dispatch> 40011b14: 01 00 00 00 nop 40011b18: 81 c7 e0 08 ret 40011b1c: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40011b20: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011b24: 12 80 00 4d bne 40011c58 <== NOT EXECUTED 40011b28: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011b2c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40011b30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011b34: 12 80 00 47 bne 40011c50 <== NOT EXECUTED 40011b38: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40011b3c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011b40: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011b44: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011b48: 7f ff e4 74 call 4000ad18 <== NOT EXECUTED 40011b4c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011b50: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40011b54: 11 10 00 d7 sethi %hi(0x40035c00), %o0 <== NOT EXECUTED 40011b58: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40011b5c: 40 00 12 e5 call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 40011b60: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 40011b64: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011b68: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40011b6c: 12 bf ff c5 bne 40011a80 <== NOT EXECUTED 40011b70: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011b74: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011b78: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011b7c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 40011b80: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40011b84: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011b88: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40011b8c: 40 00 0e e2 call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 40011b90: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011b94: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011b98: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011b9c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011ba0: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011ba4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011ba8: 12 80 00 28 bne 40011c48 <== NOT EXECUTED 40011bac: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40011bb0: 40 00 18 0c call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011bb4: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 40011bb8: 81 c7 e0 08 ret <== NOT EXECUTED 40011bbc: 81 e8 00 00 restore <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011bc0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011bc4: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011bc8: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011bcc: 12 bf ff a1 bne 40011a50 40011bd0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40011bd4: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40011bd8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40011bdc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40011be0: 02 80 00 50 be 40011d20 <== NOT EXECUTED 40011be4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40011be8: 1a 80 00 44 bcc 40011cf8 <== NOT EXECUTED 40011bec: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011bf0: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011bf4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011bf8: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40011bfc: 7f ff e4 47 call 4000ad18 <== NOT EXECUTED 40011c00: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40011c04: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40011c08: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40011c0c: 40 00 16 d1 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 40011c10: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011c14: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011c18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011c1c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011c20: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011c24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011c28: 32 bf ff 8d bne,a 40011a5c <== NOT EXECUTED 40011c2c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED _Thread_Dispatch(); 40011c30: 40 00 17 ec call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011c34: 01 00 00 00 nop <== NOT EXECUTED 40011c38: 10 bf ff 89 b 40011a5c <== NOT EXECUTED 40011c3c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 40011c40: 02 80 00 18 be 40011ca0 40011c44: 01 00 00 00 nop 40011c48: 81 c7 e0 08 ret <== NOT EXECUTED 40011c4c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011c50: 02 80 00 1f be 40011ccc <== NOT EXECUTED 40011c54: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011c58: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED if ( !starting_address ) return RTEMS_INVALID_ADDRESS; status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40011c5c: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40011c60: c8 01 23 cc ld [ %g4 + 0x3cc ], %g4 <== NOT EXECUTED 40011c64: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011c68: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40011c6c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011c70: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40011c74: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40011c78: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40011c7c: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40011c80: 7f ff e4 26 call 4000ad18 <== NOT EXECUTED 40011c84: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011c88: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40011c8c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011c90: 40 00 0e 7d call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40011c94: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40011c98: 10 bf ff 71 b 40011a5c <== NOT EXECUTED 40011c9c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40011ca0: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011ca4: 82 00 60 01 inc %g1 40011ca8: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 40011cac: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011cb0: 94 10 20 00 clr %o2 40011cb4: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011cb8: 40 00 0e 97 call 40015714 <_CORE_mutex_Surrender> 40011cbc: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011cc0: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011cc4: 10 bf ff 8d b 40011af8 40011cc8: b0 10 20 04 mov 4, %i0 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40011ccc: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40011cd0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40011cd4: 7f ff e4 11 call 4000ad18 <== NOT EXECUTED 40011cd8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011cdc: 10 bf ff 60 b 40011a5c <== NOT EXECUTED 40011ce0: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED starting_address, length, &amount_extended ); switch ( heap_status ) { 40011ce4: 80 a0 00 01 cmp %g0, %g1 40011ce8: 84 60 20 00 subx %g0, 0, %g2 40011cec: b0 08 bf e8 and %g2, -24, %i0 40011cf0: 10 bf ff 79 b 40011ad4 40011cf4: b0 06 20 18 add %i0, 0x18, %i0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40011cf8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40011cfc: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40011d00: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40011d04: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40011d08: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011d0c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40011d10: 7f ff e4 02 call 4000ad18 <== NOT EXECUTED 40011d14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011d18: 10 bf ff 51 b 40011a5c <== NOT EXECUTED 40011d1c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40011d20: 7f ff e3 fe call 4000ad18 <== NOT EXECUTED 40011d24: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011d28: 10 bf ff 4d b 40011a5c <== NOT EXECUTED 40011d2c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40011d30 : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 40011d30: 9d e3 bf 90 save %sp, -112, %sp 40011d34: aa 10 00 18 mov %i0, %l5 register Region_Control *the_region; Objects_Locations location; Thread_Control *executing; void *the_segment; if ( !segment ) 40011d38: 80 a7 20 00 cmp %i4, 0 40011d3c: 02 80 00 4e be 40011e74 40011d40: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; *segment = NULL; if ( size == 0 ) 40011d44: 80 a6 60 00 cmp %i1, 0 40011d48: 02 80 00 c8 be 40012068 40011d4c: c0 27 00 00 clr [ %i4 ] return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 40011d50: 7f ff e3 ee call 4000ad08 40011d54: 01 00 00 00 nop 40011d58: a4 10 00 08 mov %o0, %l2 40011d5c: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40011d60: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40011d64: 80 a0 60 00 cmp %g1, 0 40011d68: 02 80 00 0b be 40011d94 40011d6c: 29 10 00 d7 sethi %hi(0x40035c00), %l4 40011d70: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 40011d74: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 40011d78: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40011d7c: 08 80 00 06 bleu 40011d94 <== NOT EXECUTED 40011d80: 90 10 20 00 clr %o0 <== NOT EXECUTED 40011d84: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011d88: 40 00 10 dc call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40011d8c: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40011d90: 29 10 00 d7 sethi %hi(0x40035c00), %l4 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40011d94: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40011d98: e0 05 23 c4 ld [ %l4 + 0x3c4 ], %l0 40011d9c: c4 04 e3 cc ld [ %l3 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40011da0: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40011da4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011da8: 80 a0 60 00 cmp %g1, 0 40011dac: 22 80 00 34 be,a 40011e7c 40011db0: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40011db4: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011db8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011dbc: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40011dc0: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011dc4: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011dc8: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011dcc: 80 a0 e0 02 cmp %g3, 2 40011dd0: 02 80 00 54 be 40011f20 40011dd4: c8 24 20 64 st %g4, [ %l0 + 0x64 ] 40011dd8: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40011ddc: 22 80 00 53 be,a 40011f28 <== NOT EXECUTED 40011de0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40011de4: 7f ff e3 cd call 4000ad18 40011de8: 90 10 00 12 mov %l2, %o0 executing = _Thread_Executing; 40011dec: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 40011df0: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40011df4: 92 10 00 15 mov %l5, %o1 40011df8: 90 12 21 08 or %o0, 0x108, %o0 40011dfc: 40 00 12 3d call 400166f0 <_Objects_Get_no_protection> 40011e00: 94 07 bf f4 add %fp, -12, %o2 the_region = _Region_Get( id, &location ); switch ( location ) { 40011e04: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011e08: 80 a0 60 01 cmp %g1, 1 40011e0c: 02 80 00 32 be 40011ed4 40011e10: a0 10 00 08 mov %o0, %l0 40011e14: 80 a0 60 01 cmp %g1, 1 40011e18: 1a 80 00 62 bcc 40011fa0 40011e1c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) { 40011e20: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 40011e24: 80 a6 40 01 cmp %i1, %g1 40011e28: 28 80 00 a0 bleu,a 400120a8 40011e2c: 90 02 20 68 add %o0, 0x68, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011e30: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011e34: 82 00 60 01 inc %g1 40011e38: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 40011e3c: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40011e40: 94 10 20 00 clr %o2 40011e44: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011e48: 40 00 0e 33 call 40015714 <_CORE_mutex_Surrender> 40011e4c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011e50: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011e54: 82 00 7f ff add %g1, -1, %g1 40011e58: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40011e5c: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40011e60: 80 a0 a0 00 cmp %g2, 0 40011e64: 12 80 00 81 bne 40012068 40011e68: 01 00 00 00 nop _Thread_Dispatch(); 40011e6c: 40 00 17 5d call 40017be0 <_Thread_Dispatch> 40011e70: b0 10 20 08 mov 8, %i0 ! 8 40011e74: 81 c7 e0 08 ret 40011e78: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40011e7c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011e80: 12 80 00 4e bne 40011fb8 <== NOT EXECUTED 40011e84: c6 05 23 c4 ld [ %l4 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011e88: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40011e8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011e90: 12 80 00 48 bne 40011fb0 <== NOT EXECUTED 40011e94: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40011e98: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011e9c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011ea0: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011ea4: 7f ff e3 9d call 4000ad18 <== NOT EXECUTED 40011ea8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011eac: 11 10 00 d7 sethi %hi(0x40035c00), %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40011eb0: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED 40011eb4: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED 40011eb8: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40011ebc: 40 00 12 0d call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 40011ec0: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 40011ec4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011ec8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40011ecc: 12 bf ff d3 bne 40011e18 <== NOT EXECUTED 40011ed0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011ed4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011ed8: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011edc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 40011ee0: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 <== NOT EXECUTED 40011ee4: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011ee8: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40011eec: 40 00 0e 0a call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 40011ef0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011ef4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011ef8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011efc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011f00: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011f04: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011f08: 12 80 00 28 bne 40011fa8 <== NOT EXECUTED 40011f0c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40011f10: 40 00 17 34 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011f14: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 40011f18: 81 c7 e0 08 ret <== NOT EXECUTED 40011f1c: 81 e8 00 00 restore <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011f20: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011f24: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011f28: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011f2c: 12 bf ff ae bne 40011de4 40011f30: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40011f34: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40011f38: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40011f3c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40011f40: 02 80 00 56 be 40012098 <== NOT EXECUTED 40011f44: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40011f48: 1a 80 00 4a bcc 40012070 <== NOT EXECUTED 40011f4c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011f50: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011f54: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011f58: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40011f5c: 7f ff e3 6f call 4000ad18 <== NOT EXECUTED 40011f60: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40011f64: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40011f68: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40011f6c: 40 00 15 f9 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 40011f70: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011f74: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011f78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011f7c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011f80: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011f84: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011f88: 32 bf ff 9a bne,a 40011df0 <== NOT EXECUTED 40011f8c: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED _Thread_Dispatch(); 40011f90: 40 00 17 14 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011f94: 01 00 00 00 nop <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40011f98: 10 bf ff 96 b 40011df0 <== NOT EXECUTED 40011f9c: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 40011fa0: 02 80 00 18 be 40012000 40011fa4: 01 00 00 00 nop _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 40011fa8: 81 c7 e0 08 ret <== NOT EXECUTED 40011fac: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011fb0: 02 80 00 28 be 40012050 <== NOT EXECUTED 40011fb4: c6 05 23 c4 ld [ %l4 + 0x3c4 ], %g3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011fb8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 40011fbc: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40011fc0: c8 04 e3 cc ld [ %l3 + 0x3cc ], %g4 <== NOT EXECUTED 40011fc4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011fc8: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40011fcc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011fd0: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40011fd4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40011fd8: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40011fdc: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40011fe0: 7f ff e3 4e call 4000ad18 <== NOT EXECUTED 40011fe4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011fe8: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 <== NOT EXECUTED 40011fec: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011ff0: 40 00 0d a5 call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40011ff4: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED executing = _Thread_Executing; 40011ff8: 10 bf ff 7e b 40011df0 <== NOT EXECUTED 40011ffc: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED 40012000: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012004: 82 00 60 01 inc %g1 40012008: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 4001200c: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40012010: 94 10 20 00 clr %o2 40012014: d2 02 20 08 ld [ %o0 + 8 ], %o1 40012018: 40 00 0d bf call 40015714 <_CORE_mutex_Surrender> 4001201c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012020: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012024: b0 10 20 04 mov 4, %i0 _Thread_Dispatch(); 40012028: 82 00 7f ff add %g1, -1, %g1 4001202c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012030: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012034: 80 a0 a0 00 cmp %g2, 0 40012038: 12 80 00 6d bne 400121ec 4001203c: 01 00 00 00 nop 40012040: 40 00 16 e8 call 40017be0 <_Thread_Dispatch> 40012044: 01 00 00 00 nop 40012048: 81 c7 e0 08 ret 4001204c: 81 e8 00 00 restore case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40012050: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40012054: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40012058: 7f ff e3 30 call 4000ad18 <== NOT EXECUTED 4001205c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40012060: 10 bf ff 64 b 40011df0 <== NOT EXECUTED 40012064: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 40012068: 81 c7 e0 08 ret <== NOT EXECUTED 4001206c: 91 e8 20 08 restore %g0, 8, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40012070: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40012074: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40012078: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4001207c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40012080: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012084: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40012088: 7f ff e3 24 call 4000ad18 <== NOT EXECUTED 4001208c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40012090: 10 bf ff 58 b 40011df0 <== NOT EXECUTED 40012094: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40012098: 7f ff e3 20 call 4000ad18 <== NOT EXECUTED 4001209c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400120a0: 10 bf ff 54 b 40011df0 <== NOT EXECUTED 400120a4: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 400120a8: 40 00 0e af call 40015b64 <_Heap_Allocate> 400120ac: 92 10 00 19 mov %i1, %o1 the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 400120b0: a4 92 20 00 orcc %o0, 0, %l2 400120b4: 02 80 00 17 be 40012110 400120b8: 80 8e a0 01 btst 1, %i2 the_region->number_of_used_blocks += 1; 400120bc: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400120c0: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 400120c4: 82 00 60 01 inc %g1 400120c8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 400120cc: 84 00 a0 01 inc %g2 400120d0: c4 24 62 f0 st %g2, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 400120d4: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 400120d8: 94 10 20 00 clr %o2 400120dc: d2 02 20 08 ld [ %o0 + 8 ], %o1 400120e0: 40 00 0d 8d call 40015714 <_CORE_mutex_Surrender> 400120e4: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400120e8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400120ec: 82 00 7f ff add %g1, -1, %g1 400120f0: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 400120f4: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 400120f8: 80 a0 a0 00 cmp %g2, 0 400120fc: 02 80 00 12 be 40012144 40012100: 01 00 00 00 nop *segment = the_segment; 40012104: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED 40012108: 81 c7 e0 08 ret 4001210c: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } if ( _Options_Is_no_wait( option_set ) ) { 40012110: 02 80 00 11 be 40012154 40012114: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012118: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 4001211c: 82 00 60 01 inc %g1 40012120: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 40012124: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40012128: 94 10 20 00 clr %o2 4001212c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40012130: 40 00 0d 79 call 40015714 <_CORE_mutex_Surrender> 40012134: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012138: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 4001213c: 10 bf ff bb b 40012028 40012140: b0 10 20 0d mov 0xd, %i0 _Thread_Dispatch(); 40012144: 40 00 16 a7 call 40017be0 <_Thread_Dispatch> 40012148: 01 00 00 00 nop _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { the_region->number_of_used_blocks += 1; _RTEMS_Unlock_allocator(); *segment = the_segment; 4001214c: 10 bf ff ef b 40012108 40012150: e4 27 00 00 st %l2, [ %i4 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012154: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012158: 25 10 00 d7 sethi %hi(0x40035c00), %l2 4001215c: 82 00 60 01 inc %g1 40012160: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012164: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012168: 82 00 60 01 inc %g1 4001216c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 40012170: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40012174: 94 10 20 00 clr %o2 40012178: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001217c: 40 00 0d 66 call 40015714 <_CORE_mutex_Surrender> 40012180: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012184: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012188: 82 00 7f ff add %g1, -1, %g1 4001218c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012190: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012194: 80 a0 a0 00 cmp %g2, 0 40012198: 02 80 00 17 be 400121f4 4001219c: 01 00 00 00 nop 400121a0: 82 10 20 01 mov 1, %g1 ! 1 executing->Wait.queue = &the_region->Wait_queue; 400121a4: 90 04 20 10 add %l0, 0x10, %o0 executing->Wait.id = id; 400121a8: ea 26 20 20 st %l5, [ %i0 + 0x20 ] executing->Wait.count = size; 400121ac: f2 26 20 24 st %i1, [ %i0 + 0x24 ] executing->Wait.return_argument = segment; 400121b0: f8 26 20 28 st %i4, [ %i0 + 0x28 ] _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 400121b4: 92 10 00 1b mov %i3, %o1 * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; 400121b8: d0 26 20 44 st %o0, [ %i0 + 0x44 ] 400121bc: c2 24 20 40 st %g1, [ %l0 + 0x40 ] executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 400121c0: 15 10 00 61 sethi %hi(0x40018400), %o2 400121c4: 40 00 17 f7 call 400181a0 <_Thread_queue_Enqueue_with_handler> 400121c8: 94 12 a2 e0 or %o2, 0x2e0, %o2 ! 400186e0 <_Thread_queue_Timeout> 400121cc: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400121d0: 82 00 7f ff add %g1, -1, %g1 400121d4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 400121d8: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 400121dc: 80 a0 a0 00 cmp %g2, 0 400121e0: 02 80 00 09 be 40012204 400121e4: 01 00 00 00 nop _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 400121e8: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 <== NOT EXECUTED 400121ec: 81 c7 e0 08 ret <== NOT EXECUTED 400121f0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400121f4: 40 00 16 7b call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 400121f8: 01 00 00 00 nop <== NOT EXECUTED 400121fc: 10 bf ff ea b 400121a4 <== NOT EXECUTED 40012200: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40012204: 40 00 16 77 call 40017be0 <_Thread_Dispatch> 40012208: 01 00 00 00 nop 4001220c: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 40012210: 81 c7 e0 08 ret 40012214: 81 e8 00 00 restore 40012250 : rtems_status_code rtems_region_return_segment( Objects_Id id, void *segment ) { 40012250: 9d e3 bf 90 save %sp, -112, %sp #ifdef RTEMS_REGION_FREE_SHRED_PATTERN uint32_t size; #endif int status; _RTEMS_Lock_allocator(); 40012254: 7f ff e2 ad call 4000ad08 40012258: 01 00 00 00 nop 4001225c: a4 10 00 08 mov %o0, %l2 40012260: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40012264: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40012268: 80 a0 60 00 cmp %g1, 0 4001226c: 02 80 00 0b be 40012298 40012270: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40012274: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 40012278: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 4001227c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40012280: 08 80 00 06 bleu 40012298 <== NOT EXECUTED 40012284: 90 10 20 00 clr %o0 <== NOT EXECUTED 40012288: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001228c: 40 00 0f 9b call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40012290: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40012294: 27 10 00 d7 sethi %hi(0x40035c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40012298: 09 10 00 d7 sethi %hi(0x40035c00), %g4 4001229c: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 400122a0: c4 01 23 cc ld [ %g4 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400122a4: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400122a8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 400122ac: 80 a0 60 00 cmp %g1, 0 400122b0: 22 80 00 38 be,a 40012390 400122b4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400122b8: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400122bc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400122c0: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 400122c4: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400122c8: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 400122cc: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400122d0: 80 a0 e0 02 cmp %g3, 2 400122d4: 12 80 00 58 bne 40012434 400122d8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400122dc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400122e0: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400122e4: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400122e8: 02 80 00 7c be 400124d8 400122ec: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 400122f0: 7f ff e2 8a call 4000ad18 400122f4: 90 10 00 12 mov %l2, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 400122f8: 92 10 00 18 mov %i0, %o1 400122fc: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40012300: 94 07 bf f4 add %fp, -12, %o2 40012304: 40 00 10 fb call 400166f0 <_Objects_Get_no_protection> 40012308: 90 12 21 08 or %o0, 0x108, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001230c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012310: 80 a0 60 01 cmp %g1, 1 40012314: 02 80 00 35 be 400123e8 40012318: a0 10 00 08 mov %o0, %l0 4001231c: 80 a0 60 01 cmp %g1, 1 40012320: 1a 80 00 5f bcc 4001249c 40012324: 80 a0 60 02 cmp %g1, 2 RTEMS_INLINE_ROUTINE boolean _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 40012328: 92 10 00 19 mov %i1, %o1 4001232c: 40 00 0e 73 call 40015cf8 <_Heap_Free> 40012330: 90 02 20 68 add %o0, 0x68, %o0 status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) { 40012334: 80 a2 20 00 cmp %o0, 0 40012338: 32 80 00 97 bne,a 40012594 4001233c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012340: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012344: 82 00 60 01 inc %g1 40012348: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 4001234c: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40012350: 94 10 20 00 clr %o2 40012354: d2 02 20 08 ld [ %o0 + 8 ], %o1 40012358: 40 00 0c ef call 40015714 <_CORE_mutex_Surrender> 4001235c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012360: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012364: b0 10 20 09 mov 9, %i0 40012368: 82 00 7f ff add %g1, -1, %g1 4001236c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012370: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012374: 80 a0 a0 00 cmp %g2, 0 40012378: 12 80 00 8c bne 400125a8 4001237c: 01 00 00 00 nop _Thread_Dispatch(); 40012380: 40 00 16 18 call 40017be0 <_Thread_Dispatch> 40012384: 01 00 00 00 nop 40012388: 81 c7 e0 08 ret 4001238c: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40012390: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40012394: 12 80 00 30 bne 40012454 <== NOT EXECUTED 40012398: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4001239c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400123a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400123a4: 22 80 00 68 be,a 40012544 <== NOT EXECUTED 400123a8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400123ac: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400123b0: 12 80 00 29 bne 40012454 <== NOT EXECUTED 400123b4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400123b8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400123bc: 7f ff e2 57 call 4000ad18 <== NOT EXECUTED 400123c0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 400123c4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400123c8: 11 10 00 d7 sethi %hi(0x40035c00), %o0 <== NOT EXECUTED 400123cc: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 400123d0: 40 00 10 c8 call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 400123d4: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED #endif int status; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 400123d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400123dc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400123e0: 12 bf ff d0 bne 40012320 <== NOT EXECUTED 400123e4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400123e8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 400123ec: 82 00 60 01 inc %g1 <== NOT EXECUTED 400123f0: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 400123f4: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 400123f8: 94 10 20 00 clr %o2 <== NOT EXECUTED 400123fc: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40012400: 40 00 0c c5 call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 40012404: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012408: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 4001240c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012410: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40012414: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40012418: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001241c: 12 80 00 22 bne 400124a4 <== NOT EXECUTED 40012420: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40012424: 40 00 15 ef call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40012428: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 4001242c: 81 c7 e0 08 ret <== NOT EXECUTED 40012430: 81 e8 00 00 restore <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40012434: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40012438: 12 bf ff ae bne 400122f0 <== NOT EXECUTED 4001243c: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40012440: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40012444: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40012448: 02 80 00 24 be 400124d8 <== NOT EXECUTED 4001244c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40012450: 30 bf ff a8 b,a 400122f0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012454: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED #ifdef RTEMS_REGION_FREE_SHRED_PATTERN uint32_t size; #endif int status; _RTEMS_Lock_allocator(); 40012458: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 4001245c: c8 01 23 cc ld [ %g4 + 0x3cc ], %g4 <== NOT EXECUTED 40012460: 82 00 60 01 inc %g1 <== NOT EXECUTED 40012464: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40012468: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 4001246c: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40012470: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40012474: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40012478: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4001247c: 7f ff e2 27 call 4000ad18 <== NOT EXECUTED 40012480: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40012484: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40012488: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001248c: 40 00 0c 7e call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40012490: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40012494: 10 bf ff 9a b 400122fc <== NOT EXECUTED 40012498: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 4001249c: 02 80 00 04 be 400124ac 400124a0: 01 00 00 00 nop the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator internally */ return RTEMS_SUCCESSFUL; 400124a4: 81 c7 e0 08 ret <== NOT EXECUTED 400124a8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED 400124ac: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400124b0: 82 00 60 01 inc %g1 400124b4: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 400124b8: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400124bc: 94 10 20 00 clr %o2 400124c0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400124c4: 40 00 0c 94 call 40015714 <_CORE_mutex_Surrender> 400124c8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400124cc: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400124d0: 10 bf ff a6 b 40012368 400124d4: b0 10 20 04 mov 4, %i0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 400124d8: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 400124dc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 400124e0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400124e4: 02 80 00 28 be 40012584 <== NOT EXECUTED 400124e8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 400124ec: 1a 80 00 1c bcc 4001255c <== NOT EXECUTED 400124f0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400124f4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 400124f8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400124fc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40012500: 7f ff e2 06 call 4000ad18 <== NOT EXECUTED 40012504: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40012508: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4001250c: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40012510: 40 00 14 90 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 40012514: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012518: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 4001251c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012520: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40012524: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40012528: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001252c: 32 bf ff 74 bne,a 400122fc <== NOT EXECUTED 40012530: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _Thread_Dispatch(); 40012534: 40 00 15 ab call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40012538: 01 00 00 00 nop <== NOT EXECUTED 4001253c: 10 bf ff 70 b 400122fc <== NOT EXECUTED 40012540: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40012544: 82 00 60 01 inc %g1 <== NOT EXECUTED 40012548: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4001254c: 7f ff e1 f3 call 4000ad18 <== NOT EXECUTED 40012550: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40012554: 10 bf ff 6a b 400122fc <== NOT EXECUTED 40012558: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4001255c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40012560: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40012564: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40012568: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4001256c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012570: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40012574: 7f ff e1 e9 call 4000ad18 <== NOT EXECUTED 40012578: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001257c: 10 bf ff 60 b 400122fc <== NOT EXECUTED 40012580: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40012584: 7f ff e1 e5 call 4000ad18 <== NOT EXECUTED 40012588: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001258c: 10 bf ff 5c b 400122fc <== NOT EXECUTED 40012590: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator internally */ 40012594: 90 10 00 10 mov %l0, %o0 if ( !status ) { _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; 40012598: 82 00 7f ff add %g1, -1, %g1 _Region_Process_queue(the_region); /* unlocks allocator internally */ 4001259c: b0 10 20 00 clr %i0 400125a0: 40 00 26 71 call 4001bf64 <_Region_Process_queue> 400125a4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 400125a8: 81 c7 e0 08 ret 400125ac: 81 e8 00 00 restore 40006bcc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40006bcc: 9d e3 bf 80 save %sp, -128, %sp register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 40006bd0: aa 96 20 00 orcc %i0, 0, %l5 40006bd4: 02 80 00 12 be 40006c1c 40006bd8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40006bdc: 80 a7 20 00 cmp %i4, 0 40006be0: 02 80 00 0f be 40006c1c 40006be4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 40006be8: a4 8e a0 40 andcc %i2, 0x40, %l2 40006bec: 12 80 00 0e bne 40006c24 40006bf0: a0 0e a0 30 and %i2, 0x30, %l0 40006bf4: 80 8e a0 80 btst 0x80, %i2 40006bf8: 12 80 00 0c bne 40006c28 40006bfc: 80 a4 20 10 cmp %l0, 0x10 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 40006c00: 80 a0 00 10 cmp %g0, %l0 40006c04: a2 60 3f ff subx %g0, -1, %l1 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 40006c08: 80 a4 60 00 cmp %l1, 0 40006c0c: 12 80 00 17 bne 40006c68 40006c10: 80 a6 60 01 cmp %i1, 1 40006c14: 08 80 00 15 bleu 40006c68 40006c18: b0 10 20 0a mov 0xa, %i0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40006c1c: 81 c7 e0 08 ret 40006c20: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40006c24: 80 a4 20 10 cmp %l0, 0x10 40006c28: 12 80 00 0b bne 40006c54 40006c2c: 80 a4 20 20 cmp %l0, 0x20 40006c30: 80 8e a0 04 btst 4, %i2 40006c34: 02 80 00 06 be 40006c4c 40006c38: 80 a4 a0 00 cmp %l2, 0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 40006c3c: 02 bf ff f1 be 40006c00 40006c40: 80 8e a0 80 btst 0x80, %i2 40006c44: 02 bf ff f0 be 40006c04 40006c48: 80 a0 00 10 cmp %g0, %l0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40006c4c: 81 c7 e0 08 ret 40006c50: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40006c54: 12 bf ff fe bne 40006c4c 40006c58: 80 8e a0 04 btst 4, %i2 40006c5c: 12 bf ff f8 bne 40006c3c 40006c60: 80 a4 a0 00 cmp %l2, 0 40006c64: 30 bf ff fa b,a 40006c4c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006c68: 29 10 00 6f sethi %hi(0x4001bc00), %l4 40006c6c: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 40006c70: 82 00 60 01 inc %g1 40006c74: c2 25 21 e0 st %g1, [ %l4 + 0x1e0 ] * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 40006c78: 31 10 00 6f sethi %hi(0x4001bc00), %i0 40006c7c: 40 00 07 4e call 400089b4 <_Objects_Allocate> 40006c80: 90 16 20 98 or %i0, 0x98, %o0 ! 4001bc98 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40006c84: a6 92 20 00 orcc %o0, 0, %l3 40006c88: 12 80 00 0e bne 40006cc0 40006c8c: 80 a4 60 00 cmp %l1, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c90: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 40006c94: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 40006c98: 82 00 7f ff add %g1, -1, %g1 40006c9c: c2 25 21 e0 st %g1, [ %l4 + 0x1e0 ] 40006ca0: c4 05 21 e0 ld [ %l4 + 0x1e0 ], %g2 40006ca4: 80 a0 a0 00 cmp %g2, 0 40006ca8: 12 80 00 04 bne 40006cb8 40006cac: 01 00 00 00 nop 40006cb0: 40 00 0d ba call 4000a398 <_Thread_Dispatch> 40006cb4: 01 00 00 00 nop 40006cb8: 81 c7 e0 08 ret 40006cbc: 81 e8 00 00 restore * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 40006cc0: 12 80 00 1e bne 40006d38 40006cc4: f4 24 e0 10 st %i2, [ %l3 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40006cc8: 80 a4 a0 00 cmp %l2, 0 40006ccc: 02 80 00 39 be 40006db0 40006cd0: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40006cd4: 82 10 20 02 mov 2, %g1 40006cd8: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 40006cdc: 80 a4 20 10 cmp %l0, 0x10 40006ce0: 12 80 00 39 bne 40006dc4 40006ce4: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40006ce8: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006cec: 80 a0 60 01 cmp %g1, 1 40006cf0: 18 80 00 3d bgu 40006de4 40006cf4: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40006cf8: c0 27 bf e4 clr [ %fp + -28 ] the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 40006cfc: 82 1e 60 01 xor %i1, 1, %g1 40006d00: 80 a0 00 01 cmp %g0, %g1 } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 40006d04: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40006d08: 94 60 3f ff subx %g0, -1, %o2 40006d0c: 90 04 e0 14 add %l3, 0x14, %o0 40006d10: 40 00 04 9c call 40007f80 <_CORE_mutex_Initialize> 40006d14: 92 07 bf e0 add %fp, -32, %o1 &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 40006d18: 80 a2 20 06 cmp %o0, 6 40006d1c: 12 80 00 14 bne 40006d6c 40006d20: 90 16 20 98 or %i0, 0x98, %o0 RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40006d24: 40 00 08 32 call 40008dec <_Objects_Free> <== NOT EXECUTED 40006d28: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006d2c: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 <== NOT EXECUTED 40006d30: 10 bf ff da b 40006c98 <== NOT EXECUTED 40006d34: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 40006d38: 80 8e a0 04 btst 4, %i2 40006d3c: 22 80 00 04 be,a 40006d4c 40006d40: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 40006d44: 82 10 20 01 mov 1, %g1 40006d48: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40006d4c: 82 10 3f ff mov -1, %g1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 40006d50: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 40006d54: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 40006d58: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40006d5c: c2 27 bf f0 st %g1, [ %fp + -16 ] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 40006d60: 90 04 e0 14 add %l3, 0x14, %o0 40006d64: 40 00 05 44 call 40008274 <_CORE_semaphore_Initialize> 40006d68: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006d6c: 90 16 20 98 or %i0, 0x98, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006d70: c6 04 e0 08 ld [ %l3 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006d74: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40006d78: 03 00 00 3f sethi %hi(0xfc00), %g1 40006d7c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006d80: 82 08 c0 01 and %g3, %g1, %g1 40006d84: 80 a0 40 02 cmp %g1, %g2 40006d88: 38 80 00 06 bgu,a 40006da0 40006d8c: ea 24 e0 0c st %l5, [ %l3 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006d90: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006d94: 83 28 60 02 sll %g1, 2, %g1 40006d98: e6 20 80 01 st %l3, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006d9c: ea 24 e0 0c st %l5, [ %l3 + 0xc ] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40006da0: c6 27 00 00 st %g3, [ %i4 ] 40006da4: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 40006da8: 10 bf ff bc b 40006c98 40006dac: b0 10 20 00 clr %i0 if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 40006db0: 02 80 00 08 be 40006dd0 40006db4: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40006db8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 40006dbc: 10 bf ff c8 b 40006cdc <== NOT EXECUTED 40006dc0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40006dc4: c0 27 bf e4 clr [ %fp + -28 ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 40006dc8: 10 bf ff cd b 40006cfc 40006dcc: c2 27 bf e0 st %g1, [ %fp + -32 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 40006dd0: 22 bf ff c3 be,a 40006cdc 40006dd4: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40006dd8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40006ddc: 10 bf ff c0 b 40006cdc <== NOT EXECUTED 40006de0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40006de4: 80 a0 60 03 cmp %g1, 3 40006de8: 18 bf ff c6 bgu 40006d00 40006dec: 82 1e 60 01 xor %i1, 1, %g1 case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 40006df0: 82 10 20 01 mov 1, %g1 40006df4: 10 bf ff c2 b 40006cfc 40006df8: c2 27 bf e4 st %g1, [ %fp + -28 ] 40006dfc : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 40006dfc: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40006e00: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40006e04: 92 10 00 18 mov %i0, %o1 40006e08: 94 07 bf f4 add %fp, -12, %o2 40006e0c: 40 00 08 3b call 40008ef8 <_Objects_Get> 40006e10: 90 14 20 98 or %l0, 0x98, %o0 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40006e14: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e18: 80 a0 60 00 cmp %g1, 0 40006e1c: 12 80 00 19 bne 40006e80 40006e20: b0 10 00 08 mov %o0, %i0 40006e24: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40006e28: 84 88 60 30 andcc %g1, 0x30, %g2 40006e2c: 22 80 00 1a be,a 40006e94 40006e30: 90 02 20 14 add %o0, 0x14, %o0 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 40006e34: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 40006e38: 80 a0 60 00 cmp %g1, 0 40006e3c: 12 80 00 35 bne 40006f10 40006e40: 80 a0 a0 20 cmp %g2, 0x20 40006e44: 02 80 00 34 be 40006f14 40006e48: 90 06 20 14 add %i0, 0x14, %o0 40006e4c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006e50: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40006e54: b0 10 20 0c mov 0xc, %i0 40006e58: 84 00 bf ff add %g2, -1, %g2 40006e5c: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40006e60: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40006e64: 80 a0 e0 00 cmp %g3, 0 40006e68: 12 80 00 28 bne 40006f08 40006e6c: 01 00 00 00 nop _Thread_Dispatch(); 40006e70: 40 00 0d 4a call 4000a398 <_Thread_Dispatch> 40006e74: 01 00 00 00 nop 40006e78: 81 c7 e0 08 ret 40006e7c: 81 e8 00 00 restore { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40006e80: 80 a0 60 02 cmp %g1, 2 40006e84: 08 bf ff fd bleu 40006e78 40006e88: b0 10 20 04 mov 4, %i0 40006e8c: 81 c7 e0 08 ret <== NOT EXECUTED 40006e90: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 40006e94: 92 10 20 00 clr %o1 40006e98: 40 00 04 f3 call 40008264 <_CORE_semaphore_Flush> 40006e9c: 94 10 20 02 mov 2, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006ea0: 90 14 20 98 or %l0, 0x98, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006ea4: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006ea8: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006eac: 05 00 00 3f sethi %hi(0xfc00), %g2 40006eb0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40006eb4: 82 08 40 02 and %g1, %g2, %g1 40006eb8: 80 a0 40 03 cmp %g1, %g3 40006ebc: 38 80 00 06 bgu,a 40006ed4 40006ec0: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006ec4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006ec8: 83 28 60 02 sll %g1, 2, %g1 40006ecc: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40006ed0: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40006ed4: 40 00 07 c6 call 40008dec <_Objects_Free> 40006ed8: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006edc: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006ee0: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40006ee4: b0 10 20 00 clr %i0 40006ee8: 84 00 bf ff add %g2, -1, %g2 40006eec: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40006ef0: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40006ef4: 80 a0 e0 00 cmp %g3, 0 40006ef8: 12 80 00 04 bne 40006f08 40006efc: 01 00 00 00 nop _Thread_Dispatch(); 40006f00: 40 00 0d 26 call 4000a398 <_Thread_Dispatch> 40006f04: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006f08: 81 c7 e0 08 ret 40006f0c: 81 e8 00 00 restore !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 40006f10: 90 06 20 14 add %i0, 0x14, %o0 40006f14: 92 10 20 00 clr %o1 40006f18: 40 00 04 16 call 40007f70 <_CORE_mutex_Flush> 40006f1c: 94 10 20 04 mov 4, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006f20: 10 bf ff e1 b 40006ea4 40006f24: 90 14 20 98 or %l0, 0x98, %o0 400073c8 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 400073c8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 400073cc: 11 10 00 77 sethi %hi(0x4001dc00), %o0 400073d0: 92 10 00 18 mov %i0, %o1 400073d4: 90 12 23 00 or %o0, 0x300, %o0 400073d8: 40 00 08 9b call 40009644 <_Objects_Get> 400073dc: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 400073e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400073e4: 80 a0 60 00 cmp %g1, 0 400073e8: 12 80 00 16 bne 40007440 400073ec: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 400073f0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 400073f4: 80 88 60 30 btst 0x30, %g1 400073f8: 12 80 00 16 bne 40007450 400073fc: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40007400: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007404: 40 00 05 6b call 400089b0 <_CORE_semaphore_Flush> <== NOT EXECUTED 40007408: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000740c: 03 10 00 78 sethi %hi(0x4001e000), %g1 40007410: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 4001e050 <_Thread_Dispatch_disable_level> 40007414: b0 10 20 00 clr %i0 40007418: 84 00 bf ff add %g2, -1, %g2 4000741c: c4 20 60 50 st %g2, [ %g1 + 0x50 ] 40007420: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 40007424: 80 a0 e0 00 cmp %g3, 0 40007428: 12 80 00 04 bne 40007438 4000742c: 01 00 00 00 nop _Thread_Dispatch(); 40007430: 40 00 0d 71 call 4000a9f4 <_Thread_Dispatch> 40007434: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007438: 81 c7 e0 08 ret 4000743c: 81 e8 00 00 restore { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40007440: 08 bf ff fe bleu 40007438 <== NOT EXECUTED 40007444: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 40007448: 81 c7 e0 08 ret <== NOT EXECUTED 4000744c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 40007450: 92 10 20 00 clr %o1 40007454: 40 00 04 9a call 400086bc <_CORE_mutex_Flush> 40007458: 94 10 20 01 mov 1, %o2 4000745c: 30 bf ff ec b,a 4000740c 40006f28 : rtems_status_code rtems_semaphore_obtain( rtems_id id, uint32_t option_set, rtems_interval timeout ) { 40006f28: 9d e3 bf 90 save %sp, -112, %sp Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 40006f2c: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40006f30: 92 10 00 18 mov %i0, %o1 40006f34: 90 12 20 98 or %o0, 0x98, %o0 40006f38: 94 07 bf f4 add %fp, -12, %o2 40006f3c: 40 00 07 d1 call 40008e80 <_Objects_Get_isr_disable> 40006f40: 96 07 bf f0 add %fp, -16, %o3 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 40006f44: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006f48: 80 a0 60 00 cmp %g1, 0 40006f4c: 12 80 00 19 bne 40006fb0 40006f50: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40006f54: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40006f58: 80 88 60 30 btst 0x30, %g1 40006f5c: 12 80 00 1b bne 40006fc8 40006f60: 23 10 00 6f sethi %hi(0x4001bc00), %l1 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40006f64: 27 10 00 6f sethi %hi(0x4001bc00), %l3 40006f68: e4 04 e2 bc ld [ %l3 + 0x2bc ], %l2 ! 4001bebc <_Thread_Executing> Watchdog_Interval timeout, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40006f6c: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 40006f70: c0 24 a0 34 clr [ %l2 + 0x34 ] if ( the_semaphore->count != 0 ) { 40006f74: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40006f78: 80 a0 60 00 cmp %g1, 0 40006f7c: 12 80 00 8f bne 400071b8 40006f80: 80 8e 60 01 btst 1, %i1 the_semaphore->count -= 1; _ISR_Enable( level ); return; } if ( !wait ) { 40006f84: 02 80 00 73 be 40007150 40006f88: 01 00 00 00 nop _ISR_Enable( level ); 40006f8c: 7f ff ec 1b call 40001ff8 40006f90: 01 00 00 00 nop executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 40006f94: 82 10 20 01 mov 1, %g1 ! 1 40006f98: c2 24 a0 34 st %g1, [ %l2 + 0x34 ] id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 40006f9c: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 40006fa0: 40 00 00 f4 call 40007370 <_Semaphore_Translate_core_semaphore_return_code> 40006fa4: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006fa8: 81 c7 e0 08 ret 40006fac: 91 e8 00 08 restore %g0, %o0, %o0 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 40006fb0: 80 a0 60 02 cmp %g1, 2 40006fb4: 08 bf ff fd bleu 40006fa8 40006fb8: 90 10 20 04 mov 4, %o0 40006fbc: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006fc0: 81 c7 e0 08 ret <== NOT EXECUTED 40006fc4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40006fc8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40006fcc: 80 a0 60 00 cmp %g1, 0 40006fd0: 02 80 00 0e be 40007008 40006fd4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 40006fd8: 80 8e 60 01 btst 1, %i1 40006fdc: 12 80 00 0c bne 4000700c 40006fe0: c6 04 e2 bc ld [ %l3 + 0x2bc ], %g3 40006fe4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006fe8: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> 40006fec: 80 a0 a0 01 cmp %g2, 1 40006ff0: 08 80 00 07 bleu 4000700c 40006ff4: 90 10 20 00 clr %o0 40006ff8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006ffc: 40 00 06 41 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007000: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40007004: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40007008: c6 04 e2 bc ld [ %l3 + 0x2bc ], %g3 ! 4001bebc <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000700c: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40007010: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40007014: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 40007018: 80 a0 60 00 cmp %g1, 0 4000701c: 22 80 00 37 be,a 400070f8 40007020: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 40007024: c0 24 20 64 clr [ %l0 + 0x64 ] the_mutex->holder = executing; 40007028: c6 24 20 70 st %g3, [ %l0 + 0x70 ] the_mutex->holder_id = executing->Object.id; 4000702c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40007030: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40007034: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40007038: c2 24 20 74 st %g1, [ %l0 + 0x74 ] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000703c: 80 a0 a0 02 cmp %g2, 2 40007040: 12 80 00 24 bne 400070d0 40007044: c8 24 20 68 st %g4, [ %l0 + 0x68 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40007048: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000704c: 82 00 60 01 inc %g1 40007050: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40007054: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 40007058: 80 a0 a0 03 cmp %g2, 3 4000705c: 12 80 00 20 bne 400070dc 40007060: 01 00 00 00 nop */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40007064: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED current = executing->current_priority; 40007068: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000706c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40007070: 02 80 00 79 be 40007254 <== NOT EXECUTED 40007074: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40007078: 1a 80 00 6d bcc 4000722c <== NOT EXECUTED 4000707c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007080: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40007084: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007088: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000708c: 7f ff eb db call 40001ff8 <== NOT EXECUTED 40007090: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 40007094: d2 04 20 60 ld [ %l0 + 0x60 ], %o1 <== NOT EXECUTED 40007098: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 <== NOT EXECUTED 4000709c: 40 00 0b 9b call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 400070a0: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400070a4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400070a8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400070ac: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400070b0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 400070b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400070b8: 32 80 00 0c bne,a 400070e8 <== NOT EXECUTED 400070bc: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 400070c0: 40 00 0c b6 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400070c4: 01 00 00 00 nop <== NOT EXECUTED id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 400070c8: 10 80 00 08 b 400070e8 <== NOT EXECUTED 400070cc: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400070d0: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 400070d4: 22 bf ff de be,a 4000704c <== NOT EXECUTED 400070d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 400070dc: 7f ff eb c7 call 40001ff8 400070e0: 01 00 00 00 nop 400070e4: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 400070e8: 40 00 00 98 call 40007348 <_Semaphore_Translate_core_mutex_return_code> 400070ec: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400070f0: 81 c7 e0 08 ret 400070f4: 91 e8 00 08 restore %g0, %o0, %o0 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 400070f8: 80 a0 40 03 cmp %g1, %g3 400070fc: 12 80 00 0d bne 40007130 40007100: 80 8e 60 01 btst 1, %i1 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40007104: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40007108: 80 a0 60 00 cmp %g1, 0 4000710c: 12 80 00 40 bne 4000720c 40007110: 80 a0 60 01 cmp %g1, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40007114: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 40007118: 82 00 60 01 inc %g1 4000711c: c2 24 20 68 st %g1, [ %l0 + 0x68 ] _ISR_Enable( level ); 40007120: 7f ff eb b6 call 40001ff8 40007124: 01 00 00 00 nop id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 40007128: 10 bf ff f0 b 400070e8 4000712c: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40007130: 02 80 00 28 be 400071d0 40007134: c6 04 e2 bc ld [ %l3 + 0x2bc ], %g3 40007138: 7f ff eb b0 call 40001ff8 4000713c: d0 07 bf f0 ld [ %fp + -16 ], %o0 40007140: c4 04 e2 bc ld [ %l3 + 0x2bc ], %g2 40007144: 82 10 20 01 mov 1, %g1 40007148: 10 bf ff e7 b 400070e4 4000714c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007150: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40007154: 82 00 60 01 inc %g1 40007158: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 4000715c: 82 10 20 01 mov 1, %g1 40007160: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; 40007164: f0 24 a0 20 st %i0, [ %l2 + 0x20 ] return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 40007168: a0 04 20 14 add %l0, 0x14, %l0 4000716c: e0 24 a0 44 st %l0, [ %l2 + 0x44 ] executing->Wait.id = id; _ISR_Enable( level ); 40007170: 7f ff eb a2 call 40001ff8 40007174: 01 00 00 00 nop _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 40007178: 90 10 00 10 mov %l0, %o0 4000717c: 92 10 00 1a mov %i2, %o1 40007180: 15 10 00 2b sethi %hi(0x4000ac00), %o2 40007184: 40 00 0d f5 call 4000a958 <_Thread_queue_Enqueue_with_handler> 40007188: 94 12 a2 98 or %o2, 0x298, %o2 ! 4000ae98 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000718c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40007190: 82 00 7f ff add %g1, -1, %g1 40007194: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 40007198: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 4000719c: 80 a0 a0 00 cmp %g2, 0 400071a0: 32 bf ff 80 bne,a 40006fa0 400071a4: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 400071a8: 40 00 0c 7c call 4000a398 <_Thread_Dispatch> 400071ac: 01 00 00 00 nop id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 400071b0: 10 bf ff 7c b 40006fa0 400071b4: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 400071b8: 82 00 7f ff add %g1, -1, %g1 400071bc: c2 24 20 5c st %g1, [ %l0 + 0x5c ] _ISR_Enable( level ); 400071c0: 7f ff eb 8e call 40001ff8 400071c4: 01 00 00 00 nop 400071c8: 10 bf ff 76 b 40006fa0 400071cc: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400071d0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 400071d4: 82 10 20 01 mov 1, %g1 400071d8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 400071dc: f0 20 e0 20 st %i0, [ %g3 + 0x20 ] 400071e0: 84 00 a0 01 inc %g2 400071e4: a0 04 20 14 add %l0, 0x14, %l0 400071e8: c4 24 61 e0 st %g2, [ %l1 + 0x1e0 ] 400071ec: e0 20 e0 44 st %l0, [ %g3 + 0x44 ] 400071f0: 7f ff eb 82 call 40001ff8 400071f4: d0 07 bf f0 ld [ %fp + -16 ], %o0 400071f8: 90 10 00 10 mov %l0, %o0 400071fc: 40 00 03 9a call 40008064 <_CORE_mutex_Seize_interrupt_blocking> 40007200: 92 10 00 1a mov %i2, %o1 id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 40007204: 10 bf ff b9 b 400070e8 40007208: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000720c: 12 bf ff c9 bne 40007130 40007210: 80 8e 60 01 btst 1, %i1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40007214: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40007218: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000721c: 7f ff eb 77 call 40001ff8 <== NOT EXECUTED 40007220: 01 00 00 00 nop <== NOT EXECUTED 40007224: 10 bf ff b1 b 400070e8 <== NOT EXECUTED 40007228: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000722c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007230: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40007234: c0 24 20 68 clr [ %l0 + 0x68 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40007238: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4000723c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007240: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40007244: 7f ff eb 6d call 40001ff8 <== NOT EXECUTED 40007248: 01 00 00 00 nop <== NOT EXECUTED 4000724c: 10 bf ff a7 b 400070e8 <== NOT EXECUTED 40007250: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40007254: 7f ff eb 69 call 40001ff8 <== NOT EXECUTED 40007258: 01 00 00 00 nop <== NOT EXECUTED 4000725c: 10 bf ff a3 b 400070e8 <== NOT EXECUTED 40007260: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED 40007264 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 40007264: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40007268: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000726c: 92 10 00 18 mov %i0, %o1 40007270: 90 12 20 98 or %o0, 0x98, %o0 40007274: 40 00 07 21 call 40008ef8 <_Objects_Get> 40007278: 94 07 bf f4 add %fp, -12, %o2 Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4000727c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007280: 80 a0 60 00 cmp %g1, 0 40007284: 12 80 00 16 bne 400072dc 40007288: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4000728c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007290: 80 88 60 30 btst 0x30, %g1 40007294: 02 80 00 17 be 400072f0 40007298: 92 10 00 18 mov %i0, %o1 mutex_status = _CORE_mutex_Surrender( 4000729c: 94 10 20 00 clr %o2 400072a0: 40 00 03 95 call 400080f4 <_CORE_mutex_Surrender> 400072a4: 90 02 20 14 add %o0, 0x14, %o0 400072a8: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400072ac: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400072b0: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 400072b4: 84 00 bf ff add %g2, -1, %g2 400072b8: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 400072bc: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 400072c0: 80 a0 e0 00 cmp %g3, 0 400072c4: 02 80 00 1e be 4000733c 400072c8: 01 00 00 00 nop &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 400072cc: 40 00 00 1f call 40007348 <_Semaphore_Translate_core_mutex_return_code> 400072d0: 90 10 00 18 mov %i0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400072d4: 81 c7 e0 08 ret 400072d8: 91 e8 00 08 restore %g0, %o0, %o0 Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 400072dc: 08 bf ff fe bleu 400072d4 400072e0: 90 10 20 04 mov 4, %o0 400072e4: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400072e8: 81 c7 e0 08 ret <== NOT EXECUTED 400072ec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 400072f0: 94 10 20 00 clr %o2 400072f4: 40 00 03 ef call 400082b0 <_CORE_semaphore_Surrender> 400072f8: 90 02 20 14 add %o0, 0x14, %o0 400072fc: b0 10 00 08 mov %o0, %i0 40007300: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007304: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40007308: 84 00 bf ff add %g2, -1, %g2 4000730c: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40007310: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40007314: 80 a0 e0 00 cmp %g3, 0 40007318: 02 80 00 06 be 40007330 4000731c: 01 00 00 00 nop &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 40007320: 40 00 00 14 call 40007370 <_Semaphore_Translate_core_semaphore_return_code> 40007324: 90 10 00 18 mov %i0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007328: 81 c7 e0 08 ret 4000732c: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007330: 40 00 0c 1a call 4000a398 <_Thread_Dispatch> 40007334: 01 00 00 00 nop 40007338: 30 bf ff fa b,a 40007320 4000733c: 40 00 0c 17 call 4000a398 <_Thread_Dispatch> 40007340: 01 00 00 00 nop 40007344: 30 bf ff e2 b,a 400072cc 40019674 : */ void rtems_shutdown_executive( uint32_t result ) { 40019674: 9d e3 bf 98 save %sp, -104, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 40019678: 33 10 00 6f sethi %hi(0x4001bc00), %i1 4001967c: c2 06 63 c0 ld [ %i1 + 0x3c0 ], %g1 ! 4001bfc0 <_System_state_Current> 40019680: 80 a0 60 04 cmp %g1, 4 40019684: 02 80 00 0c be 400196b4 40019688: 11 10 00 6a sethi %hi(0x4001a800), %o0 #if defined(__USE_INIT_FINI__) extern void _fini( void ); atexit( _fini ); 4001968c: 7f ff da 31 call 4000ff50 40019690: 90 12 22 04 or %o0, 0x204, %o0 ! 4001aa04 <_fini> * routine which initialized the system. */ RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void ) { _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); 40019694: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40019698: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> 4001969c: 84 10 20 04 mov 4, %g2 400196a0: b0 06 20 e0 add %i0, 0xe0, %i0 400196a4: c4 26 63 c0 st %g2, [ %i1 + 0x3c0 ] 400196a8: 33 10 00 6f sethi %hi(0x4001bc00), %i1 400196ac: 7f ff c9 62 call 4000bc34 <_CPU_Context_switch> 400196b0: 93 ee 61 58 restore %i1, 0x158, %o1 400196b4: 81 c7 e0 08 ret <== NOT EXECUTED 400196b8: 81 e8 00 00 restore <== NOT EXECUTED 40012db0 : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 40012db0: 9d e3 bf 90 save %sp, -112, %sp 40012db4: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 40012db8: 80 a6 60 00 cmp %i1, 0 40012dbc: 02 80 00 1b be 40012e28 40012dc0: b0 10 20 0a mov 0xa, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40012dc4: 80 a2 60 00 cmp %o1, 0 40012dc8: 12 80 00 1a bne 40012e30 40012dcc: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012dd0: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40012dd4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40012dd8: 82 00 60 01 inc %g1 40012ddc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40012de0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40012de4: e0 00 63 cc ld [ %g1 + 0x3cc ], %l0 ! 40035fcc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40012de8: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 40012dec: f0 04 21 6c ld [ %l0 + 0x16c ], %i0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 40012df0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 40012df4: 80 a0 60 00 cmp %g1, 0 40012df8: 32 80 00 2c bne,a 40012ea8 40012dfc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012e00: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012e04: b0 10 20 0b mov 0xb, %i0 40012e08: 82 00 7f ff add %g1, -1, %g1 40012e0c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012e10: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012e14: 80 a0 a0 00 cmp %g2, 0 40012e18: 12 80 00 0b bne 40012e44 40012e1c: 01 00 00 00 nop _Thread_Dispatch(); 40012e20: 40 00 13 70 call 40017be0 <_Thread_Dispatch> 40012e24: 01 00 00 00 nop 40012e28: 81 c7 e0 08 ret 40012e2c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40012e30: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40012e34: 80 a0 a0 04 cmp %g2, 4 40012e38: 08 80 00 05 bleu 40012e4c 40012e3c: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40012e40: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012e44: 81 c7 e0 08 ret 40012e48: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40012e4c: 80 a0 60 01 cmp %g1, 1 40012e50: 12 bf ff f6 bne 40012e28 40012e54: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40012e58: 83 28 a0 02 sll %g2, 2, %g1 40012e5c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40012e60: 84 10 a2 50 or %g2, 0x250, %g2 ! 40035e50 <_Objects_Information_table> 40012e64: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40012e68: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40012e6c: 80 a2 20 00 cmp %o0, 0 40012e70: 02 bf ff f5 be 40012e44 40012e74: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40012e78: 40 00 0e 32 call 40016740 <_Objects_Get> 40012e7c: 94 07 bf f4 add %fp, -12, %o2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40012e80: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012e84: a0 10 00 08 mov %o0, %l0 40012e88: 80 a0 60 00 cmp %g1, 0 40012e8c: 02 bf ff d8 be 40012dec 40012e90: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40012e94: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40012e98: 18 bf ff e4 bgu 40012e28 <== NOT EXECUTED 40012e9c: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40012ea0: 81 c7 e0 08 ret <== NOT EXECUTED 40012ea4: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 40012ea8: 80 a0 60 00 cmp %g1, 0 40012eac: 02 80 00 19 be 40012f10 40012eb0: 01 00 00 00 nop rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40012eb4: 7f ff df 95 call 4000ad08 40012eb8: 01 00 00 00 nop *signal_set |= signals; 40012ebc: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 40012ec0: 82 10 40 19 or %g1, %i1, %g1 40012ec4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( _level ); 40012ec8: 7f ff df 94 call 4000ad18 40012ecc: 01 00 00 00 nop _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = TRUE; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40012ed0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40012ed4: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 40035fb4 <_ISR_Nest_level> if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = TRUE; 40012ed8: 86 10 20 01 mov 1, %g3 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40012edc: 80 a0 a0 00 cmp %g2, 0 40012ee0: 02 80 00 09 be 40012f04 40012ee4: c6 24 20 78 st %g3, [ %l0 + 0x78 ] 40012ee8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40012eec: c4 00 63 cc ld [ %g1 + 0x3cc ], %g2 ! 40035fcc <_Thread_Executing> <== NOT EXECUTED 40012ef0: 80 a4 00 02 cmp %l0, %g2 <== NOT EXECUTED 40012ef4: 12 80 00 04 bne 40012f04 <== NOT EXECUTED 40012ef8: 01 00 00 00 nop <== NOT EXECUTED _ISR_Signals_to_thread_executing = TRUE; 40012efc: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 40012f00: c6 20 60 78 st %g3, [ %g1 + 0x78 ] ! 40036078 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012f04: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012f08: 10 bf ff c0 b 40012e08 40012f0c: b0 10 20 00 clr %i0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40012f10: 7f ff df 7e call 4000ad08 40012f14: 01 00 00 00 nop *signal_set |= signals; 40012f18: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 40012f1c: 82 10 40 19 or %g1, %i1, %g1 40012f20: c2 26 20 58 st %g1, [ %i0 + 0x58 ] _ISR_Enable( _level ); 40012f24: 7f ff df 7d call 4000ad18 40012f28: 01 00 00 00 nop 40012f2c: 30 bf ff f6 b,a 40012f04 40007504 : */ rtems_status_code rtems_task_delete( Objects_Id id ) { 40007504: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40007508: 92 96 20 00 orcc %i0, 0, %o1 4000750c: 12 80 00 20 bne 4000758c 40007510: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007514: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40007518: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000751c: 82 00 60 01 inc %g1 40007520: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007524: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007528: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> 4000752c: 07 10 00 6f sethi %hi(0x4001bc00), %g3 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40007530: c0 27 bf f4 clr [ %fp + -12 ] 40007534: a2 10 e1 40 or %g3, 0x140, %l1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_information = _Objects_Get_information( the_thread->Object.id ); 40007538: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000753c: 85 30 60 16 srl %g1, 0x16, %g2 40007540: 84 08 a0 1c and %g2, 0x1c, %g2 40007544: c6 04 40 02 ld [ %l1 + %g2 ], %g3 40007548: 83 30 60 1b srl %g1, 0x1b, %g1 4000754c: 83 28 60 02 sll %g1, 2, %g1 40007550: d0 00 c0 01 ld [ %g3 + %g1 ], %o0 if ( !the_information ) { 40007554: 80 a2 20 00 cmp %o0, 0 40007558: 12 80 00 13 bne 400075a4 4000755c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007560: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 <== NOT EXECUTED 40007564: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007568: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] <== NOT EXECUTED 4000756c: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 <== NOT EXECUTED 40007570: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40007574: 12 80 00 04 bne 40007584 <== NOT EXECUTED 40007578: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000757c: 40 00 0b 87 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40007580: 01 00 00 00 nop <== NOT EXECUTED 40007584: 81 c7 e0 08 ret 40007588: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000758c: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007590: 80 a0 a0 04 cmp %g2, 4 40007594: 08 80 00 1b bleu 40007600 40007598: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000759c: 81 c7 e0 08 ret <== NOT EXECUTED 400075a0: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INVALID_ID; /* This should never happen if _Thread_Get() works right */ } _Thread_Close( the_information, the_thread ); 400075a4: 40 00 0a ff call 4000a1a0 <_Thread_Close> 400075a8: 92 10 00 18 mov %i0, %o1 400075ac: c4 06 20 08 ld [ %i0 + 8 ], %g2 400075b0: 92 10 00 18 mov %i0, %o1 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 400075b4: 83 30 a0 16 srl %g2, 0x16, %g1 400075b8: 82 08 60 1c and %g1, 0x1c, %g1 400075bc: c6 04 40 01 ld [ %l1 + %g1 ], %g3 400075c0: 85 30 a0 1b srl %g2, 0x1b, %g2 400075c4: 85 28 a0 02 sll %g2, 2, %g2 400075c8: 40 00 06 09 call 40008dec <_Objects_Free> 400075cc: d0 00 c0 02 ld [ %g3 + %g2 ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400075d0: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 400075d4: b0 10 20 00 clr %i0 400075d8: 82 00 7f ff add %g1, -1, %g1 400075dc: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 400075e0: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 400075e4: 80 a0 a0 00 cmp %g2, 0 400075e8: 12 80 00 04 bne 400075f8 400075ec: 01 00 00 00 nop _Thread_Dispatch(); 400075f0: 40 00 0b 6a call 4000a398 <_Thread_Dispatch> 400075f4: 01 00 00 00 nop 400075f8: 81 c7 e0 08 ret 400075fc: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007600: 80 a0 60 01 cmp %g1, 1 40007604: 12 bf ff e0 bne 40007584 40007608: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000760c: 85 28 a0 02 sll %g2, 2, %g2 40007610: 07 10 00 6f sethi %hi(0x4001bc00), %g3 40007614: a2 10 e1 40 or %g3, 0x140, %l1 ! 4001bd40 <_Objects_Information_table> 40007618: c2 04 40 02 ld [ %l1 + %g2 ], %g1 4000761c: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40007620: 80 a2 20 00 cmp %o0, 0 40007624: 02 bf ff f5 be 400075f8 40007628: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000762c: 40 00 06 33 call 40008ef8 <_Objects_Get> 40007630: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007634: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007638: b0 10 00 08 mov %o0, %i0 4000763c: 80 a0 60 00 cmp %g1, 0 40007640: 02 bf ff be be 40007538 40007644: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40007648: 80 a0 60 02 cmp %g1, 2 4000764c: 18 bf ff ce bgu 40007584 40007650: b0 10 20 19 mov 0x19, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007654: 81 c7 e0 08 ret 40007658: 91 e8 20 04 restore %g0, 4, %o0 40008e10 : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 40008e10: 9d e3 bf 90 save %sp, -112, %sp 40008e14: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !note ) 40008e18: 80 a6 a0 00 cmp %i2, 0 40008e1c: 02 80 00 3b be 40008f08 40008e20: b0 10 20 09 mov 9, %i0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 40008e24: 80 a6 60 0f cmp %i1, 0xf 40008e28: 18 80 00 38 bgu 40008f08 40008e2c: b0 10 20 0a mov 0xa, %i0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40008e30: 80 a2 60 00 cmp %o1, 0 40008e34: 12 80 00 09 bne 40008e58 40008e38: 07 10 00 86 sethi %hi(0x40021800), %g3 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 40008e3c: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 ! 4002182c <_Thread_Executing> 40008e40: 87 2e 60 02 sll %i1, 2, %g3 40008e44: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 40008e48: c2 00 80 03 ld [ %g2 + %g3 ], %g1 40008e4c: c2 26 80 00 st %g1, [ %i2 ] 40008e50: 81 c7 e0 08 ret 40008e54: 91 e8 20 00 restore %g0, 0, %o0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40008e58: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 40008e5c: c4 00 60 08 ld [ %g1 + 8 ], %g2 40008e60: 80 a2 40 02 cmp %o1, %g2 40008e64: 22 bf ff f8 be,a 40008e44 40008e68: 87 2e 60 02 sll %i1, 2, %g3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008e6c: 83 32 60 18 srl %o1, 0x18, %g1 40008e70: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008e74: 80 a0 a0 04 cmp %g2, 4 40008e78: 08 80 00 04 bleu 40008e88 40008e7c: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008e80: 81 c7 e0 08 ret <== NOT EXECUTED 40008e84: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008e88: 80 a0 60 01 cmp %g1, 1 40008e8c: 12 80 00 1f bne 40008f08 40008e90: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008e94: 83 28 a0 02 sll %g2, 2, %g1 40008e98: 05 10 00 85 sethi %hi(0x40021400), %g2 40008e9c: 84 10 a2 b0 or %g2, 0x2b0, %g2 ! 400216b0 <_Objects_Information_table> 40008ea0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40008ea4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40008ea8: 80 a2 20 00 cmp %o0, 0 40008eac: 02 80 00 17 be 40008f08 40008eb0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008eb4: 40 00 07 79 call 4000ac98 <_Objects_Get> 40008eb8: 94 07 bf f4 add %fp, -12, %o2 *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008ebc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008ec0: 80 a0 60 00 cmp %g1, 0 40008ec4: 12 80 00 13 bne 40008f10 40008ec8: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 40008ecc: c6 02 21 6c ld [ %o0 + 0x16c ], %g3 40008ed0: 83 2e 60 02 sll %i1, 2, %g1 40008ed4: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 40008ed8: c4 26 80 00 st %g2, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008edc: 07 10 00 85 sethi %hi(0x40021400), %g3 40008ee0: c2 00 e3 50 ld [ %g3 + 0x350 ], %g1 ! 40021750 <_Thread_Dispatch_disable_level> 40008ee4: b0 10 20 00 clr %i0 40008ee8: 82 00 7f ff add %g1, -1, %g1 40008eec: c2 20 e3 50 st %g1, [ %g3 + 0x350 ] 40008ef0: c4 00 e3 50 ld [ %g3 + 0x350 ], %g2 40008ef4: 80 a0 a0 00 cmp %g2, 0 40008ef8: 12 80 00 04 bne 40008f08 40008efc: 01 00 00 00 nop _Thread_Dispatch(); 40008f00: 40 00 0c 52 call 4000c048 <_Thread_Dispatch> 40008f04: 01 00 00 00 nop 40008f08: 81 c7 e0 08 ret 40008f0c: 81 e8 00 00 restore *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008f10: 18 bf ff fe bgu 40008f08 <== NOT EXECUTED 40008f14: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40008f18: 81 c7 e0 08 ret <== NOT EXECUTED 40008f1c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40007cec : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 40007cec: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40007cf0: 92 96 20 00 orcc %i0, 0, %o1 40007cf4: 12 80 00 19 bne 40007d58 40007cf8: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007cfc: 05 10 00 7d sethi %hi(0x4001f400), %g2 <== NOT EXECUTED 40007d00: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 4001f5d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007d04: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007d08: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007d0c: 03 10 00 7d sethi %hi(0x4001f400), %g1 <== NOT EXECUTED 40007d10: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0 ! 4001f6ac <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40007d14: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 40007d18: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007d1c: 80 88 60 02 btst 2, %g1 40007d20: 02 80 00 15 be 40007d74 40007d24: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d28: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 40007d2c: b0 10 20 0f mov 0xf, %i0 40007d30: 82 00 7f ff add %g1, -1, %g1 40007d34: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] 40007d38: c4 00 a1 d0 ld [ %g2 + 0x1d0 ], %g2 40007d3c: 80 a0 a0 00 cmp %g2, 0 40007d40: 12 80 00 0b bne 40007d6c 40007d44: 01 00 00 00 nop _Thread_Dispatch(); 40007d48: 40 00 0b 74 call 4000ab18 <_Thread_Dispatch> 40007d4c: 01 00 00 00 nop 40007d50: 81 c7 e0 08 ret 40007d54: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007d58: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007d5c: 80 a0 a0 04 cmp %g2, 4 40007d60: 08 80 00 08 bleu 40007d80 40007d64: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007d68: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007d6c: 81 c7 e0 08 ret <== NOT EXECUTED 40007d70: 81 e8 00 00 restore <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d74: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 40007d78: 10 bf ff ee b 40007d30 40007d7c: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007d80: 80 a0 60 01 cmp %g1, 1 40007d84: 12 bf ff f3 bne 40007d50 40007d88: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007d8c: 83 28 a0 02 sll %g2, 2, %g1 40007d90: 05 10 00 7d sethi %hi(0x4001f400), %g2 40007d94: 84 10 a1 30 or %g2, 0x130, %g2 ! 4001f530 <_Objects_Information_table> 40007d98: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40007d9c: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007da0: 80 a2 20 00 cmp %o0, 0 40007da4: 02 bf ff f2 be 40007d6c 40007da8: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007dac: 40 00 06 6f call 40009768 <_Objects_Get> 40007db0: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007db4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007db8: 80 a0 60 00 cmp %g1, 0 40007dbc: 02 bf ff d7 be 40007d18 40007dc0: 05 10 00 7d sethi %hi(0x4001f400), %g2 40007dc4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007dc8: 18 bf ff e2 bgu 40007d50 <== NOT EXECUTED 40007dcc: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007dd0: 81 c7 e0 08 ret <== NOT EXECUTED 40007dd4: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 400082c8 : rtems_status_code rtems_task_restart( Objects_Id id, uint32_t argument ) { 400082c8: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 400082cc: 92 96 20 00 orcc %i0, 0, %o1 400082d0: 12 80 00 1b bne 4000833c 400082d4: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400082d8: 21 10 00 7e sethi %hi(0x4001f800), %l0 400082dc: c2 04 22 80 ld [ %l0 + 0x280 ], %g1 ! 4001fa80 <_Thread_Dispatch_disable_level> 400082e0: 82 00 60 01 inc %g1 400082e4: c2 24 22 80 st %g1, [ %l0 + 0x280 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400082e8: 03 10 00 7e sethi %hi(0x4001f800), %g1 400082ec: d0 00 63 5c ld [ %g1 + 0x35c ], %o0 ! 4001fb5c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 400082f0: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 400082f4: 94 10 00 19 mov %i1, %o2 400082f8: 40 00 0e 4b call 4000bc24 <_Thread_Restart> 400082fc: 92 10 20 00 clr %o1 40008300: 80 a2 20 00 cmp %o0, 0 40008304: 12 80 00 15 bne 40008358 40008308: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000830c: c2 04 22 80 ld [ %l0 + 0x280 ], %g1 40008310: b0 10 20 0e mov 0xe, %i0 40008314: 82 00 7f ff add %g1, -1, %g1 40008318: c2 24 22 80 st %g1, [ %l0 + 0x280 ] 4000831c: c4 04 22 80 ld [ %l0 + 0x280 ], %g2 40008320: 80 a0 a0 00 cmp %g2, 0 40008324: 12 80 00 0b bne 40008350 40008328: 01 00 00 00 nop _Thread_Dispatch(); 4000832c: 40 00 0b 48 call 4000b04c <_Thread_Dispatch> 40008330: 01 00 00 00 nop 40008334: 81 c7 e0 08 ret 40008338: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000833c: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008340: 80 a0 a0 04 cmp %g2, 4 40008344: 08 80 00 08 bleu 40008364 40008348: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000834c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008350: 81 c7 e0 08 ret <== NOT EXECUTED 40008354: 81 e8 00 00 restore <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008358: c2 04 22 80 ld [ %l0 + 0x280 ], %g1 4000835c: 10 bf ff ee b 40008314 40008360: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008364: 80 a0 60 01 cmp %g1, 1 40008368: 12 bf ff f3 bne 40008334 4000836c: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008370: 83 28 a0 02 sll %g2, 2, %g1 40008374: 05 10 00 7e sethi %hi(0x4001f800), %g2 40008378: 84 10 a1 e0 or %g2, 0x1e0, %g2 ! 4001f9e0 <_Objects_Information_table> 4000837c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40008380: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40008384: 80 a2 20 00 cmp %o0, 0 40008388: 02 bf ff f2 be 40008350 4000838c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008390: 40 00 06 43 call 40009c9c <_Objects_Get> 40008394: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008398: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000839c: 80 a0 60 00 cmp %g1, 0 400083a0: 02 bf ff d5 be 400082f4 400083a4: 21 10 00 7e sethi %hi(0x4001f800), %l0 400083a8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400083ac: 18 bf ff e2 bgu 40008334 <== NOT EXECUTED 400083b0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400083b4: 81 c7 e0 08 ret <== NOT EXECUTED 400083b8: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40008d84 : */ rtems_status_code rtems_task_resume( Objects_Id id ) { 40008d84: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40008d88: 92 96 20 00 orcc %i0, 0, %o1 40008d8c: 12 80 00 19 bne 40008df0 40008d90: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008d94: 21 10 00 a2 sethi %hi(0x40028800), %l0 40008d98: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 ! 40028b00 <_Thread_Dispatch_disable_level> 40008d9c: 82 00 60 01 inc %g1 40008da0: c2 24 23 00 st %g1, [ %l0 + 0x300 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008da4: 03 10 00 a2 sethi %hi(0x40028800), %g1 40008da8: d0 00 63 dc ld [ %g1 + 0x3dc ], %o0 ! 40028bdc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40008dac: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 40008db0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40008db4: 80 88 60 02 btst 2, %g1 40008db8: 12 80 00 2b bne 40008e64 40008dbc: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008dc0: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40008dc4: b0 10 20 0e mov 0xe, %i0 40008dc8: 82 00 7f ff add %g1, -1, %g1 40008dcc: c2 24 23 00 st %g1, [ %l0 + 0x300 ] 40008dd0: c4 04 23 00 ld [ %l0 + 0x300 ], %g2 40008dd4: 80 a0 a0 00 cmp %g2, 0 40008dd8: 12 80 00 0b bne 40008e04 40008ddc: 01 00 00 00 nop _Thread_Dispatch(); 40008de0: 40 00 0c 2d call 4000be94 <_Thread_Dispatch> 40008de4: 01 00 00 00 nop 40008de8: 81 c7 e0 08 ret 40008dec: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008df0: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008df4: 80 a0 a0 04 cmp %g2, 4 40008df8: 08 80 00 05 bleu 40008e0c 40008dfc: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40008e00: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008e04: 81 c7 e0 08 ret 40008e08: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008e0c: 80 a0 60 01 cmp %g1, 1 40008e10: 12 bf ff f6 bne 40008de8 40008e14: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008e18: 83 28 a0 02 sll %g2, 2, %g1 40008e1c: 05 10 00 a2 sethi %hi(0x40028800), %g2 40008e20: 84 10 a2 60 or %g2, 0x260, %g2 ! 40028a60 <_Objects_Information_table> 40008e24: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40008e28: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40008e2c: 80 a2 20 00 cmp %o0, 0 40008e30: 02 bf ff f5 be 40008e04 40008e34: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008e38: 40 00 07 2b call 4000aae4 <_Objects_Get> 40008e3c: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008e40: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008e44: 80 a0 60 00 cmp %g1, 0 40008e48: 02 bf ff da be 40008db0 40008e4c: 21 10 00 a2 sethi %hi(0x40028800), %l0 40008e50: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008e54: 18 bf ff e5 bgu 40008de8 <== NOT EXECUTED 40008e58: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40008e5c: 81 c7 e0 08 ret <== NOT EXECUTED 40008e60: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, TRUE ); 40008e64: 40 00 0f 18 call 4000cac4 <_Thread_Resume> 40008e68: 92 10 20 01 mov 1, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008e6c: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40008e70: 10 bf ff d6 b 40008dc8 40008e74: b0 10 20 00 clr %i0 400090f0 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400090f0: 9d e3 bf 90 save %sp, -112, %sp 400090f4: 92 10 00 18 mov %i0, %o1 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 400090f8: 80 a6 60 0f cmp %i1, 0xf 400090fc: 18 80 00 36 bgu 400091d4 40009100: b0 10 20 0a mov 0xa, %i0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40009104: 80 a2 60 00 cmp %o1, 0 40009108: 12 80 00 08 bne 40009128 4000910c: 07 10 00 86 sethi %hi(0x40021800), %g3 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40009110: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 ! 4002182c <_Thread_Executing> <== NOT EXECUTED 40009114: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 <== NOT EXECUTED 40009118: 87 2e 60 02 sll %i1, 2, %g3 <== NOT EXECUTED 4000911c: f4 20 80 03 st %i2, [ %g2 + %g3 ] <== NOT EXECUTED 40009120: 81 c7 e0 08 ret <== NOT EXECUTED 40009124: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40009128: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 4000912c: c4 00 60 08 ld [ %g1 + 8 ], %g2 40009130: 80 a2 40 02 cmp %o1, %g2 40009134: 22 bf ff f9 be,a 40009118 40009138: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 <== NOT EXECUTED 4000913c: 83 32 60 18 srl %o1, 0x18, %g1 40009140: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40009144: 80 a0 a0 04 cmp %g2, 4 40009148: 08 80 00 04 bleu 40009158 4000914c: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009150: 81 c7 e0 08 ret <== NOT EXECUTED 40009154: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40009158: 80 a0 60 01 cmp %g1, 1 4000915c: 12 80 00 1e bne 400091d4 40009160: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40009164: 83 28 a0 02 sll %g2, 2, %g1 40009168: 05 10 00 85 sethi %hi(0x40021400), %g2 4000916c: 84 10 a2 b0 or %g2, 0x2b0, %g2 ! 400216b0 <_Objects_Information_table> 40009170: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40009174: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40009178: 80 a2 20 00 cmp %o0, 0 4000917c: 02 80 00 16 be 400091d4 40009180: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40009184: 40 00 06 c5 call 4000ac98 <_Objects_Get> 40009188: 94 07 bf f4 add %fp, -12, %o2 api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000918c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009190: 80 a0 60 00 cmp %g1, 0 40009194: 12 80 00 12 bne 400091dc 40009198: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 4000919c: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 400091a0: 83 2e 60 02 sll %i1, 2, %g1 400091a4: f4 20 80 01 st %i2, [ %g2 + %g1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400091a8: 07 10 00 85 sethi %hi(0x40021400), %g3 400091ac: c2 00 e3 50 ld [ %g3 + 0x350 ], %g1 ! 40021750 <_Thread_Dispatch_disable_level> 400091b0: b0 10 20 00 clr %i0 400091b4: 82 00 7f ff add %g1, -1, %g1 400091b8: c2 20 e3 50 st %g1, [ %g3 + 0x350 ] 400091bc: c4 00 e3 50 ld [ %g3 + 0x350 ], %g2 400091c0: 80 a0 a0 00 cmp %g2, 0 400091c4: 12 80 00 04 bne 400091d4 400091c8: 01 00 00 00 nop _Thread_Dispatch(); 400091cc: 40 00 0b 9f call 4000c048 <_Thread_Dispatch> 400091d0: 01 00 00 00 nop 400091d4: 81 c7 e0 08 ret 400091d8: 81 e8 00 00 restore api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 400091dc: 18 bf ff fe bgu 400091d4 <== NOT EXECUTED 400091e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 400091e4: 81 c7 e0 08 ret <== NOT EXECUTED 400091e8: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4000e6d8 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4000e6d8: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4000e6dc: 80 a6 60 00 cmp %i1, 0 4000e6e0: 02 80 00 06 be 4000e6f8 4000e6e4: 92 10 00 18 mov %i0, %o1 4000e6e8: 82 06 7f ff add %i1, -1, %g1 4000e6ec: 80 a0 60 fe cmp %g1, 0xfe 4000e6f0: 18 80 00 26 bgu 4000e788 4000e6f4: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4000e6f8: 80 a6 a0 00 cmp %i2, 0 4000e6fc: 02 80 00 23 be 4000e788 4000e700: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000e704: 80 a2 60 00 cmp %o1, 0 4000e708: 12 80 00 22 bne 4000e790 4000e70c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e710: 21 10 00 b6 sethi %hi(0x4002d800), %l0 4000e714: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 4000e718: 82 00 60 01 inc %g1 4000e71c: c2 24 23 30 st %g1, [ %l0 + 0x330 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000e720: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 4000e724: d0 00 60 0c ld [ %g1 + 0xc ], %o0 ! 4002dc0c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000e728: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: /* XXX convert from core priority */ *old_priority = the_thread->current_priority; 4000e72c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4000e730: 80 a6 60 00 cmp %i1, 0 4000e734: 02 80 00 0d be 4000e768 4000e738: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000e73c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000e740: 80 a0 60 00 cmp %g1, 0 4000e744: 02 80 00 06 be 4000e75c 4000e748: f2 22 20 18 st %i1, [ %o0 + 0x18 ] 4000e74c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000e750: 80 a6 40 01 cmp %i1, %g1 4000e754: 1a 80 00 05 bcc 4000e768 4000e758: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 4000e75c: 92 10 00 19 mov %i1, %o1 4000e760: 40 00 0a 7f call 4001115c <_Thread_Change_priority> 4000e764: 94 10 20 00 clr %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000e768: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 4000e76c: b0 10 20 00 clr %i0 4000e770: 82 00 7f ff add %g1, -1, %g1 4000e774: c2 24 23 30 st %g1, [ %l0 + 0x330 ] 4000e778: c4 04 23 30 ld [ %l0 + 0x330 ], %g2 4000e77c: 80 a0 a0 00 cmp %g2, 0 4000e780: 02 80 00 0a be 4000e7a8 4000e784: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000e788: 81 c7 e0 08 ret 4000e78c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000e790: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000e794: 80 a0 a0 04 cmp %g2, 4 4000e798: 08 80 00 08 bleu 4000e7b8 4000e79c: 83 32 60 1b srl %o1, 0x1b, %g1 4000e7a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000e7a4: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000e7a8: 40 00 0b 91 call 400115ec <_Thread_Dispatch> 4000e7ac: 01 00 00 00 nop 4000e7b0: 81 c7 e0 08 ret 4000e7b4: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000e7b8: 80 a0 60 01 cmp %g1, 1 4000e7bc: 12 bf ff f3 bne 4000e788 4000e7c0: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000e7c4: 83 28 a0 02 sll %g2, 2, %g1 4000e7c8: 05 10 00 b6 sethi %hi(0x4002d800), %g2 4000e7cc: 84 10 a2 90 or %g2, 0x290, %g2 ! 4002da90 <_Objects_Information_table> 4000e7d0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000e7d4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000e7d8: 80 a2 20 00 cmp %o0, 0 4000e7dc: 02 bf ff f5 be 4000e7b0 4000e7e0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000e7e4: 40 00 06 5a call 4001014c <_Objects_Get> 4000e7e8: 94 07 bf f4 add %fp, -12, %o2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000e7ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000e7f0: 80 a0 60 00 cmp %g1, 0 4000e7f4: 02 bf ff ce be 4000e72c 4000e7f8: 21 10 00 b6 sethi %hi(0x4002d800), %l0 4000e7fc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000e800: 18 bf ff e2 bgu 4000e788 <== NOT EXECUTED 4000e804: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000e808: 81 c7 e0 08 ret <== NOT EXECUTED 4000e80c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40007798 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 40007798: 9d e3 bf 90 save %sp, -112, %sp 4000779c: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 400077a0: 80 a6 60 00 cmp %i1, 0 400077a4: 02 80 00 1e be 4000781c 400077a8: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 400077ac: 80 a2 60 00 cmp %o1, 0 400077b0: 12 80 00 1d bne 40007824 400077b4: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400077b8: 21 10 00 6f sethi %hi(0x4001bc00), %l0 400077bc: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400077c0: 82 00 60 01 inc %g1 400077c4: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400077c8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400077cc: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 4001bebc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 400077d0: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Start( 400077d4: 94 10 00 19 mov %i1, %o2 400077d8: 98 10 00 1a mov %i2, %o4 400077dc: 92 10 20 00 clr %o1 400077e0: 40 00 0e c9 call 4000b304 <_Thread_Start> 400077e4: 96 10 20 00 clr %o3 400077e8: 80 a2 20 00 cmp %o0, 0 400077ec: 12 80 00 2b bne 40007898 400077f0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400077f4: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 400077f8: b0 10 20 0e mov 0xe, %i0 400077fc: 82 00 7f ff add %g1, -1, %g1 40007800: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 40007804: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 40007808: 80 a0 a0 00 cmp %g2, 0 4000780c: 12 80 00 0b bne 40007838 40007810: 01 00 00 00 nop _Thread_Dispatch(); 40007814: 40 00 0a e1 call 4000a398 <_Thread_Dispatch> 40007818: 01 00 00 00 nop 4000781c: 81 c7 e0 08 ret 40007820: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007824: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007828: 80 a0 a0 04 cmp %g2, 4 4000782c: 08 80 00 05 bleu 40007840 40007830: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007834: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007838: 81 c7 e0 08 ret 4000783c: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007840: 80 a0 60 01 cmp %g1, 1 40007844: 12 bf ff f6 bne 4000781c 40007848: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000784c: 83 28 a0 02 sll %g2, 2, %g1 40007850: 05 10 00 6f sethi %hi(0x4001bc00), %g2 40007854: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 40007858: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000785c: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007860: 80 a2 20 00 cmp %o0, 0 40007864: 02 bf ff f5 be 40007838 40007868: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000786c: 40 00 05 a3 call 40008ef8 <_Objects_Get> 40007870: 94 07 bf f4 add %fp, -12, %o2 if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007874: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007878: 80 a0 60 00 cmp %g1, 0 4000787c: 02 bf ff d6 be 400077d4 40007880: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40007884: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007888: 18 bf ff e5 bgu 4000781c <== NOT EXECUTED 4000788c: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007890: 81 c7 e0 08 ret <== NOT EXECUTED 40007894: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007898: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 4000789c: 10 bf ff d8 b 400077fc 400078a0: b0 10 20 00 clr %i0 40008f84 : */ rtems_status_code rtems_task_suspend( Objects_Id id ) { 40008f84: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40008f88: 92 96 20 00 orcc %i0, 0, %o1 40008f8c: 12 80 00 19 bne 40008ff0 40008f90: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008f94: 21 10 00 a2 sethi %hi(0x40028800), %l0 40008f98: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 ! 40028b00 <_Thread_Dispatch_disable_level> 40008f9c: 82 00 60 01 inc %g1 40008fa0: c2 24 23 00 st %g1, [ %l0 + 0x300 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008fa4: 03 10 00 a2 sethi %hi(0x40028800), %g1 40008fa8: d0 00 63 dc ld [ %g1 + 0x3dc ], %o0 ! 40028bdc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40008fac: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 40008fb0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40008fb4: 80 88 60 02 btst 2, %g1 40008fb8: 02 80 00 2b be 40009064 40008fbc: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008fc0: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40008fc4: b0 10 20 0f mov 0xf, %i0 40008fc8: 82 00 7f ff add %g1, -1, %g1 40008fcc: c2 24 23 00 st %g1, [ %l0 + 0x300 ] 40008fd0: c4 04 23 00 ld [ %l0 + 0x300 ], %g2 40008fd4: 80 a0 a0 00 cmp %g2, 0 40008fd8: 12 80 00 0b bne 40009004 40008fdc: 01 00 00 00 nop _Thread_Dispatch(); 40008fe0: 40 00 0b ad call 4000be94 <_Thread_Dispatch> 40008fe4: 01 00 00 00 nop 40008fe8: 81 c7 e0 08 ret 40008fec: 81 e8 00 00 restore 40008ff0: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008ff4: 80 a0 a0 04 cmp %g2, 4 40008ff8: 08 80 00 05 bleu 4000900c 40008ffc: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009000: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009004: 81 c7 e0 08 ret <== NOT EXECUTED 40009008: 81 e8 00 00 restore <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000900c: 80 a0 60 01 cmp %g1, 1 40009010: 12 bf ff f6 bne 40008fe8 40009014: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40009018: 83 28 a0 02 sll %g2, 2, %g1 4000901c: 05 10 00 a2 sethi %hi(0x40028800), %g2 40009020: 84 10 a2 60 or %g2, 0x260, %g2 ! 40028a60 <_Objects_Information_table> 40009024: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40009028: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000902c: 80 a2 20 00 cmp %o0, 0 40009030: 02 bf ff f5 be 40009004 40009034: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40009038: 40 00 06 ab call 4000aae4 <_Objects_Get> 4000903c: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40009040: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009044: 80 a0 60 00 cmp %g1, 0 40009048: 02 bf ff da be 40008fb0 4000904c: 21 10 00 a2 sethi %hi(0x40028800), %l0 40009050: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40009054: 18 bf ff e5 bgu 40008fe8 <== NOT EXECUTED 40009058: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000905c: 81 c7 e0 08 ret <== NOT EXECUTED 40009060: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 40009064: 40 00 0f d7 call 4000cfc0 <_Thread_Suspend> 40009068: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000906c: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40009070: 10 bf ff d6 b 40008fc8 40009074: b0 10 20 00 clr %i0 4001be00 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 4001be00: 9d e3 bf 90 save %sp, -112, %sp 4001be04: 92 10 00 18 mov %i0, %o1 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 4001be08: 80 a6 60 00 cmp %i1, 0 4001be0c: 02 80 00 22 be 4001be94 4001be10: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4001be14: 80 a2 60 00 cmp %o1, 0 4001be18: 12 80 00 21 bne 4001be9c 4001be1c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001be20: 21 10 00 ff sethi %hi(0x4003fc00), %l0 4001be24: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> 4001be28: 82 00 60 01 inc %g1 4001be2c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001be30: 03 10 00 ff sethi %hi(0x4003fc00), %g1 4001be34: f0 00 61 2c ld [ %g1 + 0x12c ], %i0 ! 4003fd2c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4001be38: c0 27 bf f4 clr [ %fp + -12 ] /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 4001be3c: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 while (tvp) { 4001be40: 80 a0 a0 00 cmp %g2, 0 4001be44: 32 80 00 08 bne,a 4001be64 4001be48: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4001be4c: 10 80 00 1a b 4001beb4 4001be50: 11 10 00 ff sethi %hi(0x4003fc00), %o0 4001be54: 84 90 60 00 orcc %g1, 0, %g2 <== NOT EXECUTED 4001be58: 02 80 00 17 be 4001beb4 <== NOT EXECUTED 4001be5c: 11 10 00 ff sethi %hi(0x4003fc00), %o0 <== NOT EXECUTED if (tvp->ptr == ptr) { 4001be60: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4001be64: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001be68: 32 bf ff fb bne,a 4001be54 <== NOT EXECUTED 4001be6c: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED tvp->dtor = dtor; 4001be70: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001be74: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 _Thread_Dispatch(); 4001be78: b0 10 20 00 clr %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001be7c: 82 00 7f ff add %g1, -1, %g1 4001be80: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 4001be84: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4001be88: 80 a0 a0 00 cmp %g2, 0 4001be8c: 02 80 00 1c be 4001befc 4001be90: 01 00 00 00 nop the_thread->task_variables = new; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001be94: 81 c7 e0 08 ret <== NOT EXECUTED 4001be98: 81 e8 00 00 restore <== NOT EXECUTED 4001be9c: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4001bea0: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001bea4: 08 80 00 21 bleu 4001bf28 <== NOT EXECUTED 4001bea8: 83 32 60 1b srl %o1, 0x1b, %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001beac: 81 c7 e0 08 ret <== NOT EXECUTED 4001beb0: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4001beb4: 92 10 20 14 mov 0x14, %o1 4001beb8: 7f ff bf 93 call 4000bd04 <_Heap_Allocate> 4001bebc: 90 12 20 9c or %o0, 0x9c, %o0 * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 4001bec0: 80 a2 20 00 cmp %o0, 0 4001bec4: 32 80 00 12 bne,a 4001bf0c 4001bec8: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001becc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4001bed0: b0 10 20 1a mov 0x1a, %i0 <== NOT EXECUTED 4001bed4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001bed8: c2 24 20 50 st %g1, [ %l0 + 0x50 ] <== NOT EXECUTED 4001bedc: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 4001bee0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001bee4: 12 80 00 08 bne 4001bf04 <== NOT EXECUTED 4001bee8: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001beec: 7f ff c7 ba call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001bef0: 01 00 00 00 nop <== NOT EXECUTED 4001bef4: 81 c7 e0 08 ret <== NOT EXECUTED 4001bef8: 81 e8 00 00 restore <== NOT EXECUTED 4001befc: 7f ff c7 b6 call 4000ddd4 <_Thread_Dispatch> 4001bf00: b0 10 20 00 clr %i0 4001bf04: 81 c7 e0 08 ret 4001bf08: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 4001bf0c: c2 06 40 00 ld [ %i1 ], %g1 new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 4001bf10: d0 26 21 7c st %o0, [ %i0 + 0x17c ] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 4001bf14: c2 22 20 08 st %g1, [ %o0 + 8 ] new->ptr = ptr; 4001bf18: f2 22 20 04 st %i1, [ %o0 + 4 ] new->dtor = dtor; 4001bf1c: f4 22 20 10 st %i2, [ %o0 + 0x10 ] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 4001bf20: 10 bf ff d5 b 4001be74 4001bf24: c4 22 00 00 st %g2, [ %o0 ] *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001bf28: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001bf2c: 12 bf ff e0 bne 4001beac <== NOT EXECUTED 4001bf30: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001bf34: 05 10 00 fe sethi %hi(0x4003f800), %g2 <== NOT EXECUTED 4001bf38: 84 10 a3 b0 or %g2, 0x3b0, %g2 ! 4003fbb0 <_Objects_Information_table> <== NOT EXECUTED 4001bf3c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001bf40: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001bf44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001bf48: 02 bf ff d9 be 4001beac <== NOT EXECUTED 4001bf4c: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001bf50: 7f ff c2 1d call 4000c7c4 <_Objects_Get> <== NOT EXECUTED 4001bf54: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 4001bf58: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001bf5c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4001bf60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001bf64: 02 bf ff b6 be 4001be3c <== NOT EXECUTED 4001bf68: 21 10 00 ff sethi %hi(0x4003fc00), %l0 <== NOT EXECUTED 4001bf6c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001bf70: 18 bf ff c9 bgu 4001be94 <== NOT EXECUTED 4001bf74: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 4001bf78: 30 bf ff cd b,a 4001beac <== NOT EXECUTED 4001bf7c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 4001bf7c: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 4001bf80: 80 a6 60 00 cmp %i1, 0 4001bf84: 02 80 00 50 be 4001c0c4 4001bf88: 92 10 00 18 mov %i0, %o1 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4001bf8c: 80 a6 20 00 cmp %i0, 0 4001bf90: 12 80 00 26 bne 4001c028 4001bf94: 83 36 20 18 srl %i0, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001bf98: 21 10 00 ff sethi %hi(0x4003fc00), %l0 4001bf9c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> 4001bfa0: 82 00 60 01 inc %g1 4001bfa4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001bfa8: 03 10 00 ff sethi %hi(0x4003fc00), %g1 4001bfac: d0 00 61 2c ld [ %g1 + 0x12c ], %o0 ! 4003fd2c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4001bfb0: c0 27 bf f4 clr [ %fp + -12 ] default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; 4001bfb4: c6 02 21 7c ld [ %o0 + 0x17c ], %g3 while (tvp) { 4001bfb8: 80 a0 e0 00 cmp %g3, 0 4001bfbc: 02 80 00 10 be 4001bffc 4001bfc0: 01 00 00 00 nop if (tvp->ptr == ptr) { 4001bfc4: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4001bfc8: 80 a0 40 19 cmp %g1, %i1 4001bfcc: 32 80 00 09 bne,a 4001bff0 4001bfd0: c4 00 c0 00 ld [ %g3 ], %g2 <== NOT EXECUTED if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 4001bfd4: 10 80 00 5b b 4001c140 4001bfd8: c2 00 c0 00 ld [ %g3 ], %g1 return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 4001bfdc: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001bfe0: 02 80 00 18 be 4001c040 <== NOT EXECUTED 4001bfe4: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001bfe8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED _Workspace_Free(tvp); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 4001bfec: c4 00 c0 00 ld [ %g3 ], %g2 <== NOT EXECUTED default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 4001bff0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001bff4: 32 bf ff fa bne,a 4001bfdc <== NOT EXECUTED 4001bff8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001bffc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4001c000: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001c004: c2 24 20 50 st %g1, [ %l0 + 0x50 ] <== NOT EXECUTED 4001c008: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 4001c00c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c010: 12 80 00 2d bne 4001c0c4 <== NOT EXECUTED 4001c014: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001c018: 7f ff c7 6f call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001c01c: b0 10 20 09 mov 9, %i0 ! 9 <== NOT EXECUTED 4001c020: 81 c7 e0 08 ret <== NOT EXECUTED 4001c024: 81 e8 00 00 restore <== NOT EXECUTED 4001c028: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4001c02c: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001c030: 08 80 00 2e bleu 4001c0e8 <== NOT EXECUTED 4001c034: 83 36 20 1b srl %i0, 0x1b, %g1 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001c038: 81 c7 e0 08 ret <== NOT EXECUTED 4001c03c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 4001c040: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED 4001c044: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(the_thread)) { 4001c048: 03 10 00 ff sethi %hi(0x4003fc00), %g1 4001c04c: c4 00 61 2c ld [ %g1 + 0x12c ], %g2 ! 4003fd2c <_Thread_Executing> 4001c050: 80 a2 00 02 cmp %o0, %g2 4001c054: 32 80 00 1e bne,a 4001c0cc 4001c058: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED if (tvp->dtor) 4001c05c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 4001c060: 80 a0 a0 00 cmp %g2, 0 4001c064: 22 80 00 06 be,a 4001c07c 4001c068: c4 06 20 04 ld [ %i0 + 4 ], %g2 (*tvp->dtor)(*tvp->ptr); 4001c06c: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 4001c070: 9f c0 80 00 call %g2 <== NOT EXECUTED 4001c074: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 4001c078: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED 4001c07c: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001c080: c2 20 80 00 st %g1, [ %g2 ] RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4001c084: 92 10 00 18 mov %i0, %o1 4001c088: 11 10 00 ff sethi %hi(0x4003fc00), %o0 4001c08c: 7f ff bf 50 call 4000bdcc <_Heap_Free> 4001c090: 90 12 20 9c or %o0, 0x9c, %o0 ! 4003fc9c <_Workspace_Area> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001c094: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4001c098: b0 10 20 00 clr %i0 4001c09c: 82 00 7f ff add %g1, -1, %g1 4001c0a0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 4001c0a4: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4001c0a8: 80 a0 a0 00 cmp %g2, 0 4001c0ac: 12 80 00 04 bne 4001c0bc 4001c0b0: 01 00 00 00 nop _Thread_Dispatch(); 4001c0b4: 7f ff c7 48 call 4000ddd4 <_Thread_Dispatch> 4001c0b8: 01 00 00 00 nop 4001c0bc: 81 c7 e0 08 ret 4001c0c0: 81 e8 00 00 restore 4001c0c4: 81 c7 e0 08 ret <== NOT EXECUTED 4001c0c8: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED } else { if (tvp->dtor) 4001c0cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c0d0: 22 bf ff ee be,a 4001c088 <== NOT EXECUTED 4001c0d4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 4001c0d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001c0dc: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED 4001c0e0: 10 bf ff ea b 4001c088 <== NOT EXECUTED 4001c0e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001c0e8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001c0ec: 32 bf ff cd bne,a 4001c020 <== NOT EXECUTED 4001c0f0: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001c0f4: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001c0f8: 05 10 00 fe sethi %hi(0x4003f800), %g2 <== NOT EXECUTED 4001c0fc: 84 10 a3 b0 or %g2, 0x3b0, %g2 ! 4003fbb0 <_Objects_Information_table> <== NOT EXECUTED 4001c100: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001c104: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001c108: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c10c: 22 bf ff c5 be,a 4001c020 <== NOT EXECUTED 4001c110: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001c114: 7f ff c1 ac call 4000c7c4 <_Objects_Get> <== NOT EXECUTED 4001c118: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 4001c11c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001c120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c124: 02 bf ff a4 be 4001bfb4 <== NOT EXECUTED 4001c128: 21 10 00 ff sethi %hi(0x4003fc00), %l0 <== NOT EXECUTED 4001c12c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001c130: 18 bf ff bc bgu 4001c020 <== NOT EXECUTED 4001c134: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001c138: 81 c7 e0 08 ret <== NOT EXECUTED 4001c13c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 4001c140: b0 10 00 03 mov %g3, %i0 4001c144: 10 bf ff c1 b 4001c048 4001c148: c2 22 21 7c st %g1, [ %o0 + 0x17c ] 4001c14c : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 4001c14c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 4001c150: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4001c154: 02 80 00 3b be 4001c240 <== NOT EXECUTED 4001c158: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !result ) 4001c15c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4001c160: 02 80 00 38 be 4001c240 <== NOT EXECUTED 4001c164: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4001c168: 12 80 00 21 bne 4001c1ec <== NOT EXECUTED 4001c16c: 83 36 20 18 srl %i0, 0x18, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001c170: 05 10 00 ff sethi %hi(0x4003fc00), %g2 <== NOT EXECUTED 4001c174: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4001c178: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001c17c: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001c180: 03 10 00 ff sethi %hi(0x4003fc00), %g1 <== NOT EXECUTED 4001c184: d0 00 61 2c ld [ %g1 + 0x12c ], %o0 ! 4003fd2c <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4001c188: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 4001c18c: d0 02 21 7c ld [ %o0 + 0x17c ], %o0 <== NOT EXECUTED while (tvp) { 4001c190: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c194: 32 80 00 07 bne,a 4001c1b0 <== NOT EXECUTED 4001c198: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4001c19c: 30 80 00 1a b,a 4001c204 <== NOT EXECUTED 4001c1a0: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 4001c1a4: 02 80 00 18 be 4001c204 <== NOT EXECUTED 4001c1a8: 01 00 00 00 nop <== NOT EXECUTED if (tvp->ptr == ptr) { 4001c1ac: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4001c1b0: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001c1b4: 32 bf ff fb bne,a 4001c1a0 <== NOT EXECUTED 4001c1b8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 4001c1bc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED 4001c1c0: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001c1c4: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 <== NOT EXECUTED 4001c1c8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001c1cc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001c1d0: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] <== NOT EXECUTED 4001c1d4: c4 00 a0 50 ld [ %g2 + 0x50 ], %g2 <== NOT EXECUTED 4001c1d8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c1dc: 02 80 00 15 be 4001c230 <== NOT EXECUTED 4001c1e0: 01 00 00 00 nop <== NOT EXECUTED } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001c1e4: 81 c7 e0 08 ret <== NOT EXECUTED 4001c1e8: 81 e8 00 00 restore <== NOT EXECUTED 4001c1ec: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4001c1f0: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001c1f4: 08 80 00 15 bleu 4001c248 <== NOT EXECUTED 4001c1f8: 83 36 20 1b srl %i0, 0x1b, %g1 <== NOT EXECUTED 4001c1fc: 81 c7 e0 08 ret <== NOT EXECUTED 4001c200: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001c204: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 <== NOT EXECUTED 4001c208: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001c20c: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] <== NOT EXECUTED 4001c210: c4 00 a0 50 ld [ %g2 + 0x50 ], %g2 <== NOT EXECUTED 4001c214: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c218: 12 80 00 0a bne 4001c240 <== NOT EXECUTED 4001c21c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001c220: 7f ff c6 ed call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001c224: b0 10 20 09 mov 9, %i0 ! 9 <== NOT EXECUTED 4001c228: 81 c7 e0 08 ret <== NOT EXECUTED 4001c22c: 81 e8 00 00 restore <== NOT EXECUTED 4001c230: 7f ff c6 e9 call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001c234: 01 00 00 00 nop <== NOT EXECUTED 4001c238: 81 c7 e0 08 ret <== NOT EXECUTED 4001c23c: 81 e8 00 00 restore <== NOT EXECUTED 4001c240: 81 c7 e0 08 ret <== NOT EXECUTED 4001c244: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001c248: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001c24c: 32 bf ff e6 bne,a 4001c1e4 <== NOT EXECUTED 4001c250: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001c254: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001c258: 05 10 00 fe sethi %hi(0x4003f800), %g2 <== NOT EXECUTED 4001c25c: 84 10 a3 b0 or %g2, 0x3b0, %g2 ! 4003fbb0 <_Objects_Information_table> <== NOT EXECUTED 4001c260: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001c264: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001c268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c26c: 22 bf ff de be,a 4001c1e4 <== NOT EXECUTED 4001c270: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001c274: 7f ff c1 54 call 4000c7c4 <_Objects_Get> <== NOT EXECUTED 4001c278: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 4001c27c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001c280: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c284: 02 bf ff c2 be 4001c18c <== NOT EXECUTED 4001c288: 05 10 00 ff sethi %hi(0x4003fc00), %g2 <== NOT EXECUTED 4001c28c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001c290: 18 bf ff d5 bgu 4001c1e4 <== NOT EXECUTED 4001c294: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001c298: 81 c7 e0 08 ret <== NOT EXECUTED 4001c29c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40013be8 : */ rtems_status_code rtems_timer_cancel( Objects_Id id ) { 40013be8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40013bec: 11 10 00 da sethi %hi(0x40036800), %o0 40013bf0: 92 10 00 18 mov %i0, %o1 40013bf4: 90 12 21 2c or %o0, 0x12c, %o0 40013bf8: 40 00 0a d2 call 40016740 <_Objects_Get> 40013bfc: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013c00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40013c04: 80 a0 60 00 cmp %g1, 0 40013c08: 12 80 00 11 bne 40013c4c 40013c0c: 82 18 60 02 xor %g1, 2, %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 40013c10: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40013c14: 80 a0 60 04 cmp %g1, 4 40013c18: 12 80 00 16 bne 40013c70 40013c1c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013c20: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40013c24: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40013c28: b0 10 20 00 clr %i0 <== NOT EXECUTED 40013c2c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40013c30: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] <== NOT EXECUTED 40013c34: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 <== NOT EXECUTED 40013c38: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40013c3c: 02 80 00 09 be 40013c60 <== NOT EXECUTED 40013c40: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013c44: 81 c7 e0 08 ret <== NOT EXECUTED 40013c48: 81 e8 00 00 restore <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013c4c: 80 a0 00 01 cmp %g0, %g1 40013c50: 84 60 20 00 subx %g0, 0, %g2 40013c54: b0 08 a0 15 and %g2, 0x15, %i0 40013c58: 81 c7 e0 08 ret 40013c5c: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40013c60: 40 00 0f e0 call 40017be0 <_Thread_Dispatch> 40013c64: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013c68: 81 c7 e0 08 ret 40013c6c: 81 e8 00 00 restore case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) (void) _Watchdog_Remove( &the_timer->Ticker ); 40013c70: 40 00 16 a4 call 40019700 <_Watchdog_Remove> 40013c74: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013c78: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40013c7c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40013c80: b0 10 20 00 clr %i0 40013c84: 84 00 bf ff add %g2, -1, %g2 40013c88: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40013c8c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40013c90: 80 a0 e0 00 cmp %g3, 0 40013c94: 12 bf ff f5 bne 40013c68 40013c98: 01 00 00 00 nop 40013c9c: 30 bf ff f1 b,a 40013c60 40013d8c : */ rtems_status_code rtems_timer_delete( Objects_Id id ) { 40013d8c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40013d90: 21 10 00 da sethi %hi(0x40036800), %l0 40013d94: 92 10 00 18 mov %i0, %o1 40013d98: 94 07 bf f4 add %fp, -12, %o2 40013d9c: 40 00 0a 69 call 40016740 <_Objects_Get> 40013da0: 90 14 21 2c or %l0, 0x12c, %o0 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013da4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40013da8: 80 a0 60 00 cmp %g1, 0 40013dac: 12 80 00 1f bne 40013e28 40013db0: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40013db4: a0 14 21 2c or %l0, 0x12c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40013db8: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40013dbc: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40013dc0: 05 00 00 3f sethi %hi(0xfc00), %g2 40013dc4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40013dc8: 82 08 40 02 and %g1, %g2, %g1 40013dcc: 80 a0 40 03 cmp %g1, %g3 40013dd0: 38 80 00 06 bgu,a 40013de8 40013dd4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40013dd8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40013ddc: 83 28 60 02 sll %g1, 2, %g1 40013de0: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40013de4: c0 26 20 0c clr [ %i0 + 0xc ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); 40013de8: 40 00 16 46 call 40019700 <_Watchdog_Remove> 40013dec: 90 06 20 10 add %i0, 0x10, %o0 RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 40013df0: 90 10 00 10 mov %l0, %o0 40013df4: 40 00 09 fc call 400165e4 <_Objects_Free> 40013df8: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013dfc: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40013e00: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40013e04: b0 10 20 00 clr %i0 40013e08: 84 00 bf ff add %g2, -1, %g2 40013e0c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40013e10: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40013e14: 80 a0 e0 00 cmp %g3, 0 40013e18: 02 80 00 0a be 40013e40 40013e1c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013e20: 81 c7 e0 08 ret <== NOT EXECUTED 40013e24: 81 e8 00 00 restore <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013e28: 82 18 60 02 xor %g1, 2, %g1 40013e2c: 80 a0 00 01 cmp %g0, %g1 40013e30: 84 60 20 00 subx %g0, 0, %g2 40013e34: b0 08 a0 15 and %g2, 0x15, %i0 40013e38: 81 c7 e0 08 ret 40013e3c: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40013e40: 40 00 0f 68 call 40017be0 <_Thread_Dispatch> 40013e44: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013e48: 81 c7 e0 08 ret 40013e4c: 81 e8 00 00 restore 40013e50 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40013e50: 9d e3 bf 90 save %sp, -112, %sp 40013e54: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40013e58: 80 a6 60 00 cmp %i1, 0 40013e5c: 02 80 00 3e be 40013f54 40013e60: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40013e64: 80 a6 a0 00 cmp %i2, 0 40013e68: 02 80 00 3b be 40013f54 40013e6c: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40013e70: 11 10 00 da sethi %hi(0x40036800), %o0 40013e74: 92 10 00 12 mov %l2, %o1 40013e78: 90 12 21 2c or %o0, 0x12c, %o0 40013e7c: 40 00 0a 31 call 40016740 <_Objects_Get> 40013e80: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013e84: c2 07 bf f4 ld [ %fp + -12 ], %g1 40013e88: 80 a0 60 00 cmp %g1, 0 40013e8c: 12 80 00 17 bne 40013ee8 40013e90: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40013e94: a2 02 20 10 add %o0, 0x10, %l1 40013e98: 40 00 16 1a call 40019700 <_Watchdog_Remove> 40013e9c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40013ea0: 7f ff db 9a call 4000ad08 40013ea4: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 40013ea8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40013eac: 80 a0 60 00 cmp %g1, 0 40013eb0: 22 80 00 14 be,a 40013f00 40013eb4: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 40013eb8: 7f ff db 98 call 4000ad18 <== NOT EXECUTED 40013ebc: 01 00 00 00 nop <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013ec0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40013ec4: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40013ec8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40013ecc: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] <== NOT EXECUTED 40013ed0: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 <== NOT EXECUTED 40013ed4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40013ed8: 02 80 00 1d be 40013f4c <== NOT EXECUTED 40013edc: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013ee0: 81 c7 e0 08 ret <== NOT EXECUTED 40013ee4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013ee8: 82 18 60 02 xor %g1, 2, %g1 40013eec: 80 a0 00 01 cmp %g0, %g1 40013ef0: 84 60 20 00 subx %g0, 0, %g2 40013ef4: b0 08 a0 15 and %g2, 0x15, %i0 40013ef8: 81 c7 e0 08 ret 40013efc: 91 ee 20 04 restore %i0, 4, %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40013f00: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40013f04: f6 24 20 34 st %i3, [ %l0 + 0x34 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 40013f08: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40013f0c: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 40013f10: 7f ff db 82 call 4000ad18 40013f14: 01 00 00 00 nop ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40013f18: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40013f1c: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40013f20: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40013f24: 40 00 15 8d call 40019558 <_Watchdog_Insert> 40013f28: 90 12 23 ec or %o0, 0x3ec, %o0 ! 40035fec <_Watchdog_Ticks_chain> 40013f2c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40013f30: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40013f34: 82 00 7f ff add %g1, -1, %g1 40013f38: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 40013f3c: c6 00 a2 f0 ld [ %g2 + 0x2f0 ], %g3 40013f40: 80 a0 e0 00 cmp %g3, 0 40013f44: 32 80 00 04 bne,a 40013f54 40013f48: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Dispatch(); 40013f4c: 40 00 0f 25 call 40017be0 <_Thread_Dispatch> 40013f50: b0 10 20 00 clr %i0 40013f54: 81 c7 e0 08 ret 40013f58: 81 e8 00 00 restore 40009798 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 40009798: 9d e3 bf 90 save %sp, -112, %sp 4000979c: 92 10 00 18 mov %i0, %o1 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 400097a0: 80 a6 60 00 cmp %i1, 0 400097a4: 02 80 00 1b be 40009810 400097a8: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 400097ac: 11 10 00 87 sethi %hi(0x40021c00), %o0 400097b0: 94 07 bf f4 add %fp, -12, %o2 400097b4: 40 00 07 b6 call 4000b68c <_Objects_Get> 400097b8: 90 12 21 c8 or %o0, 0x1c8, %o0 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400097bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400097c0: 80 a0 60 00 cmp %g1, 0 400097c4: 12 80 00 15 bne 40009818 400097c8: 82 18 60 02 xor %g1, 2, %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; 400097cc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 400097d0: c6 02 20 38 ld [ %o0 + 0x38 ], %g3 the_info->initial = the_timer->Ticker.initial; 400097d4: c2 26 60 04 st %g1, [ %i1 + 4 ] the_info->start_time = the_timer->Ticker.start_time; 400097d8: c4 02 20 24 ld [ %o0 + 0x24 ], %g2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 400097dc: c6 26 40 00 st %g3, [ %i1 ] the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; 400097e0: c4 26 60 08 st %g2, [ %i1 + 8 ] the_info->stop_time = the_timer->Ticker.stop_time; 400097e4: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 400097e8: c2 26 60 0c st %g1, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400097ec: 07 10 00 87 sethi %hi(0x40021c00), %g3 400097f0: c2 00 e3 b0 ld [ %g3 + 0x3b0 ], %g1 ! 40021fb0 <_Thread_Dispatch_disable_level> 400097f4: b0 10 20 00 clr %i0 400097f8: 82 00 7f ff add %g1, -1, %g1 400097fc: c2 20 e3 b0 st %g1, [ %g3 + 0x3b0 ] 40009800: c4 00 e3 b0 ld [ %g3 + 0x3b0 ], %g2 40009804: 80 a0 a0 00 cmp %g2, 0 40009808: 02 80 00 09 be 4000982c 4000980c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009810: 81 c7 e0 08 ret <== NOT EXECUTED 40009814: 81 e8 00 00 restore <== NOT EXECUTED if ( !the_info ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40009818: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000981c: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED 40009820: b0 08 a0 15 and %g2, 0x15, %i0 <== NOT EXECUTED 40009824: 81 c7 e0 08 ret <== NOT EXECUTED 40009828: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000982c: 40 00 0c c0 call 4000cb2c <_Thread_Dispatch> 40009830: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009834: 81 c7 e0 08 ret 40009838: 81 e8 00 00 restore 400146b4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 400146b4: 9d e3 bf 90 save %sp, -112, %sp /* * Make sure the requested priority is valid. */ _priority = priority; if ( priority == RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 400146b8: 92 10 20 00 clr %o1 400146bc: 80 a6 3f ff cmp %i0, -1 400146c0: 02 80 00 07 be 400146dc 400146c4: 94 10 00 19 mov %i1, %o2 _priority = 0; else if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) 400146c8: 82 06 3f ff add %i0, -1, %g1 400146cc: 80 a0 60 fe cmp %g1, 0xfe 400146d0: 18 80 00 16 bgu 40014728 400146d4: a2 10 20 13 mov 0x13, %l1 400146d8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400146dc: 21 10 00 d7 sethi %hi(0x40035c00), %l0 400146e0: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400146e4: 82 00 60 01 inc %g1 400146e8: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] * Just to make sure the test versus create/start operation are atomic. */ _Thread_Disable_dispatch(); if ( _Timer_Server ) { 400146ec: 33 10 00 da sethi %hi(0x40036800), %i1 400146f0: c2 06 61 78 ld [ %i1 + 0x178 ], %g1 ! 40036978 <_Timer_Server> 400146f4: 80 a0 60 00 cmp %g1, 0 400146f8: 02 80 00 0e be 40014730 400146fc: 19 00 00 20 sethi %hi(0x8000), %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014700: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED 40014704: a2 10 20 0e mov 0xe, %l1 <== NOT EXECUTED _Thread_Dispatch(); 40014708: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001470c: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] 40014710: c4 04 22 f0 ld [ %l0 + 0x2f0 ], %g2 40014714: 80 a0 a0 00 cmp %g2, 0 40014718: 12 80 00 04 bne 40014728 4001471c: 01 00 00 00 nop 40014720: 40 00 0d 30 call 40017be0 <_Thread_Dispatch> 40014724: 01 00 00 00 nop _Watchdog_Initialize( &_Timer_Server->Timer, _Thread_Delay_ended, id, NULL ); _Watchdog_Initialize( &_Timer_Seconds_timer, _Thread_Delay_ended, id, NULL ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40014728: 81 c7 e0 08 ret 4001472c: 91 e8 00 11 restore %g0, %l1, %o0 * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 40014730: 11 15 12 53 sethi %hi(0x54494c00), %o0 40014734: 98 16 80 0c or %i2, %o4, %o4 40014738: 90 12 21 45 or %o0, 0x145, %o0 4001473c: 96 10 21 00 mov 0x100, %o3 40014740: 7f ff f9 fc call 40012f30 40014744: 9a 07 bf f4 add %fp, -12, %o5 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 40014748: a2 92 20 00 orcc %o0, 0, %l1 4001474c: 02 80 00 05 be 40014760 40014750: d0 07 bf f4 ld [ %fp + -12 ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014754: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 40014758: 10 bf ff ed b 4001470c 4001475c: 82 00 7f ff add %g1, -1, %g1 _Thread_Enable_dispatch(); return status; } status = rtems_task_start( 40014760: 13 10 00 51 sethi %hi(0x40014400), %o1 40014764: 94 10 20 00 clr %o2 40014768: 7f ff fc 3d call 4001385c 4001476c: 92 12 61 60 or %o1, 0x160, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40014770: a2 92 20 00 orcc %o0, 0, %l1 40014774: 12 bf ff f8 bne 40014754 40014778: c8 07 bf f4 ld [ %fp + -12 ], %g4 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 4001477c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40014780: 9a 10 61 a0 or %g1, 0x1a0, %o5 ! 40035da0 <_RTEMS_tasks_Information> 40014784: c4 13 60 10 lduh [ %o5 + 0x10 ], %g2 40014788: 03 00 00 3f sethi %hi(0xfc00), %g1 4001478c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40014790: 86 09 00 01 and %g4, %g1, %g3 40014794: 80 a0 c0 02 cmp %g3, %g2 40014798: 18 80 00 05 bgu 400147ac 4001479c: 82 10 20 00 clr %g1 400147a0: c4 03 60 20 ld [ %o5 + 0x20 ], %g2 400147a4: 83 28 e0 02 sll %g3, 2, %g1 400147a8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400147ac: c0 20 60 6c clr [ %g1 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400147b0: c0 20 60 50 clr [ %g1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 400147b4: c8 20 60 68 st %g4, [ %g1 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400147b8: 07 10 00 5e sethi %hi(0x40017800), %g3 * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 400147bc: c2 26 61 78 st %g1, [ %i1 + 0x178 ] 400147c0: 86 10 e3 3c or %g3, 0x33c, %g3 400147c4: c6 20 60 64 st %g3, [ %g1 + 0x64 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400147c8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400147cc: 82 10 61 f0 or %g1, 0x1f0, %g1 ! 40035df0 <_Timer_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400147d0: c2 20 7f fc st %g1, [ %g1 + -4 ] 400147d4: 82 00 7f fc add %g1, -4, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400147d8: 05 10 00 d7 sethi %hi(0x40035c00), %g2 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400147dc: c2 20 60 08 st %g1, [ %g1 + 8 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400147e0: 84 10 a2 04 or %g2, 0x204, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 400147e4: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400147e8: c4 20 bf fc st %g2, [ %g2 + -4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400147ec: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400147f0: 84 00 bf fc add %g2, -4, %g2 400147f4: 82 10 62 0c or %g1, 0x20c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400147f8: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 400147fc: c0 20 a0 04 clr [ %g2 + 4 ] the_watchdog->routine = routine; 40014800: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; 40014804: c8 20 60 20 st %g4, [ %g1 + 0x20 ] the_watchdog->user_data = user_data; 40014808: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4001480c: 10 bf ff d2 b 40014754 40014810: c0 20 60 08 clr [ %g1 + 8 ] 400140a8 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 400140a8: 9d e3 bf 90 save %sp, -112, %sp 400140ac: 11 10 00 da sethi %hi(0x40036800), %o0 400140b0: 92 10 00 18 mov %i0, %o1 400140b4: 90 12 21 2c or %o0, 0x12c, %o0 400140b8: 40 00 09 a2 call 40016740 <_Objects_Get> 400140bc: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400140c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400140c4: 80 a0 60 00 cmp %g1, 0 400140c8: 12 80 00 18 bne 40014128 400140cc: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400140d0: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400140d4: 80 a0 60 01 cmp %g1, 1 400140d8: 22 80 00 2f be,a 40014194 400140dc: 31 10 00 da sethi %hi(0x40036800), %i0 400140e0: 2a 80 00 18 bcs,a 40014140 400140e4: a0 02 20 10 add %o0, 0x10, %l0 400140e8: 80 a0 60 04 cmp %g1, 4 400140ec: 18 80 00 1b bgu 40014158 400140f0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400140f4: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400140f8: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 400140fc: b0 10 20 0b mov 0xb, %i0 40014100: 84 00 bf ff add %g2, -1, %g2 40014104: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40014108: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 4001410c: 80 a0 e0 00 cmp %g3, 0 40014110: 12 80 00 1f bne 4001418c 40014114: 01 00 00 00 nop _Thread_Dispatch(); 40014118: 40 00 0e b2 call 40017be0 <_Thread_Dispatch> 4001411c: 01 00 00 00 nop 40014120: 81 c7 e0 08 ret 40014124: 81 e8 00 00 restore { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40014128: 82 18 60 02 xor %g1, 2, %g1 4001412c: 80 a0 00 01 cmp %g0, %g1 40014130: 84 60 20 00 subx %g0, 0, %g2 40014134: b0 08 a0 15 and %g2, 0x15, %i0 40014138: 81 c7 e0 08 ret 4001413c: 91 ee 20 04 restore %i0, 4, %o0 return RTEMS_INVALID_ID; case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 40014140: 40 00 15 70 call 40019700 <_Watchdog_Remove> 40014144: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 40014148: 11 10 00 d7 sethi %hi(0x40035c00), %o0 4001414c: 92 10 00 10 mov %l0, %o1 40014150: 40 00 15 02 call 40019558 <_Watchdog_Insert> 40014154: 90 12 23 ec or %o0, 0x3ec, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014158: 03 10 00 d7 sethi %hi(0x40035c00), %g1 4001415c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40014160: b0 10 20 00 clr %i0 40014164: 84 00 bf ff add %g2, -1, %g2 40014168: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 4001416c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40014170: 80 a0 e0 00 cmp %g3, 0 40014174: 02 80 00 04 be 40014184 40014178: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001417c: 81 c7 e0 08 ret <== NOT EXECUTED 40014180: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40014184: 40 00 0e 97 call 40017be0 <_Thread_Dispatch> 40014188: 01 00 00 00 nop 4001418c: 81 c7 e0 08 ret 40014190: 81 e8 00 00 restore case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: _Timer_Server_stop_ticks_timer(); 40014194: d0 06 21 78 ld [ %i0 + 0x178 ], %o0 _Watchdog_Remove( &the_timer->Ticker ); 40014198: a2 04 20 10 add %l0, 0x10, %l1 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: _Timer_Server_stop_ticks_timer(); 4001419c: 40 00 15 59 call 40019700 <_Watchdog_Remove> 400141a0: 90 02 20 48 add %o0, 0x48, %o0 _Watchdog_Remove( &the_timer->Ticker ); 400141a4: 40 00 15 57 call 40019700 <_Watchdog_Remove> 400141a8: 90 10 00 11 mov %l1, %o0 _Timer_Server_process_ticks_chain(); 400141ac: 40 00 00 dc call 4001451c <_Timer_Server_process_ticks_chain> 400141b0: 21 10 00 d7 sethi %hi(0x40035c00), %l0 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 400141b4: 92 10 00 11 mov %l1, %o1 400141b8: 40 00 14 e8 call 40019558 <_Watchdog_Insert> 400141bc: 90 14 21 ec or %l0, 0x1ec, %o0 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 400141c0: c4 04 21 ec ld [ %l0 + 0x1ec ], %g2 400141c4: a0 14 21 ec or %l0, 0x1ec, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400141c8: a0 04 20 04 add %l0, 4, %l0 _Timer_Server_reset_ticks_timer(); 400141cc: 80 a0 80 10 cmp %g2, %l0 400141d0: 02 bf ff e2 be 40014158 400141d4: c2 06 21 78 ld [ %i0 + 0x178 ], %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400141d8: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400141dc: 92 00 60 48 add %g1, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400141e0: c4 20 60 54 st %g2, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400141e4: 11 10 00 d7 sethi %hi(0x40035c00), %o0 400141e8: 40 00 14 dc call 40019558 <_Watchdog_Insert> 400141ec: 90 12 23 ec or %o0, 0x3ec, %o0 ! 40035fec <_Watchdog_Ticks_chain> 400141f0: 30 bf ff da b,a 40014158 400141f4 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 400141f4: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 400141f8: 23 10 00 da sethi %hi(0x40036800), %l1 400141fc: c2 04 61 78 ld [ %l1 + 0x178 ], %g1 ! 40036978 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40014200: a6 10 00 18 mov %i0, %l3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40014204: 80 a0 60 00 cmp %g1, 0 40014208: 02 80 00 3b be 400142f4 4001420c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40014210: 80 a6 a0 00 cmp %i2, 0 40014214: 02 80 00 38 be 400142f4 40014218: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001421c: 80 a6 60 00 cmp %i1, 0 40014220: 02 80 00 35 be 400142f4 40014224: b0 10 20 0a mov 0xa, %i0 40014228: 11 10 00 da sethi %hi(0x40036800), %o0 4001422c: 92 10 00 13 mov %l3, %o1 40014230: 90 12 21 2c or %o0, 0x12c, %o0 40014234: 40 00 09 43 call 40016740 <_Objects_Get> 40014238: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001423c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40014240: 80 a0 60 00 cmp %g1, 0 40014244: 12 80 00 30 bne 40014304 40014248: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 4001424c: a4 02 20 10 add %o0, 0x10, %l2 40014250: 40 00 15 2c call 40019700 <_Watchdog_Remove> 40014254: 90 10 00 12 mov %l2, %o0 _ISR_Disable( level ); 40014258: 7f ff da ac call 4000ad08 4001425c: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 40014260: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40014264: 80 a0 60 00 cmp %g1, 0 40014268: 12 80 00 2d bne 4001431c 4001426c: 82 10 20 01 mov 1, %g1 * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 40014270: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40014274: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 40014278: e6 24 20 30 st %l3, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 4001427c: f6 24 20 34 st %i3, [ %l0 + 0x34 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40014280: c0 24 20 18 clr [ %l0 + 0x18 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 40014284: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 40014288: 7f ff da a4 call 4000ad18 4001428c: 21 10 00 d7 sethi %hi(0x40035c00), %l0 _Timer_Server_stop_ticks_timer(); 40014290: d0 04 61 78 ld [ %l1 + 0x178 ], %o0 40014294: 40 00 15 1b call 40019700 <_Watchdog_Remove> 40014298: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_process_ticks_chain(); 4001429c: 40 00 00 a0 call 4001451c <_Timer_Server_process_ticks_chain> 400142a0: 01 00 00 00 nop _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 400142a4: 90 14 21 ec or %l0, 0x1ec, %o0 400142a8: 40 00 14 ac call 40019558 <_Watchdog_Insert> 400142ac: 92 10 00 12 mov %l2, %o1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 400142b0: c4 04 21 ec ld [ %l0 + 0x1ec ], %g2 400142b4: a0 14 21 ec or %l0, 0x1ec, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400142b8: a0 04 20 04 add %l0, 4, %l0 _Timer_Server_reset_ticks_timer(); 400142bc: 80 a0 80 10 cmp %g2, %l0 400142c0: 12 80 00 1a bne 40014328 400142c4: c2 04 61 78 ld [ %l1 + 0x178 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400142c8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400142cc: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> _Thread_Dispatch(); 400142d0: b0 10 20 00 clr %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400142d4: 84 00 bf ff add %g2, -1, %g2 400142d8: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 400142dc: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 400142e0: 80 a0 e0 00 cmp %g3, 0 400142e4: 12 80 00 06 bne 400142fc 400142e8: 01 00 00 00 nop _Thread_Dispatch(); 400142ec: 40 00 0e 3d call 40017be0 <_Thread_Dispatch> 400142f0: b0 10 20 00 clr %i0 ! 0 400142f4: 81 c7 e0 08 ret 400142f8: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400142fc: 81 c7 e0 08 ret <== NOT EXECUTED 40014300: 81 e8 00 00 restore <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40014304: 82 18 60 02 xor %g1, 2, %g1 40014308: 80 a0 00 01 cmp %g0, %g1 4001430c: 84 60 20 00 subx %g0, 0, %g2 40014310: b0 08 a0 15 and %g2, 0x15, %i0 40014314: 81 c7 e0 08 ret 40014318: 91 ee 20 04 restore %i0, 4, %o0 * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 4001431c: 7f ff da 7f call 4000ad18 <== NOT EXECUTED 40014320: 01 00 00 00 nop <== NOT EXECUTED 40014324: 30 bf ff e9 b,a 400142c8 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014328: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4001432c: 92 00 60 48 add %g1, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014330: c4 20 60 54 st %g2, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40014334: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40014338: 40 00 14 88 call 40019558 <_Watchdog_Insert> 4001433c: 90 12 23 ec or %o0, 0x3ec, %o0 ! 40035fec <_Watchdog_Ticks_chain> 40014340: 30 bf ff e2 b,a 400142c8 400080f4 : */ int sched_get_priority_max( int policy ) { 400080f4: 9d e3 bf 98 save %sp, -104, %sp switch ( policy ) { 400080f8: 80 a6 20 03 cmp %i0, 3 400080fc: 08 80 00 06 bleu 40008114 40008100: b0 10 20 fe mov 0xfe, %i0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40008104: 40 00 26 8f call 40011b40 <__errno> <== NOT EXECUTED 40008108: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000810c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40008110: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 40008114: 81 c7 e0 08 ret 40008118: 81 e8 00 00 restore 40008154 : int sched_getparam( pid_t pid, const struct sched_param *param ) { 40008154: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40008158: 40 00 26 7a call 40011b40 <__errno> <== NOT EXECUTED 4000815c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008160: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40008164: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008168: 81 c7 e0 08 ret <== NOT EXECUTED 4000816c: 81 e8 00 00 restore <== NOT EXECUTED 4000811c : */ int sched_getscheduler( pid_t pid ) { 4000811c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40008120: 40 00 26 88 call 40011b40 <__errno> <== NOT EXECUTED 40008124: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008128: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 4000812c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008130: 81 c7 e0 08 ret <== NOT EXECUTED 40008134: 81 e8 00 00 restore <== NOT EXECUTED 4000818c : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 4000818c: 9d e3 bf 98 save %sp, -104, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 40008190: 80 a6 20 00 cmp %i0, 0 40008194: 12 80 00 0a bne 400081bc 40008198: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 4000819c: 02 80 00 13 be 400081e8 400081a0: 03 10 00 7f sethi %hi(0x4001fc00), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 400081a4: d0 00 60 58 ld [ %g1 + 0x58 ], %o0 ! 4001fc58 <_Thread_Ticks_per_timeslice> 400081a8: 92 10 00 19 mov %i1, %o1 400081ac: 40 00 14 c1 call 4000d4b0 <_Timespec_From_ticks> 400081b0: b0 10 20 00 clr %i0 return 0; } 400081b4: 81 c7 e0 08 ret 400081b8: 81 e8 00 00 restore { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 400081bc: 7f ff f0 2a call 40004264 400081c0: 01 00 00 00 nop 400081c4: 80 a2 00 18 cmp %o0, %i0 400081c8: 02 bf ff f5 be 4000819c 400081cc: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 400081d0: 40 00 26 5c call 40011b40 <__errno> <== NOT EXECUTED 400081d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400081d8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 400081dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400081e0: 81 c7 e0 08 ret <== NOT EXECUTED 400081e4: 81 e8 00 00 restore <== NOT EXECUTED if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 400081e8: 40 00 26 56 call 40011b40 <__errno> <== NOT EXECUTED 400081ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400081f0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400081f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400081f8: 81 c7 e0 08 ret <== NOT EXECUTED 400081fc: 81 e8 00 00 restore <== NOT EXECUTED 40008170 : int sched_setparam( pid_t pid, const struct sched_param *param ) { 40008170: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40008174: 40 00 26 73 call 40011b40 <__errno> <== NOT EXECUTED 40008178: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000817c: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40008180: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008184: 81 c7 e0 08 ret <== NOT EXECUTED 40008188: 81 e8 00 00 restore <== NOT EXECUTED 40008138 : int sched_setscheduler( pid_t pid, int policy, const struct sched_param *param ) { 40008138: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 4000813c: 40 00 26 81 call 40011b40 <__errno> <== NOT EXECUTED 40008140: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008144: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40008148: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 4000814c: 81 c7 e0 08 ret <== NOT EXECUTED 40008150: 81 e8 00 00 restore <== NOT EXECUTED 40008014 : */ int sem_close( sem_t *sem ) { 40008014: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 40008018: d2 06 00 00 ld [ %i0 ], %o1 4000801c: 11 10 00 86 sethi %hi(0x40021800), %o0 40008020: 94 07 bf f4 add %fp, -12, %o2 40008024: 40 00 0c 44 call 4000b134 <_Objects_Get> 40008028: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4000802c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008030: 80 a0 60 01 cmp %g1, 1 40008034: 02 80 00 1c be 400080a4 40008038: 01 00 00 00 nop 4000803c: 2a 80 00 09 bcs,a 40008060 40008040: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40008044: 80 a0 60 02 cmp %g1, 2 40008048: 02 80 00 1d be 400080bc 4000804c: 01 00 00 00 nop the_semaphore->open_count -= 1; _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008050: 40 00 01 aa call 400086f8 <== NOT EXECUTED 40008054: 01 00 00 00 nop <== NOT EXECUTED } 40008058: 81 c7 e0 08 ret <== NOT EXECUTED 4000805c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 40008060: 82 00 7f ff add %g1, -1, %g1 _POSIX_Semaphore_Delete( the_semaphore ); 40008064: 40 00 21 b4 call 40010734 <_POSIX_Semaphore_Delete> 40008068: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000806c: 07 10 00 85 sethi %hi(0x40021400), %g3 40008070: c2 00 e2 30 ld [ %g3 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 40008074: 90 10 20 00 clr %o0 40008078: 82 00 7f ff add %g1, -1, %g1 4000807c: c2 20 e2 30 st %g1, [ %g3 + 0x230 ] 40008080: c4 00 e2 30 ld [ %g3 + 0x230 ], %g2 40008084: 80 a0 a0 00 cmp %g2, 0 40008088: 12 bf ff f4 bne 40008058 4000808c: 01 00 00 00 nop _Thread_Dispatch(); 40008090: 40 00 11 15 call 4000c4e4 <_Thread_Dispatch> 40008094: 01 00 00 00 nop 40008098: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000809c: 81 c7 e0 08 ret 400080a0: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400080a4: 40 00 11 10 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400080a8: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 400080ac: 40 00 01 9d call 40008720 <== NOT EXECUTED 400080b0: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400080b4: 81 c7 e0 08 ret <== NOT EXECUTED 400080b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 400080bc: 40 00 2a 78 call 40012a9c <__errno> 400080c0: 01 00 00 00 nop 400080c4: 82 10 20 16 mov 0x16, %g1 ! 16 400080c8: c2 22 00 00 st %g1, [ %o0 ] 400080cc: 90 10 3f ff mov -1, %o0 _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400080d0: 81 c7 e0 08 ret 400080d4: 91 e8 00 08 restore %g0, %o0, %o0 400080d8 : */ int sem_destroy( sem_t *sem ) { 400080d8: 9d e3 bf 90 save %sp, -112, %sp 400080dc: d2 06 00 00 ld [ %i0 ], %o1 400080e0: 11 10 00 86 sethi %hi(0x40021800), %o0 400080e4: 94 07 bf f4 add %fp, -12, %o2 400080e8: 40 00 0c 13 call 4000b134 <_Objects_Get> 400080ec: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400080f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400080f4: 80 a0 60 01 cmp %g1, 1 400080f8: 02 80 00 2f be 400081b4 400080fc: 01 00 00 00 nop 40008100: 2a 80 00 09 bcs,a 40008124 40008104: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40008108: 80 a0 60 02 cmp %g1, 2 4000810c: 02 80 00 23 be 40008198 40008110: 01 00 00 00 nop _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008114: 40 00 01 79 call 400086f8 <== NOT EXECUTED 40008118: 01 00 00 00 nop <== NOT EXECUTED } 4000811c: 81 c7 e0 08 ret <== NOT EXECUTED 40008120: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40008124: 80 a0 60 01 cmp %g1, 1 40008128: 02 80 00 12 be 40008170 4000812c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 40008130: 40 00 21 81 call 40010734 <_POSIX_Semaphore_Delete> 40008134: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008138: 03 10 00 85 sethi %hi(0x40021400), %g1 4000813c: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> 40008140: 90 10 20 00 clr %o0 40008144: 84 00 bf ff add %g2, -1, %g2 40008148: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 4000814c: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 40008150: 80 a0 e0 00 cmp %g3, 0 40008154: 12 bf ff f2 bne 4000811c 40008158: 01 00 00 00 nop _Thread_Dispatch(); 4000815c: 40 00 10 e2 call 4000c4e4 <_Thread_Dispatch> 40008160: 01 00 00 00 nop 40008164: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008168: 81 c7 e0 08 ret 4000816c: 91 e8 00 08 restore %g0, %o0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008170: 03 10 00 85 sethi %hi(0x40021400), %g1 <== NOT EXECUTED 40008174: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008178: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000817c: c4 20 62 30 st %g2, [ %g1 + 0x230 ] <== NOT EXECUTED 40008180: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 <== NOT EXECUTED 40008184: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40008188: 12 80 00 04 bne 40008198 <== NOT EXECUTED 4000818c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40008190: 40 00 10 d5 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 40008194: 01 00 00 00 nop <== NOT EXECUTED * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40008198: 40 00 2a 41 call 40012a9c <__errno> 4000819c: 01 00 00 00 nop 400081a0: 82 10 20 16 mov 0x16, %g1 ! 16 400081a4: c2 22 00 00 st %g1, [ %o0 ] 400081a8: 90 10 3f ff mov -1, %o0 _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400081ac: 81 c7 e0 08 ret 400081b0: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400081b4: 40 00 10 cc call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400081b8: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 400081bc: 40 00 01 59 call 40008720 <== NOT EXECUTED 400081c0: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400081c4: 81 c7 e0 08 ret <== NOT EXECUTED 400081c8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400081cc : int sem_getvalue( sem_t *sem, int *sval ) { 400081cc: 9d e3 bf 90 save %sp, -112, %sp 400081d0: d2 06 00 00 ld [ %i0 ], %o1 400081d4: 11 10 00 86 sethi %hi(0x40021800), %o0 400081d8: 94 07 bf f4 add %fp, -12, %o2 400081dc: 40 00 0b d6 call 4000b134 <_Objects_Get> 400081e0: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400081e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400081e8: 80 a0 60 01 cmp %g1, 1 400081ec: 02 80 00 1a be 40008254 400081f0: 01 00 00 00 nop 400081f4: 2a 80 00 09 bcs,a 40008218 400081f8: c2 02 20 68 ld [ %o0 + 0x68 ], %g1 400081fc: 80 a0 60 02 cmp %g1, 2 40008200: 02 80 00 1b be 4000826c 40008204: 01 00 00 00 nop case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008208: 40 00 01 3c call 400086f8 <== NOT EXECUTED 4000820c: 01 00 00 00 nop <== NOT EXECUTED } 40008210: 81 c7 e0 08 ret <== NOT EXECUTED 40008214: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 40008218: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000821c: 07 10 00 85 sethi %hi(0x40021400), %g3 40008220: c2 00 e2 30 ld [ %g3 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 40008224: 90 10 20 00 clr %o0 40008228: 82 00 7f ff add %g1, -1, %g1 4000822c: c2 20 e2 30 st %g1, [ %g3 + 0x230 ] 40008230: c4 00 e2 30 ld [ %g3 + 0x230 ], %g2 40008234: 80 a0 a0 00 cmp %g2, 0 40008238: 12 bf ff f6 bne 40008210 4000823c: 01 00 00 00 nop _Thread_Dispatch(); 40008240: 40 00 10 a9 call 4000c4e4 <_Thread_Dispatch> 40008244: 01 00 00 00 nop 40008248: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000824c: 81 c7 e0 08 ret 40008250: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 40008254: 40 00 10 a4 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 40008258: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000825c: 40 00 01 31 call 40008720 <== NOT EXECUTED 40008260: 01 00 00 00 nop <== NOT EXECUTED *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008264: 81 c7 e0 08 ret <== NOT EXECUTED 40008268: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000826c: 40 00 2a 0c call 40012a9c <__errno> 40008270: 01 00 00 00 nop 40008274: 82 10 20 16 mov 0x16, %g1 ! 16 40008278: c2 22 00 00 st %g1, [ %o0 ] 4000827c: 90 10 3f ff mov -1, %o0 *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008280: 81 c7 e0 08 ret 40008284: 91 e8 00 08 restore %g0, %o0, %o0 40008288 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 40008288: 9d e3 bf 90 save %sp, -112, %sp 4000828c: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 40008290: 80 a6 20 00 cmp %i0, 0 40008294: 02 80 00 0c be 400082c4 40008298: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 4000829c: 90 10 20 00 clr %o0 400082a0: 40 00 20 b4 call 40010570 <_POSIX_Semaphore_Create_support> 400082a4: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 400082a8: 80 a2 3f ff cmp %o0, -1 400082ac: 02 80 00 04 be 400082bc 400082b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 400082b4: c4 00 60 08 ld [ %g1 + 8 ], %g2 400082b8: c4 26 00 00 st %g2, [ %i0 ] return status; } 400082bc: 81 c7 e0 08 ret 400082c0: 91 e8 00 08 restore %g0, %o0, %o0 { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 400082c4: 40 00 29 f6 call 40012a9c <__errno> <== NOT EXECUTED 400082c8: 01 00 00 00 nop <== NOT EXECUTED 400082cc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400082d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400082d4: 10 bf ff fa b 400082bc <== NOT EXECUTED 400082d8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400082dc : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 400082dc: 9d e3 bf 88 save %sp, -120, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400082e0: 21 10 00 85 sethi %hi(0x40021400), %l0 400082e4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 400082e8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400082ec: 82 00 60 01 inc %g1 400082f0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 400082f4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400082f8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 400082fc: c2 24 22 30 st %g1, [ %l0 + 0x230 ] POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 40008300: b8 8e 62 00 andcc %i1, 0x200, %i4 40008304: 12 80 00 42 bne 4000840c 40008308: f6 07 a0 50 ld [ %fp + 0x50 ], %i3 4000830c: b6 10 20 00 clr %i3 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 40008310: 90 10 00 18 mov %i0, %o0 40008314: 40 00 21 25 call 400107a8 <_POSIX_Semaphore_Name_to_id> 40008318: 92 07 bf f0 add %fp, -16, %o1 * 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 ) { 4000831c: ba 92 20 00 orcc %o0, 0, %i5 40008320: 02 80 00 11 be 40008364 40008324: 82 0e 6a 00 and %i1, 0xa00, %g1 /* * 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) ) ) { 40008328: 80 a7 60 02 cmp %i5, 2 4000832c: 02 80 00 3b be 40008418 40008330: 80 a7 20 00 cmp %i4, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008334: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008338: 82 00 7f ff add %g1, -1, %g1 4000833c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008340: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40008344: 80 a0 a0 00 cmp %g2, 0 40008348: 02 80 00 52 be 40008490 4000834c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 40008350: 40 00 29 d3 call 40012a9c <__errno> <== NOT EXECUTED 40008354: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40008358: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED 4000835c: 81 c7 e0 08 ret <== NOT EXECUTED 40008360: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 40008364: 80 a0 6a 00 cmp %g1, 0xa00 40008368: 02 80 00 1c be 400083d8 4000836c: d2 07 bf f0 ld [ %fp + -16 ], %o1 40008370: 94 07 bf e8 add %fp, -24, %o2 40008374: 11 10 00 86 sethi %hi(0x40021800), %o0 40008378: 40 00 0b 6f call 4000b134 <_Objects_Get> 4000837c: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 400219b0 <_POSIX_Semaphore_Information> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 40008380: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 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 ); 40008384: d0 27 bf ec st %o0, [ %fp + -20 ] the_semaphore->open_count += 1; 40008388: 82 00 60 01 inc %g1 4000838c: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 40008390: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008394: 3b 10 00 85 sethi %hi(0x40021400), %i5 40008398: 82 00 7f ff add %g1, -1, %g1 4000839c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 400083a0: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 400083a4: 80 a0 a0 00 cmp %g2, 0 400083a8: 02 80 00 34 be 40008478 400083ac: 01 00 00 00 nop 400083b0: c2 07 62 30 ld [ %i5 + 0x230 ], %g1 400083b4: 82 00 7f ff add %g1, -1, %g1 400083b8: c2 27 62 30 st %g1, [ %i5 + 0x230 ] 400083bc: c4 07 62 30 ld [ %i5 + 0x230 ], %g2 400083c0: 80 a0 a0 00 cmp %g2, 0 400083c4: 02 80 00 29 be 40008468 400083c8: 01 00 00 00 nop _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); id = &the_semaphore->Object.id; return (sem_t *)id; 400083cc: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400083d0: 81 c7 e0 08 ret 400083d4: 91 e8 60 08 restore %g1, 8, %o0 400083d8: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 400083dc: 82 00 7f ff add %g1, -1, %g1 400083e0: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 400083e4: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 400083e8: 80 a0 a0 00 cmp %g2, 0 400083ec: 02 80 00 26 be 40008484 400083f0: 01 00 00 00 nop * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 400083f4: 40 00 29 aa call 40012a9c <__errno> 400083f8: b0 10 3f ff mov -1, %i0 ! ffffffff 400083fc: 82 10 20 11 mov 0x11, %g1 40008400: c2 22 00 00 st %g1, [ %o0 ] 40008404: 81 c7 e0 08 ret 40008408: 81 e8 00 00 restore _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 4000840c: 82 07 a0 54 add %fp, 0x54, %g1 40008410: 10 bf ff c0 b 40008310 40008414: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * 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) ) ) { 40008418: 02 bf ff c7 be 40008334 4000841c: 90 10 00 18 mov %i0, %o0 /* * 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( 40008420: 94 10 00 1b mov %i3, %o2 40008424: 92 10 20 00 clr %o1 40008428: 40 00 20 52 call 40010570 <_POSIX_Semaphore_Create_support> 4000842c: 96 07 bf ec add %fp, -20, %o3 40008430: ba 10 00 08 mov %o0, %i5 40008434: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008438: 82 00 7f ff add %g1, -1, %g1 4000843c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008440: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40008444: 80 a0 a0 00 cmp %g2, 0 40008448: 02 80 00 19 be 400084ac 4000844c: 01 00 00 00 nop * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 40008450: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED 40008454: 02 bf ff c2 be 4000835c 40008458: b0 10 3f ff mov -1, %i0 return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; 4000845c: c2 07 bf ec ld [ %fp + -20 ], %g1 } 40008460: 81 c7 e0 08 ret 40008464: 91 e8 60 08 restore %g1, 8, %o0 _Thread_Dispatch(); 40008468: 40 00 10 1f call 4000c4e4 <_Thread_Dispatch> 4000846c: 01 00 00 00 nop the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); id = &the_semaphore->Object.id; return (sem_t *)id; 40008470: 10 bf ff d8 b 400083d0 40008474: c2 07 bf ec ld [ %fp + -20 ], %g1 40008478: 40 00 10 1b call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 4000847c: 01 00 00 00 nop <== NOT EXECUTED 40008480: 30 bf ff cc b,a 400083b0 <== NOT EXECUTED 40008484: 40 00 10 18 call 4000c4e4 <_Thread_Dispatch> 40008488: 01 00 00 00 nop 4000848c: 30 bf ff da b,a 400083f4 40008490: 40 00 10 15 call 4000c4e4 <_Thread_Dispatch> 40008494: b0 10 3f ff mov -1, %i0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 40008498: 40 00 29 81 call 40012a9c <__errno> 4000849c: 01 00 00 00 nop 400084a0: fa 22 00 00 st %i5, [ %o0 ] 400084a4: 81 c7 e0 08 ret 400084a8: 81 e8 00 00 restore 400084ac: 40 00 10 0e call 4000c4e4 <_Thread_Dispatch> 400084b0: 01 00 00 00 nop * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 400084b4: 10 bf ff e8 b 40008454 400084b8: 80 a7 7f ff cmp %i5, -1 400084bc : */ int sem_post( sem_t *sem ) { 400084bc: 9d e3 bf 90 save %sp, -112, %sp 400084c0: d2 06 00 00 ld [ %i0 ], %o1 400084c4: 11 10 00 86 sethi %hi(0x40021800), %o0 400084c8: 94 07 bf f4 add %fp, -12, %o2 400084cc: 40 00 0b 1a call 4000b134 <_Objects_Get> 400084d0: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400084d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400084d8: 80 a0 60 01 cmp %g1, 1 400084dc: 02 80 00 1c be 4000854c 400084e0: 01 00 00 00 nop 400084e4: 2a 80 00 09 bcs,a 40008508 400084e8: d2 02 20 08 ld [ %o0 + 8 ], %o1 400084ec: 80 a0 60 02 cmp %g1, 2 400084f0: 02 80 00 1d be 40008564 400084f4: 01 00 00 00 nop #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400084f8: 40 00 00 80 call 400086f8 <== NOT EXECUTED 400084fc: 01 00 00 00 nop <== NOT EXECUTED } 40008500: 81 c7 e0 08 ret <== NOT EXECUTED 40008504: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 40008508: 94 10 20 00 clr %o2 4000850c: 40 00 07 f8 call 4000a4ec <_CORE_semaphore_Surrender> 40008510: 90 02 20 20 add %o0, 0x20, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008514: 03 10 00 85 sethi %hi(0x40021400), %g1 40008518: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> 4000851c: 90 10 20 00 clr %o0 40008520: 84 00 bf ff add %g2, -1, %g2 40008524: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 40008528: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 4000852c: 80 a0 e0 00 cmp %g3, 0 40008530: 12 bf ff f4 bne 40008500 40008534: 01 00 00 00 nop _Thread_Dispatch(); 40008538: 40 00 0f eb call 4000c4e4 <_Thread_Dispatch> 4000853c: 01 00 00 00 nop 40008540: 90 10 20 00 clr %o0 ! 0 ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008544: 81 c7 e0 08 ret 40008548: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000854c: 40 00 0f e6 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 40008550: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40008554: 40 00 00 73 call 40008720 <== NOT EXECUTED 40008558: 01 00 00 00 nop <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000855c: 81 c7 e0 08 ret <== NOT EXECUTED 40008560: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 40008564: 40 00 29 4e call 40012a9c <__errno> 40008568: 01 00 00 00 nop 4000856c: 82 10 20 16 mov 0x16, %g1 ! 16 40008570: c2 22 00 00 st %g1, [ %o0 ] 40008574: 90 10 3f ff mov -1, %o0 ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008578: 81 c7 e0 08 ret 4000857c: 91 e8 00 08 restore %g0, %o0, %o0 40008580 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 40008580: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 40008584: 90 10 00 19 mov %i1, %o0 40008588: 40 00 1d 87 call 4000fba4 <_POSIX_Absolute_timeout_to_ticks> 4000858c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40008590: 80 a2 20 02 cmp %o0, 2 40008594: 18 80 00 07 bgu 400085b0 40008598: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 4000859c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400085a0: 40 00 20 a1 call 40010824 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 400085a4: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 400085a8: 81 c7 e0 08 ret <== NOT EXECUTED 400085ac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 400085b0: 90 10 00 18 mov %i0, %o0 400085b4: 40 00 20 9c call 40010824 <_POSIX_Semaphore_Wait_support> 400085b8: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 400085bc: 81 c7 e0 08 ret 400085c0: 91 e8 00 08 restore %g0, %o0, %o0 400085dc : */ int sem_unlink( const char *name ) { 400085dc: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400085e0: 21 10 00 85 sethi %hi(0x40021400), %l0 400085e4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 400085e8: 90 10 00 18 mov %i0, %o0 400085ec: 82 00 60 01 inc %g1 400085f0: c2 24 22 30 st %g1, [ %l0 + 0x230 ] register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 400085f4: 40 00 20 6d call 400107a8 <_POSIX_Semaphore_Name_to_id> 400085f8: 92 07 bf f4 add %fp, -12, %o1 if ( status != 0 ) { 400085fc: b0 92 20 00 orcc %o0, 0, %i0 40008600: 12 80 00 1f bne 4000867c 40008604: 03 10 00 86 sethi %hi(0x40021800), %g1 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 40008608: c4 07 bf f4 ld [ %fp + -12 ], %g2 4000860c: 88 10 61 b0 or %g1, 0x1b0, %g4 40008610: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 40008614: 03 00 00 3f sethi %hi(0xfc00), %g1 40008618: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000861c: 82 08 80 01 and %g2, %g1, %g1 40008620: 80 a0 40 03 cmp %g1, %g3 40008624: 18 80 00 05 bgu 40008638 40008628: 90 10 20 00 clr %o0 4000862c: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 40008630: 83 28 60 02 sll %g1, 2, %g1 40008634: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) { _Objects_MP_Close( &_POSIX_Semaphore_Information, the_semaphore_id ); } #endif the_semaphore->linked = FALSE; 40008638: c0 22 20 18 clr [ %o0 + 0x18 ] _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 4000863c: 40 00 20 3e call 40010734 <_POSIX_Semaphore_Delete> 40008640: c0 22 20 0c clr [ %o0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008644: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008648: b0 10 20 00 clr %i0 4000864c: 82 00 7f ff add %g1, -1, %g1 40008650: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008654: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40008658: 80 a0 a0 00 cmp %g2, 0 4000865c: 02 80 00 04 be 4000866c 40008660: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 40008664: 81 c7 e0 08 ret <== NOT EXECUTED 40008668: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000866c: 40 00 0f 9e call 4000c4e4 <_Thread_Dispatch> 40008670: 01 00 00 00 nop 40008674: 81 c7 e0 08 ret 40008678: 81 e8 00 00 restore #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000867c: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008680: 82 00 7f ff add %g1, -1, %g1 40008684: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008688: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 4000868c: 80 a0 a0 00 cmp %g2, 0 40008690: 02 80 00 07 be 400086ac 40008694: 01 00 00 00 nop _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); 40008698: 40 00 29 01 call 40012a9c <__errno> 4000869c: 01 00 00 00 nop 400086a0: f0 22 00 00 st %i0, [ %o0 ] 400086a4: 81 c7 e0 08 ret 400086a8: 91 e8 3f ff restore %g0, -1, %o0 _Thread_Dispatch(); 400086ac: 40 00 0f 8e call 4000c4e4 <_Thread_Dispatch> 400086b0: 01 00 00 00 nop 400086b4: 30 bf ff f9 b,a 40008698 400075f4 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 400075f4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; if ( oact ) 400075f8: 80 a6 a0 00 cmp %i2, 0 400075fc: 02 80 00 0d be 40007630 40007600: 87 2e 20 02 sll %i0, 2, %g3 *oact = _POSIX_signals_Vectors[ sig ]; 40007604: 05 10 00 7d sethi %hi(0x4001f400), %g2 <== NOT EXECUTED 40007608: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4000760c: 84 10 a1 64 or %g2, 0x164, %g2 <== NOT EXECUTED 40007610: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40007614: c8 00 80 01 ld [ %g2 + %g1 ], %g4 <== NOT EXECUTED 40007618: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 4000761c: c8 26 80 00 st %g4, [ %i2 ] <== NOT EXECUTED 40007620: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40007624: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED 40007628: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED 4000762c: c6 26 a0 08 st %g3, [ %i2 + 8 ] <== NOT EXECUTED if ( !sig ) 40007630: 80 a6 20 00 cmp %i0, 0 40007634: 02 80 00 33 be 40007700 40007638: b4 06 3f ff add %i0, -1, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4000763c: 80 a6 a0 1f cmp %i2, 0x1f 40007640: 18 80 00 30 bgu 40007700 40007644: 80 a6 20 09 cmp %i0, 9 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 40007648: 02 80 00 2e be 40007700 4000764c: 80 a6 60 00 cmp %i1, 0 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 40007650: 02 80 00 1a be 400076b8 40007654: 82 10 20 00 clr %g1 /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 40007658: 7f ff eb e6 call 400025f0 4000765c: 01 00 00 00 nop 40007660: a0 10 00 08 mov %o0, %l0 if ( act->sa_handler == SIG_DFL ) { 40007664: c2 06 60 08 ld [ %i1 + 8 ], %g1 40007668: 80 a0 60 00 cmp %g1, 0 4000766c: 02 80 00 15 be 400076c0 40007670: 90 10 20 01 mov 1, %o0 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( signo_to_mask(sig) ); 40007674: 40 00 1e a9 call 4000f118 <_POSIX_signals_Clear_process_signals> 40007678: 91 2a 00 1a sll %o0, %i2, %o0 _POSIX_signals_Vectors[ sig ] = *act; 4000767c: da 06 40 00 ld [ %i1 ], %o5 40007680: 85 2e 20 02 sll %i0, 2, %g2 40007684: 83 2e 20 04 sll %i0, 4, %g1 40007688: 07 10 00 7d sethi %hi(0x4001f400), %g3 4000768c: 82 20 40 02 sub %g1, %g2, %g1 40007690: 86 10 e1 64 or %g3, 0x164, %g3 40007694: da 20 c0 01 st %o5, [ %g3 + %g1 ] 40007698: c8 06 60 04 ld [ %i1 + 4 ], %g4 4000769c: 82 00 40 03 add %g1, %g3, %g1 400076a0: c8 20 60 04 st %g4, [ %g1 + 4 ] 400076a4: c4 06 60 08 ld [ %i1 + 8 ], %g2 400076a8: c4 20 60 08 st %g2, [ %g1 + 8 ] } _ISR_Enable( level ); 400076ac: 7f ff eb d5 call 40002600 400076b0: 90 10 00 10 mov %l0, %o0 400076b4: 82 10 20 00 clr %g1 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 400076b8: 81 c7 e0 08 ret 400076bc: 91 e8 00 01 restore %g0, %g1, %o0 * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 400076c0: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 400076c4: 87 2e 20 04 sll %i0, 4, %g3 <== NOT EXECUTED 400076c8: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 400076cc: 86 20 c0 02 sub %g3, %g2, %g3 <== NOT EXECUTED 400076d0: 82 10 62 0c or %g1, 0x20c, %g1 <== NOT EXECUTED 400076d4: c8 00 40 03 ld [ %g1 + %g3 ], %g4 <== NOT EXECUTED 400076d8: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 400076dc: da 00 60 08 ld [ %g1 + 8 ], %o5 <== NOT EXECUTED 400076e0: d8 00 60 04 ld [ %g1 + 4 ], %o4 <== NOT EXECUTED 400076e4: 05 10 00 7d sethi %hi(0x4001f400), %g2 <== NOT EXECUTED 400076e8: 84 10 a1 64 or %g2, 0x164, %g2 ! 4001f564 <_POSIX_signals_Vectors> <== NOT EXECUTED 400076ec: c8 20 80 03 st %g4, [ %g2 + %g3 ] <== NOT EXECUTED 400076f0: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED 400076f4: da 20 e0 08 st %o5, [ %g3 + 8 ] <== NOT EXECUTED 400076f8: 10 bf ff ed b 400076ac <== NOT EXECUTED 400076fc: d8 20 e0 04 st %o4, [ %g3 + 4 ] <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 40007700: 40 00 27 17 call 4001135c <__errno> 40007704: 01 00 00 00 nop 40007708: 82 10 20 16 mov 0x16, %g1 ! 16 4000770c: c2 22 00 00 st %g1, [ %o0 ] 40007710: 10 bf ff ea b 400076b8 40007714: 82 10 3f ff mov -1, %g1 40007a9c : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 40007a9c: 9d e3 bf 88 save %sp, -120, %sp * NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 40007aa0: 80 a6 a0 00 cmp %i2, 0 40007aa4: 02 80 00 0c be 40007ad4 40007aa8: a6 10 20 00 clr %l3 if ( !_Timespec_Is_valid( timeout ) ) 40007aac: 40 00 14 a3 call 4000cd38 <_Timespec_Is_valid> 40007ab0: 90 10 00 1a mov %i2, %o0 40007ab4: 80 a2 20 00 cmp %o0, 0 40007ab8: 02 80 00 76 be 40007c90 40007abc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 40007ac0: 40 00 14 c5 call 4000cdd4 <_Timespec_To_ticks> 40007ac4: 90 10 00 1a mov %i2, %o0 if ( !interval ) 40007ac8: a6 92 20 00 orcc %o0, 0, %l3 40007acc: 02 80 00 71 be 40007c90 40007ad0: 01 00 00 00 nop /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 40007ad4: 80 a6 60 00 cmp %i1, 0 40007ad8: 02 80 00 03 be 40007ae4 40007adc: a4 07 bf ec add %fp, -20, %l2 40007ae0: a4 10 00 19 mov %i1, %l2 the_thread = _Thread_Executing; 40007ae4: 29 10 00 7e sethi %hi(0x4001f800), %l4 40007ae8: f4 05 20 8c ld [ %l4 + 0x8c ], %i2 ! 4001f88c <_Thread_Executing> * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 40007aec: 7f ff eb 88 call 4000290c 40007af0: f2 06 a1 70 ld [ %i2 + 0x170 ], %i1 40007af4: a0 10 00 08 mov %o0, %l0 if ( *set & api->signals_pending ) { 40007af8: c4 06 00 00 ld [ %i0 ], %g2 40007afc: c2 06 60 c8 ld [ %i1 + 0xc8 ], %g1 40007b00: 80 88 80 01 btst %g2, %g1 40007b04: 12 80 00 42 bne 40007c0c 40007b08: 01 00 00 00 nop return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 40007b0c: 03 10 00 80 sethi %hi(0x40020000), %g1 40007b10: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 ! 40020010 <_POSIX_signals_Pending> 40007b14: 80 88 80 01 btst %g2, %g1 40007b18: 12 80 00 2c bne 40007bc8 40007b1c: 23 10 00 7d sethi %hi(0x4001f400), %l1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007b20: c2 04 63 b0 ld [ %l1 + 0x3b0 ], %g1 ! 4001f7b0 <_Thread_Dispatch_disable_level> the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 40007b24: 84 10 3f ff mov -1, %g2 40007b28: 82 00 60 01 inc %g1 40007b2c: c4 24 80 00 st %g2, [ %l2 ] 40007b30: c2 24 63 b0 st %g1, [ %l1 + 0x3b0 ] _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 40007b34: 82 10 20 04 mov 4, %g1 40007b38: c2 26 a0 34 st %g1, [ %i2 + 0x34 ] the_thread->Wait.option = *set; 40007b3c: c4 06 00 00 ld [ %i0 ], %g2 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007b40: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_argument = the_info; 40007b44: e4 26 a0 28 st %l2, [ %i2 + 0x28 ] the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; 40007b48: c4 26 a0 30 st %g2, [ %i2 + 0x30 ] } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 40007b4c: 21 10 00 7f sethi %hi(0x4001fc00), %l0 40007b50: a0 14 23 d0 or %l0, 0x3d0, %l0 ! 4001ffd0 <_POSIX_signals_Wait_queue> 40007b54: e0 26 a0 44 st %l0, [ %i2 + 0x44 ] 40007b58: c2 24 20 30 st %g1, [ %l0 + 0x30 ] the_thread->Wait.return_code = EINTR; the_thread->Wait.option = *set; the_thread->Wait.return_argument = the_info; _Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue ); _ISR_Enable( level ); 40007b5c: 7f ff eb 70 call 4000291c 40007b60: 01 00 00 00 nop _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 40007b64: 90 10 00 10 mov %l0, %o0 40007b68: 92 10 00 13 mov %l3, %o1 40007b6c: 15 10 00 31 sethi %hi(0x4000c400), %o2 40007b70: 40 00 11 86 call 4000c188 <_Thread_queue_Enqueue_with_handler> 40007b74: 94 12 a2 c8 or %o2, 0x2c8, %o2 ! 4000c6c8 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007b78: c2 04 63 b0 ld [ %l1 + 0x3b0 ], %g1 40007b7c: 82 00 7f ff add %g1, -1, %g1 40007b80: c2 24 63 b0 st %g1, [ %l1 + 0x3b0 ] 40007b84: c4 04 63 b0 ld [ %l1 + 0x3b0 ], %g2 40007b88: 80 a0 a0 00 cmp %g2, 0 40007b8c: 02 80 00 31 be 40007c50 40007b90: 94 10 00 12 mov %l2, %o2 /* * 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 ); 40007b94: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED 40007b98: 96 10 20 00 clr %o3 <== NOT EXECUTED 40007b9c: 98 10 20 00 clr %o4 <== NOT EXECUTED 40007ba0: 40 00 1f 62 call 4000f928 <_POSIX_signals_Clear_signals> <== NOT EXECUTED 40007ba4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED errno = _Thread_Executing->Wait.return_code; 40007ba8: 40 00 27 c4 call 40011ab8 <__errno> <== NOT EXECUTED 40007bac: 01 00 00 00 nop <== NOT EXECUTED 40007bb0: c2 05 20 8c ld [ %l4 + 0x8c ], %g1 <== NOT EXECUTED 40007bb4: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 40007bb8: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED return the_info->si_signo; 40007bbc: f0 04 80 00 ld [ %l2 ], %i0 <== NOT EXECUTED } 40007bc0: 81 c7 e0 08 ret <== NOT EXECUTED 40007bc4: 81 e8 00 00 restore <== NOT EXECUTED } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 40007bc8: 7f ff ff 9a call 40007a30 <_POSIX_signals_Get_highest> 40007bcc: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 40007bd0: 94 10 00 12 mov %l2, %o2 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 40007bd4: b0 10 00 08 mov %o0, %i0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 40007bd8: 96 10 20 01 mov 1, %o3 40007bdc: 90 10 00 19 mov %i1, %o0 40007be0: 92 10 00 18 mov %i0, %o1 40007be4: 40 00 1f 51 call 4000f928 <_POSIX_signals_Clear_signals> 40007be8: 98 10 20 00 clr %o4 _ISR_Enable( level ); 40007bec: 7f ff eb 4c call 4000291c 40007bf0: 90 10 00 10 mov %l0, %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 40007bf4: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 40007bf8: c0 24 a0 08 clr [ %l2 + 8 ] if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); _ISR_Enable( level ); the_info->si_signo = signo; 40007bfc: f0 24 80 00 st %i0, [ %l2 ] the_info->si_code = SI_USER; 40007c00: c2 24 a0 04 st %g1, [ %l2 + 4 ] 40007c04: 81 c7 e0 08 ret 40007c08: 81 e8 00 00 restore /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 40007c0c: 7f ff ff 89 call 40007a30 <_POSIX_signals_Get_highest> 40007c10: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( 40007c14: 94 10 00 12 mov %l2, %o2 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 40007c18: 92 10 00 08 mov %o0, %o1 _POSIX_signals_Clear_signals( 40007c1c: 96 10 20 00 clr %o3 40007c20: 90 10 00 19 mov %i1, %o0 /* API signals pending? */ _ISR_Disable( level ); if ( *set & api->signals_pending ) { /* XXX real info later */ the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending ); 40007c24: d2 24 80 00 st %o1, [ %l2 ] _POSIX_signals_Clear_signals( 40007c28: 40 00 1f 40 call 4000f928 <_POSIX_signals_Clear_signals> 40007c2c: 98 10 20 00 clr %o4 the_info->si_signo, the_info, FALSE, FALSE ); _ISR_Enable( level ); 40007c30: 7f ff eb 3b call 4000291c 40007c34: 90 10 00 10 mov %l0, %o0 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return the_info->si_signo; 40007c38: f0 04 80 00 ld [ %l2 ], %i0 FALSE, FALSE ); _ISR_Enable( level ); the_info->si_code = SI_USER; 40007c3c: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 40007c40: c0 24 a0 08 clr [ %l2 + 8 ] FALSE, FALSE ); _ISR_Enable( level ); the_info->si_code = SI_USER; 40007c44: c2 24 a0 04 st %g1, [ %l2 + 4 ] 40007c48: 81 c7 e0 08 ret 40007c4c: 81 e8 00 00 restore _Thread_Dispatch(); 40007c50: 40 00 0f de call 4000bbc8 <_Thread_Dispatch> 40007c54: 01 00 00 00 nop /* * 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 ); 40007c58: d2 04 80 00 ld [ %l2 ], %o1 40007c5c: 94 10 00 12 mov %l2, %o2 40007c60: 96 10 20 00 clr %o3 40007c64: 98 10 20 00 clr %o4 40007c68: 40 00 1f 30 call 4000f928 <_POSIX_signals_Clear_signals> 40007c6c: 90 10 00 19 mov %i1, %o0 errno = _Thread_Executing->Wait.return_code; 40007c70: 40 00 27 92 call 40011ab8 <__errno> 40007c74: 01 00 00 00 nop 40007c78: c2 05 20 8c ld [ %l4 + 0x8c ], %g1 40007c7c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40007c80: c4 22 00 00 st %g2, [ %o0 ] return the_info->si_signo; 40007c84: f0 04 80 00 ld [ %l2 ], %i0 } 40007c88: 81 c7 e0 08 ret 40007c8c: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 40007c90: 40 00 27 8a call 40011ab8 <__errno> 40007c94: b0 10 3f ff mov -1, %i0 40007c98: 82 10 20 16 mov 0x16, %g1 40007c9c: c2 22 00 00 st %g1, [ %o0 ] 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore 400099e0 : int sigwait( const sigset_t *set, int *sig ) { 400099e0: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 400099e4: 92 10 20 00 clr %o1 400099e8: 90 10 00 18 mov %i0, %o0 400099ec: 7f ff ff 75 call 400097c0 400099f0: 94 10 20 00 clr %o2 if ( status != -1 ) { 400099f4: 80 a2 3f ff cmp %o0, -1 400099f8: 02 80 00 07 be 40009a14 400099fc: 80 a6 60 00 cmp %i1, 0 if ( sig ) 40009a00: 02 80 00 03 be 40009a0c 40009a04: b0 10 20 00 clr %i0 *sig = status; 40009a08: d0 26 40 00 st %o0, [ %i1 ] 40009a0c: 81 c7 e0 08 ret 40009a10: 81 e8 00 00 restore return 0; } return errno; 40009a14: 40 00 27 c5 call 40013928 <__errno> <== NOT EXECUTED 40009a18: 01 00 00 00 nop <== NOT EXECUTED 40009a1c: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 40009a20: 81 c7 e0 08 ret <== NOT EXECUTED 40009a24: 81 e8 00 00 restore <== NOT EXECUTED 4000cab4 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 4000cab4: 9d e3 bf 98 save %sp, -104, %sp POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 4000cab8: 80 a6 20 01 cmp %i0, 1 4000cabc: 12 80 00 4a bne 4000cbe4 4000cac0: 80 a6 60 00 cmp %i1, 0 /* * The data of the structure evp are checked in order to verify if they * are coherent. */ if (evp != NULL) { 4000cac4: 02 80 00 0e be 4000cafc 4000cac8: 21 10 00 9c sethi %hi(0x40027000), %l0 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 4000cacc: c2 06 40 00 ld [ %i1 ], %g1 4000cad0: 82 00 7f ff add %g1, -1, %g1 4000cad4: 80 a0 60 01 cmp %g1, 1 4000cad8: 18 80 00 43 bgu 4000cbe4 4000cadc: 01 00 00 00 nop ( 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 ) 4000cae0: c2 06 60 04 ld [ %i1 + 4 ], %g1 4000cae4: 80 a0 60 00 cmp %g1, 0 4000cae8: 02 80 00 3f be 4000cbe4 4000caec: 82 00 7f ff add %g1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 4000caf0: 80 a0 60 1f cmp %g1, 0x1f 4000caf4: 18 80 00 3c bgu 4000cbe4 4000caf8: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000cafc: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000cb00: 82 00 60 01 inc %g1 4000cb04: c2 24 22 90 st %g1, [ %l0 + 0x290 ] * 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 ); 4000cb08: 31 10 00 9d sethi %hi(0x40027400), %i0 4000cb0c: 40 00 0b bd call 4000fa00 <_Objects_Allocate> 4000cb10: 90 16 22 5c or %i0, 0x25c, %o0 ! 4002765c <_POSIX_Timer_Information> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 4000cb14: 80 a2 20 00 cmp %o0, 0 4000cb18: 02 80 00 39 be 4000cbfc 4000cb1c: 82 10 20 02 mov 2, %g1 } /* 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; 4000cb20: 05 10 00 9c sethi %hi(0x40027000), %g2 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 4000cb24: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ] ptimer->thread_id = _Thread_Executing->Object.id; 4000cb28: c6 00 a3 6c ld [ %g2 + 0x36c ], %g3 if ( evp != NULL ) { 4000cb2c: 80 a6 60 00 cmp %i1, 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; 4000cb30: c2 00 e0 08 ld [ %g3 + 8 ], %g1 if ( evp != NULL ) { 4000cb34: 02 80 00 08 be 4000cb54 4000cb38: c2 22 20 38 st %g1, [ %o0 + 0x38 ] ptimer->inf.sigev_notify = evp->sigev_notify; ptimer->inf.sigev_signo = evp->sigev_signo; ptimer->inf.sigev_value = evp->sigev_value; 4000cb3c: c2 06 60 08 ld [ %i1 + 8 ], %g1 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 4000cb40: c4 06 40 00 ld [ %i1 ], %g2 ptimer->inf.sigev_signo = evp->sigev_signo; 4000cb44: c6 06 60 04 ld [ %i1 + 4 ], %g3 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 4000cb48: c4 22 20 40 st %g2, [ %o0 + 0x40 ] ptimer->inf.sigev_signo = evp->sigev_signo; 4000cb4c: c6 22 20 44 st %g3, [ %o0 + 0x44 ] ptimer->inf.sigev_value = evp->sigev_value; 4000cb50: c2 22 20 48 st %g1, [ %o0 + 0x48 ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000cb54: 88 16 22 5c or %i0, 0x25c, %g4 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000cb58: c6 02 20 08 ld [ %o0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000cb5c: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 } ptimer->overrun = 0; 4000cb60: c0 22 20 68 clr [ %o0 + 0x68 ] ptimer->timer_data.it_value.tv_sec = 0; 4000cb64: c0 22 20 5c clr [ %o0 + 0x5c ] ptimer->timer_data.it_value.tv_nsec = 0; 4000cb68: c0 22 20 60 clr [ %o0 + 0x60 ] ptimer->timer_data.it_interval.tv_sec = 0; 4000cb6c: c0 22 20 54 clr [ %o0 + 0x54 ] ptimer->timer_data.it_interval.tv_nsec = 0; 4000cb70: c0 22 20 58 clr [ %o0 + 0x58 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000cb74: c0 22 20 18 clr [ %o0 + 0x18 ] the_watchdog->routine = routine; 4000cb78: c0 22 20 2c clr [ %o0 + 0x2c ] the_watchdog->id = id; 4000cb7c: c0 22 20 30 clr [ %o0 + 0x30 ] 4000cb80: 03 00 00 3f sethi %hi(0xfc00), %g1 4000cb84: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000cb88: 82 08 c0 01 and %g3, %g1, %g1 4000cb8c: 80 a0 40 02 cmp %g1, %g2 4000cb90: 18 80 00 05 bgu 4000cba4 4000cb94: c0 22 20 34 clr [ %o0 + 0x34 ] information->local_table[ index ] = the_object; 4000cb98: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000cb9c: 83 28 60 02 sll %g1, 2, %g1 4000cba0: d0 20 80 01 st %o0, [ %g2 + %g1 ] _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open(&_POSIX_Timer_Information, &ptimer->Object, (Objects_Name) 0); *timerid = ptimer->Object.id; 4000cba4: c6 26 80 00 st %g3, [ %i2 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000cba8: c0 22 20 0c clr [ %o0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000cbac: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000cbb0: b0 10 20 00 clr %i0 4000cbb4: 82 00 7f ff add %g1, -1, %g1 4000cbb8: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000cbbc: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000cbc0: 80 a0 a0 00 cmp %g2, 0 4000cbc4: 02 80 00 04 be 4000cbd4 4000cbc8: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 4000cbcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000cbd0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000cbd4: 40 00 11 c8 call 400112f4 <_Thread_Dispatch> 4000cbd8: 01 00 00 00 nop 4000cbdc: 81 c7 e0 08 ret 4000cbe0: 81 e8 00 00 restore if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000cbe4: 40 00 2a e2 call 4001776c <__errno> <== NOT EXECUTED 4000cbe8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000cbec: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000cbf0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000cbf4: 81 c7 e0 08 ret <== NOT EXECUTED 4000cbf8: 81 e8 00 00 restore <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000cbfc: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 <== NOT EXECUTED 4000cc00: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000cc04: c2 24 22 90 st %g1, [ %l0 + 0x290 ] <== NOT EXECUTED 4000cc08: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 <== NOT EXECUTED 4000cc0c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000cc10: 02 80 00 08 be 4000cc30 <== NOT EXECUTED 4000cc14: 01 00 00 00 nop <== NOT EXECUTED * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 4000cc18: 40 00 2a d5 call 4001776c <__errno> <== NOT EXECUTED 4000cc1c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000cc20: 82 10 20 0b mov 0xb, %g1 <== NOT EXECUTED 4000cc24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000cc28: 81 c7 e0 08 ret <== NOT EXECUTED 4000cc2c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000cc30: 40 00 11 b1 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000cc34: 01 00 00 00 nop <== NOT EXECUTED 4000cc38: 30 bf ff f8 b,a 4000cc18 <== NOT EXECUTED 4000c9dc : */ int timer_delete( timer_t timerid ) { 4000c9dc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 4000c9e0: 21 10 00 9d sethi %hi(0x40027400), %l0 <== NOT EXECUTED 4000c9e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000c9e8: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000c9ec: 40 00 0d 56 call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000c9f0: 90 14 22 5c or %l0, 0x25c, %o0 <== NOT EXECUTED */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c9f4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000c9f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c9fc: 12 80 00 21 bne 4000ca80 <== NOT EXECUTED 4000ca00: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ca04: a0 14 22 5c or %l0, 0x25c, %l0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000ca08: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ca0c: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 <== NOT EXECUTED 4000ca10: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 4000ca14: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <== NOT EXECUTED 4000ca18: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4000ca1c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000ca20: 38 80 00 06 bgu,a 4000ca38 <== NOT EXECUTED 4000ca24: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ca28: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 4000ca2c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000ca30: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); ptimer->state = POSIX_TIMER_STATE_FREE; 4000ca34: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000ca38: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 4000ca3c: c2 2e 20 3c stb %g1, [ %i0 + 0x3c ] <== NOT EXECUTED (void) _Watchdog_Remove( &ptimer->Timer ); 4000ca40: 40 00 18 0d call 40012a74 <_Watchdog_Remove> <== NOT EXECUTED 4000ca44: 90 06 20 10 add %i0, 0x10, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 4000ca48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000ca4c: 40 00 0c fb call 4000fe38 <_Objects_Free> <== NOT EXECUTED 4000ca50: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ca54: 07 10 00 9c sethi %hi(0x40027000), %g3 <== NOT EXECUTED 4000ca58: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ca5c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ca60: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000ca64: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] <== NOT EXECUTED 4000ca68: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 <== NOT EXECUTED 4000ca6c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000ca70: 02 80 00 0d be 4000caa4 <== NOT EXECUTED 4000ca74: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000ca78: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca7c: 81 e8 00 00 restore <== NOT EXECUTED */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000ca80: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ca84: 18 bf ff fd bgu 4000ca78 <== NOT EXECUTED 4000ca88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000ca8c: 40 00 2b 38 call 4001776c <__errno> <== NOT EXECUTED 4000ca90: 01 00 00 00 nop <== NOT EXECUTED 4000ca94: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000ca98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ca9c: 81 c7 e0 08 ret <== NOT EXECUTED 4000caa0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000caa4: 40 00 12 14 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000caa8: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000caac: 81 c7 e0 08 ret <== NOT EXECUTED 4000cab0: 81 e8 00 00 restore <== NOT EXECUTED 4000c954 : */ int timer_getoverrun( timer_t timerid ) { 4000c954: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 4000c958: 11 10 00 9d sethi %hi(0x40027400), %o0 <== NOT EXECUTED 4000c95c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000c960: 90 12 22 5c or %o0, 0x25c, %o0 <== NOT EXECUTED 4000c964: 40 00 0d 78 call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000c968: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c96c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000c970: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c974: 12 80 00 0e bne 4000c9ac <== NOT EXECUTED 4000c978: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: overrun = ptimer->overrun; 4000c97c: f0 02 20 68 ld [ %o0 + 0x68 ], %i0 <== NOT EXECUTED ptimer->overrun = 0; 4000c980: c0 22 20 68 clr [ %o0 + 0x68 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000c984: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 4000c988: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000c98c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000c990: c4 20 62 90 st %g2, [ %g1 + 0x290 ] <== NOT EXECUTED 4000c994: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 <== NOT EXECUTED 4000c998: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000c99c: 02 80 00 0c be 4000c9cc <== NOT EXECUTED 4000c9a0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return overrun; } return -1; /* unreached - only to remove warnings */ } 4000c9a4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c9a8: 81 e8 00 00 restore <== NOT EXECUTED int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c9ac: 18 bf ff fe bgu 4000c9a4 <== NOT EXECUTED 4000c9b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000c9b4: 40 00 2b 6e call 4001776c <__errno> <== NOT EXECUTED 4000c9b8: 01 00 00 00 nop <== NOT EXECUTED 4000c9bc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000c9c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c9c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c9c8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000c9cc: 40 00 12 4a call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000c9d0: 01 00 00 00 nop <== NOT EXECUTED ptimer->overrun = 0; _Thread_Enable_dispatch(); return overrun; } return -1; /* unreached - only to remove warnings */ } 4000c9d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c9d8: 81 e8 00 00 restore <== NOT EXECUTED 4000c8a0 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 4000c8a0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; /* Reads the current time */ _TOD_Get( ¤t_time ); 4000c8a4: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4000c8a8: 40 00 0a 94 call 4000f2f8 <_TOD_Get> <== NOT EXECUTED 4000c8ac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED int timer_gettime( timer_t timerid, struct itimerspec *value ) { 4000c8b0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 4000c8b4: 11 10 00 9d sethi %hi(0x40027400), %o0 <== NOT EXECUTED 4000c8b8: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000c8bc: 40 00 0d a2 call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000c8c0: 90 12 22 5c or %o0, 0x25c, %o0 <== NOT EXECUTED /* Reads the current time */ _TOD_Get( ¤t_time ); ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c8c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000c8c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c8cc: 12 80 00 15 bne 4000c920 <== NOT EXECUTED 4000c8d0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ _Timespec_Subtract( 4000c8d4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000c8d8: 90 02 20 5c add %o0, 0x5c, %o0 <== NOT EXECUTED 4000c8dc: 40 00 17 04 call 400124ec <_Timespec_Subtract> <== NOT EXECUTED 4000c8e0: 94 06 60 08 add %i1, 8, %o2 <== NOT EXECUTED &ptimer->timer_data.it_value, ¤t_time, &value->it_value ); value->it_interval = ptimer->timer_data.it_interval; 4000c8e4: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000c8e8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED 4000c8ec: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED 4000c8f0: c4 26 60 04 st %g2, [ %i1 + 4 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000c8f4: 07 10 00 9c sethi %hi(0x40027000), %g3 <== NOT EXECUTED 4000c8f8: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000c8fc: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000c900: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c904: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] <== NOT EXECUTED 4000c908: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 <== NOT EXECUTED 4000c90c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000c910: 02 80 00 0d be 4000c944 <== NOT EXECUTED 4000c914: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000c918: 81 c7 e0 08 ret <== NOT EXECUTED 4000c91c: 81 e8 00 00 restore <== NOT EXECUTED /* Reads the current time */ _TOD_Get( ¤t_time ); ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c920: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000c924: 18 bf ff fd bgu 4000c918 <== NOT EXECUTED 4000c928: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000c92c: 40 00 2b 90 call 4001776c <__errno> <== NOT EXECUTED 4000c930: 01 00 00 00 nop <== NOT EXECUTED 4000c934: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000c938: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c93c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c940: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000c944: 40 00 12 6c call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000c948: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000c94c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c950: 81 e8 00 00 restore <== NOT EXECUTED 4000cc3c : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 4000cc3c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Timer_Control *ptimer; Objects_Locations location; boolean activated; if ( value == NULL ) { 4000cc40: 80 a6 a0 00 cmp %i2, 0 4000cc44: 02 80 00 29 be 4000cce8 4000cc48: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); } /* First, it verifies if the structure "value" is correct */ if ( ( value->it_value.tv_nsec > TOD_NANOSECONDS_PER_SECOND ) || 4000cc4c: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 4000cc50: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 4000cc54: 82 10 62 00 or %g1, 0x200, %g1 ! 3b9aca00 4000cc58: 80 a0 80 01 cmp %g2, %g1 4000cc5c: 18 80 00 23 bgu 4000cce8 4000cc60: 80 a6 60 04 cmp %i1, 4 rtems_set_errno_and_return_minus_one( EINVAL ); } /* XXX check for seconds in the past */ if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 4000cc64: 02 80 00 04 be 4000cc74 4000cc68: 80 a6 60 00 cmp %i1, 0 4000cc6c: 12 80 00 1f bne 4000cce8 4000cc70: 01 00 00 00 nop RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 4000cc74: 11 10 00 9d sethi %hi(0x40027400), %o0 4000cc78: 94 07 bf f4 add %fp, -12, %o2 4000cc7c: 40 00 0c b2 call 4000ff44 <_Objects_Get> 4000cc80: 90 12 22 5c or %o0, 0x25c, %o0 * something with the structure of times of the timer: to stop, start * or start it again */ ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000cc84: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000cc88: a0 10 00 08 mov %o0, %l0 4000cc8c: 80 a0 60 00 cmp %g1, 0 4000cc90: 12 80 00 1a bne 4000ccf8 4000cc94: b0 10 3f ff mov -1, %i0 case OBJECTS_ERROR: return -1; case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( value->it_value.tv_sec == 0 && value->it_value.tv_nsec == 0 ) { 4000cc98: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000cc9c: 80 a0 60 00 cmp %g1, 0 4000cca0: 12 80 00 06 bne 4000ccb8 4000cca4: 80 a6 60 00 cmp %i1, 0 4000cca8: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 <== NOT EXECUTED 4000ccac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ccb0: 02 80 00 5d be 4000ce24 <== NOT EXECUTED 4000ccb4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* absolute or relative? */ switch (flags) { 4000ccb8: 02 80 00 42 be 4000cdc0 4000ccbc: 80 a6 60 04 cmp %i1, 4 4000ccc0: 22 80 00 10 be,a 4000cd00 <== NOT EXECUTED 4000ccc4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ccc8: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 4000cccc: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ccd0: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000ccd4: c4 20 62 90 st %g2, [ %g1 + 0x290 ] <== NOT EXECUTED 4000ccd8: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 <== NOT EXECUTED 4000ccdc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000cce0: 02 80 00 6d be 4000ce94 <== NOT EXECUTED 4000cce4: 01 00 00 00 nop <== NOT EXECUTED _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); return 0; } _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 4000cce8: 40 00 2a a1 call 4001776c <__errno> <== NOT EXECUTED 4000ccec: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ccf0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000ccf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ccf8: 81 c7 e0 08 ret <== NOT EXECUTED 4000ccfc: 81 e8 00 00 restore <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cd00: 05 10 00 9c sethi %hi(0x40027000), %g2 <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000cd04: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cd08: c6 00 a3 48 ld [ %g2 + 0x348 ], %g3 <== NOT EXECUTED 4000cd0c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000cd10: c0 24 20 18 clr [ %l0 + 0x18 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cd14: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 4000cd18: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000cd1c: 03 10 00 32 sethi %hi(0x4000c800), %g1 <== NOT EXECUTED 4000cd20: 82 10 60 18 or %g1, 0x18, %g1 ! 4000c818 <_POSIX_Timer_TSR> <== NOT EXECUTED the_watchdog->id = id; the_watchdog->user_data = user_data; 4000cd24: e0 24 20 34 st %l0, [ %l0 + 0x34 ] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000cd28: c2 24 20 2c st %g1, [ %l0 + 0x2c ] <== NOT EXECUTED ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4000cd2c: 11 10 00 9c sethi %hi(0x40027000), %o0 <== NOT EXECUTED 4000cd30: 92 04 20 10 add %l0, 0x10, %o1 <== NOT EXECUTED 4000cd34: 40 00 16 e6 call 400128cc <_Watchdog_Insert> <== NOT EXECUTED 4000cd38: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED &ptimer->Timer, value->it_value.tv_sec - _TOD_Seconds_since_epoch ); /* Returns the old ones in "ovalue" */ if ( ovalue ) 4000cd3c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000cd40: 22 80 00 0b be,a 4000cd6c <== NOT EXECUTED 4000cd44: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; 4000cd48: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000cd4c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 4000cd50: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 <== NOT EXECUTED 4000cd54: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 4000cd58: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 4000cd5c: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 4000cd60: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000cd64: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED ptimer->timer_data = *value; 4000cd68: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 4000cd6c: 90 04 20 6c add %l0, 0x6c, %o0 /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000cd70: c4 24 20 54 st %g2, [ %l0 + 0x54 ] 4000cd74: c2 06 a0 04 ld [ %i2 + 4 ], %g1 4000cd78: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 4000cd7c: c4 06 a0 08 ld [ %i2 + 8 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000cd80: 82 10 20 03 mov 3, %g1 /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000cd84: c4 24 20 5c st %g2, [ %l0 + 0x5c ] 4000cd88: c6 06 a0 0c ld [ %i2 + 0xc ], %g3 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000cd8c: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] _TOD_Get( &ptimer->time ); 4000cd90: 40 00 09 5a call 4000f2f8 <_TOD_Get> 4000cd94: c6 24 20 60 st %g3, [ %l0 + 0x60 ] 4000cd98: 05 10 00 9c sethi %hi(0x40027000), %g2 4000cd9c: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000cda0: 82 00 7f ff add %g1, -1, %g1 4000cda4: c2 20 a2 90 st %g1, [ %g2 + 0x290 ] 4000cda8: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 4000cdac: 80 a0 e0 00 cmp %g3, 0 4000cdb0: 02 80 00 19 be 4000ce14 4000cdb4: 01 00 00 00 nop } _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } return -1; /* unreached - only to remove warnings */ } 4000cdb8: 81 c7 e0 08 ret <== NOT EXECUTED 4000cdbc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED break; /* The fire time is relative: use "rtems_time_fire_after" */ case POSIX_TIMER_RELATIVE: /* First, convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_value ); 4000cdc0: 40 00 15 e1 call 40012544 <_Timespec_To_ticks> 4000cdc4: 90 06 a0 08 add %i2, 8, %o0 activated = _Watchdog_Insert_ticks_helper( 4000cdc8: d4 04 20 08 ld [ %l0 + 8 ], %o2 break; /* The fire time is relative: use "rtems_time_fire_after" */ case POSIX_TIMER_RELATIVE: /* First, convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_value ); 4000cdcc: 92 10 00 08 mov %o0, %o1 4000cdd0: d0 24 20 64 st %o0, [ %l0 + 0x64 ] activated = _Watchdog_Insert_ticks_helper( 4000cdd4: 17 10 00 32 sethi %hi(0x4000c800), %o3 4000cdd8: 90 04 20 10 add %l0, 0x10, %o0 4000cddc: 96 12 e0 18 or %o3, 0x18, %o3 4000cde0: 7f ff fe 73 call 4000c7ac <_Watchdog_Insert_ticks_helper> 4000cde4: 98 10 00 10 mov %l0, %o4 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 4000cde8: 80 a2 20 00 cmp %o0, 0 4000cdec: 12 80 00 26 bne 4000ce84 4000cdf0: 80 a6 e0 00 cmp %i3, 0 4000cdf4: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 4000cdf8: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000cdfc: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000ce00: c4 20 62 90 st %g2, [ %g1 + 0x290 ] <== NOT EXECUTED 4000ce04: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 <== NOT EXECUTED 4000ce08: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000ce0c: 32 bf ff bb bne,a 4000ccf8 <== NOT EXECUTED 4000ce10: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000ce14: 40 00 11 38 call 400112f4 <_Thread_Dispatch> 4000ce18: b0 10 20 00 clr %i0 4000ce1c: 81 c7 e0 08 ret 4000ce20: 81 e8 00 00 restore case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( value->it_value.tv_sec == 0 && value->it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 4000ce24: 40 00 17 14 call 40012a74 <_Watchdog_Remove> <== NOT EXECUTED 4000ce28: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED /* The old data of the timer are returned */ if ( ovalue ) 4000ce2c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000ce30: 22 80 00 0b be,a 4000ce5c <== NOT EXECUTED 4000ce34: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED *ovalue = ptimer->timer_data; 4000ce38: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000ce3c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 4000ce40: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 <== NOT EXECUTED 4000ce44: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 4000ce48: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 4000ce4c: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 4000ce50: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000ce54: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = *value; 4000ce58: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000ce5c: c2 24 20 54 st %g1, [ %l0 + 0x54 ] <== NOT EXECUTED 4000ce60: c4 06 a0 04 ld [ %i2 + 4 ], %g2 <== NOT EXECUTED 4000ce64: c4 24 20 58 st %g2, [ %l0 + 0x58 ] <== NOT EXECUTED 4000ce68: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED 4000ce6c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] <== NOT EXECUTED 4000ce70: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000ce74: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED (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 = *value; 4000ce78: c4 24 20 60 st %g2, [ %l0 + 0x60 ] <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000ce7c: 10 bf ff c7 b 4000cd98 <== NOT EXECUTED 4000ce80: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return 0; } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) 4000ce84: 32 bf ff b2 bne,a 4000cd4c 4000ce88: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000ce8c: 10 bf ff b8 b 4000cd6c 4000ce90: c4 06 80 00 ld [ %i2 ], %g2 4000ce94: 40 00 11 18 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000ce98: 01 00 00 00 nop <== NOT EXECUTED 4000ce9c: 30 bf ff 93 b,a 4000cce8 <== NOT EXECUTED 4000d0f0 : int usleep( useconds_t useconds ) { 4000d0f0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4000d0f4: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 4000d0f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d0fc: 7f ff d1 be call 400017f4 <.udiv> <== NOT EXECUTED 4000d100: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000d104: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED { struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4000d108: d0 27 bf f0 st %o0, [ %fp + -16 ] <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000d10c: 40 00 5e af call 40024bc8 <.urem> <== NOT EXECUTED 4000d110: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d114: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 4000d118: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 4000d11c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000d120: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 4000d124: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED nanosleep( &tp, &tm ); 4000d128: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000d12c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED nanosleep( &tp, &tm ); 4000d130: 40 00 26 b5 call 40016c04 <== NOT EXECUTED 4000d134: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED remaining = tm.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4000d138: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4000d13c: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED 4000d140: 87 28 a0 03 sll %g2, 3, %g3 <== NOT EXECUTED 4000d144: 83 28 a0 08 sll %g2, 8, %g1 <== NOT EXECUTED 4000d148: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 4000d14c: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED 4000d150: b1 28 60 06 sll %g1, 6, %i0 <== NOT EXECUTED 4000d154: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 4000d158: 7f ff d1 a9 call 400017fc <.div> <== NOT EXECUTED 4000d15c: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 4000d160: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED remaining += tm.tv_nsec / 1000; return remaining; /* seconds remaining */ } 4000d164: 81 c7 e0 08 ret <== NOT EXECUTED 4000d168: 91 ea 00 18 restore %o0, %i0, %o0 <== NOT EXECUTED