=============================================================================== 000471a8 <_API_Mutex_Unlock>: #include void _API_Mutex_Unlock( API_Mutex_Control *the_mutex ) { 471a8: 4e56 0000 linkw %fp,#0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 471ac: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 471b2: 5280 addql #1,%d0 471b4: 206e 0008 moveal %fp@(8),%a0 471b8: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); _CORE_mutex_Surrender( 471be: 42a7 clrl %sp@- 471c0: 2f28 0008 movel %a0@(8),%sp@- 471c4: 4868 0010 pea %a0@(16) 471c8: 4eb9 0004 74b0 jsr 474b0 <_CORE_mutex_Surrender> &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 471ce: 4fef 000c lea %sp@(12),%sp } 471d2: 4e5e unlk %fp _CORE_mutex_Surrender( &the_mutex->Mutex, the_mutex->Object.id, NULL ); _Thread_Enable_dispatch(); 471d4: 4ef9 0004 8d8a jmp 48d8a <_Thread_Enable_dispatch> ... =============================================================================== 00047082 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 47082: 4e56 0000 linkw %fp,#0 47086: 2f0a movel %a2,%sp@- the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 47088: 2479 0006 0dc4 moveal 60dc4 <_API_extensions_List>,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 4708e: b5fc 0006 0dc8 cmpal #396744,%a2 47094: 6710 beqs 470a6 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN * Currently all APIs configure this hook so it is always non-NULL. */ #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); 47096: 206a 0008 moveal %a2@(8),%a0 4709a: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 4709c: 2452 moveal %a2@,%a2 void _API_extensions_Run_postdriver( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 4709e: b5fc 0006 0dc8 cmpal #396744,%a2 470a4: 66f0 bnes 47096 <_API_extensions_Run_postdriver+0x14> #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API) if ( the_extension->postdriver_hook ) #endif (*the_extension->postdriver_hook)(); } } 470a6: 246e fffc moveal %fp@(-4),%a2 470aa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000470ae <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 470ae: 4e56 0000 linkw %fp,#0 470b2: 2f0a movel %a2,%sp@- the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 470b4: 2479 0006 0dc4 moveal 60dc4 <_API_extensions_List>,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 470ba: b5fc 0006 0dc8 cmpal #396744,%a2 470c0: 6718 beqs 470da <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); 470c2: 2f39 0006 10d2 movel 610d2 <_Per_CPU_Information+0xc>,%sp@- 470c8: 206a 000c moveal %a2@(12),%a0 470cc: 4e90 jsr %a0@ Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 470ce: 2452 moveal %a2@,%a2 void _API_extensions_Run_postswitch( void ) { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _Chain_First( &_API_extensions_List ); 470d0: 588f addql #4,%sp 470d2: b5fc 0006 0dc8 cmpal #396744,%a2 470d8: 66e8 bnes 470c2 <_API_extensions_Run_postswitch+0x14> the_extension = (API_extensions_Control *) the_node; (*the_extension->postswitch_hook)( _Thread_Executing ); } } 470da: 246e fffc moveal %fp@(-4),%a2 470de: 4e5e unlk %fp ... =============================================================================== 000499ec <_CORE_RWLock_Obtain_for_writing>: * 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 ); 499ec: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 499f2: 4e56 fff4 linkw %fp,#-12 499f6: 206e 0008 moveal %fp@(8),%a0 499fa: 48d7 001c moveml %d2-%d4,%sp@ 499fe: 282e 000c movel %fp@(12),%d4 49a02: 262e 0014 movel %fp@(20),%d3 ISR_Level level; Thread_Control *executing = _Thread_Executing; 49a06: 2279 0006 4236 moveal 64236 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_RWLock_API_mp_support_callout api_rwlock_mp_support ) { 49a0c: 142e 0013 moveb %fp@(19),%d2 * 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 ); 49a10: 40c1 movew %sr,%d1 49a12: 8081 orl %d1,%d0 49a14: 46c0 movew %d0,%sr switch ( the_rwlock->current_state ) { 49a16: 4aa8 0044 tstl %a0@(68) 49a1a: 6614 bnes 49a30 <_CORE_RWLock_Obtain_for_writing+0x44> case CORE_RWLOCK_UNLOCKED: the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 49a1c: 7002 moveq #2,%d0 49a1e: 2140 0044 movel %d0,%a0@(68) _ISR_Enable( level ); 49a22: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 49a24: 42a9 0034 clrl %a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49a28: 4cd7 001c moveml %sp@,%d2-%d4 49a2c: 4e5e unlk %fp 49a2e: 4e75 rts /* * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { 49a30: 4a02 tstb %d2 49a32: 6610 bnes 49a44 <_CORE_RWLock_Obtain_for_writing+0x58> _ISR_Enable( level ); 49a34: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49a36: 7002 moveq #2,%d0 _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49a38: 4cd7 001c moveml %sp@,%d2-%d4 * If the thread is not willing to wait, then return immediately. */ if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49a3c: 2340 0034 movel %d0,%a1@(52) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49a40: 4e5e unlk %fp 49a42: 4e75 rts 49a44: 7001 moveq #1,%d0 49a46: 2140 0030 movel %d0,%a0@(48) /* * We need to wait to enter this critical section */ _Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue ); executing->Wait.queue = &the_rwlock->Wait_queue; 49a4a: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 49a4e: 2344 0020 movel %d4,%a1@(32) executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; 49a52: 2340 0030 movel %d0,%a1@(48) executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 49a56: 42a9 0034 clrl %a1@(52) _ISR_Enable( level ); 49a5a: 46c1 movew %d1,%sr _Thread_queue_Enqueue_with_handler( 49a5c: 2d43 000c movel %d3,%fp@(12) 49a60: 203c 0004 9b58 movel #301912,%d0 49a66: 2d48 0008 movel %a0,%fp@(8) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49a6a: 4cd7 001c moveml %sp@,%d2-%d4 executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 49a6e: 2d40 0010 movel %d0,%fp@(16) _CORE_RWLock_Timeout ); /* return to API level so it can dispatch and we block */ } 49a72: 4e5e unlk %fp executing->Wait.id = id; executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE; executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; _ISR_Enable( level ); _Thread_queue_Enqueue_with_handler( 49a74: 4ef9 0004 b818 jmp 4b818 <_Thread_queue_Enqueue_with_handler> ... =============================================================================== 00049a7c <_CORE_RWLock_Release>: * 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 ); 49a7c: 203c 0000 0700 movel #1792,%d0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 49a82: 4e56 fff0 linkw %fp,#-16 ISR_Level level; Thread_Control *executing = _Thread_Executing; 49a86: 2079 0006 4236 moveal 64236 <_Per_CPU_Information+0xc>,%a0 */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 49a8c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49a90: 246e 0008 moveal %fp@(8),%a2 * 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 ); 49a94: 40c1 movew %sr,%d1 49a96: 8081 orl %d1,%d0 49a98: 46c0 movew %d0,%sr if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ 49a9a: 202a 0044 movel %a2@(68),%d0 49a9e: 6700 0090 beqw 49b30 <_CORE_RWLock_Release+0xb4> _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { 49aa2: 7401 moveq #1,%d2 49aa4: b480 cmpl %d0,%d2 49aa6: 676e beqs 49b16 <_CORE_RWLock_Release+0x9a> return CORE_RWLOCK_SUCCESSFUL; } } /* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */ executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 49aa8: 42a8 0034 clrl %a0@(52) /* * Implicitly transition to "unlocked" and find another thread interested * in obtaining this rwlock. */ the_rwlock->current_state = CORE_RWLOCK_UNLOCKED; 49aac: 42aa 0044 clrl %a2@(68) _ISR_Enable( level ); 49ab0: 46c1 movew %d1,%sr next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 49ab2: 2f0a movel %a2,%sp@- 49ab4: 4eb9 0004 b6a0 jsr 4b6a0 <_Thread_queue_Dequeue> if ( next ) { 49aba: 588f addql #4,%sp 49abc: 4a80 tstl %d0 49abe: 674a beqs 49b0a <_CORE_RWLock_Release+0x8e> if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 49ac0: 7201 moveq #1,%d1 49ac2: 2040 moveal %d0,%a0 49ac4: b2a8 0030 cmpl %a0@(48),%d1 49ac8: 677c beqs 49b46 <_CORE_RWLock_Release+0xca> /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 49aca: 7201 moveq #1,%d1 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 49acc: 52aa 0048 addql #1,%a2@(72) 49ad0: 47f9 0004 bbbc lea 4bbbc <_Thread_queue_First>,%a3 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; _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 49ad6: 49f9 0004 ba64 lea 4ba64 <_Thread_queue_Extract>,%a4 /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 49adc: 2541 0044 movel %d1,%a2@(68) /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 49ae0: 2f0a movel %a2,%sp@- 49ae2: 4e93 jsr %a3@ if ( !next || 49ae4: 588f addql #4,%sp 49ae6: 4a80 tstl %d0 49ae8: 6720 beqs 49b0a <_CORE_RWLock_Release+0x8e> 49aea: 7401 moveq #1,%d2 49aec: 2040 moveal %d0,%a0 49aee: b4a8 0030 cmpl %a0@(48),%d2 49af2: 6716 beqs 49b0a <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 49af4: 52aa 0048 addql #1,%a2@(72) _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 49af8: 2f00 movel %d0,%sp@- 49afa: 2f0a movel %a2,%sp@- 49afc: 4e94 jsr %a4@ } 49afe: 508f addql #8,%sp /* * Now see if more readers can be let go. */ while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); 49b00: 2f0a movel %a2,%sp@- 49b02: 4e93 jsr %a3@ if ( !next || 49b04: 588f addql #4,%sp 49b06: 4a80 tstl %d0 49b08: 66e0 bnes 49aea <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49b0a: 4280 clrl %d0 49b0c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49b12: 4e5e unlk %fp 49b14: 4e75 rts _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; } if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) { the_rwlock->number_of_readers -= 1; 49b16: 202a 0048 movel %a2@(72),%d0 49b1a: 5380 subql #1,%d0 49b1c: 2540 0048 movel %d0,%a2@(72) if ( the_rwlock->number_of_readers != 0 ) { 49b20: 6786 beqs 49aa8 <_CORE_RWLock_Release+0x2c> /* must be unlocked again */ _ISR_Enable( level ); 49b22: 46c1 movew %d1,%sr } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49b24: 4280 clrl %d0 49b26: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49b2c: 4e5e unlk %fp 49b2e: 4e75 rts * If any thread is waiting, then we wait. */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); 49b30: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49b32: 103c 0002 moveb #2,%d0 } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49b36: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 */ _ISR_Disable( level ); if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){ _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 49b3c: 2140 0034 movel %d0,%a0@(52) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49b40: 4280 clrl %d0 49b42: 4e5e unlk %fp 49b44: 4e75 rts 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; 49b46: 7002 moveq #2,%d0 49b48: 2540 0044 movel %d0,%a2@(68) } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 49b4c: 4280 clrl %d0 49b4e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49b54: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b58 <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 49b58: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49b5c: 486e fffc pea %fp@(-4) 49b60: 2f2e 0008 movel %fp@(8),%sp@- 49b64: 4eb9 0004 b338 jsr 4b338 <_Thread_Get> switch ( location ) { 49b6a: 508f addql #8,%sp 49b6c: 4aae fffc tstl %fp@(-4) 49b70: 6618 bnes 49b8a <_CORE_RWLock_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 49b72: 2f00 movel %d0,%sp@- 49b74: 4eb9 0004 bcf8 jsr 4bcf8 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 49b7a: 588f addql #4,%sp 49b7c: 2039 0006 3dcc movel 63dcc <_Thread_Dispatch_disable_level>,%d0 49b82: 5380 subql #1,%d0 49b84: 23c0 0006 3dcc movel %d0,63dcc <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 49b8a: 4e5e unlk %fp ... =============================================================================== 0004855c <_CORE_barrier_Wait>: Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 4855c: 203c 0000 0700 movel #1792,%d0 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 48562: 4e56 fff4 linkw %fp,#-12 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; 48566: 2279 0006 2976 moveal 62976 <_Per_CPU_Information+0xc>,%a1 Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 4856c: 48d7 001c moveml %d2-%d4,%sp@ 48570: 206e 0008 moveal %fp@(8),%a0 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; 48574: 42a9 0034 clrl %a1@(52) Objects_Id id, bool wait, Watchdog_Interval timeout, CORE_barrier_API_mp_support_callout api_barrier_mp_support ) { 48578: 242e 000c movel %fp@(12),%d2 4857c: 262e 0014 movel %fp@(20),%d3 48580: 282e 0018 movel %fp@(24),%d4 Thread_Control *executing; ISR_Level level; executing = _Thread_Executing; executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL; _ISR_Disable( level ); 48584: 40c1 movew %sr,%d1 48586: 8081 orl %d1,%d0 48588: 46c0 movew %d0,%sr the_barrier->number_of_waiting_threads++; 4858a: 2028 0048 movel %a0@(72),%d0 4858e: 5280 addql #1,%d0 48590: 2140 0048 movel %d0,%a0@(72) if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { 48594: 4aa8 0040 tstl %a0@(64) 48598: 6606 bnes 485a0 <_CORE_barrier_Wait+0x44> if ( the_barrier->number_of_waiting_threads == 4859a: b0a8 0044 cmpl %a0@(68),%d0 4859e: 672e beqs 485ce <_CORE_barrier_Wait+0x72> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 485a0: 7001 moveq #1,%d0 485a2: 2140 0030 movel %d0,%a0@(48) return; } } _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; 485a6: 2348 0044 movel %a0,%a1@(68) executing->Wait.id = id; 485aa: 2342 0020 movel %d2,%a1@(32) _ISR_Enable( level ); 485ae: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 485b0: 2d43 000c movel %d3,%fp@(12) 485b4: 203c 0004 a94c movel #305484,%d0 485ba: 2d48 0008 movel %a0,%fp@(8) } 485be: 4cd7 001c moveml %sp@,%d2-%d4 _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 485c2: 2d40 0010 movel %d0,%fp@(16) } 485c6: 4e5e unlk %fp _Thread_queue_Enter_critical_section( &the_barrier->Wait_queue ); executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); 485c8: 4ef9 0004 a588 jmp 4a588 <_Thread_queue_Enqueue_with_handler> _ISR_Disable( level ); the_barrier->number_of_waiting_threads++; if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; 485ce: 7001 moveq #1,%d0 485d0: 2340 0034 movel %d0,%a1@(52) _ISR_Enable( level ); 485d4: 46c1 movew %d1,%sr _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 485d6: 2d44 0010 movel %d4,%fp@(16) 485da: 2d42 000c movel %d2,%fp@(12) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 485de: 4cd7 001c moveml %sp@,%d2-%d4 if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 485e2: 2d48 0008 movel %a0,%fp@(8) executing->Wait.queue = &the_barrier->Wait_queue; executing->Wait.id = id; _ISR_Enable( level ); _Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout ); } 485e6: 4e5e unlk %fp if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) { if ( the_barrier->number_of_waiting_threads == the_barrier->Attributes.maximum_count) { executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED; _ISR_Enable( level ); _CORE_barrier_Release( the_barrier, id, api_barrier_mp_support ); 485e8: 4ef9 0004 dad4 jmp 4dad4 <_CORE_barrier_Release> ... =============================================================================== 0005a128 <_CORE_message_queue_Broadcast>: Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 5a128: 4e56 ffe0 linkw %fp,#-32 5a12c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5a130: 266e 0008 moveal %fp@(8),%a3 5a134: 282e 000c movel %fp@(12),%d4 5a138: 242e 0010 movel %fp@(16),%d2 5a13c: 2a2e 001c movel %fp@(28),%d5 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 5a140: b4ab 004c cmpl %a3@(76),%d2 5a144: 6262 bhis 5a1a8 <_CORE_message_queue_Broadcast+0x80> * 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 ) { 5a146: 4aab 0048 tstl %a3@(72) 5a14a: 664c bnes 5a198 <_CORE_message_queue_Broadcast+0x70><== NEVER TAKEN /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a14c: 2f0b movel %a3,%sp@- 5a14e: 49f9 0005 cd5c lea 5cd5c <_Thread_queue_Dequeue>,%a4 * 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 ) { 5a154: 4283 clrl %d3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5a156: 4bf9 0006 2ed8 lea 62ed8 ,%a5 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a15c: 4e94 jsr %a4@ 5a15e: 588f addql #4,%sp 5a160: 2440 moveal %d0,%a2 5a162: 4a80 tstl %d0 5a164: 6722 beqs 5a188 <_CORE_message_queue_Broadcast+0x60> 5a166: 2f02 movel %d2,%sp@- _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 5a168: 5283 addql #1,%d3 5a16a: 2f04 movel %d4,%sp@- 5a16c: 2f2a 002c movel %a2@(44),%sp@- 5a170: 4e95 jsr %a5@ buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 5a172: 206a 0028 moveal %a2@(40),%a0 5a176: 4fef 000c lea %sp@(12),%sp 5a17a: 2082 movel %d2,%a0@ /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 5a17c: 2f0b movel %a3,%sp@- 5a17e: 4e94 jsr %a4@ 5a180: 588f addql #4,%sp 5a182: 2440 moveal %d0,%a2 5a184: 4a80 tstl %d0 5a186: 66de bnes 5a166 <_CORE_message_queue_Broadcast+0x3e> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5a188: 2045 moveal %d5,%a0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5a18a: 4280 clrl %d0 if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 5a18c: 2083 movel %d3,%a0@ return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a18e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a194: 4e5e unlk %fp 5a196: 4e75 rts * 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 ) { *count = 0; 5a198: 2045 moveal %d5,%a0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5a19a: 4280 clrl %d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a19c: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 * 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 ) { *count = 0; 5a1a2: 4290 clrl %a0@ #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a1a4: 4e5e unlk %fp 5a1a6: 4e75 rts Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 5a1a8: 7001 moveq #1,%d0 #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 5a1aa: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a1b0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004db04 <_CORE_message_queue_Close>: void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 4db04: 4e56 0000 linkw %fp,#0 4db08: 2f0a movel %a2,%sp@- /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4db0a: 2f2e 0010 movel %fp@(16),%sp@- 4db0e: 2f2e 000c movel %fp@(12),%sp@- void _CORE_message_queue_Close( CORE_message_queue_Control *the_message_queue, Thread_queue_Flush_callout remote_extract_callout, uint32_t status ) { 4db12: 246e 0008 moveal %fp@(8),%a2 /* * This will flush blocked threads whether they were blocked on * a send or receive. */ _Thread_queue_Flush( 4db16: 2f0a movel %a2,%sp@- 4db18: 4eb9 0004 a154 jsr 4a154 <_Thread_queue_Flush> * This removes all messages from the pending message queue. Since * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) 4db1e: 4fef 000c lea %sp@(12),%sp 4db22: 4aaa 0048 tstl %a2@(72) 4db26: 6612 bnes 4db3a <_CORE_message_queue_Close+0x36> (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4db28: 2d6a 005c 0008 movel %a2@(92),%fp@(8) } 4db2e: 246e fffc moveal %fp@(-4),%a2 4db32: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4db34: 4ef9 0004 ab86 jmp 4ab86 <_Workspace_Free> * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 4db3a: 2f0a movel %a2,%sp@- 4db3c: 4eb9 0004 db58 jsr 4db58 <_CORE_message_queue_Flush_support> (void) _Workspace_Free( the_message_queue->message_buffers ); 4db42: 2d6a 005c 0008 movel %a2@(92),%fp@(8) * we just flushed all waiting threads, we don't have to worry about * the flush satisfying any blocked senders as a side-effect. */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); 4db48: 588f addql #4,%sp (void) _Workspace_Free( the_message_queue->message_buffers ); } 4db4a: 246e fffc moveal %fp@(-4),%a2 4db4e: 4e5e unlk %fp */ if ( the_message_queue->number_of_pending_messages != 0 ) (void) _CORE_message_queue_Flush_support( the_message_queue ); (void) _Workspace_Free( the_message_queue->message_buffers ); 4db50: 4ef9 0004 ab86 jmp 4ab86 <_Workspace_Free> ... =============================================================================== 00050460 <_CORE_message_queue_Initialize>: /* * 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)) { 50460: 7203 moveq #3,%d1 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { 50462: 4e56 fff4 linkw %fp,#-12 50466: 202e 0014 movel %fp@(20),%d0 5046a: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5046e: 246e 0008 moveal %fp@(8),%a2 50472: 242e 0010 movel %fp@(16),%d2 /* * 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)) { 50476: c280 andl %d0,%d1 ) { size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 50478: 2542 0044 movel %d2,%a2@(68) the_message_queue->number_of_pending_messages = 0; 5047c: 42aa 0048 clrl %a2@(72) the_message_queue->maximum_message_size = maximum_message_size; 50480: 2540 004c movel %d0,%a2@(76) CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 50484: 42aa 0060 clrl %a2@(96) the_message_queue->notify_argument = the_argument; 50488: 42aa 0064 clrl %a2@(100) /* * 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)) { 5048c: 4a81 tstl %d1 5048e: 6718 beqs 504a8 <_CORE_message_queue_Initialize+0x48> allocated_message_size += sizeof(uint32_t); 50490: 2200 movel %d0,%d1 50492: 5881 addql #4,%d1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 50494: 76fc moveq #-4,%d3 50496: c283 andl %d3,%d1 } if (allocated_message_size < maximum_message_size) 50498: b280 cmpl %d0,%d1 5049a: 640e bccs 504aa <_CORE_message_queue_Initialize+0x4a><== ALWAYS TAKEN STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 5049c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) return false; 504a2: 4200 clrb %d0 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } 504a4: 4e5e unlk %fp 504a6: 4e75 rts /* * 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)) { 504a8: 2200 movel %d0,%d1 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); 504aa: 2601 movel %d1,%d3 504ac: 0683 0000 0014 addil #20,%d3 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * 504b2: 2003 movel %d3,%d0 504b4: 4c02 0800 mulsl %d2,%d0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 504b8: b280 cmpl %d0,%d1 504ba: 62e0 bhis 5049c <_CORE_message_queue_Initialize+0x3c><== NEVER TAKEN /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); 504bc: 2f00 movel %d0,%sp@- 504be: 4eb9 0005 34ca jsr 534ca <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) 504c4: 588f addql #4,%sp return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) 504c6: 2540 005c movel %d0,%a2@(92) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 504ca: 67d0 beqs 5049c <_CORE_message_queue_Initialize+0x3c> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 504cc: 2f03 movel %d3,%sp@- 504ce: 2f02 movel %d2,%sp@- 504d0: 2f00 movel %d0,%sp@- 504d2: 486a 0068 pea %a2@(104) 504d6: 4eb9 0005 5d64 jsr 55d64 <_Chain_Initialize> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 504dc: 41ea 0054 lea %a2@(84),%a0 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 504e0: 7001 moveq #1,%d0 504e2: 2548 0050 movel %a0,%a2@(80) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 504e6: 41ea 0050 lea %a2@(80),%a0 504ea: 2548 0058 movel %a0,%a2@(88) 504ee: 4878 0006 pea 6 504f2: 4878 0080 pea 80 504f6: 206e 000c moveal %fp@(12),%a0 Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 504fa: 42aa 0054 clrl %a2@(84) 504fe: b090 cmpl %a0@,%d0 50500: 57c0 seq %d0 50502: 49c0 extbl %d0 50504: 4480 negl %d0 50506: 2f00 movel %d0,%sp@- 50508: 2f0a movel %a2,%sp@- 5050a: 4eb9 0005 2af0 jsr 52af0 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 50510: 4fef 0020 lea %sp@(32),%sp } 50514: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; 5051a: 7001 moveq #1,%d0 } 5051c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00055dd8 <_CORE_message_queue_Insert_message>: void _CORE_message_queue_Insert_message( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message, CORE_message_queue_Submit_types submit_type ) { 55dd8: 4e56 fff4 linkw %fp,#-12 55ddc: 226e 000c moveal %fp@(12),%a1 55de0: 202e 0010 movel %fp@(16),%d0 55de4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 55de8: 206e 0008 moveal %fp@(8),%a0 55dec: 2340 0008 movel %d0,%a1@(8) _CORE_message_queue_Append_unprotected(the_message_queue, the_message); else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { 55df0: 0c80 7fff ffff cmpil #2147483647,%d0 55df6: 677a beqs 55e72 <_CORE_message_queue_Insert_message+0x9a> _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { 55df8: 0c80 8000 0000 cmpil #-2147483648,%d0 55dfe: 6700 00a8 beqw 55ea8 <_CORE_message_queue_Insert_message+0xd0> RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 55e02: 2208 movel %a0,%d1 55e04: 0681 0000 0054 addil #84,%d1 * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); #endif } 55e0a: 2468 0050 moveal %a0@(80),%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 55e0e: b5c1 cmpal %d1,%a2 55e10: 670c beqs 55e1e <_CORE_message_queue_Insert_message+0x46> this_message = (CORE_message_queue_Buffer_control *) the_node; this_priority = _CORE_message_queue_Get_message_priority(this_message); if ( this_priority <= the_priority ) { 55e12: b0aa 0008 cmpl %a2@(8),%d0 55e16: 6d06 blts 55e1e <_CORE_message_queue_Insert_message+0x46> the_node = the_node->next; 55e18: 2452 moveal %a2@,%a2 int the_priority; the_priority = _CORE_message_queue_Get_message_priority(the_message); the_header = &the_message_queue->Pending_messages; the_node = _Chain_First( the_header ); while ( !_Chain_Is_tail( the_header, the_node ) ) { 55e1a: b5c1 cmpal %d1,%a2 55e1c: 66f4 bnes 55e12 <_CORE_message_queue_Insert_message+0x3a> the_node = the_node->next; continue; } break; } _ISR_Disable( level ); 55e1e: 203c 0000 0700 movel #1792,%d0 55e24: 40c1 movew %sr,%d1 55e26: 8081 orl %d1,%d0 55e28: 46c0 movew %d0,%sr SET_NOTIFY(); 55e2a: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55e2e: 2400 movel %d0,%d2 55e30: 5282 addql #1,%d2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55e32: 4a80 tstl %d0 55e34: 57c0 seq %d0 break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); 55e36: 246a 0004 moveal %a2@(4),%a2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55e3a: 4480 negl %d0 } break; } _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55e3c: 2142 0048 movel %d2,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55e40: 2652 moveal %a2@,%a3 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 55e42: 234a 0004 movel %a2,%a1@(4) before_node = after_node->next; after_node->next = the_node; 55e46: 2489 movel %a1,%a2@ the_node->next = before_node; before_node->previous = the_node; 55e48: 2749 0004 movel %a1,%a3@(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; 55e4c: 228b movel %a3,%a1@ _Chain_Insert_unprotected( the_node->previous, &the_message->Node ); _ISR_Enable( level ); 55e4e: 46c1 movew %d1,%sr /* * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) 55e50: 4a00 tstb %d0 55e52: 6716 beqs 55e6a <_CORE_message_queue_Insert_message+0x92> 55e54: 2268 0060 moveal %a0@(96),%a1 55e58: 4a89 tstl %a1 55e5a: 670e beqs 55e6a <_CORE_message_queue_Insert_message+0x92> (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55e5c: 2d68 0064 0008 movel %a0@(100),%fp@(8) #endif } 55e62: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55e66: 4e5e unlk %fp * According to POSIX, does this happen before or after the message * is actually enqueued. It is logical to think afterwards, because * the message is actually in the queue at this point. */ if ( notify && the_message_queue->notify_handler ) (*the_message_queue->notify_handler)(the_message_queue->notify_argument); 55e68: 4ed1 jmp %a1@ #endif } 55e6a: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 55e6e: 4e5e unlk %fp 55e70: 4e75 rts else _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); 55e72: 203c 0000 0700 movel #1792,%d0 55e78: 40c1 movew %sr,%d1 55e7a: 8081 orl %d1,%d0 55e7c: 46c0 movew %d0,%sr SET_NOTIFY(); 55e7e: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55e82: 2400 movel %d0,%d2 55e84: 5282 addql #1,%d2 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 55e86: 47e8 0054 lea %a0@(84),%a3 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55e8a: 4a80 tstl %d0 55e8c: 57c0 seq %d0 _ISR_Enable( level ); #else if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55e8e: 2142 0048 movel %d2,%a0@(72) Chain_Node *old_last = tail->previous; 55e92: 2468 0058 moveal %a0@(88),%a2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55e96: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Append_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { Chain_Node *tail = _Chain_Tail( the_chain ); 55e98: 228b movel %a3,%a1@ Chain_Node *old_last = tail->previous; the_node->next = tail; tail->previous = the_node; 55e9a: 2149 0058 movel %a1,%a0@(88) old_last->next = the_node; 55e9e: 2489 movel %a1,%a2@ the_node->previous = old_last; 55ea0: 234a 0004 movel %a2,%a1@(4) if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55ea4: 46c1 movew %d1,%sr 55ea6: 60a8 bras 55e50 <_CORE_message_queue_Insert_message+0x78> } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); 55ea8: 203c 0000 0700 movel #1792,%d0 55eae: 40c1 movew %sr,%d1 55eb0: 8081 orl %d1,%d0 55eb2: 46c0 movew %d0,%sr SET_NOTIFY(); 55eb4: 2028 0048 movel %a0@(72),%d0 the_message_queue->number_of_pending_messages++; 55eb8: 2400 movel %d0,%d2 55eba: 5282 addql #1,%d2 RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 55ebc: 47e8 0050 lea %a0@(80),%a3 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55ec0: 4a80 tstl %d0 55ec2: 57c0 seq %d0 _CORE_message_queue_Append_unprotected(the_message_queue, the_message); _ISR_Enable( level ); } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; 55ec4: 2142 0048 movel %d2,%a0@(72) ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 55ec8: 2468 0050 moveal %a0@(80),%a2 * * INTERRUPT LATENCY: * insert */ void _CORE_message_queue_Insert_message( 55ecc: 4480 negl %d0 RTEMS_INLINE_ROUTINE void _Chain_Prepend_unprotected( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert_unprotected(_Chain_Head(the_chain), the_node); 55ece: 234b 0004 movel %a3,%a1@(4) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; after_node->next = the_node; 55ed2: 2149 0050 movel %a1,%a0@(80) the_node->next = before_node; before_node->previous = the_node; 55ed6: 2549 0004 movel %a1,%a2@(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; 55eda: 228a movel %a2,%a1@ } else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) { _ISR_Disable( level ); SET_NOTIFY(); the_message_queue->number_of_pending_messages++; _CORE_message_queue_Prepend_unprotected(the_message_queue, the_message); _ISR_Enable( level ); 55edc: 46c1 movew %d1,%sr 55ede: 6000 ff70 braw 55e50 <_CORE_message_queue_Insert_message+0x78> ... =============================================================================== 00050520 <_CORE_message_queue_Seize>: CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); 50520: 203c 0000 0700 movel #1792,%d0 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50526: 4e56 ffe8 linkw %fp,#-24 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; 5052a: 2279 0006 b08a moveal 6b08a <_Per_CPU_Information+0xc>,%a1 void *buffer, size_t *size_p, bool wait, Watchdog_Interval timeout ) { 50530: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 50534: 246e 0008 moveal %fp@(8),%a2 50538: 282e 000c movel %fp@(12),%d4 5053c: 262e 0010 movel %fp@(16),%d3 50540: 206e 0014 moveal %fp@(20),%a0 50544: 286e 001c moveal %fp@(28),%a4 50548: 142e 001b moveb %fp@(27),%d2 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *executing; executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5054c: 42a9 0034 clrl %a1@(52) _ISR_Disable( level ); 50550: 40c1 movew %sr,%d1 50552: 8081 orl %d1,%d0 50554: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 50556: 200a movel %a2,%d0 50558: 0680 0000 0054 addil #84,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 5055e: 266a 0050 moveal %a2@(80),%a3 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 50562: b08b cmpl %a3,%d0 50564: 6700 0088 beqw 505ee <_CORE_message_queue_Seize+0xce> Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 50568: 2253 moveal %a3@,%a1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_first_unprotected( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 5056a: 49ea 0050 lea %a2@(80),%a4 5056e: 234c 0004 movel %a4,%a1@(4) executing = _Thread_Executing; executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; _ISR_Disable( level ); the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; 50572: 53aa 0048 subql #1,%a2@(72) Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 50576: 2549 0050 movel %a1,%a2@(80) _ISR_Enable( level ); 5057a: 46c1 movew %d1,%sr *size_p = the_message->Contents.size; _Thread_Executing->Wait.count = 5057c: 2279 0006 b08a moveal 6b08a <_Per_CPU_Information+0xc>,%a1 _CORE_message_queue_Get_message_priority( the_message ); _CORE_message_queue_Copy_buffer( the_message->Contents.buffer, 50582: 240b movel %a3,%d2 50584: 0682 0000 0010 addil #16,%d2 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 5058a: 49f9 0005 8ad4 lea 58ad4 ,%a4 the_message = _CORE_message_queue_Get_pending_message( the_message_queue ); if ( the_message != NULL ) { the_message_queue->number_of_pending_messages -= 1; _ISR_Enable( level ); *size_p = the_message->Contents.size; 50590: 20ab 000c movel %a3@(12),%a0@ _Thread_Executing->Wait.count = 50594: 236b 0008 0024 movel %a3@(8),%a1@(36) 5059a: 2f10 movel %a0@,%sp@- 5059c: 2f02 movel %d2,%sp@- 5059e: 2f03 movel %d3,%sp@- 505a0: 4e94 jsr %a4@ * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 505a2: 2f0a movel %a2,%sp@- 505a4: 4eb9 0005 26c0 jsr 526c0 <_Thread_queue_Dequeue> if ( !the_thread ) { 505aa: 4fef 0010 lea %sp@(16),%sp * is not, then we can go ahead and free the buffer. * * NOTE: If we note that the queue was not full before this receive, * then we can avoid this dequeue. */ the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 505ae: 2040 moveal %d0,%a0 if ( !the_thread ) { 505b0: 4a80 tstl %d0 505b2: 6700 0088 beqw 5063c <_CORE_message_queue_Seize+0x11c> */ _CORE_message_queue_Set_message_priority( the_message, the_thread->Wait.count ); the_message->Contents.size = (size_t) the_thread->Wait.option; 505b6: 2028 0030 movel %a0@(48),%d0 CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 505ba: 2768 0024 0008 movel %a0@(36),%a3@(8) 505c0: 2740 000c movel %d0,%a3@(12) const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 505c4: 2f00 movel %d0,%sp@- 505c6: 2f28 002c movel %a0@(44),%sp@- 505ca: 2f02 movel %d2,%sp@- 505cc: 4e94 jsr %a4@ the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 505ce: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 505d4: 4fef 000c lea %sp@(12),%sp 505d8: 2d4b 000c movel %a3,%fp@(12) 505dc: 2d4a 0008 movel %a2,%fp@(8) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 505e0: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 505e6: 4e5e unlk %fp the_thread->Wait.return_argument_second.immutable_object, the_message->Contents.buffer, the_message->Contents.size ); _CORE_message_queue_Insert_message( 505e8: 4ef9 0005 5dd8 jmp 55dd8 <_CORE_message_queue_Insert_message> return; } #endif } if ( !wait ) { 505ee: 4a02 tstb %d2 505f0: 6612 bnes 50604 <_CORE_message_queue_Seize+0xe4> _ISR_Enable( level ); 505f2: 46c1 movew %d1,%sr executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 505f4: 7004 moveq #4,%d0 executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 505f6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 #endif } if ( !wait ) { _ISR_Enable( level ); executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; 505fc: 2340 0034 movel %d0,%a1@(52) executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } 50600: 4e5e unlk %fp 50602: 4e75 rts RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 50604: 7001 moveq #1,%d0 50606: 2540 0030 movel %d0,%a2@(48) } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; 5060a: 2343 002c movel %d3,%a1@(44) executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT; return; } _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 5060e: 234a 0044 movel %a2,%a1@(68) executing->Wait.id = id; 50612: 2344 0020 movel %d4,%a1@(32) executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; 50616: 2348 0028 movel %a0,%a1@(40) /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); 5061a: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 5061c: 2d4c 000c movel %a4,%fp@(12) 50620: 49f9 0005 2bfc lea 52bfc <_Thread_queue_Timeout>,%a4 50626: 2d4a 0008 movel %a2,%fp@(8) 5062a: 2d4c 0010 movel %a4,%fp@(16) } 5062e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50634: 4e5e unlk %fp executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level ); _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 50636: 4ef9 0005 2838 jmp 52838 <_Thread_queue_Enqueue_with_handler> RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer ( CORE_message_queue_Control *the_message_queue, CORE_message_queue_Buffer_control *the_message ) { _Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node ); 5063c: 45ea 0068 lea %a2@(104),%a2 50640: 2d4b 000c movel %a3,%fp@(12) 50644: 2d4a 0008 movel %a2,%fp@(8) } 50648: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5064e: 4e5e unlk %fp 50650: 4ef9 0005 0394 jmp 50394 <_Chain_Append> ... =============================================================================== 00050658 <_CORE_message_queue_Submit>: #endif CORE_message_queue_Submit_types submit_type, bool wait, Watchdog_Interval timeout ) { 50658: 4e56 ffec linkw %fp,#-20 5065c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50660: 246e 0008 moveal %fp@(8),%a2 50664: 242e 0010 movel %fp@(16),%d2 50668: 282e 001c movel %fp@(28),%d4 5066c: 162e 0023 moveb %fp@(35),%d3 CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 50670: b4aa 004c cmpl %a2@(76),%d2 50674: 6228 bhis 5069e <_CORE_message_queue_Submit+0x46> } /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 50676: 202a 0048 movel %a2@(72),%d0 5067a: 672e beqs 506aa <_CORE_message_queue_Submit+0x52> /* * 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 < 5067c: b0aa 0044 cmpl %a2@(68),%d0 50680: 6500 00ba bcsw 5073c <_CORE_message_queue_Submit+0xe4> /* * 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 ) { 50684: 4a03 tstb %d3 50686: 6700 00f4 beqw 5077c <_CORE_message_queue_Submit+0x124> /* * 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() ) { 5068a: 4ab9 0006 b086 tstl 6b086 <_Per_CPU_Information+0x8> 50690: 6754 beqs 506e6 <_CORE_message_queue_Submit+0x8e> return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED; 50692: 7003 moveq #3,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50694: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5069a: 4e5e unlk %fp 5069c: 4e75 rts { CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 5069e: 7001 moveq #1,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 506a0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 506a6: 4e5e unlk %fp 506a8: 4e75 rts /* * 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 ); 506aa: 2f0a movel %a2,%sp@- 506ac: 4eb9 0005 26c0 jsr 526c0 <_Thread_queue_Dequeue> if ( the_thread ) { 506b2: 588f addql #4,%sp /* * 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 ); 506b4: 2640 moveal %d0,%a3 if ( the_thread ) { 506b6: 4a80 tstl %d0 506b8: 6700 00ce beqw 50788 <_CORE_message_queue_Submit+0x130> const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 506bc: 2f02 movel %d2,%sp@- 506be: 2f2e 000c movel %fp@(12),%sp@- 506c2: 2f2b 002c movel %a3@(44),%sp@- 506c6: 4eb9 0005 8ad4 jsr 58ad4 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 506cc: 206b 0028 moveal %a3@(40),%a0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 506d0: 4fef 000c lea %sp@(12),%sp 506d4: 4280 clrl %d0 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 506d6: 2082 movel %d2,%a0@ the_thread->Wait.count = (uint32_t) submit_type; 506d8: 2744 0024 movel %d4,%a3@(36) _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 506dc: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 506e2: 4e5e unlk %fp 506e4: 4e75 rts * Thus the unusual choice to open a new scope and declare * it as a variable. Doing this emphasizes how dangerous it * would be to use this variable prior to here. */ { Thread_Control *executing = _Thread_Executing; 506e6: 2079 0006 b08a moveal 6b08a <_Per_CPU_Information+0xc>,%a0 ISR_Level level; _ISR_Disable( level ); 506ec: 203c 0000 0700 movel #1792,%d0 506f2: 40c1 movew %sr,%d1 506f4: 8081 orl %d1,%d0 506f6: 46c0 movew %d0,%sr 506f8: 7001 moveq #1,%d0 506fa: 2540 0030 movel %d0,%a2@(48) _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; 506fe: 202e 000c movel %fp@(12),%d0 ISR_Level level; _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; 50702: 216e 0014 0020 movel %fp@(20),%a0@(32) Thread_Control *executing = _Thread_Executing; ISR_Level level; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 50708: 214a 0044 movel %a2,%a0@(68) executing->Wait.id = id; executing->Wait.return_argument_second.immutable_object = buffer; 5070c: 2140 002c movel %d0,%a0@(44) executing->Wait.option = (uint32_t) size; 50710: 2142 0030 movel %d2,%a0@(48) executing->Wait.count = submit_type; 50714: 2144 0024 movel %d4,%a0@(36) _ISR_Enable( level ); 50718: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 5071a: 4879 0005 2bfc pea 52bfc <_Thread_queue_Timeout> 50720: 2f2e 0024 movel %fp@(36),%sp@- 50724: 2f0a movel %a2,%sp@- 50726: 4eb9 0005 2838 jsr 52838 <_Thread_queue_Enqueue_with_handler> } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; 5072c: 4fef 000c lea %sp@(12),%sp 50730: 7007 moveq #7,%d0 #endif } 50732: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50738: 4e5e unlk %fp 5073a: 4e75 rts _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) _Chain_Get( &the_message_queue->Inactive_messages ); 5073c: 486a 0068 pea %a2@(104) 50740: 4eb9 0005 03f4 jsr 503f4 <_Chain_Get> 50746: 2640 moveal %d0,%a3 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 50748: 2f02 movel %d2,%sp@- 5074a: 2f2e 000c movel %fp@(12),%sp@- 5074e: 486b 0010 pea %a3@(16) 50752: 4eb9 0005 8ad4 jsr 58ad4 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 50758: 2742 000c movel %d2,%a3@(12) CORE_message_queue_Buffer_control *the_message, int priority ) { #if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY) the_message->priority = priority; 5075c: 2744 0008 movel %d4,%a3@(8) _CORE_message_queue_Set_message_priority( the_message, submit_type ); _CORE_message_queue_Insert_message( 50760: 2f04 movel %d4,%sp@- 50762: 2f0b movel %a3,%sp@- 50764: 2f0a movel %a2,%sp@- 50766: 4eb9 0005 5dd8 jsr 55dd8 <_CORE_message_queue_Insert_message> the_message_queue, the_message, submit_type ); return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 5076c: 4fef 001c lea %sp@(28),%sp 50770: 4280 clrl %d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 50772: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50778: 4e5e unlk %fp 5077a: 4e75 rts * 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 ) { return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY; 5077c: 7002 moveq #2,%d0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; #endif } 5077e: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50784: 4e5e unlk %fp 50786: 4e75 rts /* * 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 ) { 50788: 202a 0048 movel %a2@(72),%d0 /* * 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 < 5078c: b0aa 0044 cmpl %a2@(68),%d0 50790: 6400 fef2 bccw 50684 <_CORE_message_queue_Submit+0x2c> 50794: 60a6 bras 5073c <_CORE_message_queue_Submit+0xe4> ... =============================================================================== 00047400 <_CORE_mutex_Seize>: Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 47400: 4e56 0000 linkw %fp,#0 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 47404: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 Objects_Id _id, bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { 4740a: 2f0a movel %a2,%sp@- 4740c: 246e 0008 moveal %fp@(8),%a2 47410: 2f02 movel %d2,%sp@- 47412: 142e 0013 moveb %fp@(19),%d2 _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 47416: 4a80 tstl %d0 47418: 6704 beqs 4741e <_CORE_mutex_Seize+0x1e> 4741a: 4a02 tstb %d2 4741c: 6634 bnes 47452 <_CORE_mutex_Seize+0x52> <== ALWAYS TAKEN 4741e: 486e 0018 pea %fp@(24) 47422: 2f0a movel %a2,%sp@- 47424: 4eb9 0004 c81c jsr 4c81c <_CORE_mutex_Seize_interrupt_trylock> 4742a: 508f addql #8,%sp 4742c: 4a80 tstl %d0 4742e: 6716 beqs 47446 <_CORE_mutex_Seize+0x46> 47430: 4a02 tstb %d2 47432: 6636 bnes 4746a <_CORE_mutex_Seize+0x6a> 47434: 202e 0018 movel %fp@(24),%d0 47438: 46c0 movew %d0,%sr 4743a: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 47440: 7001 moveq #1,%d0 47442: 2140 0034 movel %d0,%a0@(52) } 47446: 242e fff8 movel %fp@(-8),%d2 4744a: 246e fffc moveal %fp@(-4),%a2 4744e: 4e5e unlk %fp 47450: 4e75 rts bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 47452: 7001 moveq #1,%d0 47454: b0b9 0006 0db4 cmpl 60db4 <_System_state_Current>,%d0 4745a: 64c2 bccs 4741e <_CORE_mutex_Seize+0x1e> 4745c: 4878 0012 pea 12 47460: 42a7 clrl %sp@- 47462: 42a7 clrl %sp@- 47464: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4746a: 7001 moveq #1,%d0 4746c: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 47472: 2540 0030 movel %d0,%a2@(48) 47476: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 4747c: 5280 addql #1,%d0 4747e: 216e 000c 0020 movel %fp@(12),%a0@(32) 47484: 214a 0044 movel %a2,%a0@(68) 47488: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> 4748e: 202e 0018 movel %fp@(24),%d0 47492: 46c0 movew %d0,%sr 47494: 2f2e 0014 movel %fp@(20),%sp@- 47498: 2f0a movel %a2,%sp@- 4749a: 4eb9 0004 7374 jsr 47374 <_CORE_mutex_Seize_interrupt_blocking> } 474a0: 242e fff8 movel %fp@(-8),%d2 bool _wait, Watchdog_Interval _timeout, ISR_Level _level ) { _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level ); 474a4: 508f addql #8,%sp } 474a6: 246e fffc moveal %fp@(-4),%a2 474aa: 4e5e unlk %fp ... =============================================================================== 00047604 <_CORE_semaphore_Surrender>: CORE_semaphore_Status _CORE_semaphore_Surrender( CORE_semaphore_Control *the_semaphore, Objects_Id id, CORE_semaphore_API_mp_support_callout api_semaphore_mp_support ) { 47604: 4e56 0000 linkw %fp,#0 47608: 2f0a movel %a2,%sp@- 4760a: 246e 0008 moveal %fp@(8),%a2 ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) { 4760e: 2f0a movel %a2,%sp@- 47610: 4eb9 0004 9118 jsr 49118 <_Thread_queue_Dequeue> 47616: 588f addql #4,%sp 47618: 4a80 tstl %d0 4761a: 670a beqs 47626 <_CORE_semaphore_Surrender+0x22> status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 4761c: 246e fffc moveal %fp@(-4),%a2 { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 47620: 4280 clrl %d0 status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); } return status; } 47622: 4e5e unlk %fp 47624: 4e75 rts if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_semaphore_mp_support) ( the_thread, id ); #endif } else { _ISR_Disable( level ); 47626: 303c 0700 movew #1792,%d0 4762a: 40c1 movew %sr,%d1 4762c: 8081 orl %d1,%d0 4762e: 46c0 movew %d0,%sr if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) 47630: 202a 0048 movel %a2@(72),%d0 47634: b0aa 0040 cmpl %a2@(64),%d0 47638: 6412 bccs 4764c <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN the_semaphore->count += 1; 4763a: 5280 addql #1,%d0 4763c: 2540 0048 movel %d0,%a2@(72) { Thread_Control *the_thread; ISR_Level level; CORE_semaphore_Status status; status = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 47640: 4280 clrl %d0 _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; _ISR_Enable( level ); 47642: 46c1 movew %d1,%sr } return status; } 47644: 246e fffc moveal %fp@(-4),%a2 47648: 4e5e unlk %fp 4764a: 4e75 rts } else { _ISR_Disable( level ); if ( the_semaphore->count < the_semaphore->Attributes.maximum_count ) the_semaphore->count += 1; else status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED; 4764c: 7004 moveq #4,%d0 <== NOT EXECUTED _ISR_Enable( level ); 4764e: 46c1 movew %d1,%sr <== NOT EXECUTED 47650: 60f2 bras 47644 <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED ... =============================================================================== 0004c7a8 <_Chain_Initialize>: Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c7a8: 4e56 ffec linkw %fp,#-20 4c7ac: 202e 0010 movel %fp@(16),%d0 4c7b0: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c7b4: 246e 0008 moveal %fp@(8),%a2 size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4c7b8: 280a movel %a2,%d4 4c7ba: 5884 addql #4,%d4 Chain_Control *the_chain, void *starting_address, size_t number_nodes, size_t node_size ) { 4c7bc: 262e 000c movel %fp@(12),%d3 4c7c0: 242e 0014 movel %fp@(20),%d2 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; 4c7c4: 42aa 0004 clrl %a2@(4) while ( count-- ) { 4c7c8: 4a80 tstl %d0 4c7ca: 6740 beqs 4c80c <_Chain_Initialize+0x64> <== NEVER TAKEN { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; Chain_Node *next = starting_address; 4c7cc: 2043 moveal %d3,%a0 ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4c7ce: 224a moveal %a2,%a1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c7d0: 5380 subql #1,%d0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c7d2: 2208 movel %a0,%d1 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c7d4: 2a00 movel %d0,%d5 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c7d6: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4c7d8: 2288 movel %a0,%a1@ next->previous = current; 4c7da: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c7de: 4a80 tstl %d0 4c7e0: 6714 beqs 4c7f6 <_Chain_Initialize+0x4e> 4c7e2: 2248 moveal %a0,%a1 current->next = next; next->previous = current; current = next; next = (Chain_Node *) 4c7e4: 2041 moveal %d1,%a0 * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c7e6: 2208 movel %a0,%d1 4c7e8: 5380 subql #1,%d0 4c7ea: d282 addl %d2,%d1 Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { current->next = next; 4c7ec: 2288 movel %a0,%a1@ next->previous = current; 4c7ee: 2149 0004 movel %a1,%a0@(4) Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c7f2: 4a80 tstl %d0 4c7f4: 66ec bnes 4c7e2 <_Chain_Initialize+0x3a> * node_size - size of node in bytes * * Output parameters: NONE */ void _Chain_Initialize( 4c7f6: 4c05 2800 mulsl %d5,%d2 Chain_Node *current = head; Chain_Node *next = starting_address; head->previous = NULL; while ( count-- ) { 4c7fa: 2043 moveal %d3,%a0 4c7fc: d1c2 addal %d2,%a0 next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; tail->previous = current; 4c7fe: 2548 0008 movel %a0,%a2@(8) current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4c802: 2084 movel %d4,%a0@ tail->previous = current; } 4c804: 4cd7 043c moveml %sp@,%d2-%d5/%a2 4c808: 4e5e unlk %fp 4c80a: 4e75 rts ) { size_t count = number_nodes; Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); Chain_Node *current = head; 4c80c: 204a moveal %a2,%a0 <== NOT EXECUTED next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; tail->previous = current; 4c80e: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED current = next; next = (Chain_Node *) _Addresses_Add_offset( (void *) next, node_size ); } current->next = tail; 4c812: 2084 movel %d4,%a0@ <== NOT EXECUTED tail->previous = current; } 4c814: 4cd7 043c moveml %sp@,%d2-%d5/%a2 <== NOT EXECUTED 4c818: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000462b4 <_Event_Surrender>: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); 462b4: 203c 0000 0700 movel #1792,%d0 */ void _Event_Surrender( Thread_Control *the_thread ) { 462ba: 4e56 ffec linkw %fp,#-20 462be: 48d7 043c moveml %d2-%d5/%a2,%sp@ 462c2: 246e 0008 moveal %fp@(8),%a2 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 ]; 462c6: 206a 00fe moveal %a2@(254),%a0 option_set = (rtems_option) the_thread->Wait.option; 462ca: 282a 0030 movel %a2@(48),%d4 _ISR_Disable( level ); 462ce: 40c3 movew %sr,%d3 462d0: 8083 orl %d3,%d0 462d2: 46c0 movew %d0,%sr pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count; 462d4: 222a 0024 movel %a2@(36),%d1 RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get( rtems_event_set the_event_set, rtems_event_set the_event_condition ) { return ( the_event_set & the_event_condition ); 462d8: 2001 movel %d1,%d0 api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; option_set = (rtems_option) the_thread->Wait.option; _ISR_Disable( level ); pending_events = api->pending_events; 462da: 2410 movel %a0@,%d2 462dc: c082 andl %d2,%d0 seized_events = _Event_sets_Get( pending_events, event_condition ); /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { 462de: 6776 beqs 46356 <_Event_Surrender+0xa2> /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && 462e0: 4ab9 0006 10ce tstl 610ce <_Per_CPU_Information+0x8> 462e6: 670a beqs 462f2 <_Event_Surrender+0x3e> 462e8: b5f9 0006 10d2 cmpal 610d2 <_Per_CPU_Information+0xc>,%a2 462ee: 6700 00a0 beqw 46390 <_Event_Surrender+0xdc> */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_EVENT); 462f2: 2a2a 0010 movel %a2@(16),%d5 462f6: 0285 0000 0100 andil #256,%d5 } /* * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 462fc: 674c beqs 4634a <_Event_Surrender+0x96> if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 462fe: b081 cmpl %d1,%d0 46300: 6706 beqs 46308 <_Event_Surrender+0x54> 46302: 0804 0001 btst #1,%d4 46306: 6742 beqs 4634a <_Event_Surrender+0x96> <== NEVER TAKEN RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear( rtems_event_set the_event_set, rtems_event_set the_mask ) { return ( the_event_set & ~(the_mask) ); 46308: 2200 movel %d0,%d1 4630a: 4681 notl %d1 4630c: c282 andl %d2,%d1 4630e: 2081 movel %d1,%a0@ 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; 46310: 206a 0028 moveal %a2@(40),%a0 * Otherwise, this is a normal send to another thread */ if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 46314: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 46318: 2080 movel %d0,%a0@ _ISR_Flash( level ); 4631a: 203c 0000 0700 movel #1792,%d0 46320: 46c3 movew %d3,%sr 46322: 8083 orl %d3,%d0 46324: 46c0 movew %d0,%sr if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 46326: 7a02 moveq #2,%d5 46328: baaa 0050 cmpl %a2@(80),%d5 4632c: 6734 beqs 46362 <_Event_Surrender+0xae> _ISR_Enable( level ); 4632e: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 46330: 2f3c 1003 fff8 movel #268697592,%sp@- 46336: 2f0a movel %a2,%sp@- 46338: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> 4633e: 508f addql #8,%sp } return; } } _ISR_Enable( level ); } 46340: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46346: 4e5e unlk %fp 46348: 4e75 rts _Thread_Unblock( the_thread ); } return; } } _ISR_Enable( level ); 4634a: 46c3 movew %d3,%sr } 4634c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46352: 4e5e unlk %fp 46354: 4e75 rts /* * No events were seized in this operation */ if ( _Event_sets_Is_empty( seized_events ) ) { _ISR_Enable( level ); 46356: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 46358: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4635e: 4e5e unlk %fp 46360: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 46362: 7003 moveq #3,%d0 46364: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 46368: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4636a: 486a 0048 pea %a2@(72) 4636e: 4eb9 0004 9da0 jsr 49da0 <_Watchdog_Remove> 46374: 2f3c 1003 fff8 movel #268697592,%sp@- 4637a: 2f0a movel %a2,%sp@- 4637c: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> 46382: 4fef 000c lea %sp@(12),%sp } return; } } _ISR_Enable( level ); } 46386: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4638c: 4e5e unlk %fp 4638e: 4e75 rts * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 46390: 2279 0006 14a4 moveal 614a4 <_Event_Sync_state>,%a1 /* * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && 46396: 7a02 moveq #2,%d5 46398: ba89 cmpl %a1,%d5 4639a: 6710 beqs 463ac <_Event_Surrender+0xf8> <== NEVER TAKEN ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { 4639c: 2279 0006 14a4 moveal 614a4 <_Event_Sync_state>,%a1 * If we are in an ISR and sending to the current thread, then * we have a critical section issue to deal with. */ if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || 463a2: 1a3c 0001 moveb #1,%d5 463a6: ba89 cmpl %a1,%d5 463a8: 6600 ff48 bnew 462f2 <_Event_Surrender+0x3e> (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 463ac: b081 cmpl %d1,%d0 463ae: 6706 beqs 463b6 <_Event_Surrender+0x102> 463b0: 0804 0001 btst #1,%d4 463b4: 671a beqs 463d0 <_Event_Surrender+0x11c> <== NEVER TAKEN 463b6: 2200 movel %d0,%d1 463b8: 4681 notl %d1 463ba: c282 andl %d2,%d1 463bc: 2081 movel %d1,%a0@ 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; 463be: 206a 0028 moveal %a2@(40),%a0 _Thread_Is_executing( the_thread ) && ((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || (_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 463c2: 42aa 0024 clrl %a2@(36) *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 463c6: 2080 movel %d0,%a0@ _Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED; 463c8: 7003 moveq #3,%d0 463ca: 23c0 0006 14a4 movel %d0,614a4 <_Event_Sync_state> } _ISR_Enable( level ); 463d0: 46c3 movew %d3,%sr } return; } } _ISR_Enable( level ); } 463d2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 463d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000463dc <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 463dc: 4e56 fffc linkw %fp,#-4 463e0: 2f03 movel %d3,%sp@- 463e2: 2f02 movel %d2,%sp@- Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); 463e4: 486e fffc pea %fp@(-4) 463e8: 2f2e 0008 movel %fp@(8),%sp@- 463ec: 4eb9 0004 8db0 jsr 48db0 <_Thread_Get> switch ( location ) { 463f2: 508f addql #8,%sp 463f4: 4aae fffc tstl %fp@(-4) 463f8: 6642 bnes 4643c <_Event_Timeout+0x60> <== NEVER TAKEN * * 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 ); 463fa: 223c 0000 0700 movel #1792,%d1 46400: 40c2 movew %sr,%d2 46402: 8282 orl %d2,%d1 46404: 46c1 movew %d1,%sr _ISR_Enable( level ); return; } #endif the_thread->Wait.count = 0; 46406: 2040 moveal %d0,%a0 46408: 42a8 0024 clrl %a0@(36) if ( _Thread_Is_executing( the_thread ) ) { 4640c: b0b9 0006 10d2 cmpl 610d2 <_Per_CPU_Information+0xc>,%d0 46412: 6734 beqs 46448 <_Event_Timeout+0x6c> if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 46414: 7606 moveq #6,%d3 46416: 2040 moveal %d0,%a0 46418: 2143 0034 movel %d3,%a0@(52) _ISR_Enable( level ); 4641c: 46c2 movew %d2,%sr 4641e: 2f3c 1003 fff8 movel #268697592,%sp@- 46424: 2f00 movel %d0,%sp@- 46426: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 4642c: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4642e: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 46434: 5380 subql #1,%d0 46436: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 4643c: 242e fff4 movel %fp@(-12),%d2 46440: 262e fff8 movel %fp@(-8),%d3 46444: 4e5e unlk %fp 46446: 4e75 rts } #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) 46448: 2239 0006 14a4 movel 614a4 <_Event_Sync_state>,%d1 4644e: 7601 moveq #1,%d3 46450: b681 cmpl %d1,%d3 46452: 66c0 bnes 46414 <_Event_Timeout+0x38> _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; 46454: 7606 moveq #6,%d3 46456: 2040 moveal %d0,%a0 #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 46458: 7202 moveq #2,%d1 } the_thread->Wait.return_code = RTEMS_TIMEOUT; 4645a: 2143 0034 movel %d3,%a0@(52) #endif the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4645e: 23c1 0006 14a4 movel %d1,614a4 <_Event_Sync_state> } the_thread->Wait.return_code = RTEMS_TIMEOUT; _ISR_Enable( level ); 46464: 46c2 movew %d2,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 46466: 2f3c 1003 fff8 movel #268697592,%sp@- 4646c: 2f00 movel %d0,%sp@- 4646e: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> _Thread_Unblock( the_thread ); _Thread_Unnest_dispatch(); break; 46474: 508f addql #8,%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 46476: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 4647c: 5380 subql #1,%d0 4647e: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> 46484: 60b6 bras 4643c <_Event_Timeout+0x60> ... =============================================================================== 0004c9c4 <_Heap_Allocate_aligned_with_boundary>: Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c9c4: 4e56 ffcc linkw %fp,#-52 4c9c8: 226e 000c moveal %fp@(12),%a1 4c9cc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c9d0: 246e 0008 moveal %fp@(8),%a2 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE 4c9d4: 2e09 movel %a1,%d7 4c9d6: 5887 addql #4,%d7 - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c9d8: 202a 0010 movel %a2@(16),%d0 Heap_Control *heap, uintptr_t alloc_size, uintptr_t alignment, uintptr_t boundary ) { 4c9dc: 222e 0010 movel %fp@(16),%d1 4c9e0: 282e 0014 movel %fp@(20),%d4 Heap_Statistics *const stats = &heap->stats; uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE - HEAP_ALLOC_BONUS; uintptr_t const page_size = heap->page_size; 4c9e4: 2d40 fffc movel %d0,%fp@(-4) Heap_Block *block = NULL; uintptr_t alloc_begin = 0; uint32_t search_count = 0; bool search_again = false; if ( block_size_floor < alloc_size ) { 4c9e8: be89 cmpl %a1,%d7 4c9ea: 6500 014e bcsw 4cb3a <_Heap_Allocate_aligned_with_boundary+0x176> /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { 4c9ee: 4a84 tstl %d4 4c9f0: 6600 0144 bnew 4cb36 <_Heap_Allocate_aligned_with_boundary+0x172> if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4c9f4: 206a 0008 moveal %a2@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4c9f8: b1ca cmpal %a2,%a0 4c9fa: 6700 013e beqw 4cb3a <_Heap_Allocate_aligned_with_boundary+0x176> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4c9fe: 242e fffc movel %fp@(-4),%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4ca02: 7c04 moveq #4,%d6 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4ca04: 5e82 addql #7,%d2 + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4ca06: 9c89 subl %a1,%d6 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4ca08: 7601 moveq #1,%d3 4ca0a: 2647 moveal %d7,%a3 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4ca0c: 2d42 fff8 movel %d2,%fp@(-8) + HEAP_BLOCK_HEADER_SIZE + page_size - 1; uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; 4ca10: 2d46 fff4 movel %d6,%fp@(-12) /* * The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag * field. Thus the value is about one unit larger than the real block * size. The greater than operator takes this into account. */ if ( block->size_and_flag > block_size_floor ) { 4ca14: 2028 0004 movel %a0@(4),%d0 4ca18: b08b cmpl %a3,%d0 4ca1a: 630e blss 4ca2a <_Heap_Allocate_aligned_with_boundary+0x66> if ( alignment == 0 ) { 4ca1c: 4a81 tstl %d1 4ca1e: 661c bnes 4ca3c <_Heap_Allocate_aligned_with_boundary+0x78> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4ca20: 2408 movel %a0,%d2 4ca22: 5082 addql #8,%d2 } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 4ca24: 4a82 tstl %d2 4ca26: 6600 00de bnew 4cb06 <_Heap_Allocate_aligned_with_boundary+0x142> break; } block = block->next; 4ca2a: 2003 movel %d3,%d0 4ca2c: 5280 addql #1,%d0 4ca2e: 2068 0008 moveal %a0@(8),%a0 do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4ca32: b1ca cmpal %a2,%a0 4ca34: 6700 0110 beqw 4cb46 <_Heap_Allocate_aligned_with_boundary+0x182> 4ca38: 2600 movel %d0,%d3 4ca3a: 60d8 bras 4ca14 <_Heap_Allocate_aligned_with_boundary+0x50> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4ca3c: 7efe moveq #-2,%d7 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4ca3e: 4be8 0008 lea %a0@(8),%a5 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4ca42: c087 andl %d7,%d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4ca44: 286a 0014 moveal %a2@(20),%a4 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; 4ca48: d088 addl %a0,%d0 uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size + HEAP_BLOCK_HEADER_SIZE + page_size - 1; 4ca4a: 2a2e fff8 movel %fp@(-8),%d5 4ca4e: 9a8c subl %a4,%d5 uintptr_t alloc_end = block_end + HEAP_ALLOC_BONUS; uintptr_t alloc_begin = alloc_end - alloc_size; 4ca50: 242e fff4 movel %fp@(-12),%d2 4ca54: d480 addl %d0,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4ca56: 2c02 movel %d2,%d6 uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); uintptr_t const block_end = block_begin + block_size; uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_begin_ceiling = block_end - min_block_size 4ca58: d085 addl %d5,%d0 4ca5a: 4c41 6005 remul %d1,%d5,%d6 4ca5e: 9485 subl %d5,%d2 uintptr_t alloc_begin = alloc_end - alloc_size; alloc_begin = _Heap_Align_down( alloc_begin, alignment ); /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { 4ca60: b480 cmpl %d0,%d2 4ca62: 630a blss 4ca6e <_Heap_Allocate_aligned_with_boundary+0xaa> 4ca64: 2a00 movel %d0,%d5 4ca66: 4c41 5002 remul %d1,%d2,%d5 4ca6a: 9082 subl %d2,%d0 4ca6c: 2400 movel %d0,%d2 } alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { 4ca6e: 4a84 tstl %d4 4ca70: 676a beqs 4cadc <_Heap_Allocate_aligned_with_boundary+0x118> /* Ensure that the we have a valid new block at the end */ if ( alloc_begin > alloc_begin_ceiling ) { alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment ); } alloc_end = alloc_begin + alloc_size; 4ca72: 2002 movel %d2,%d0 4ca74: d089 addl %a1,%d0 4ca76: 2c00 movel %d0,%d6 4ca78: 4c44 6005 remul %d4,%d5,%d6 4ca7c: 2c00 movel %d0,%d6 4ca7e: 9c85 subl %d5,%d6 4ca80: 2a06 movel %d6,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4ca82: bc82 cmpl %d2,%d6 4ca84: 6356 blss 4cadc <_Heap_Allocate_aligned_with_boundary+0x118> 4ca86: bc80 cmpl %d0,%d6 4ca88: 6452 bccs 4cadc <_Heap_Allocate_aligned_with_boundary+0x118> alloc_end = alloc_begin + alloc_size; /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; 4ca8a: 2c0d movel %a5,%d6 4ca8c: dc89 addl %a1,%d6 uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { if ( boundary_line < boundary_floor ) { 4ca8e: ba86 cmpl %d6,%d5 4ca90: 6598 bcss 4ca2a <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4ca92: 2405 movel %d5,%d2 4ca94: 9489 subl %a1,%d2 4ca96: 2a02 movel %d2,%d5 4ca98: 4c41 5000 remul %d1,%d0,%d5 4ca9c: 9480 subl %d0,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4ca9e: 2002 movel %d2,%d0 4caa0: d089 addl %a1,%d0 4caa2: 2e00 movel %d0,%d7 4caa4: 4c44 7005 remul %d4,%d5,%d7 4caa8: 2e00 movel %d0,%d7 4caaa: 9e85 subl %d5,%d7 4caac: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4caae: be82 cmpl %d2,%d7 4cab0: 632a blss 4cadc <_Heap_Allocate_aligned_with_boundary+0x118> 4cab2: be80 cmpl %d0,%d7 4cab4: 6426 bccs 4cadc <_Heap_Allocate_aligned_with_boundary+0x118> if ( boundary_line < boundary_floor ) { 4cab6: ba86 cmpl %d6,%d5 4cab8: 6500 ff70 bcsw 4ca2a <_Heap_Allocate_aligned_with_boundary+0x66> return 0; } alloc_begin = boundary_line - alloc_size; 4cabc: 2405 movel %d5,%d2 4cabe: 9489 subl %a1,%d2 4cac0: 2a02 movel %d2,%d5 4cac2: 4c41 5000 remul %d1,%d0,%d5 4cac6: 9480 subl %d0,%d2 alloc_begin = _Heap_Align_down( alloc_begin, alignment ); alloc_end = alloc_begin + alloc_size; 4cac8: 2002 movel %d2,%d0 4caca: d089 addl %a1,%d0 4cacc: 2e00 movel %d0,%d7 4cace: 4c44 7005 remul %d4,%d5,%d7 4cad2: 2e00 movel %d0,%d7 4cad4: 9e85 subl %d5,%d7 4cad6: 2a07 movel %d7,%d5 /* Ensure boundary constaint */ if ( boundary != 0 ) { uintptr_t const boundary_floor = alloc_begin_floor + alloc_size; uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary ); while ( alloc_begin < boundary_line && boundary_line < alloc_end ) { 4cad8: be82 cmpl %d2,%d7 4cada: 62d6 bhis 4cab2 <_Heap_Allocate_aligned_with_boundary+0xee><== ALWAYS TAKEN boundary_line = _Heap_Align_down( alloc_end, boundary ); } } /* Ensure that the we have a valid new block at the beginning */ if ( alloc_begin >= alloc_begin_floor ) { 4cadc: b48d cmpl %a5,%d2 4cade: 6500 ff4a bcsw 4ca2a <_Heap_Allocate_aligned_with_boundary+0x66> 4cae2: 2e2e fffc movel %fp@(-4),%d7 4cae6: 2c02 movel %d2,%d6 4cae8: 70f8 moveq #-8,%d0 4caea: 9088 subl %a0,%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4caec: d082 addl %d2,%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4caee: 4c47 6005 remul %d7,%d5,%d6 uintptr_t const alloc_block_begin = (uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size ); uintptr_t const free_size = alloc_block_begin - block_begin; 4caf2: 9085 subl %d5,%d0 if ( free_size >= min_block_size || free_size == 0 ) { 4caf4: b08c cmpl %a4,%d0 4caf6: 6400 ff2c bccw 4ca24 <_Heap_Allocate_aligned_with_boundary+0x60> 4cafa: 4a80 tstl %d0 4cafc: 6600 ff2c bnew 4ca2a <_Heap_Allocate_aligned_with_boundary+0x66> } /* Statistics */ ++search_count; if ( alloc_begin != 0 ) { 4cb00: 4a82 tstl %d2 4cb02: 6700 ff26 beqw 4ca2a <_Heap_Allocate_aligned_with_boundary+0x66> if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; stats->searches += search_count; block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4cb06: 2f09 movel %a1,%sp@- search_again = _Heap_Protection_free_delayed_blocks( heap, alloc_begin ); } while ( search_again ); if ( alloc_begin != 0 ) { /* Statistics */ ++stats->allocs; 4cb08: 52aa 0048 addql #1,%a2@(72) stats->searches += search_count; 4cb0c: d7aa 004c addl %d3,%a2@(76) block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size ); 4cb10: 2f02 movel %d2,%sp@- 4cb12: 2f08 movel %a0,%sp@- 4cb14: 2f0a movel %a2,%sp@- 4cb16: 4eb9 0004 7a06 jsr 47a06 <_Heap_Block_allocate> 4cb1c: 4fef 0010 lea %sp@(16),%sp 4cb20: 2002 movel %d2,%d0 boundary ); } /* Statistics */ if ( stats->max_search < search_count ) { 4cb22: b6aa 0044 cmpl %a2@(68),%d3 4cb26: 6304 blss 4cb2c <_Heap_Allocate_aligned_with_boundary+0x168> stats->max_search = search_count; 4cb28: 2543 0044 movel %d3,%a2@(68) } return (void *) alloc_begin; } 4cb2c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cb32: 4e5e unlk %fp 4cb34: 4e75 rts /* Integer overflow occured */ return NULL; } if ( boundary != 0 ) { if ( boundary < alloc_size ) { 4cb36: b889 cmpl %a1,%d4 4cb38: 6410 bccs 4cb4a <_Heap_Allocate_aligned_with_boundary+0x186> do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4cb3a: 4280 clrl %d0 if ( stats->max_search < search_count ) { stats->max_search = search_count; } return (void *) alloc_begin; } 4cb3c: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cb42: 4e5e unlk %fp 4cb44: 4e75 rts do { Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); block = _Heap_Free_list_first( heap ); while ( block != free_list_tail ) { 4cb46: 4280 clrl %d0 4cb48: 60d8 bras 4cb22 <_Heap_Allocate_aligned_with_boundary+0x15e> if ( boundary != 0 ) { if ( boundary < alloc_size ) { return NULL; } if ( alignment == 0 ) { 4cb4a: 4a81 tstl %d1 4cb4c: 6600 fea6 bnew 4c9f4 <_Heap_Allocate_aligned_with_boundary+0x30> alignment = page_size; 4cb50: 2200 movel %d0,%d1 4cb52: 6000 fea0 braw 4c9f4 <_Heap_Allocate_aligned_with_boundary+0x30> ... =============================================================================== 00047a06 <_Heap_Block_allocate>: - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 47a06: 70fe moveq #-2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 47a08: 4e56 ffe0 linkw %fp,#-32 47a0c: 206e 000c moveal %fp@(12),%a0 47a10: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ } _Heap_Protection_block_initialize( heap, block ); return block; } 47a14: 2428 0004 movel %a0@(4),%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 47a18: 7801 moveq #1,%d4 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 47a1a: c082 andl %d2,%d0 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 47a1c: 222e 0010 movel %fp@(16),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 47a20: 49f0 0800 lea %a0@(00000000,%d0:l),%a4 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 47a24: 2641 moveal %d1,%a3 47a26: 518b subql #8,%a3 Heap_Statistics *const stats = &heap->stats; uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block ); uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin; 47a28: 2a0b movel %a3,%d5 47a2a: 9a88 subl %a0,%d5 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 47a2c: c8ac 0004 andl %a4@(4),%d4 Heap_Control *heap, Heap_Block *block, uintptr_t alloc_begin, uintptr_t alloc_size ) { 47a30: 246e 0008 moveal %fp@(8),%a2 47a34: 262e 0014 movel %fp@(20),%d3 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { 47a38: 4a84 tstl %d4 47a3a: 6600 0090 bnew 47acc <_Heap_Block_allocate+0xc6> } _Heap_Protection_block_initialize( heap, block ); return block; } 47a3e: 2828 0008 movel %a0@(8),%d4 { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; next->prev = prev; 47a42: 2a44 moveal %d4,%a5 Heap_Block *free_list_anchor = NULL; _HAssert( alloc_area_begin <= alloc_begin ); if ( _Heap_Is_free( block ) ) { free_list_anchor = block->prev; 47a44: 2268 000c moveal %a0@(12),%a1 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 47a48: 2344 0008 movel %d4,%a1@(8) next->prev = prev; 47a4c: 2b49 000c movel %a1,%a5@(12) _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); 47a50: 91aa 0030 subl %d0,%a2@(48) free_list_anchor = block->prev; _Heap_Free_list_remove( block ); /* Statistics */ --stats->free_blocks; 47a54: 53aa 0038 subql #1,%a2@(56) ++stats->used_blocks; 47a58: 52aa 0040 addql #1,%a2@(64) stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 47a5c: 202a 0010 movel %a2@(16),%d0 47a60: b085 cmpl %d5,%d0 47a62: 6272 bhis 47ad6 <_Heap_Block_allocate+0xd0> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 47a64: 4c40 1004 remul %d0,%d4,%d1 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 47a68: 97c4 subal %d4,%a3 _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; block_end = new_block_begin; block_size = block_end - block_begin; 47a6a: 200b movel %a3,%d0 47a6c: 9088 subl %a0,%d0 _HAssert( block_size >= heap->min_block_size ); _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; 47a6e: d1aa 0030 addl %d0,%a2@(48) uintptr_t block_end = block_begin + block_size; Heap_Block *const new_block = _Heap_Block_of_alloc_area( alloc_begin, heap->page_size ); uintptr_t const new_block_begin = (uintptr_t) new_block; uintptr_t const new_block_size = block_end - new_block_begin; 47a72: 99cb subal %a3,%a4 _HAssert( new_block_size >= heap->min_block_size ); /* Statistics */ stats->free_size += block_size; if ( _Heap_Is_prev_used( block ) ) { 47a74: 0802 0000 btst #0,%d2 47a78: 6774 beqs 47aee <_Heap_Block_allocate+0xe8> RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 47a7a: 2a69 0008 moveal %a1@(8),%a5 block = prev_block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47a7e: 7401 moveq #1,%d2 _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 47a80: 2208 movel %a0,%d1 new_block->next = next; 47a82: 214d 0008 movel %a5,%a0@(8) block = prev_block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47a86: 8480 orl %d0,%d2 new_block->prev = block_before; 47a88: 2149 000c movel %a1,%a0@(12) block_before->next = new_block; 47a8c: 2348 0008 movel %a0,%a1@(8) next->prev = new_block; 47a90: 2b48 000c movel %a0,%a5@(12) _Heap_Free_list_insert_after( free_list_anchor, block ); free_list_anchor = block; /* Statistics */ ++stats->free_blocks; 47a94: 52aa 0038 addql #1,%a2@(56) block = prev_block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47a98: 2142 0004 movel %d2,%a0@(4) new_block->prev_size = block_size; 47a9c: 2680 movel %d0,%a3@ new_block->size_and_flag = new_block_size; 47a9e: 274c 0004 movel %a4,%a3@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 47aa2: 2f03 movel %d3,%sp@- 47aa4: 2f01 movel %d1,%sp@- 47aa6: 2f0b movel %a3,%sp@- 47aa8: 2f0a movel %a2,%sp@- 47aaa: 4eba fcb0 jsr %pc@(4775c <_Heap_Block_split>) 47aae: 4fef 0010 lea %sp@(16),%sp alloc_size ); } /* Statistics */ if ( stats->min_free_size > stats->free_size ) { 47ab2: 202a 0030 movel %a2@(48),%d0 47ab6: b0aa 0034 cmpl %a2@(52),%d0 47aba: 6404 bccs 47ac0 <_Heap_Block_allocate+0xba> stats->min_free_size = stats->free_size; 47abc: 2540 0034 movel %d0,%a2@(52) } _Heap_Protection_block_initialize( heap, block ); return block; } 47ac0: 200b movel %a3,%d0 47ac2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 47ac8: 4e5e unlk %fp 47aca: 4e75 rts stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); } if ( alloc_area_offset < heap->page_size ) { 47acc: 202a 0010 movel %a2@(16),%d0 /* Statistics */ --stats->free_blocks; ++stats->used_blocks; stats->free_size -= _Heap_Block_size( block ); } else { free_list_anchor = _Heap_Free_list_head( heap ); 47ad0: 224a moveal %a2,%a1 } if ( alloc_area_offset < heap->page_size ) { 47ad2: b085 cmpl %d5,%d0 47ad4: 638e blss 47a64 <_Heap_Block_allocate+0x5e> Heap_Block *block, Heap_Block *free_list_anchor, uintptr_t alloc_size ) { _Heap_Block_split( heap, block, free_list_anchor, alloc_size ); 47ad6: 2645 moveal %d5,%a3 47ad8: 4873 3800 pea %a3@(00000000,%d3:l) 47adc: 2648 moveal %a0,%a3 47ade: 2f09 movel %a1,%sp@- 47ae0: 2f08 movel %a0,%sp@- 47ae2: 2f0a movel %a2,%sp@- 47ae4: 4eba fc76 jsr %pc@(4775c <_Heap_Block_split>) 47ae8: 4fef 0010 lea %sp@(16),%sp 47aec: 60c4 bras 47ab2 <_Heap_Block_allocate+0xac> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block( const Heap_Block *block ) { return (Heap_Block *) ((uintptr_t) block - block->prev_size); 47aee: 91d0 subal %a0@,%a0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 47af0: 74fe moveq #-2,%d2 } else { Heap_Block *const prev_block = _Heap_Prev_block( block ); uintptr_t const prev_block_size = _Heap_Block_size( prev_block ); block = prev_block; block_size += prev_block_size; 47af2: 2209 movel %a1,%d1 47af4: c4a8 0004 andl %a0@(4),%d2 47af8: d082 addl %d2,%d0 } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47afa: 7401 moveq #1,%d2 47afc: 8480 orl %d0,%d2 new_block->prev_size = block_size; 47afe: 2680 movel %d0,%a3@ block = prev_block; block_size += prev_block_size; } block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 47b00: 2142 0004 movel %d2,%a0@(4) new_block->prev_size = block_size; new_block->size_and_flag = new_block_size; 47b04: 274c 0004 movel %a4,%a3@(4) _Heap_Block_split( heap, new_block, free_list_anchor, alloc_size ); 47b08: 2f03 movel %d3,%sp@- 47b0a: 2f01 movel %d1,%sp@- 47b0c: 2f0b movel %a3,%sp@- 47b0e: 2f0a movel %a2,%sp@- 47b10: 4eba fc4a jsr %pc@(4775c <_Heap_Block_split>) 47b14: 4fef 0010 lea %sp@(16),%sp 47b18: 6098 bras 47ab2 <_Heap_Block_allocate+0xac> ... =============================================================================== 0004ce80 <_Heap_Extend>: Heap_Control *heap, void *extend_area_begin_ptr, uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { 4ce80: 4e56 ffcc linkw %fp,#-52 4ce84: 202e 0010 movel %fp@(16),%d0 4ce88: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4ce8c: 246e 0008 moveal %fp@(8),%a2 4ce90: 242e 000c movel %fp@(12),%d2 Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; 4ce94: 2602 movel %d2,%d3 4ce96: d680 addl %d0,%d3 uintptr_t extend_area_size, uintptr_t *extended_size_ptr ) { Heap_Statistics *const stats = &heap->stats; Heap_Block *const first_block = heap->first_block; 4ce98: 2a2a 0020 movel %a2@(32),%d5 Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; 4ce9c: 282a 0010 movel %a2@(16),%d4 uintptr_t const min_block_size = heap->min_block_size; 4cea0: 222a 0014 movel %a2@(20),%d1 uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size; 4cea4: 2c2a 0030 movel %a2@(48),%d6 Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; 4cea8: 42ae fffc clrl %fp@(-4) Heap_Block *extend_last_block = NULL; 4ceac: 42ae fff8 clrl %fp@(-8) uintptr_t const free_size = stats->free_size; uintptr_t extend_first_block_size = 0; uintptr_t extended_size = 0; bool extend_area_ok = false; if ( extend_area_end < extend_area_begin ) { 4ceb0: b682 cmpl %d2,%d3 4ceb2: 640c bccs 4cec0 <_Heap_Extend+0x40> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4ceb4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; 4ceba: 4200 clrb %d0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4cebc: 4e5e unlk %fp 4cebe: 4e75 rts if ( extend_area_end < extend_area_begin ) { return false; } extend_area_ok = _Heap_Get_first_and_last_block( 4cec0: 486e fff8 pea %fp@(-8) 4cec4: 486e fffc pea %fp@(-4) 4cec8: 2f01 movel %d1,%sp@- 4ceca: 2f04 movel %d4,%sp@- 4cecc: 2f00 movel %d0,%sp@- 4cece: 2f02 movel %d2,%sp@- 4ced0: 4eb9 0004 7b9c jsr 47b9c <_Heap_Get_first_and_last_block> page_size, min_block_size, &extend_first_block, &extend_last_block ); if (!extend_area_ok ) { 4ced6: 4fef 0018 lea %sp@(24),%sp 4ceda: 4a00 tstb %d0 4cedc: 67d6 beqs 4ceb4 <_Heap_Extend+0x34> 4cede: 2045 moveal %d5,%a0 4cee0: 9bcd subal %a5,%a5 4cee2: 97cb subal %a3,%a3 4cee4: 99cc subal %a4,%a4 4cee6: 42ae fff4 clrl %fp@(-12) return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4ceea: ba88 cmpl %a0,%d5 4ceec: 6700 014a beqw 4d038 <_Heap_Extend+0x1b8> 4cef0: 2208 movel %a0,%d1 uintptr_t const sub_area_end = start_block->prev_size; 4cef2: 2010 movel %a0@,%d0 Heap_Block *const end_block = _Heap_Block_of_alloc_area( sub_area_end, page_size ); if ( 4cef4: b082 cmpl %d2,%d0 4cef6: 6304 blss 4cefc <_Heap_Extend+0x7c> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin 4cef8: b681 cmpl %d1,%d3 4cefa: 62b8 bhis 4ceb4 <_Heap_Extend+0x34> ) { return false; } if ( extend_area_end == sub_area_begin ) { 4cefc: b681 cmpl %d1,%d3 4cefe: 6700 0132 beqw 4d032 <_Heap_Extend+0x1b2> merge_below_block = start_block; } else if ( extend_area_end < sub_area_end ) { 4cf02: b083 cmpl %d3,%d0 4cf04: 6304 blss 4cf0a <_Heap_Extend+0x8a> 4cf06: 2d48 fff4 movel %a0,%fp@(-12) 4cf0a: 2e00 movel %d0,%d7 4cf0c: 2240 moveal %d0,%a1 4cf0e: 5189 subql #8,%a1 4cf10: 4c44 7001 remul %d4,%d1,%d7 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4cf14: 93c1 subal %d1,%a1 link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { 4cf16: b480 cmpl %d0,%d2 4cf18: 6700 0100 beqw 4d01a <_Heap_Extend+0x19a> start_block->prev_size = extend_area_end; merge_above_block = end_block; } else if ( sub_area_end < extend_area_begin ) { 4cf1c: b082 cmpl %d2,%d0 4cf1e: 6402 bccs 4cf22 <_Heap_Extend+0xa2> RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4cf20: 2a49 moveal %a1,%a5 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cf22: 70fe moveq #-2,%d0 4cf24: c0a9 0004 andl %a1@(4),%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cf28: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4cf2c: b1c5 cmpal %d5,%a0 4cf2e: 66ba bnes 4ceea <_Heap_Extend+0x6a> if ( extend_area_begin < heap->area_begin ) { 4cf30: b4aa 0018 cmpl %a2@(24),%d2 4cf34: 6500 010a bcsw 4d040 <_Heap_Extend+0x1c0> heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { 4cf38: b6aa 001c cmpl %a2@(28),%d3 4cf3c: 6304 blss 4cf42 <_Heap_Extend+0xc2> heap->area_end = extend_area_end; 4cf3e: 2543 001c movel %d3,%a2@(28) } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4cf42: 226e fff8 moveal %fp@(-8),%a1 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4cf46: 2009 movel %a1,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4cf48: 7201 moveq #1,%d1 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4cf4a: 206e fffc moveal %fp@(-4),%a0 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4cf4e: 9088 subl %a0,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4cf50: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4cf52: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4cf54: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4cf58: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4cf5a: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4cf5e: b1ea 0020 cmpal %a2@(32),%a0 4cf62: 6400 0104 bccw 4d068 <_Heap_Extend+0x1e8> heap->first_block = extend_first_block; 4cf66: 2548 0020 movel %a0,%a2@(32) } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { 4cf6a: 4a8c tstl %a4 4cf6c: 6700 0148 beqw 4d0b6 <_Heap_Extend+0x236> Heap_Control *heap, uintptr_t extend_area_begin, Heap_Block *first_block ) { uintptr_t const page_size = heap->page_size; 4cf70: 202a 0010 movel %a2@(16),%d0 uintptr_t const new_first_block_alloc_begin = _Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size ); 4cf74: 5082 addql #8,%d2 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up( uintptr_t value, uintptr_t alignment ) { uintptr_t remainder = value % alignment; 4cf76: 2802 movel %d2,%d4 4cf78: 4c40 4001 remul %d0,%d1,%d4 if ( remainder != 0 ) { 4cf7c: 4a81 tstl %d1 4cf7e: 6704 beqs 4cf84 <_Heap_Extend+0x104> return value - remainder + alignment; 4cf80: d480 addl %d0,%d2 4cf82: 9481 subl %d1,%d2 uintptr_t const new_first_block_begin = 4cf84: 2042 moveal %d2,%a0 4cf86: 5188 subql #8,%a0 new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE; uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = 4cf88: 200c movel %a4,%d0 4cf8a: 9088 subl %a0,%d0 first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4cf8c: 7201 moveq #1,%d1 4cf8e: 8280 orl %d0,%d1 uintptr_t const first_block_begin = (uintptr_t) first_block; uintptr_t const new_first_block_size = first_block_begin - new_first_block_begin; Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin; new_first_block->prev_size = first_block->prev_size; 4cf90: 2094 movel %a4@,%a0@ new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED; 4cf92: 2141 0004 movel %d1,%a0@(4) _Heap_Free_block( heap, new_first_block ); 4cf96: 2f08 movel %a0,%sp@- 4cf98: 2f0a movel %a2,%sp@- 4cf9a: 4eba fec8 jsr %pc@(4ce64 <_Heap_Free_block>) 4cf9e: 508f addql #8,%sp link_below_block, extend_last_block ); } if ( merge_above_block != NULL ) { 4cfa0: 4a8b tstl %a3 4cfa2: 6700 00d4 beqw 4d078 <_Heap_Extend+0x1f8> ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE, 4cfa6: 5183 subql #8,%d3 uintptr_t extend_area_end ) { uintptr_t const page_size = heap->page_size; uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const last_block_new_size = _Heap_Align_down( 4cfa8: 968b subl %a3,%d3 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 4cfaa: 2203 movel %d3,%d1 4cfac: 4c6a 1000 0010 remul %a2@(16),%d0,%d1 Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) | HEAP_PREV_BLOCK_USED; 4cfb2: 7201 moveq #1,%d1 4cfb4: 9680 subl %d0,%d3 ); Heap_Block *const new_last_block = _Heap_Block_at( last_block, last_block_new_size ); new_last_block->size_and_flag = (last_block->size_and_flag - last_block_new_size) 4cfb6: 202b 0004 movel %a3@(4),%d0 4cfba: 9083 subl %d3,%d0 | HEAP_PREV_BLOCK_USED; 4cfbc: 8280 orl %d0,%d1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cfbe: 7001 moveq #1,%d0 4cfc0: 2781 3804 movel %d1,%a3@(00000004,%d3:l) 4cfc4: c0ab 0004 andl %a3@(4),%d0 block->size_and_flag = size | flag; 4cfc8: 8680 orl %d0,%d3 4cfca: 2743 0004 movel %d3,%a3@(4) _Heap_Block_set_size( last_block, last_block_new_size ); _Heap_Free_block( heap, last_block ); 4cfce: 2f0b movel %a3,%sp@- 4cfd0: 2f0a movel %a2,%sp@- 4cfd2: 4eba fe90 jsr %pc@(4ce64 <_Heap_Free_block>) 4cfd6: 508f addql #8,%sp extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4cfd8: 4a8c tstl %a4 4cfda: 6700 00c4 beqw 4d0a0 <_Heap_Extend+0x220> _Heap_Free_block( heap, extend_first_block ); } _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; 4cfde: 202a 0030 movel %a2@(48),%d0 4cfe2: 9086 subl %d6,%d0 4cfe4: 2c00 movel %d0,%d6 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cfe6: 7001 moveq #1,%d0 if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4cfe8: 206a 0024 moveal %a2@(36),%a0 * This feature will be used to terminate the scattered heap area list. See * also _Heap_Extend(). */ RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap ) { _Heap_Block_set_size( 4cfec: 222a 0020 movel %a2@(32),%d1 4cff0: 9288 subl %a0,%d1 RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cff2: c0a8 0004 andl %a0@(4),%d0 block->size_and_flag = size | flag; 4cff6: 8280 orl %d0,%d1 4cff8: 2141 0004 movel %d1,%a0@(4) _Heap_Set_last_block_size( heap ); extended_size = stats->free_size - free_size; /* Statistics */ stats->size += extended_size; 4cffc: ddaa 002c addl %d6,%a2@(44) if ( extended_size_ptr != NULL ) 4d000: 4aae 0014 tstl %fp@(20) 4d004: 6700 00ca beqw 4d0d0 <_Heap_Extend+0x250> *extended_size_ptr = extended_size; 4d008: 206e 0014 moveal %fp@(20),%a0 4d00c: 2086 movel %d6,%a0@ return true; } 4d00e: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4d014: 7001 moveq #1,%d0 } 4d016: 4e5e unlk %fp 4d018: 4e75 rts - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d01a: 70fe moveq #-2,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area( uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) 4d01c: 2649 moveal %a1,%a3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d01e: c0a9 0004 andl %a1@(4),%d0 } else if ( extend_area_end < sub_area_end ) { link_below_block = start_block; } if ( sub_area_end == extend_area_begin ) { start_block->prev_size = extend_area_end; 4d022: 2083 movel %d3,%a0@ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4d024: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 } else if ( sub_area_end < extend_area_begin ) { link_above_block = end_block; } start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); 4d028: b1c5 cmpal %d5,%a0 4d02a: 6600 febe bnew 4ceea <_Heap_Extend+0x6a> 4d02e: 6000 ff00 braw 4cf30 <_Heap_Extend+0xb0> sub_area_end > extend_area_begin && extend_area_end > sub_area_begin ) { return false; } if ( extend_area_end == sub_area_begin ) { 4d032: 2848 moveal %a0,%a4 4d034: 6000 fed4 braw 4cf0a <_Heap_Extend+0x8a> return false; } do { uintptr_t const sub_area_begin = (start_block != first_block) ? (uintptr_t) start_block : heap->area_begin; 4d038: 222a 0018 movel %a2@(24),%d1 4d03c: 6000 feb4 braw 4cef2 <_Heap_Extend+0x72> } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4d040: 226e fff8 moveal %fp@(-8),%a1 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4d044: 2009 movel %a1,%d0 (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d046: 7201 moveq #1,%d1 } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; 4d048: 206e fffc moveal %fp@(-4),%a0 heap->area_begin = extend_area_begin; } else if ( heap->area_end < extend_area_end ) { heap->area_end = extend_area_end; } extend_first_block_size = 4d04c: 9088 subl %a0,%d0 start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) ); } while ( start_block != first_block ); if ( extend_area_begin < heap->area_begin ) { heap->area_begin = extend_area_begin; 4d04e: 2542 0018 movel %d2,%a2@(24) extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d052: 8280 orl %d0,%d1 } extend_first_block_size = (uintptr_t) extend_last_block - (uintptr_t) extend_first_block; extend_first_block->prev_size = extend_area_end; 4d054: 2083 movel %d3,%a0@ extend_first_block->size_and_flag = extend_first_block_size | HEAP_PREV_BLOCK_USED; 4d056: 2141 0004 movel %d1,%a0@(4) _Heap_Protection_block_initialize( heap, extend_first_block ); extend_last_block->prev_size = extend_first_block_size; 4d05a: 2280 movel %d0,%a1@ extend_last_block->size_and_flag = 0; 4d05c: 42a9 0004 clrl %a1@(4) _Heap_Protection_block_initialize( heap, extend_last_block ); if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) { 4d060: b1ea 0020 cmpal %a2@(32),%a0 4d064: 6500 ff00 bcsw 4cf66 <_Heap_Extend+0xe6> heap->first_block = extend_first_block; } else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) { 4d068: b3ea 0024 cmpal %a2@(36),%a1 4d06c: 6300 fefc blsw 4cf6a <_Heap_Extend+0xea> heap->last_block = extend_last_block; 4d070: 2549 0024 movel %a1,%a2@(36) 4d074: 6000 fef4 braw 4cf6a <_Heap_Extend+0xea> ); } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { 4d078: 4a8d tstl %a5 4d07a: 6700 ff5c beqw 4cfd8 <_Heap_Extend+0x158> RTEMS_INLINE_ROUTINE void _Heap_Block_set_size( Heap_Block *block, uintptr_t size ) { uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED; 4d07e: 7001 moveq #1,%d0 ) { uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); 4d080: 222e fffc movel %fp@(-4),%d1 4d084: 928d subl %a5,%d1 4d086: c0ad 0004 andl %a5@(4),%d0 } if ( merge_above_block != NULL ) { _Heap_Merge_above( heap, merge_above_block, extend_area_end ); } else if ( link_above_block != NULL ) { _Heap_Link_above( 4d08a: 206e fff8 moveal %fp@(-8),%a0 block->size_and_flag = size | flag; 4d08e: 8280 orl %d0,%d1 uintptr_t const link_begin = (uintptr_t) link; uintptr_t const first_block_begin = (uintptr_t) first_block; _Heap_Block_set_size( link, first_block_begin - link_begin ); last_block->size_and_flag |= HEAP_PREV_BLOCK_USED; 4d090: 7001 moveq #1,%d0 4d092: 2b41 0004 movel %d1,%a5@(4) 4d096: 81a8 0004 orl %d0,%a0@(4) extend_first_block, extend_last_block ); } if ( merge_below_block == NULL && merge_above_block == NULL ) { 4d09a: 4a8c tstl %a4 4d09c: 6600 ff40 bnew 4cfde <_Heap_Extend+0x15e> 4d0a0: 4a8b tstl %a3 4d0a2: 6600 ff3a bnew 4cfde <_Heap_Extend+0x15e> _Heap_Free_block( heap, extend_first_block ); 4d0a6: 2f2e fffc movel %fp@(-4),%sp@- 4d0aa: 2f0a movel %a2,%sp@- 4d0ac: 4eba fdb6 jsr %pc@(4ce64 <_Heap_Free_block>) 4d0b0: 508f addql #8,%sp 4d0b2: 6000 ff2a braw 4cfde <_Heap_Extend+0x15e> heap->last_block = extend_last_block; } if ( merge_below_block != NULL ) { _Heap_Merge_below( heap, extend_area_begin, merge_below_block ); } else if ( link_below_block != NULL ) { 4d0b6: 4aae fff4 tstl %fp@(-12) 4d0ba: 6700 fee4 beqw 4cfa0 <_Heap_Extend+0x120> { uintptr_t const last_block_begin = (uintptr_t) last_block; uintptr_t const link_begin = (uintptr_t) link; last_block->size_and_flag = (link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED; 4d0be: 202e fff4 movel %fp@(-12),%d0 4d0c2: 7201 moveq #1,%d1 4d0c4: 9089 subl %a1,%d0 4d0c6: 8280 orl %d0,%d1 4d0c8: 2341 0004 movel %d1,%a1@(4) 4d0cc: 6000 fed2 braw 4cfa0 <_Heap_Extend+0x120> if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; } 4d0d0: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED stats->size += extended_size; if ( extended_size_ptr != NULL ) *extended_size_ptr = extended_size; return true; 4d0d6: 7001 moveq #1,%d0 <== NOT EXECUTED } 4d0d8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004cb58 <_Heap_Free>: return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) { 4cb58: 4e56 ffe8 linkw %fp,#-24 4cb5c: 206e 0008 moveal %fp@(8),%a0 4cb60: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4cb64: 202e 000c movel %fp@(12),%d0 /* * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { 4cb68: 6700 00f2 beqw 4cc5c <_Heap_Free+0x104> 4cb6c: 2240 moveal %d0,%a1 4cb6e: 5189 subql #8,%a1 4cb70: 4c68 0001 0010 remul %a0@(16),%d1,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 4cb76: 2028 0020 movel %a0@(32),%d0 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 4cb7a: 93c1 subal %d1,%a1 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4cb7c: b089 cmpl %a1,%d0 4cb7e: 6200 0098 bhiw 4cc18 <_Heap_Free+0xc0> 4cb82: 2228 0024 movel %a0@(36),%d1 4cb86: b289 cmpl %a1,%d1 4cb88: 6500 008e bcsw 4cc18 <_Heap_Free+0xc0> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4cb8c: 2629 0004 movel %a1@(4),%d3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cb90: 74fe moveq #-2,%d2 4cb92: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cb94: 45f1 2800 lea %a1@(00000000,%d2:l),%a2 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4cb98: b5c0 cmpal %d0,%a2 4cb9a: 657c bcss 4cc18 <_Heap_Free+0xc0> <== NEVER TAKEN 4cb9c: b5c1 cmpal %d1,%a2 4cb9e: 6278 bhis 4cc18 <_Heap_Free+0xc0> <== NEVER TAKEN 4cba0: 282a 0004 movel %a2@(4),%d4 return false; } _Heap_Protection_block_check( heap, next_block ); if ( !_Heap_Is_prev_used( next_block ) ) { 4cba4: 0804 0000 btst #0,%d4 4cba8: 676e beqs 4cc18 <_Heap_Free+0xc0> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4cbaa: 7afe moveq #-2,%d5 4cbac: c885 andl %d5,%d4 return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4cbae: b5c1 cmpal %d1,%a2 4cbb0: 6700 00fa beqw 4ccac <_Heap_Free+0x154> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cbb4: 7a01 moveq #1,%d5 4cbb6: cab2 4804 andl %a2@(00000004,%d4:l),%d5 return do_free; } #endif bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr ) 4cbba: 57c5 seq %d5 4cbbc: 4485 negl %d5 next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); if ( !_Heap_Is_prev_used( block ) ) { 4cbbe: 0803 0000 btst #0,%d3 4cbc2: 665e bnes 4cc22 <_Heap_Free+0xca> uintptr_t const prev_size = block->prev_size; 4cbc4: 2611 movel %a1@,%d3 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4cbc6: 93c3 subal %d3,%a1 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4cbc8: b3c0 cmpal %d0,%a1 4cbca: 654c bcss 4cc18 <_Heap_Free+0xc0> <== NEVER TAKEN 4cbcc: b3c1 cmpal %d1,%a1 4cbce: 6248 bhis 4cc18 <_Heap_Free+0xc0> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4cbd0: 7001 moveq #1,%d0 4cbd2: c0a9 0004 andl %a1@(4),%d0 return( false ); } /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { 4cbd6: 6740 beqs 4cc18 <_Heap_Free+0xc0> <== NEVER TAKEN _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ 4cbd8: 4a05 tstb %d5 4cbda: 6700 00d6 beqw 4ccb2 <_Heap_Free+0x15a> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4cbde: 266a 0008 moveal %a2@(8),%a3 _HAssert( false ); return( false ); } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; 4cbe2: d882 addl %d2,%d4 4cbe4: d684 addl %d4,%d3 _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4cbe6: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4cbe8: 246a 000c moveal %a2@(12),%a2 RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block ) { Heap_Block *next = block->next; Heap_Block *prev = block->prev; prev->next = next; 4cbec: 254b 0008 movel %a3,%a2@(8) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4cbf0: 8083 orl %d3,%d0 next->prev = prev; 4cbf2: 274a 000c movel %a2,%a3@(12) } if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; 4cbf6: 53a8 0038 subql #1,%a0@(56) prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; 4cbfa: 2383 3800 movel %d3,%a1@(00000000,%d3:l) if ( next_is_free ) { /* coalesce both */ uintptr_t const size = block_size + prev_size + next_block_size; _Heap_Free_list_remove( next_block ); stats->free_blocks -= 1; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4cbfe: 2340 0004 movel %d0,%a1@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4cc02: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4cc06: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4cc0a: d5a8 0030 addl %d2,%a0@(48) return( true ); 4cc0e: 7001 moveq #1,%d0 } 4cc10: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4cc14: 4e5e unlk %fp 4cc16: 4e75 rts 4cc18: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 /* As we always coalesce free blocks, the block that preceedes prev_block must have been used. */ if ( !_Heap_Is_prev_used ( prev_block) ) { _HAssert( false ); return( false ); 4cc1c: 4200 clrb %d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4cc1e: 4e5e unlk %fp 4cc20: 4e75 rts uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ 4cc22: 4a05 tstb %d5 4cc24: 673a beqs 4cc60 <_Heap_Free+0x108> --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4cc26: 266a 0008 moveal %a2@(8),%a3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; 4cc2a: d882 addl %d2,%d4 _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4cc2c: 7001 moveq #1,%d0 --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); } 4cc2e: 246a 000c moveal %a2@(12),%a2 ) { Heap_Block *next = old_block->next; Heap_Block *prev = old_block->prev; new_block->next = next; 4cc32: 234b 0008 movel %a3,%a1@(8) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4cc36: 8084 orl %d4,%d0 new_block->prev = prev; 4cc38: 234a 000c movel %a2,%a1@(12) next_block = _Heap_Block_at( block, size ); next_block->prev_size = size; 4cc3c: 2384 4800 movel %d4,%a1@(00000000,%d4:l) next_block->prev_size = size; } } else if ( next_is_free ) { /* coalesce next */ uintptr_t const size = block_size + next_block_size; _Heap_Free_list_replace( next_block, block ); block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4cc40: 2340 0004 movel %d0,%a1@(4) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4cc44: 7001 moveq #1,%d0 next->prev = new_block; prev->next = new_block; 4cc46: 2549 0008 movel %a1,%a2@(8) Heap_Block *prev = old_block->prev; new_block->next = next; new_block->prev = prev; next->prev = new_block; 4cc4a: 2749 000c movel %a1,%a3@(12) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4cc4e: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4cc52: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4cc56: d5a8 0030 addl %d2,%a0@(48) 4cc5a: 60b4 bras 4cc10 <_Heap_Free+0xb8> * If NULL return true so a free on NULL is considered a valid release. This * is a special case that could be handled by the in heap check how-ever that * would result in false being returned which is wrong. */ if ( alloc_begin_ptr == NULL ) { return true; 4cc5c: 7001 moveq #1,%d0 4cc5e: 60b0 bras 4cc10 <_Heap_Free+0xb8> block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4cc60: 2028 0038 movel %a0@(56),%d0 next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4cc64: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4cc66: 7afe moveq #-2,%d5 next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; 4cc68: 5280 addql #1,%d0 RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after( Heap_Block *block_before, Heap_Block *new_block ) { Heap_Block *next = block_before->next; 4cc6a: 2668 0008 moveal %a0@(8),%a3 new_block->next = next; new_block->prev = block_before; 4cc6e: 2348 000c movel %a0,%a1@(12) next_block->prev_size = size; } else { /* no coalesce */ /* Add 'block' to the head of the free blocks list as it tends to produce less fragmentation than adding to the tail. */ _Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block ); block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED; 4cc72: 8282 orl %d2,%d1 Heap_Block *new_block ) { Heap_Block *next = block_before->next; new_block->next = next; 4cc74: 234b 0008 movel %a3,%a1@(8) 4cc78: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4cc7c: cbaa 0004 andl %d5,%a2@(4) new_block->prev = block_before; block_before->next = new_block; next->prev = new_block; 4cc80: 2749 000c movel %a1,%a3@(12) next_block->prev_size = block_size; 4cc84: 2482 movel %d2,%a2@ { Heap_Block *next = block_before->next; new_block->next = next; new_block->prev = block_before; block_before->next = new_block; 4cc86: 2149 0008 movel %a1,%a0@(8) /* Statistics */ ++stats->free_blocks; 4cc8a: 2140 0038 movel %d0,%a0@(56) if ( stats->max_free_blocks < stats->free_blocks ) { 4cc8e: b0a8 003c cmpl %a0@(60),%d0 4cc92: 6300 ff6e blsw 4cc02 <_Heap_Free+0xaa> stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4cc96: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4cc9a: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4cc9e: d5a8 0030 addl %d2,%a0@(48) next_block->prev_size = block_size; /* Statistics */ ++stats->free_blocks; if ( stats->max_free_blocks < stats->free_blocks ) { stats->max_free_blocks = stats->free_blocks; 4cca2: 2140 003c movel %d0,%a0@(60) /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4cca6: 7001 moveq #1,%d0 4cca8: 6000 ff66 braw 4cc10 <_Heap_Free+0xb8> return true; } next_block_size = _Heap_Block_size( next_block ); next_is_free = next_block != heap->last_block && !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size )); 4ccac: 4205 clrb %d5 4ccae: 6000 ff0e braw 4cbbe <_Heap_Free+0x66> prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; 4ccb2: d682 addl %d2,%d3 prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ccb4: 7201 moveq #1,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ccb6: 7afe moveq #-2,%d5 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ccb8: 8283 orl %d3,%d1 next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; next_block->prev_size = size; 4ccba: 2483 movel %d3,%a2@ /* Statistics */ --stats->used_blocks; ++stats->frees; stats->free_size += block_size; return( true ); 4ccbc: 7001 moveq #1,%d0 next_block = _Heap_Block_at( prev_block, size ); _HAssert(!_Heap_Is_prev_used( next_block)); next_block->prev_size = size; } else { /* coalesce prev */ uintptr_t const size = block_size + prev_size; prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED; 4ccbe: 2341 0004 movel %d1,%a1@(4) next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED; 4ccc2: cbaa 0004 andl %d5,%a2@(4) stats->max_free_blocks = stats->free_blocks; } } /* Statistics */ --stats->used_blocks; 4ccc6: 53a8 0040 subql #1,%a0@(64) ++stats->frees; 4ccca: 52a8 0050 addql #1,%a0@(80) stats->free_size += block_size; 4ccce: d5a8 0030 addl %d2,%a0@(48) 4ccd2: 6000 ff3c braw 4cc10 <_Heap_Free+0xb8> ... =============================================================================== 00051d38 <_Heap_Get_free_information>: void _Heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 51d38: 4e56 ffec linkw %fp,#-20 51d3c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 51d40: 266e 0008 moveal %fp@(8),%a3 51d44: 246e 000c moveal %fp@(12),%a2 info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 51d48: 206b 0008 moveal %a3@(8),%a0 ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Free_list_tail(the_heap); info->number = 0; 51d4c: 4292 clrl %a2@ info->largest = 0; 51d4e: 42aa 0004 clrl %a2@(4) info->total = 0; 51d52: 42aa 0008 clrl %a2@(8) for(the_block = _Heap_Free_list_first(the_heap); 51d56: b1cb cmpal %a3,%a0 51d58: 6734 beqs 51d8e <_Heap_Get_free_information+0x56><== NEVER TAKEN 51d5a: 7401 moveq #1,%d2 51d5c: 4283 clrl %d3 51d5e: 93c9 subal %a1,%a1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 51d60: 70fe moveq #-2,%d0 /* 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; 51d62: 2209 movel %a1,%d1 info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 51d64: 2802 movel %d2,%d4 51d66: 5284 addql #1,%d4 51d68: c0a8 0004 andl %a0@(4),%d0 /* 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; 51d6c: d280 addl %d0,%d1 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 51d6e: 2241 moveal %d1,%a1 /* 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 ) 51d70: b680 cmpl %d0,%d3 51d72: 6404 bccs 51d78 <_Heap_Get_free_information+0x40> info->largest = the_size; 51d74: 2540 0004 movel %d0,%a2@(4) info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); the_block != tail; the_block = the_block->next) 51d78: 2068 0008 moveal %a0@(8),%a0 info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_Free_list_first(the_heap); 51d7c: b1cb cmpal %a3,%a0 51d7e: 6708 beqs 51d88 <_Heap_Get_free_information+0x50> 51d80: 262a 0004 movel %a2@(4),%d3 51d84: 2404 movel %d4,%d2 51d86: 60d8 bras 51d60 <_Heap_Get_free_information+0x28> 51d88: 2482 movel %d2,%a2@ 51d8a: 2541 0008 movel %d1,%a2@(8) info->number++; info->total += the_size; if ( info->largest < the_size ) info->largest = the_size; } } 51d8e: 4cd7 0c1c moveml %sp@,%d2-%d4/%a2-%a3 51d92: 4e5e unlk %fp ... =============================================================================== 0004d7d0 <_Heap_Get_information>: void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { 4d7d0: 4e56 fff0 linkw %fp,#-16 4d7d4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4d7d8: 246e 0008 moveal %fp@(8),%a2 4d7dc: 282e 000c movel %fp@(12),%d4 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); 4d7e0: 2044 moveal %d4,%a0 void _Heap_Get_information( Heap_Control *the_heap, Heap_Information_block *the_info ) { Heap_Block *the_block = the_heap->first_block; 4d7e2: 226a 0020 moveal %a2@(32),%a1 Heap_Block *const end = the_heap->last_block; 4d7e6: 242a 0024 movel %a2@(36),%d2 memset(the_info, 0, sizeof(*the_info)); 4d7ea: 4298 clrl %a0@+ 4d7ec: 4298 clrl %a0@+ 4d7ee: 4298 clrl %a0@+ 4d7f0: 4298 clrl %a0@+ 4d7f2: 4298 clrl %a0@+ 4d7f4: 4290 clrl %a0@ while ( the_block != end ) { 4d7f6: b489 cmpl %a1,%d2 4d7f8: 6734 beqs 4d82e <_Heap_Get_information+0x5e> <== NEVER TAKEN uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 4d7fa: 2604 movel %d4,%d3 4d7fc: 0683 0000 000c addil #12,%d3 Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4d802: 2229 0004 movel %a1@(4),%d1 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4d806: 70fe moveq #-2,%d0 uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) info = &the_info->Used; 4d808: 2043 moveal %d3,%a0 4d80a: c081 andl %d1,%d0 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4d80c: d3c0 addal %d0,%a1 if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4d80e: 2229 0004 movel %a1@(4),%d1 while ( the_block != end ) { uintptr_t const the_size = _Heap_Block_size(the_block); Heap_Block *const next_block = _Heap_Block_at(the_block, the_size); Heap_Information *info; if ( _Heap_Is_prev_used(next_block) ) 4d812: 0801 0000 btst #0,%d1 4d816: 6602 bnes 4d81a <_Heap_Get_information+0x4a> info = &the_info->Used; else info = &the_info->Free; 4d818: 2044 moveal %d4,%a0 info->number++; 4d81a: 5290 addql #1,%a0@ info->total += the_size; 4d81c: d1a8 0008 addl %d0,%a0@(8) if ( info->largest < the_size ) 4d820: b0a8 0004 cmpl %a0@(4),%d0 4d824: 6304 blss 4d82a <_Heap_Get_information+0x5a> info->largest = the_size; 4d826: 2140 0004 movel %d0,%a0@(4) Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block; memset(the_info, 0, sizeof(*the_info)); while ( the_block != end ) { 4d82a: b3c2 cmpal %d2,%a1 4d82c: 66d8 bnes 4d806 <_Heap_Get_information+0x36> if ( info->largest < the_size ) info->largest = the_size; the_block = next_block; } } 4d82e: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4d832: 4e5e unlk %fp ... =============================================================================== 0005d440 <_Heap_Size_of_alloc_area>: bool _Heap_Size_of_alloc_area( Heap_Control *heap, void *alloc_begin_ptr, uintptr_t *alloc_size ) { 5d440: 4e56 0000 linkw %fp,#0 5d444: 202e 000c movel %fp@(12),%d0 RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down( uintptr_t value, uintptr_t alignment ) { return value - (value % alignment); 5d448: 2040 moveal %d0,%a0 5d44a: 5188 subql #8,%a0 5d44c: 226e 0008 moveal %fp@(8),%a1 5d450: 2f02 movel %d2,%sp@- 5d452: 2400 movel %d0,%d2 5d454: 4c69 2001 0010 remul %a1@(16),%d1,%d2 uintptr_t alloc_begin, uintptr_t page_size ) { return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size ) - HEAP_BLOCK_HEADER_SIZE); 5d45a: 91c1 subal %d1,%a0 RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap( const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block 5d45c: 2229 0020 movel %a1@(32),%d1 && (uintptr_t) block <= (uintptr_t) heap->last_block; 5d460: b288 cmpl %a0,%d1 5d462: 6236 bhis 5d49a <_Heap_Size_of_alloc_area+0x5a> 5d464: 2269 0024 moveal %a1@(36),%a1 5d468: b3c8 cmpal %a0,%a1 5d46a: 652e bcss 5d49a <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 5d46c: 74fe moveq #-2,%d2 5d46e: c4a8 0004 andl %a0@(4),%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 5d472: d1c2 addal %d2,%a0 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 5d474: b1c1 cmpal %d1,%a0 5d476: 6522 bcss 5d49a <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN 5d478: b1c9 cmpal %a1,%a0 5d47a: 621e bhis 5d49a <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 5d47c: 7201 moveq #1,%d1 5d47e: c2a8 0004 andl %a0@(4),%d1 block_size = _Heap_Block_size( block ); next_block = _Heap_Block_at( block, block_size ); if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) 5d482: 6716 beqs 5d49a <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5d484: 7204 moveq #4,%d1 5d486: 9280 subl %d0,%d1 5d488: 2001 movel %d1,%d0 5d48a: d088 addl %a0,%d0 5d48c: 226e 0010 moveal %fp@(16),%a1 return true; } 5d490: 241f movel %sp@+,%d2 5d492: 4e5e unlk %fp || !_Heap_Is_prev_used( next_block ) ) { return false; } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; 5d494: 2280 movel %d0,%a1@ return true; 5d496: 7001 moveq #1,%d0 } 5d498: 4e75 rts 5d49a: 241f movel %sp@+,%d2 5d49c: 4e5e unlk %fp if ( !_Heap_Is_block_in_heap( heap, next_block ) || !_Heap_Is_prev_used( next_block ) ) { return false; 5d49e: 4200 clrb %d0 } *alloc_size = (uintptr_t) next_block + HEAP_ALLOC_BONUS - alloc_begin; return true; } ... =============================================================================== 0004856e <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4856e: 4e56 ffc4 linkw %fp,#-60 48572: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 48576: 246e 0008 moveal %fp@(8),%a2 uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 4857a: 4bfa ff94 lea %pc@(48510 <_Heap_Walk_print_nothing>),%a5 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 4857e: 2a2e 000c movel %fp@(12),%d5 uintptr_t const page_size = heap->page_size; 48582: 262a 0010 movel %a2@(16),%d3 uintptr_t const min_block_size = heap->min_block_size; 48586: 2c2a 0014 movel %a2@(20),%d6 Heap_Block *const first_block = heap->first_block; 4858a: 282a 0020 movel %a2@(32),%d4 Heap_Block *const last_block = heap->last_block; 4858e: 2e2a 0024 movel %a2@(36),%d7 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 48592: 4a2e 0013 tstb %fp@(19) 48596: 6704 beqs 4859c <_Heap_Walk+0x2e> 48598: 4bfa ff7e lea %pc@(48518 <_Heap_Walk_print>),%a5 if ( !_System_state_Is_up( _System_state_Get() ) ) { 4859c: 7003 moveq #3,%d0 4859e: b0b9 0006 32dc cmpl 632dc <_System_state_Current>,%d0 485a4: 670c beqs 485b2 <_Heap_Walk+0x44> block = next_block; } while ( block != first_block ); return true; } 485a6: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 } block = next_block; } while ( block != first_block ); return true; 485ac: 7001 moveq #1,%d0 } 485ae: 4e5e unlk %fp 485b0: 4e75 rts Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 485b2: 2f2a 000c movel %a2@(12),%sp@- 485b6: 2f2a 0008 movel %a2@(8),%sp@- 485ba: 2f07 movel %d7,%sp@- 485bc: 2f04 movel %d4,%sp@- 485be: 2f2a 001c movel %a2@(28),%sp@- 485c2: 2f2a 0018 movel %a2@(24),%sp@- 485c6: 2f06 movel %d6,%sp@- 485c8: 2f03 movel %d3,%sp@- 485ca: 4879 0005 f559 pea 5f559 <_Status_Object_name_errors_to_status+0x5d> 485d0: 42a7 clrl %sp@- 485d2: 2f05 movel %d5,%sp@- 485d4: 4e95 jsr %a5@ heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 485d6: 4fef 002c lea %sp@(44),%sp 485da: 4a83 tstl %d3 485dc: 6700 0082 beqw 48660 <_Heap_Walk+0xf2> ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 485e0: 7003 moveq #3,%d0 485e2: c083 andl %d3,%d0 (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 485e4: 6600 0090 bnew 48676 <_Heap_Walk+0x108> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 485e8: 2206 movel %d6,%d1 485ea: 4c43 1000 remul %d3,%d0,%d1 ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 485ee: 4a80 tstl %d0 485f0: 6600 00a4 bnew 48696 <_Heap_Walk+0x128> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 485f4: 2004 movel %d4,%d0 485f6: 5080 addql #8,%d0 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 485f8: 4c43 0001 remul %d3,%d1,%d0 ); return false; } if ( 485fc: 4a81 tstl %d1 485fe: 6600 00ae bnew 486ae <_Heap_Walk+0x140> block = next_block; } while ( block != first_block ); return true; } 48602: 2044 moveal %d4,%a0 48604: 2228 0004 movel %a0@(4),%d1 48608: 2d41 ffec movel %d1,%fp@(-20) ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 4860c: 0801 0000 btst #0,%d1 48610: 6700 0188 beqw 4879a <_Heap_Walk+0x22c> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48614: 2047 moveal %d7,%a0 48616: 72fe moveq #-2,%d1 48618: c2a8 0004 andl %a0@(4),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 4861c: d1c1 addal %d1,%a0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4861e: 7201 moveq #1,%d1 48620: c2a8 0004 andl %a0@(4),%d1 ); return false; } if ( _Heap_Is_free( last_block ) ) { 48624: 6724 beqs 4864a <_Heap_Walk+0xdc> ); return false; } if ( 48626: b1c4 cmpal %d4,%a0 48628: 6700 009c beqw 486c6 <_Heap_Walk+0x158> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 4862c: 4879 0005 f6b3 pea 5f6b3 <_Status_Object_name_errors_to_status+0x1b7> 48632: 4878 0001 pea 1 48636: 2f05 movel %d5,%sp@- 48638: 4e95 jsr %a5@ 4863a: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4863e: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48640: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48646: 4e5e unlk %fp 48648: 4e75 rts return false; } if ( _Heap_Is_free( last_block ) ) { (*printer)( 4864a: 4879 0005 f69e pea 5f69e <_Status_Object_name_errors_to_status+0x1a2> } if ( _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 48650: 4878 0001 pea 1 48654: 2f05 movel %d5,%sp@- 48656: 4e95 jsr %a5@ 48658: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 4865c: 4200 clrb %d0 4865e: 60e0 bras 48640 <_Heap_Walk+0xd2> first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { (*printer)( source, true, "page size is zero\n" ); 48660: 4879 0005 f5ea pea 5f5ea <_Status_Object_name_errors_to_status+0xee> } if ( _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 48666: 4878 0001 pea 1 4866a: 2f05 movel %d5,%sp@- 4866c: 4e95 jsr %a5@ 4866e: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 48672: 4200 clrb %d0 48674: 60ca bras 48640 <_Heap_Walk+0xd2> return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { (*printer)( 48676: 2f03 movel %d3,%sp@- 48678: 4879 0005 f5fd pea 5f5fd <_Status_Object_name_errors_to_status+0x101> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4867e: 4878 0001 pea 1 48682: 2f05 movel %d5,%sp@- 48684: 4e95 jsr %a5@ 48686: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 4868a: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 4868c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48692: 4e5e unlk %fp 48694: 4e75 rts return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { (*printer)( 48696: 2f06 movel %d6,%sp@- 48698: 4879 0005 f61b pea 5f61b <_Status_Object_name_errors_to_status+0x11f> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4869e: 4878 0001 pea 1 486a2: 2f05 movel %d5,%sp@- 486a4: 4e95 jsr %a5@ 486a6: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 486aa: 4200 clrb %d0 486ac: 60de bras 4868c <_Heap_Walk+0x11e> } if ( !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 486ae: 2f04 movel %d4,%sp@- 486b0: 4879 0005 f63f pea 5f63f <_Status_Object_name_errors_to_status+0x143> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 486b6: 4878 0001 pea 1 486ba: 2f05 movel %d5,%sp@- 486bc: 4e95 jsr %a5@ 486be: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 486c2: 4200 clrb %d0 486c4: 60c6 bras 4868c <_Heap_Walk+0x11e> int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 486c6: 202a 0010 movel %a2@(16),%d0 block = next_block; } while ( block != first_block ); return true; } 486ca: 226a 0008 moveal %a2@(8),%a1 int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 486ce: 2d40 fffc movel %d0,%fp@(-4) const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 486d2: b3ca cmpal %a2,%a1 486d4: 6700 034e beqw 48a24 <_Heap_Walk+0x4b6> block = next_block; } while ( block != first_block ); return true; } 486d8: 242a 0020 movel %a2@(32),%d2 486dc: 2d42 fff4 movel %d2,%fp@(-12) const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 486e0: b3c2 cmpal %d2,%a1 486e2: 6500 009a bcsw 4877e <_Heap_Walk+0x210> 486e6: 286a 0024 moveal %a2@(36),%a4 486ea: b3cc cmpal %a4,%a1 486ec: 6200 0090 bhiw 4877e <_Heap_Walk+0x210> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 486f0: 47e9 0008 lea %a1@(8),%a3 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 486f4: 200b movel %a3,%d0 486f6: 222e fffc movel %fp@(-4),%d1 486fa: 4c41 0002 remul %d1,%d2,%d0 ); return false; } if ( 486fe: 4a82 tstl %d2 48700: 6600 00b0 bnew 487b2 <_Heap_Walk+0x244> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48704: 74fe moveq #-2,%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 48706: 7001 moveq #1,%d0 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48708: c4a9 0004 andl %a1@(4),%d2 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4870c: c0b1 2804 andl %a1@(00000004,%d2:l),%d0 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48710: 6600 0304 bnew 48a16 <_Heap_Walk+0x4a8> 48714: 222e fff4 movel %fp@(-12),%d1 48718: 240a movel %a2,%d2 4871a: 266e ffec moveal %fp@(-20),%a3 4871e: 2d43 fff8 movel %d3,%fp@(-8) 48722: 2d44 fff0 movel %d4,%fp@(-16) ); return false; } if ( free_block->prev != prev_block ) { 48726: 2069 000c moveal %a1@(12),%a0 4872a: b488 cmpl %a0,%d2 4872c: 6600 02cc bnew 489fa <_Heap_Walk+0x48c> return false; } prev_block = free_block; free_block = free_block->next; 48730: 2069 0008 moveal %a1@(8),%a0 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 48734: b1ca cmpal %a2,%a0 48736: 6700 0096 beqw 487ce <_Heap_Walk+0x260> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4873a: b1c1 cmpal %d1,%a0 4873c: 6542 bcss 48780 <_Heap_Walk+0x212> RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block( const Heap_Block *block ) { return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE; 4873e: 2608 movel %a0,%d3 48740: 5083 addql #8,%d3 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 48742: b9c8 cmpal %a0,%a4 48744: 653a bcss 48780 <_Heap_Walk+0x212> <== NEVER TAKEN RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48746: 282e fffc movel %fp@(-4),%d4 ); return false; } if ( _Heap_Is_used( free_block ) ) { 4874a: 2409 movel %a1,%d2 4874c: 2248 moveal %a0,%a1 4874e: 4c44 3000 remul %d4,%d0,%d3 ); return false; } if ( 48752: 4a80 tstl %d0 48754: 665e bnes 487b4 <_Heap_Walk+0x246> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48756: 70fe moveq #-2,%d0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 48758: 7601 moveq #1,%d3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 4875a: c0a8 0004 andl %a0@(4),%d0 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 4875e: c6b0 0804 andl %a0@(00000004,%d0:l),%d3 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48762: 67c2 beqs 48726 <_Heap_Walk+0x1b8> (*printer)( 48764: 2f08 movel %a0,%sp@- 48766: 4879 0005 f732 pea 5f732 <_Status_Object_name_errors_to_status+0x236> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 4876c: 4878 0001 pea 1 48770: 2f05 movel %d5,%sp@- 48772: 4e95 jsr %a5@ 48774: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 48778: 4200 clrb %d0 4877a: 6000 ff10 braw 4868c <_Heap_Walk+0x11e> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 4877e: 2049 moveal %a1,%a0 <== NOT EXECUTED const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { (*printer)( 48780: 2f08 movel %a0,%sp@- 48782: 4879 0005 f6e2 pea 5f6e2 <_Status_Object_name_errors_to_status+0x1e6> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 48788: 4878 0001 pea 1 4878c: 2f05 movel %d5,%sp@- 4878e: 4e95 jsr %a5@ 48790: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 48794: 4200 clrb %d0 48796: 6000 fef4 braw 4868c <_Heap_Walk+0x11e> return false; } if ( !_Heap_Is_prev_used( first_block ) ) { (*printer)( 4879a: 4879 0005 f670 pea 5f670 <_Status_Object_name_errors_to_status+0x174> } if ( _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 487a0: 4878 0001 pea 1 487a4: 2f05 movel %d5,%sp@- 487a6: 4e95 jsr %a5@ 487a8: 4fef 000c lea %sp@(12),%sp if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 487ac: 4200 clrb %d0 487ae: 6000 fe90 braw 48640 <_Heap_Walk+0xd2> ); return false; } if ( 487b2: 2049 moveal %a1,%a0 <== NOT EXECUTED !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 487b4: 2f08 movel %a0,%sp@- 487b6: 4879 0005 f702 pea 5f702 <_Status_Object_name_errors_to_status+0x206> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 487bc: 4878 0001 pea 1 487c0: 2f05 movel %d5,%sp@- 487c2: 4e95 jsr %a5@ 487c4: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 487c8: 4200 clrb %d0 487ca: 6000 fec0 braw 4868c <_Heap_Walk+0x11e> 487ce: 262e fff8 movel %fp@(-8),%d3 487d2: 282e fff0 movel %fp@(-16),%d4 ); return false; } if ( _Heap_Is_used( free_block ) ) { 487d6: 2844 moveal %d4,%a4 487d8: 2d41 fff4 movel %d1,%fp@(-12) 487dc: 222e fff4 movel %fp@(-12),%d1 487e0: 2d4b ffec movel %a3,%fp@(-20) 487e4: 2d43 fffc movel %d3,%fp@(-4) 487e8: 262e ffec movel %fp@(-20),%d3 487ec: 2d47 fff0 movel %d7,%fp@(-16) - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 487f0: 74fe moveq #-2,%d2 487f2: c483 andl %d3,%d2 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 487f4: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 487f8: b7c1 cmpal %d1,%a3 487fa: 657e bcss 4887a <_Heap_Walk+0x30c> <== NEVER TAKEN 487fc: b7ea 0024 cmpal %a2@(36),%a3 48800: 6278 bhis 4887a <_Heap_Walk+0x30c> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 48802: b9ee fff0 cmpal %fp@(-16),%a4 48806: 56c7 sne %d7 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 48808: 222e fffc movel %fp@(-4),%d1 4880c: 2002 movel %d2,%d0 4880e: 3247 moveaw %d7,%a1 48810: 4c41 0007 remul %d1,%d7,%d0 48814: 2009 movel %a1,%d0 48816: 4480 negl %d0 ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 48818: 4a87 tstl %d7 4881a: 6704 beqs 48820 <_Heap_Walk+0x2b2> 4881c: 4a00 tstb %d0 4881e: 667c bnes 4889c <_Heap_Walk+0x32e> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 48820: b486 cmpl %d6,%d2 48822: 6406 bccs 4882a <_Heap_Walk+0x2bc> 48824: 4a00 tstb %d0 48826: 6600 008e bnew 488b6 <_Heap_Walk+0x348> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 4882a: b7cc cmpal %a4,%a3 4882c: 6206 bhis 48834 <_Heap_Walk+0x2c6> 4882e: 4a00 tstb %d0 48830: 6600 00a8 bnew 488da <_Heap_Walk+0x36c> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 48834: 7001 moveq #1,%d0 48836: 7201 moveq #1,%d1 48838: c0ab 0004 andl %a3@(4),%d0 4883c: c681 andl %d1,%d3 ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 4883e: 4a80 tstl %d0 48840: 6700 00cc beqw 4890e <_Heap_Walk+0x3a0> if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 48844: 4a83 tstl %d3 48846: 6700 00ac beqw 488f4 <_Heap_Walk+0x386> (*printer)( 4884a: 2f02 movel %d2,%sp@- 4884c: 2f0c movel %a4,%sp@- 4884e: 4879 0005 f8d7 pea 5f8d7 <_Status_Object_name_errors_to_status+0x3db> 48854: 42a7 clrl %sp@- 48856: 2f05 movel %d5,%sp@- 48858: 4e95 jsr %a5@ 4885a: 4fef 0014 lea %sp@(20),%sp block->prev_size ); } block = next_block; } while ( block != first_block ); 4885e: b7c4 cmpal %d4,%a3 48860: 6700 fd44 beqw 485a6 <_Heap_Walk+0x38> 48864: 262b 0004 movel %a3@(4),%d3 - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 48868: 74fe moveq #-2,%d2 4886a: 284b moveal %a3,%a4 4886c: c483 andl %d3,%d2 4886e: 222a 0020 movel %a2@(32),%d1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 48872: 47f4 2800 lea %a4@(00000000,%d2:l),%a3 const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 48876: b7c1 cmpal %d1,%a3 48878: 6482 bccs 487fc <_Heap_Walk+0x28e> <== ALWAYS TAKEN Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { (*printer)( 4887a: 2f0b movel %a3,%sp@- 4887c: 2f0c movel %a4,%sp@- 4887e: 4879 0005 f780 pea 5f780 <_Status_Object_name_errors_to_status+0x284> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48884: 4878 0001 pea 1 48888: 2f05 movel %d5,%sp@- 4888a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 4888c: 4fef 0014 lea %sp@(20),%sp 48890: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 48892: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48898: 4e5e unlk %fp 4889a: 4e75 rts return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { (*printer)( 4889c: 2f02 movel %d2,%sp@- 4889e: 2f0c movel %a4,%sp@- 488a0: 4879 0005 f7ad pea 5f7ad <_Status_Object_name_errors_to_status+0x2b1> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 488a6: 4878 0001 pea 1 488aa: 2f05 movel %d5,%sp@- 488ac: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 488ae: 4fef 0014 lea %sp@(20),%sp 488b2: 4200 clrb %d0 488b4: 60dc bras 48892 <_Heap_Walk+0x324> return false; } if ( block_size < min_block_size && is_not_last_block ) { (*printer)( 488b6: 2f06 movel %d6,%sp@- 488b8: 2f02 movel %d2,%sp@- 488ba: 2f0c movel %a4,%sp@- 488bc: 4879 0005 f7db pea 5f7db <_Status_Object_name_errors_to_status+0x2df> 488c2: 4878 0001 pea 1 488c6: 2f05 movel %d5,%sp@- 488c8: 4e95 jsr %a5@ block, block_size, min_block_size ); return false; 488ca: 4fef 0018 lea %sp@(24),%sp block = next_block; } while ( block != first_block ); return true; } 488ce: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 block, block_size, min_block_size ); return false; 488d4: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 488d6: 4e5e unlk %fp 488d8: 4e75 rts return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 488da: 2f0b movel %a3,%sp@- 488dc: 2f0c movel %a4,%sp@- 488de: 4879 0005 f806 pea 5f806 <_Status_Object_name_errors_to_status+0x30a> 488e4: 4878 0001 pea 1 488e8: 2f05 movel %d5,%sp@- 488ea: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 488ec: 4fef 0014 lea %sp@(20),%sp 488f0: 4200 clrb %d0 488f2: 609e bras 48892 <_Heap_Walk+0x324> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 488f4: 2f14 movel %a4@,%sp@- 488f6: 2f02 movel %d2,%sp@- 488f8: 2f0c movel %a4,%sp@- 488fa: 4879 0005 f8ee pea 5f8ee <_Status_Object_name_errors_to_status+0x3f2> 48900: 42a7 clrl %sp@- 48902: 2f05 movel %d5,%sp@- 48904: 4e95 jsr %a5@ 48906: 4fef 0018 lea %sp@(24),%sp 4890a: 6000 ff52 braw 4885e <_Heap_Walk+0x2f0> block = next_block; } while ( block != first_block ); return true; } 4890e: 2e2a 0008 movel %a2@(8),%d7 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 48912: 43f9 0005 f526 lea 5f526 <_Status_Object_name_errors_to_status+0x2a>,%a1 block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? 48918: 222c 0008 movel %a4@(8),%d1 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 4891c: b2aa 000c cmpl %a2@(12),%d1 48920: 670a beqs 4892c <_Heap_Walk+0x3be> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 48922: 43f9 0005 f46e lea 5f46e ,%a1 48928: b28a cmpl %a2,%d1 4892a: 6764 beqs 48990 <_Heap_Walk+0x422> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 4892c: 202c 000c movel %a4@(12),%d0 Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 48930: 41f9 0005 f53f lea 5f53f <_Status_Object_name_errors_to_status+0x43>,%a0 48936: b087 cmpl %d7,%d0 48938: 670a beqs 48944 <_Heap_Walk+0x3d6> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 4893a: 41f9 0005 f46e lea 5f46e ,%a0 48940: b08a cmpl %a2,%d0 48942: 6754 beqs 48998 <_Heap_Walk+0x42a> Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 48944: 2f09 movel %a1,%sp@- 48946: 2f01 movel %d1,%sp@- 48948: 2f08 movel %a0,%sp@- 4894a: 2f00 movel %d0,%sp@- 4894c: 2f02 movel %d2,%sp@- 4894e: 2f0c movel %a4,%sp@- 48950: 4879 0005 f83a pea 5f83a <_Status_Object_name_errors_to_status+0x33e> 48956: 42a7 clrl %sp@- 48958: 2f05 movel %d5,%sp@- 4895a: 4e95 jsr %a5@ block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 4895c: 2213 movel %a3@,%d1 4895e: 4fef 0024 lea %sp@(36),%sp 48962: b282 cmpl %d2,%d1 48964: 663a bnes 489a0 <_Heap_Walk+0x432> ); return false; } if ( !prev_used ) { 48966: 4a83 tstl %d3 48968: 6776 beqs 489e0 <_Heap_Walk+0x472> block = next_block; } while ( block != first_block ); return true; } 4896a: 206a 0008 moveal %a2@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 4896e: b1ca cmpal %a2,%a0 48970: 6754 beqs 489c6 <_Heap_Walk+0x458> <== NEVER TAKEN if ( free_block == block ) { 48972: b1cc cmpal %a4,%a0 48974: 6700 fee8 beqw 4885e <_Heap_Walk+0x2f0> 48978: 2e2e fff0 movel %fp@(-16),%d7 return true; } free_block = free_block->next; 4897c: 2068 0008 moveal %a0@(8),%a0 ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 48980: b1ca cmpal %a2,%a0 48982: 6742 beqs 489c6 <_Heap_Walk+0x458> if ( free_block == block ) { 48984: b1cc cmpal %a4,%a0 48986: 66f4 bnes 4897c <_Heap_Walk+0x40e> 48988: 2d47 fff0 movel %d7,%fp@(-16) 4898c: 6000 fed0 braw 4885e <_Heap_Walk+0x2f0> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 48990: 43f9 0005 f535 lea 5f535 <_Status_Object_name_errors_to_status+0x39>,%a1 48996: 6094 bras 4892c <_Heap_Walk+0x3be> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 48998: 41f9 0005 f54f lea 5f54f <_Status_Object_name_errors_to_status+0x53>,%a0 4899e: 60a4 bras 48944 <_Heap_Walk+0x3d6> " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { (*printer)( 489a0: 2f0b movel %a3,%sp@- 489a2: 2f01 movel %d1,%sp@- 489a4: 2f02 movel %d2,%sp@- 489a6: 2f0c movel %a4,%sp@- 489a8: 4879 0005 f86f pea 5f86f <_Status_Object_name_errors_to_status+0x373> 489ae: 4878 0001 pea 1 489b2: 2f05 movel %d5,%sp@- 489b4: 4e95 jsr %a5@ 489b6: 4fef 001c lea %sp@(28),%sp block = next_block; } while ( block != first_block ); return true; } 489ba: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 489c0: 4200 clrb %d0 block = next_block; } while ( block != first_block ); return true; } 489c2: 4e5e unlk %fp 489c4: 4e75 rts return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 489c6: 2f0c movel %a4,%sp@- 489c8: 4879 0005 f913 pea 5f913 <_Status_Object_name_errors_to_status+0x417> 489ce: 4878 0001 pea 1 489d2: 2f05 movel %d5,%sp@- 489d4: 4e95 jsr %a5@ 489d6: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 489da: 4200 clrb %d0 489dc: 6000 fcae braw 4868c <_Heap_Walk+0x11e> return false; } if ( !prev_used ) { (*printer)( 489e0: 2f0c movel %a4,%sp@- 489e2: 4879 0005 f8a8 pea 5f8a8 <_Status_Object_name_errors_to_status+0x3ac> return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 489e8: 4878 0001 pea 1 489ec: 2f05 movel %d5,%sp@- 489ee: 4e95 jsr %a5@ 489f0: 4fef 0010 lea %sp@(16),%sp return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 489f4: 4200 clrb %d0 489f6: 6000 fc94 braw 4868c <_Heap_Walk+0x11e> return false; } if ( free_block->prev != prev_block ) { (*printer)( 489fa: 2f08 movel %a0,%sp@- 489fc: 2f09 movel %a1,%sp@- 489fe: 4879 0005 f74e pea 5f74e <_Status_Object_name_errors_to_status+0x252> return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { (*printer)( 48a04: 4878 0001 pea 1 48a08: 2f05 movel %d5,%sp@- 48a0a: 4e95 jsr %a5@ "block 0x%08x: next block 0x%08x is not a successor\n", block, next_block ); return false; 48a0c: 4fef 0014 lea %sp@(20),%sp 48a10: 4200 clrb %d0 48a12: 6000 fe7e braw 48892 <_Heap_Walk+0x324> ); return false; } if ( _Heap_Is_used( free_block ) ) { 48a16: 2049 moveal %a1,%a0 <== NOT EXECUTED (*printer)( 48a18: 2f08 movel %a0,%sp@- <== NOT EXECUTED 48a1a: 4879 0005 f732 pea 5f732 <_Status_Object_name_errors_to_status+0x236><== NOT EXECUTED 48a20: 6000 fd4a braw 4876c <_Heap_Walk+0x1fe> <== NOT EXECUTED const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 48a24: 222a 0020 movel %a2@(32),%d1 ); return false; } if ( _Heap_Is_used( free_block ) ) { 48a28: 2844 moveal %d4,%a4 const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 48a2a: 2d41 fff4 movel %d1,%fp@(-12) ); return false; } if ( _Heap_Is_used( free_block ) ) { 48a2e: 222e fff4 movel %fp@(-12),%d1 48a32: 2d43 fffc movel %d3,%fp@(-4) 48a36: 262e ffec movel %fp@(-20),%d3 48a3a: 2d47 fff0 movel %d7,%fp@(-16) 48a3e: 6000 fdb0 braw 487f0 <_Heap_Walk+0x282> ... =============================================================================== 00046f66 <_IO_Initialize_all_drivers>: * * Output Parameters: NONE */ void _IO_Initialize_all_drivers( void ) { 46f66: 4e56 0000 linkw %fp,#0 46f6a: 2f0a movel %a2,%sp@- 46f6c: 2f02 movel %d2,%sp@- rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46f6e: 4ab9 0006 14e2 tstl 614e2 <_IO_Number_of_drivers> 46f74: 671e beqs 46f94 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN 46f76: 4282 clrl %d2 46f78: 45f9 0004 c760 lea 4c760 ,%a2 (void) rtems_io_initialize( major, 0, NULL ); 46f7e: 42a7 clrl %sp@- 46f80: 42a7 clrl %sp@- 46f82: 2f02 movel %d2,%sp@- void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46f84: 5282 addql #1,%d2 (void) rtems_io_initialize( major, 0, NULL ); 46f86: 4e92 jsr %a2@ void _IO_Initialize_all_drivers( void ) { rtems_device_major_number major; for ( major=0 ; major < _IO_Number_of_drivers ; major ++ ) 46f88: 4fef 000c lea %sp@(12),%sp 46f8c: b4b9 0006 14e2 cmpl 614e2 <_IO_Number_of_drivers>,%d2 46f92: 65ea bcss 46f7e <_IO_Initialize_all_drivers+0x18> (void) rtems_io_initialize( major, 0, NULL ); } 46f94: 242e fff8 movel %fp@(-8),%d2 46f98: 246e fffc moveal %fp@(-4),%a2 46f9c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046ecc <_IO_Manager_initialization>: * workspace. * */ void _IO_Manager_initialization(void) { 46ecc: 4e56 fff0 linkw %fp,#-16 46ed0: 48d7 003c moveml %d2-%d5,%sp@ uint32_t index; rtems_driver_address_table *driver_table; uint32_t drivers_in_table; uint32_t number_of_drivers; driver_table = Configuration.Device_driver_table; 46ed4: 2639 0005 f3a6 movel 5f3a6 ,%d3 drivers_in_table = Configuration.number_of_device_drivers; 46eda: 2439 0005 f3a2 movel 5f3a2 ,%d2 number_of_drivers = Configuration.maximum_drivers; 46ee0: 2839 0005 f39e movel 5f39e ,%d4 /* * 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 ) 46ee6: b882 cmpl %d2,%d4 46ee8: 6366 blss 46f50 <_IO_Manager_initialization+0x84> * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( 46eea: 2004 movel %d4,%d0 46eec: 2a04 movel %d4,%d5 46eee: e788 lsll #3,%d0 46ef0: eb8d lsll #5,%d5 46ef2: 9a80 subl %d0,%d5 46ef4: 2f05 movel %d5,%sp@- 46ef6: 4eb9 0004 9f58 jsr 49f58 <_Workspace_Allocate_or_fatal_error> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 46efc: 2f05 movel %d5,%sp@- 46efe: 42a7 clrl %sp@- /* * 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 *) 46f00: 23c0 0006 14e6 movel %d0,614e6 <_IO_Driver_address_table> _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 46f06: 2f00 movel %d0,%sp@- _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; 46f08: 23c4 0006 14e2 movel %d4,614e2 <_IO_Number_of_drivers> memset( 46f0e: 4eb9 0004 f4ec jsr 4f4ec _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46f14: 4fef 0010 lea %sp@(16),%sp 46f18: 4a82 tstl %d2 46f1a: 672a beqs 46f46 <_IO_Manager_initialization+0x7a><== NEVER TAKEN 46f1c: 2839 0006 14e6 movel 614e6 <_IO_Driver_address_table>,%d4 46f22: 4280 clrl %d0 46f24: 4281 clrl %d1 _IO_Driver_address_table[index] = driver_table[index]; 46f26: 2243 moveal %d3,%a1 46f28: 2044 moveal %d4,%a0 46f2a: d3c0 addal %d0,%a1 46f2c: d1c0 addal %d0,%a0 memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46f2e: 5281 addql #1,%d1 46f30: 0680 0000 0018 addil #24,%d0 _IO_Driver_address_table[index] = driver_table[index]; 46f36: 20d9 movel %a1@+,%a0@+ 46f38: 20d9 movel %a1@+,%a0@+ 46f3a: 20d9 movel %a1@+,%a0@+ 46f3c: 20d9 movel %a1@+,%a0@+ 46f3e: 20d9 movel %a1@+,%a0@+ 46f40: 2091 movel %a1@,%a0@ memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 46f42: b282 cmpl %d2,%d1 46f44: 65e0 bcss 46f26 <_IO_Manager_initialization+0x5a> _IO_Driver_address_table[index] = driver_table[index]; } 46f46: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46f4c: 4e5e unlk %fp 46f4e: 4e75 rts * 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; 46f50: 23c3 0006 14e6 movel %d3,614e6 <_IO_Driver_address_table> _IO_Number_of_drivers = number_of_drivers; 46f56: 23c2 0006 14e2 movel %d2,614e2 <_IO_Number_of_drivers> sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) _IO_Driver_address_table[index] = driver_table[index]; } 46f5c: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46f62: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047b1c <_Internal_error_Occurred>: void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47b1c: 4e56 fffc linkw %fp,#-4 47b20: 206e 0010 moveal %fp@(16),%a0 47b24: 2f02 movel %d2,%sp@- 47b26: 222e 000c movel %fp@(12),%d1 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47b2a: 4282 clrl %d2 47b2c: 1401 moveb %d1,%d2 47b2e: 2242 moveal %d2,%a1 47b30: 2f08 movel %a0,%sp@- void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 47b32: 202e 0008 movel %fp@(8),%d0 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47b36: 2f09 movel %a1,%sp@- Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; 47b38: 13c1 0006 0d02 moveb %d1,60d02 <_Internal_errors_What_happened+0x4> _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 47b3e: 2d48 fffc movel %a0,%fp@(-4) bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 47b42: 23c0 0006 0cfe movel %d0,60cfe <_Internal_errors_What_happened> _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; 47b48: 23c8 0006 0d04 movel %a0,60d04 <_Internal_errors_What_happened+0x6> _User_extensions_Fatal( the_source, is_internal, the_error ); 47b4e: 2f00 movel %d0,%sp@- 47b50: 4eb9 0004 9ad6 jsr 49ad6 <_User_extensions_Fatal> _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 47b56: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 47b5a: 327c 0700 moveaw #1792,%a1 <== NOT EXECUTED 47b5e: 2409 movel %a1,%d2 <== NOT EXECUTED 47b60: 40c0 movew %sr,%d0 <== NOT EXECUTED 47b62: 8082 orl %d2,%d0 <== NOT EXECUTED 47b64: 46c0 movew %d0,%sr <== NOT EXECUTED 47b66: 2008 movel %a0,%d0 <== NOT EXECUTED 47b68: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47b6e: 4ac8 halt <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 47b70: 7005 moveq #5,%d0 <== NOT EXECUTED 47b72: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 47b76: 23c0 0006 0db4 movel %d0,60db4 <_System_state_Current> <== NOT EXECUTED 47b7c: 60fe bras 47b7c <_Internal_error_Occurred+0x60> <== NOT EXECUTED ... =============================================================================== 00047be0 <_Objects_Allocate>: */ Objects_Control *_Objects_Allocate( Objects_Information *information ) { 47be0: 4e56 fff0 linkw %fp,#-16 47be4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47be8: 246e 0008 moveal %fp@(8),%a2 * If the application is using the optional manager stubs and * still attempts to create the object, the information block * should be all zeroed out because it is in the BSS. So let's * check that code for this manager is even present. */ if ( information->size == 0 ) 47bec: 4aaa 0014 tstl %a2@(20) 47bf0: 660c bnes 47bfe <_Objects_Allocate+0x1e> <== ALWAYS TAKEN return NULL; 47bf2: 4280 clrl %d0 <== NOT EXECUTED ); } #endif return the_object; } 47bf4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47bfa: 4e5e unlk %fp 47bfc: 4e75 rts /* * OK. The manager should be initialized and configured to have objects. * With any luck, it is safe to attempt to allocate an object. */ the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47bfe: 240a movel %a2,%d2 47c00: 0682 0000 001c addil #28,%d2 47c06: 47f9 0004 723c lea 4723c <_Chain_Get>,%a3 47c0c: 2f02 movel %d2,%sp@- 47c0e: 4e93 jsr %a3@ if ( information->auto_extend ) { 47c10: 588f addql #4,%sp 47c12: 4a2a 0010 tstb %a2@(16) 47c16: 67dc beqs 47bf4 <_Objects_Allocate+0x14> /* * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { 47c18: 4a80 tstl %d0 47c1a: 6738 beqs 47c54 <_Objects_Allocate+0x74> } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47c1c: 2040 moveal %d0,%a0 47c1e: 4281 clrl %d1 47c20: 4283 clrl %d3 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47c22: 4282 clrl %d2 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47c24: 362a 0008 movew %a2@(8),%d3 47c28: 3228 000a movew %a0@(10),%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47c2c: 342a 0012 movew %a2@(18),%d2 information->inactive_per_block[ block ]--; 47c30: 206a 002a moveal %a2@(42),%a0 } if ( the_object ) { uint32_t block; block = (uint32_t) _Objects_Get_index( the_object->id ) - 47c34: 9283 subl %d3,%d1 _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; 47c36: 4c42 1001 remul %d2,%d1,%d1 information->inactive_per_block[ block ]--; information->inactive--; 47c3a: 326a 0028 moveaw %a2@(40),%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47c3e: e589 lsll #2,%d1 information->inactive--; 47c40: 5389 subql #1,%a1 block = (uint32_t) _Objects_Get_index( the_object->id ) - _Objects_Get_index( information->minimum_id ); block /= information->allocation_size; information->inactive_per_block[ block ]--; 47c42: d1c1 addal %d1,%a0 47c44: 5390 subql #1,%a0@ information->inactive--; 47c46: 3549 0028 movew %a1,%a2@(40) ); } #endif return the_object; } 47c4a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47c50: 4e5e unlk %fp 47c52: 4e75 rts * If the list is empty then we are out of objects and need to * extend information base. */ if ( !the_object ) { _Objects_Extend_information( information ); 47c54: 2f0a movel %a2,%sp@- 47c56: 4eb9 0004 7c9c jsr 47c9c <_Objects_Extend_information> the_object = (Objects_Control *) _Chain_Get( &information->Inactive ); 47c5c: 2f02 movel %d2,%sp@- 47c5e: 4e93 jsr %a3@ } if ( the_object ) { 47c60: 508f addql #8,%sp 47c62: 4a80 tstl %d0 47c64: 66b6 bnes 47c1c <_Objects_Allocate+0x3c> ); } #endif return the_object; } 47c66: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47c6c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047c70 <_Objects_Close>: RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 47c70: 4280 clrl %d0 void _Objects_Close( Objects_Information *information, Objects_Control *the_object ) { 47c72: 4e56 0000 linkw %fp,#0 47c76: 226e 000c moveal %fp@(12),%a1 47c7a: 206e 0008 moveal %fp@(8),%a0 47c7e: 2f0a movel %a2,%sp@- #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47c80: 2468 0018 moveal %a0@(24),%a2 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 47c84: 3029 000a movew %a1@(10),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47c88: 42b2 0c00 clrl %a2@(00000000,%d0:l:4) _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); } 47c8c: 245f moveal %sp@+,%a2 Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47c8e: 2d49 000c movel %a1,%fp@(12) } 47c92: 4e5e unlk %fp Objects_Control *the_object ) { _Objects_Invalidate_Id( information, the_object ); _Objects_Namespace_remove( information, the_object ); 47c94: 4ef9 0004 8218 jmp 48218 <_Objects_Namespace_remove> ... =============================================================================== 00047c9c <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 47c9c: 4e56 ffcc linkw %fp,#-52 47ca0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47ca4: 246e 0008 moveal %fp@(8),%a2 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47ca8: 4285 clrl %d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47caa: 206a 002e moveal %a2@(46),%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47cae: 3a2a 0008 movew %a2@(8),%d5 index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47cb2: 4a88 tstl %a0 47cb4: 6700 022c beqw 47ee2 <_Objects_Extend_information+0x246> block_count = 0; else { block_count = information->maximum / information->allocation_size; 47cb8: 322a 000e movew %a2@(14),%d1 47cbc: 302a 0012 movew %a2@(18),%d0 47cc0: 3801 movew %d1,%d4 47cc2: 0284 0000 ffff andil #65535,%d4 47cc8: 88c0 divuw %d0,%d4 47cca: 0284 0000 ffff andil #65535,%d4 for ( ; block < block_count; block++ ) { 47cd0: 6700 0226 beqw 47ef8 <_Objects_Extend_information+0x25c> if ( information->object_blocks[ block ] == NULL ) { 47cd4: 4a90 tstl %a0@ 47cd6: 6700 0230 beqw 47f08 <_Objects_Extend_information+0x26c> * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 47cda: 5888 addql #4,%a0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47cdc: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 47cde: 4282 clrl %d2 block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 47ce0: 0280 0000 ffff andil #65535,%d0 do_extend = false; break; } else index_base += information->allocation_size; 47ce6: d680 addl %d0,%d3 if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 47ce8: 5282 addql #1,%d2 47cea: b484 cmpl %d4,%d2 47cec: 6400 01a0 bccw 47e8e <_Objects_Extend_information+0x1f2> if ( information->object_blocks[ block ] == NULL ) { 47cf0: 4a98 tstl %a0@+ 47cf2: 66f2 bnes 47ce6 <_Objects_Extend_information+0x4a> do_extend = false; 47cf4: 4207 clrb %d7 } else index_base += information->allocation_size; } } maximum = (uint32_t) information->maximum + information->allocation_size; 47cf6: 0281 0000 ffff andil #65535,%d1 47cfc: 2641 moveal %d1,%a3 47cfe: d7c0 addal %d0,%a3 /* * We need to limit the number of objects to the maximum number * representable in the index portion of the object Id. In the * case of 16-bit Ids, this is only 256 object instances. */ if ( maximum > OBJECTS_ID_FINAL_INDEX ) { 47d00: b7fc 0000 ffff cmpal #65535,%a3 47d06: 6200 017c bhiw 47e84 <_Objects_Extend_information+0x1e8> /* * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; 47d0a: 41ea 0014 lea %a2@(20),%a0 47d0e: 4c10 0800 mulsl %a0@,%d0 if ( information->auto_extend ) { 47d12: 4a2a 0010 tstb %a2@(16) 47d16: 6700 017c beqw 47e94 <_Objects_Extend_information+0x1f8> new_object_block = _Workspace_Allocate( block_size ); 47d1a: 2f00 movel %d0,%sp@- 47d1c: 4eb9 0004 9f22 jsr 49f22 <_Workspace_Allocate> if ( !new_object_block ) 47d22: 588f addql #4,%sp * Allocate the name table, and the objects and if it fails either return or * generate a fatal error depending on auto-extending being active. */ block_size = information->allocation_size * information->size; if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); 47d24: 2c00 movel %d0,%d6 if ( !new_object_block ) 47d26: 6700 015c beqw 47e84 <_Objects_Extend_information+0x1e8> } /* * Do we need to grow the tables? */ if ( do_extend ) { 47d2a: 4a07 tstb %d7 47d2c: 6700 00be beqw 47dec <_Objects_Extend_information+0x150> */ /* * Up the block count and maximum */ block_count++; 47d30: 2a44 moveal %d4,%a5 47d32: 528d addql #1,%a5 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); 47d34: 200b movel %a3,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 47d36: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 ((maximum + minimum_index) * sizeof(Objects_Control *)); 47d3a: d088 addl %a0,%d0 /* * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + 47d3c: d085 addl %d5,%d0 block_count++; /* * Allocate the tables and break it up. */ block_size = block_count * 47d3e: e588 lsll #2,%d0 (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 47d40: 2f00 movel %d0,%sp@- 47d42: 4eb9 0004 9f22 jsr 49f22 <_Workspace_Allocate> if ( !object_blocks ) { 47d48: 588f addql #4,%sp * Allocate the tables and break it up. */ block_size = block_count * (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); 47d4a: 2840 moveal %d0,%a4 if ( !object_blocks ) { 47d4c: 4a80 tstl %d0 47d4e: 6700 01c8 beqw 47f18 <_Objects_Extend_information+0x27c> } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47d52: 2e0d movel %a5,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47d54: 4280 clrl %d0 } /* * Break the block into the various sections. */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 47d56: e58f lsll #2,%d7 * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 47d58: 302a 000e movew %a2@(14),%d0 47d5c: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47d60: de8d addl %a5,%d7 47d62: b085 cmpl %d5,%d0 47d64: 6200 013e bhiw 47ea4 <_Objects_Extend_information+0x208> } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47d68: 4a85 tstl %d5 47d6a: 670c beqs 47d78 <_Objects_Extend_information+0xdc><== NEVER TAKEN 47d6c: 2047 moveal %d7,%a0 47d6e: 4280 clrl %d0 local_table[ index ] = NULL; 47d70: 4298 clrl %a0@+ } else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 47d72: 5280 addql #1,%d0 47d74: b085 cmpl %d5,%d0 47d76: 65f8 bcss 47d70 <_Objects_Extend_information+0xd4><== NEVER TAKEN 47d78: e58c lsll #2,%d4 */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 47d7a: 4281 clrl %d1 } /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 47d7c: 42b4 4800 clrl %a4@(00000000,%d4:l) inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); 47d80: 322a 0012 movew %a2@(18),%d1 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; 47d84: 42b5 4800 clrl %a5@(00000000,%d4:l) for ( index=index_base ; index < ( information->allocation_size + index_base ); 47d88: d283 addl %d3,%d1 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 47d8a: b283 cmpl %d3,%d1 47d8c: 6310 blss 47d9e <_Objects_Extend_information+0x102><== NEVER TAKEN 47d8e: 2247 moveal %d7,%a1 * information - object information table * * Output parameters: NONE */ void _Objects_Extend_information( 47d90: 2003 movel %d3,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 47d92: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0 index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; 47d96: 4298 clrl %a0@+ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 47d98: 5280 addql #1,%d0 * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; for ( index=index_base ; 47d9a: b280 cmpl %d0,%d1 47d9c: 62f8 bhis 47d96 <_Objects_Extend_information+0xfa> index < ( information->allocation_size + index_base ); index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 47d9e: 203c 0000 0700 movel #1792,%d0 47da4: 40c4 movew %sr,%d4 47da6: 8084 orl %d4,%d0 47da8: 46c0 movew %d0,%sr uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47daa: 2012 movel %a2@,%d0 47dac: 7a18 moveq #24,%d5 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; information->maximum_id = _Objects_Build_id( 47dae: 4281 clrl %d1 47db0: eba8 lsll %d5,%d0 47db2: 322a 0004 movew %a2@(4),%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 47db6: 1a3c 001b moveb #27,%d5 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47dba: 08c0 0010 bset #16,%d0 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 47dbe: eba9 lsll %d5,%d1 47dc0: 4285 clrl %d5 47dc2: 8081 orl %d1,%d0 47dc4: 3a0b movew %a3,%d5 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 47dc6: 206a 002e moveal %a2@(46),%a0 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47dca: 8085 orl %d5,%d0 information->object_blocks = object_blocks; 47dcc: 254c 002e movel %a4,%a2@(46) information->inactive_per_block = inactive_per_block; information->local_table = local_table; information->maximum = (Objects_Maximum) maximum; 47dd0: 354b 000e movew %a3,%a2@(14) _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 47dd4: 254d 002a movel %a5,%a2@(42) information->local_table = local_table; 47dd8: 2547 0018 movel %d7,%a2@(24) 47ddc: 2540 000a movel %d0,%a2@(10) information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 47de0: 46c4 movew %d4,%sr _Workspace_Free( old_tables ); 47de2: 2f08 movel %a0,%sp@- 47de4: 4eb9 0004 9f3e jsr 49f3e <_Workspace_Free> 47dea: 588f addql #4,%sp } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47dec: 206a 002e moveal %a2@(46),%a0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47df0: 4280 clrl %d0 47df2: 280e movel %fp,%d4 47df4: 0684 ffff fff4 addil #-12,%d4 47dfa: 47f9 0004 723c lea 4723c <_Chain_Get>,%a3 information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 47e00: 2a0a movel %a2,%d5 47e02: 0685 0000 001c addil #28,%d5 47e08: 49f9 0004 71dc lea 471dc <_Chain_Append>,%a4 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47e0e: e58a lsll #2,%d2 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47e10: 302a 0012 movew %a2@(18),%d0 } /* * Assign the new object block to the object block table. */ information->object_blocks[ block ] = new_object_block; 47e14: 2186 2800 movel %d6,%a0@(00000000,%d2:l) /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 47e18: 2f2a 0014 movel %a2@(20),%sp@- 47e1c: 2f00 movel %d0,%sp@- 47e1e: 2f06 movel %d6,%sp@- 47e20: 2f04 movel %d4,%sp@- 47e22: 4eb9 0004 c7a8 jsr 4c7a8 <_Chain_Initialize> /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47e28: 4fef 0010 lea %sp@(16),%sp 47e2c: 2f04 movel %d4,%sp@- 47e2e: 4e93 jsr %a3@ 47e30: 588f addql #4,%sp 47e32: 4a80 tstl %d0 47e34: 6734 beqs 47e6a <_Objects_Extend_information+0x1ce><== NEVER TAKEN 47e36: 2212 movel %a2@,%d1 47e38: 7e18 moveq #24,%d7 the_object->id = _Objects_Build_id( 47e3a: 4286 clrl %d6 47e3c: 2040 moveal %d0,%a0 47e3e: 3c2a 0004 movew %a2@(4),%d6 47e42: efa9 lsll %d7,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 47e44: 1e3c 001b moveb #27,%d7 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47e48: 08c1 0010 bset #16,%d1 (( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) | 47e4c: efae lsll %d7,%d6 47e4e: 8286 orl %d6,%d1 uint32_t the_class, uint32_t node, uint32_t index ) { return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) | 47e50: 8283 orl %d3,%d1 index ); _Chain_Append( &information->Inactive, &the_object->Node ); index++; 47e52: 5283 addql #1,%d3 47e54: 2141 0008 movel %d1,%a0@(8) information->the_class, _Objects_Local_node, index ); _Chain_Append( &information->Inactive, &the_object->Node ); 47e58: 2f00 movel %d0,%sp@- 47e5a: 2f05 movel %d5,%sp@- 47e5c: 4e94 jsr %a4@ index++; 47e5e: 508f addql #8,%sp /* * Move from the local chain, initialise, then append to the inactive chain */ index = index_base; while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) { 47e60: 2f04 movel %d4,%sp@- 47e62: 4e93 jsr %a3@ 47e64: 588f addql #4,%sp 47e66: 4a80 tstl %d0 47e68: 66cc bnes 47e36 <_Objects_Extend_information+0x19a> _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47e6a: 4281 clrl %d1 47e6c: 302a 0012 movew %a2@(18),%d0 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 47e70: 326a 0028 moveaw %a2@(40),%a1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47e74: 206a 002a moveal %a2@(42),%a0 47e78: 3200 movew %d0,%d1 information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); 47e7a: d089 addl %a1,%d0 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 47e7c: 2181 2800 movel %d1,%a0@(00000000,%d2:l) information->inactive = 47e80: 3540 0028 movew %d0,%a2@(40) (Objects_Maximum)(information->inactive + information->allocation_size); } 47e84: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47e8a: 4e5e unlk %fp 47e8c: 4e75 rts /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 47e8e: 7e01 moveq #1,%d7 47e90: 6000 fe64 braw 47cf6 <_Objects_Extend_information+0x5a> if ( information->auto_extend ) { new_object_block = _Workspace_Allocate( block_size ); if ( !new_object_block ) return; } else { new_object_block = _Workspace_Allocate_or_fatal_error( block_size ); 47e94: 2f00 movel %d0,%sp@- 47e96: 4eb9 0004 9f58 jsr 49f58 <_Workspace_Allocate_or_fatal_error> 47e9c: 588f addql #4,%sp 47e9e: 2c00 movel %d0,%d6 47ea0: 6000 fe88 braw 47d2a <_Objects_Extend_information+0x8e> /* * 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, 47ea4: e58c lsll #2,%d4 47ea6: 2f04 movel %d4,%sp@- 47ea8: 2f2a 002e movel %a2@(46),%sp@- 47eac: 2f0c movel %a4,%sp@- 47eae: 4eb9 0004 f47c jsr 4f47c information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 47eb4: 2f04 movel %d4,%sp@- 47eb6: 2f2a 002a movel %a2@(42),%sp@- 47eba: 2f0d movel %a5,%sp@- 47ebc: 4eb9 0004 f47c jsr 4f47c information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, information->local_table, (information->maximum + minimum_index) * sizeof(Objects_Control *) ); 47ec2: 4280 clrl %d0 47ec4: 302a 000e movew %a2@(14),%d0 47ec8: da80 addl %d0,%d5 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, information->inactive_per_block, block_count * sizeof(uint32_t) ); memcpy( local_table, 47eca: e58d lsll #2,%d5 47ecc: 2f05 movel %d5,%sp@- 47ece: 2f2a 0018 movel %a2@(24),%sp@- 47ed2: 2f07 movel %d7,%sp@- 47ed4: 4eb9 0004 f47c jsr 4f47c 47eda: 4fef 0024 lea %sp@(36),%sp 47ede: 6000 fe9a braw 47d7a <_Objects_Extend_information+0xde> minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47ee2: 4280 clrl %d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id ); 47ee4: 2605 movel %d5,%d3 index_base = minimum_index; block = 0; 47ee6: 4282 clrl %d2 /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) block_count = 0; 47ee8: 4284 clrl %d4 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; /* if ( information->maximum < minimum_index ) */ if ( information->object_blocks == NULL ) 47eea: 322a 000e movew %a2@(14),%d1 47eee: 302a 0012 movew %a2@(18),%d0 /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 47ef2: 7e01 moveq #1,%d7 47ef4: 6000 fe00 braw 47cf6 <_Objects_Extend_information+0x5a> minimum_index = _Objects_Get_index( information->minimum_id ); 47ef8: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 47efa: 4282 clrl %d2 <== NOT EXECUTED if ( information->object_blocks == NULL ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 47efc: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED /* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; 47f02: 7e01 moveq #1,%d7 <== NOT EXECUTED 47f04: 6000 fdf0 braw 47cf6 <_Objects_Extend_information+0x5a><== NOT EXECUTED minimum_index = _Objects_Get_index( information->minimum_id ); 47f08: 2605 movel %d5,%d3 <== NOT EXECUTED index_base = minimum_index; block = 0; 47f0a: 4282 clrl %d2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) { 47f0c: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED do_extend = false; 47f12: 4207 clrb %d7 <== NOT EXECUTED 47f14: 6000 fde0 braw 47cf6 <_Objects_Extend_information+0x5a><== NOT EXECUTED (sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)); object_blocks = (void**) _Workspace_Allocate( block_size ); if ( !object_blocks ) { _Workspace_Free( new_object_block ); 47f18: 2f06 movel %d6,%sp@- 47f1a: 4eb9 0004 9f3e jsr 49f3e <_Workspace_Free> return; 47f20: 588f addql #4,%sp } information->inactive_per_block[ block ] = information->allocation_size; information->inactive = (Objects_Maximum)(information->inactive + information->allocation_size); } 47f22: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47f28: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047fdc <_Objects_Get_information>: Objects_Information *_Objects_Get_information( Objects_APIs the_api, uint16_t the_class ) { 47fdc: 4e56 0000 linkw %fp,#0 47fe0: 2f02 movel %d2,%sp@- 47fe2: 342e 000e movew %fp@(14),%d2 Objects_Information *info; int the_class_api_maximum; if ( !the_class ) 47fe6: 660a bnes 47ff2 <_Objects_Get_information+0x16> if ( the_class > (uint32_t) the_class_api_maximum ) return NULL; if ( !_Objects_Information_table[ the_api ] ) return NULL; 47fe8: 4280 clrl %d0 if ( info->maximum == 0 ) return NULL; #endif return info; } 47fea: 242e fffc movel %fp@(-4),%d2 47fee: 4e5e unlk %fp 47ff0: 4e75 rts /* * This call implicitly validates the_api so we do not call * _Objects_Is_api_valid above here. */ the_class_api_maximum = _Objects_API_maximum_class( the_api ); 47ff2: 2f2e 0008 movel %fp@(8),%sp@- 47ff6: 4eb9 0004 ccd8 jsr 4ccd8 <_Objects_API_maximum_class> if ( the_class_api_maximum == 0 ) 47ffc: 588f addql #4,%sp 47ffe: 4a80 tstl %d0 48000: 67e6 beqs 47fe8 <_Objects_Get_information+0xc> return NULL; if ( the_class > (uint32_t) the_class_api_maximum ) 48002: 0282 0000 ffff andil #65535,%d2 48008: b480 cmpl %d0,%d2 4800a: 62dc bhis 47fe8 <_Objects_Get_information+0xc> return NULL; if ( !_Objects_Information_table[ the_api ] ) 4800c: 202e 0008 movel %fp@(8),%d0 48010: 41f9 0006 0c24 lea 60c24 <_Objects_Information_table>,%a0 48016: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4801a: 4a88 tstl %a0 4801c: 67ca beqs 47fe8 <_Objects_Get_information+0xc> <== NEVER TAKEN return NULL; info = _Objects_Information_table[ the_api ][ the_class ]; 4801e: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 if ( !info ) 48022: 67c6 beqs 47fea <_Objects_Get_information+0xe> <== NEVER TAKEN * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 48024: 2040 moveal %d0,%a0 48026: 4a68 000e tstw %a0@(14) 4802a: 56c1 sne %d1 #endif return info; } 4802c: 242e fffc movel %fp@(-4),%d2 * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 48030: 49c1 extbl %d1 #endif return info; } 48032: 4e5e unlk %fp * Thus we may have 0 local instances and still have a valid object * pointer. */ #if !defined(RTEMS_MULTIPROCESSING) if ( info->maximum == 0 ) return NULL; 48034: c081 andl %d1,%d0 <== NOT EXECUTED #endif return info; } =============================================================================== 00049ac8 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 49ac8: 4e56 ffdc linkw %fp,#-36 49acc: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 49ad0: 262e 000c movel %fp@(12),%d3 49ad4: 242e 0010 movel %fp@(16),%d2 char lname[5]; Objects_Control *the_object; Objects_Locations location; Objects_Id tmpId; if ( length == 0 ) 49ad8: 4a83 tstl %d3 49ada: 660e bnes 49aea <_Objects_Get_name_as_string+0x22> #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* not supported */ #endif case OBJECTS_ERROR: return NULL; 49adc: 4282 clrl %d2 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 49ade: 2002 movel %d2,%d0 49ae0: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49ae6: 4e5e unlk %fp 49ae8: 4e75 rts Objects_Id tmpId; if ( length == 0 ) return NULL; if ( name == NULL ) 49aea: 4a82 tstl %d2 49aec: 67f0 beqs 49ade <_Objects_Get_name_as_string+0x16> return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49aee: 4aae 0008 tstl %fp@(8) 49af2: 6600 009a bnew 49b8e <_Objects_Get_name_as_string+0xc6> 49af6: 2079 0006 3c4c moveal 63c4c <_Per_CPU_Information+0xc>,%a0 49afc: 2828 0008 movel %a0@(8),%d4 information = _Objects_Get_information_id( tmpId ); 49b00: 2f04 movel %d4,%sp@- 49b02: 4eb9 0004 99e0 jsr 499e0 <_Objects_Get_information_id> if ( !information ) 49b08: 588f addql #4,%sp if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; information = _Objects_Get_information_id( tmpId ); 49b0a: 2440 moveal %d0,%a2 if ( !information ) 49b0c: 4a80 tstl %d0 49b0e: 67cc beqs 49adc <_Objects_Get_name_as_string+0x14> return NULL; the_object = _Objects_Get( information, tmpId, &location ); 49b10: 486e fffc pea %fp@(-4) 49b14: 2f04 movel %d4,%sp@- 49b16: 2f00 movel %d0,%sp@- 49b18: 4eb9 0004 9bcc jsr 49bcc <_Objects_Get> switch ( location ) { 49b1e: 4fef 000c lea %sp@(12),%sp 49b22: 4aae fffc tstl %fp@(-4) 49b26: 66b4 bnes 49adc <_Objects_Get_name_as_string+0x14> return NULL; case OBJECTS_LOCAL: #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 49b28: 4a2a 0032 tstb %a2@(50) 49b2c: 6768 beqs 49b96 <_Objects_Get_name_as_string+0xce> s = the_object->name.name_p; 49b2e: 2040 moveal %d0,%a0 49b30: 2668 000c moveal %a0@(12),%a3 lname[ 4 ] = '\0'; s = lname; } d = name; if ( s ) { 49b34: 4a8b tstl %a3 49b36: 674a beqs 49b82 <_Objects_Get_name_as_string+0xba> for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49b38: 5383 subql #1,%d3 49b3a: 6746 beqs 49b82 <_Objects_Get_name_as_string+0xba><== NEVER TAKEN 49b3c: 1013 moveb %a3@,%d0 49b3e: 6742 beqs 49b82 <_Objects_Get_name_as_string+0xba> * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 49b40: 528b addql #1,%a3 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49b42: 2242 moveal %d2,%a1 * This method objects the name of an object and returns its name * in the form of a C string. It attempts to be careful about * overflowing the user's string and about returning unprintable characters. */ char *_Objects_Get_name_as_string( 49b44: 91c8 subal %a0,%a0 } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { *d = (isprint((unsigned char)*s)) ? *s : '*'; 49b46: 4281 clrl %d1 49b48: 1200 moveb %d0,%d1 49b4a: 2479 0006 1d28 moveal 61d28 <__ctype_ptr__>,%a2 49b50: 1232 1801 moveb %a2@(00000001,%d1:l),%d1 49b54: 49c1 extbl %d1 49b56: 0281 0000 0097 andil #151,%d1 49b5c: 6602 bnes 49b60 <_Objects_Get_name_as_string+0x98> 49b5e: 702a moveq #42,%d0 s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49b60: 5288 addql #1,%a0 *d = (isprint((unsigned char)*s)) ? *s : '*'; 49b62: 12c0 moveb %d0,%a1@+ s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49b64: 2449 moveal %a1,%a2 49b66: b688 cmpl %a0,%d3 49b68: 6304 blss 49b6e <_Objects_Get_name_as_string+0xa6> 49b6a: 101b moveb %a3@+,%d0 49b6c: 66d8 bnes 49b46 <_Objects_Get_name_as_string+0x7e> *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49b6e: 4212 clrb %a2@ _Thread_Enable_dispatch(); 49b70: 4eb9 0004 a83e jsr 4a83e <_Thread_Enable_dispatch> return name; } return NULL; /* unreachable path */ } 49b76: 2002 movel %d2,%d0 49b78: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49b7e: 4e5e unlk %fp 49b80: 4e75 rts s = lname; } d = name; if ( s ) { for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) { 49b82: 2442 moveal %d2,%a2 *d = (isprint((unsigned char)*s)) ? *s : '*'; } } *d = '\0'; 49b84: 4212 clrb %a2@ _Thread_Enable_dispatch(); 49b86: 4eb9 0004 a83e jsr 4a83e <_Thread_Enable_dispatch> 49b8c: 60e8 bras 49b76 <_Objects_Get_name_as_string+0xae> return NULL; if ( name == NULL ) return NULL; tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 49b8e: 282e 0008 movel %fp@(8),%d4 49b92: 6000 ff6c braw 49b00 <_Objects_Get_name_as_string+0x38> if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49b96: 2040 moveal %d0,%a0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49b98: 7218 moveq #24,%d1 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; 49b9a: 47ee fff7 lea %fp@(-9),%a3 if ( information->is_string ) { s = the_object->name.name_p; } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; 49b9e: 2028 000c movel %a0@(12),%d0 lname[ 0 ] = (u32_name >> 24) & 0xff; 49ba2: 2a00 movel %d0,%d5 49ba4: e2ad lsrl %d1,%d5 lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 49ba6: 2200 movel %d0,%d1 #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49ba8: 2800 movel %d0,%d4 lname[ 2 ] = (u32_name >> 8) & 0xff; 49baa: e089 lsrl #8,%d1 lname[ 3 ] = (u32_name >> 0) & 0xff; 49bac: 1d40 fffa moveb %d0,%fp@(-6) #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 49bb0: 4244 clrw %d4 49bb2: 4844 swap %d4 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49bb4: 4200 clrb %d0 } else #endif { uint32_t u32_name = (uint32_t) the_object->name.name_u32; lname[ 0 ] = (u32_name >> 24) & 0xff; 49bb6: 1d45 fff7 moveb %d5,%fp@(-9) lname[ 1 ] = (u32_name >> 16) & 0xff; 49bba: 1d44 fff8 moveb %d4,%fp@(-8) lname[ 2 ] = (u32_name >> 8) & 0xff; 49bbe: 1d41 fff9 moveb %d1,%fp@(-7) lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 49bc2: 1d40 fffb moveb %d0,%fp@(-5) 49bc6: 6000 ff70 braw 49b38 <_Objects_Get_name_as_string+0x70> ... =============================================================================== 0005bca0 <_Objects_Get_no_protection>: /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5bca0: 7001 moveq #1,%d0 if ( information->maximum >= index ) { 5bca2: 4281 clrl %d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5bca4: 4e56 0000 linkw %fp,#0 5bca8: 206e 0008 moveal %fp@(8),%a0 /* * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; 5bcac: 90a8 0006 subl %a0@(6),%d0 5bcb0: d0ae 000c addl %fp@(12),%d0 if ( information->maximum >= index ) { 5bcb4: 3228 000e movew %a0@(14),%d1 Objects_Control *_Objects_Get_no_protection( Objects_Information *information, Objects_Id id, Objects_Locations *location ) { 5bcb8: 226e 0010 moveal %fp@(16),%a1 * You can't just extract the index portion or you can get tricked * by a value between 1 and maximum. */ index = id - information->minimum_id + 1; if ( information->maximum >= index ) { 5bcbc: b280 cmpl %d0,%d1 5bcbe: 6510 bcss 5bcd0 <_Objects_Get_no_protection+0x30> if ( (the_object = information->local_table[ index ]) != NULL ) { 5bcc0: 2068 0018 moveal %a0@(24),%a0 5bcc4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0 5bcc8: 6706 beqs 5bcd0 <_Objects_Get_no_protection+0x30><== NEVER TAKEN *location = OBJECTS_LOCAL; 5bcca: 4291 clrl %a1@ * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; } 5bccc: 4e5e unlk %fp 5bcce: 4e75 rts /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5bcd0: 7001 moveq #1,%d0 return NULL; } 5bcd2: 4e5e unlk %fp /* * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; 5bcd4: 2280 movel %d0,%a1@ return NULL; 5bcd6: 4280 clrl %d0 } ... =============================================================================== 000497f4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 497f4: 4e56 fffc linkw %fp,#-4 497f8: 222e 0008 movel %fp@(8),%d1 497fc: 2f02 movel %d2,%sp@- /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 497fe: 4a81 tstl %d1 49800: 660a bnes 4980c <_Objects_Id_to_name+0x18> 49802: 2079 0006 2dba moveal 62dba <_Per_CPU_Information+0xc>,%a0 49808: 2228 0008 movel %a0@(8),%d1 4980c: 7418 moveq #24,%d2 4980e: 2001 movel %d1,%d0 49810: e4a8 lsrl %d2,%d0 49812: 143c 0007 moveb #7,%d2 49816: c082 andl %d2,%d0 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 49818: 143c 0002 moveb #2,%d2 4981c: 2040 moveal %d0,%a0 4981e: 5388 subql #1,%a0 49820: b488 cmpl %a0,%d2 49822: 6522 bcss 49846 <_Objects_Id_to_name+0x52> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 49824: 41f9 0006 290c lea 6290c <_Objects_Information_table>,%a0 4982a: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4982e: 4a88 tstl %a0 49830: 6714 beqs 49846 <_Objects_Id_to_name+0x52> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 49832: 2001 movel %d1,%d0 49834: 741b moveq #27,%d2 49836: e4a8 lsrl %d2,%d0 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 49838: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 if ( !information ) 4983c: 4a88 tstl %a0 4983e: 6706 beqs 49846 <_Objects_Id_to_name+0x52> <== NEVER TAKEN return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 49840: 4a28 0032 tstb %a0@(50) 49844: 670a beqs 49850 <_Objects_Id_to_name+0x5c> <== ALWAYS TAKEN return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 49846: 242e fff8 movel %fp@(-8),%d2 the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 4984a: 7003 moveq #3,%d0 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4984c: 4e5e unlk %fp 4984e: 4e75 rts #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 49850: 486e fffc pea %fp@(-4) 49854: 2f01 movel %d1,%sp@- 49856: 2f08 movel %a0,%sp@- 49858: 4eb9 0004 9788 jsr 49788 <_Objects_Get> if ( !the_object ) 4985e: 4fef 000c lea %sp@(12),%sp 49862: 4a80 tstl %d0 49864: 67e0 beqs 49846 <_Objects_Id_to_name+0x52> return OBJECTS_INVALID_ID; *name = the_object->name; 49866: 206e 000c moveal %fp@(12),%a0 4986a: 2240 moveal %d0,%a1 4986c: 20a9 000c movel %a1@(12),%a0@ _Thread_Enable_dispatch(); 49870: 4eb9 0004 a506 jsr 4a506 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 49876: 242e fff8 movel %fp@(-8),%d2 if ( !the_object ) return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 4987a: 4280 clrl %d0 } 4987c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048658 <_Objects_Set_name>: { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48658: 4280 clrl %d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4865a: 4e56 fff0 linkw %fp,#-16 4865e: 48d7 3c00 moveml %a2-%a5,%sp@ 48662: 286e 0008 moveal %fp@(8),%a4 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48666: 302c 0034 movew %a4@(52),%d0 bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 4866a: 246e 0010 moveal %fp@(16),%a2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4866e: 2f00 movel %d0,%sp@- bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 48670: 2a6e 000c moveal %fp@(12),%a5 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 48674: 2f0a movel %a2,%sp@- 48676: 4eb9 0005 0918 jsr 50918 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 4867c: 508f addql #8,%sp { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 4867e: 2640 moveal %d0,%a3 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 48680: 4a2c 0032 tstb %a4@(50) 48684: 6662 bnes 486e8 <_Objects_Set_name+0x90> d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 48686: 7018 moveq #24,%d0 48688: 1212 moveb %a2@,%d1 4868a: 49c1 extbl %d1 4868c: e1a9 lsll %d0,%d1 4868e: 103c 0001 moveb #1,%d0 48692: b08b cmpl %a3,%d0 48694: 643c bccs 486d2 <_Objects_Set_name+0x7a> 48696: 102a 0001 moveb %a2@(1),%d0 4869a: 49c0 extbl %d0 4869c: 4840 swap %d0 4869e: 4240 clrw %d0 486a0: 8081 orl %d1,%d0 486a2: 7202 moveq #2,%d1 486a4: b28b cmpl %a3,%d1 486a6: 6730 beqs 486d8 <_Objects_Set_name+0x80> 486a8: 122a 0002 moveb %a2@(2),%d1 486ac: 49c1 extbl %d1 486ae: e189 lsll #8,%d1 486b0: 8081 orl %d1,%d0 486b2: 7203 moveq #3,%d1 486b4: b28b cmpl %a3,%d1 486b6: 6700 0082 beqw 4873a <_Objects_Set_name+0xe2> 486ba: 122a 0003 moveb %a2@(3),%d1 486be: 49c1 extbl %d1 486c0: 8081 orl %d1,%d0 486c2: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 486c6: 7001 moveq #1,%d0 } 486c8: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 486ce: 4e5e unlk %fp 486d0: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 486d2: 2001 movel %d1,%d0 486d4: 08c0 0015 bset #21,%d0 486d8: 7220 moveq #32,%d1 486da: 08c0 000d bset #13,%d0 486de: 8081 orl %d1,%d0 486e0: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 486e4: 7001 moveq #1,%d0 486e6: 60e0 bras 486c8 <_Objects_Set_name+0x70> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 486e8: 486b 0001 pea %a3@(1) 486ec: 4eb9 0004 a39a jsr 4a39a <_Workspace_Allocate> if ( !d ) 486f2: 588f addql #4,%sp #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); 486f4: 2840 moveal %d0,%a4 if ( !d ) 486f6: 4a80 tstl %d0 486f8: 6734 beqs 4872e <_Objects_Set_name+0xd6> return false; _Workspace_Free( (void *)the_object->name.name_p ); 486fa: 2f2d 000c movel %a5@(12),%sp@- 486fe: 4eb9 0004 a3b6 jsr 4a3b6 <_Workspace_Free> the_object->name.name_p = NULL; strncpy( d, name, length ); 48704: 2f0b movel %a3,%sp@- 48706: 2f0a movel %a2,%sp@- d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; 48708: 42ad 000c clrl %a5@(12) strncpy( d, name, length ); 4870c: 2f0c movel %a4,%sp@- 4870e: 4eb9 0005 0894 jsr 50894 d[length] = '\0'; the_object->name.name_p = d; 48714: 4fef 0010 lea %sp@(16),%sp _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; strncpy( d, name, length ); d[length] = '\0'; 48718: 4200 clrb %d0 4871a: 1980 b800 moveb %d0,%a4@(00000000,%a3:l) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 4871e: 7001 moveq #1,%d0 _Workspace_Free( (void *)the_object->name.name_p ); the_object->name.name_p = NULL; strncpy( d, name, length ); d[length] = '\0'; the_object->name.name_p = d; 48720: 2b4c 000c movel %a4,%a5@(12) ); } return true; } 48724: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 4872a: 4e5e unlk %fp 4872c: 4e75 rts 4872e: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 48734: 4200 clrb %d0 ); } return true; } 48736: 4e5e unlk %fp 48738: 4e75 rts d[length] = '\0'; the_object->name.name_p = d; } else #endif { the_object->name.name_u32 = _Objects_Build_name( 4873a: 7220 moveq #32,%d1 4873c: 8081 orl %d1,%d0 4873e: 2b40 000c movel %d0,%a5@(12) ((3 < length) ? s[ 3 ] : ' ') ); } return true; 48742: 7001 moveq #1,%d0 48744: 6082 bras 486c8 <_Objects_Set_name+0x70> ... =============================================================================== 000482d0 <_Objects_Shrink_information>: /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / 482d0: 4281 clrl %d1 */ void _Objects_Shrink_information( Objects_Information *information ) { 482d2: 4e56 ffec linkw %fp,#-20 482d6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 482da: 246e 0008 moveal %fp@(8),%a2 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 482de: 4282 clrl %d2 block_count = (information->maximum - index_base) / 482e0: 4283 clrl %d3 /* * Search the list to find block or chunk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); 482e2: 342a 0008 movew %a2@(8),%d2 block_count = (information->maximum - index_base) / 482e6: 362a 000e movew %a2@(14),%d3 482ea: 322a 0012 movew %a2@(18),%d1 482ee: 9682 subl %d2,%d3 482f0: 4c41 3003 remul %d1,%d3,%d3 information->allocation_size; for ( block = 0; block < block_count; block++ ) { 482f4: 6774 beqs 4836a <_Objects_Shrink_information+0x9a><== NEVER TAKEN if ( information->inactive_per_block[ block ] == 482f6: 206a 002a moveal %a2@(42),%a0 482fa: b290 cmpl %a0@,%d1 482fc: 677e beqs 4837c <_Objects_Shrink_information+0xac><== NEVER TAKEN * the_block - the block to remove * * Output parameters: NONE */ void _Objects_Shrink_information( 482fe: 5888 addql #4,%a0 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 48300: 4280 clrl %d0 48302: 5280 addql #1,%d0 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 48304: d481 addl %d1,%d2 index_base = _Objects_Get_index( information->minimum_id ); block_count = (information->maximum - index_base) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 48306: b083 cmpl %d3,%d0 48308: 6460 bccs 4836a <_Objects_Shrink_information+0x9a> information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 4830a: 2800 movel %d0,%d4 4830c: e58c lsll #2,%d4 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 ] == 4830e: b298 cmpl %a0@+,%d1 48310: 66f0 bnes 48302 <_Objects_Shrink_information+0x32> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); 48312: 206a 001c moveal %a2@(28),%a0 */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48316: 47f9 0004 7214 lea 47214 <_Chain_Extract>,%a3 * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); do { index = _Objects_Get_index( the_object->id ); 4831c: 4280 clrl %d0 4831e: 3028 000a movew %a0@(10),%d0 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 48322: 2610 movel %a0@,%d3 if ((index >= index_base) && 48324: b480 cmpl %d0,%d2 48326: 620c bhis 48334 <_Objects_Shrink_information+0x64> (index < (index_base + information->allocation_size))) { 48328: 4281 clrl %d1 4832a: 322a 0012 movew %a2@(18),%d1 4832e: d282 addl %d2,%d1 /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && 48330: b280 cmpl %d0,%d1 48332: 6240 bhis 48374 <_Objects_Shrink_information+0xa4> (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); } } while ( the_object ); 48334: 4a83 tstl %d3 48336: 6704 beqs 4833c <_Objects_Shrink_information+0x6c> index = _Objects_Get_index( the_object->id ); /* * Get the next node before the node is extracted */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; 48338: 2043 moveal %d3,%a0 4833a: 60e0 bras 4831c <_Objects_Shrink_information+0x4c> while ( the_object ); /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); 4833c: 206a 002e moveal %a2@(46),%a0 48340: 2f30 4800 movel %a0@(00000000,%d4:l),%sp@- 48344: 4eb9 0004 9f3e jsr 49f3e <_Workspace_Free> information->object_blocks[ block ] = NULL; 4834a: 206a 002e moveal %a2@(46),%a0 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 4834e: 588f addql #4,%sp /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; 48350: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive_per_block[ block ] = 0; 48354: 206a 002a moveal %a2@(42),%a0 information->inactive -= information->allocation_size; 48358: 302a 0028 movew %a2@(40),%d0 4835c: 322a 0012 movew %a2@(18),%d1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 48360: 42b0 4800 clrl %a0@(00000000,%d4:l) information->inactive -= information->allocation_size; 48364: 9081 subl %d1,%d0 48366: 3540 0028 movew %d0,%a2@(40) return; } index_base += information->allocation_size; } } 4836a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48370: 4e5e unlk %fp 48372: 4e75 rts */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48374: 2f08 movel %a0,%sp@- 48376: 4e93 jsr %a3@ 48378: 588f addql #4,%sp 4837a: 60b8 bras 48334 <_Objects_Shrink_information+0x64> information->allocation_size ) { /* * Assume the Inactive chain is never empty at this point */ the_object = (Objects_Control *) _Chain_First( &information->Inactive ); 4837c: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 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 ] == 48380: 4284 clrl %d4 <== NOT EXECUTED */ extract_me = the_object; the_object = (Objects_Control *) the_object->Node.next; if ((index >= index_base) && (index < (index_base + information->allocation_size))) { _Chain_Extract( &extract_me->Node ); 48382: 47f9 0004 7214 lea 47214 <_Chain_Extract>,%a3 <== NOT EXECUTED 48388: 6092 bras 4831c <_Objects_Shrink_information+0x4c><== NOT EXECUTED ... =============================================================================== 00047614 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 47614: 4e56 ffe8 linkw %fp,#-24 47618: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 4761c: 240e movel %fp,%d2 4761e: 5982 subql #4,%d2 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 47620: 246e 000c moveal %fp@(12),%a2 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 47624: 2f02 movel %d2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 47626: 266e 0008 moveal %fp@(8),%a3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 4762a: 2f0a movel %a2,%sp@- pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 4762c: 162e 0017 moveb %fp@(23),%d3 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 47630: 4eb9 0004 7794 jsr 47794 <_POSIX_Mutex_Get> 47636: 508f addql #8,%sp 47638: 4a80 tstl %d0 4763a: 6764 beqs 476a0 <_POSIX_Condition_variables_Wait_support+0x8c> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4763c: 2039 0006 36c8 movel 636c8 <_Thread_Dispatch_disable_level>,%d0 47642: 5380 subql #1,%d0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 47644: 2f02 movel %d2,%sp@- 47646: 23c0 0006 36c8 movel %d0,636c8 <_Thread_Dispatch_disable_level> 4764c: 2f0b movel %a3,%sp@- 4764e: 4eb9 0004 73fc jsr 473fc <_POSIX_Condition_variables_Get> switch ( location ) { 47654: 508f addql #8,%sp return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 47656: 2840 moveal %d0,%a4 switch ( location ) { 47658: 4aae fffc tstl %fp@(-4) 4765c: 6642 bnes 476a0 <_POSIX_Condition_variables_Wait_support+0x8c> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 4765e: 202c 0014 movel %a4@(20),%d0 47662: 6718 beqs 4767c <_POSIX_Condition_variables_Wait_support+0x68> 47664: b092 cmpl %a2@,%d0 47666: 6714 beqs 4767c <_POSIX_Condition_variables_Wait_support+0x68> _Thread_Enable_dispatch(); 47668: 4eb9 0004 af4e jsr 4af4e <_Thread_Enable_dispatch> return EINVAL; 4766e: 7416 moveq #22,%d2 case OBJECTS_ERROR: break; } return EINVAL; } 47670: 2002 movel %d2,%d0 47672: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47678: 4e5e unlk %fp 4767a: 4e75 rts if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 4767c: 2f0a movel %a2,%sp@- 4767e: 4eb9 0004 7a64 jsr 47a64 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 47684: 588f addql #4,%sp 47686: 4a03 tstb %d3 47688: 6724 beqs 476ae <_POSIX_Condition_variables_Wait_support+0x9a> status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) status = 0; } else { _Thread_Enable_dispatch(); 4768a: 4eb9 0004 af4e jsr 4af4e <_Thread_Enable_dispatch> status = ETIMEDOUT; 47690: 7474 moveq #116,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 47692: 2f0a movel %a2,%sp@- 47694: 4eb9 0004 79c8 jsr 479c8 if ( mutex_status ) 4769a: 588f addql #4,%sp 4769c: 4a80 tstl %d0 4769e: 67d0 beqs 47670 <_POSIX_Condition_variables_Wait_support+0x5c><== ALWAYS TAKEN #endif case OBJECTS_ERROR: break; } return EINVAL; 476a0: 7416 moveq #22,%d2 } 476a2: 2002 movel %d2,%d0 476a4: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 476aa: 4e5e unlk %fp 476ac: 4e75 rts return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 476ae: 2952 0014 movel %a2@,%a4@(20) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 476b2: 7201 moveq #1,%d1 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 476b4: 200c movel %a4,%d0 476b6: 0680 0000 0018 addil #24,%d0 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 476bc: 2079 0006 3b32 moveal 63b32 <_Per_CPU_Information+0xc>,%a0 476c2: 2941 0048 movel %d1,%a4@(72) 476c6: 42a8 0034 clrl %a0@(52) _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 476ca: 2153 0020 movel %a3@,%a0@(32) 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; 476ce: 2140 0044 movel %d0,%a0@(68) _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 476d2: 4879 0004 b880 pea 4b880 <_Thread_queue_Timeout> 476d8: 2f2e 0010 movel %fp@(16),%sp@- 476dc: 2f00 movel %d0,%sp@- 476de: 4eb9 0004 b454 jsr 4b454 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 476e4: 4eb9 0004 af4e jsr 4af4e <_Thread_Enable_dispatch> * a POSIX signal, then pthread_cond_wait returns spuriously, * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; 476ea: 2079 0006 3b32 moveal 63b32 <_Per_CPU_Information+0xc>,%a0 if ( status == EINTR ) status = 0; 476f0: 7004 moveq #4,%d0 * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) 476f2: 4fef 000c lea %sp@(12),%sp * a POSIX signal, then pthread_cond_wait returns spuriously, * according to the POSIX standard. It means that pthread_cond_wait * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; 476f6: 2428 0034 movel %a0@(52),%d2 if ( status == EINTR ) status = 0; 476fa: b082 cmpl %d2,%d0 476fc: 56c0 sne %d0 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 476fe: 2f0a movel %a2,%sp@- * returns a success status, except for the fact that it was not * woken up a pthread_cond_signal or a pthread_cond_broadcast. */ status = _Thread_Executing->Wait.return_code; if ( status == EINTR ) status = 0; 47700: 49c0 extbl %d0 47702: c480 andl %d0,%d2 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 47704: 4eb9 0004 79c8 jsr 479c8 if ( mutex_status ) 4770a: 588f addql #4,%sp 4770c: 4a80 tstl %d0 4770e: 6700 ff60 beqw 47670 <_POSIX_Condition_variables_Wait_support+0x5c> 47712: 608c bras 476a0 <_POSIX_Condition_variables_Wait_support+0x8c> =============================================================================== 0004680c <_POSIX_Keys_Free_memory>: #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 4680c: 4e56 0000 linkw %fp,#0 46810: 2f0b movel %a3,%sp@- uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 46812: 47f9 0004 b06a lea 4b06a <_Workspace_Free>,%a3 #include void _POSIX_Keys_Free_memory( POSIX_Keys_Control *the_key ) { 46818: 2f0a movel %a2,%sp@- 4681a: 246e 0008 moveal %fp@(8),%a2 uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 4681e: 2f2a 0018 movel %a2@(24),%sp@- 46822: 4e93 jsr %a3@ 46824: 2f2a 001c movel %a2@(28),%sp@- 46828: 4e93 jsr %a3@ 4682a: 2d6a 0020 0008 movel %a2@(32),%fp@(8) 46830: 508f addql #8,%sp } 46832: 246e fff8 moveal %fp@(-8),%a2 46836: 266e fffc moveal %fp@(-4),%a3 4683a: 4e5e unlk %fp ) { uint32_t the_api; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) _Workspace_Free( the_key->Values[ the_api ] ); 4683c: 4ef9 0004 b06a jmp 4b06a <_Workspace_Free> ... =============================================================================== 0004e294 <_POSIX_Keys_Run_destructors>: 4e294: 7218 moveq #24,%d1 */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4e296: 4e56 ffec linkw %fp,#-20 4e29a: 206e 0008 moveal %fp@(8),%a0 4e29e: 48d7 007c moveml %d2-%d6,%sp@ Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id ); 4e2a2: 2628 0008 movel %a0@(8),%d3 4e2a6: 2003 movel %d3,%d0 4e2a8: e2a8 lsrl %d1,%d0 4e2aa: 123c 0007 moveb #7,%d1 4e2ae: c081 andl %d1,%d0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 4e2b0: 0283 0000 ffff andil #65535,%d3 4e2b6: 2c00 movel %d0,%d6 4e2b8: 5a86 addql #5,%d6 * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 4e2ba: 3039 0006 0fc6 movew 60fc6 <_POSIX_Keys_Information+0xe>,%d0 for ( index = 1 ; index <= max ; ++index ) { POSIX_Keys_Control *key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; 4e2c0: e58b lsll #2,%d3 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e2c2: 4a40 tstw %d0 4e2c4: 660a bnes 4e2d0 <_POSIX_Keys_Run_destructors+0x3c> done = false; } } } } } 4e2c6: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4e2cc: 4e5e unlk %fp 4e2ce: 4e75 rts 4e2d0: 4285 clrl %d5 4e2d2: 7201 moveq #1,%d1 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e2d4: 7401 moveq #1,%d2 4e2d6: 7801 moveq #1,%d4 4e2d8: 3a00 movew %d0,%d5 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 4e2da: 2079 0006 0fd0 moveal 60fd0 <_POSIX_Keys_Information+0x18>,%a0 Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e2e0: 5282 addql #1,%d2 POSIX_Keys_Control *key = (POSIX_Keys_Control *) 4e2e2: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0 _POSIX_Keys_Information.local_table [ index ]; if ( key != NULL && key->destructor != NULL ) { 4e2e6: 4a88 tstl %a0 4e2e8: 671c beqs 4e306 <_POSIX_Keys_Run_destructors+0x72> 4e2ea: 2268 0010 moveal %a0@(16),%a1 4e2ee: 4a89 tstl %a1 4e2f0: 6714 beqs 4e306 <_POSIX_Keys_Run_destructors+0x72> void *value = key->Values [ thread_api ][ thread_index ]; 4e2f2: 2070 6c00 moveal %a0@(00000000,%d6:l:4),%a0 4e2f6: d1c3 addal %d3,%a0 4e2f8: 2210 movel %a0@,%d1 if ( value != NULL ) { 4e2fa: 670a beqs 4e306 <_POSIX_Keys_Run_destructors+0x72> key->Values [ thread_api ][ thread_index ] = NULL; 4e2fc: 4290 clrl %a0@ (*key->destructor)( value ); done = false; 4e2fe: 4204 clrb %d4 if ( key != NULL && key->destructor != NULL ) { void *value = key->Values [ thread_api ][ thread_index ]; if ( value != NULL ) { key->Values [ thread_api ][ thread_index ] = NULL; (*key->destructor)( value ); 4e300: 2f01 movel %d1,%sp@- 4e302: 4e91 jsr %a1@ 4e304: 588f addql #4,%sp Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; done = true; for ( index = 1 ; index <= max ; ++index ) { 4e306: 4281 clrl %d1 4e308: 3202 movew %d2,%d1 4e30a: b285 cmpl %d5,%d1 4e30c: 63cc blss 4e2da <_POSIX_Keys_Run_destructors+0x46> * number of iterations. An infinite loop may happen if destructors set * thread specific data. This can be considered dubious. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ while ( !done ) { 4e30e: 4a04 tstb %d4 4e310: 66b4 bnes 4e2c6 <_POSIX_Keys_Run_destructors+0x32> Objects_Maximum index = 0; Objects_Maximum max = _POSIX_Keys_Information.maximum; 4e312: 3039 0006 0fc6 movew 60fc6 <_POSIX_Keys_Information+0xe>,%d0 done = true; for ( index = 1 ; index <= max ; ++index ) { 4e318: 67ac beqs 4e2c6 <_POSIX_Keys_Run_destructors+0x32><== NEVER TAKEN 4e31a: 60b4 bras 4e2d0 <_POSIX_Keys_Run_destructors+0x3c> =============================================================================== 0004c4b0 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, bool wait, Watchdog_Interval timeout ) { 4c4b0: 4e56 ffe4 linkw %fp,#-28 4c4b4: 48d7 043c moveml %d2-%d5/%a2,%sp@ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4c4b8: 486e fffc pea %fp@(-4) 4c4bc: 242e 0008 movel %fp@(8),%d2 4c4c0: 2f02 movel %d2,%sp@- 4c4c2: 4879 0006 ae1c pea 6ae1c <_POSIX_Message_queue_Information_fds> 4c4c8: 162e 001b moveb %fp@(27),%d3 4c4cc: 4eb9 0004 f970 jsr 4f970 <_Objects_Get> Objects_Locations location; size_t length_out; bool do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4c4d2: 4fef 000c lea %sp@(12),%sp 4c4d6: 4aae fffc tstl %fp@(-4) 4c4da: 671a beqs 4c4f6 <_POSIX_Message_queue_Receive_support+0x46> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c4dc: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c4e2: 72ff moveq #-1,%d1 4c4e4: 2040 moveal %d0,%a0 4c4e6: 7009 moveq #9,%d0 } 4c4e8: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c4ee: 2080 movel %d0,%a0@ } 4c4f0: 2001 movel %d1,%d0 4c4f2: 4e5e unlk %fp 4c4f4: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4c4f6: 2040 moveal %d0,%a0 4c4f8: 7803 moveq #3,%d4 4c4fa: 7a01 moveq #1,%d5 4c4fc: 2228 0014 movel %a0@(20),%d1 4c500: c881 andl %d1,%d4 4c502: ba84 cmpl %d4,%d5 4c504: 6700 00f0 beqw 4c5f6 <_POSIX_Message_queue_Receive_support+0x146> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4c508: 2240 moveal %d0,%a1 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4c50a: 202e 0010 movel %fp@(16),%d0 if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4c50e: 2069 0010 moveal %a1@(16),%a0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4c512: b0a8 0066 cmpl %a0@(102),%d0 4c516: 6500 0094 bcsw 4c5ac <_POSIX_Message_queue_Receive_support+0xfc> /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4c51a: 70ff moveq #-1,%d0 4c51c: 2d40 fff8 movel %d0,%fp@(-8) /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c520: 4a03 tstb %d3 4c522: 6756 beqs 4c57a <_POSIX_Message_queue_Receive_support+0xca><== NEVER TAKEN do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c524: 2f2e 001c movel %fp@(28),%sp@- length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c528: 0801 000e btst #14,%d1 4c52c: 57c0 seq %d0 4c52e: 49c0 extbl %d0 4c530: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c532: 2f00 movel %d0,%sp@- 4c534: 486e fff8 pea %fp@(-8) 4c538: 2f2e 000c movel %fp@(12),%sp@- 4c53c: 2f02 movel %d2,%sp@- 4c53e: 4868 001a pea %a0@(26) 4c542: 4eb9 0004 e8b0 jsr 4e8b0 <_CORE_message_queue_Seize> &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4c548: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4c54e: 2079 0006 ae8e moveal 6ae8e <_Per_CPU_Information+0xc>,%a0 RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core( CORE_message_queue_Submit_types priority ) { /* absolute value without a library dependency */ return ((priority >= 0) ? priority : -priority); 4c554: 2028 0024 movel %a0@(36),%d0 4c558: 6d4e blts 4c5a8 <_POSIX_Message_queue_Receive_support+0xf8> do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4c55a: 226e 0014 moveal %fp@(20),%a1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4c55e: 4fef 0018 lea %sp@(24),%sp do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4c562: 2280 movel %d0,%a1@ _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4c564: 4aa8 0034 tstl %a0@(52) 4c568: 6662 bnes 4c5cc <_POSIX_Message_queue_Receive_support+0x11c> return length_out; 4c56a: 222e fff8 movel %fp@(-8),%d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c56e: 2001 movel %d1,%d0 4c570: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c576: 4e5e unlk %fp 4c578: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c57a: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c57e: 4280 clrl %d0 <== NOT EXECUTED do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4c580: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c582: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4c586: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c58a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c58c: 4868 001a pea %a0@(26) <== NOT EXECUTED 4c590: 4eb9 0004 e8b0 jsr 4e8b0 <_CORE_message_queue_Seize> <== NOT EXECUTED &length_out, do_wait, timeout ); _Thread_Enable_dispatch(); 4c596: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> <== NOT EXECUTED *msg_prio = _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); 4c59c: 2079 0006 ae8e moveal 6ae8e <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 4c5a2: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 4c5a6: 6cb2 bges 4c55a <_POSIX_Message_queue_Receive_support+0xaa><== NOT EXECUTED 4c5a8: 4480 negl %d0 4c5aa: 60ae bras 4c55a <_POSIX_Message_queue_Receive_support+0xaa> } the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); 4c5ac: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4c5b2: 747a moveq #122,%d2 4c5b4: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c5ba: 72ff moveq #-1,%d1 4c5bc: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c5be: 2001 movel %d1,%d0 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 ); 4c5c0: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c5c2: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c5c8: 4e5e unlk %fp 4c5ca: 4e75 rts _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( 4c5cc: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c5d2: 2079 0006 ae8e moveal 6ae8e <_Per_CPU_Information+0xc>,%a0 4c5d8: 2440 moveal %d0,%a2 4c5da: 2f28 0034 movel %a0@(52),%sp@- 4c5de: 4eb9 0004 c8ac jsr 4c8ac <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c5e4: 588f addql #4,%sp 4c5e6: 72ff moveq #-1,%d1 4c5e8: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c5ea: 2001 movel %d1,%d0 4c5ec: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c5f2: 4e5e unlk %fp 4c5f4: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); 4c5f6: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4c5fc: 7609 moveq #9,%d3 4c5fe: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c604: 72ff moveq #-1,%d1 4c606: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c608: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4c60a: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c60c: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c612: 4e5e unlk %fp ... =============================================================================== 0004c63c <_POSIX_Message_queue_Send_support>: /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4c63c: 7020 moveq #32,%d0 size_t msg_len, uint32_t msg_prio, bool wait, Watchdog_Interval timeout ) { 4c63e: 4e56 ffe8 linkw %fp,#-24 4c642: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c646: 262e 0008 movel %fp@(8),%d3 4c64a: 242e 0014 movel %fp@(20),%d2 4c64e: 182e 001b moveb %fp@(27),%d4 /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4c652: b082 cmpl %d2,%d0 4c654: 6500 00e2 bcsw 4c738 <_POSIX_Message_queue_Send_support+0xfc> RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( mqd_t id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) _Objects_Get( 4c658: 486e fffc pea %fp@(-4) 4c65c: 2f03 movel %d3,%sp@- 4c65e: 4879 0006 ae1c pea 6ae1c <_POSIX_Message_queue_Information_fds> 4c664: 4eb9 0004 f970 jsr 4f970 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4c66a: 4fef 000c lea %sp@(12),%sp 4c66e: 4aae fffc tstl %fp@(-4) 4c672: 6600 00aa bnew 4c71e <_POSIX_Message_queue_Send_support+0xe2> case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4c676: 2240 moveal %d0,%a1 4c678: 7a03 moveq #3,%d5 4c67a: 2229 0014 movel %a1@(20),%d1 4c67e: ca81 andl %d1,%d5 4c680: 6700 00d0 beqw 4c752 <_POSIX_Message_queue_Send_support+0x116> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4c684: 2240 moveal %d0,%a1 4c686: 2069 0010 moveal %a1@(16),%a0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c68a: 4a04 tstb %d4 4c68c: 6750 beqs 4c6de <_POSIX_Message_queue_Send_support+0xa2> do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c68e: 2f2e 001c movel %fp@(28),%sp@- 4c692: 4482 negl %d2 the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c694: 0801 000e btst #14,%d1 4c698: 57c0 seq %d0 4c69a: 49c0 extbl %d0 4c69c: 4480 negl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c69e: 2f00 movel %d0,%sp@- 4c6a0: 2f02 movel %d2,%sp@- 4c6a2: 42a7 clrl %sp@- 4c6a4: 2f03 movel %d3,%sp@- 4c6a6: 2f2e 0010 movel %fp@(16),%sp@- 4c6aa: 2f2e 000c movel %fp@(12),%sp@- 4c6ae: 4868 001a pea %a0@(26) 4c6b2: 4eb9 0004 e9e8 jsr 4e9e8 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c6b8: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c6bc: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c6be: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4c6c4: 7007 moveq #7,%d0 4c6c6: b082 cmpl %d2,%d0 4c6c8: 6748 beqs 4c712 <_POSIX_Message_queue_Send_support+0xd6> msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4c6ca: 4a82 tstl %d2 4c6cc: 6600 00a4 bnew 4c772 <_POSIX_Message_queue_Send_support+0x136> return msg_status; 4c6d0: 4281 clrl %d1 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c6d2: 2001 movel %d1,%d0 4c6d4: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c6da: 4e5e unlk %fp 4c6dc: 4e75 rts do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c6de: 2f2e 001c movel %fp@(28),%sp@- the_mq = the_mq_fd->Queue; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4c6e2: 4280 clrl %d0 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c6e4: 4482 negl %d2 4c6e6: 2f00 movel %d0,%sp@- 4c6e8: 2f02 movel %d2,%sp@- 4c6ea: 42a7 clrl %sp@- 4c6ec: 2f03 movel %d3,%sp@- 4c6ee: 2f2e 0010 movel %fp@(16),%sp@- 4c6f2: 2f2e 000c movel %fp@(12),%sp@- 4c6f6: 4868 001a pea %a0@(26) 4c6fa: 4eb9 0004 e9e8 jsr 4e9e8 <_CORE_message_queue_Submit> _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c700: 4fef 0020 lea %sp@(32),%sp do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4c704: 2400 movel %d0,%d2 _POSIX_Message_queue_Priority_to_core( msg_prio ), do_wait, timeout /* no timeout */ ); _Thread_Enable_dispatch(); 4c706: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4c70c: 7007 moveq #7,%d0 4c70e: b082 cmpl %d2,%d0 4c710: 66b8 bnes 4c6ca <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN msg_status = _Thread_Executing->Wait.return_code; 4c712: 2079 0006 ae8e moveal 6ae8e <_Per_CPU_Information+0xc>,%a0 4c718: 2428 0034 movel %a0@(52),%d2 4c71c: 60ac bras 4c6ca <_POSIX_Message_queue_Send_support+0x8e> #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c71e: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c724: 72ff moveq #-1,%d1 4c726: 2040 moveal %d0,%a0 4c728: 7009 moveq #9,%d0 } 4c72a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c730: 2080 movel %d0,%a0@ } 4c732: 2001 movel %d1,%d0 4c734: 4e5e unlk %fp 4c736: 4e75 rts * 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 ); 4c738: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c73e: 7616 moveq #22,%d3 4c740: 72ff moveq #-1,%d1 4c742: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c744: 2001 movel %d1,%d0 * 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 ); 4c746: 2083 movel %d3,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c748: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c74e: 4e5e unlk %fp 4c750: 4e75 rts the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); 4c752: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EBADF ); 4c758: 7409 moveq #9,%d2 4c75a: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c760: 72ff moveq #-1,%d1 4c762: 2040 moveal %d0,%a0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c764: 2001 movel %d1,%d0 switch ( location ) { case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4c766: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c768: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c76e: 4e5e unlk %fp 4c770: 4e75 rts msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) return msg_status; rtems_set_errno_and_return_minus_one( 4c772: 4eb9 0005 6cb8 jsr 56cb8 <__errno> 4c778: 2440 moveal %d0,%a2 4c77a: 2f02 movel %d2,%sp@- 4c77c: 4eb9 0004 c8ac jsr 4c8ac <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c782: 588f addql #4,%sp 4c784: 72ff moveq #-1,%d1 4c786: 2480 movel %d0,%a2@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c788: 2001 movel %d1,%d0 4c78a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c790: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bd24 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>: #include void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch( Thread_Control *the_thread ) { 4bd24: 4e56 0000 linkw %fp,#0 4bd28: 226e 0008 moveal %fp@(8),%a1 POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4bd2c: 2069 0102 moveal %a1@(258),%a0 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4bd30: 4aa8 00d8 tstl %a0@(216) 4bd34: 6608 bnes 4bd3e <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN 4bd36: 7001 moveq #1,%d0 4bd38: b0a8 00dc cmpl %a0@(220),%d0 4bd3c: 6708 beqs 4bd46 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22> _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); } 4bd3e: 4e5e unlk %fp thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); } else _Thread_Enable_dispatch(); 4bd40: 4ef9 0004 90e6 jmp 490e6 <_Thread_Enable_dispatch> POSIX_API_Control *thread_support; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && 4bd46: 4aa8 00e0 tstl %a0@(224) 4bd4a: 67f2 beqs 4bd3e <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a> thread_support->cancelation_requested ) { _Thread_Unnest_dispatch(); _POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED ); 4bd4c: 4878 ffff pea ffffffff */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4bd50: 2039 0006 145c movel 6145c <_Thread_Dispatch_disable_level>,%d0 4bd56: 5380 subql #1,%d0 4bd58: 2f09 movel %a1,%sp@- 4bd5a: 23c0 0006 145c movel %d0,6145c <_Thread_Dispatch_disable_level> 4bd60: 4eb9 0004 c674 jsr 4c674 <_POSIX_Thread_Exit> 4bd66: 508f addql #8,%sp } else _Thread_Enable_dispatch(); } 4bd68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004d4b8 <_POSIX_Thread_Translate_sched_param>: int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4d4b8: 4e56 ffe8 linkw %fp,#-24 4d4bc: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4d4c0: 246e 000c moveal %fp@(12),%a2 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4d4c4: 47f9 0004 d494 lea 4d494 <_POSIX_Priority_Is_valid>,%a3 4d4ca: 2f12 movel %a2@,%sp@- int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout ) { 4d4cc: 242e 0008 movel %fp@(8),%d2 4d4d0: 286e 0010 moveal %fp@(16),%a4 4d4d4: 2a6e 0014 moveal %fp@(20),%a5 if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 4d4d8: 4e93 jsr %a3@ 4d4da: 588f addql #4,%sp 4d4dc: 4a00 tstb %d0 4d4de: 6720 beqs 4d500 <_POSIX_Thread_Translate_sched_param+0x48><== NEVER TAKEN return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4d4e0: 4294 clrl %a4@ *budget_callout = NULL; 4d4e2: 4295 clrl %a5@ if ( policy == SCHED_OTHER ) { 4d4e4: 4a82 tstl %d2 4d4e6: 6724 beqs 4d50c <_POSIX_Thread_Translate_sched_param+0x54> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; return 0; } if ( policy == SCHED_FIFO ) { 4d4e8: 7001 moveq #1,%d0 4d4ea: b082 cmpl %d2,%d0 4d4ec: 6700 0086 beqw 4d574 <_POSIX_Thread_Translate_sched_param+0xbc> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { 4d4f0: 103c 0002 moveb #2,%d0 4d4f4: b082 cmpl %d2,%d0 4d4f6: 6700 0088 beqw 4d580 <_POSIX_Thread_Translate_sched_param+0xc8> *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { 4d4fa: 7004 moveq #4,%d0 4d4fc: b082 cmpl %d2,%d0 4d4fe: 671c beqs 4d51c <_POSIX_Thread_Translate_sched_param+0x64> if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; 4d500: 7016 moveq #22,%d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d502: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d508: 4e5e unlk %fp 4d50a: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4d50c: 7201 moveq #1,%d1 return 0; 4d50e: 4280 clrl %d0 *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; *budget_callout = NULL; if ( policy == SCHED_OTHER ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4d510: 2881 movel %d1,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d512: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d518: 4e5e unlk %fp 4d51a: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; return 0; } if ( policy == SCHED_SPORADIC ) { if ( (param->sched_ss_repl_period.tv_sec == 0) && 4d51c: 4aaa 0008 tstl %a2@(8) 4d520: 6606 bnes 4d528 <_POSIX_Thread_Translate_sched_param+0x70> 4d522: 4aaa 000c tstl %a2@(12) 4d526: 67d8 beqs 4d500 <_POSIX_Thread_Translate_sched_param+0x48> (param->sched_ss_repl_period.tv_nsec == 0) ) return EINVAL; if ( (param->sched_ss_init_budget.tv_sec == 0) && 4d528: 4aaa 0010 tstl %a2@(16) 4d52c: 6606 bnes 4d534 <_POSIX_Thread_Translate_sched_param+0x7c> 4d52e: 4aaa 0014 tstl %a2@(20) 4d532: 67cc beqs 4d500 <_POSIX_Thread_Translate_sched_param+0x48> (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4d534: 486a 0008 pea %a2@(8) 4d538: 243c 0004 ad78 movel #306552,%d2 4d53e: 2042 moveal %d2,%a0 4d540: 4e90 jsr %a0@ _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4d542: 486a 0010 pea %a2@(16) if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4d546: 2600 movel %d0,%d3 _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) 4d548: 2042 moveal %d2,%a0 4d54a: 4e90 jsr %a0@ if ( (param->sched_ss_init_budget.tv_sec == 0) && (param->sched_ss_init_budget.tv_nsec == 0) ) return EINVAL; if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) < 4d54c: 508f addql #8,%sp 4d54e: b083 cmpl %d3,%d0 4d550: 62ae bhis 4d500 <_POSIX_Thread_Translate_sched_param+0x48> _Timespec_To_ticks( ¶m->sched_ss_init_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) 4d552: 2f2a 0004 movel %a2@(4),%sp@- 4d556: 4e93 jsr %a3@ 4d558: 588f addql #4,%sp 4d55a: 4a00 tstb %d0 4d55c: 67a2 beqs 4d500 <_POSIX_Thread_Translate_sched_param+0x48> return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; 4d55e: 7003 moveq #3,%d0 4d560: 2880 movel %d0,%a4@ *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; 4d562: 4280 clrl %d0 if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) ) return EINVAL; *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; *budget_callout = _POSIX_Threads_Sporadic_budget_callout; 4d564: 2abc 0004 7164 movel #291172,%a5@ return 0; } return EINVAL; } 4d56a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d570: 4e5e unlk %fp 4d572: 4e75 rts return 0; } if ( policy == SCHED_FIFO ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; 4d574: 4280 clrl %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d576: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d57c: 4e5e unlk %fp 4d57e: 4e75 rts *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; return 0; } if ( policy == SCHED_RR ) { *budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE; 4d580: 2880 movel %d0,%a4@ return 0; 4d582: 4200 clrb %d0 *budget_callout = _POSIX_Threads_Sporadic_budget_callout; return 0; } return EINVAL; } 4d584: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d58a: 4e5e unlk %fp ... =============================================================================== 00046df4 <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body(void) { 46df4: 4e56 ff98 linkw %fp,#-104 46df8: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = Configuration_POSIX_API.User_initialization_threads_table; 46dfc: 2479 0006 07fe moveal 607fe ,%a2 maximum = Configuration_POSIX_API.number_of_initialization_threads; 46e02: 2839 0006 07fa movel 607fa ,%d4 if ( !user_threads || maximum == 0 ) 46e08: 4a8a tstl %a2 46e0a: 675a beqs 46e66 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46e0c: 4a84 tstl %d4 46e0e: 6756 beqs 46e66 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN 46e10: 240e movel %fp,%d2 46e12: 2a0e movel %fp,%d5 46e14: 4283 clrl %d3 46e16: 0682 ffff ffbc addil #-68,%d2 46e1c: 2c3c 0004 d590 movel #316816,%d6 46e22: 4bf9 0004 d5bc lea 4d5bc ,%a5 46e28: 49f9 0004 d5fc lea 4d5fc ,%a4 46e2e: 5985 subql #4,%d5 46e30: 47f9 0004 6a40 lea 46a40 ,%a3 for ( index=0 ; index < maximum ; index++ ) { /* * There is no way for these calls to fail in this situation. */ (void) pthread_attr_init( &attr ); 46e36: 2f02 movel %d2,%sp@- 46e38: 2046 moveal %d6,%a0 46e3a: 4e90 jsr %a0@ (void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 46e3c: 4878 0002 pea 2 46e40: 2f02 movel %d2,%sp@- 46e42: 4e95 jsr %a5@ (void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size); 46e44: 2f2a 0004 movel %a2@(4),%sp@- 46e48: 2f02 movel %d2,%sp@- 46e4a: 4e94 jsr %a4@ status = pthread_create( 46e4c: 42a7 clrl %sp@- 46e4e: 2f12 movel %a2@,%sp@- 46e50: 2f02 movel %d2,%sp@- 46e52: 2f05 movel %d5,%sp@- 46e54: 4e93 jsr %a3@ &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) 46e56: 4fef 0024 lea %sp@(36),%sp 46e5a: 4a80 tstl %d0 46e5c: 6612 bnes 46e70 <_POSIX_Threads_Initialize_user_threads_body+0x7c> * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 46e5e: 5283 addql #1,%d3 46e60: 508a addql #8,%a2 46e62: b684 cmpl %d4,%d3 46e64: 65d0 bcss 46e36 <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); } } 46e66: 4cee 3c7c ff98 moveml %fp@(-104),%d2-%d6/%a2-%a5 46e6c: 4e5e unlk %fp 46e6e: 4e75 rts &attr, user_threads[ index ].thread_entry, NULL ); if ( status ) _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status ); 46e70: 2f00 movel %d0,%sp@- 46e72: 4878 0001 pea 1 46e76: 4878 0002 pea 2 46e7a: 4eb9 0004 8f44 jsr 48f44 <_Internal_error_Occurred> =============================================================================== 0004c154 <_POSIX_Threads_Sporadic_budget_TSR>: */ void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id __attribute__((unused)), void *argument ) { 4c154: 4e56 fff4 linkw %fp,#-12 4c158: 48d7 1c00 moveml %a2-%a4,%sp@ 4c15c: 266e 000c moveal %fp@(12),%a3 the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4c160: 49f9 0004 d010 lea 4d010 <_Timespec_To_ticks>,%a4 Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c166: 246b 0102 moveal %a3@(258),%a2 /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); 4c16a: 486a 0098 pea %a2@(152) 4c16e: 4e94 jsr %a4@ */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c170: 588f addql #4,%sp RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1); 4c172: 4281 clrl %d1 4c174: 1239 0005 f372 moveb 5f372 ,%d1 4c17a: 92aa 0088 subl %a2@(136),%d1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget ); the_thread->cpu_time_budget = ticks; 4c17e: 2740 0076 movel %d0,%a3@(118) new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); the_thread->real_priority = new_priority; 4c182: 2741 0018 movel %d1,%a3@(24) */ #if 0 printk( "TSR %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c186: 4aab 001c tstl %a3@(28) 4c18a: 6606 bnes 4c192 <_POSIX_Threads_Sporadic_budget_TSR+0x3e><== NEVER TAKEN /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { 4c18c: b2ab 0014 cmpl %a3@(20),%d1 4c190: 652c bcss 4c1be <_POSIX_Threads_Sporadic_budget_TSR+0x6a> #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4c192: 486a 0090 pea %a2@(144) 4c196: 4e94 jsr %a4@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c198: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4c19a: 2540 00b4 movel %d0,%a2@(180) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4c19e: 45ea 00a8 lea %a2@(168),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c1a2: 203c 0006 0d28 movel #396584,%d0 4c1a8: 2d4a 000c movel %a2,%fp@(12) } 4c1ac: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c1b2: 2d40 0008 movel %d0,%fp@(8) 4c1b6: 4e5e unlk %fp 4c1b8: 4ef9 0004 9c4c jmp 49c4c <_Watchdog_Insert> if ( the_thread->resource_count == 0 ) { /* * If this would make them less important, then do not change it. */ if ( the_thread->current_priority > new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4c1be: 4878 0001 pea 1 4c1c2: 2f01 movel %d1,%sp@- 4c1c4: 2f0b movel %a3,%sp@- 4c1c6: 4eb9 0004 88d8 jsr 488d8 <_Thread_Change_priority> 4c1cc: 4fef 000c lea %sp@(12),%sp #endif } } /* ticks is guaranteed to be at least one */ ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period ); 4c1d0: 486a 0090 pea %a2@(144) 4c1d4: 4e94 jsr %a4@ 4c1d6: 588f addql #4,%sp Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4c1d8: 2540 00b4 movel %d0,%a2@(180) _Watchdog_Insert_ticks( &api->Sporadic_timer, ticks ); 4c1dc: 45ea 00a8 lea %a2@(168),%a2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4c1e0: 203c 0006 0d28 movel #396584,%d0 4c1e6: 2d4a 000c movel %a2,%fp@(12) } 4c1ea: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4c1f0: 2d40 0008 movel %d0,%fp@(8) 4c1f4: 4e5e unlk %fp 4c1f6: 4ef9 0004 9c4c jmp 49c4c <_Watchdog_Insert> =============================================================================== 0004c1fc <_POSIX_Threads_Sporadic_budget_callout>: 4c1fc: 4280 clrl %d0 /* * 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 */ 4c1fe: 72ff moveq #-1,%d1 * _POSIX_Threads_Sporadic_budget_callout */ void _POSIX_Threads_Sporadic_budget_callout( Thread_Control *the_thread ) { 4c200: 4e56 0000 linkw %fp,#0 4c204: 206e 0008 moveal %fp@(8),%a0 4c208: 1039 0005 f372 moveb 5f372 ,%d0 POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4c20e: 2268 0102 moveal %a0@(258),%a1 4c212: 90a9 008c subl %a1@(140),%d0 /* * 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 */ 4c216: 2141 0076 movel %d1,%a0@(118) new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority); the_thread->real_priority = new_priority; 4c21a: 2140 0018 movel %d0,%a0@(24) */ #if 0 printk( "callout %d %d %d\n", the_thread->resource_count, the_thread->current_priority, new_priority ); #endif if ( the_thread->resource_count == 0 ) { 4c21e: 4aa8 001c tstl %a0@(28) 4c222: 6606 bnes 4c22a <_POSIX_Threads_Sporadic_budget_callout+0x2e><== NEVER TAKEN /* * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { 4c224: b0a8 0014 cmpl %a0@(20),%d0 4c228: 6204 bhis 4c22e <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN #if 0 printk( "lower priority\n" ); #endif } } } 4c22a: 4e5e unlk %fp <== NOT EXECUTED 4c22c: 4e75 rts <== NOT EXECUTED * Make sure we are actually lowering it. If they have lowered it * to logically lower than sched_ss_low_priority, then we do not want to * change it. */ if ( the_thread->current_priority < new_priority ) { _Thread_Change_priority( the_thread, new_priority, true ); 4c22e: 4878 0001 pea 1 4c232: 2f00 movel %d0,%sp@- 4c234: 2f08 movel %a0,%sp@- 4c236: 4eb9 0004 88d8 jsr 488d8 <_Thread_Change_priority> 4c23c: 4fef 000c lea %sp@(12),%sp #if 0 printk( "lower priority\n" ); #endif } } } 4c240: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004e228 <_POSIX_Threads_cancel_run>: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4e228: 7001 moveq #1,%d0 #include void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 4e22a: 4e56 ffec linkw %fp,#-20 4e22e: 206e 0008 moveal %fp@(8),%a0 4e232: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%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 ]; 4e236: 2668 0102 moveal %a0@(258),%a3 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4e23a: 240b movel %a3,%d2 4e23c: 0682 0000 00e8 addil #232,%d2 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 4e242: 2740 00d8 movel %d0,%a3@(216) while ( !_Chain_Is_empty( handler_stack ) ) { 4e246: b4ab 00e4 cmpl %a3@(228),%d2 4e24a: 673c beqs 4e288 <_POSIX_Threads_cancel_run+0x60> 4e24c: 49f9 0004 9f3e lea 49f3e <_Workspace_Free>,%a4 _ISR_Disable( level ); 4e252: 263c 0000 0700 movel #1792,%d3 4e258: 2003 movel %d3,%d0 4e25a: 40c1 movew %sr,%d1 4e25c: 8081 orl %d1,%d0 4e25e: 46c0 movew %d0,%sr handler = (POSIX_Cancel_Handler_control *) 4e260: 246b 00ec moveal %a3@(236),%a2 ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4e264: 2252 moveal %a2@,%a1 previous = the_node->previous; 4e266: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4e26a: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4e26e: 2089 movel %a1,%a0@ _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 4e270: 46c1 movew %d1,%sr (*handler->routine)( handler->arg ); 4e272: 2f2a 000c movel %a2@(12),%sp@- 4e276: 206a 0008 moveal %a2@(8),%a0 4e27a: 4e90 jsr %a0@ _Workspace_Free( handler ); 4e27c: 2f0a movel %a2,%sp@- 4e27e: 4e94 jsr %a4@ handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 4e280: 508f addql #8,%sp 4e282: b4ab 00e4 cmpl %a3@(228),%d2 4e286: 66d0 bnes 4e258 <_POSIX_Threads_cancel_run+0x30> <== NEVER TAKEN (*handler->routine)( handler->arg ); _Workspace_Free( handler ); } } 4e288: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4e28e: 4e5e unlk %fp ... =============================================================================== 00046710 <_POSIX_Timer_TSR>: * This is the operation that is run when a timer expires */ void _POSIX_Timer_TSR( Objects_Id timer __attribute__((unused)), void *data) { 46710: 4e56 0000 linkw %fp,#0 46714: 2f0a movel %a2,%sp@- 46716: 246e 000c moveal %fp@(12),%a2 bool activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4671a: 52aa 0066 addql #1,%a2@(102) /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4671e: 4aaa 0052 tstl %a2@(82) 46722: 6606 bnes 4672a <_POSIX_Timer_TSR+0x1a> 46724: 4aaa 0056 tstl %a2@(86) 46728: 672a beqs 46754 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { activated = _POSIX_Timer_Insert_helper( 4672a: 2f0a movel %a2,%sp@- 4672c: 4879 0004 6710 pea 46710 <_POSIX_Timer_TSR> 46732: 2f2a 0008 movel %a2@(8),%sp@- 46736: 2f2a 0062 movel %a2@(98),%sp@- 4673a: 486a 0010 pea %a2@(16) 4673e: 4eb9 0004 cce4 jsr 4cce4 <_POSIX_Timer_Insert_helper> ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 46744: 4fef 0014 lea %sp@(20),%sp 46748: 4a00 tstb %d0 4674a: 662a bnes 46776 <_POSIX_Timer_TSR+0x66> <== ALWAYS TAKEN /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; } 4674c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 46750: 4e5e unlk %fp <== NOT EXECUTED 46752: 4e75 rts <== 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; 46754: 7004 moveq #4,%d0 <== NOT EXECUTED 46756: 1540 003c moveb %d0,%a2@(60) <== 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 ) ) { 4675a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 4675e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 46762: 4eb9 0004 c80c jsr 4c80c <== NOT EXECUTED } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 46768: 508f addql #8,%sp <== NOT EXECUTED 4676a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED } 4676e: 246e fffc moveal %fp@(-4),%a2 46772: 4e5e unlk %fp 46774: 4e75 rts ); if ( !activated ) return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 46776: 486a 006a pea %a2@(106) 4677a: 4eb9 0004 7f08 jsr 47f08 <_TOD_Get> /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 46780: 588f addql #4,%sp 46782: 7003 moveq #3,%d0 46784: 1540 003c moveb %d0,%a2@(60) /* * 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 ) ) { 46788: 2f2a 0042 movel %a2@(66),%sp@- 4678c: 2f2a 0038 movel %a2@(56),%sp@- 46790: 4eb9 0004 c80c jsr 4c80c } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 46796: 508f addql #8,%sp 46798: 42aa 0066 clrl %a2@(102) 4679c: 60d0 bras 4676e <_POSIX_Timer_TSR+0x5e> ... =============================================================================== 0004eb38 <_POSIX_signals_Clear_process_signals>: clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4eb38: 203c 0000 0700 movel #1792,%d0 */ void _POSIX_signals_Clear_process_signals( int signo ) { 4eb3e: 4e56 0000 linkw %fp,#0 4eb42: 222e 0008 movel %fp@(8),%d1 4eb46: 2f03 movel %d3,%sp@- 4eb48: 2f02 movel %d2,%sp@- clear_signal = true; mask = signo_to_mask( signo ); ISR_Level level; _ISR_Disable( level ); 4eb4a: 40c2 movew %sr,%d2 4eb4c: 8082 orl %d2,%d0 4eb4e: 46c0 movew %d0,%sr if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4eb50: 2601 movel %d1,%d3 4eb52: 2001 movel %d1,%d0 4eb54: 41f9 0006 1104 lea 61104 <_POSIX_signals_Vectors>,%a0 4eb5a: e58b lsll #2,%d3 4eb5c: e988 lsll #4,%d0 4eb5e: 9083 subl %d3,%d0 4eb60: 7602 moveq #2,%d3 4eb62: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3 4eb66: 6718 beqs 4eb80 <_POSIX_signals_Clear_process_signals+0x48> 4eb68: 5381 subql #1,%d1 4eb6a: 7001 moveq #1,%d0 4eb6c: e3a8 lsll %d1,%d0 if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; 4eb6e: 4680 notl %d0 4eb70: c1b9 0006 12f8 andl %d0,612f8 <_POSIX_signals_Pending> } _ISR_Enable( level ); 4eb76: 46c2 movew %d2,%sr } 4eb78: 241f movel %sp@+,%d2 4eb7a: 261f movel %sp@+,%d3 4eb7c: 4e5e unlk %fp 4eb7e: 4e75 rts RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4eb80: 2040 moveal %d0,%a0 4eb82: d1fc 0006 1300 addal #398080,%a0 ISR_Level level; _ISR_Disable( level ); if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4eb88: 43f9 0006 12fc lea 612fc <_POSIX_signals_Siginfo>,%a1 4eb8e: b1f1 0800 cmpal %a1@(00000000,%d0:l),%a0 4eb92: 67d4 beqs 4eb68 <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN clear_signal = false; } if ( clear_signal ) { _POSIX_signals_Pending &= ~mask; } _ISR_Enable( level ); 4eb94: 46c2 movew %d2,%sr <== NOT EXECUTED } 4eb96: 241f movel %sp@+,%d2 <== NOT EXECUTED 4eb98: 261f movel %sp@+,%d3 <== NOT EXECUTED 4eb9a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 000474e0 <_POSIX_signals_Get_lowest>: sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 474e0: 701b moveq #27,%d0 #include int _POSIX_signals_Get_lowest( sigset_t set ) { 474e2: 4e56 fff4 linkw %fp,#-12 474e6: 48d7 001c moveml %d2-%d4,%sp@ 474ea: 242e 0008 movel %fp@(8),%d2 474ee: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_lowest( 474f0: 2200 movel %d0,%d1 474f2: 5381 subql #1,%d1 474f4: 2803 movel %d3,%d4 474f6: e3ac lsll %d1,%d4 474f8: 2204 movel %d4,%d1 ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 474fa: c282 andl %d2,%d1 474fc: 6626 bnes 47524 <_POSIX_signals_Get_lowest+0x44> <== NEVER TAKEN sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 474fe: 5280 addql #1,%d0 47500: 123c 0020 moveb #32,%d1 47504: b280 cmpl %d0,%d1 47506: 66e8 bnes 474f0 <_POSIX_signals_Get_lowest+0x10> 47508: 7001 moveq #1,%d0 4750a: 7601 moveq #1,%d3 #include #include #include #include int _POSIX_signals_Get_lowest( 4750c: 2200 movel %d0,%d1 4750e: 5381 subql #1,%d1 47510: 2803 movel %d3,%d4 47512: e3ac lsll %d1,%d4 47514: 2204 movel %d4,%d1 #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( set & signo_to_mask( signo ) ) { 47516: c282 andl %d2,%d1 47518: 660a bnes 47524 <_POSIX_signals_Get_lowest+0x44> */ #if (SIGHUP != 1) #error "Assumption that SIGHUP==1 violated!!" #endif for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4751a: 5280 addql #1,%d0 4751c: 123c 001b moveb #27,%d1 47520: b280 cmpl %d0,%d1 47522: 66e8 bnes 4750c <_POSIX_signals_Get_lowest+0x2c> <== ALWAYS TAKEN * a return 0. This routine will NOT be called unless a signal * is pending in the set passed in. */ found_it: return signo; } 47524: 4cd7 001c moveml %sp@,%d2-%d4 47528: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004bb66 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4bb66: 4e56 fff0 linkw %fp,#-16 4bb6a: 206e 0008 moveal %fp@(8),%a0 4bb6e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4bb72: 2468 0102 moveal %a0@(258),%a2 /* * api may be NULL in case of a thread close in progress */ if ( !api ) 4bb76: 4a8a tstl %a2 4bb78: 6700 008e beqw 4bc08 <_POSIX_signals_Post_switch_extension+0xa2> * * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); 4bb7c: 263c 0000 0700 movel #1792,%d3 4bb82: 47f9 0004 e31c lea 4e31c <_POSIX_signals_Check_signal>,%a3 4bb88: 2003 movel %d3,%d0 4bb8a: 40c1 movew %sr,%d1 4bb8c: 8081 orl %d1,%d0 4bb8e: 46c0 movew %d0,%sr if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { 4bb90: 2039 0006 12f8 movel 612f8 <_POSIX_signals_Pending>,%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4bb96: 242a 00d0 movel %a2@(208),%d2 4bb9a: 4682 notl %d2 (api->signals_pending | _POSIX_signals_Pending)) ) { 4bb9c: 80aa 00d4 orl %a2@(212),%d0 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & 4bba0: c082 andl %d2,%d0 4bba2: 6762 beqs 4bc06 <_POSIX_signals_Post_switch_extension+0xa0> (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); break; } _ISR_Enable( level ); 4bba4: 46c1 movew %d1,%sr for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4bba6: 741b moveq #27,%d2 _POSIX_signals_Check_signal( api, signo, false ); 4bba8: 42a7 clrl %sp@- 4bbaa: 2f02 movel %d2,%sp@- 4bbac: 2f0a movel %a2,%sp@- 4bbae: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4bbb0: 4878 0001 pea 1 4bbb4: 2f02 movel %d2,%sp@- _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4bbb6: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4bbb8: 2f0a movel %a2,%sp@- 4bbba: 4e93 jsr %a3@ _ISR_Enable( level ); break; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4bbbc: 4fef 0018 lea %sp@(24),%sp 4bbc0: 7020 moveq #32,%d0 4bbc2: b082 cmpl %d2,%d0 4bbc4: 66e2 bnes 4bba8 <_POSIX_signals_Post_switch_extension+0x42> 4bbc6: 7401 moveq #1,%d2 _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); 4bbc8: 42a7 clrl %sp@- 4bbca: 2f02 movel %d2,%sp@- 4bbcc: 2f0a movel %a2,%sp@- 4bbce: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4bbd0: 4878 0001 pea 1 4bbd4: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4bbd6: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4bbd8: 2f0a movel %a2,%sp@- 4bbda: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4bbdc: 4fef 0018 lea %sp@(24),%sp 4bbe0: 701b moveq #27,%d0 4bbe2: b082 cmpl %d2,%d0 4bbe4: 67a2 beqs 4bb88 <_POSIX_signals_Post_switch_extension+0x22><== NEVER TAKEN _POSIX_signals_Check_signal( api, signo, false ); 4bbe6: 42a7 clrl %sp@- 4bbe8: 2f02 movel %d2,%sp@- 4bbea: 2f0a movel %a2,%sp@- 4bbec: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, true ); 4bbee: 4878 0001 pea 1 4bbf2: 2f02 movel %d2,%sp@- _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4bbf4: 5282 addql #1,%d2 _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); 4bbf6: 2f0a movel %a2,%sp@- 4bbf8: 4e93 jsr %a3@ _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } /* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4bbfa: 4fef 0018 lea %sp@(24),%sp 4bbfe: 701b moveq #27,%d0 4bc00: b082 cmpl %d2,%d0 4bc02: 66c4 bnes 4bbc8 <_POSIX_signals_Post_switch_extension+0x62> 4bc04: 6082 bras 4bb88 <_POSIX_signals_Post_switch_extension+0x22> */ while (1) { _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4bc06: 46c1 movew %d1,%sr for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { _POSIX_signals_Check_signal( api, signo, false ); _POSIX_signals_Check_signal( api, signo, true ); } } } 4bc08: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4bc0e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d0ac <_POSIX_signals_Unblock_thread>: 5d0ac: 7001 moveq #1,%d0 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5d0ae: 4e56 ffec linkw %fp,#-20 5d0b2: 206e 000c moveal %fp@(12),%a0 5d0b6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 5d0ba: 246e 0008 moveal %fp@(8),%a2 5d0be: 2608 movel %a0,%d3 5d0c0: 5383 subql #1,%d3 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5d0c2: 222a 0010 movel %a2@(16),%d1 5d0c6: 2401 movel %d1,%d2 5d0c8: 0282 1000 8000 andil #268468224,%d2 bool _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 5d0ce: 282e 0010 movel %fp@(16),%d4 POSIX_API_Control *api; sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5d0d2: 226a 0102 moveal %a2@(258),%a1 5d0d6: e7a8 lsll %d3,%d0 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 5d0d8: 0c82 1000 8000 cmpil #268468224,%d2 5d0de: 6770 beqs 5d150 <_POSIX_signals_Unblock_thread+0xa4> } /* * Thread is not waiting due to a sigwait. */ if ( ~api->signals_blocked & mask ) { 5d0e0: 2429 00d0 movel %a1@(208),%d2 5d0e4: 4682 notl %d2 5d0e6: c082 andl %d2,%d0 5d0e8: 675a beqs 5d144 <_POSIX_signals_Unblock_thread+0x98> * it is not blocked, THEN * we need to dispatch at the end of this ISR. * + Any other combination, do nothing. */ if ( _States_Is_interruptible_by_signal( the_thread->current_state ) ) { 5d0ea: 0801 001c btst #28,%d1 5d0ee: 673e beqs 5d12e <_POSIX_signals_Unblock_thread+0x82> the_thread->Wait.return_code = EINTR; 5d0f0: 7004 moveq #4,%d0 5d0f2: 2540 0034 movel %d0,%a2@(52) */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 5d0f6: 2001 movel %d1,%d0 5d0f8: 0280 0003 bee0 andil #245472,%d0 /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 5d0fe: 6600 00a0 bnew 5d1a0 <_POSIX_signals_Unblock_thread+0xf4> _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state) ) { 5d102: 44c1 movew %d1,%ccr 5d104: 6a3e bpls 5d144 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN (void) _Watchdog_Remove( &the_thread->Timer ); 5d106: 486a 0048 pea %a2@(72) 5d10a: 4eb9 0004 9da0 jsr 49da0 <_Watchdog_Remove> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 5d110: 2f3c 1003 fff8 movel #268697592,%sp@- 5d116: 2f0a movel %a2,%sp@- 5d118: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> 5d11e: 4fef 000c lea %sp@(12),%sp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d122: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d128: 4200 clrb %d0 } 5d12a: 4e5e unlk %fp 5d12c: 4e75 rts else if ( _States_Is_delaying(the_thread->current_state) ) { (void) _Watchdog_Remove( &the_thread->Timer ); _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { 5d12e: 4a81 tstl %d1 5d130: 6612 bnes 5d144 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5d132: 4ab9 0006 10ce tstl 610ce <_Per_CPU_Information+0x8> 5d138: 670a beqs 5d144 <_POSIX_signals_Unblock_thread+0x98> 5d13a: b5f9 0006 10d2 cmpal 610d2 <_Per_CPU_Information+0xc>,%a2 5d140: 6700 0090 beqw 5d1d2 <_POSIX_signals_Unblock_thread+0x126> _Thread_Dispatch_necessary = true; } } return false; } 5d144: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d14a: 4200 clrb %d0 } 5d14c: 4e5e unlk %fp 5d14e: 4e75 rts * 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) ) { 5d150: 2200 movel %d0,%d1 5d152: c2aa 0030 andl %a2@(48),%d1 5d156: 672e beqs 5d186 <_POSIX_signals_Unblock_thread+0xda> the_thread->Wait.return_code = EINTR; 5d158: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5d15a: 266a 0028 moveal %a2@(40),%a3 */ 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; 5d15e: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5d162: 4a84 tstl %d4 5d164: 6750 beqs 5d1b6 <_POSIX_signals_Unblock_thread+0x10a> the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 5d166: 2244 moveal %d4,%a1 5d168: 204b moveal %a3,%a0 5d16a: 20d9 movel %a1@+,%a0@+ 5d16c: 20d9 movel %a1@+,%a0@+ 5d16e: 2091 movel %a1@,%a0@ } _Thread_queue_Extract_with_proxy( the_thread ); 5d170: 2f0a movel %a2,%sp@- 5d172: 4eb9 0004 94dc jsr 494dc <_Thread_queue_Extract_with_proxy> return true; 5d178: 588f addql #4,%sp 5d17a: 7001 moveq #1,%d0 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d17c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5d182: 4e5e unlk %fp 5d184: 4e75 rts * 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) ) { 5d186: 2229 00d0 movel %a1@(208),%d1 5d18a: 4681 notl %d1 5d18c: c081 andl %d1,%d0 5d18e: 67b4 beqs 5d144 <_POSIX_signals_Unblock_thread+0x98> the_thread->Wait.return_code = EINTR; 5d190: 7004 moveq #4,%d0 the_info = (siginfo_t *) the_thread->Wait.return_argument; 5d192: 266a 0028 moveal %a2@(40),%a3 */ 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; 5d196: 2540 0034 movel %d0,%a2@(52) the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 5d19a: 4a84 tstl %d4 5d19c: 66c8 bnes 5d166 <_POSIX_signals_Unblock_thread+0xba><== ALWAYS TAKEN 5d19e: 6016 bras 5d1b6 <_POSIX_signals_Unblock_thread+0x10a><== NOT EXECUTED /* * In pthread_cond_wait, a thread will be blocking on a thread * queue, but is also interruptible by a POSIX signal. */ if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 5d1a0: 2f0a movel %a2,%sp@- 5d1a2: 4eb9 0004 94dc jsr 494dc <_Thread_queue_Extract_with_proxy> 5d1a8: 588f addql #4,%sp if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; } 5d1aa: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } } return false; 5d1b0: 4200 clrb %d0 } 5d1b2: 4e5e unlk %fp 5d1b4: 4e75 rts the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; the_info->si_code = SI_USER; 5d1b6: 103c 0001 moveb #1,%d0 the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 5d1ba: 2688 movel %a0,%a3@ the_info->si_code = SI_USER; 5d1bc: 2740 0004 movel %d0,%a3@(4) the_info->si_value.sival_int = 0; 5d1c0: 42ab 0008 clrl %a3@(8) } else { *the_info = *info; } _Thread_queue_Extract_with_proxy( the_thread ); 5d1c4: 2f0a movel %a2,%sp@- 5d1c6: 4eb9 0004 94dc jsr 494dc <_Thread_queue_Extract_with_proxy> return true; 5d1cc: 588f addql #4,%sp 5d1ce: 7001 moveq #1,%d0 5d1d0: 60aa bras 5d17c <_POSIX_signals_Unblock_thread+0xd0> _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 5d1d2: 7001 moveq #1,%d0 } } return false; } 5d1d4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5d1da: 4e5e unlk %fp _Thread_Unblock( the_thread ); } } else if ( the_thread->current_state == STATES_READY ) { if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 5d1dc: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> } } return false; 5d1e2: 4200 clrb %d0 } ... =============================================================================== 0004c5fe <_RTEMS_tasks_Create_extension>: bool _RTEMS_tasks_Create_extension( Thread_Control *executing, Thread_Control *created ) { 4c5fe: 4e56 0000 linkw %fp,#0 4c602: 2f0a movel %a2,%sp@- 4c604: 246e 000c moveal %fp@(12),%a2 /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) 4c608: 4a39 0005 f344 tstb 5f344 4c60e: 6758 beqs 4c668 <_RTEMS_tasks_Create_extension+0x6a> /* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); 4c610: 705e moveq #94,%d0 if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c612: 2f00 movel %d0,%sp@- 4c614: 4eb9 0004 9f22 jsr 49f22 <_Workspace_Allocate> if ( !api ) 4c61a: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c61c: 2040 moveal %d0,%a0 if ( !api ) 4c61e: 4a80 tstl %d0 4c620: 6758 beqs 4c67a <_RTEMS_tasks_Create_extension+0x7c> return false; created->API_Extensions[ THREAD_API_RTEMS ] = api; 4c622: 2540 00fe movel %d0,%a2@(254) */ RTEMS_INLINE_ROUTINE void _ASR_Initialize ( ASR_Information *information ) { information->is_enabled = false; 4c626: 4200 clrb %d0 api->pending_events = EVENT_SETS_NONE_PENDING; 4c628: 4290 clrl %a0@ 4c62a: 1140 0008 moveb %d0,%a0@(8) api->event_condition = 0; 4c62e: 42a8 0004 clrl %a0@(4) information->handler = NULL; 4c632: 42a8 000a clrl %a0@(10) information->mode_set = RTEMS_DEFAULT_MODES; 4c636: 42a8 000e clrl %a0@(14) information->signals_posted = 0; 4c63a: 42a8 0012 clrl %a0@(18) information->signals_pending = 0; 4c63e: 42a8 0016 clrl %a0@(22) information->nest_level = 0; 4c642: 42a8 001a clrl %a0@(26) _ASR_Initialize( &api->Signal ); created->task_variables = NULL; 4c646: 42aa 010a clrl %a2@(266) if ( rtems_configuration_get_notepads_enabled() ) { 4c64a: 4a39 0005 f344 tstb 5f344 4c650: 670c beqs 4c65e <_RTEMS_tasks_Create_extension+0x60> * task is created via another API, then this routine is invoked * and this API given the opportunity to initialize its extension * area. */ bool _RTEMS_tasks_Create_extension( 4c652: 41e8 001e lea %a0@(30),%a0 4c656: 7010 moveq #16,%d0 _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; 4c658: 4298 clrl %a0@+ 4c65a: 5380 subql #1,%d0 api->event_condition = 0; _ASR_Initialize( &api->Signal ); created->task_variables = NULL; if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) 4c65c: 66fa bnes 4c658 <_RTEMS_tasks_Create_extension+0x5a> api->Notepads[i] = 0; } return true; } 4c65e: 246e fffc moveal %fp@(-4),%a2 4c662: 4e5e unlk %fp if ( rtems_configuration_get_notepads_enabled() ) { for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; 4c664: 7001 moveq #1,%d0 } 4c666: 4e75 rts * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); 4c668: 701e moveq #30,%d0 api = _Workspace_Allocate( to_allocate ); 4c66a: 2f00 movel %d0,%sp@- 4c66c: 4eb9 0004 9f22 jsr 49f22 <_Workspace_Allocate> if ( !api ) 4c672: 588f addql #4,%sp */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() ) to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); 4c674: 2040 moveal %d0,%a0 if ( !api ) 4c676: 4a80 tstl %d0 4c678: 66a8 bnes 4c622 <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } 4c67a: 246e fffc moveal %fp@(-4),%a2 4c67e: 4e5e unlk %fp to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t)); api = _Workspace_Allocate( to_allocate ); if ( !api ) return false; 4c680: 4200 clrb %d0 <== NOT EXECUTED for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++) api->Notepads[i] = 0; } return true; } =============================================================================== 0004c5a8 <_RTEMS_tasks_Delete_extension>: void _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4c5a8: 4e56 fff4 linkw %fp,#-12 4c5ac: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4c5b0: 246e 000c moveal %fp@(12),%a2 4c5b4: 47f9 0004 c6d0 lea 4c6d0 <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3 /* * Free per task variable memory */ tvp = deleted->task_variables; 4c5ba: 206a 010a moveal %a2@(266),%a0 deleted->task_variables = NULL; 4c5be: 42aa 010a clrl %a2@(266) while (tvp) { 4c5c2: 4a88 tstl %a0 4c5c4: 671e beqs 4c5e4 <_RTEMS_tasks_Delete_extension+0x3c> next = (rtems_task_variable_t *)tvp->next; 4c5c6: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c5c8: 2f08 movel %a0,%sp@- 4c5ca: 2f0a movel %a2,%sp@- 4c5cc: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c5ce: 508f addql #8,%sp 4c5d0: 4a82 tstl %d2 4c5d2: 6710 beqs 4c5e4 <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN next = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); tvp = next; 4c5d4: 2042 moveal %d2,%a0 */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { next = (rtems_task_variable_t *)tvp->next; 4c5d6: 2410 movel %a0@,%d2 _RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp ); 4c5d8: 2f08 movel %a0,%sp@- 4c5da: 2f0a movel %a2,%sp@- 4c5dc: 4e93 jsr %a3@ * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4c5de: 508f addql #8,%sp 4c5e0: 4a82 tstl %d2 4c5e2: 66f0 bnes 4c5d4 <_RTEMS_tasks_Delete_extension+0x2c> /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); 4c5e4: 2f2a 00fe movel %a2@(254),%sp@- 4c5e8: 4eb9 0004 9f3e jsr 49f3e <_Workspace_Free> deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4c5ee: 588f addql #4,%sp 4c5f0: 42aa 00fe clrl %a2@(254) } 4c5f4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4c5fa: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046b8c <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 46b8c: 4e56 ffe4 linkw %fp,#-28 46b90: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ rtems_initialization_tasks_table *user_tasks; /* * Move information into local variables */ user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table; 46b94: 2479 0005 f36a moveal 5f36a ,%a2 maximum = Configuration_RTEMS_API.number_of_initialization_tasks; 46b9a: 2639 0005 f366 movel 5f366 ,%d3 /* * Verify that we have a set of user tasks to iterate */ if ( !user_tasks ) 46ba0: 4a8a tstl %a2 46ba2: 6754 beqs 46bf8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46ba4: 4a83 tstl %d3 46ba6: 6750 beqs 46bf8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN 46ba8: 280e movel %fp,%d4 46baa: 4282 clrl %d2 46bac: 5984 subql #4,%d4 46bae: 47f9 0004 6964 lea 46964 ,%a3 &id ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46bb4: 49f9 0004 6c14 lea 46c14 ,%a4 /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { return_value = rtems_task_create( 46bba: 2f04 movel %d4,%sp@- 46bbc: 2f2a 000c movel %a2@(12),%sp@- 46bc0: 2f2a 0014 movel %a2@(20),%sp@- 46bc4: 2f2a 0004 movel %a2@(4),%sp@- 46bc8: 2f2a 0008 movel %a2@(8),%sp@- 46bcc: 2f12 movel %a2@,%sp@- 46bce: 4e93 jsr %a3@ user_tasks[ index ].stack_size, user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 46bd0: 4fef 0018 lea %sp@(24),%sp 46bd4: 4a80 tstl %d0 46bd6: 662a bnes 46c02 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); return_value = rtems_task_start( 46bd8: 2f2a 0018 movel %a2@(24),%sp@- 46bdc: 2f2a 0010 movel %a2@(16),%sp@- 46be0: 2f2e fffc movel %fp@(-4),%sp@- 46be4: 4e94 jsr %a4@ id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 46be6: 4fef 000c lea %sp@(12),%sp 46bea: 4a80 tstl %d0 46bec: 6614 bnes 46c02 <_RTEMS_tasks_Initialize_user_tasks_body+0x76> return; /* * Now iterate over the initialization tasks and create/start them. */ for ( index=0 ; index < maximum ; index++ ) { 46bee: 5282 addql #1,%d2 46bf0: 45ea 001c lea %a2@(28),%a2 46bf4: b483 cmpl %d3,%d2 46bf6: 65c2 bcss 46bba <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); } } 46bf8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46bfe: 4e5e unlk %fp 46c00: 4e75 rts id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value ); 46c02: 2f00 movel %d0,%sp@- 46c04: 4878 0001 pea 1 46c08: 4878 0001 pea 1 46c0c: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> ... =============================================================================== 0004c4d2 <_RTEMS_tasks_Switch_extension>: void _RTEMS_tasks_Switch_extension( Thread_Control *executing, Thread_Control *heir ) { 4c4d2: 4e56 0000 linkw %fp,#0 4c4d6: 206e 0008 moveal %fp@(8),%a0 /* * Per Task Variables */ tvp = executing->task_variables; 4c4da: 2068 010a moveal %a0@(266),%a0 while (tvp) { 4c4de: 4a88 tstl %a0 4c4e0: 6712 beqs 4c4f4 <_RTEMS_tasks_Switch_extension+0x22> tvp->tval = *tvp->ptr; 4c4e2: 2268 0004 moveal %a0@(4),%a1 4c4e6: 2151 000c movel %a1@,%a0@(12) *tvp->ptr = tvp->gval; 4c4ea: 22a8 0008 movel %a0@(8),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c4ee: 2050 moveal %a0@,%a0 /* * Per Task Variables */ tvp = executing->task_variables; while (tvp) { 4c4f0: 4a88 tstl %a0 4c4f2: 66ee bnes 4c4e2 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN tvp->tval = *tvp->ptr; *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; 4c4f4: 206e 000c moveal %fp@(12),%a0 4c4f8: 2068 010a moveal %a0@(266),%a0 while (tvp) { 4c4fc: 4a88 tstl %a0 4c4fe: 6712 beqs 4c512 <_RTEMS_tasks_Switch_extension+0x40> tvp->gval = *tvp->ptr; 4c500: 2268 0004 moveal %a0@(4),%a1 4c504: 2151 0008 movel %a1@,%a0@(8) *tvp->ptr = tvp->tval; 4c508: 22a8 000c movel %a0@(12),%a1@ tvp = (rtems_task_variable_t *)tvp->next; 4c50c: 2050 moveal %a0@,%a0 *tvp->ptr = tvp->gval; tvp = (rtems_task_variable_t *)tvp->next; } tvp = heir->task_variables; while (tvp) { 4c50e: 4a88 tstl %a0 4c510: 66ee bnes 4c500 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN tvp->gval = *tvp->ptr; *tvp->ptr = tvp->tval; tvp = (rtems_task_variable_t *)tvp->next; } } 4c512: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047c84 <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 47c84: 4e56 fffc linkw %fp,#-4 47c88: 2f0a movel %a2,%sp@- 47c8a: 486e fffc pea %fp@(-4) 47c8e: 2f2e 0008 movel %fp@(8),%sp@- 47c92: 4879 0006 2c7c pea 62c7c <_Rate_monotonic_Information> 47c98: 4eb9 0004 9bd4 jsr 49bd4 <_Objects_Get> /* * When we get here, the Timer is already off the chain so we do not * have to worry about that -- hence no _Watchdog_Remove(). */ the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 47c9e: 4fef 000c lea %sp@(12),%sp 47ca2: 2440 moveal %d0,%a2 47ca4: 4aae fffc tstl %fp@(-4) 47ca8: 6636 bnes 47ce0 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN case OBJECTS_LOCAL: the_thread = the_period->owner; 47caa: 206a 0040 moveal %a2@(64),%a0 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period ( States_Control the_states ) { return (the_states & STATES_WAITING_FOR_PERIOD); 47cae: 2028 0010 movel %a0@(16),%d0 47cb2: 0280 0000 4000 andil #16384,%d0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 47cb8: 670a beqs 47cc4 <_Rate_monotonic_Timeout+0x40> 47cba: 202a 0008 movel %a2@(8),%d0 47cbe: b0a8 0020 cmpl %a0@(32),%d0 47cc2: 675e beqs 47d22 <_Rate_monotonic_Timeout+0x9e> _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 47cc4: 7001 moveq #1,%d0 47cc6: b0aa 0038 cmpl %a2@(56),%d0 47cca: 671c beqs 47ce8 <_Rate_monotonic_Timeout+0x64> _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 47ccc: 7004 moveq #4,%d0 47cce: 2540 0038 movel %d0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47cd2: 2039 0006 2d72 movel 62d72 <_Thread_Dispatch_disable_level>,%d0 47cd8: 5380 subql #1,%d0 47cda: 23c0 0006 2d72 movel %d0,62d72 <_Thread_Dispatch_disable_level> case OBJECTS_REMOTE: /* impossible */ #endif case OBJECTS_ERROR: break; } } 47ce0: 246e fff8 moveal %fp@(-8),%a2 47ce4: 4e5e unlk %fp 47ce6: 4e75 rts _Rate_monotonic_Initiate_statistics( the_period ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; 47ce8: 103c 0003 moveb #3,%d0 47cec: 2540 0038 movel %d0,%a2@(56) _Rate_monotonic_Initiate_statistics( the_period ); 47cf0: 2f0a movel %a2,%sp@- 47cf2: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47cf8: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47cfe: 486a 0010 pea %a2@(16) 47d02: 4879 0006 2e32 pea 62e32 <_Watchdog_Ticks_chain> 47d08: 4eb9 0004 b880 jsr 4b880 <_Watchdog_Insert> 47d0e: 4fef 000c lea %sp@(12),%sp 47d12: 2039 0006 2d72 movel 62d72 <_Thread_Dispatch_disable_level>,%d0 47d18: 5380 subql #1,%d0 47d1a: 23c0 0006 2d72 movel %d0,62d72 <_Thread_Dispatch_disable_level> 47d20: 60be bras 47ce0 <_Rate_monotonic_Timeout+0x5c> RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 47d22: 2f3c 1003 fff8 movel #268697592,%sp@- 47d28: 2f08 movel %a0,%sp@- 47d2a: 4eb9 0004 a4f8 jsr 4a4f8 <_Thread_Clear_state> the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Rate_monotonic_Initiate_statistics( the_period ); 47d30: 2f0a movel %a2,%sp@- 47d32: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 47d38: 256a 003c 001c movel %a2@(60),%a2@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 47d3e: 486a 0010 pea %a2@(16) 47d42: 4879 0006 2e32 pea 62e32 <_Watchdog_Ticks_chain> 47d48: 4eb9 0004 b880 jsr 4b880 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); 47d4e: 4fef 0014 lea %sp@(20),%sp */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 47d52: 2039 0006 2d72 movel 62d72 <_Thread_Dispatch_disable_level>,%d0 47d58: 5380 subql #1,%d0 47d5a: 23c0 0006 2d72 movel %d0,62d72 <_Thread_Dispatch_disable_level> 47d60: 6000 ff7e braw 47ce0 <_Rate_monotonic_Timeout+0x5c> =============================================================================== 00048414 <_Scheduler_Handler_initialization>: #include #include #include void _Scheduler_Handler_initialization(void) { 48414: 4e56 0000 linkw %fp,#0 (*_Scheduler.Operations.initialize)(); } 48418: 4e5e unlk %fp #include #include void _Scheduler_Handler_initialization(void) { (*_Scheduler.Operations.initialize)(); 4841a: 2279 0005 f2a4 moveal 5f2a4 <_Scheduler+0x4>,%a1 48420: 4ed1 jmp %a1@ ... =============================================================================== 00048440 <_Scheduler_priority_Block>: #include void _Scheduler_priority_Block( Thread_Control *the_thread ) { 48440: 4e56 0000 linkw %fp,#0 48444: 206e 0008 moveal %fp@(8),%a0 48448: 2f0b movel %a3,%sp@- 4844a: 2f0a movel %a2,%sp@- ) { Scheduler_priority_Per_thread *sched_info; Chain_Control *ready; sched_info = (Scheduler_priority_Per_thread *) the_thread->scheduler_info; 4844c: 2468 008a moveal %a0@(138),%a2 ready = sched_info->ready_chain; 48450: 2252 moveal %a2@,%a1 if ( _Chain_Has_only_one_node( ready ) ) { 48452: 2029 0008 movel %a1@(8),%d0 48456: b091 cmpl %a1@,%d0 48458: 6700 0084 beqw 484de <_Scheduler_priority_Block+0x9e> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4845c: 2450 moveal %a0@,%a2 previous = the_node->previous; 4845e: 2268 0004 moveal %a0@(4),%a1 next->previous = previous; 48462: 2549 0004 movel %a1,%a2@(4) previous->next = next; 48466: 228a movel %a2,%a1@ _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 48468: b1f9 0006 10d6 cmpal 610d6 <_Per_CPU_Information+0x10>,%a0 4846e: 6720 beqs 48490 <_Scheduler_priority_Block+0x50> _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 48470: b1f9 0006 10d2 cmpal 610d2 <_Per_CPU_Information+0xc>,%a0 48476: 6708 beqs 48480 <_Scheduler_priority_Block+0x40> _Thread_Dispatch_necessary = true; } 48478: 245f moveal %sp@+,%a2 4847a: 265f moveal %sp@+,%a3 4847c: 4e5e unlk %fp 4847e: 4e75 rts 48480: 245f moveal %sp@+,%a2 if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 48482: 7001 moveq #1,%d0 } 48484: 265f moveal %sp@+,%a3 48486: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 48488: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> } 4848e: 4e75 rts RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 48490: 3039 0006 10e0 movew 610e0 <_Priority_Major_bit_map>,%d0 48496: 4840 swap %d0 48498: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 4849a: 43f9 0006 10e4 lea 610e4 <_Priority_Bit_map>,%a1 484a0: 0280 0000 ffff andil #65535,%d0 484a6: 3231 0a00 movew %a1@(00000000,%d0:l:2),%d1 484aa: 4841 swap %d1 484ac: 04c1 ff1 %d1 484ae: 2279 0005 f2a0 moveal 5f2a0 <_Scheduler>,%a1 return (_Priority_Bits_index( major ) << 4) + 484b4: 0281 0000 ffff andil #65535,%d1 484ba: e988 lsll #4,%d0 484bc: d081 addl %d1,%d0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 484be: 2200 movel %d0,%d1 484c0: e988 lsll #4,%d0 484c2: e589 lsll #2,%d1 484c4: 9081 subl %d1,%d0 484c6: d3c0 addal %d0,%a1 484c8: 2019 movel %a1@+,%d0 484ca: b3c0 cmpal %d0,%a1 484cc: 6750 beqs 4851e <_Scheduler_priority_Block+0xde> <== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 484ce: 23c0 0006 10d6 movel %d0,610d6 <_Per_CPU_Information+0x10> /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) _Scheduler_priority_Schedule_body(); if ( _Thread_Is_executing( the_thread ) ) 484d4: b1f9 0006 10d2 cmpal 610d2 <_Per_CPU_Information+0xc>,%a0 484da: 669c bnes 48478 <_Scheduler_priority_Block+0x38> <== NEVER TAKEN 484dc: 60a2 bras 48480 <_Scheduler_priority_Block+0x40> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 484de: 2009 movel %a1,%d0 484e0: 5880 addql #4,%d0 RTEMS_INLINE_ROUTINE void _Priority_bit_map_Remove ( Priority_bit_map_Information *the_priority_map ) { *the_priority_map->minor &= the_priority_map->block_minor; 484e2: 266a 0004 moveal %a2@(4),%a3 484e6: 2280 movel %d0,%a1@ 484e8: 302a 000e movew %a2@(14),%d0 head->next = tail; head->previous = NULL; 484ec: 42a9 0004 clrl %a1@(4) tail->previous = head; 484f0: 2349 0008 movel %a1,%a1@(8) 484f4: 3213 movew %a3@,%d1 484f6: c081 andl %d1,%d0 484f8: 3680 movew %d0,%a3@ if ( *the_priority_map->minor == 0 ) 484fa: 6600 ff6c bnew 48468 <_Scheduler_priority_Block+0x28> _Priority_Major_bit_map &= the_priority_map->block_major; 484fe: 3239 0006 10e0 movew 610e0 <_Priority_Major_bit_map>,%d1 48504: 302a 000c movew %a2@(12),%d0 48508: c081 andl %d1,%d0 4850a: 33c0 0006 10e0 movew %d0,610e0 <_Priority_Major_bit_map> { _Scheduler_priority_Ready_queue_extract( the_thread ); /* TODO: flash critical section? */ if ( _Thread_Is_heir( the_thread ) ) 48510: b1f9 0006 10d6 cmpal 610d6 <_Per_CPU_Information+0x10>,%a0 48516: 6600 ff58 bnew 48470 <_Scheduler_priority_Block+0x30> 4851a: 6000 ff74 braw 48490 <_Scheduler_priority_Block+0x50> Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 4851e: 4280 clrl %d0 <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 48520: 23c0 0006 10d6 movel %d0,610d6 <_Per_CPU_Information+0x10> <== NOT EXECUTED 48526: 60ac bras 484d4 <_Scheduler_priority_Block+0x94> <== NOT EXECUTED =============================================================================== 0004861c <_Scheduler_priority_Free>: #include void _Scheduler_priority_Free ( Thread_Control *the_thread ) { 4861c: 4e56 0000 linkw %fp,#0 48620: 206e 0008 moveal %fp@(8),%a0 _Workspace_Free( the_thread->scheduler_info ); 48624: 2d68 008a 0008 movel %a0@(138),%fp@(8) } 4862a: 4e5e unlk %fp void _Scheduler_priority_Free ( Thread_Control *the_thread ) { _Workspace_Free( the_thread->scheduler_info ); 4862c: 4ef9 0004 9f3e jmp 49f3e <_Workspace_Free> ... =============================================================================== 0004869c <_Scheduler_priority_Schedule>: #include #include #include void _Scheduler_priority_Schedule(void) { 4869c: 4e56 0000 linkw %fp,#0 RTEMS_INLINE_ROUTINE Priority_Control _Priority_bit_map_Get_highest( void ) { Priority_bit_map_Control minor; Priority_bit_map_Control major; _Bitfield_Find_first_bit( _Priority_Major_bit_map, major ); 486a0: 3039 0006 10e0 movew 610e0 <_Priority_Major_bit_map>,%d0 486a6: 4840 swap %d0 486a8: 04c0 ff1 %d0 _Bitfield_Find_first_bit( _Priority_Bit_map[major], minor ); 486aa: 41f9 0006 10e4 lea 610e4 <_Priority_Bit_map>,%a0 486b0: 0280 0000 ffff andil #65535,%d0 486b6: 3230 0a00 movew %a0@(00000000,%d0:l:2),%d1 486ba: 4841 swap %d1 486bc: 04c1 ff1 %d1 _Scheduler_priority_Schedule_body(); } 486be: 2079 0005 f2a0 moveal 5f2a0 <_Scheduler>,%a0 return (_Priority_Bits_index( major ) << 4) + 486c4: 0281 0000 ffff andil #65535,%d1 486ca: e988 lsll #4,%d0 486cc: d081 addl %d1,%d0 Chain_Control *the_ready_queue ) { Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) 486ce: 2200 movel %d0,%d1 486d0: e988 lsll #4,%d0 486d2: e589 lsll #2,%d1 486d4: 9081 subl %d1,%d0 486d6: d1c0 addal %d0,%a0 486d8: 2018 movel %a0@+,%d0 486da: b1c0 cmpal %d0,%a0 486dc: 670a beqs 486e8 <_Scheduler_priority_Schedule+0x4c><== NEVER TAKEN * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 486de: 23c0 0006 10d6 movel %d0,610d6 <_Per_CPU_Information+0x10> 486e4: 4e5e unlk %fp 486e6: 4e75 rts Priority_Control index = _Priority_bit_map_Get_highest(); if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) ) return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] ); return NULL; 486e8: 4280 clrl %d0 <== NOT EXECUTED 486ea: 4e5e unlk %fp <== NOT EXECUTED * * @param[in] the_thread - pointer to thread */ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Schedule_body(void) { _Thread_Heir = _Scheduler_priority_Ready_queue_first( 486ec: 23c0 0006 10d6 movel %d0,610d6 <_Per_CPU_Information+0x10> <== NOT EXECUTED =============================================================================== 00048a28 <_Scheduler_simple_Block>: #include void _Scheduler_simple_Block( Thread_Control *the_thread ) { 48a28: 4e56 0000 linkw %fp,#0 48a2c: 2f02 movel %d2,%sp@- 48a2e: 242e 0008 movel %fp@(8),%d2 _Scheduler_simple_Extract(the_thread); 48a32: 2f02 movel %d2,%sp@- 48a34: 4eb9 0004 8a8c jsr 48a8c <_Scheduler_simple_Extract> if ( _Thread_Is_heir( the_thread ) ) 48a3a: 588f addql #4,%sp 48a3c: b4b9 0006 1c2e cmpl 61c2e <_Per_CPU_Information+0x10>,%d2 48a42: 6720 beqs 48a64 <_Scheduler_simple_Block+0x3c> _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) 48a44: b4b9 0006 1c2a cmpl 61c2a <_Per_CPU_Information+0xc>,%d2 48a4a: 6708 beqs 48a54 <_Scheduler_simple_Block+0x2c> <== NEVER TAKEN _Thread_Dispatch_necessary = true; } 48a4c: 242e fffc movel %fp@(-4),%d2 48a50: 4e5e unlk %fp 48a52: 4e75 rts 48a54: 242e fffc movel %fp@(-4),%d2 48a58: 4e5e unlk %fp if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); if ( _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 48a5a: 7001 moveq #1,%d0 48a5c: 13c0 0006 1c36 moveb %d0,61c36 <_Per_CPU_Information+0x18> } 48a62: 4e75 rts ) { _Scheduler_simple_Extract(the_thread); if ( _Thread_Is_heir( the_thread ) ) _Scheduler_simple_Schedule(); 48a64: 4eb9 0004 8b74 jsr 48b74 <_Scheduler_simple_Schedule> if ( _Thread_Is_executing( the_thread ) ) 48a6a: b4b9 0006 1c2a cmpl 61c2a <_Per_CPU_Information+0xc>,%d2 48a70: 66da bnes 48a4c <_Scheduler_simple_Block+0x24> <== NEVER TAKEN 48a72: 60e0 bras 48a54 <_Scheduler_simple_Block+0x2c> =============================================================================== 00048ae8 <_Scheduler_simple_Ready_queue_Enqueue_first>: #include void _Scheduler_simple_Ready_queue_Enqueue_first( Thread_Control *the_thread ) { 48ae8: 4e56 0000 linkw %fp,#0 48aec: 226e 0008 moveal %fp@(8),%a1 } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 48af0: 2079 0005 fd90 moveal 5fd90 <_Scheduler>,%a0 #include void _Scheduler_simple_Ready_queue_Enqueue_first( Thread_Control *the_thread ) { 48af6: 2f0a movel %a2,%sp@- */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 48af8: 2029 0014 movel %a1@(20),%d0 } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 48afc: 2050 moveal %a0@,%a0 */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 48afe: b0a8 0014 cmpl %a0@(20),%d0 48b02: 6308 blss 48b0c <_Scheduler_simple_Ready_queue_Enqueue_first+0x24> * Do NOT need to check for end of chain because there is always * at least one task on the ready chain -- the IDLE task. It can * never block, should never attempt to obtain a semaphore or mutex, * and thus will always be there. */ for ( the_node = _Chain_First(ready) ; ; the_node = the_node->next ) { 48b04: 2050 moveal %a0@,%a0 current = (Thread_Control *) the_node; /* break when AT HEAD OF (or PAST) our priority */ if ( the_thread->current_priority <= current->current_priority ) { 48b06: b0a8 0014 cmpl %a0@(20),%d0 48b0a: 62f8 bhis 48b04 <_Scheduler_simple_Ready_queue_Enqueue_first+0x1c><== NEVER TAKEN current = (Thread_Control *)current->Object.Node.previous; 48b0c: 2068 0004 moveal %a0@(4),%a0 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 48b10: 2450 moveal %a0@,%a2 Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 48b12: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 48b16: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 48b18: 2549 0004 movel %a1,%a2@(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; 48b1c: 228a movel %a2,%a1@ } } /* enqueue */ _Chain_Insert_unprotected( (Chain_Node *)current, &the_thread->Object.Node ); } 48b1e: 245f moveal %sp@+,%a2 48b20: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049028 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 49028: 4e56 0000 linkw %fp,#0 4902c: 2039 0006 37a8 movel 637a8 <_Thread_Dispatch_disable_level>,%d0 49032: 5280 addql #1,%d0 49034: 2f0a movel %a2,%sp@- 49036: 246e 0008 moveal %fp@(8),%a2 4903a: 23c0 0006 37a8 movel %d0,637a8 <_Thread_Dispatch_disable_level> long seconds; _Thread_Disable_dispatch(); _TOD_Deactivate(); seconds = _TOD_Seconds_since_epoch(); 49040: 2039 0006 3832 movel 63832 <_TOD_Now>,%d0 if ( time->tv_sec < seconds ) 49046: 2212 movel %a2@,%d1 49048: b280 cmpl %d0,%d1 4904a: 6d38 blts 49084 <_TOD_Set+0x5c> Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 4904c: 9280 subl %d0,%d1 4904e: 2f01 movel %d1,%sp@- 49050: 42a7 clrl %sp@- 49052: 4879 0006 385c pea 6385c <_Watchdog_Seconds_chain> 49058: 4eb9 0004 b828 jsr 4b828 <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 4905e: 23d2 0006 3832 movel %a2@,63832 <_TOD_Now> 49064: 588a addql #4,%a2 49066: 4fef 000c lea %sp@(12),%sp 4906a: 23d2 0006 3836 movel %a2@,63836 <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 49070: 246e fffc moveal %fp@(-4),%a2 49074: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 49076: 7001 moveq #1,%d0 49078: 13c0 0006 37b8 moveb %d0,637b8 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 4907e: 4ef9 0004 a83e jmp 4a83e <_Thread_Enable_dispatch> 49084: 9081 subl %d1,%d0 49086: 2f00 movel %d0,%sp@- 49088: 4878 0001 pea 1 4908c: 4879 0006 385c pea 6385c <_Watchdog_Seconds_chain> 49092: 4eb9 0004 b828 jsr 4b828 <_Watchdog_Adjust> _Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec ); else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); 49098: 23d2 0006 3832 movel %a2@,63832 <_TOD_Now> 4909e: 588a addql #4,%a2 490a0: 4fef 000c lea %sp@(12),%sp 490a4: 23d2 0006 3836 movel %a2@,63836 <_TOD_Now+0x4> _TOD_Is_set = true; _TOD_Activate(); _Thread_Enable_dispatch(); } 490aa: 246e fffc moveal %fp@(-4),%a2 490ae: 4e5e unlk %fp else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds ); /* POSIX format TOD (timespec) */ _Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec ); _TOD_Is_set = true; 490b0: 7001 moveq #1,%d0 490b2: 13c0 0006 37b8 moveb %d0,637b8 <_TOD_Is_set> _TOD_Activate(); _Thread_Enable_dispatch(); 490b8: 4ef9 0004 a83e jmp 4a83e <_Thread_Enable_dispatch> ... =============================================================================== 000476b0 <_TOD_Validate>: */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 476b0: 4e56 0000 linkw %fp,#0 476b4: 206e 0008 moveal %fp@(8),%a0 uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); 476b8: 2039 0006 1ae0 movel 61ae0 ,%d0 */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { 476be: 2f02 movel %d2,%sp@- uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 476c0: 4a88 tstl %a0 476c2: 6762 beqs 47726 <_TOD_Validate+0x76> <== NEVER TAKEN ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / 476c4: 243c 000f 4240 movel #1000000,%d2 476ca: 4c40 2002 remul %d0,%d2,%d2 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || 476ce: b4a8 0018 cmpl %a0@(24),%d2 476d2: 6352 blss 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->ticks >= ticks_per_second) || 476d4: 703b moveq #59,%d0 476d6: b0a8 0014 cmpl %a0@(20),%d0 476da: 654a bcss 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->second >= TOD_SECONDS_PER_MINUTE) || 476dc: b0a8 0010 cmpl %a0@(16),%d0 476e0: 6544 bcss 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->minute >= TOD_MINUTES_PER_HOUR) || 476e2: 7217 moveq #23,%d1 476e4: b2a8 000c cmpl %a0@(12),%d1 476e8: 653c bcss 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || 476ea: 2028 0004 movel %a0@(4),%d0 rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || 476ee: 6736 beqs 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month == 0) || 476f0: 740c moveq #12,%d2 476f2: b480 cmpl %d0,%d2 476f4: 6530 bcss 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 476f6: 2210 movel %a0@,%d1 (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || 476f8: 0c81 0000 07c3 cmpil #1987,%d1 476fe: 6326 blss 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) 47700: 2068 0008 moveal %a0@(8),%a0 (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || 47704: 4a88 tstl %a0 47706: 671e beqs 47726 <_TOD_Validate+0x76> <== NEVER TAKEN (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) 47708: 143c 0003 moveb #3,%d2 4770c: c282 andl %d2,%d1 4770e: 661e bnes 4772e <_TOD_Validate+0x7e> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; 47710: 43f9 0006 0a96 lea 60a96 <_TOD_Days_per_month>,%a1 47716: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 4771a: b1c0 cmpal %d0,%a0 4771c: 53c0 sls %d0 4771e: 4480 negl %d0 if ( the_tod->day > days_in_month ) return false; return true; } 47720: 241f movel %sp@+,%d2 47722: 4e5e unlk %fp 47724: 4e75 rts 47726: 241f movel %sp@+,%d2 47728: 4e5e unlk %fp (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; 4772a: 4200 clrb %d0 if ( the_tod->day > days_in_month ) return false; return true; } 4772c: 4e75 rts return false; if ( (the_tod->year % 4) == 0 ) days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; 4772e: 43f9 0006 0a96 lea 60a96 <_TOD_Days_per_month>,%a1 47734: 2031 0c00 movel %a1@(00000000,%d0:l:4),%d0 * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( 47738: b1c0 cmpal %d0,%a0 4773a: 53c0 sls %d0 4773c: 4480 negl %d0 4773e: 60e0 bras 47720 <_TOD_Validate+0x70> =============================================================================== 000488d8 <_Thread_Change_priority>: void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 488d8: 4e56 fff0 linkw %fp,#-16 488dc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 488e0: 246e 0008 moveal %fp@(8),%a2 States_Control state, original_state; /* * Save original state */ original_state = the_thread->current_state; 488e4: 262a 0010 movel %a2@(16),%d3 void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 488e8: 242e 000c movel %fp@(12),%d2 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 488ec: 2f0a movel %a2,%sp@- void _Thread_Change_priority( Thread_Control *the_thread, Priority_Control new_priority, bool prepend_it ) { 488ee: 182e 0013 moveb %fp@(19),%d4 /* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread ); 488f2: 4eb9 0004 96f0 jsr 496f0 <_Thread_Set_transient> /* * Do not bother recomputing all the priority related information if * we are not REALLY changing priority. */ if ( the_thread->current_priority != new_priority ) 488f8: 588f addql #4,%sp 488fa: b4aa 0014 cmpl %a2@(20),%d2 488fe: 670c beqs 4890c <_Thread_Change_priority+0x34> _Thread_Set_priority( the_thread, new_priority ); 48900: 2f02 movel %d2,%sp@- 48902: 2f0a movel %a2,%sp@- 48904: 4eb9 0004 968c jsr 4968c <_Thread_Set_priority> 4890a: 508f addql #8,%sp _ISR_Disable( level ); 4890c: 203c 0000 0700 movel #1792,%d0 48912: 40c2 movew %sr,%d2 48914: 8082 orl %d2,%d0 48916: 46c0 movew %d0,%sr /* * If the thread has more than STATES_TRANSIENT set, then it is blocked, * If it is blocked on a thread queue, then we need to requeue it. */ state = the_thread->current_state; 48918: 202a 0010 movel %a2@(16),%d0 if ( state != STATES_TRANSIENT ) { 4891c: 7204 moveq #4,%d1 4891e: b280 cmpl %d0,%d1 48920: 6738 beqs 4895a <_Thread_Change_priority+0x82> /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) 48922: 44c3 movew %d3,%ccr 48924: 6708 beqs 4892e <_Thread_Change_priority+0x56> <== NEVER TAKEN RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 48926: 72fb moveq #-5,%d1 48928: c280 andl %d0,%d1 4892a: 2541 0010 movel %d1,%a2@(16) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); 4892e: 46c2 movew %d2,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 48930: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( state ) ) { 48936: 660a bnes 48942 <_Thread_Change_priority+0x6a> if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 48938: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4893e: 4e5e unlk %fp 48940: 4e75 rts /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 48942: 2d4a 000c movel %a2,%fp@(12) 48946: 2d6a 0044 0008 movel %a2@(68),%fp@(8) if ( !_Thread_Is_executing_also_the_heir() && _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; _ISR_Enable( level ); } 4894c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48952: 4e5e unlk %fp /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); _ISR_Enable( level ); if ( _States_Is_waiting_on_thread_queue( state ) ) { _Thread_queue_Requeue( the_thread->Wait.queue, the_thread ); 48954: 4ef9 0004 95e0 jmp 495e0 <_Thread_queue_Requeue> } return; } /* Only clear the transient state if it wasn't set already */ if ( ! _States_Is_transient( original_state ) ) { 4895a: 44c3 movew %d3,%ccr 4895c: 6714 beqs 48972 <_Thread_Change_priority+0x9a> <== NEVER TAKEN * Interrupts are STILL disabled. * We now know the thread will be in the READY state when we remove * the TRANSIENT state. So we have to place it on the appropriate * Ready Queue with interrupts off. */ the_thread->current_state = _States_Clear( STATES_TRANSIENT, state ); 4895e: 42aa 0010 clrl %a2@(16) if ( prepend_it ) 48962: 4a04 tstb %d4 48964: 6748 beqs 489ae <_Thread_Change_priority+0xd6> */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue_first( the_thread ); 48966: 2f0a movel %a2,%sp@- 48968: 2079 0005 f2c8 moveal 5f2c8 <_Scheduler+0x28>,%a0 4896e: 4e90 jsr %a0@ 48970: 588f addql #4,%sp _Scheduler_Enqueue_first( the_thread ); else _Scheduler_Enqueue( the_thread ); } _ISR_Flash( level ); 48972: 203c 0000 0700 movel #1792,%d0 48978: 46c2 movew %d2,%sr 4897a: 8082 orl %d2,%d0 4897c: 46c0 movew %d0,%sr * This kernel routine implements the scheduling decision logic for * the scheduler. It does NOT dispatch. */ RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) { _Scheduler.Operations.schedule(); 4897e: 2079 0005 f2a8 moveal 5f2a8 <_Scheduler+0x8>,%a0 48984: 4e90 jsr %a0@ * is also the heir thread, and false otherwise. */ RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void ) { return ( _Thread_Executing == _Thread_Heir ); 48986: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 * We altered the set of thread priorities. So let's figure out * who is the heir and if we need to switch to them. */ _Scheduler_Schedule(); if ( !_Thread_Is_executing_also_the_heir() && 4898c: b1f9 0006 10d6 cmpal 610d6 <_Per_CPU_Information+0x10>,%a0 48992: 670e beqs 489a2 <_Thread_Change_priority+0xca> 48994: 4a28 0074 tstb %a0@(116) 48998: 6708 beqs 489a2 <_Thread_Change_priority+0xca> _Thread_Executing->is_preemptible ) _Thread_Dispatch_necessary = true; 4899a: 7001 moveq #1,%d0 4899c: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> _ISR_Enable( level ); 489a2: 46c2 movew %d2,%sr } 489a4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 489aa: 4e5e unlk %fp 489ac: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( Thread_Control *the_thread ) { _Scheduler.Operations.enqueue( the_thread ); 489ae: 2f0a movel %a2,%sp@- 489b0: 2079 0005 f2c4 moveal 5f2c4 <_Scheduler+0x24>,%a0 489b6: 4e90 jsr %a0@ 489b8: 588f addql #4,%sp 489ba: 60b6 bras 48972 <_Thread_Change_priority+0x9a> =============================================================================== 00048a18 <_Thread_Close>: RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 48a18: 4280 clrl %d0 void _Thread_Close( Objects_Information *information, Thread_Control *the_thread ) { 48a1a: 4e56 0000 linkw %fp,#0 48a1e: 2f0b movel %a3,%sp@- 48a20: 266e 0008 moveal %fp@(8),%a3 48a24: 2f0a movel %a2,%sp@- 48a26: 246e 000c moveal %fp@(12),%a2 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48a2a: 206b 0018 moveal %a3@(24),%a0 RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id( Objects_Information *information, Objects_Control *the_object ) { _Objects_Set_local_object( 48a2e: 302a 000a movew %a2@(10),%d0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48a32: 42b0 0c00 clrl %a0@(00000000,%d0:l:4) */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 48a36: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 48a3c: 5380 subql #1,%d0 * disappear and set a transient state on it. So we temporarily * unnest dispatching. */ _Thread_Unnest_dispatch(); _User_extensions_Thread_delete( the_thread ); 48a3e: 2f0a movel %a2,%sp@- 48a40: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> 48a46: 4eb9 0004 9b80 jsr 49b80 <_User_extensions_Thread_delete> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 48a4c: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 48a52: 5280 addql #1,%d0 48a54: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> /* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object ); 48a5a: 2f0a movel %a2,%sp@- 48a5c: 2f0b movel %a3,%sp@- 48a5e: 4eb9 0004 7c70 jsr 47c70 <_Objects_Close> /* * By setting the dormant state, the thread will not be considered * for scheduling when we remove any blocking states. */ _Thread_Set_state( the_thread, STATES_DORMANT ); 48a64: 4878 0001 pea 1 48a68: 2f0a movel %a2,%sp@- 48a6a: 4eb9 0004 96a4 jsr 496a4 <_Thread_Set_state> if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 48a70: 2f0a movel %a2,%sp@- 48a72: 4eb9 0004 94dc jsr 494dc <_Thread_queue_Extract_with_proxy> 48a78: 4fef 0018 lea %sp@(24),%sp 48a7c: 4a00 tstb %d0 48a7e: 660a bnes 48a8a <_Thread_Close+0x72> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 48a80: 7002 moveq #2,%d0 48a82: b0aa 0050 cmpl %a2@(80),%d0 48a86: 6700 0088 beqw 48b10 <_Thread_Close+0xf8> */ RTEMS_INLINE_ROUTINE void _Scheduler_Free( Thread_Control *the_thread ) { return _Scheduler.Operations.free( the_thread ); 48a8a: 2f0a movel %a2,%sp@- 48a8c: 2079 0005 f2bc moveal 5f2bc <_Scheduler+0x1c>,%a0 48a92: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 48a94: 588f addql #4,%sp 48a96: b5f9 0006 0cea cmpal 60cea <_Thread_Allocated_fp>,%a2 48a9c: 6736 beqs 48ad4 <_Thread_Close+0xbc> _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48a9e: 2f2a 00ba movel %a2@(186),%sp@- 48aa2: 47f9 0004 9f3e lea 49f3e <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 48aa8: 42aa 00f6 clrl %a2@(246) _Workspace_Free( the_thread->Start.fp_context ); 48aac: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48aae: 2f0a movel %a2,%sp@- 48ab0: 4eb9 0004 979c jsr 4979c <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48ab6: 2f2a 0106 movel %a2@(262),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 48aba: 42aa 00be clrl %a2@(190) _Workspace_Free( the_thread->extensions ); 48abe: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48ac0: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48ac4: 4fef 000c lea %sp@(12),%sp 48ac8: 42aa 0106 clrl %a2@(262) } 48acc: 246e fff8 moveal %fp@(-8),%a2 48ad0: 4e5e unlk %fp 48ad2: 4e75 rts if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; _Workspace_Free( the_thread->Start.fp_context ); 48ad4: 2f2a 00ba movel %a2@(186),%sp@- 48ad8: 47f9 0004 9f3e lea 49f3e <_Workspace_Free>,%a3 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) _Thread_Deallocate_fp(); #endif the_thread->fp_context = NULL; 48ade: 42aa 00f6 clrl %a2@(246) */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void ) { _Thread_Allocated_fp = NULL; 48ae2: 42b9 0006 0cea clrl 60cea <_Thread_Allocated_fp> _Workspace_Free( the_thread->Start.fp_context ); 48ae8: 4e93 jsr %a3@ /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); 48aea: 2f0a movel %a2,%sp@- 48aec: 4eb9 0004 979c jsr 4979c <_Thread_Stack_Free> the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); 48af2: 2f2a 0106 movel %a2@(262),%sp@- /* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; 48af6: 42aa 00be clrl %a2@(190) _Workspace_Free( the_thread->extensions ); 48afa: 4e93 jsr %a3@ the_thread->extensions = NULL; } 48afc: 266e fffc moveal %fp@(-4),%a3 */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL; _Workspace_Free( the_thread->extensions ); the_thread->extensions = NULL; 48b00: 4fef 000c lea %sp@(12),%sp 48b04: 42aa 0106 clrl %a2@(262) } 48b08: 246e fff8 moveal %fp@(-8),%a2 48b0c: 4e5e unlk %fp 48b0e: 4e75 rts */ _Thread_Set_state( the_thread, STATES_DORMANT ); if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 48b10: 486a 0048 pea %a2@(72) 48b14: 4eb9 0004 9da0 jsr 49da0 <_Watchdog_Remove> 48b1a: 588f addql #4,%sp 48b1c: 2079 0005 f2bc moveal 5f2bc <_Scheduler+0x1c>,%a0 48b22: 2f0a movel %a2,%sp@- 48b24: 4e90 jsr %a0@ /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) ) 48b26: 588f addql #4,%sp 48b28: b5f9 0006 0cea cmpal 60cea <_Thread_Allocated_fp>,%a2 48b2e: 6600 ff6e bnew 48a9e <_Thread_Close+0x86> 48b32: 60a0 bras 48ad4 <_Thread_Close+0xbc> <== NOT EXECUTED =============================================================================== 00048be4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored __attribute__((unused)) ) { 48be4: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 48be8: 486e fffc pea %fp@(-4) 48bec: 2f2e 0008 movel %fp@(8),%sp@- 48bf0: 4eb9 0004 8db0 jsr 48db0 <_Thread_Get> switch ( location ) { 48bf6: 508f addql #8,%sp 48bf8: 4aae fffc tstl %fp@(-4) 48bfc: 661e bnes 48c1c <_Thread_Delay_ended+0x38> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_Clear_state( 48bfe: 2f3c 1000 0018 movel #268435480,%sp@- 48c04: 2f00 movel %d0,%sp@- 48c06: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> 48c0c: 508f addql #8,%sp 48c0e: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 48c14: 5380 subql #1,%d0 48c16: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Thread_Unnest_dispatch(); break; } } 48c1c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048c20 <_Thread_Dispatch>: * dispatch thread * no dispatch thread */ void _Thread_Dispatch( void ) { 48c20: 4e56 ffc8 linkw %fp,#-56 48c24: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); 48c28: 283c 0000 0700 movel #1792,%d4 48c2e: 2004 movel %d4,%d0 { Thread_Control *executing; Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; 48c30: 2479 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 48c36: 40c1 movew %sr,%d1 48c38: 8081 orl %d1,%d0 48c3a: 46c0 movew %d0,%sr while ( _Thread_Dispatch_necessary == true ) { 48c3c: 1039 0006 10de moveb 610de <_Per_CPU_Information+0x18>,%d0 48c42: 6700 0120 beqw 48d64 <_Thread_Dispatch+0x144> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 48c46: 7001 moveq #1,%d0 48c48: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 48c4e: 2679 0006 10d6 moveal 610d6 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; 48c54: 4200 clrb %d0 _Thread_Executing = heir; 48c56: 23cb 0006 10d2 movel %a3,610d2 <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; 48c5c: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 48c62: b7ca cmpal %a2,%a3 48c64: 6700 00fe beqw 48d64 <_Thread_Dispatch+0x144> 48c68: 260e movel %fp,%d3 48c6a: 240e movel %fp,%d2 48c6c: 5183 subql #8,%d3 48c6e: 2e3c 0004 c960 movel #313696,%d7 48c74: 0682 ffff fff0 addil #-16,%d2 48c7a: 2c3c 0004 9944 movel #301380,%d6 48c80: 2a3c 0004 98fc movel #301308,%d5 48c86: 4bf9 0004 9c0c lea 49c0c <_User_extensions_Thread_switch>,%a5 48c8c: 49f9 0004 9f8c lea 49f8c <_CPU_Context_switch>,%a4 */ #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) 48c92: 7001 moveq #1,%d0 48c94: b0ab 007a cmpl %a3@(122),%d0 48c98: 6700 00e2 beqw 48d7c <_Thread_Dispatch+0x15c> heir->cpu_time_budget = _Thread_Ticks_per_timeslice; _ISR_Enable( level ); 48c9c: 46c1 movew %d1,%sr #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ { Timestamp_Control uptime, ran; _TOD_Get_uptime( &uptime ); 48c9e: 2f03 movel %d3,%sp@- 48ca0: 2047 moveal %d7,%a0 48ca2: 4e90 jsr %a0@ _Timestamp_Subtract( 48ca4: 2046 moveal %d6,%a0 48ca6: 2f02 movel %d2,%sp@- 48ca8: 2f03 movel %d3,%sp@- 48caa: 4879 0006 0d14 pea 60d14 <_Thread_Time_of_last_context_switch> 48cb0: 4e90 jsr %a0@ &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); 48cb2: 2045 moveal %d5,%a0 48cb4: 2f02 movel %d2,%sp@- 48cb6: 486a 0082 pea %a2@(130) 48cba: 4e90 jsr %a0@ #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 48cbc: 2079 0006 0cee moveal 60cee <_Thread_libc_reent>,%a0 48cc2: 4fef 0018 lea %sp@(24),%sp &_Thread_Time_of_last_context_switch, &uptime, &ran ); _Timestamp_Add_to( &executing->cpu_time_used, &ran ); _Thread_Time_of_last_context_switch = uptime; 48cc6: 202e fff8 movel %fp@(-8),%d0 48cca: 222e fffc movel %fp@(-4),%d1 48cce: 23c0 0006 0d14 movel %d0,60d14 <_Thread_Time_of_last_context_switch> 48cd4: 23c1 0006 0d18 movel %d1,60d18 <_Thread_Time_of_last_context_switch+0x4> #endif /* * Switch libc's task specific data. */ if ( _Thread_libc_reent ) { 48cda: 4a88 tstl %a0 48cdc: 6708 beqs 48ce6 <_Thread_Dispatch+0xc6> <== NEVER TAKEN executing->libc_reent = *_Thread_libc_reent; 48cde: 2550 00fa movel %a0@,%a2@(250) *_Thread_libc_reent = heir->libc_reent; 48ce2: 20ab 00fa movel %a3@(250),%a0@ } _User_extensions_Thread_switch( executing, heir ); 48ce6: 2f0b movel %a3,%sp@- 48ce8: 2f0a movel %a2,%sp@- 48cea: 4e95 jsr %a5@ if ( executing->fp_context != NULL ) _Context_Save_fp( &executing->fp_context ); #endif #endif _Context_Switch( &executing->Registers, &heir->Registers ); 48cec: 486b 00c2 pea %a3@(194) 48cf0: 486a 00c2 pea %a2@(194) 48cf4: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 48cf6: 4fef 0010 lea %sp@(16),%sp 48cfa: 4aaa 00f6 tstl %a2@(246) 48cfe: 672c beqs 48d2c <_Thread_Dispatch+0x10c> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 48d00: 2079 0006 0cea moveal 60cea <_Thread_Allocated_fp>,%a0 48d06: b1ca cmpal %a2,%a0 48d08: 6722 beqs 48d2c <_Thread_Dispatch+0x10c> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 48d0a: 4a88 tstl %a0 48d0c: 670c beqs 48d1a <_Thread_Dispatch+0xfa> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 48d0e: 4868 00f6 pea %a0@(246) 48d12: 4eb9 0004 a0b2 jsr 4a0b2 <_CPU_Context_save_fp> 48d18: 588f addql #4,%sp _Context_Restore_fp( &executing->fp_context ); 48d1a: 486a 00f6 pea %a2@(246) 48d1e: 4eb9 0004 a0ea jsr 4a0ea <_CPU_Context_restore_fp> _Thread_Allocated_fp = executing; 48d24: 588f addql #4,%sp 48d26: 23ca 0006 0cea movel %a2,60cea <_Thread_Allocated_fp> if ( executing->fp_context != NULL ) _Context_Restore_fp( &executing->fp_context ); #endif #endif executing = _Thread_Executing; 48d2c: 2479 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a2 _ISR_Disable( level ); 48d32: 2004 movel %d4,%d0 48d34: 40c1 movew %sr,%d1 48d36: 8081 orl %d1,%d0 48d38: 46c0 movew %d0,%sr Thread_Control *heir; ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { 48d3a: 1039 0006 10de moveb 610de <_Per_CPU_Information+0x18>,%d0 48d40: 6722 beqs 48d64 <_Thread_Dispatch+0x144> heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; 48d42: 7001 moveq #1,%d0 48d44: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> ISR_Level level; executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; 48d4a: 2679 0006 10d6 moveal 610d6 <_Per_CPU_Information+0x10>,%a3 _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; 48d50: 4200 clrb %d0 _Thread_Executing = heir; 48d52: 23cb 0006 10d2 movel %a3,610d2 <_Per_CPU_Information+0xc> executing = _Thread_Executing; _ISR_Disable( level ); while ( _Thread_Dispatch_necessary == true ) { heir = _Thread_Heir; _Thread_Dispatch_disable_level = 1; _Thread_Dispatch_necessary = false; 48d58: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> /* * When the heir and executing are the same, then we are being * requested to do the post switch dispatching. This is normally * done to dispatch signals. */ if ( heir == executing ) 48d5e: b5cb cmpal %a3,%a2 48d60: 6600 ff30 bnew 48c92 <_Thread_Dispatch+0x72> _ISR_Disable( level ); } post_switch: _Thread_Dispatch_disable_level = 0; 48d64: 42b9 0006 0c68 clrl 60c68 <_Thread_Dispatch_disable_level> _ISR_Enable( level ); 48d6a: 46c1 movew %d1,%sr _API_extensions_Run_postswitch(); 48d6c: 4eb9 0004 70ae jsr 470ae <_API_extensions_Run_postswitch> } 48d72: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 48d78: 4e5e unlk %fp 48d7a: 4e75 rts #if __RTEMS_ADA__ executing->rtems_ada_self = rtems_ada_self; rtems_ada_self = heir->rtems_ada_self; #endif if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE ) heir->cpu_time_budget = _Thread_Ticks_per_timeslice; 48d7c: 41f9 0006 0c20 lea 60c20 <_Thread_Ticks_per_timeslice>,%a0 48d82: 2750 0076 movel %a0@,%a3@(118) 48d86: 6000 ff14 braw 48c9c <_Thread_Dispatch+0x7c> =============================================================================== 0004e974 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e974: 4e56 0000 linkw %fp,#0 4e978: 2f0a movel %a2,%sp@- #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) static char doneConstructors; char doneCons; #endif executing = _Thread_Executing; 4e97a: 2479 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a2 * * Output parameters: NONE */ void _Thread_Handler( void ) { 4e980: 2f02 movel %d2,%sp@- /* * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; 4e982: 222a 00a8 movel %a2@(168),%d1 _ISR_Set_level(level); 4e986: 40c0 movew %sr,%d0 4e988: e189 lsll #8,%d1 4e98a: 0280 0000 f8ff andil #63743,%d0 4e990: 8081 orl %d1,%d0 4e992: 46c0 movew %d0,%sr #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; doneConstructors = 1; 4e994: 7001 moveq #1,%d0 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(EXECUTE_GLOBAL_CONSTRUCTORS) doneCons = doneConstructors; 4e996: 1439 0006 0428 moveb 60428 ,%d2 doneConstructors = 1; 4e99c: 13c0 0006 0428 moveb %d0,60428 #endif #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( (executing->fp_context != NULL) && 4e9a2: 4aaa 00f6 tstl %a2@(246) 4e9a6: 6720 beqs 4e9c8 <_Thread_Handler+0x54> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Allocated_fp ); 4e9a8: 2079 0006 0cea moveal 60cea <_Thread_Allocated_fp>,%a0 4e9ae: b1ca cmpal %a2,%a0 4e9b0: 6716 beqs 4e9c8 <_Thread_Handler+0x54> !_Thread_Is_allocated_fp( executing ) ) { if ( _Thread_Allocated_fp != NULL ) 4e9b2: 4a88 tstl %a0 4e9b4: 670c beqs 4e9c2 <_Thread_Handler+0x4e> _Context_Save_fp( &_Thread_Allocated_fp->fp_context ); 4e9b6: 4868 00f6 pea %a0@(246) 4e9ba: 4eb9 0004 a0b2 jsr 4a0b2 <_CPU_Context_save_fp> 4e9c0: 588f addql #4,%sp _Thread_Allocated_fp = executing; 4e9c2: 23ca 0006 0cea movel %a2,60cea <_Thread_Allocated_fp> /* * 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 ); 4e9c8: 2f0a movel %a2,%sp@- 4e9ca: 4eb9 0004 9a58 jsr 49a58 <_User_extensions_Thread_begin> /* * At this point, the dispatch disable level BETTER be 1. */ _Thread_Enable_dispatch(); 4e9d0: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> /* * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ { 4e9d6: 588f addql #4,%sp 4e9d8: 4a02 tstb %d2 4e9da: 6724 beqs 4ea00 <_Thread_Handler+0x8c> INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4e9dc: 202a 0092 movel %a2@(146),%d0 4e9e0: 672a beqs 4ea0c <_Thread_Handler+0x98> (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { 4e9e2: 7201 moveq #1,%d1 4e9e4: b280 cmpl %d0,%d1 4e9e6: 674c beqs 4ea34 <_Thread_Handler+0xc0> <== ALWAYS TAKEN * was placed in return_argument. This assumed that if it returned * anything (which is not supporting in all APIs), then it would be * able to fit in a (void *). */ _User_extensions_Thread_exitted( executing ); 4e9e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e9ea: 4eb9 0004 9a96 jsr 49a96 <_User_extensions_Thread_exitted> <== NOT EXECUTED _Internal_error_Occurred( 4e9f0: 4878 0005 pea 5 <== NOT EXECUTED 4e9f4: 4878 0001 pea 1 <== NOT EXECUTED 4e9f8: 42a7 clrl %sp@- <== NOT EXECUTED 4e9fa: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> <== 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_NAME (); 4ea00: 4eb9 0005 d538 jsr 5d538 <_init> } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { 4ea06: 202a 0092 movel %a2@(146),%d0 4ea0a: 66d6 bnes 4e9e2 <_Thread_Handler+0x6e> executing->Wait.return_argument = (*(Thread_Entry_numeric) executing->Start.entry_point)( 4ea0c: 2f2a 009a movel %a2@(154),%sp@- 4ea10: 206a 008e moveal %a2@(142),%a0 4ea14: 4e90 jsr %a0@ INIT_NAME (); } #endif if ( executing->Start.prototype == THREAD_START_NUMERIC ) { executing->Wait.return_argument = 4ea16: 588f addql #4,%sp 4ea18: 2540 0028 movel %d0,%a2@(40) * 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 ); 4ea1c: 2f0a movel %a2,%sp@- 4ea1e: 4eb9 0004 9a96 jsr 49a96 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4ea24: 4878 0005 pea 5 4ea28: 4878 0001 pea 1 4ea2c: 42a7 clrl %sp@- 4ea2e: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = (*(Thread_Entry_pointer) executing->Start.entry_point)( 4ea34: 2f2a 0096 movel %a2@(150),%sp@- 4ea38: 206a 008e moveal %a2@(142),%a0 4ea3c: 4e90 jsr %a0@ executing->Start.numeric_argument ); } #if defined(RTEMS_POSIX_API) else if ( executing->Start.prototype == THREAD_START_POINTER ) { executing->Wait.return_argument = 4ea3e: 588f addql #4,%sp 4ea40: 2540 0028 movel %d0,%a2@(40) * 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 ); 4ea44: 2f0a movel %a2,%sp@- 4ea46: 4eb9 0004 9a96 jsr 49a96 <_User_extensions_Thread_exitted> _Internal_error_Occurred( 4ea4c: 4878 0005 pea 5 <== NOT EXECUTED 4ea50: 4878 0001 pea 1 <== NOT EXECUTED 4ea54: 42a7 clrl %sp@- <== NOT EXECUTED 4ea56: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> <== NOT EXECUTED =============================================================================== 0004908c <_Thread_Handler_initialization>: * * Output parameters: NONE */ void _Thread_Handler_initialization(void) { 4908c: 4e56 0000 linkw %fp,#0 /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) 49090: 4ab9 0005 f398 tstl 5f398 49096: 57c1 seq %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 49098: 4ab9 0005 f394 tstl 5f394 4909e: 57c0 seq %d0 == (!Configuration.stack_free_hook) ) ) 490a0: 4481 negl %d1 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 490a2: 4480 negl %d0 490a4: b380 eorl %d1,%d0 uint32_t maximum_internal_threads; #if defined(RTEMS_MULTIPROCESSING) uint32_t maximum_proxies; #endif ticks_per_timeslice = Configuration.ticks_per_timeslice; 490a6: 2239 0005 f384 movel 5f384 ,%d1 maximum_extensions = Configuration.maximum_extensions; 490ac: 2079 0005 f37c moveal 5f37c ,%a0 #endif /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) 490b2: 4a00 tstb %d0 490b4: 6650 bnes 49106 <_Thread_Handler_initialization+0x7a> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 490b6: 4878 0008 pea 8 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 490ba: 4200 clrb %d0 #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 490bc: 42a7 clrl %sp@- 490be: 4878 010e pea 10e 490c2: 4878 0001 pea 1 490c6: 4878 0001 pea 1 490ca: 4878 0001 pea 1 490ce: 4879 0006 0d7a pea 60d7a <_Thread_Internal_information> INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_BAD_STACK_HOOK ); _Thread_Dispatch_necessary = false; 490d4: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> _Thread_Executing = NULL; 490da: 42b9 0006 10d2 clrl 610d2 <_Per_CPU_Information+0xc> _Thread_Heir = NULL; 490e0: 42b9 0006 10d6 clrl 610d6 <_Per_CPU_Information+0x10> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; 490e6: 42b9 0006 0cea clrl 60cea <_Thread_Allocated_fp> #endif _Thread_Maximum_extensions = maximum_extensions; 490ec: 23c8 0006 0cfa movel %a0,60cfa <_Thread_Maximum_extensions> _Thread_Ticks_per_timeslice = ticks_per_timeslice; 490f2: 23c1 0006 0c20 movel %d1,60c20 <_Thread_Ticks_per_timeslice> #if defined(RTEMS_MULTIPROCESSING) if ( _System_state_Is_multiprocessing ) maximum_internal_threads += 1; #endif _Objects_Initialize_information( 490f8: 4eb9 0004 8104 jsr 48104 <_Objects_Initialize_information> 490fe: 4fef 001c lea %sp@(28),%sp false, /* true if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 49102: 4e5e unlk %fp 49104: 4e75 rts * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( (!Configuration.stack_allocate_hook) == (!Configuration.stack_free_hook) ) ) _Internal_error_Occurred( 49106: 4878 000e pea e 4910a: 4878 0001 pea 1 4910e: 42a7 clrl %sp@- 49110: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> ... =============================================================================== 00048e4c <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 48e4c: 4e56 ffe0 linkw %fp,#-32 48e50: 202e 0010 movel %fp@(16),%d0 48e54: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 48e58: 246e 000c moveal %fp@(12),%a2 48e5c: 282e 0014 movel %fp@(20),%d4 48e60: 242e 001c movel %fp@(28),%d2 48e64: 262e 0024 movel %fp@(36),%d3 48e68: 1a2e 001b moveb %fp@(27),%d5 48e6c: 1c2e 0023 moveb %fp@(35),%d6 /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; 48e70: 42aa 00fe clrl %a2@(254) 48e74: 42aa 0102 clrl %a2@(258) extensions_area = NULL; the_thread->libc_reent = NULL; 48e78: 42aa 00fa clrl %a2@(250) if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { 48e7c: 4a80 tstl %d0 48e7e: 6700 01a4 beqw 49024 <_Thread_Initialize+0x1d8> 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; 48e82: 2204 movel %d4,%d1 48e84: 4204 clrb %d4 48e86: 1544 00b0 moveb %d4,%a2@(176) Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 48e8a: 2540 00b6 movel %d0,%a2@(182) the_stack->size = size; 48e8e: 2541 00b2 movel %d1,%a2@(178) /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { 48e92: 4a05 tstb %d5 48e94: 6600 0102 bnew 48f98 <_Thread_Initialize+0x14c> 48e98: 4280 clrl %d0 extensions_area = NULL; the_thread->libc_reent = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) fp_area = NULL; 48e9a: 4284 clrl %d4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 48e9c: 2239 0006 0cfa movel 60cfa <_Thread_Maximum_extensions>,%d1 fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); if ( !fp_area ) goto failed; fp_area = _Context_Fp_start( fp_area, 0 ); } the_thread->fp_context = fp_area; 48ea2: 2540 00f6 movel %d0,%a2@(246) the_thread->Start.fp_context = fp_area; 48ea6: 2540 00ba movel %d0,%a2@(186) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 48eaa: 42aa 0050 clrl %a2@(80) the_watchdog->routine = routine; 48eae: 42aa 0064 clrl %a2@(100) the_watchdog->id = id; 48eb2: 42aa 0068 clrl %a2@(104) the_watchdog->user_data = user_data; 48eb6: 42aa 006c clrl %a2@(108) #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 48eba: 4a81 tstl %d1 48ebc: 6600 0124 bnew 48fe2 <_Thread_Initialize+0x196> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 48ec0: 42aa 0106 clrl %a2@(262) * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 48ec4: 97cb subal %a3,%a3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; 48ec6: 2543 00a0 movel %d3,%a2@(160) the_thread->Start.budget_callout = budget_callout; switch ( budget_algorithm ) { 48eca: 7002 moveq #2,%d0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 48ecc: 1546 009e moveb %d6,%a2@(158) the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 48ed0: 256e 0028 00a4 movel %fp@(40),%a2@(164) switch ( budget_algorithm ) { 48ed6: b083 cmpl %d3,%d0 48ed8: 6700 00a4 beqw 48f7e <_Thread_Initialize+0x132> #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 48edc: 7001 moveq #1,%d0 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; 48ede: 256e 002c 00a8 movel %fp@(44),%a2@(168) */ RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( Thread_Control *the_thread ) { return _Scheduler.Operations.allocate( the_thread ); 48ee4: 2079 0005 f2b8 moveal 5f2b8 <_Scheduler+0x18>,%a0 the_thread->current_state = STATES_DORMANT; 48eea: 2540 0010 movel %d0,%a2@(16) the_thread->Wait.queue = NULL; 48eee: 42aa 0044 clrl %a2@(68) the_thread->resource_count = 0; 48ef2: 42aa 001c clrl %a2@(28) the_thread->real_priority = priority; 48ef6: 2542 0018 movel %d2,%a2@(24) the_thread->Start.initial_priority = priority; 48efa: 2542 00ac movel %d2,%a2@(172) 48efe: 2f0a movel %a2,%sp@- 48f00: 4e90 jsr %a0@ sched =_Scheduler_Allocate( the_thread ); if ( !sched ) 48f02: 588f addql #4,%sp 48f04: 2600 movel %d0,%d3 48f06: 673a beqs 48f42 <_Thread_Initialize+0xf6> goto failed; _Thread_Set_priority( the_thread, priority ); 48f08: 2f02 movel %d2,%sp@- 48f0a: 2f0a movel %a2,%sp@- 48f0c: 4eb9 0004 968c jsr 4968c <_Thread_Set_priority> _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 48f12: 206e 0008 moveal %fp@(8),%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 48f16: 4280 clrl %d0 48f18: 2068 0018 moveal %a0@(24),%a0 48f1c: 302a 000a movew %a2@(10),%d0 /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); 48f20: 42aa 0082 clrl %a2@(130) 48f24: 42aa 0086 clrl %a2@(134) #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 48f28: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 48f2c: 256e 0030 000c movel %fp@(48),%a2@(12) * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); 48f32: 2f0a movel %a2,%sp@- 48f34: 4eb9 0004 9b28 jsr 49b28 <_User_extensions_Thread_create> if ( extension_status ) 48f3a: 4fef 000c lea %sp@(12),%sp 48f3e: 4a00 tstb %d0 48f40: 664a bnes 48f8c <_Thread_Initialize+0x140> return true; failed: _Workspace_Free( the_thread->libc_reent ); 48f42: 2f2a 00fa movel %a2@(250),%sp@- 48f46: 49f9 0004 9f3e lea 49f3e <_Workspace_Free>,%a4 48f4c: 4e94 jsr %a4@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 48f4e: 2f2a 00fe movel %a2@(254),%sp@- 48f52: 4e94 jsr %a4@ 48f54: 2f2a 0102 movel %a2@(258),%sp@- 48f58: 4e94 jsr %a4@ _Workspace_Free( extensions_area ); 48f5a: 2f0b movel %a3,%sp@- 48f5c: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 48f5e: 2f04 movel %d4,%sp@- 48f60: 4e94 jsr %a4@ #endif _Workspace_Free( sched ); 48f62: 2f03 movel %d3,%sp@- 48f64: 4e94 jsr %a4@ _Thread_Stack_Free( the_thread ); 48f66: 2f0a movel %a2,%sp@- 48f68: 4eb9 0004 979c jsr 4979c <_Thread_Stack_Free> return false; 48f6e: 4fef 001c lea %sp@(28),%sp 48f72: 4200 clrb %d0 } 48f74: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 48f7a: 4e5e unlk %fp 48f7c: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 48f7e: 41f9 0006 0c20 lea 60c20 <_Thread_Ticks_per_timeslice>,%a0 48f84: 2550 0076 movel %a0@,%a2@(118) break; 48f88: 6000 ff52 braw 48edc <_Thread_Initialize+0x90> _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 48f8c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; 48f92: 7001 moveq #1,%d0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 48f94: 4e5e unlk %fp 48f96: 4e75 rts /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 48f98: 4878 001c pea 1c 48f9c: 4eb9 0004 9f22 jsr 49f22 <_Workspace_Allocate> if ( !fp_area ) 48fa2: 588f addql #4,%sp /* * Allocate the floating point area for this thread */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( is_fp ) { fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE ); 48fa4: 2800 movel %d0,%d4 if ( !fp_area ) 48fa6: 6600 fef4 bnew 48e9c <_Thread_Initialize+0x50> extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 48faa: 2f2a 00fa movel %a2@(250),%sp@- 48fae: 49f9 0004 9f3e lea 49f3e <_Workspace_Free>,%a4 * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; extensions_area = NULL; 48fb4: 97cb subal %a3,%a3 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 48fb6: 4283 clrl %d3 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 48fb8: 4e94 jsr %a4@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 48fba: 2f2a 00fe movel %a2@(254),%sp@- 48fbe: 4e94 jsr %a4@ 48fc0: 2f2a 0102 movel %a2@(258),%sp@- 48fc4: 4e94 jsr %a4@ _Workspace_Free( extensions_area ); 48fc6: 2f0b movel %a3,%sp@- 48fc8: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 48fca: 2f04 movel %d4,%sp@- 48fcc: 4e94 jsr %a4@ #endif _Workspace_Free( sched ); 48fce: 2f03 movel %d3,%sp@- 48fd0: 4e94 jsr %a4@ _Thread_Stack_Free( the_thread ); 48fd2: 2f0a movel %a2,%sp@- 48fd4: 4eb9 0004 979c jsr 4979c <_Thread_Stack_Free> return false; 48fda: 4fef 001c lea %sp@(28),%sp 48fde: 4200 clrb %d0 48fe0: 6092 bras 48f74 <_Thread_Initialize+0x128> /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 48fe2: e589 lsll #2,%d1 48fe4: 2041 moveal %d1,%a0 48fe6: 4868 0004 pea %a0@(4) 48fea: 4eb9 0004 9f22 jsr 49f22 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 48ff0: 588f addql #4,%sp /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( 48ff2: 2640 moveal %d0,%a3 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) 48ff4: 4a80 tstl %d0 48ff6: 675a beqs 49052 <_Thread_Initialize+0x206> goto failed; } the_thread->extensions = (void **) extensions_area; 48ff8: 2079 0006 0cfa moveal 60cfa <_Thread_Maximum_extensions>,%a0 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 48ffe: 4281 clrl %d1 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; 49000: 4280 clrl %d0 49002: 254b 0106 movel %a3,%a2@(262) * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) the_thread->extensions[i] = NULL; 49006: 42b3 1c00 clrl %a3@(00000000,%d1:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 4900a: 5280 addql #1,%d0 4900c: 2200 movel %d0,%d1 4900e: b088 cmpl %a0,%d0 49010: 6200 feb4 bhiw 48ec6 <_Thread_Initialize+0x7a> the_thread->extensions[i] = NULL; 49014: 42b3 1c00 clrl %a3@(00000000,%d1:l:4) * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) 49018: 5280 addql #1,%d0 4901a: 2200 movel %d0,%d1 4901c: b088 cmpl %a0,%d0 4901e: 63e6 blss 49006 <_Thread_Initialize+0x1ba> 49020: 6000 fea4 braw 48ec6 <_Thread_Initialize+0x7a> return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 49024: 2f04 movel %d4,%sp@- 49026: 2f0a movel %a2,%sp@- 49028: 4eb9 0004 9738 jsr 49738 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) 4902e: 508f addql #8,%sp return false; /* stack allocation failed */ stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); 49030: 2200 movel %d0,%d1 if ( !actual_stack_size || actual_stack_size < stack_size ) 49032: 6712 beqs 49046 <_Thread_Initialize+0x1fa> 49034: b084 cmpl %d4,%d0 49036: 650e bcss 49046 <_Thread_Initialize+0x1fa> <== NEVER TAKEN return false; /* stack allocation failed */ stack = the_thread->Start.stack; 49038: 202a 00be movel %a2@(190),%d0 the_thread->Start.core_allocated_stack = true; 4903c: 7801 moveq #1,%d4 4903e: 1544 00b0 moveb %d4,%a2@(176) 49042: 6000 fe46 braw 48e8a <_Thread_Initialize+0x3e> _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 49046: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 stack = the_thread->Start.stack; #else if ( !stack_area ) { actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ 4904c: 4200 clrb %d0 _Workspace_Free( sched ); _Thread_Stack_Free( the_thread ); return false; } 4904e: 4e5e unlk %fp 49050: 4e75 rts extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 49052: 2f2a 00fa movel %a2@(250),%sp@- 49056: 49f9 0004 9f3e lea 49f3e <_Workspace_Free>,%a4 size_t actual_stack_size = 0; void *stack = NULL; #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) void *fp_area; #endif void *sched = NULL; 4905c: 4283 clrl %d3 extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; failed: _Workspace_Free( the_thread->libc_reent ); 4905e: 4e94 jsr %a4@ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) _Workspace_Free( the_thread->API_Extensions[i] ); 49060: 2f2a 00fe movel %a2@(254),%sp@- 49064: 4e94 jsr %a4@ 49066: 2f2a 0102 movel %a2@(258),%sp@- 4906a: 4e94 jsr %a4@ _Workspace_Free( extensions_area ); 4906c: 2f0b movel %a3,%sp@- 4906e: 4e94 jsr %a4@ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Workspace_Free( fp_area ); 49070: 2f04 movel %d4,%sp@- 49072: 4e94 jsr %a4@ #endif _Workspace_Free( sched ); 49074: 2f03 movel %d3,%sp@- 49076: 4e94 jsr %a4@ _Thread_Stack_Free( the_thread ); 49078: 2f0a movel %a2,%sp@- 4907a: 4eb9 0004 979c jsr 4979c <_Thread_Stack_Free> return false; 49080: 4fef 001c lea %sp@(28),%sp 49084: 4200 clrb %d0 49086: 6000 feec braw 48f74 <_Thread_Initialize+0x128> ... =============================================================================== 0004dcf8 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4dcf8: 4e56 0000 linkw %fp,#0 4dcfc: 2f0a movel %a2,%sp@- 4dcfe: 246e 0008 moveal %fp@(8),%a2 the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4dd02: 256a 00a0 007a movel %a2@(160),%a2@(122) the_thread->budget_callout = the_thread->Start.budget_callout; 4dd08: 256a 00a4 007e movel %a2@(164),%a2@(126) the_thread->Start.pointer_argument = pointer_argument; 4dd0e: 256e 000c 0096 movel %fp@(12),%a2@(150) the_thread->Start.numeric_argument = numeric_argument; 4dd14: 256e 0010 009a movel %fp@(16),%a2@(154) void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4dd1a: 156a 009e 0074 moveb %a2@(158),%a2@(116) Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { the_thread->resource_count = 0; 4dd20: 42aa 001c clrl %a2@(28) 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 ) ) { 4dd24: 2f0a movel %a2,%sp@- 4dd26: 4eb9 0004 a0f0 jsr 4a0f0 <_Thread_queue_Extract_with_proxy> 4dd2c: 588f addql #4,%sp 4dd2e: 4a00 tstb %d0 4dd30: 6608 bnes 4dd3a <_Thread_Reset+0x42> if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4dd32: 7002 moveq #2,%d0 4dd34: b0aa 0050 cmpl %a2@(80),%d0 4dd38: 672a beqs 4dd64 <_Thread_Reset+0x6c> (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4dd3a: 202a 00ac movel %a2@(172),%d0 4dd3e: b0aa 0014 cmpl %a2@(20),%d0 4dd42: 6718 beqs 4dd5c <_Thread_Reset+0x64> the_thread->real_priority = the_thread->Start.initial_priority; 4dd44: 2540 0018 movel %d0,%a2@(24) _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4dd48: 2d4a 0008 movel %a2,%fp@(8) } } 4dd4c: 246e fffc moveal %fp@(-4),%a2 (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4dd50: 2d40 000c movel %d0,%fp@(12) } } 4dd54: 4e5e unlk %fp (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { the_thread->real_priority = the_thread->Start.initial_priority; _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4dd56: 4ef9 0004 a330 jmp 4a330 <_Thread_Set_priority> } } 4dd5c: 246e fffc moveal %fp@(-4),%a2 4dd60: 4e5e unlk %fp 4dd62: 4e75 rts 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 ); 4dd64: 486a 0048 pea %a2@(72) 4dd68: 4eb9 0004 aa88 jsr 4aa88 <_Watchdog_Remove> 4dd6e: 588f addql #4,%sp 4dd70: 60c8 bras 4dd3a <_Thread_Reset+0x42> ... =============================================================================== 0004a2a0 <_Thread_Restart>: */ RTEMS_INLINE_ROUTINE bool _States_Is_dormant ( States_Control the_states ) { return (the_states & STATES_DORMANT); 4a2a0: 7001 moveq #1,%d0 bool _Thread_Restart( Thread_Control *the_thread, void *pointer_argument, Thread_Entry_numeric_type numeric_argument ) { 4a2a2: 4e56 0000 linkw %fp,#0 4a2a6: 2f0a movel %a2,%sp@- 4a2a8: 246e 0008 moveal %fp@(8),%a2 4a2ac: c0aa 0010 andl %a2@(16),%d0 if ( !_States_Is_dormant( the_thread->current_state ) ) { 4a2b0: 670a beqs 4a2bc <_Thread_Restart+0x1c> return true; } return false; } 4a2b2: 246e fffc moveal %fp@(-4),%a2 4a2b6: 4e5e unlk %fp _Thread_Restart_self(); return true; } return false; 4a2b8: 4200 clrb %d0 } 4a2ba: 4e75 rts Thread_Entry_numeric_type numeric_argument ) { if ( !_States_Is_dormant( the_thread->current_state ) ) { _Thread_Set_transient( the_thread ); 4a2bc: 2f0a movel %a2,%sp@- 4a2be: 4eb9 0004 a394 jsr 4a394 <_Thread_Set_transient> _Thread_Reset( the_thread, pointer_argument, numeric_argument ); 4a2c4: 2f2e 0010 movel %fp@(16),%sp@- 4a2c8: 2f2e 000c movel %fp@(12),%sp@- 4a2cc: 2f0a movel %a2,%sp@- 4a2ce: 4eb9 0004 dcf8 jsr 4dcf8 <_Thread_Reset> _Thread_Load_environment( the_thread ); 4a2d4: 2f0a movel %a2,%sp@- 4a2d6: 4eb9 0004 d9e4 jsr 4d9e4 <_Thread_Load_environment> _Thread_Ready( the_thread ); 4a2dc: 2f0a movel %a2,%sp@- 4a2de: 4eb9 0004 dcc8 jsr 4dcc8 <_Thread_Ready> _User_extensions_Thread_restart( the_thread ); 4a2e4: 2f0a movel %a2,%sp@- 4a2e6: 4eb9 0004 a86c jsr 4a86c <_User_extensions_Thread_restart> if ( _Thread_Is_executing ( the_thread ) ) 4a2ec: 4fef 001c lea %sp@(28),%sp 4a2f0: b5f9 0006 206a cmpal 6206a <_Per_CPU_Information+0xc>,%a2 4a2f6: 670a beqs 4a302 <_Thread_Restart+0x62> return true; } return false; } 4a2f8: 246e fffc moveal %fp@(-4),%a2 4a2fc: 4e5e unlk %fp _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a2fe: 7001 moveq #1,%d0 } return false; } 4a300: 4e75 rts */ RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void ) { #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( _Thread_Executing->fp_context != NULL ) 4a302: 4aaa 00f6 tstl %a2@(246) 4a306: 6712 beqs 4a31a <_Thread_Restart+0x7a> _Context_Restore_fp( &_Thread_Executing->fp_context ); 4a308: 486a 00f6 pea %a2@(246) 4a30c: 4eb9 0004 add2 jsr 4add2 <_CPU_Context_restore_fp> 4a312: 2479 0006 206a moveal 6206a <_Per_CPU_Information+0xc>,%a2 4a318: 588f addql #4,%sp #endif _CPU_Context_Restart_self( &_Thread_Executing->Registers ); 4a31a: 486a 00c2 pea %a2@(194) 4a31e: 4eb9 0004 ac8a jsr 4ac8a <_CPU_Context_Restart_self> 4a324: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4a328: 588f addql #4,%sp <== NOT EXECUTED 4a32a: 4e5e unlk %fp <== NOT EXECUTED _User_extensions_Thread_restart( the_thread ); if ( _Thread_Is_executing ( the_thread ) ) _Thread_Restart_self(); return true; 4a32c: 7001 moveq #1,%d0 <== NOT EXECUTED } return false; } =============================================================================== 0004987c <_Thread_Tickle_timeslice>: * * Output parameters: NONE */ void _Thread_Tickle_timeslice( void ) { 4987c: 4e56 0000 linkw %fp,#0 49880: 2f0a movel %a2,%sp@- Thread_Control *executing; executing = _Thread_Executing; 49882: 2479 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a2 /* * If the thread is not preemptible or is not ready, then * just return. */ if ( !executing->is_preemptible ) 49888: 4a2a 0074 tstb %a2@(116) 4988c: 6720 beqs 498ae <_Thread_Tickle_timeslice+0x32> return; if ( !_States_Is_ready( executing->current_state ) ) 4988e: 4aaa 0010 tstl %a2@(16) 49892: 661a bnes 498ae <_Thread_Tickle_timeslice+0x32> /* * The cpu budget algorithm determines what happens next. */ switch ( executing->budget_algorithm ) { 49894: 202a 007a movel %a2@(122),%d0 49898: 7201 moveq #1,%d1 4989a: b280 cmpl %d0,%d1 4989c: 6210 bhis 498ae <_Thread_Tickle_timeslice+0x32> 4989e: 123c 0002 moveb #2,%d1 498a2: b280 cmpl %d0,%d1 498a4: 642e bccs 498d4 <_Thread_Tickle_timeslice+0x58> 498a6: 123c 0003 moveb #3,%d1 498aa: b280 cmpl %d0,%d1 498ac: 6708 beqs 498b6 <_Thread_Tickle_timeslice+0x3a> <== ALWAYS TAKEN if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 498ae: 246e fffc moveal %fp@(-4),%a2 498b2: 4e5e unlk %fp 498b4: 4e75 rts } break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) 498b6: 202a 0076 movel %a2@(118),%d0 498ba: 5380 subql #1,%d0 498bc: 2540 0076 movel %d0,%a2@(118) 498c0: 66ec bnes 498ae <_Thread_Tickle_timeslice+0x32> (*executing->budget_callout)( executing ); 498c2: 2f0a movel %a2,%sp@- 498c4: 206a 007e moveal %a2@(126),%a0 498c8: 4e90 jsr %a0@ break; #endif } } 498ca: 246e fffc moveal %fp@(-4),%a2 break; #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT) case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); 498ce: 588f addql #4,%sp break; #endif } } 498d0: 4e5e unlk %fp 498d2: 4e75 rts case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE) case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: #endif if ( (int)(--executing->cpu_time_budget) <= 0 ) { 498d4: 202a 0076 movel %a2@(118),%d0 498d8: 5380 subql #1,%d0 498da: 2540 0076 movel %d0,%a2@(118) 498de: 6ece bgts 498ae <_Thread_Tickle_timeslice+0x32> * always operates on the scheduler that 'owns' the currently executing * thread. */ RTEMS_INLINE_ROUTINE void _Scheduler_Yield( void ) { _Scheduler.Operations.yield(); 498e0: 2079 0005 f2ac moveal 5f2ac <_Scheduler+0xc>,%a0 498e6: 4e90 jsr %a0@ * executing thread's timeslice is reset. Otherwise, the * currently executing thread is placed at the rear of the * FIFO for this priority and a new heir is selected. */ _Scheduler_Yield( ); executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 498e8: 41f9 0006 0c20 lea 60c20 <_Thread_Ticks_per_timeslice>,%a0 498ee: 2550 0076 movel %a0@,%a2@(118) if ( --executing->cpu_time_budget == 0 ) (*executing->budget_callout)( executing ); break; #endif } } 498f2: 246e fffc moveal %fp@(-4),%a2 498f6: 4e5e unlk %fp ... =============================================================================== 00048870 <_Thread_blocking_operation_Cancel>: /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 48870: 7202 moveq #2,%d1 Thread_blocking_operation_States sync_state __attribute__((unused)), #endif Thread_Control *the_thread, ISR_Level level ) { 48872: 4e56 0000 linkw %fp,#0 48876: 202e 0010 movel %fp@(16),%d0 4887a: 2f0a movel %a2,%sp@- 4887c: 246e 000c moveal %fp@(12),%a2 #endif /* * The thread is not waiting on anything after this completes. */ the_thread->Wait.queue = NULL; 48880: 42aa 0044 clrl %a2@(68) /* * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 48884: b2aa 0050 cmpl %a2@(80),%d1 48888: 671c beqs 488a6 <_Thread_blocking_operation_Cancel+0x36> _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4888a: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4888c: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 48890: 246e fffc moveal %fp@(-4),%a2 48894: 203c 1003 fff8 movel #268697592,%d0 4889a: 2d40 000c movel %d0,%fp@(12) 4889e: 4e5e unlk %fp 488a0: 4ef9 0004 89bc jmp 489bc <_Thread_Clear_state> RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 488a6: 123c 0003 moveb #3,%d1 488aa: 2541 0050 movel %d1,%a2@(80) * If the sync state is timed out, this is very likely not needed. * But better safe than sorry when it comes to critical sections. */ if ( _Watchdog_Is_active( &the_thread->Timer ) ) { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 488ae: 46c0 movew %d0,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 488b0: 486a 0048 pea %a2@(72) 488b4: 4eb9 0004 9da0 jsr 49da0 <_Watchdog_Remove> 488ba: 588f addql #4,%sp 488bc: 203c 1003 fff8 movel #268697592,%d0 488c2: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 488c6: 246e fffc moveal %fp@(-4),%a2 488ca: 2d40 000c movel %d0,%fp@(12) 488ce: 4e5e unlk %fp 488d0: 4ef9 0004 89bc jmp 489bc <_Thread_Clear_state> ... =============================================================================== 00049194 <_Thread_queue_Dequeue_priority>: Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 49194: 203c 0000 0700 movel #1792,%d0 */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4919a: 4e56 ffe8 linkw %fp,#-24 4919e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 491a2: 266e 0008 moveal %fp@(8),%a3 Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 491a6: 40c3 movew %sr,%d3 491a8: 8083 orl %d3,%d0 491aa: 46c0 movew %d0,%sr for( index=0 ; 491ac: 4280 clrl %d0 Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 491ae: 204b moveal %a3,%a0 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 491b0: 2400 movel %d0,%d2 491b2: 2200 movel %d0,%d1 for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 491b4: 5280 addql #1,%d0 491b6: e58a lsll #2,%d2 491b8: e989 lsll #4,%d1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 491ba: 2450 moveal %a0@,%a2 491bc: 9282 subl %d2,%d1 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 491be: 41e8 000c lea %a0@(12),%a0 491c2: 43f3 1804 lea %a3@(00000004,%d1:l),%a1 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 491c6: b3ca cmpal %a2,%a1 491c8: 6616 bnes 491e0 <_Thread_queue_Dequeue_priority+0x4c> Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; 491ca: 7204 moveq #4,%d1 491cc: b280 cmpl %d0,%d1 491ce: 66e0 bnes 491b0 <_Thread_queue_Dequeue_priority+0x1c> } /* * We did not find a thread to unblock. */ _ISR_Enable( level ); 491d0: 46c3 movew %d3,%sr return NULL; 491d2: 4282 clrl %d2 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 491d4: 2002 movel %d2,%d0 491d6: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 491dc: 4e5e unlk %fp 491de: 4e75 rts 491e0: 200a movel %a2,%d0 _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 *) _Chain_First( 491e2: 240a movel %a2,%d2 491e4: 0680 0000 003c addil #60,%d0 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 491ea: 206a 0038 moveal %a2@(56),%a0 dequeue: the_thread->Wait.queue = NULL; new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 491ee: 2252 moveal %a2@,%a1 previous_node = the_thread->Object.Node.previous; 491f0: 266a 0004 moveal %a2@(4),%a3 */ _ISR_Enable( level ); return NULL; dequeue: the_thread->Wait.queue = NULL; 491f4: 42aa 0044 clrl %a2@(68) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); 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 ) ) { 491f8: b088 cmpl %a0,%d0 491fa: 6700 008a beqw 49286 <_Thread_queue_Dequeue_priority+0xf2> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 491fe: 286a 0040 moveal %a2@(64),%a4 next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 49202: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 49204: 2348 0004 movel %a0,%a1@(4) if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 49208: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4920a: 214b 0004 movel %a3,%a0@(4) last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4920e: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 49210: 226a 0040 moveal %a2@(64),%a1 49214: b3ea 0038 cmpal %a2@(56),%a1 49218: 6716 beqs 49230 <_Thread_queue_Dequeue_priority+0x9c> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4921a: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4921e: 43e8 003c lea %a0@(60),%a1 49222: 2889 movel %a1,%a4@ 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 */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 49224: 43e8 0038 lea %a0@(56),%a1 49228: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4922c: 214c 0040 movel %a4,%a0@(64) } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 49230: 7002 moveq #2,%d0 49232: b0aa 0050 cmpl %a2@(80),%d0 49236: 671e beqs 49256 <_Thread_queue_Dequeue_priority+0xc2> _ISR_Enable( level ); 49238: 46c3 movew %d3,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4923a: 2f3c 1003 fff8 movel #268697592,%sp@- 49240: 2f0a movel %a2,%sp@- 49242: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> 49248: 508f addql #8,%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4924a: 2002 movel %d2,%d0 4924c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49252: 4e5e unlk %fp 49254: 4e75 rts RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 49256: 7203 moveq #3,%d1 49258: 2541 0050 movel %d1,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4925c: 46c3 movew %d3,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4925e: 486a 0048 pea %a2@(72) 49262: 4eb9 0004 9da0 jsr 49da0 <_Watchdog_Remove> 49268: 2f3c 1003 fff8 movel #268697592,%sp@- 4926e: 2f0a movel %a2,%sp@- 49270: 4eb9 0004 89bc jsr 489bc <_Thread_Clear_state> 49276: 4fef 000c lea %sp@(12),%sp #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4927a: 2002 movel %d2,%d0 4927c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49282: 4e5e unlk %fp 49284: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 49286: 2689 movel %a1,%a3@ next_node->previous = previous_node; 49288: 234b 0004 movel %a3,%a1@(4) 4928c: 60a2 bras 49230 <_Thread_queue_Dequeue_priority+0x9c> ... =============================================================================== 00049338 <_Thread_queue_Enqueue_priority>: Thread_blocking_operation_States _Thread_queue_Enqueue_priority ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, ISR_Level *level_p ) { 49338: 4e56 ffe0 linkw %fp,#-32 4933c: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 49340: 246e 000c moveal %fp@(12),%a2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 49344: 41ea 003c lea %a2@(60),%a0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 49348: 49ea 0038 lea %a2@(56),%a4 4934c: 266e 0008 moveal %fp@(8),%a3 Priority_Control priority; States_Control block_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 49350: 222a 0014 movel %a2@(20),%d1 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 49354: 2a01 movel %d1,%d5 49356: ec8d lsrl #6,%d5 header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; 49358: 242b 0038 movel %a3@(56),%d2 Chain_Node *tail = _Chain_Tail( the_chain ); 4935c: 2548 0038 movel %a0,%a2@(56) */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 49360: 254c 0040 movel %a4,%a2@(64) Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 49364: 42aa 003c clrl %a2@(60) if ( _Thread_queue_Is_reverse_search( priority ) ) 49368: 0801 0005 btst #5,%d1 4936c: 665e bnes 493cc <_Thread_queue_Enqueue_priority+0x94> 4936e: 700c moveq #12,%d0 49370: 4c00 5800 mulsl %d0,%d5 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 49374: 2c3c 0000 0700 movel #1792,%d6 4937a: 2006 movel %d6,%d0 RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 4937c: 49f3 5804 lea %a3@(00000004,%d5:l),%a4 49380: 40c3 movew %sr,%d3 49382: 8083 orl %d3,%d0 49384: 46c0 movew %d0,%sr 49386: 2803 movel %d3,%d4 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 49388: 2073 5800 moveal %a3@(00000000,%d5:l),%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4938c: b9c8 cmpal %a0,%a4 4938e: 6700 013a beqw 494ca <_Thread_queue_Enqueue_priority+0x192> search_priority = search_thread->current_priority; 49392: 2268 0014 moveal %a0@(20),%a1 if ( priority <= search_priority ) 49396: b3c1 cmpal %d1,%a1 49398: 6418 bccs 493b2 <_Thread_queue_Enqueue_priority+0x7a> break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4939a: 2006 movel %d6,%d0 4939c: 46c3 movew %d3,%sr 4939e: 8083 orl %d3,%d0 493a0: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _States_Are_set ( States_Control the_states, States_Control mask ) { return ( (the_states & mask) != STATES_READY); 493a2: 2002 movel %d2,%d0 493a4: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 493a8: 6700 00be beqw 49468 <_Thread_queue_Enqueue_priority+0x130> _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 493ac: 2050 moveal %a0@,%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 493ae: b9c8 cmpal %a0,%a4 493b0: 66e0 bnes 49392 <_Thread_queue_Enqueue_priority+0x5a> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 493b2: 202b 0030 movel %a3@(48),%d0 493b6: 7401 moveq #1,%d2 493b8: b480 cmpl %d0,%d2 493ba: 6700 00c4 beqw 49480 <_Thread_queue_Enqueue_priority+0x148> * For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level; 493be: 206e 0010 moveal %fp@(16),%a0 493c2: 2084 movel %d4,%a0@ return the_thread_queue->sync_state; } 493c4: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 493c8: 4e5e unlk %fp 493ca: 4e75 rts 493cc: 700c moveq #12,%d0 493ce: 4c00 5800 mulsl %d0,%d5 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 493d2: 4283 clrl %d3 493d4: 1639 0005 f372 moveb 5f372 ,%d3 _ISR_Disable( level ); 493da: 2c3c 0000 0700 movel #1792,%d6 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 493e0: da8b addl %a3,%d5 493e2: 2845 moveal %d5,%a4 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 493e4: 2243 moveal %d3,%a1 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 493e6: 508c addql #8,%a4 return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 493e8: 2006 movel %d6,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 493ea: 5289 addql #1,%a1 _ISR_Disable( level ); 493ec: 40c3 movew %sr,%d3 493ee: 8083 orl %d3,%d0 493f0: 46c0 movew %d0,%sr 493f2: 2803 movel %d3,%d4 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 493f4: 2054 moveal %a4@,%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 493f6: ba88 cmpl %a0,%d5 493f8: 6720 beqs 4941a <_Thread_queue_Enqueue_priority+0xe2> search_priority = search_thread->current_priority; 493fa: 2268 0014 moveal %a0@(20),%a1 if ( priority >= search_priority ) 493fe: b3c1 cmpal %d1,%a1 49400: 6318 blss 4941a <_Thread_queue_Enqueue_priority+0xe2> break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 49402: 2006 movel %d6,%d0 49404: 46c3 movew %d3,%sr 49406: 8083 orl %d3,%d0 49408: 46c0 movew %d0,%sr 4940a: 2002 movel %d2,%d0 4940c: c0a8 0010 andl %a0@(16),%d0 if ( !_States_Are_set( search_thread->current_state, block_state) ) { 49410: 6736 beqs 49448 <_Thread_queue_Enqueue_priority+0x110> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) search_thread->Object.Node.previous; 49412: 2068 0004 moveal %a0@(4),%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 49416: ba88 cmpl %a0,%d5 49418: 66e0 bnes 493fa <_Thread_queue_Enqueue_priority+0xc2> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 4941a: 202b 0030 movel %a3@(48),%d0 4941e: 7401 moveq #1,%d2 49420: b480 cmpl %d0,%d2 49422: 669a bnes 493be <_Thread_queue_Enqueue_priority+0x86> THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 49424: 42ab 0030 clrl %a3@(48) if ( priority == search_priority ) 49428: b3c1 cmpal %d1,%a1 4942a: 677a beqs 494a6 <_Thread_queue_Enqueue_priority+0x16e> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4942c: 2250 moveal %a0@,%a1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4942e: 2548 0004 movel %a0,%a2@(4) search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 49432: 2489 movel %a1,%a2@ the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; 49434: 234a 0004 movel %a2,%a1@(4) 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; 49438: 208a movel %a2,%a0@ next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4943a: 254b 0044 movel %a3,%a2@(68) _ISR_Enable( level ); 4943e: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 49440: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 49444: 4e5e unlk %fp 49446: 4e75 rts if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 49448: 46c3 movew %d3,%sr the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 4944a: 4283 clrl %d3 4944c: 1639 0005 f372 moveb 5f372 ,%d3 _ISR_Disable( level ); 49452: 2006 movel %d6,%d0 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 49454: 2243 moveal %d3,%a1 49456: 5289 addql #1,%a1 _ISR_Disable( level ); 49458: 40c3 movew %sr,%d3 4945a: 8083 orl %d3,%d0 4945c: 46c0 movew %d0,%sr 4945e: 2803 movel %d3,%d4 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 49460: 2054 moveal %a4@,%a0 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_Last( header ); while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 49462: ba88 cmpl %a0,%d5 49464: 6694 bnes 493fa <_Thread_queue_Enqueue_priority+0xc2><== NEVER TAKEN 49466: 60b2 bras 4941a <_Thread_queue_Enqueue_priority+0xe2> if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 49468: 46c3 movew %d3,%sr if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4946a: 2006 movel %d6,%d0 4946c: 40c3 movew %sr,%d3 4946e: 8083 orl %d3,%d0 49470: 46c0 movew %d0,%sr 49472: 2803 movel %d3,%d4 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 49474: 2073 5800 moveal %a3@(00000000,%d5:l),%a0 restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) _Chain_First( header ); while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 49478: b9c8 cmpal %a0,%a4 4947a: 6600 ff16 bnew 49392 <_Thread_queue_Enqueue_priority+0x5a> 4947e: 604a bras 494ca <_Thread_queue_Enqueue_priority+0x192> if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 49480: 42ab 0030 clrl %a3@(48) if ( priority == search_priority ) 49484: b3c1 cmpal %d1,%a1 49486: 671e beqs 494a6 <_Thread_queue_Enqueue_priority+0x16e> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 49488: 2268 0004 moveal %a0@(4),%a1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4948c: 2488 movel %a0,%a2@ the_node->previous = previous_node; 4948e: 2549 0004 movel %a1,%a2@(4) previous_node->next = the_node; 49492: 228a movel %a2,%a1@ search_node->previous = the_node; 49494: 214a 0004 movel %a2,%a0@(4) the_thread->Wait.queue = the_thread_queue; 49498: 254b 0044 movel %a3,%a2@(68) _ISR_Enable( level ); 4949c: 46c3 movew %d3,%sr * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 4949e: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 494a2: 4e5e unlk %fp 494a4: 4e75 rts the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 494a6: 49e8 003c lea %a0@(60),%a4 previous_node = search_node->previous; 494aa: 2268 0040 moveal %a0@(64),%a1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); 494ae: 248c movel %a4,%a2@ previous_node = search_node->previous; the_node = (Chain_Node *) the_thread; the_node->next = search_node; the_node->previous = previous_node; 494b0: 2549 0004 movel %a1,%a2@(4) previous_node->next = the_node; 494b4: 228a movel %a2,%a1@ search_node->previous = the_node; 494b6: 214a 0040 movel %a2,%a0@(64) the_thread->Wait.queue = the_thread_queue; 494ba: 254b 0044 movel %a3,%a2@(68) _ISR_Enable( level ); 494be: 46c4 movew %d4,%sr return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 494c0: 7001 moveq #1,%d0 * * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; } 494c2: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 494c6: 4e5e unlk %fp 494c8: 4e75 rts } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 494ca: 202b 0030 movel %a3@(48),%d0 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; 494ce: 327c ffff moveaw #-1,%a1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 494d2: 7401 moveq #1,%d2 494d4: b480 cmpl %d0,%d2 494d6: 6600 fee6 bnew 493be <_Thread_queue_Enqueue_priority+0x86> 494da: 60a4 bras 49480 <_Thread_queue_Enqueue_priority+0x148> =============================================================================== 0004ea5c <_Thread_queue_Extract_fifo>: Thread_Control *the_thread ) { ISR_Level level; _ISR_Disable( level ); 4ea5c: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread ) { 4ea62: 4e56 0000 linkw %fp,#0 4ea66: 2f0a movel %a2,%sp@- 4ea68: 246e 000c moveal %fp@(12),%a2 ISR_Level level; _ISR_Disable( level ); 4ea6c: 40c1 movew %sr,%d1 4ea6e: 8081 orl %d1,%d0 4ea70: 46c0 movew %d0,%sr 4ea72: 202a 0010 movel %a2@(16),%d0 4ea76: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4ea7c: 6734 beqs 4eab2 <_Thread_queue_Extract_fifo+0x56> ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4ea7e: 2252 moveal %a2@,%a1 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4ea80: 7002 moveq #2,%d0 previous = the_node->previous; 4ea82: 206a 0004 moveal %a2@(4),%a0 next->previous = previous; 4ea86: 2348 0004 movel %a0,%a1@(4) previous->next = next; 4ea8a: 2089 movel %a1,%a0@ return; } _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; 4ea8c: 42aa 0044 clrl %a2@(68) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4ea90: b0aa 0050 cmpl %a2@(80),%d0 4ea94: 6726 beqs 4eabc <_Thread_queue_Extract_fifo+0x60> _ISR_Enable( level ); 4ea96: 46c1 movew %d1,%sr RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4ea98: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4ea9c: 246e fffc moveal %fp@(-4),%a2 4eaa0: 203c 1003 fff8 movel #268697592,%d0 4eaa6: 2d40 000c movel %d0,%fp@(12) 4eaaa: 4e5e unlk %fp 4eaac: 4ef9 0004 89bc jmp 489bc <_Thread_Clear_state> ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4eab2: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4eab4: 246e fffc moveal %fp@(-4),%a2 4eab8: 4e5e unlk %fp 4eaba: 4e75 rts 4eabc: 7003 moveq #3,%d0 4eabe: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4eac2: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4eac4: 486a 0048 pea %a2@(72) 4eac8: 4eb9 0004 9da0 jsr 49da0 <_Watchdog_Remove> 4eace: 588f addql #4,%sp 4ead0: 203c 1003 fff8 movel #268697592,%d0 4ead6: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4eada: 246e fffc moveal %fp@(-4),%a2 4eade: 2d40 000c movel %d0,%fp@(12) 4eae2: 4e5e unlk %fp 4eae4: 4ef9 0004 89bc jmp 489bc <_Thread_Clear_state> ... =============================================================================== 0004cea8 <_Thread_queue_Extract_priority_helper>: Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4cea8: 203c 0000 0700 movel #1792,%d0 void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 4ceae: 4e56 ffec linkw %fp,#-20 4ceb2: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4ceb6: 246e 000c moveal %fp@(12),%a2 4ceba: 142e 0013 moveb %fp@(19),%d2 Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4cebe: 40c1 movew %sr,%d1 4cec0: 8081 orl %d1,%d0 4cec2: 46c0 movew %d0,%sr */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 4cec4: 202a 0010 movel %a2@(16),%d0 4cec8: 0280 0003 bee0 andil #245472,%d0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4cece: 677e beqs 4cf4e <_Thread_queue_Extract_priority_helper+0xa6> RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 4ced0: 200a movel %a2,%d0 4ced2: 0680 0000 003c addil #60,%d0 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4ced8: 2252 moveal %a2@,%a1 previous_node = the_node->previous; 4ceda: 266a 0004 moveal %a2@(4),%a3 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cede: 206a 0038 moveal %a2@(56),%a0 */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4cee2: b088 cmpl %a0,%d0 4cee4: 6774 beqs 4cf5a <_Thread_queue_Extract_priority_helper+0xb2> #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cee6: 286a 0040 moveal %a2@(64),%a4 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; 4ceea: 2a50 moveal %a0@,%a5 previous_node->next = new_first_node; next_node->previous = new_first_node; 4ceec: 2348 0004 movel %a0,%a1@(4) new_first_node = _Chain_First( &the_thread->Wait.Block2n ); new_first_thread = (Thread_Control *) new_first_node; last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; 4cef0: 2688 movel %a0,%a3@ next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; 4cef2: 214b 0004 movel %a3,%a0@(4) last_node = _Chain_Last( &the_thread->Wait.Block2n ); new_second_node = new_first_node->next; previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; 4cef6: 2089 movel %a1,%a0@ new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4cef8: 202a 0040 movel %a2@(64),%d0 4cefc: b0aa 0038 cmpl %a2@(56),%d0 4cf00: 6716 beqs 4cf18 <_Thread_queue_Extract_priority_helper+0x70> /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; 4cf02: 214d 0038 movel %a5,%a0@(56) new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4cf06: 43e8 003c lea %a0@(60),%a1 4cf0a: 2889 movel %a1,%a4@ 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 */ head = _Chain_Head( &new_first_thread->Wait.Block2n ); 4cf0c: 43e8 0038 lea %a0@(56),%a1 4cf10: 2b49 0004 movel %a1,%a5@(4) tail = _Chain_Tail( &new_first_thread->Wait.Block2n ); new_second_node->previous = head; head->next = new_second_node; tail->previous = last_node; 4cf14: 214c 0040 movel %a4,%a0@(64) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4cf18: 4a02 tstb %d2 4cf1a: 6626 bnes 4cf42 <_Thread_queue_Extract_priority_helper+0x9a> _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4cf1c: 7002 moveq #2,%d0 4cf1e: b0aa 0050 cmpl %a2@(80),%d0 4cf22: 6742 beqs 4cf66 <_Thread_queue_Extract_priority_helper+0xbe> _ISR_Enable( level ); 4cf24: 46c1 movew %d1,%sr 4cf26: 2d4a 0008 movel %a2,%fp@(8) 4cf2a: 227c 1003 fff8 moveal #268697592,%a1 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cf30: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cf36: 2d49 000c movel %a1,%fp@(12) 4cf3a: 4e5e unlk %fp 4cf3c: 4ef9 0004 89bc jmp 489bc <_Thread_Clear_state> /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { _ISR_Enable( level ); 4cf42: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cf44: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cf4a: 4e5e unlk %fp 4cf4c: 4e75 rts 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 ); 4cf4e: 46c1 movew %d1,%sr #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cf50: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cf56: 4e5e unlk %fp 4cf58: 4e75 rts head->next = new_second_node; tail->previous = last_node; last_node->next = tail; } } else { previous_node->next = next_node; 4cf5a: 2689 movel %a1,%a3@ next_node->previous = previous_node; 4cf5c: 234b 0004 movel %a3,%a1@(4) /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4cf60: 4a02 tstb %d2 4cf62: 67b8 beqs 4cf1c <_Thread_queue_Extract_priority_helper+0x74> 4cf64: 60dc bras 4cf42 <_Thread_queue_Extract_priority_helper+0x9a> 4cf66: 7003 moveq #3,%d0 4cf68: 2540 0050 movel %d0,%a2@(80) if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4cf6c: 46c1 movew %d1,%sr (void) _Watchdog_Remove( &the_thread->Timer ); 4cf6e: 486a 0048 pea %a2@(72) 4cf72: 4eb9 0004 9da0 jsr 49da0 <_Watchdog_Remove> 4cf78: 588f addql #4,%sp 4cf7a: 227c 1003 fff8 moveal #268697592,%a1 4cf80: 2d4a 0008 movel %a2,%fp@(8) #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 4cf84: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cf8a: 2d49 000c movel %a1,%fp@(12) 4cf8e: 4e5e unlk %fp 4cf90: 4ef9 0004 89bc jmp 489bc <_Thread_Clear_state> ... =============================================================================== 00049548 <_Thread_queue_Initialize>: the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 49548: 7201 moveq #1,%d1 Thread_queue_Control *the_thread_queue, Thread_queue_Disciplines the_discipline, States_Control state, uint32_t timeout_status ) { 4954a: 4e56 0000 linkw %fp,#0 4954e: 206e 0008 moveal %fp@(8),%a0 49552: 2f0a movel %a2,%sp@- 49554: 202e 000c movel %fp@(12),%d0 49558: 2f02 movel %d2,%sp@- the_thread_queue->state = state; 4955a: 216e 0010 0038 movel %fp@(16),%a0@(56) the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 49560: 216e 0014 003c movel %fp@(20),%a0@(60) States_Control state, uint32_t timeout_status ) { the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; 49566: 2140 0034 movel %d0,%a0@(52) the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; 4956a: 42a8 0030 clrl %a0@(48) if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 4956e: b280 cmpl %d0,%d1 49570: 6716 beqs 49588 <_Thread_queue_Initialize+0x40> RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 49572: 2448 moveal %a0,%a2 49574: 588a addql #4,%a2 head->next = tail; head->previous = NULL; 49576: 42a8 0004 clrl %a0@(4) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4957a: 208a movel %a2,%a0@ head->next = tail; head->previous = NULL; tail->previous = head; 4957c: 2148 0008 movel %a0,%a0@(8) _Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] ); } else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */ _Chain_Initialize_empty( &the_thread_queue->Queues.Fifo ); } } 49580: 241f movel %sp@+,%d2 49582: 245f moveal %sp@+,%a2 49584: 4e5e unlk %fp 49586: 4e75 rts the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 49588: 2248 moveal %a0,%a1 4958a: 4280 clrl %d0 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4958c: 2400 movel %d0,%d2 4958e: 2200 movel %d0,%d1 uint32_t index; for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 49590: 5280 addql #1,%d0 49592: e58a lsll #2,%d2 49594: e989 lsll #4,%d1 head->next = tail; head->previous = NULL; 49596: 42a9 0004 clrl %a1@(4) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 4959a: 9282 subl %d2,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 4959c: 45f0 1800 lea %a0@(00000000,%d1:l),%a2 495a0: 234a 0008 movel %a2,%a1@(8) Chain_Node *tail = _Chain_Tail( the_chain ); 495a4: 45f0 1804 lea %a0@(00000004,%d1:l),%a2 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 495a8: 7204 moveq #4,%d1 495aa: 228a movel %a2,%a1@ index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 495ac: 43e9 000c lea %a1@(12),%a1 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 495b0: b280 cmpl %d0,%d1 495b2: 67cc beqs 49580 <_Thread_queue_Initialize+0x38> <== NEVER TAKEN 495b4: 2400 movel %d0,%d2 495b6: 2200 movel %d0,%d1 index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 495b8: 5280 addql #1,%d0 495ba: e58a lsll #2,%d2 495bc: e989 lsll #4,%d1 head->next = tail; head->previous = NULL; 495be: 42a9 0004 clrl %a1@(4) RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); 495c2: 9282 subl %d2,%d1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); 495c4: 45f0 1800 lea %a0@(00000000,%d1:l),%a2 495c8: 234a 0008 movel %a2,%a1@(8) Chain_Node *tail = _Chain_Tail( the_chain ); 495cc: 45f0 1804 lea %a0@(00000004,%d1:l),%a2 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 495d0: 7204 moveq #4,%d1 495d2: 228a movel %a2,%a1@ index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++) 495d4: 43e9 000c lea %a1@(12),%a1 the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED; if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { uint32_t index; for( index=0 ; 495d8: b280 cmpl %d0,%d1 495da: 66b0 bnes 4958c <_Thread_queue_Initialize+0x44> 495dc: 60a2 bras 49580 <_Thread_queue_Initialize+0x38> ... =============================================================================== 0004cf98 <_Thread_queue_Process_timeout>: #include void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { 4cf98: 4e56 0000 linkw %fp,#0 4cf9c: 206e 0008 moveal %fp@(8),%a0 Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4cfa0: 2268 0044 moveal %a0@(68),%a1 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && 4cfa4: 2029 0030 movel %a1@(48),%d0 4cfa8: 6708 beqs 4cfb2 <_Thread_queue_Process_timeout+0x1a> 4cfaa: b1f9 0006 10d2 cmpal 610d2 <_Per_CPU_Information+0xc>,%a0 4cfb0: 6716 beqs 4cfc8 <_Thread_queue_Process_timeout+0x30><== ALWAYS TAKEN if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4cfb2: 2169 003c 0034 movel %a1@(60),%a0@(52) _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4cfb8: 2f08 movel %a0,%sp@- 4cfba: 2f09 movel %a1,%sp@- 4cfbc: 4eb9 0004 ce70 jsr 4ce70 <_Thread_queue_Extract> 4cfc2: 508f addql #8,%sp } } 4cfc4: 4e5e unlk %fp 4cfc6: 4e75 rts * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { 4cfc8: 7203 moveq #3,%d1 4cfca: b280 cmpl %d0,%d1 4cfcc: 67f6 beqs 4cfc4 <_Thread_queue_Process_timeout+0x2c><== NEVER TAKEN the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4cfce: 7002 moveq #2,%d0 } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } 4cfd0: 4e5e unlk %fp */ if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4cfd2: 2169 003c 0034 movel %a1@(60),%a0@(52) the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; 4cfd8: 2340 0030 movel %d0,%a1@(48) } } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); } } ... =============================================================================== 000495e0 <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 495e0: 4e56 fff0 linkw %fp,#-16 495e4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 495e8: 246e 0008 moveal %fp@(8),%a2 495ec: 266e 000c moveal %fp@(12),%a3 /* * Just in case the thread really wasn't blocked on a thread queue * when we get here. */ if ( !the_thread_queue ) 495f0: 4a8a tstl %a2 495f2: 6708 beqs 495fc <_Thread_queue_Requeue+0x1c> <== NEVER TAKEN /* * If queueing by FIFO, there is nothing to do. This only applies to * priority blocking discipline. */ if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { 495f4: 7001 moveq #1,%d0 495f6: b0aa 0034 cmpl %a2@(52),%d0 495fa: 670a beqs 49606 <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); } } 495fc: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 49602: 4e5e unlk %fp <== NOT EXECUTED 49604: 4e75 rts <== NOT EXECUTED if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; ISR_Level level_ignored; _ISR_Disable( level ); 49606: 303c 0700 movew #1792,%d0 4960a: 40c2 movew %sr,%d2 4960c: 8082 orl %d2,%d0 4960e: 46c0 movew %d0,%sr 49610: 202b 0010 movel %a3@(16),%d0 49614: 0280 0003 bee0 andil #245472,%d0 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4961a: 660c bnes 49628 <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); } _ISR_Enable( level ); 4961c: 46c2 movew %d2,%sr <== NOT EXECUTED } } 4961e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49624: 4e5e unlk %fp 49626: 4e75 rts ISR_Level level_ignored; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, true ); 49628: 4878 0001 pea 1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4962c: 7001 moveq #1,%d0 4962e: 2f0b movel %a3,%sp@- 49630: 2540 0030 movel %d0,%a2@(48) 49634: 2f0a movel %a2,%sp@- 49636: 4eb9 0004 cea8 jsr 4cea8 <_Thread_queue_Extract_priority_helper> (void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored ); 4963c: 486e fffc pea %fp@(-4) 49640: 2f0b movel %a3,%sp@- 49642: 2f0a movel %a2,%sp@- 49644: 4eb9 0004 9338 jsr 49338 <_Thread_queue_Enqueue_priority> 4964a: 4fef 0018 lea %sp@(24),%sp } _ISR_Enable( level ); 4964e: 46c2 movew %d2,%sr 49650: 60cc bras 4961e <_Thread_queue_Requeue+0x3e> ... =============================================================================== 00049654 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored __attribute__((unused)) ) { 49654: 4e56 fffc linkw %fp,#-4 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); 49658: 486e fffc pea %fp@(-4) 4965c: 2f2e 0008 movel %fp@(8),%sp@- 49660: 4eb9 0004 8db0 jsr 48db0 <_Thread_Get> switch ( location ) { 49666: 508f addql #8,%sp 49668: 4aae fffc tstl %fp@(-4) 4966c: 6618 bnes 49686 <_Thread_queue_Timeout+0x32> <== NEVER TAKEN #if defined(RTEMS_MULTIPROCESSING) case OBJECTS_REMOTE: /* impossible */ #endif break; case OBJECTS_LOCAL: _Thread_queue_Process_timeout( the_thread ); 4966e: 2f00 movel %d0,%sp@- 49670: 4eb9 0004 cf98 jsr 4cf98 <_Thread_queue_Process_timeout> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 49676: 588f addql #4,%sp 49678: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 4967e: 5380 subql #1,%d0 49680: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> _Thread_Unnest_dispatch(); break; } } 49686: 4e5e unlk %fp ... =============================================================================== 00059448 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 59448: 4e56 ffb0 linkw %fp,#-80 Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; tail->previous = head; 5944c: 41ee fff4 lea %fp@(-12),%a0 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 59450: 200e movel %fp,%d0 59452: 5180 subql #8,%d0 head->previous = NULL; tail->previous = head; 59454: 2d48 fffc movel %a0,%fp@(-4) 59458: 41ee ffec lea %fp@(-20),%a0 5945c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59460: 246e 0008 moveal %fp@(8),%a2 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 59464: 260e movel %fp,%d3 59466: 0683 ffff ffe8 addil #-24,%d3 5946c: 240a movel %a2,%d2 5946e: 2a0a movel %a2,%d5 59470: 4bf9 0005 da60 lea 5da60 <_Watchdog_Adjust_to_chain>,%a5 59476: 0682 0000 0030 addil #48,%d2 5947c: 0685 0000 0068 addil #104,%d5 59482: 47f9 0005 a078 lea 5a078 <_Chain_Get>,%a3 59488: 49f9 0005 dae8 lea 5dae8 <_Watchdog_Insert>,%a4 5948e: 2c00 movel %d0,%d6 * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 59490: 283c 0000 0700 movel #1792,%d4 59496: 2d48 ffd8 movel %a0,%fp@(-40) 5949a: 41ea 0008 lea %a2@(8),%a0 5949e: 2d48 ffe4 movel %a0,%fp@(-28) 594a2: 41ea 0040 lea %a2@(64),%a0 594a6: 2d48 ffe0 movel %a0,%fp@(-32) 594aa: 41ee ffec lea %fp@(-20),%a0 594ae: 2d40 fff4 movel %d0,%fp@(-12) head->previous = NULL; 594b2: 42ae fff8 clrl %fp@(-8) 594b6: 42ae ffec clrl %fp@(-20) tail->previous = head; 594ba: 2d43 fff0 movel %d3,%fp@(-16) ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 594be: 2d48 ffe8 movel %a0,%fp@(-24) { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 594c2: 41ee fff4 lea %fp@(-12),%a0 594c6: 2548 0078 movel %a0,%a2@(120) static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 594ca: 2039 0007 fcf6 movel 7fcf6 <_Watchdog_Ticks_since_boot>,%d0 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 594d0: 222a 003c movel %a2@(60),%d1 watchdogs->last_snapshot = snapshot; 594d4: 2540 003c movel %d0,%a2@(60) _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 594d8: 9081 subl %d1,%d0 594da: 2f03 movel %d3,%sp@- 594dc: 2f00 movel %d0,%sp@- 594de: 2f02 movel %d2,%sp@- 594e0: 4e95 jsr %a5@ static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 594e2: 2039 0007 fc76 movel 7fc76 <_TOD_Now>,%d0 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 594e8: 4fef 000c lea %sp@(12),%sp Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 594ec: 222a 0074 movel %a2@(116),%d1 /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 594f0: b280 cmpl %d0,%d1 594f2: 6500 0086 bcsw 5957a <_Timer_server_Body+0x132> * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); } else if ( snapshot < last_snapshot ) { 594f6: b280 cmpl %d0,%d1 594f8: 6200 00a4 bhiw 5959e <_Timer_server_Body+0x156> */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 594fc: 2540 0074 movel %d0,%a2@(116) } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59500: 202a 0078 movel %a2@(120),%d0 59504: 2f00 movel %d0,%sp@- 59506: 4e93 jsr %a3@ if ( timer == NULL ) { 59508: 588f addql #4,%sp 5950a: 4a80 tstl %d0 5950c: 672e beqs 5953c <_Timer_server_Body+0xf4> <== ALWAYS TAKEN static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 5950e: 2040 moveal %d0,%a0 <== NOT EXECUTED 59510: 7e01 moveq #1,%d7 <== NOT EXECUTED 59512: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 59516: be81 cmpl %d1,%d7 <== NOT EXECUTED 59518: 6700 00a8 beqw 595c2 <_Timer_server_Body+0x17a> <== NOT EXECUTED _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 5951c: 7e03 moveq #3,%d7 <== NOT EXECUTED 5951e: be81 cmpl %d1,%d7 <== NOT EXECUTED 59520: 66de bnes 59500 <_Timer_server_Body+0xb8> <== NOT EXECUTED _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59522: 2040 moveal %d0,%a0 <== NOT EXECUTED 59524: 4868 0010 pea %a0@(16) <== NOT EXECUTED 59528: 2f05 movel %d5,%sp@- <== NOT EXECUTED 5952a: 4e94 jsr %a4@ <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 5952c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 59530: 508f addql #8,%sp <== NOT EXECUTED } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 59532: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59534: 4e93 jsr %a3@ <== NOT EXECUTED if ( timer == NULL ) { 59536: 588f addql #4,%sp <== NOT EXECUTED 59538: 4a80 tstl %d0 <== NOT EXECUTED 5953a: 66d2 bnes 5950e <_Timer_server_Body+0xc6> <== NOT EXECUTED * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 5953c: 2004 movel %d4,%d0 5953e: 40c1 movew %sr,%d1 59540: 8081 orl %d1,%d0 59542: 46c0 movew %d0,%sr if ( _Chain_Is_empty( insert_chain ) ) { 59544: bcae fff4 cmpl %fp@(-12),%d6 59548: 6700 0086 beqw 595d0 <_Timer_server_Body+0x188> ts->insert_chain = NULL; _ISR_Enable( level ); break; } else { _ISR_Enable( level ); 5954c: 46c1 movew %d1,%sr <== NOT EXECUTED static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 5954e: 2039 0007 fcf6 movel 7fcf6 <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 59554: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED watchdogs->last_snapshot = snapshot; 59558: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5955c: 9081 subl %d1,%d0 <== NOT EXECUTED 5955e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59560: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59562: 2f02 movel %d2,%sp@- <== NOT EXECUTED 59564: 4e95 jsr %a5@ <== NOT EXECUTED static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59566: 2039 0007 fc76 movel 7fc76 <_TOD_Now>,%d0 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 5956c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 59570: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 59574: b280 cmpl %d0,%d1 <== NOT EXECUTED 59576: 6400 ff7e bccw 594f6 <_Timer_server_Body+0xae> <== NOT EXECUTED /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 5957a: 2f03 movel %d3,%sp@- 5957c: 2e00 movel %d0,%d7 5957e: 9e81 subl %d1,%d7 59580: 2f07 movel %d7,%sp@- 59582: 2d40 ffdc movel %d0,%fp@(-36) 59586: 2f05 movel %d5,%sp@- 59588: 4eb9 0005 da60 jsr 5da60 <_Watchdog_Adjust_to_chain> 5958e: 202e ffdc movel %fp@(-36),%d0 59592: 4fef 000c lea %sp@(12),%sp */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); } watchdogs->last_snapshot = snapshot; 59596: 2540 0074 movel %d0,%a2@(116) 5959a: 6000 ff64 braw 59500 <_Timer_server_Body+0xb8> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 5959e: 9280 subl %d0,%d1 595a0: 2f01 movel %d1,%sp@- 595a2: 4878 0001 pea 1 595a6: 2d40 ffdc movel %d0,%fp@(-36) 595aa: 2f05 movel %d5,%sp@- 595ac: 4eb9 0005 d9cc jsr 5d9cc <_Watchdog_Adjust> 595b2: 202e ffdc movel %fp@(-36),%d0 595b6: 4fef 000c lea %sp@(12),%sp } watchdogs->last_snapshot = snapshot; 595ba: 2540 0074 movel %d0,%a2@(116) 595be: 6000 ff40 braw 59500 <_Timer_server_Body+0xb8> Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 595c2: 4868 0010 pea %a0@(16) <== NOT EXECUTED 595c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 595c8: 4e94 jsr %a4@ <== NOT EXECUTED 595ca: 508f addql #8,%sp <== NOT EXECUTED 595cc: 6000 ff32 braw 59500 <_Timer_server_Body+0xb8> <== NOT EXECUTED */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { ts->insert_chain = NULL; 595d0: 42aa 0078 clrl %a2@(120) _ISR_Enable( level ); 595d4: 46c1 movew %d1,%sr _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 595d6: 202e ffd8 movel %fp@(-40),%d0 595da: b0ae ffe8 cmpl %fp@(-24),%d0 595de: 6752 beqs 59632 <_Timer_server_Body+0x1ea> /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 595e0: 2204 movel %d4,%d1 595e2: 40c0 movew %sr,%d0 595e4: 8280 orl %d0,%d1 595e6: 46c1 movew %d1,%sr initialized = false; } #endif return status; } 595e8: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 595ec: b1ee ffd8 cmpal %fp@(-40),%a0 595f0: 6732 beqs 59624 <_Timer_server_Body+0x1dc> <== NEVER TAKEN Chain_Control *the_chain ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; 595f2: 2250 moveal %a0@,%a1 head->next = new_first; new_first->previous = head; 595f4: 2343 0004 movel %d3,%a1@(4) * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; 595f8: 42a8 0008 clrl %a0@(8) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *old_first = head->next; Chain_Node *new_first = old_first->next; head->next = new_first; 595fc: 2d49 ffe8 movel %a1,%fp@(-24) _ISR_Enable( level ); 59600: 46c0 movew %d0,%sr /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 59602: 2f28 0024 movel %a0@(36),%sp@- 59606: 2f28 0020 movel %a0@(32),%sp@- 5960a: 2068 001c moveal %a0@(28),%a0 5960e: 4e90 jsr %a0@ } 59610: 508f addql #8,%sp /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 59612: 2204 movel %d4,%d1 59614: 40c0 movew %sr,%d0 59616: 8280 orl %d0,%d1 59618: 46c1 movew %d1,%sr initialized = false; } #endif return status; } 5961a: 206e ffe8 moveal %fp@(-24),%a0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 5961e: b1ee ffd8 cmpal %fp@(-40),%a0 59622: 66ce bnes 595f2 <_Timer_server_Body+0x1aa> watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { watchdog->state = WATCHDOG_INACTIVE; _ISR_Enable( level ); } else { _ISR_Enable( level ); 59624: 46c0 movew %d0,%sr { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 59626: 41ee fff4 lea %fp@(-12),%a0 5962a: 2548 0078 movel %a0,%a2@(120) 5962e: 6000 fe9a braw 594ca <_Timer_server_Body+0x82> * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); } } else { ts->active = false; 59632: 4207 clrb %d7 59634: 1547 007c moveb %d7,%a2@(124) 59638: 2039 0007 fbec movel 7fbec <_Thread_Dispatch_disable_level>,%d0 5963e: 5280 addql #1,%d0 59640: 23c0 0007 fbec movel %d0,7fbec <_Thread_Dispatch_disable_level> /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 59646: 4878 0008 pea 8 5964a: 2f12 movel %a2@,%sp@- 5964c: 4eb9 0005 d378 jsr 5d378 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 59652: 2f0a movel %a2,%sp@- 59654: 4eba fd1a jsr %pc@(59370 <_Timer_server_Reset_interval_system_watchdog>) _Timer_server_Reset_tod_system_watchdog( ts ); 59658: 2f0a movel %a2,%sp@- 5965a: 4eba fd7e jsr %pc@(593da <_Timer_server_Reset_tod_system_watchdog>) _Thread_Enable_dispatch(); 5965e: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> ts->active = true; 59664: 7001 moveq #1,%d0 59666: 1540 007c moveb %d0,%a2@(124) static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 5966a: 2f2e ffe4 movel %fp@(-28),%sp@- 5966e: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 59674: 2f2e ffe0 movel %fp@(-32),%sp@- 59678: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> 5967e: 4fef 0018 lea %sp@(24),%sp 59682: 6000 fe3e braw 594c2 <_Timer_server_Body+0x7a> =============================================================================== 00059686 <_Timer_server_Schedule_operation_method>: static void _Timer_server_Schedule_operation_method( Timer_server_Control *ts, Timer_Control *timer ) { 59686: 4e56 fff0 linkw %fp,#-16 5968a: 206e 000c moveal %fp@(12),%a0 5968e: 48d7 041c moveml %d2-%d4/%a2,%sp@ 59692: 246e 0008 moveal %fp@(8),%a2 if ( ts->insert_chain == NULL ) { 59696: 202a 0078 movel %a2@(120),%d0 5969a: 671a beqs 596b6 <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 5969c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 596a0: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED } } 596a4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 596aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED } } 596ae: 4e5e unlk %fp <== NOT EXECUTED * server is not preemptible, so we must be in interrupt context here. No * thread dispatch will happen until the timer server finishes its * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); 596b0: 4ef9 0005 a018 jmp 5a018 <_Chain_Append> <== NOT EXECUTED 596b6: 2039 0007 fbec movel 7fbec <_Thread_Dispatch_disable_level>,%d0 596bc: 5280 addql #1,%d0 596be: 23c0 0007 fbec movel %d0,7fbec <_Thread_Dispatch_disable_level> * being inserted. This could result in an integer overflow. */ _Thread_Disable_dispatch(); if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 596c4: 2028 0038 movel %a0@(56),%d0 596c8: 7201 moveq #1,%d1 596ca: b280 cmpl %d0,%d1 596cc: 6700 008a beqw 59758 <_Timer_server_Schedule_operation_method+0xd2> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); if ( !ts->active ) { _Timer_server_Reset_interval_system_watchdog( ts ); } } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 596d0: 7803 moveq #3,%d4 596d2: b880 cmpl %d0,%d4 596d4: 670e beqs 596e4 <_Timer_server_Schedule_operation_method+0x5e> * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 596d6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596dc: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 596de: 4ef9 0005 c9ce jmp 5c9ce <_Thread_Enable_dispatch> } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { /* * We have to advance the last known seconds value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 596e4: 203c 0000 0700 movel #1792,%d0 596ea: 40c2 movew %sr,%d2 596ec: 8082 orl %d2,%d0 596ee: 46c0 movew %d0,%sr RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 596f0: 260a movel %a2,%d3 596f2: 0683 0000 006c addil #108,%d3 snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 596f8: 2039 0007 fc76 movel 7fc76 <_TOD_Now>,%d0 last_snapshot = ts->TOD_watchdogs.last_snapshot; 596fe: 222a 0074 movel %a2@(116),%d1 initialized = false; } #endif return status; } 59702: 226a 0068 moveal %a2@(104),%a1 * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); last_snapshot = ts->TOD_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) { 59706: b689 cmpl %a1,%d3 59708: 671c beqs 59726 <_Timer_server_Schedule_operation_method+0xa0> first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain ); delta_interval = first_watchdog->delta_interval; 5970a: 2629 0010 movel %a1@(16),%d3 if ( snapshot > last_snapshot ) { 5970e: b280 cmpl %d0,%d1 59710: 6400 00ba bccw 597cc <_Timer_server_Schedule_operation_method+0x146> /* * We advanced in time. */ delta = snapshot - last_snapshot; 59714: 2800 movel %d0,%d4 59716: 9881 subl %d1,%d4 if (delta_interval > delta) { 59718: b883 cmpl %d3,%d4 5971a: 6400 00bc bccw 597d8 <_Timer_server_Schedule_operation_method+0x152> delta_interval -= delta; 5971e: 9684 subl %d4,%d3 59720: 2203 movel %d3,%d1 * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 59722: 2341 0010 movel %d1,%a1@(16) } ts->TOD_watchdogs.last_snapshot = snapshot; 59726: 2540 0074 movel %d0,%a2@(116) _ISR_Enable( level ); 5972a: 46c2 movew %d2,%sr _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 5972c: 4868 0010 pea %a0@(16) 59730: 486a 0068 pea %a2@(104) 59734: 4eb9 0005 dae8 jsr 5dae8 <_Watchdog_Insert> if ( !ts->active ) { 5973a: 508f addql #8,%sp 5973c: 102a 007c moveb %a2@(124),%d0 59740: 6694 bnes 596d6 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_tod_system_watchdog( ts ); 59742: 2f0a movel %a2,%sp@- 59744: 4eba fc94 jsr %pc@(593da <_Timer_server_Reset_tod_system_watchdog>) 59748: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 5974a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59750: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 59752: 4ef9 0005 c9ce jmp 5c9ce <_Thread_Enable_dispatch> if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { /* * We have to advance the last known ticks value of the server and update * the watchdog chain accordingly. */ _ISR_Disable( level ); 59758: 203c 0000 0700 movel #1792,%d0 5975e: 40c3 movew %sr,%d3 59760: 8083 orl %d3,%d0 59762: 46c0 movew %d0,%sr snapshot = _Watchdog_Ticks_since_boot; 59764: 2039 0007 fcf6 movel 7fcf6 <_Watchdog_Ticks_since_boot>,%d0 5976a: 220a movel %a2,%d1 5976c: 0681 0000 0034 addil #52,%d1 last_snapshot = ts->Interval_watchdogs.last_snapshot; 59772: 282a 003c movel %a2@(60),%d4 initialized = false; } #endif return status; } 59776: 226a 0030 moveal %a2@(48),%a1 * the watchdog chain accordingly. */ _ISR_Disable( level ); snapshot = _Watchdog_Ticks_since_boot; last_snapshot = ts->Interval_watchdogs.last_snapshot; if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) { 5977a: b289 cmpl %a1,%d1 5977c: 6712 beqs 59790 <_Timer_server_Schedule_operation_method+0x10a> first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain ); /* * We assume adequate unsigned arithmetic here. */ delta = snapshot - last_snapshot; 5977e: 2200 movel %d0,%d1 59780: 9284 subl %d4,%d1 delta_interval = first_watchdog->delta_interval; 59782: 2429 0010 movel %a1@(16),%d2 if (delta_interval > delta) { 59786: b481 cmpl %d1,%d2 59788: 633a blss 597c4 <_Timer_server_Schedule_operation_method+0x13e><== NEVER TAKEN delta_interval -= delta; 5978a: 9481 subl %d1,%d2 } else { delta_interval = 0; } first_watchdog->delta_interval = delta_interval; 5978c: 2342 0010 movel %d2,%a1@(16) } ts->Interval_watchdogs.last_snapshot = snapshot; 59790: 2540 003c movel %d0,%a2@(60) _ISR_Enable( level ); 59794: 46c3 movew %d3,%sr _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 59796: 4868 0010 pea %a0@(16) 5979a: 486a 0030 pea %a2@(48) 5979e: 4eb9 0005 dae8 jsr 5dae8 <_Watchdog_Insert> if ( !ts->active ) { 597a4: 508f addql #8,%sp 597a6: 102a 007c moveb %a2@(124),%d0 597aa: 6600 ff2a bnew 596d6 <_Timer_server_Schedule_operation_method+0x50> _Timer_server_Reset_interval_system_watchdog( ts ); 597ae: 2f0a movel %a2,%sp@- 597b0: 4eba fbbe jsr %pc@(59370 <_Timer_server_Reset_interval_system_watchdog>) 597b4: 588f addql #4,%sp * critical section. We have to use the protected chain methods because * we may be interrupted by a higher priority interrupt. */ _Chain_Append( ts->insert_chain, &timer->Object.Node ); } } 597b6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 597bc: 4e5e unlk %fp if ( !ts->active ) { _Timer_server_Reset_tod_system_watchdog( ts ); } } _Thread_Enable_dispatch(); 597be: 4ef9 0005 c9ce jmp 5c9ce <_Thread_Enable_dispatch> delta_interval = first_watchdog->delta_interval; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 597c4: 4282 clrl %d2 } first_watchdog->delta_interval = delta_interval; 597c6: 2342 0010 movel %d2,%a1@(16) 597ca: 60c4 bras 59790 <_Timer_server_Schedule_operation_method+0x10a> } } else { /* * Someone put us in the past. */ delta = last_snapshot - snapshot; 597cc: d283 addl %d3,%d1 delta_interval += delta; 597ce: 9280 subl %d0,%d1 } first_watchdog->delta_interval = delta_interval; 597d0: 2341 0010 movel %d1,%a1@(16) 597d4: 6000 ff50 braw 59726 <_Timer_server_Schedule_operation_method+0xa0> */ delta = snapshot - last_snapshot; if (delta_interval > delta) { delta_interval -= delta; } else { delta_interval = 0; 597d8: 4281 clrl %d1 <== NOT EXECUTED * Someone put us in the past. */ delta = last_snapshot - snapshot; delta_interval += delta; } first_watchdog->delta_interval = delta_interval; 597da: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED 597de: 6000 ff46 braw 59726 <_Timer_server_Schedule_operation_method+0xa0><== NOT EXECUTED =============================================================================== 00049ad6 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49ad6: 4e56 fff0 linkw %fp,#-16 49ada: 48d7 041c moveml %d2-%d4/%a2,%sp@ 49ade: 242e 0008 movel %fp@(8),%d2 49ae2: 262e 0010 movel %fp@(16),%d3 the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 49ae6: 2479 0006 0dc0 moveal 60dc0 <_User_extensions_List+0x8>,%a2 void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 49aec: 182e 000f moveb %fp@(15),%d4 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49af0: b5fc 0006 0db8 cmpal #396728,%a2 49af6: 6726 beqs 49b1e <_User_extensions_Fatal+0x48> <== NEVER TAKEN the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49af8: 0284 0000 00ff andil #255,%d4 !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 49afe: 206a 0030 moveal %a2@(48),%a0 49b02: 4a88 tstl %a0 49b04: 670c beqs 49b12 <_User_extensions_Fatal+0x3c> (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 49b06: 2f03 movel %d3,%sp@- 49b08: 2f04 movel %d4,%sp@- 49b0a: 2f02 movel %d2,%sp@- 49b0c: 4e90 jsr %a0@ 49b0e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49b12: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49b16: b5fc 0006 0db8 cmpal #396728,%a2 49b1c: 66e0 bnes 49afe <_User_extensions_Fatal+0x28> <== ALWAYS TAKEN the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 49b1e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 49b24: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049994 <_User_extensions_Handler_initialization>: #include #include #include void _User_extensions_Handler_initialization(void) { 49994: 4e56 ffec linkw %fp,#-20 head->next = tail; 49998: 203c 0006 0dbc movel #396732,%d0 4999e: 23c0 0006 0db8 movel %d0,60db8 <_User_extensions_List> head->previous = NULL; tail->previous = head; 499a4: 203c 0006 0db8 movel #396728,%d0 499aa: 23c0 0006 0dc0 movel %d0,60dc0 <_User_extensions_List+0x8> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 499b0: 203c 0006 0c70 movel #396400,%d0 499b6: 23c0 0006 0c6c movel %d0,60c6c <_User_extensions_Switches_list> head->previous = NULL; tail->previous = head; 499bc: 203c 0006 0c6c movel #396396,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 499c2: 42b9 0006 0dbc clrl 60dbc <_User_extensions_List+0x4> 499c8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ User_extensions_Control *extension; uint32_t i; uint32_t number_of_extensions; User_extensions_Table *initial_extensions; number_of_extensions = Configuration.number_of_initial_extensions; 499cc: 2439 0005 f3aa movel 5f3aa ,%d2 initial_extensions = Configuration.User_extension_table; 499d2: 2639 0005 f3ae movel 5f3ae ,%d3 499d8: 42b9 0006 0c70 clrl 60c70 <_User_extensions_Switches_list+0x4> tail->previous = head; 499de: 23c0 0006 0c74 movel %d0,60c74 <_User_extensions_Switches_list+0x8> _Chain_Initialize_empty( &_User_extensions_List ); _Chain_Initialize_empty( &_User_extensions_Switches_list ); if ( initial_extensions ) { 499e4: 4a83 tstl %d3 499e6: 6764 beqs 49a4c <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN extension = (User_extensions_Control *) _Workspace_Allocate_or_fatal_error( 499e8: 7834 moveq #52,%d4 499ea: 4c02 4800 mulsl %d2,%d4 499ee: 2f04 movel %d4,%sp@- 499f0: 4eb9 0004 9f58 jsr 49f58 <_Workspace_Allocate_or_fatal_error> 499f6: 2440 moveal %d0,%a2 number_of_extensions * sizeof( User_extensions_Control ) ); memset ( 499f8: 2f04 movel %d4,%sp@- 499fa: 42a7 clrl %sp@- 499fc: 2f00 movel %d0,%sp@- 499fe: 4eb9 0004 f4ec jsr 4f4ec extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49a04: 4fef 0010 lea %sp@(16),%sp 49a08: 4a82 tstl %d2 49a0a: 6740 beqs 49a4c <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN 49a0c: 4284 clrl %d4 49a0e: 47f9 0004 d070 lea 4d070 <_User_extensions_Add_set>,%a3 RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table( User_extensions_Control *extension, const User_extensions_Table *extension_table ) { extension->Callouts = *extension_table; 49a14: 2043 moveal %d3,%a0 49a16: 5284 addql #1,%d4 49a18: 0683 0000 0020 addil #32,%d3 49a1e: 2558 0014 movel %a0@+,%a2@(20) 49a22: 2558 0018 movel %a0@+,%a2@(24) 49a26: 2558 001c movel %a0@+,%a2@(28) 49a2a: 2558 0020 movel %a0@+,%a2@(32) 49a2e: 2558 0024 movel %a0@+,%a2@(36) 49a32: 2558 0028 movel %a0@+,%a2@(40) 49a36: 2558 002c movel %a0@+,%a2@(44) 49a3a: 2550 0030 movel %a0@,%a2@(48) _User_extensions_Add_set( extension ); 49a3e: 2f0a movel %a2,%sp@- _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; 49a40: 45ea 0034 lea %a2@(52),%a2 49a44: 4e93 jsr %a3@ extension, 0, number_of_extensions * sizeof( User_extensions_Control ) ); for ( i = 0 ; i < number_of_extensions ; i++ ) { 49a46: 588f addql #4,%sp 49a48: b882 cmpl %d2,%d4 49a4a: 65c8 bcss 49a14 <_User_extensions_Handler_initialization+0x80> _User_extensions_Add_set_with_table (extension, &initial_extensions[i]); extension++; } } } 49a4c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 49a52: 4e5e unlk %fp ... =============================================================================== 00049a58 <_User_extensions_Thread_begin>: #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 49a58: 4e56 0000 linkw %fp,#0 49a5c: 2f0a movel %a2,%sp@- the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 49a5e: 2479 0006 0db8 moveal 60db8 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_begin ( Thread_Control *executing ) { 49a64: 2f02 movel %d2,%sp@- 49a66: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49a6a: b5fc 0006 0dbc cmpal #396732,%a2 49a70: 6718 beqs 49a8a <_User_extensions_Thread_begin+0x32><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) 49a72: 206a 0028 moveal %a2@(40),%a0 49a76: 4a88 tstl %a0 49a78: 6706 beqs 49a80 <_User_extensions_Thread_begin+0x28> (*the_extension->Callouts.thread_begin)( executing ); 49a7a: 2f02 movel %d2,%sp@- 49a7c: 4e90 jsr %a0@ 49a7e: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49a80: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49a82: b5fc 0006 0dbc cmpal #396732,%a2 49a88: 66e8 bnes 49a72 <_User_extensions_Thread_begin+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_begin != NULL ) (*the_extension->Callouts.thread_begin)( executing ); } } 49a8a: 242e fff8 movel %fp@(-8),%d2 49a8e: 246e fffc moveal %fp@(-4),%a2 49a92: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049b28 <_User_extensions_Thread_create>: #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49b28: 4e56 0000 linkw %fp,#0 49b2c: 2f0a movel %a2,%sp@- return false; } } return true; } 49b2e: 2479 0006 0db8 moveal 60db8 <_User_extensions_List>,%a2 #include bool _User_extensions_Thread_create ( Thread_Control *the_thread ) { 49b34: 2f02 movel %d2,%sp@- 49b36: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49b3a: b5fc 0006 0dbc cmpal #396732,%a2 49b40: 6722 beqs 49b64 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 49b42: 206a 0014 moveal %a2@(20),%a0 49b46: 4a88 tstl %a0 49b48: 6710 beqs 49b5a <_User_extensions_Thread_create+0x32> status = (*the_extension->Callouts.thread_create)( 49b4a: 2f02 movel %d2,%sp@- 49b4c: 2f39 0006 10d2 movel 610d2 <_Per_CPU_Information+0xc>,%sp@- 49b52: 4e90 jsr %a0@ _Thread_Executing, the_thread ); if ( !status ) 49b54: 508f addql #8,%sp 49b56: 4a00 tstb %d0 49b58: 6718 beqs 49b72 <_User_extensions_Thread_create+0x4a> User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49b5a: 2452 moveal %a2@,%a2 { Chain_Node *the_node; User_extensions_Control *the_extension; bool status; for ( the_node = _Chain_First( &_User_extensions_List ); 49b5c: b5fc 0006 0dbc cmpal #396732,%a2 49b62: 66de bnes 49b42 <_User_extensions_Thread_create+0x1a> return false; } } return true; } 49b64: 242e fff8 movel %fp@(-8),%d2 49b68: 246e fffc moveal %fp@(-4),%a2 49b6c: 4e5e unlk %fp if ( !status ) return false; } } return true; 49b6e: 7001 moveq #1,%d0 } 49b70: 4e75 rts 49b72: 242e fff8 movel %fp@(-8),%d2 49b76: 246e fffc moveal %fp@(-4),%a2 49b7a: 4e5e unlk %fp status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) return false; 49b7c: 4200 clrb %d0 <== NOT EXECUTED } } return true; } =============================================================================== 00049b80 <_User_extensions_Thread_delete>: #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 49b80: 4e56 0000 linkw %fp,#0 49b84: 2f0a movel %a2,%sp@- (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 49b86: 2479 0006 0dc0 moveal 60dc0 <_User_extensions_List+0x8>,%a2 #include void _User_extensions_Thread_delete ( Thread_Control *the_thread ) { 49b8c: 2f02 movel %d2,%sp@- 49b8e: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49b92: b5fc 0006 0db8 cmpal #396728,%a2 49b98: 6720 beqs 49bba <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_delete != NULL ) 49b9a: 206a 0020 moveal %a2@(32),%a0 49b9e: 4a88 tstl %a0 49ba0: 670c beqs 49bae <_User_extensions_Thread_delete+0x2e> (*the_extension->Callouts.thread_delete)( 49ba2: 2f02 movel %d2,%sp@- 49ba4: 2f39 0006 10d2 movel 610d2 <_Per_CPU_Information+0xc>,%sp@- 49baa: 4e90 jsr %a0@ 49bac: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49bae: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49bb2: b5fc 0006 0db8 cmpal #396728,%a2 49bb8: 66e0 bnes 49b9a <_User_extensions_Thread_delete+0x1a> (*the_extension->Callouts.thread_delete)( _Thread_Executing, the_thread ); } } 49bba: 242e fff8 movel %fp@(-8),%d2 49bbe: 246e fffc moveal %fp@(-4),%a2 49bc2: 4e5e unlk %fp ... =============================================================================== 00049a96 <_User_extensions_Thread_exitted>: void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 49a96: 4e56 0000 linkw %fp,#0 49a9a: 2f0a movel %a2,%sp@- the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 49a9c: 2479 0006 0dc0 moveal 60dc0 <_User_extensions_List+0x8>,%a2 } void _User_extensions_Thread_exitted ( Thread_Control *executing ) { 49aa2: 2f02 movel %d2,%sp@- 49aa4: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49aa8: b5fc 0006 0db8 cmpal #396728,%a2 49aae: 671a beqs 49aca <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) 49ab0: 206a 002c moveal %a2@(44),%a0 49ab4: 4a88 tstl %a0 49ab6: 6706 beqs 49abe <_User_extensions_Thread_exitted+0x28> (*the_extension->Callouts.thread_exitted)( executing ); 49ab8: 2f02 movel %d2,%sp@- 49aba: 4e90 jsr %a0@ 49abc: 588f addql #4,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 49abe: 246a 0004 moveal %a2@(4),%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_Last( &_User_extensions_List ); 49ac2: b5fc 0006 0db8 cmpal #396728,%a2 49ac8: 66e6 bnes 49ab0 <_User_extensions_Thread_exitted+0x1a> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_exitted != NULL ) (*the_extension->Callouts.thread_exitted)( executing ); } } 49aca: 242e fff8 movel %fp@(-8),%d2 49ace: 246e fffc moveal %fp@(-4),%a2 49ad2: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004a86c <_User_extensions_Thread_restart>: #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a86c: 4e56 0000 linkw %fp,#0 4a870: 2f0a movel %a2,%sp@- (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4a872: 2479 0006 1d50 moveal 61d50 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_restart ( Thread_Control *the_thread ) { 4a878: 2f02 movel %d2,%sp@- 4a87a: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a87e: b5fc 0006 1d54 cmpal #400724,%a2 4a884: 671e beqs 4a8a4 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_restart != NULL ) 4a886: 206a 001c moveal %a2@(28),%a0 4a88a: 4a88 tstl %a0 4a88c: 670c beqs 4a89a <_User_extensions_Thread_restart+0x2e> (*the_extension->Callouts.thread_restart)( 4a88e: 2f02 movel %d2,%sp@- 4a890: 2f39 0006 206a movel 6206a <_Per_CPU_Information+0xc>,%sp@- 4a896: 4e90 jsr %a0@ 4a898: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4a89a: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 4a89c: b5fc 0006 1d54 cmpal #400724,%a2 4a8a2: 66e2 bnes 4a886 <_User_extensions_Thread_restart+0x1a> (*the_extension->Callouts.thread_restart)( _Thread_Executing, the_thread ); } } 4a8a4: 242e fff8 movel %fp@(-8),%d2 4a8a8: 246e fffc moveal %fp@(-4),%a2 4a8ac: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049bc8 <_User_extensions_Thread_start>: #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 49bc8: 4e56 0000 linkw %fp,#0 49bcc: 2f0a movel %a2,%sp@- (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 49bce: 2479 0006 0db8 moveal 60db8 <_User_extensions_List>,%a2 #include void _User_extensions_Thread_start ( Thread_Control *the_thread ) { 49bd4: 2f02 movel %d2,%sp@- 49bd6: 242e 0008 movel %fp@(8),%d2 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49bda: b5fc 0006 0dbc cmpal #396732,%a2 49be0: 671e beqs 49c00 <_User_extensions_Thread_start+0x38><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_start != NULL ) 49be2: 206a 0018 moveal %a2@(24),%a0 49be6: 4a88 tstl %a0 49be8: 670c beqs 49bf6 <_User_extensions_Thread_start+0x2e> (*the_extension->Callouts.thread_start)( 49bea: 2f02 movel %d2,%sp@- 49bec: 2f39 0006 10d2 movel 610d2 <_Per_CPU_Information+0xc>,%sp@- 49bf2: 4e90 jsr %a0@ 49bf4: 508f addql #8,%sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 49bf6: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _Chain_First( &_User_extensions_List ); 49bf8: b5fc 0006 0dbc cmpal #396732,%a2 49bfe: 66e2 bnes 49be2 <_User_extensions_Thread_start+0x1a> (*the_extension->Callouts.thread_start)( _Thread_Executing, the_thread ); } } 49c00: 242e fff8 movel %fp@(-8),%d2 49c04: 246e fffc moveal %fp@(-4),%a2 49c08: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049c0c <_User_extensions_Thread_switch>: void _User_extensions_Thread_switch ( Thread_Control *executing, Thread_Control *heir ) { 49c0c: 4e56 fff4 linkw %fp,#-12 49c10: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49c14: 262e 0008 movel %fp@(8),%d3 49c18: 242e 000c movel %fp@(12),%d2 the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 49c1c: 2479 0006 0c6c moveal 60c6c <_User_extensions_Switches_list>,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 49c22: b5fc 0006 0c70 cmpal #396400,%a2 49c28: 6716 beqs 49c40 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); 49c2a: 2f02 movel %d2,%sp@- 49c2c: 2f03 movel %d3,%sp@- 49c2e: 206a 0008 moveal %a2@(8),%a0 49c32: 4e90 jsr %a0@ Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); !_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ; the_node = the_node->next ) { 49c34: 2452 moveal %a2@,%a2 ) { Chain_Node *the_node; User_extensions_Switch_control *the_extension_switch; for ( the_node = _Chain_First( &_User_extensions_Switches_list ); 49c36: 508f addql #8,%sp 49c38: b5fc 0006 0c70 cmpal #396400,%a2 49c3e: 66ea bnes 49c2a <_User_extensions_Thread_switch+0x1e> the_extension_switch = (User_extensions_Switch_control *) the_node; (*the_extension_switch->thread_switch)( executing, heir ); } } 49c40: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49c46: 4e5e unlk %fp ... =============================================================================== 0004b828 <_Watchdog_Adjust>: void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b828: 4e56 ffe8 linkw %fp,#-24 4b82c: 226e 000c moveal %fp@(12),%a1 4b830: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ ISR_Level level; _ISR_Disable( level ); 4b834: 283c 0000 0700 movel #1792,%d4 4b83a: 2004 movel %d4,%d0 void _Watchdog_Adjust( Chain_Control *header, Watchdog_Adjust_directions direction, Watchdog_Interval units ) { 4b83c: 266e 0008 moveal %fp@(8),%a3 4b840: 242e 0010 movel %fp@(16),%d2 ISR_Level level; _ISR_Disable( level ); 4b844: 40c1 movew %sr,%d1 4b846: 8081 orl %d1,%d0 4b848: 46c0 movew %d0,%sr } } _ISR_Enable( level ); } 4b84a: 244b moveal %a3,%a2 4b84c: 205a moveal %a2@+,%a0 * hence the compiler must not assume *header to remain * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { 4b84e: b5c8 cmpal %a0,%a2 4b850: 6748 beqs 4b89a <_Watchdog_Adjust+0x72> switch ( direction ) { 4b852: 4a89 tstl %a1 4b854: 6650 bnes 4b8a6 <_Watchdog_Adjust+0x7e> case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b856: 4a82 tstl %d2 4b858: 6740 beqs 4b89a <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b85a: 2628 0010 movel %a0@(16),%d3 4b85e: 49f9 0004 bab0 lea 4bab0 <_Watchdog_Tickle>,%a4 4b864: b682 cmpl %d2,%d3 4b866: 622c bhis 4b894 <_Watchdog_Adjust+0x6c> <== NEVER TAKEN _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; _Watchdog_First( header )->delta_interval = 1; 4b868: 7001 moveq #1,%d0 4b86a: 2140 0010 movel %d0,%a0@(16) _ISR_Enable( level ); 4b86e: 46c1 movew %d1,%sr _Watchdog_Tickle( header ); 4b870: 2f0b movel %a3,%sp@- 4b872: 4e94 jsr %a4@ _ISR_Disable( level ); 4b874: 2004 movel %d4,%d0 4b876: 40c1 movew %sr,%d1 4b878: 8081 orl %d1,%d0 4b87a: 46c0 movew %d0,%sr if ( _Chain_Is_empty( header ) ) 4b87c: 588f addql #4,%sp while ( units ) { if ( units < _Watchdog_First( header )->delta_interval ) { _Watchdog_First( header )->delta_interval -= units; break; } else { units -= _Watchdog_First( header )->delta_interval; 4b87e: 9483 subl %d3,%d2 } } _ISR_Enable( level ); } 4b880: 2013 movel %a3@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 4b882: 2040 moveal %d0,%a0 _Watchdog_Tickle( header ); _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 4b884: b08a cmpl %a2,%d0 4b886: 6712 beqs 4b89a <_Watchdog_Adjust+0x72> switch ( direction ) { case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; break; case WATCHDOG_FORWARD: while ( units ) { 4b888: 4a82 tstl %d2 4b88a: 670e beqs 4b89a <_Watchdog_Adjust+0x72> <== NEVER TAKEN if ( units < _Watchdog_First( header )->delta_interval ) { 4b88c: 2628 0010 movel %a0@(16),%d3 4b890: b483 cmpl %d3,%d2 4b892: 64d4 bccs 4b868 <_Watchdog_Adjust+0x40> _Watchdog_First( header )->delta_interval -= units; 4b894: 9682 subl %d2,%d3 4b896: 2143 0010 movel %d3,%a0@(16) } break; } } _ISR_Enable( level ); 4b89a: 46c1 movew %d1,%sr } 4b89c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b8a2: 4e5e unlk %fp 4b8a4: 4e75 rts * unmodified across that call. * * Till Straumann, 7/2003 */ if ( !_Chain_Is_empty( header ) ) { switch ( direction ) { 4b8a6: 7001 moveq #1,%d0 4b8a8: b089 cmpl %a1,%d0 4b8aa: 66ee bnes 4b89a <_Watchdog_Adjust+0x72> <== NEVER TAKEN case WATCHDOG_BACKWARD: _Watchdog_First( header )->delta_interval += units; 4b8ac: d5a8 0010 addl %d2,%a0@(16) } break; } } _ISR_Enable( level ); 4b8b0: 46c1 movew %d1,%sr } 4b8b2: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b8b8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00049c4c <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 49c4c: 4e56 ffec linkw %fp,#-20 49c50: 226e 000c moveal %fp@(12),%a1 49c54: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49c58: 246e 0008 moveal %fp@(8),%a2 Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; _ISR_Disable( level ); 49c5c: 2a3c 0000 0700 movel #1792,%d5 49c62: 2005 movel %d5,%d0 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 49c64: 2839 0006 10ce movel 610ce <_Per_CPU_Information+0x8>,%d4 _ISR_Disable( level ); 49c6a: 40c3 movew %sr,%d3 49c6c: 8083 orl %d3,%d0 49c6e: 46c0 movew %d0,%sr /* * 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 ) { 49c70: 4aa9 0008 tstl %a1@(8) 49c74: 6600 00c6 bnew 49d3c <_Watchdog_Insert+0xf0> _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 49c78: 2039 0006 0d6e movel 60d6e <_Watchdog_Sync_count>,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49c7e: 7201 moveq #1,%d1 _Watchdog_Sync_count++; 49c80: 5280 addql #1,%d0 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 49c82: 2341 0008 movel %d1,%a1@(8) _Watchdog_Sync_count++; 49c86: 23c0 0006 0d6e movel %d0,60d6e <_Watchdog_Sync_count> restart: delta_interval = the_watchdog->initial; 49c8c: 2029 000c movel %a1@(12),%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 49c90: 2052 moveal %a2@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49c92: 6764 beqs 49cf8 <_Watchdog_Insert+0xac> 49c94: 4a90 tstl %a0@ 49c96: 6760 beqs 49cf8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49c98: 2228 0010 movel %a0@(16),%d1 49c9c: b280 cmpl %d0,%d1 49c9e: 6252 bhis 49cf2 <_Watchdog_Insert+0xa6> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 49ca0: 2405 movel %d5,%d2 49ca2: 46c3 movew %d3,%sr 49ca4: 8483 orl %d3,%d2 49ca6: 46c2 movew %d2,%sr if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49ca8: 7401 moveq #1,%d2 49caa: b4a9 0008 cmpl %a1@(8),%d2 49cae: 666e bnes 49d1e <_Watchdog_Insert+0xd2> goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49cb0: 2439 0006 0d0c movel 60d0c <_Watchdog_Sync_level>,%d2 49cb6: b484 cmpl %d4,%d2 49cb8: 6230 bhis 49cea <_Watchdog_Insert+0x9e> if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49cba: 9081 subl %d1,%d0 exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 49cbc: 2050 moveal %a0@,%a0 for ( after = _Watchdog_First( header ) ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 49cbe: 4a80 tstl %d0 49cc0: 6736 beqs 49cf8 <_Watchdog_Insert+0xac> 49cc2: 4a90 tstl %a0@ 49cc4: 6732 beqs 49cf8 <_Watchdog_Insert+0xac> break; if ( delta_interval < after->delta_interval ) { 49cc6: 2228 0010 movel %a0@(16),%d1 49cca: b081 cmpl %d1,%d0 49ccc: 6524 bcss 49cf2 <_Watchdog_Insert+0xa6> break; } delta_interval -= after->delta_interval; _ISR_Flash( level ); 49cce: 2405 movel %d5,%d2 49cd0: 46c3 movew %d3,%sr 49cd2: 8483 orl %d3,%d2 49cd4: 46c2 movew %d2,%sr if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; break; } delta_interval -= after->delta_interval; 49cd6: 9081 subl %d1,%d0 _ISR_Flash( level ); if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 49cd8: 7201 moveq #1,%d1 49cda: b2a9 0008 cmpl %a1@(8),%d1 49cde: 663e bnes 49d1e <_Watchdog_Insert+0xd2> <== NEVER TAKEN goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 49ce0: 2239 0006 0d0c movel 60d0c <_Watchdog_Sync_level>,%d1 49ce6: b284 cmpl %d4,%d1 49ce8: 63d2 blss 49cbc <_Watchdog_Insert+0x70> <== ALWAYS TAKEN _Watchdog_Sync_level = insert_isr_nest_level; 49cea: 23c4 0006 0d0c movel %d4,60d0c <_Watchdog_Sync_level> goto restart; 49cf0: 609a bras 49c8c <_Watchdog_Insert+0x40> if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 49cf2: 9280 subl %d0,%d1 49cf4: 2141 0010 movel %d1,%a0@(16) _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 49cf8: 2068 0004 moveal %a0@(4),%a0 RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 49cfc: 7402 moveq #2,%d2 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 49cfe: 2450 moveal %a0@,%a2 } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 49d00: 2340 0010 movel %d0,%a1@(16) _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 49d04: 2039 0006 0d72 movel 60d72 <_Watchdog_Ticks_since_boot>,%d0 49d0a: 2342 0008 movel %d2,%a1@(8) Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 49d0e: 2348 0004 movel %a0,%a1@(4) before_node = after_node->next; after_node->next = the_node; 49d12: 2089 movel %a1,%a0@ the_node->next = before_node; before_node->previous = the_node; 49d14: 2549 0004 movel %a1,%a2@(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; 49d18: 228a movel %a2,%a1@ 49d1a: 2340 0014 movel %d0,%a1@(20) exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 49d1e: 23c4 0006 0d0c movel %d4,60d0c <_Watchdog_Sync_level> _Watchdog_Sync_count--; 49d24: 2039 0006 0d6e movel 60d6e <_Watchdog_Sync_count>,%d0 49d2a: 5380 subql #1,%d0 49d2c: 23c0 0006 0d6e movel %d0,60d6e <_Watchdog_Sync_count> _ISR_Enable( level ); 49d32: 46c3 movew %d3,%sr } 49d34: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49d38: 4e5e unlk %fp 49d3a: 4e75 rts * 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 ); 49d3c: 46c3 movew %d3,%sr exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; _ISR_Enable( level ); } 49d3e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49d42: 4e5e unlk %fp ... =============================================================================== 00049da0 <_Watchdog_Remove>: { ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 49da0: 203c 0000 0700 movel #1792,%d0 */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 49da6: 4e56 0000 linkw %fp,#0 49daa: 206e 0008 moveal %fp@(8),%a0 49dae: 2f0a movel %a2,%sp@- 49db0: 2f02 movel %d2,%sp@- ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 49db2: 40c1 movew %sr,%d1 49db4: 8081 orl %d1,%d0 49db6: 46c0 movew %d0,%sr previous_state = the_watchdog->state; 49db8: 2028 0008 movel %a0@(8),%d0 switch ( previous_state ) { 49dbc: 7401 moveq #1,%d2 49dbe: b480 cmpl %d0,%d2 49dc0: 6764 beqs 49e26 <_Watchdog_Remove+0x86> 49dc2: 6314 blss 49dd8 <_Watchdog_Remove+0x38> _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49dc4: 2279 0006 0d72 moveal 60d72 <_Watchdog_Ticks_since_boot>,%a1 49dca: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49dce: 46c1 movew %d1,%sr return( previous_state ); } 49dd0: 241f movel %sp@+,%d2 49dd2: 245f moveal %sp@+,%a2 49dd4: 4e5e unlk %fp 49dd6: 4e75 rts Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 49dd8: 143c 0003 moveb #3,%d2 49ddc: b480 cmpl %d0,%d2 49dde: 65e4 bcss 49dc4 <_Watchdog_Remove+0x24> <== NEVER TAKEN } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; _ISR_Enable( level ); return( previous_state ); } 49de0: 2250 moveal %a0@,%a1 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 49de2: 42a8 0008 clrl %a0@(8) next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 49de6: 4a91 tstl %a1@ 49de8: 6708 beqs 49df2 <_Watchdog_Remove+0x52> next_watchdog->delta_interval += the_watchdog->delta_interval; 49dea: 2428 0010 movel %a0@(16),%d2 49dee: d5a9 0010 addl %d2,%a1@(16) if ( _Watchdog_Sync_count ) 49df2: 2479 0006 0d6e moveal 60d6e <_Watchdog_Sync_count>,%a2 49df8: 4a8a tstl %a2 49dfa: 670c beqs 49e08 <_Watchdog_Remove+0x68> _Watchdog_Sync_level = _ISR_Nest_level; 49dfc: 45f9 0006 10ce lea 610ce <_Per_CPU_Information+0x8>,%a2 49e02: 23d2 0006 0d0c movel %a2@,60d0c <_Watchdog_Sync_level> { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 49e08: 2468 0004 moveal %a0@(4),%a2 next->previous = previous; 49e0c: 234a 0004 movel %a2,%a1@(4) previous->next = next; 49e10: 2489 movel %a1,%a2@ _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49e12: 2279 0006 0d72 moveal 60d72 <_Watchdog_Ticks_since_boot>,%a1 49e18: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49e1c: 46c1 movew %d1,%sr return( previous_state ); } 49e1e: 241f movel %sp@+,%d2 49e20: 245f moveal %sp@+,%a2 49e22: 4e5e unlk %fp 49e24: 4e75 rts _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49e26: 2279 0006 0d72 moveal 60d72 <_Watchdog_Ticks_since_boot>,%a1 /* * 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; 49e2c: 42a8 0008 clrl %a0@(8) _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 49e30: 2149 0018 movel %a1,%a0@(24) _ISR_Enable( level ); 49e34: 46c1 movew %d1,%sr return( previous_state ); } 49e36: 241f movel %sp@+,%d2 49e38: 245f moveal %sp@+,%a2 49e3a: 4e5e unlk %fp ... =============================================================================== 0004b1ec <_Watchdog_Report_chain>: ) { ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b1ec: 203c 0000 0700 movel #1792,%d0 void _Watchdog_Report_chain( const char *name, Chain_Control *header ) { 4b1f2: 4e56 ffe8 linkw %fp,#-24 4b1f6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b1fa: 242e 0008 movel %fp@(8),%d2 4b1fe: 266e 000c moveal %fp@(12),%a3 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); 4b202: 40c3 movew %sr,%d3 4b204: 8083 orl %d3,%d0 4b206: 46c0 movew %d0,%sr printk( "Watchdog Chain: %s %p\n", name, header ); 4b208: 2f0b movel %a3,%sp@- 4b20a: 4bf9 0004 4b88 lea 44b88 ,%a5 4b210: 2f02 movel %d2,%sp@- 4b212: 4879 0006 046a pea 6046a <_Status_Object_name_errors_to_status+0x14> 4b218: 4e95 jsr %a5@ printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); } 4b21a: 245b moveal %a3@+,%a2 ISR_Level level; Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { 4b21c: 4fef 000c lea %sp@(12),%sp 4b220: b7ca cmpal %a2,%a3 4b222: 672c beqs 4b250 <_Watchdog_Report_chain+0x64> 4b224: 49f9 0004 b268 lea 4b268 <_Watchdog_Report>,%a4 node != _Chain_Tail(header) ; node = node->next ) { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); 4b22a: 2f0a movel %a2,%sp@- 4b22c: 42a7 clrl %sp@- 4b22e: 4e94 jsr %a4@ _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; node != _Chain_Tail(header) ; node = node->next ) 4b230: 2452 moveal %a2@,%a2 Chain_Node *node; _ISR_Disable( level ); printk( "Watchdog Chain: %s %p\n", name, header ); if ( !_Chain_Is_empty( header ) ) { for ( node = _Chain_First( header ) ; 4b232: 508f addql #8,%sp 4b234: b7ca cmpal %a2,%a3 4b236: 66f2 bnes 4b22a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN { Watchdog_Control *watch = (Watchdog_Control *) node; _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); 4b238: 2f02 movel %d2,%sp@- 4b23a: 4879 0006 0481 pea 60481 <_Status_Object_name_errors_to_status+0x2b> 4b240: 4e95 jsr %a5@ 4b242: 508f addql #8,%sp } else { printk( "Chain is empty\n" ); } _ISR_Enable( level ); 4b244: 46c3 movew %d3,%sr } 4b246: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b24c: 4e5e unlk %fp 4b24e: 4e75 rts _Watchdog_Report( NULL, watch ); } printk( "== end of %s \n", name ); } else { printk( "Chain is empty\n" ); 4b250: 4879 0006 0490 pea 60490 <_Status_Object_name_errors_to_status+0x3a> 4b256: 4e95 jsr %a5@ 4b258: 588f addql #4,%sp } _ISR_Enable( level ); 4b25a: 46c3 movew %d3,%sr } 4b25c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b262: 4e5e unlk %fp ... =============================================================================== 00049e40 <_Watchdog_Tickle>: * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 49e40: 203c 0000 0700 movel #1792,%d0 */ void _Watchdog_Tickle( Chain_Control *header ) { 49e46: 4e56 ffe8 linkw %fp,#-24 49e4a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49e4e: 286e 0008 moveal %fp@(8),%a4 * See the comment in watchdoginsert.c and watchdogadjust.c * about why it's safe not to declare header a pointer to * volatile data - till, 2003/7 */ _ISR_Disable( level ); 49e52: 40c2 movew %sr,%d2 49e54: 8082 orl %d2,%d0 49e56: 46c0 movew %d0,%sr } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 49e58: 264c moveal %a4,%a3 49e5a: 245b moveal %a3@+,%a2 * volatile data - till, 2003/7 */ _ISR_Disable( level ); if ( _Chain_Is_empty( header ) ) 49e5c: b7ca cmpal %a2,%a3 49e5e: 673e beqs 49e9e <_Watchdog_Tickle+0x5e> * to be inserted has already had its delta_interval adjusted to 0, and * so is added to the head of the chain with a delta_interval of 0. * * Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc) */ if (the_watchdog->delta_interval != 0) { 49e60: 202a 0010 movel %a2@(16),%d0 49e64: 4bf9 0004 9da0 lea 49da0 <_Watchdog_Remove>,%a5 49e6a: 6708 beqs 49e74 <_Watchdog_Tickle+0x34> the_watchdog->delta_interval--; 49e6c: 5380 subql #1,%d0 49e6e: 2540 0010 movel %d0,%a2@(16) if ( the_watchdog->delta_interval != 0 ) 49e72: 662a bnes 49e9e <_Watchdog_Tickle+0x5e> case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49e74: 263c 0000 0700 movel #1792,%d3 if ( the_watchdog->delta_interval != 0 ) goto leave; } do { watchdog_state = _Watchdog_Remove( the_watchdog ); 49e7a: 2f0a movel %a2,%sp@- 49e7c: 4e95 jsr %a5@ _ISR_Enable( level ); 49e7e: 46c2 movew %d2,%sr switch( watchdog_state ) { 49e80: 7202 moveq #2,%d1 49e82: 588f addql #4,%sp 49e84: b280 cmpl %d0,%d1 49e86: 6722 beqs 49eaa <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN case WATCHDOG_REMOVE_IT: break; } _ISR_Disable( level ); 49e88: 2003 movel %d3,%d0 49e8a: 40c2 movew %sr,%d2 49e8c: 8082 orl %d2,%d0 49e8e: 46c0 movew %d0,%sr } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); } 49e90: 2014 movel %a4@,%d0 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First( Chain_Control *header ) { return ( (Watchdog_Control *) _Chain_First( header ) ); 49e92: 2440 moveal %d0,%a2 _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && (the_watchdog->delta_interval == 0) ); 49e94: b7c0 cmpal %d0,%a3 49e96: 6706 beqs 49e9e <_Watchdog_Tickle+0x5e> } _ISR_Disable( level ); the_watchdog = _Watchdog_First( header ); } while ( !_Chain_Is_empty( header ) && 49e98: 4aaa 0010 tstl %a2@(16) 49e9c: 67dc beqs 49e7a <_Watchdog_Tickle+0x3a> (the_watchdog->delta_interval == 0) ); leave: _ISR_Enable(level); 49e9e: 46c2 movew %d2,%sr } 49ea0: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49ea6: 4e5e unlk %fp 49ea8: 4e75 rts _ISR_Enable( level ); switch( watchdog_state ) { case WATCHDOG_ACTIVE: (*the_watchdog->routine)( 49eaa: 2f2a 0024 movel %a2@(36),%sp@- 49eae: 2f2a 0020 movel %a2@(32),%sp@- 49eb2: 206a 001c moveal %a2@(28),%a0 49eb6: 4e90 jsr %a0@ the_watchdog->id, the_watchdog->user_data ); break; 49eb8: 508f addql #8,%sp 49eba: 60cc bras 49e88 <_Watchdog_Tickle+0x48> =============================================================================== 0005cbfc <_kill_r>: int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5cbfc: 4e56 0000 linkw %fp,#0 return killinfo( pid, sig, NULL ); 5cc00: 2d6e 000c 0008 movel %fp@(12),%fp@(8) int _kill_r( struct _reent *ptr, pid_t pid, int sig ) { 5cc06: 202e 0010 movel %fp@(16),%d0 return killinfo( pid, sig, NULL ); 5cc0a: 42ae 0010 clrl %fp@(16) 5cc0e: 2d40 000c movel %d0,%fp@(12) } 5cc12: 4e5e unlk %fp struct _reent *ptr, pid_t pid, int sig ) { return killinfo( pid, sig, NULL ); 5cc14: 4ef9 0005 cdec jmp 5cdec ... =============================================================================== 00046810 : int adjtime( struct timeval *delta, struct timeval *olddelta ) { 46810: 4e56 ffec linkw %fp,#-20 46814: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46818: 246e 0008 moveal %fp@(8),%a2 4681c: 266e 000c moveal %fp@(12),%a3 long adjustment; /* * Simple validations */ if ( !delta ) 46820: 4a8a tstl %a2 46822: 6700 00ec beqw 46910 rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) 46826: 202a 0004 movel %a2@(4),%d0 4682a: 0c80 000f 423f cmpil #999999,%d0 46830: 6200 00de bhiw 46910 rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { 46834: 4a8b tstl %a3 46836: 670a beqs 46842 olddelta->tv_sec = 0; olddelta->tv_usec = 0; 46838: 42ab 0004 clrl %a3@(4) 4683c: 202a 0004 movel %a2@(4),%d0 if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( olddelta ) { olddelta->tv_sec = 0; 46840: 4293 clrl %a3@ olddelta->tv_usec = 0; } /* convert delta to microseconds */ adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND); 46842: 223c 000f 4240 movel #1000000,%d1 46848: 4c12 1800 mulsl %a2@,%d1 adjustment += delta->tv_usec; 4684c: d081 addl %d1,%d0 /* too small to account for */ if ( adjustment < rtems_configuration_get_microseconds_per_tick() ) 4684e: b0b9 0006 0ad0 cmpl 60ad0 ,%d0 46854: 640c bccs 46862 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; 46856: 4280 clrl %d0 } 46858: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 4685e: 4e5e unlk %fp 46860: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46862: 2039 0006 24e0 movel 624e0 <_Thread_Dispatch_disable_level>,%d0 46868: 5280 addql #1,%d0 4686a: 23c0 0006 24e0 movel %d0,624e0 <_Thread_Dispatch_disable_level> * This prevents context switches while we are adjusting the TOD */ _Thread_Disable_dispatch(); _TOD_Get( &ts ); 46870: 240e movel %fp,%d2 46872: 5182 subql #8,%d2 46874: 2f02 movel %d2,%sp@- 46876: 4eb9 0004 81ec jsr 481ec <_TOD_Get> ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 4687c: 202a 0004 movel %a2@(4),%d0 46880: 223c 0000 03e8 movel #1000,%d1 46886: 4c01 0800 mulsl %d1,%d0 /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4688a: 588f addql #4,%sp _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 4688c: 2212 movel %a2@,%d1 ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 4688e: d0ae fffc addl %fp@(-4),%d0 _Thread_Disable_dispatch(); _TOD_Get( &ts ); ts.tv_sec += delta->tv_sec; 46892: d3ae fff8 addl %d1,%fp@(-8) ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; 46896: 2d40 fffc movel %d0,%fp@(-4) /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 4689a: 0c80 3b9a c9ff cmpil #999999999,%d0 468a0: 631c blss 468be 468a2: 222e fff8 movel %fp@(-8),%d1 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 468a6: 5281 addql #1,%d1 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; 468a8: 0680 c465 3600 addil #-1000000000,%d0 ts.tv_sec += delta->tv_sec; ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND; /* if adjustment is too much positive */ while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { 468ae: 0c80 3b9a c9ff cmpil #999999999,%d0 468b4: 62f0 bhis 468a6 <== NEVER TAKEN 468b6: 2d40 fffc movel %d0,%fp@(-4) 468ba: 2d41 fff8 movel %d1,%fp@(-8) ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 468be: 0c80 c465 3600 cmpil #-1000000000,%d0 468c4: 621c bhis 468e2 <== NEVER TAKEN 468c6: 222e fff8 movel %fp@(-8),%d1 * At one point there was a static variable named adjustment * used by this implementation. I don't see any reason for it * to be here based upon the GNU/Linux documentation. */ int adjtime( 468ca: 5381 subql #1,%d1 ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; 468cc: 0680 3b9a ca00 addil #1000000000,%d0 ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND; ts.tv_sec++; } /* if adjustment is too much negative */ while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) { 468d2: 0c80 c465 3600 cmpil #-1000000000,%d0 468d8: 63f0 blss 468ca 468da: 2d40 fffc movel %d0,%fp@(-4) 468de: 2d41 fff8 movel %d1,%fp@(-8) ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND; ts.tv_sec--; } _TOD_Set( &ts ); 468e2: 2f02 movel %d2,%sp@- 468e4: 4eb9 0004 8280 jsr 48280 <_TOD_Set> _Thread_Enable_dispatch(); 468ea: 4eb9 0004 993a jsr 4993a <_Thread_Enable_dispatch> /* set the user's output */ if ( olddelta ) 468f0: 588f addql #4,%sp 468f2: 4a8b tstl %a3 468f4: 6700 ff60 beqw 46856 *olddelta = *delta; return 0; 468f8: 4280 clrl %d0 _Thread_Enable_dispatch(); /* set the user's output */ if ( olddelta ) *olddelta = *delta; 468fa: 2212 movel %a2@,%d1 468fc: 242a 0004 movel %a2@(4),%d2 46900: 2681 movel %d1,%a3@ 46902: 2742 0004 movel %d2,%a3@(4) return 0; } 46906: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 4690c: 4e5e unlk %fp 4690e: 4e75 rts */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 46910: 4eb9 0004 f8b8 jsr 4f8b8 <__errno> 46916: 7216 moveq #22,%d1 46918: 2040 moveal %d0,%a0 4691a: 70ff moveq #-1,%d0 /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 4691c: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 */ if ( !delta ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND ) rtems_set_errno_and_return_minus_one( EINVAL ); 46922: 2081 movel %d1,%a0@ /* set the user's output */ if ( olddelta ) *olddelta = *delta; return 0; } 46924: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004709c : * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 4709c: 4e56 ffe8 linkw %fp,#-24 470a0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 470a4: 4879 0006 3e18 pea 63e18 470aa: 49f9 0004 8478 lea 48478 ,%a4 * operation(s) cannot be canceled */ int aio_cancel(int fildes, struct aiocb *aiocbp) { 470b0: 242e 0008 movel %fp@(8),%d2 470b4: 246e 000c moveal %fp@(12),%a2 rtems_aio_request_chain *r_chain; int result; pthread_mutex_lock (&aio_request_queue.mutex); 470b8: 4e94 jsr %a4@ if (fcntl (fildes, F_GETFD) < 0) { 470ba: 4878 0001 pea 1 470be: 2f02 movel %d2,%sp@- 470c0: 4eb9 0004 e42c jsr 4e42c 470c6: 4fef 000c lea %sp@(12),%sp 470ca: 4a80 tstl %d0 470cc: 6d00 01c4 bltw 47292 pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); } /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { 470d0: 4a8a tstl %a2 470d2: 6700 00f4 beqw 471c8 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; } else { AIO_printf ("Cancel request\n"); if (aiocbp->aio_fildes != fildes) { 470d6: 2612 movel %a2@,%d3 470d8: b483 cmpl %d3,%d2 470da: 6600 00c4 bnew 471a0 pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 470de: 42a7 clrl %sp@- 470e0: 4bf9 0004 7512 lea 47512 ,%a5 470e6: 2f03 movel %d3,%sp@- 470e8: 4879 0006 3e60 pea 63e60 470ee: 4e95 jsr %a5@ if (r_chain == NULL) { 470f0: 4fef 000c lea %sp@(12),%sp if (aiocbp->aio_fildes != fildes) { pthread_mutex_unlock (&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 470f4: 2640 moveal %d0,%a3 if (r_chain == NULL) { 470f6: 4a80 tstl %d0 470f8: 673c beqs 47136 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 470fa: 2600 movel %d0,%d3 470fc: 0683 0000 001c addil #28,%d3 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&r_chain->mutex); 47102: 4bf9 0004 8514 lea 48514 ,%a5 return AIO_ALLDONE; } } AIO_printf ("Request on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 47108: 2f03 movel %d3,%sp@- 4710a: 4e94 jsr %a4@ result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 4710c: 2f0a movel %a2,%sp@- 4710e: 486b 0008 pea %a3@(8) 47112: 4eb9 0004 798e jsr 4798e 47118: 2400 movel %d0,%d2 pthread_mutex_unlock (&r_chain->mutex); 4711a: 2f03 movel %d3,%sp@- 4711c: 4e95 jsr %a5@ pthread_mutex_unlock (&aio_request_queue.mutex); 4711e: 4879 0006 3e18 pea 63e18 47124: 4e95 jsr %a5@ return result; 47126: 4fef 0014 lea %sp@(20),%sp } return AIO_ALLDONE; } 4712a: 2002 movel %d2,%d0 4712c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47132: 4e5e unlk %fp 47134: 4e75 rts rtems_set_errno_and_return_minus_one (EINVAL); } r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 47136: 203c 0006 3e70 movel #409200,%d0 4713c: b0b9 0006 3e6c cmpl 63e6c ,%d0 47142: 6740 beqs 47184 <== NEVER TAKEN r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 47144: 42a7 clrl %sp@- 47146: 2f03 movel %d3,%sp@- 47148: 4879 0006 3e6c pea 63e6c 4714e: 4e95 jsr %a5@ if (r_chain == NULL) { 47150: 4fef 000c lea %sp@(12),%sp 47154: 4a80 tstl %d0 47156: 6748 beqs 471a0 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 47158: 2f0a movel %a2,%sp@- 4715a: 2040 moveal %d0,%a0 4715c: 4868 0008 pea %a0@(8) 47160: 4eb9 0004 798e jsr 4798e pthread_mutex_unlock (&aio_request_queue.mutex); 47166: 4879 0006 3e18 pea 63e18 rtems_set_errno_and_return_minus_one (EINVAL); } AIO_printf ("Request on [IQ]\n"); result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); 4716c: 2400 movel %d0,%d2 pthread_mutex_unlock (&aio_request_queue.mutex); 4716e: 4eb9 0004 8514 jsr 48514 return result; 47174: 4fef 000c lea %sp@(12),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47178: 2002 movel %d2,%d0 4717a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 47180: 4e5e unlk %fp 47182: 4e75 rts result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); 47184: 4879 0006 3e18 pea 63e18 return AIO_ALLDONE; 4718a: 7402 moveq #2,%d2 result = rtems_aio_remove_req (&r_chain->perfd, aiocbp); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } else { pthread_mutex_unlock (&aio_request_queue.mutex); 4718c: 4eb9 0004 8514 jsr 48514 return AIO_ALLDONE; 47192: 588f addql #4,%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47194: 2002 movel %d2,%d0 47196: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4719c: 4e5e unlk %fp 4719e: 4e75 rts r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 471a0: 4879 0006 3e18 pea 63e18 rtems_set_errno_and_return_minus_one (EINVAL); 471a6: 74ff moveq #-1,%d2 r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); if (r_chain == NULL) { pthread_mutex_unlock (&aio_request_queue.mutex); 471a8: 4eb9 0004 8514 jsr 48514 rtems_set_errno_and_return_minus_one (EINVAL); 471ae: 4eb9 0005 1a30 jsr 51a30 <__errno> 471b4: 588f addql #4,%sp 471b6: 2040 moveal %d0,%a0 471b8: 7016 moveq #22,%d0 471ba: 2080 movel %d0,%a0@ pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 471bc: 2002 movel %d2,%d0 471be: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 471c4: 4e5e unlk %fp 471c6: 4e75 rts /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 471c8: 42a7 clrl %sp@- 471ca: 45f9 0004 7512 lea 47512 ,%a2 471d0: 2f02 movel %d2,%sp@- 471d2: 4879 0006 3e60 pea 63e60 471d8: 4e92 jsr %a2@ if (r_chain == NULL) { 471da: 4fef 000c lea %sp@(12),%sp /* if aiocbp is NULL remove all request for given file descriptor */ if (aiocbp == NULL) { AIO_printf ("Cancel all requests\n"); r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); 471de: 2600 movel %d0,%d3 if (r_chain == NULL) { 471e0: 673e beqs 47220 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 471e2: 2640 moveal %d0,%a3 471e4: 47eb 001c lea %a3@(28),%a3 rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_unlock (&r_chain->mutex); 471e8: 45f9 0004 8514 lea 48514 ,%a2 pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 471ee: 4282 clrl %d2 return AIO_ALLDONE; } AIO_printf ("Request chain on [WQ]\n"); pthread_mutex_lock (&r_chain->mutex); 471f0: 2f0b movel %a3,%sp@- 471f2: 4e94 jsr %a4@ */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 471f4: 2f03 movel %d3,%sp@- 471f6: 4eb9 0004 a0b4 jsr 4a0b4 <_Chain_Extract> rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 471fc: 2f03 movel %d3,%sp@- 471fe: 4eb9 0004 7936 jsr 47936 pthread_mutex_unlock (&r_chain->mutex); 47204: 2f0b movel %a3,%sp@- 47206: 4e92 jsr %a2@ pthread_mutex_unlock (&aio_request_queue.mutex); 47208: 4879 0006 3e18 pea 63e18 4720e: 4e92 jsr %a2@ return AIO_CANCELED; 47210: 4fef 0014 lea %sp@(20),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47214: 2002 movel %d2,%d0 47216: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4721c: 4e5e unlk %fp 4721e: 4e75 rts r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { 47220: 203c 0006 3e70 movel #409200,%d0 47226: b0b9 0006 3e6c cmpl 63e6c ,%d0 4722c: 6700 ff56 beqw 47184 r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 47230: 42a7 clrl %sp@- 47232: 2f02 movel %d2,%sp@- 47234: 4879 0006 3e6c pea 63e6c 4723a: 4e92 jsr %a2@ if (r_chain == NULL) { 4723c: 4fef 000c lea %sp@(12),%sp r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, fildes, 0); if (r_chain == NULL) { AIO_printf ("Request chain not on [WQ]\n"); if (!rtems_chain_is_empty (&aio_request_queue.idle_req)) { r_chain = rtems_aio_search_fd (&aio_request_queue.idle_req, fildes, 0); 47240: 2600 movel %d0,%d3 if (r_chain == NULL) { 47242: 6700 ff40 beqw 47184 47246: 2f00 movel %d0,%sp@- AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); pthread_mutex_destroy (&r_chain->mutex); 47248: 2440 moveal %d0,%a2 4724a: 45ea 001c lea %a2@(28),%a2 pthread_cond_destroy (&r_chain->mutex); free (r_chain); pthread_mutex_unlock (&aio_request_queue.mutex); return AIO_CANCELED; 4724e: 4282 clrl %d2 47250: 4eb9 0004 a0b4 jsr 4a0b4 <_Chain_Extract> } AIO_printf ("Request chain on [IQ]\n"); rtems_chain_extract (&r_chain->next_fd); rtems_aio_remove_fd (r_chain); 47256: 2f03 movel %d3,%sp@- 47258: 4eb9 0004 7936 jsr 47936 pthread_mutex_destroy (&r_chain->mutex); 4725e: 2f0a movel %a2,%sp@- 47260: 4eb9 0004 81c4 jsr 481c4 pthread_cond_destroy (&r_chain->mutex); 47266: 2f0a movel %a2,%sp@- 47268: 4eb9 0004 7e50 jsr 47e50 free (r_chain); 4726e: 2f03 movel %d3,%sp@- 47270: 4eb9 0004 3c60 jsr 43c60 pthread_mutex_unlock (&aio_request_queue.mutex); 47276: 4879 0006 3e18 pea 63e18 4727c: 4eb9 0004 8514 jsr 48514 return AIO_CANCELED; 47282: 4fef 0018 lea %sp@(24),%sp pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 47286: 2002 movel %d2,%d0 47288: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4728e: 4e5e unlk %fp 47290: 4e75 rts int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 47292: 4879 0006 3e18 pea 63e18 rtems_set_errno_and_return_minus_one (EBADF); 47298: 74ff moveq #-1,%d2 int result; pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); 4729a: 4eb9 0004 8514 jsr 48514 rtems_set_errno_and_return_minus_one (EBADF); 472a0: 4eb9 0005 1a30 jsr 51a30 <__errno> 472a6: 588f addql #4,%sp 472a8: 7209 moveq #9,%d1 472aa: 2040 moveal %d0,%a0 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 472ac: 2002 movel %d2,%d0 472ae: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 pthread_mutex_lock (&aio_request_queue.mutex); if (fcntl (fildes, F_GETFD) < 0) { pthread_mutex_unlock(&aio_request_queue.mutex); rtems_set_errno_and_return_minus_one (EBADF); 472b4: 2081 movel %d1,%a0@ pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_unlock (&aio_request_queue.mutex); return result; } return AIO_ALLDONE; } 472b6: 4e5e unlk %fp ... =============================================================================== 000472cc : ) { rtems_aio_request *req; int mode; if (op != O_SYNC) 472cc: 203c 0000 2000 movel #8192,%d0 int aio_fsync( int op, struct aiocb *aiocbp ) { 472d2: 4e56 0000 linkw %fp,#0 472d6: 2f0a movel %a2,%sp@- 472d8: 246e 000c moveal %fp@(12),%a2 rtems_aio_request *req; int mode; if (op != O_SYNC) 472dc: b0ae 0008 cmpl %fp@(8),%d0 472e0: 6648 bnes 4732a rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); 472e2: 4878 0003 pea 3 472e6: 2f12 movel %a2@,%sp@- 472e8: 4eb9 0004 e42c jsr 4e42c if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 472ee: 508f addql #8,%sp 472f0: 7203 moveq #3,%d1 472f2: c081 andl %d1,%d0 472f4: 123c 0001 moveb #1,%d1 472f8: 5380 subql #1,%d0 472fa: b280 cmpl %d0,%d1 472fc: 654e bcss 4734c rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); 472fe: 4878 0018 pea 18 47302: 4eb9 0004 426c jsr 4426c if (req == NULL) 47308: 588f addql #4,%sp 4730a: 4a80 tstl %d0 4730c: 6760 beqs 4736e <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 4730e: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_SYNC; 47310: 7203 moveq #3,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47312: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_SYNC; 47316: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 4731a: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 4731e: 2d40 0008 movel %d0,%fp@(8) } 47322: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); 47324: 4ef9 0004 7a08 jmp 47a08 { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 4732a: 7216 moveq #22,%d1 4732c: 70ff moveq #-1,%d0 4732e: 2541 0030 movel %d1,%a2@(48) 47332: 2540 0034 movel %d0,%a2@(52) 47336: 4eb9 0005 1a30 jsr 51a30 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4733c: 246e fffc moveal %fp@(-4),%a2 { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47340: 2040 moveal %d0,%a0 47342: 7016 moveq #22,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47344: 4e5e unlk %fp { rtems_aio_request *req; int mode; if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47346: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47348: 70ff moveq #-1,%d0 4734a: 4e75 rts if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 4734c: 72ff moveq #-1,%d1 4734e: 7009 moveq #9,%d0 47350: 2541 0034 movel %d1,%a2@(52) 47354: 2540 0030 movel %d0,%a2@(48) 47358: 4eb9 0005 1a30 jsr 51a30 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4735e: 246e fffc moveal %fp@(-4),%a2 if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47362: 2040 moveal %d0,%a0 47364: 7209 moveq #9,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47366: 70ff moveq #-1,%d0 47368: 4e5e unlk %fp if (op != O_SYNC) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 4736a: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4736c: 4e75 rts if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4736e: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47372: 72ff moveq #-1,%d1 <== NOT EXECUTED 47374: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47378: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 4737c: 4eb9 0005 1a30 jsr 51a30 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 47382: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47386: 2040 moveal %d0,%a0 <== NOT EXECUTED 47388: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4738a: 4e5e unlk %fp <== NOT EXECUTED if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 4738c: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_SYNC; return rtems_aio_enqueue (req); } 4738e: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 00047c30 : * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 47c30: 4e56 0000 linkw %fp,#0 47c34: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47c36: 4878 0003 pea 3 * 0 - otherwise */ int aio_read (struct aiocb *aiocbp) { 47c3a: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47c3e: 2f12 movel %a2@,%sp@- 47c40: 4eb9 0004 e42c jsr 4e42c if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) 47c46: 508f addql #8,%sp 47c48: 7203 moveq #3,%d1 47c4a: c081 andl %d1,%d0 47c4c: 6708 beqs 47c56 <== NEVER TAKEN 47c4e: 123c 0002 moveb #2,%d1 47c52: b280 cmpl %d0,%d1 47c54: 6638 bnes 47c8e rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 47c56: 4aaa 0014 tstl %a2@(20) 47c5a: 6654 bnes 47cb0 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 47c5c: 4aaa 0004 tstl %a2@(4) 47c60: 6b4e bmis 47cb0 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 47c62: 4878 0018 pea 18 47c66: 4eb9 0004 426c jsr 4426c if (req == NULL) 47c6c: 588f addql #4,%sp 47c6e: 4a80 tstl %d0 47c70: 6760 beqs 47cd2 <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47c72: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_READ; 47c74: 7201 moveq #1,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47c76: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_READ; 47c7a: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 47c7e: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 47c82: 2d40 0008 movel %d0,%fp@(8) } 47c86: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); 47c88: 4ef9 0004 7a08 jmp 47a08 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47c8e: 7009 moveq #9,%d0 47c90: 72ff moveq #-1,%d1 47c92: 2540 0030 movel %d0,%a2@(48) 47c96: 2541 0034 movel %d1,%a2@(52) 47c9a: 4eb9 0005 1a30 jsr 51a30 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47ca0: 246e fffc moveal %fp@(-4),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47ca4: 2040 moveal %d0,%a0 47ca6: 7009 moveq #9,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47ca8: 4e5e unlk %fp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_RDONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47caa: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47cac: 70ff moveq #-1,%d0 47cae: 4e75 rts if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47cb0: 72ff moveq #-1,%d1 47cb2: 7016 moveq #22,%d0 47cb4: 2541 0034 movel %d1,%a2@(52) 47cb8: 2540 0030 movel %d0,%a2@(48) 47cbc: 4eb9 0005 1a30 jsr 51a30 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47cc2: 246e fffc moveal %fp@(-4),%a2 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47cc6: 2040 moveal %d0,%a0 47cc8: 7216 moveq #22,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47cca: 70ff moveq #-1,%d0 47ccc: 4e5e unlk %fp if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47cce: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47cd0: 4e75 rts if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47cd2: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47cd6: 72ff moveq #-1,%d1 <== NOT EXECUTED 47cd8: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47cdc: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 47ce0: 4eb9 0005 1a30 jsr 51a30 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47ce6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47cea: 2040 moveal %d0,%a0 <== NOT EXECUTED 47cec: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47cee: 4e5e unlk %fp <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47cf0: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_READ; return rtems_aio_enqueue (req); } 47cf2: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 00047d08 : * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 47d08: 4e56 0000 linkw %fp,#0 47d0c: 2f0a movel %a2,%sp@- rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47d0e: 4878 0003 pea 3 * 0 - otherwise */ int aio_write (struct aiocb *aiocbp) { 47d12: 246e 0008 moveal %fp@(8),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); 47d16: 2f12 movel %a2@,%sp@- 47d18: 4eb9 0004 e42c jsr 4e42c if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) 47d1e: 508f addql #8,%sp 47d20: 7203 moveq #3,%d1 47d22: c081 andl %d1,%d0 47d24: 123c 0001 moveb #1,%d1 47d28: 5380 subql #1,%d0 47d2a: b280 cmpl %d0,%d1 47d2c: 6538 bcss 47d66 rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) 47d2e: 4aaa 0014 tstl %a2@(20) 47d32: 6654 bnes 47d88 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) 47d34: 4aaa 0004 tstl %a2@(4) 47d38: 6b4e bmis 47d88 rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); 47d3a: 4878 0018 pea 18 47d3e: 4eb9 0004 426c jsr 4426c if (req == NULL) 47d44: 588f addql #4,%sp 47d46: 4a80 tstl %d0 47d48: 6760 beqs 47daa <== NEVER TAKEN rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47d4a: 2040 moveal %d0,%a0 req->aiocbp->aio_lio_opcode = LIO_WRITE; 47d4c: 7202 moveq #2,%d1 req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; 47d4e: 214a 0014 movel %a2,%a0@(20) req->aiocbp->aio_lio_opcode = LIO_WRITE; 47d52: 2541 002c movel %d1,%a2@(44) return rtems_aio_enqueue (req); } 47d56: 246e fffc moveal %fp@(-4),%a2 rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 47d5a: 2d40 0008 movel %d0,%fp@(8) } 47d5e: 4e5e unlk %fp rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); 47d60: 4ef9 0004 7a08 jmp 47a08 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47d66: 7009 moveq #9,%d0 47d68: 72ff moveq #-1,%d1 47d6a: 2540 0030 movel %d0,%a2@(48) 47d6e: 2541 0034 movel %d1,%a2@(52) 47d72: 4eb9 0005 1a30 jsr 51a30 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47d78: 246e fffc moveal %fp@(-4),%a2 rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47d7c: 2040 moveal %d0,%a0 47d7e: 7009 moveq #9,%d0 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47d80: 4e5e unlk %fp rtems_aio_request *req; int mode; mode = fcntl (aiocbp->aio_fildes, F_GETFL); if (!(((mode & O_ACCMODE) == O_WRONLY) || ((mode & O_ACCMODE) == O_RDWR))) rtems_aio_set_errno_return_minus_one (EBADF, aiocbp); 47d82: 2080 movel %d0,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47d84: 70ff moveq #-1,%d0 47d86: 4e75 rts if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47d88: 72ff moveq #-1,%d1 47d8a: 7016 moveq #22,%d0 47d8c: 2541 0034 movel %d1,%a2@(52) 47d90: 2540 0030 movel %d0,%a2@(48) 47d94: 4eb9 0005 1a30 jsr 51a30 <__errno> req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47d9a: 246e fffc moveal %fp@(-4),%a2 if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47d9e: 2040 moveal %d0,%a0 47da0: 7216 moveq #22,%d1 req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47da2: 70ff moveq #-1,%d0 47da4: 4e5e unlk %fp if (aiocbp->aio_reqprio < 0 || aiocbp->aio_reqprio > AIO_PRIO_DELTA_MAX) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); 47da6: 2081 movel %d1,%a0@ req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47da8: 4e75 rts if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47daa: 103c 000b moveb #11,%d0 <== NOT EXECUTED 47dae: 72ff moveq #-1,%d1 <== NOT EXECUTED 47db0: 2540 0030 movel %d0,%a2@(48) <== NOT EXECUTED 47db4: 2541 0034 movel %d1,%a2@(52) <== NOT EXECUTED 47db8: 4eb9 0005 1a30 jsr 51a30 <__errno> <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47dbe: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47dc2: 2040 moveal %d0,%a0 <== NOT EXECUTED 47dc4: 700b moveq #11,%d0 <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47dc6: 4e5e unlk %fp <== NOT EXECUTED if (aiocbp->aio_offset < 0) rtems_aio_set_errno_return_minus_one (EINVAL, aiocbp); req = malloc (sizeof (rtems_aio_request)); if (req == NULL) rtems_aio_set_errno_return_minus_one (EAGAIN, aiocbp); 47dc8: 2080 movel %d0,%a0@ <== NOT EXECUTED req->aiocbp = aiocbp; req->aiocbp->aio_lio_opcode = LIO_WRITE; return rtems_aio_enqueue (req); } 47dca: 70ff moveq #-1,%d0 <== NOT EXECUTED ... =============================================================================== 000486a4 : } unsigned int alarm( unsigned int seconds ) { 486a4: 4e56 fff4 linkw %fp,#-12 486a8: 48d7 001c moveml %d2-%d4,%sp@ 486ac: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 486b0: 4ab9 0006 5b2c tstl 65b2c <_POSIX_signals_Alarm_timer+0x1c> 486b6: 674e beqs 48706 _Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 486b8: 4879 0006 5b10 pea 65b10 <_POSIX_signals_Alarm_timer> 486be: 4eb9 0004 d8e8 jsr 4d8e8 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 486c4: 588f addql #4,%sp 486c6: 7201 moveq #1,%d1 486c8: 5580 subql #2,%d0 486ca: b280 cmpl %d0,%d1 486cc: 645e bccs 4872c unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 486ce: 4283 clrl %d3 remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 486d0: 4a82 tstl %d2 486d2: 660c bnes 486e0 <== NEVER TAKEN _Watchdog_Insert_seconds( the_timer, seconds ); return remaining; } 486d4: 2003 movel %d3,%d0 486d6: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 486dc: 4e5e unlk %fp 486de: 4e75 rts ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 486e0: 4879 0006 5b10 pea 65b10 <_POSIX_signals_Alarm_timer> 486e6: 4879 0006 5e54 pea 65e54 <_Watchdog_Seconds_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 486ec: 23c2 0006 5b1c movel %d2,65b1c <_POSIX_signals_Alarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 486f2: 4eb9 0004 d794 jsr 4d794 <_Watchdog_Insert> 486f8: 508f addql #8,%sp 486fa: 2003 movel %d3,%d0 486fc: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48702: 4e5e unlk %fp 48704: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 48706: 42b9 0006 5b18 clrl 65b18 <_POSIX_signals_Alarm_timer+0x8> unsigned int alarm( unsigned int seconds ) { unsigned int remaining = 0; 4870c: 4283 clrl %d3 the_watchdog->routine = routine; 4870e: 203c 0004 8688 movel #296584,%d0 the_watchdog->id = id; 48714: 42b9 0006 5b30 clrl 65b30 <_POSIX_signals_Alarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4871a: 23c0 0006 5b2c movel %d0,65b2c <_POSIX_signals_Alarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 48720: 42b9 0006 5b34 clrl 65b34 <_POSIX_signals_Alarm_timer+0x24> remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 48726: 4a82 tstl %d2 48728: 67aa beqs 486d4 <== NEVER TAKEN 4872a: 60b4 bras 486e0 * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4872c: 2839 0006 5b28 movel 65b28 <_POSIX_signals_Alarm_timer+0x18>,%d4 48732: 98b9 0006 5b24 subl 65b24 <_POSIX_signals_Alarm_timer+0x14>,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 48738: 2639 0006 5b1c movel 65b1c <_POSIX_signals_Alarm_timer+0xc>,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); 4873e: 4eb9 0004 b1a8 jsr 4b1a8 48744: 4c40 4004 remul %d0,%d4,%d4 * The stop_time and start_time fields are snapshots of ticks since * boot. Since alarm() is dealing in seconds, we must account for * this. */ remaining = the_timer->initial - 48748: 9684 subl %d4,%d3 ((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND); } } if ( seconds ) 4874a: 4a82 tstl %d2 4874c: 6786 beqs 486d4 <== NEVER TAKEN 4874e: 6090 bras 486e0 =============================================================================== 0004667c : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 4667c: 4e56 0000 linkw %fp,#0 46680: 202e 0008 movel %fp@(8),%d0 46684: 222e 000c movel %fp@(12),%d1 46688: 2f02 movel %d2,%sp@- if ( !tp ) 4668a: 4a81 tstl %d1 4668c: 6718 beqs 466a6 rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 4668e: 7401 moveq #1,%d2 46690: b480 cmpl %d0,%d2 46692: 6752 beqs 466e6 _TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC if ( clock_id == CLOCK_MONOTONIC ) { 46694: 7404 moveq #4,%d2 46696: b480 cmpl %d0,%d2 46698: 6738 beqs 466d2 <== NEVER TAKEN return 0; } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { 4669a: 7402 moveq #2,%d2 4669c: b480 cmpl %d0,%d2 4669e: 6732 beqs 466d2 return 0; } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) 466a0: 7203 moveq #3,%d1 466a2: b280 cmpl %d0,%d1 466a4: 6716 beqs 466bc rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 466a6: 4eb9 0004 fe3c jsr 4fe3c <__errno> return 0; } 466ac: 242e fffc movel %fp@(-4),%d2 #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 466b0: 2040 moveal %d0,%a0 466b2: 7216 moveq #22,%d1 466b4: 70ff moveq #-1,%d0 return 0; } 466b6: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif rtems_set_errno_and_return_minus_one( EINVAL ); 466b8: 2081 movel %d1,%a0@ return 0; } 466ba: 4e75 rts } #endif #ifdef _POSIX_THREAD_CPUTIME if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 466bc: 4eb9 0004 fe3c jsr 4fe3c <__errno> 466c2: 7458 moveq #88,%d2 466c4: 2040 moveal %d0,%a0 466c6: 70ff moveq #-1,%d0 466c8: 2082 movel %d2,%a0@ #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 466ca: 242e fffc movel %fp@(-4),%d2 466ce: 4e5e unlk %fp 466d0: 4e75 rts } #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); 466d2: 2f01 movel %d1,%sp@- 466d4: 4eb9 0004 87d0 jsr 487d0 <_TOD_Get_uptime_as_timespec> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 466da: 242e fffc movel %fp@(-4),%d2 #endif #ifdef _POSIX_CPUTIME if ( clock_id == CLOCK_PROCESS_CPUTIME ) { _TOD_Get_uptime_as_timespec( tp ); return 0; 466de: 588f addql #4,%sp 466e0: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 466e2: 4e5e unlk %fp 466e4: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); 466e6: 2f01 movel %d1,%sp@- 466e8: 4eb9 0004 876c jsr 4876c <_TOD_Get> #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 466ee: 242e fffc movel %fp@(-4),%d2 if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { _TOD_Get(tp); return 0; 466f2: 588f addql #4,%sp 466f4: 4280 clrl %d0 #endif rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 466f6: 4e5e unlk %fp ... =============================================================================== 000466fc : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 466fc: 4e56 0000 linkw %fp,#0 46700: 202e 0008 movel %fp@(8),%d0 46704: 206e 000c moveal %fp@(12),%a0 if ( !tp ) 46708: 4a88 tstl %a0 4670a: 6712 beqs 4671e <== NEVER TAKEN rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { 4670c: 7201 moveq #1,%d1 4670e: b280 cmpl %d0,%d1 46710: 6730 beqs 46742 _Thread_Disable_dispatch(); _TOD_Set( tp ); _Thread_Enable_dispatch(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME ) 46712: 7202 moveq #2,%d1 46714: b280 cmpl %d0,%d1 46716: 6718 beqs 46730 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) 46718: 7203 moveq #3,%d1 4671a: b280 cmpl %d0,%d1 4671c: 6712 beqs 46730 rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 4671e: 4eb9 0004 fe3c jsr 4fe3c <__errno> 46724: 7216 moveq #22,%d1 46726: 2040 moveal %d0,%a0 46728: 70ff moveq #-1,%d0 return 0; } 4672a: 4e5e unlk %fp #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); 4672c: 2081 movel %d1,%a0@ return 0; } 4672e: 4e75 rts else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 46730: 4eb9 0004 fe3c jsr 4fe3c <__errno> 46736: 7258 moveq #88,%d1 46738: 2040 moveal %d0,%a0 4673a: 70ff moveq #-1,%d0 #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 4673c: 4e5e unlk %fp else if ( clock_id == CLOCK_PROCESS_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); #endif #ifdef _POSIX_THREAD_CPUTIME else if ( clock_id == CLOCK_THREAD_CPUTIME ) rtems_set_errno_and_return_minus_one( ENOSYS ); 4673e: 2081 movel %d1,%a0@ #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; } 46740: 4e75 rts { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 46742: 203c 21da e4ff movel #567993599,%d0 46748: b090 cmpl %a0@,%d0 4674a: 64d2 bccs 4671e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4674c: 2039 0006 2c98 movel 62c98 <_Thread_Dispatch_disable_level>,%d0 46752: 5280 addql #1,%d0 46754: 23c0 0006 2c98 movel %d0,62c98 <_Thread_Dispatch_disable_level> rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 4675a: 2f08 movel %a0,%sp@- 4675c: 4eb9 0004 8828 jsr 48828 <_TOD_Set> _Thread_Enable_dispatch(); 46762: 4eb9 0004 9ee2 jsr 49ee2 <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( ENOSYS ); #endif else rtems_set_errno_and_return_minus_one( EINVAL ); return 0; 46768: 588f addql #4,%sp 4676a: 4280 clrl %d0 } 4676c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005cdec : int killinfo( pid_t pid, int sig, const union sigval *value ) { 5cdec: 4e56 ffc4 linkw %fp,#-60 5cdf0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5cdf4: 262e 000c movel %fp@(12),%d3 5cdf8: 246e 0010 moveal %fp@(16),%a2 POSIX_signals_Siginfo_node *psiginfo; /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 5cdfc: 4eb9 0005 c920 jsr 5c920 5ce02: b0ae 0008 cmpl %fp@(8),%d0 5ce06: 6600 0234 bnew 5d03c rtems_set_errno_and_return_minus_one( ESRCH ); /* * Validate the signal passed. */ if ( !sig ) 5ce0a: 4a83 tstl %d3 5ce0c: 6700 0246 beqw 5d054 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5ce10: 2003 movel %d3,%d0 5ce12: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5ce14: 721f moveq #31,%d1 5ce16: b280 cmpl %d0,%d1 5ce18: 6500 023a bcsw 5d054 rtems_set_errno_and_return_minus_one( EINVAL ); /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) 5ce1c: 2c03 movel %d3,%d6 5ce1e: 2a03 movel %d3,%d5 5ce20: 7201 moveq #1,%d1 5ce22: e98e lsll #4,%d6 5ce24: e58d lsll #2,%d5 5ce26: 2806 movel %d6,%d4 5ce28: 9885 subl %d5,%d4 5ce2a: 2044 moveal %d4,%a0 5ce2c: d1fc 0006 110c addal #397580,%a0 5ce32: b290 cmpl %a0@,%d1 5ce34: 6700 01f2 beqw 5d028 /* * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) 5ce38: 123c 0008 moveb #8,%d1 5ce3c: b283 cmpl %d3,%d1 5ce3e: 6700 00d2 beqw 5cf12 5ce42: 123c 0004 moveb #4,%d1 5ce46: b283 cmpl %d3,%d1 5ce48: 6700 00c8 beqw 5cf12 5ce4c: 123c 000b moveb #11,%d1 5ce50: b283 cmpl %d3,%d1 5ce52: 6700 00be beqw 5cf12 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 5ce56: 7401 moveq #1,%d2 5ce58: e1aa lsll %d0,%d2 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; 5ce5a: 7001 moveq #1,%d0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 5ce5c: 2d43 fff4 movel %d3,%fp@(-12) siginfo->si_code = SI_USER; 5ce60: 2d40 fff8 movel %d0,%fp@(-8) if ( !value ) { 5ce64: 4a8a tstl %a2 5ce66: 6700 01cc beqw 5d034 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 5ce6a: 2d52 fffc movel %a2@,%fp@(-4) 5ce6e: 2039 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d0 5ce74: 5280 addql #1,%d0 5ce76: 23c0 0006 0c68 movel %d0,60c68 <_Thread_Dispatch_disable_level> /* * 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; 5ce7c: 2679 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 5ce82: 206b 0102 moveal %a3@(258),%a0 5ce86: 2028 00d0 movel %a0@(208),%d0 5ce8a: 4680 notl %d0 5ce8c: c082 andl %d2,%d0 5ce8e: 6642 bnes 5ced2 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5ce90: 2079 0006 1290 moveal 61290 <_POSIX_signals_Wait_queue>,%a0 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5ce96: b1fc 0006 1294 cmpal #397972,%a0 5ce9c: 6700 00d6 beqw 5cf74 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5cea0: 2002 movel %d2,%d0 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; 5cea2: 2648 moveal %a0,%a3 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5cea4: c0a8 0030 andl %a0@(48),%d0 for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5cea8: 2268 0102 moveal %a0@(258),%a1 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5ceac: 6624 bnes 5ced2 /* * Is this thread is blocked waiting for another signal but has * not blocked this one? */ if (~api->signals_blocked & mask) 5ceae: 2029 00d0 movel %a1@(208),%d0 5ceb2: 4680 notl %d0 5ceb4: c082 andl %d2,%d0 5ceb6: 661a bnes 5ced2 the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { 5ceb8: 2050 moveal %a0@,%a0 the_thread = (Thread_Control *)the_node; 5ceba: 2648 moveal %a0,%a3 /* XXX violation of visibility -- need to define thread queue support */ the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo; for ( the_node = _Chain_First( the_chain ); 5cebc: b1fc 0006 1294 cmpal #397972,%a0 5cec2: 6700 00b0 beqw 5cf74 #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5cec6: 2002 movel %d2,%d0 <== NOT EXECUTED 5cec8: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED for ( the_node = _Chain_First( the_chain ); !_Chain_Is_tail( the_chain, the_node ) ; the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5cecc: 2268 0102 moveal %a0@(258),%a1 <== NOT EXECUTED #endif /* * Is this thread is actually blocked waiting for the signal? */ if (the_thread->Wait.option & mask) 5ced0: 67dc beqs 5ceae <== NOT EXECUTED /* * 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 ) ) { 5ced2: 486e fff4 pea %fp@(-12) 5ced6: 2f03 movel %d3,%sp@- 5ced8: 2f0b movel %a3,%sp@- 5ceda: 4eb9 0005 d0ac jsr 5d0ac <_POSIX_signals_Unblock_thread> 5cee0: 4fef 000c lea %sp@(12),%sp 5cee4: 4a00 tstb %d0 5cee6: 6618 bnes 5cf00 /* * 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 ); 5cee8: 2f02 movel %d2,%sp@- 5ceea: 4eb9 0005 d08c jsr 5d08c <_POSIX_signals_Set_process_signals> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 5cef0: 588f addql #4,%sp 5cef2: 41f9 0006 1104 lea 61104 <_POSIX_signals_Vectors>,%a0 5cef8: 7002 moveq #2,%d0 5cefa: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0 5cefe: 672e beqs 5cf2e _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 5cf00: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> return 0; 5cf06: 4280 clrl %d0 } 5cf08: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5cf0e: 4e5e unlk %fp 5cf10: 4e75 rts * P1003.1c/Draft 10, p. 33 says that certain signals should always * be directed to the executing thread such as those caused by hardware * faults. */ if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) ) return pthread_kill( pthread_self(), sig ); 5cf12: 4eb9 0005 d2b8 jsr 5d2b8 5cf18: 2f03 movel %d3,%sp@- 5cf1a: 2f00 movel %d0,%sp@- 5cf1c: 4eb9 0005 d1e8 jsr 5d1e8 5cf22: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5cf24: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5cf2a: 4e5e unlk %fp 5cf2c: 4e75 rts _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 5cf2e: 4879 0006 1284 pea 61284 <_POSIX_signals_Inactive_siginfo> 5cf34: 4eb9 0004 723c jsr 4723c <_Chain_Get> if ( !psiginfo ) { 5cf3a: 588f addql #4,%sp _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); 5cf3c: 2040 moveal %d0,%a0 if ( !psiginfo ) { 5cf3e: 4a80 tstl %d0 5cf40: 6700 012a beqw 5d06c rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5cf44: 9c85 subl %d5,%d6 5cf46: 0686 0006 12fc addil #398076,%d6 if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 5cf4c: 216e fff4 0008 movel %fp@(-12),%a0@(8) 5cf52: 216e fff8 000c movel %fp@(-8),%a0@(12) 5cf58: 216e fffc 0010 movel %fp@(-4),%a0@(16) _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 5cf5e: 2f00 movel %d0,%sp@- 5cf60: 2f06 movel %d6,%sp@- 5cf62: 4eb9 0004 71dc jsr 471dc <_Chain_Append> 5cf68: 508f addql #8,%sp } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); 5cf6a: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> return 0; 5cf70: 4280 clrl %d0 5cf72: 6094 bras 5cf08 * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; 5cf74: 4287 clrl %d7 5cf76: 1e39 0005 f372 moveb 5f372 ,%d7 5cf7c: 49f9 0006 0c2c lea 60c2c <_Objects_Information_table+0x8>,%a4 5cf82: 5287 addql #1,%d7 * * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; 5cf84: 97cb subal %a3,%a3 interested_priority = PRIORITY_MAXIMUM + 1; 5cf86: 2447 moveal %d7,%a2 for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { /* * This can occur when no one is interested and an API is not configured. */ if ( !_Objects_Information_table[ the_api ] ) 5cf88: 205c moveal %a4@+,%a0 5cf8a: 4a88 tstl %a0 5cf8c: 6770 beqs 5cffe <== NEVER TAKEN continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 5cf8e: 2068 0004 moveal %a0@(4),%a0 */ if ( !the_info ) continue; #endif maximum = the_info->maximum; 5cf92: 4287 clrl %d7 5cf94: 3e28 000e movew %a0@(14),%d7 object_table = the_info->local_table; 5cf98: 2268 0018 moveal %a0@(24),%a1 for ( index = 1 ; index <= maximum ; index++ ) { 5cf9c: 4a87 tstl %d7 5cf9e: 675e beqs 5cffe */ #define _POSIX_signals_Is_interested( _api, _mask ) \ ( ~(_api)->signals_blocked & (_mask) ) int killinfo( 5cfa0: 5889 addql #4,%a1 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5cfa2: 7001 moveq #1,%d0 5cfa4: 2d43 ffec movel %d3,%fp@(-20) the_thread = (Thread_Control *) object_table[ index ]; 5cfa8: 2059 moveal %a1@+,%a0 if ( !the_thread ) 5cfaa: 4a88 tstl %a0 5cfac: 6746 beqs 5cff4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 5cfae: 2228 0014 movel %a0@(20),%d1 5cfb2: b5c1 cmpal %d1,%a2 5cfb4: 653e bcss 5cff4 #if defined(RTEMS_DEBUG) if ( !api ) continue; #endif if ( !_POSIX_signals_Is_interested( api, mask ) ) 5cfb6: 2a68 0102 moveal %a0@(258),%a5 5cfba: 262d 00d0 movel %a5@(208),%d3 5cfbe: 4683 notl %d3 5cfc0: c682 andl %d2,%d3 5cfc2: 6730 beqs 5cff4 * * NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1 * so we never have to worry about deferencing a NULL * interested thread. */ if ( the_thread->current_priority < interested_priority ) { 5cfc4: b5c1 cmpal %d1,%a2 5cfc6: 6228 bhis 5cff0 * and blocking interruptibutable by signal. * * If the interested thread is ready, don't think about changing. */ if ( interested && !_States_Is_ready( interested->current_state ) ) { 5cfc8: 4a8b tstl %a3 5cfca: 6728 beqs 5cff4 <== NEVER TAKEN 5cfcc: 2a6b 0010 moveal %a3@(16),%a5 5cfd0: 4a8d tstl %a5 5cfd2: 6720 beqs 5cff4 <== NEVER TAKEN /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5cfd4: 2628 0010 movel %a0@(16),%d3 5cfd8: 2d43 fff0 movel %d3,%fp@(-16) 5cfdc: 6712 beqs 5cff0 continue; } DEBUG_STEP("6"); /* prefer blocked/interruptible over blocked/not interruptible */ if ( !_States_Is_interruptible_by_signal(interested->current_state) ) { 5cfde: 260d movel %a5,%d3 5cfe0: 0803 001c btst #28,%d3 5cfe4: 660e bnes 5cff4 DEBUG_STEP("7"); if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) { 5cfe6: 262e fff0 movel %fp@(-16),%d3 5cfea: 0803 001c btst #28,%d3 5cfee: 6704 beqs 5cff4 */ if ( interested && !_States_Is_ready( interested->current_state ) ) { /* preferred ready over blocked */ DEBUG_STEP("5"); if ( _States_Is_ready( the_thread->current_state ) ) { 5cff0: 2441 moveal %d1,%a2 5cff2: 2648 moveal %a0,%a3 #endif maximum = the_info->maximum; object_table = the_info->local_table; for ( index = 1 ; index <= maximum ; index++ ) { 5cff4: 5280 addql #1,%d0 5cff6: b087 cmpl %d7,%d0 5cff8: 63ae blss 5cfa8 5cffa: 262e ffec movel %fp@(-20),%d3 * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) { 5cffe: b9fc 0006 0c34 cmpal #396340,%a4 5d004: 6682 bnes 5cf88 } } } } if ( interested ) { 5d006: 4a8b tstl %a3 5d008: 6700 fede beqw 5cee8 /* * 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 ) ) { 5d00c: 486e fff4 pea %fp@(-12) 5d010: 2f03 movel %d3,%sp@- 5d012: 2f0b movel %a3,%sp@- 5d014: 4eb9 0005 d0ac jsr 5d0ac <_POSIX_signals_Unblock_thread> 5d01a: 4fef 000c lea %sp@(12),%sp 5d01e: 4a00 tstb %d0 5d020: 6700 fec6 beqw 5cee8 5d024: 6000 feda braw 5cf00 <== NOT EXECUTED /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) return 0; 5d028: 4280 clrl %d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d02a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d030: 4e5e unlk %fp 5d032: 4e75 rts */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 5d034: 42ae fffc clrl %fp@(-4) 5d038: 6000 fe34 braw 5ce6e /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 5d03c: 4eb9 0004 ebd0 jsr 4ebd0 <__errno> 5d042: 7603 moveq #3,%d3 5d044: 2040 moveal %d0,%a0 5d046: 70ff moveq #-1,%d0 5d048: 2083 movel %d3,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d04a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d050: 4e5e unlk %fp 5d052: 4e75 rts */ if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 5d054: 4eb9 0004 ebd0 jsr 4ebd0 <__errno> 5d05a: 7416 moveq #22,%d2 5d05c: 2040 moveal %d0,%a0 5d05e: 70ff moveq #-1,%d0 5d060: 2082 movel %d2,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d062: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5d068: 4e5e unlk %fp 5d06a: 4e75 rts if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); 5d06c: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( EAGAIN ); 5d072: 4eb9 0004 ebd0 jsr 4ebd0 <__errno> 5d078: 720b moveq #11,%d1 5d07a: 2040 moveal %d0,%a0 5d07c: 70ff moveq #-1,%d0 } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d07e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 5d084: 2081 movel %d1,%a0@ } DEBUG_STEP("\n"); _Thread_Enable_dispatch(); return 0; } 5d086: 4e5e unlk %fp ... =============================================================================== 0004c794 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 4c794: 4e56 fffc linkw %fp,#-4 4c798: 2f0b movel %a3,%sp@- 4c79a: 266e 000c moveal %fp@(12),%a3 4c79e: 2f0a movel %a2,%sp@- 4c7a0: 246e 0010 moveal %fp@(16),%a2 POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 4c7a4: 4a8b tstl %a3 4c7a6: 6770 beqs 4c818 <== NEVER TAKEN 4c7a8: 486e fffc pea %fp@(-4) 4c7ac: 2f2e 0008 movel %fp@(8),%sp@- 4c7b0: 4879 0006 ae1c pea 6ae1c <_POSIX_Message_queue_Information_fds> 4c7b6: 4eb9 0004 f970 jsr 4f970 <_Objects_Get> rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4c7bc: 4fef 000c lea %sp@(12),%sp 4c7c0: 2040 moveal %d0,%a0 4c7c2: 4aae fffc tstl %fp@(-4) 4c7c6: 6636 bnes 4c7fe case OBJECTS_LOCAL: the_core_mq = &the_mq_fd->Queue->Message_queue; 4c7c8: 2268 0010 moveal %a0@(16),%a1 /* * Return the old values. */ if ( omqstat ) { 4c7cc: 4a8a tstl %a2 4c7ce: 6716 beqs 4c7e6 omqstat->mq_flags = the_mq_fd->oflag; 4c7d0: 24a8 0014 movel %a0@(20),%a2@ omqstat->mq_msgsize = the_core_mq->maximum_message_size; 4c7d4: 2569 0066 0008 movel %a1@(102),%a2@(8) omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 4c7da: 2569 005e 0004 movel %a1@(94),%a2@(4) omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 4c7e0: 2569 0062 000c movel %a1@(98),%a2@(12) } the_mq_fd->oflag = mqstat->mq_flags; 4c7e6: 2153 0014 movel %a3@,%a0@(20) _Thread_Enable_dispatch(); 4c7ea: 4eb9 0005 066a jsr 5066a <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c7f0: 246e fff4 moveal %fp@(-12),%a2 omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; } the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; 4c7f4: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c7f6: 266e fff8 moveal %fp@(-8),%a3 4c7fa: 4e5e unlk %fp 4c7fc: 4e75 rts #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c7fe: 4eb9 0005 6cb8 jsr 56cb8 <__errno> } 4c804: 246e fff4 moveal %fp@(-12),%a2 #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c808: 2040 moveal %d0,%a0 4c80a: 7209 moveq #9,%d1 4c80c: 70ff moveq #-1,%d0 } 4c80e: 266e fff8 moveal %fp@(-8),%a3 4c812: 4e5e unlk %fp #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); 4c814: 2081 movel %d1,%a0@ } 4c816: 4e75 rts 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 ); 4c818: 4eb9 0005 6cb8 jsr 56cb8 <__errno> case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c81e: 246e fff4 moveal %fp@(-12),%a2 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 ); 4c822: 2040 moveal %d0,%a0 4c824: 7216 moveq #22,%d1 4c826: 70ff moveq #-1,%d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } 4c828: 266e fff8 moveal %fp@(-8),%a3 4c82c: 4e5e unlk %fp 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 ); 4c82e: 2081 movel %d1,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( EBADF ); } ... =============================================================================== 0004b54c : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { 4b54c: 4e56 0000 linkw %fp,#0 4b550: 206e 0008 moveal %fp@(8),%a0 4b554: 202e 000c movel %fp@(12),%d0 4b558: 2f02 movel %d2,%sp@- if ( !attr || !attr->is_initialized ) 4b55a: 4a88 tstl %a0 4b55c: 672e beqs 4b58c 4b55e: 4a90 tstl %a0@ 4b560: 672a beqs 4b58c return EINVAL; switch ( policy ) { 4b562: 7204 moveq #4,%d1 4b564: b280 cmpl %d0,%d1 4b566: 640c bccs 4b574 return 0; default: return ENOTSUP; } } 4b568: 241f movel %sp@+,%d2 case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 4b56a: 203c 0000 0086 movel #134,%d0 } } 4b570: 4e5e unlk %fp 4b572: 4e75 rts ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 4b574: 123c 0001 moveb #1,%d1 4b578: 7417 moveq #23,%d2 4b57a: e1a9 lsll %d0,%d1 4b57c: c282 andl %d2,%d1 4b57e: 67e8 beqs 4b568 <== NEVER TAKEN return 0; default: return ENOTSUP; } } 4b580: 241f movel %sp@+,%d2 4b582: 4e5e unlk %fp switch ( policy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 4b584: 2140 0014 movel %d0,%a0@(20) return 0; 4b588: 4280 clrl %d0 default: return ENOTSUP; } } 4b58a: 4e75 rts 4b58c: 241f movel %sp@+,%d2 pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 4b58e: 7016 moveq #22,%d0 return 0; default: return ENOTSUP; } } 4b590: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046b6c : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 46b6c: 4e56 ffe0 linkw %fp,#-32 46b70: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46b74: 246e 0008 moveal %fp@(8),%a2 46b78: 262e 000c movel %fp@(12),%d3 46b7c: 242e 0010 movel %fp@(16),%d2 const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 46b80: 4a8a tstl %a2 46b82: 677a beqs 46bfe return EINVAL; if ( count == 0 ) 46b84: 4a82 tstl %d2 46b86: 6776 beqs 46bfe return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 46b88: 4a83 tstl %d3 46b8a: 6700 0090 beqw 46c1c 46b8e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46b90: 4a90 tstl %a0@ 46b92: 676a beqs 46bfe return EINVAL; switch ( the_attr->process_shared ) { 46b94: 4aa8 0004 tstl %a0@(4) 46b98: 6664 bnes 46bfe <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 46b9a: 2039 0006 250c movel 6250c <_Thread_Dispatch_disable_level>,%d0 46ba0: 5280 addql #1,%d0 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 46ba2: 42ae fff8 clrl %fp@(-8) the_attributes.maximum_count = count; 46ba6: 2d42 fffc movel %d2,%fp@(-4) 46baa: 23c0 0006 250c movel %d0,6250c <_Thread_Dispatch_disable_level> * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void ) { return (POSIX_Barrier_Control *) _Objects_Allocate( &_POSIX_Barrier_Information ); 46bb0: 4879 0006 280a pea 6280a <_POSIX_Barrier_Information> 46bb6: 4eb9 0004 8f58 jsr 48f58 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 46bbc: 588f addql #4,%sp 46bbe: 2640 moveal %d0,%a3 46bc0: 4a80 tstl %d0 46bc2: 6746 beqs 46c0a <== NEVER TAKEN _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 46bc4: 486e fff8 pea %fp@(-8) 46bc8: 486b 0010 pea %a3@(16) 46bcc: 4eb9 0004 8520 jsr 48520 <_CORE_barrier_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 46bd2: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 46bd6: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46bd8: 2079 0006 2822 moveal 62822 <_POSIX_Barrier_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 46bde: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 46be0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 46be4: 42ab 000c clrl %a3@(12) ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 46be8: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 46bea: 4eb9 0004 a082 jsr 4a082 <_Thread_Enable_dispatch> return 0; 46bf0: 508f addql #8,%sp 46bf2: 4280 clrl %d0 } 46bf4: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46bfa: 4e5e unlk %fp 46bfc: 4e75 rts switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 46bfe: 7016 moveq #22,%d0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 46c00: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46c06: 4e5e unlk %fp 46c08: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { _Thread_Enable_dispatch(); 46c0a: 4eb9 0004 a082 jsr 4a082 <_Thread_Enable_dispatch> return EAGAIN; 46c10: 700b moveq #11,%d0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 46c12: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46c18: 4e5e unlk %fp 46c1a: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 46c1c: 260e movel %fp,%d3 46c1e: 0683 ffff fff0 addil #-16,%d3 46c24: 2f03 movel %d3,%sp@- 46c26: 4eb9 0004 6aa8 jsr 46aa8 46c2c: 588f addql #4,%sp the_attr = &my_attr; 46c2e: 2043 moveal %d3,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 46c30: 4a90 tstl %a0@ 46c32: 6600 ff60 bnew 46b94 46c36: 60c6 bras 46bfe <== NOT EXECUTED =============================================================================== 000465a8 : void pthread_cleanup_push( void (*routine)( void * ), void *arg ) { 465a8: 4e56 0000 linkw %fp,#0 465ac: 2f03 movel %d3,%sp@- 465ae: 262e 000c movel %fp@(12),%d3 465b2: 2f02 movel %d2,%sp@- 465b4: 242e 0008 movel %fp@(8),%d2 /* * The POSIX standard does not address what to do when the routine * is NULL. It also does not address what happens when we cannot * allocate memory or anything else bad happens. */ if ( !routine ) 465b8: 6754 beqs 4660e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 465ba: 2039 0006 1e72 movel 61e72 <_Thread_Dispatch_disable_level>,%d0 465c0: 5280 addql #1,%d0 465c2: 23c0 0006 1e72 movel %d0,61e72 <_Thread_Dispatch_disable_level> return; _Thread_Disable_dispatch(); handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); 465c8: 4878 0010 pea 10 465cc: 4eb9 0004 ad2e jsr 4ad2e <_Workspace_Allocate> if ( handler ) { 465d2: 588f addql #4,%sp 465d4: 4a80 tstl %d0 465d6: 6726 beqs 465fe <== NEVER TAKEN thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 465d8: 2079 0006 22dc moveal 622dc <_Per_CPU_Information+0xc>,%a0 handler_stack = &thread_support->Cancellation_Handlers; 465de: 2228 0102 movel %a0@(258),%d1 handler->routine = routine; 465e2: 2040 moveal %d0,%a0 handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) ); if ( handler ) { thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; handler_stack = &thread_support->Cancellation_Handlers; 465e4: 0681 0000 00e4 addil #228,%d1 handler->routine = routine; 465ea: 2142 0008 movel %d2,%a0@(8) handler->arg = arg; 465ee: 2143 000c movel %d3,%a0@(12) _Chain_Append( handler_stack, &handler->Node ); 465f2: 2f00 movel %d0,%sp@- 465f4: 2f01 movel %d1,%sp@- 465f6: 4eb9 0004 7fc4 jsr 47fc4 <_Chain_Append> 465fc: 508f addql #8,%sp } _Thread_Enable_dispatch(); } 465fe: 242e fff8 movel %fp@(-8),%d2 46602: 262e fffc movel %fp@(-4),%d3 46606: 4e5e unlk %fp handler->routine = routine; handler->arg = arg; _Chain_Append( handler_stack, &handler->Node ); } _Thread_Enable_dispatch(); 46608: 4ef9 0004 9af2 jmp 49af2 <_Thread_Enable_dispatch> } 4660e: 242e fff8 movel %fp@(-8),%d2 46612: 262e fffc movel %fp@(-4),%d3 46616: 4e5e unlk %fp ... =============================================================================== 00047474 : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 47474: 4e56 0000 linkw %fp,#0 47478: 2f0b movel %a3,%sp@- 4747a: 2f0a movel %a2,%sp@- 4747c: 246e 000c moveal %fp@(12),%a2 POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 47480: 4a8a tstl %a2 47482: 6700 0092 beqw 47516 else the_attr = &_POSIX_Condition_variables_Default_attributes; /* * Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 47486: 7001 moveq #1,%d0 47488: b0aa 0004 cmpl %a2@(4),%d0 4748c: 6704 beqs 47492 <== NEVER TAKEN return EINVAL; if ( !the_attr->is_initialized ) 4748e: 4a92 tstl %a2@ 47490: 660e bnes 474a0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 47492: 246e fff8 moveal %fp@(-8),%a2 */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return EINVAL; if ( !the_attr->is_initialized ) return EINVAL; 47496: 7016 moveq #22,%d0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 47498: 266e fffc moveal %fp@(-4),%a3 4749c: 4e5e unlk %fp 4749e: 4e75 rts rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 474a0: 2039 0006 36c8 movel 636c8 <_Thread_Dispatch_disable_level>,%d0 474a6: 5280 addql #1,%d0 474a8: 23c0 0006 36c8 movel %d0,636c8 <_Thread_Dispatch_disable_level> RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) _Objects_Allocate( &_POSIX_Condition_variables_Information ); 474ae: 4879 0006 3a52 pea 63a52 <_POSIX_Condition_variables_Information> 474b4: 4eb9 0004 9e24 jsr 49e24 <_Objects_Allocate> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 474ba: 588f addql #4,%sp 474bc: 2640 moveal %d0,%a3 474be: 4a80 tstl %d0 474c0: 675e beqs 47520 _Thread_Enable_dispatch(); return ENOMEM; } the_cond->process_shared = the_attr->process_shared; 474c2: 276a 0004 0010 movel %a2@(4),%a3@(16) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 474c8: 42ab 0014 clrl %a3@(20) _Thread_queue_Initialize( 474cc: 4878 0074 pea 74 474d0: 2f3c 1000 0800 movel #268437504,%sp@- 474d6: 42a7 clrl %sp@- 474d8: 486b 0018 pea %a3@(24) 474dc: 4eb9 0004 b774 jsr 4b774 <_Thread_queue_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 474e2: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 474e6: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 474e8: 2079 0006 3a6a moveal 63a6a <_POSIX_Condition_variables_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 474ee: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 474f0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 474f4: 206e 0008 moveal %fp@(8),%a0 _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 474f8: 42ab 000c clrl %a3@(12) 474fc: 2080 movel %d0,%a0@ _Thread_Enable_dispatch(); 474fe: 4eb9 0004 af4e jsr 4af4e <_Thread_Enable_dispatch> return 0; } 47504: 246e fff8 moveal %fp@(-8),%a2 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; 47508: 4fef 0010 lea %sp@(16),%sp 4750c: 4280 clrl %d0 } 4750e: 266e fffc moveal %fp@(-4),%a3 47512: 4e5e unlk %fp 47514: 4e75 rts { POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; else the_attr = &_POSIX_Condition_variables_Default_attributes; 47516: 45f9 0006 0e52 lea 60e52 <_POSIX_Condition_variables_Default_attributes>,%a2 4751c: 6000 ff68 braw 47486 _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); 47520: 4eb9 0004 af4e jsr 4af4e <_Thread_Enable_dispatch> *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 47526: 246e fff8 moveal %fp@(-8),%a2 the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { _Thread_Enable_dispatch(); return ENOMEM; 4752a: 700c moveq #12,%d0 *cond = the_cond->Object.id; _Thread_Enable_dispatch(); return 0; } 4752c: 266e fffc moveal %fp@(-4),%a3 47530: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000472d4 : */ int pthread_condattr_destroy( pthread_condattr_t *attr ) { 472d4: 4e56 0000 linkw %fp,#0 472d8: 206e 0008 moveal %fp@(8),%a0 if ( !attr || attr->is_initialized == false ) 472dc: 4a88 tstl %a0 472de: 670c beqs 472ec 472e0: 4a90 tstl %a0@ 472e2: 6708 beqs 472ec <== NEVER TAKEN return EINVAL; attr->is_initialized = false; return 0; 472e4: 4280 clrl %d0 } 472e6: 4e5e unlk %fp ) { if ( !attr || attr->is_initialized == false ) return EINVAL; attr->is_initialized = false; 472e8: 4290 clrl %a0@ return 0; } 472ea: 4e75 rts int pthread_condattr_destroy( pthread_condattr_t *attr ) { if ( !attr || attr->is_initialized == false ) return EINVAL; 472ec: 7016 moveq #22,%d0 attr->is_initialized = false; return 0; } 472ee: 4e5e unlk %fp ... =============================================================================== 0004e658 : } void pthread_exit( void *value_ptr ) { 4e658: 4e56 0000 linkw %fp,#0 _POSIX_Thread_Exit( _Thread_Executing, value_ptr ); 4e65c: 2f2e 0008 movel %fp@(8),%sp@- 4e660: 2f39 0006 10d2 movel 610d2 <_Per_CPU_Information+0xc>,%sp@- 4e666: 4eb9 0004 e5e8 jsr 4e5e8 <_POSIX_Thread_Exit> 4e66c: 508f addql #8,%sp <== NOT EXECUTED } 4e66e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 0004bb4c : int pthread_join( pthread_t thread, void **value_ptr ) { 4bb4c: 4e56 fff8 linkw %fp,#-8 4bb50: 2f0a movel %a2,%sp@- register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _Thread_Get( thread, &location ); 4bb52: 486e fffc pea %fp@(-4) 4bb56: 2f2e 0008 movel %fp@(8),%sp@- int pthread_join( pthread_t thread, void **value_ptr ) { 4bb5a: 246e 000c moveal %fp@(12),%a2 register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _Thread_Get( thread, &location ); 4bb5e: 4eb9 0004 ee00 jsr 4ee00 <_Thread_Get> switch ( location ) { 4bb64: 508f addql #8,%sp 4bb66: 4aae fffc tstl %fp@(-4) 4bb6a: 670a beqs 4bb76 case OBJECTS_ERROR: break; } return ESRCH; } 4bb6c: 246e fff4 moveal %fp@(-12),%a2 #endif case OBJECTS_ERROR: break; } return ESRCH; 4bb70: 7003 moveq #3,%d0 } 4bb72: 4e5e unlk %fp 4bb74: 4e75 rts the_thread = _Thread_Get( thread, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4bb76: 2240 moveal %d0,%a1 4bb78: 2069 0102 moveal %a1@(258),%a0 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 4bb7c: 4aa8 0040 tstl %a0@(64) 4bb80: 6746 beqs 4bbc8 RTEMS_INLINE_ROUTINE bool _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 4bb82: 2279 0006 9efe moveal 69efe <_Per_CPU_Information+0xc>,%a1 _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 4bb88: b3c0 cmpal %d0,%a1 4bb8a: 674c beqs 4bbd8 <== NEVER TAKEN /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 4bb8c: 200e movel %fp,%d0 4bb8e: 5180 subql #8,%d0 4bb90: 2340 0028 movel %d0,%a1@(40) RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4bb94: 7001 moveq #1,%d0 4bb96: 2140 0074 movel %d0,%a0@(116) _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 4bb9a: 4879 0004 f6a4 pea 4f6a4 <_Thread_queue_Timeout> 4bba0: 42a7 clrl %sp@- 4bba2: 4868 0044 pea %a0@(68) 4bba6: 4eb9 0004 f2e0 jsr 4f2e0 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 4bbac: 4eb9 0004 edda jsr 4edda <_Thread_Enable_dispatch> if ( value_ptr ) 4bbb2: 4fef 000c lea %sp@(12),%sp 4bbb6: 4a8a tstl %a2 4bbb8: 672e beqs 4bbe8 *value_ptr = return_pointer; 4bbba: 24ae fff8 movel %fp@(-8),%a2@ return 0; 4bbbe: 4280 clrl %d0 case OBJECTS_ERROR: break; } return ESRCH; } 4bbc0: 246e fff4 moveal %fp@(-12),%a2 4bbc4: 4e5e unlk %fp 4bbc6: 4e75 rts case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); 4bbc8: 4eb9 0004 edda jsr 4edda <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 4bbce: 246e fff4 moveal %fp@(-12),%a2 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); return EINVAL; 4bbd2: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return ESRCH; } 4bbd4: 4e5e unlk %fp 4bbd6: 4e75 rts _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); 4bbd8: 4eb9 0004 edda jsr 4edda <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 4bbde: 246e fff4 moveal %fp@(-12),%a2 return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { _Thread_Enable_dispatch(); return EDEADLK; 4bbe2: 702d moveq #45,%d0 case OBJECTS_ERROR: break; } return ESRCH; } 4bbe4: 4e5e unlk %fp 4bbe6: 4e75 rts 4bbe8: 246e fff4 moveal %fp@(-12),%a2 _Thread_Enable_dispatch(); if ( value_ptr ) *value_ptr = return_pointer; return 0; 4bbec: 4280 clrl %d0 case OBJECTS_ERROR: break; } return ESRCH; } 4bbee: 4e5e unlk %fp ... =============================================================================== 000467a4 : * 17.1.3 Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */ int pthread_key_delete( pthread_key_t key ) { 467a4: 4e56 fffc linkw %fp,#-4 467a8: 2f02 movel %d2,%sp@- pthread_key_t id, Objects_Locations *location ) { return (POSIX_Keys_Control *) _Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location ); 467aa: 486e fffc pea %fp@(-4) 467ae: 2f2e 0008 movel %fp@(8),%sp@- 467b2: 4879 0006 2f78 pea 62f78 <_POSIX_Keys_Information> 467b8: 4eb9 0004 910c jsr 4910c <_Objects_Get> POSIX_Keys_Control *the_key; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 467be: 4fef 000c lea %sp@(12),%sp 467c2: 2400 movel %d0,%d2 467c4: 4aae fffc tstl %fp@(-4) 467c8: 6638 bnes 46802 <== NEVER TAKEN case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); 467ca: 2f00 movel %d0,%sp@- 467cc: 4879 0006 2f78 pea 62f78 <_POSIX_Keys_Information> 467d2: 4eb9 0004 8ce4 jsr 48ce4 <_Objects_Close> _POSIX_Keys_Free_memory( the_key ); 467d8: 2f02 movel %d2,%sp@- 467da: 4eb9 0004 680c jsr 4680c <_POSIX_Keys_Free_memory> */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 467e0: 2f02 movel %d2,%sp@- 467e2: 4879 0006 2f78 pea 62f78 <_POSIX_Keys_Information> 467e8: 4eb9 0004 8fa0 jsr 48fa0 <_Objects_Free> /* * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 467ee: 4eb9 0004 9d7e jsr 49d7e <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return EINVAL; } 467f4: 242e fff8 movel %fp@(-8),%d2 * NOTE: The destructor is not called and it is the responsibility * of the application to free the memory. */ _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; 467f8: 4fef 0014 lea %sp@(20),%sp 467fc: 4280 clrl %d0 case OBJECTS_ERROR: break; } return EINVAL; } 467fe: 4e5e unlk %fp 46800: 4e75 rts 46802: 242e fff8 movel %fp@(-8),%d2 #endif case OBJECTS_ERROR: break; } return EINVAL; 46806: 7016 moveq #22,%d0 } 46808: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0005d1e8 : int pthread_kill( pthread_t thread, int sig ) { 5d1e8: 4e56 fff0 linkw %fp,#-16 5d1ec: 48d7 040c moveml %d2-%d3/%a2,%sp@ 5d1f0: 242e 000c movel %fp@(12),%d2 POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 5d1f4: 6700 0090 beqw 5d286 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 5d1f8: 2602 movel %d2,%d3 5d1fa: 5383 subql #1,%d3 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 5d1fc: 701f moveq #31,%d0 5d1fe: b083 cmpl %d3,%d0 5d200: 6500 0084 bcsw 5d286 rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _Thread_Get( thread, &location ); 5d204: 486e fffc pea %fp@(-4) 5d208: 2f2e 0008 movel %fp@(8),%sp@- 5d20c: 4eb9 0004 8db0 jsr 48db0 <_Thread_Get> switch ( location ) { 5d212: 508f addql #8,%sp rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); the_thread = _Thread_Get( thread, &location ); 5d214: 2440 moveal %d0,%a2 switch ( location ) { 5d216: 4aae fffc tstl %fp@(-4) 5d21a: 6600 0082 bnew 5d29e api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 5d21e: 2202 movel %d2,%d1 5d220: 2002 movel %d2,%d0 5d222: e589 lsll #2,%d1 5d224: e988 lsll #4,%d0 case OBJECTS_LOCAL: /* * If sig == 0 then just validate arguments */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 5d226: 206a 0102 moveal %a2@(258),%a0 if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 5d22a: 9081 subl %d1,%d0 5d22c: 0680 0006 110c addil #397580,%d0 5d232: 7201 moveq #1,%d1 5d234: 2240 moveal %d0,%a1 5d236: b291 cmpl %a1@,%d1 5d238: 6728 beqs 5d262 static inline sigset_t signo_to_mask( uint32_t sig ) { return 1u << (sig - 1); 5d23a: 7001 moveq #1,%d0 5d23c: e7a8 lsll %d3,%d0 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 5d23e: 81a8 00d4 orl %d0,%a0@(212) (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 5d242: 42a7 clrl %sp@- 5d244: 2f02 movel %d2,%sp@- 5d246: 2f0a movel %a2,%sp@- 5d248: 4eb9 0005 d0ac jsr 5d0ac <_POSIX_signals_Unblock_thread> if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5d24e: 4fef 000c lea %sp@(12),%sp 5d252: 4ab9 0006 10ce tstl 610ce <_Per_CPU_Information+0x8> 5d258: 6708 beqs 5d262 5d25a: b5f9 0006 10d2 cmpal 610d2 <_Per_CPU_Information+0xc>,%a2 5d260: 6712 beqs 5d274 _Thread_Dispatch_necessary = true; } _Thread_Enable_dispatch(); 5d262: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> return 0; 5d268: 4280 clrl %d0 case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 5d26a: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 5d270: 4e5e unlk %fp 5d272: 4e75 rts api->signals_pending |= signo_to_mask( sig ); (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 5d274: 7001 moveq #1,%d0 5d276: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> } _Thread_Enable_dispatch(); 5d27c: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> return 0; 5d282: 4280 clrl %d0 5d284: 60e4 bras 5d26a if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 5d286: 4eb9 0004 ebd0 jsr 4ebd0 <__errno> 5d28c: 7416 moveq #22,%d2 5d28e: 2040 moveal %d0,%a0 5d290: 70ff moveq #-1,%d0 5d292: 2082 movel %d2,%a0@ case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); } 5d294: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 5d29a: 4e5e unlk %fp 5d29c: 4e75 rts #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 5d29e: 4eb9 0004 ebd0 jsr 4ebd0 <__errno> <== NOT EXECUTED 5d2a4: 7203 moveq #3,%d1 <== NOT EXECUTED 5d2a6: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d2a8: 70ff moveq #-1,%d0 <== NOT EXECUTED } 5d2aa: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2 <== NOT EXECUTED #endif case OBJECTS_ERROR: break; } rtems_set_errno_and_return_minus_one( ESRCH ); 5d2b0: 2081 movel %d1,%a0@ <== NOT EXECUTED } 5d2b2: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00048970 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 48970: 4e56 fffc linkw %fp,#-4 48974: 2f03 movel %d3,%sp@- 48976: 262e 0008 movel %fp@(8),%d3 4897a: 2f02 movel %d2,%sp@- * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 4897c: 486e fffc pea %fp@(-4) 48980: 2f2e 000c movel %fp@(12),%sp@- 48984: 4eb9 0004 8a84 jsr 48a84 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 4898a: 508f addql #8,%sp * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 4898c: 2400 movel %d0,%d2 if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 4898e: 7003 moveq #3,%d0 48990: b082 cmpl %d2,%d0 48992: 673e beqs 489d2 do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 48994: 2f2e fffc movel %fp@(-4),%sp@- 48998: 42a7 clrl %sp@- 4899a: 2f03 movel %d3,%sp@- 4899c: 4eb9 0004 886c jsr 4886c <_POSIX_Mutex_Lock_support> * This service only gives us the option to block. We used a polling * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { 489a2: 4fef 000c lea %sp@(12),%sp 489a6: 7210 moveq #16,%d1 489a8: b280 cmpl %d0,%d1 489aa: 670c beqs 489b8 <== ALWAYS TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 489ac: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 489b0: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 489b4: 4e5e unlk %fp <== NOT EXECUTED 489b6: 4e75 rts <== NOT EXECUTED * attempt to lock if the abstime was not in the future. If we did * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 489b8: 4a82 tstl %d2 489ba: 6736 beqs 489f2 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 489bc: 5382 subql #1,%d2 489be: 7201 moveq #1,%d1 489c0: b282 cmpl %d2,%d1 489c2: 65e8 bcss 489ac <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 489c4: 242e fff4 movel %fp@(-12),%d2 if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 489c8: 7074 moveq #116,%d0 } return lock_status; } 489ca: 262e fff8 movel %fp@(-8),%d3 489ce: 4e5e unlk %fp 489d0: 4e75 rts */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 489d2: 2f2e fffc movel %fp@(-4),%sp@- 489d6: 4878 0001 pea 1 489da: 2f03 movel %d3,%sp@- 489dc: 4eb9 0004 886c jsr 4886c <_POSIX_Mutex_Lock_support> status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 489e2: 242e fff4 movel %fp@(-12),%d2 */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Mutex_Lock_support( mutex, do_wait, ticks ); 489e6: 4fef 000c lea %sp@(12),%sp status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 489ea: 262e fff8 movel %fp@(-8),%d3 489ee: 4e5e unlk %fp 489f0: 4e75 rts 489f2: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED * not obtain the mutex, then not look at the status immediately, * make sure the right reason is returned. */ if ( !do_wait && (lock_status == EBUSY) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 489f6: 7016 moveq #22,%d0 <== NOT EXECUTED status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return lock_status; } 489f8: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED 489fc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000463a8 : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_gettype( const pthread_mutexattr_t *attr, int *type ) { 463a8: 4e56 0000 linkw %fp,#0 463ac: 206e 0008 moveal %fp@(8),%a0 463b0: 226e 000c moveal %fp@(12),%a1 if ( !attr ) 463b4: 4a88 tstl %a0 463b6: 6712 beqs 463ca return EINVAL; if ( !attr->is_initialized ) 463b8: 4a90 tstl %a0@ 463ba: 670e beqs 463ca return EINVAL; if ( !type ) 463bc: 4a89 tstl %a1 463be: 670a beqs 463ca <== NEVER TAKEN return EINVAL; *type = attr->type; 463c0: 22a8 0010 movel %a0@(16),%a1@ return 0; 463c4: 4280 clrl %d0 } 463c6: 4e5e unlk %fp 463c8: 4e75 rts if ( !attr->is_initialized ) return EINVAL; if ( !type ) return EINVAL; 463ca: 7016 moveq #22,%d0 *type = attr->type; return 0; } 463cc: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00048524 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { 48524: 4e56 0000 linkw %fp,#0 48528: 206e 0008 moveal %fp@(8),%a0 4852c: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 48530: 4a88 tstl %a0 48532: 670a beqs 4853e 48534: 4a90 tstl %a0@ 48536: 6706 beqs 4853e return EINVAL; switch ( pshared ) { 48538: 7201 moveq #1,%d1 4853a: b280 cmpl %d0,%d1 4853c: 6406 bccs 48544 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 4853e: 7016 moveq #22,%d0 } } 48540: 4e5e unlk %fp 48542: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 48544: 2140 0004 movel %d0,%a0@(4) return 0; 48548: 4280 clrl %d0 default: return EINVAL; } } 4854a: 4e5e unlk %fp ... =============================================================================== 0004640c : #if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES) int pthread_mutexattr_settype( pthread_mutexattr_t *attr, int type ) { 4640c: 4e56 0000 linkw %fp,#0 46410: 206e 0008 moveal %fp@(8),%a0 46414: 202e 000c movel %fp@(12),%d0 if ( !attr || !attr->is_initialized ) 46418: 4a88 tstl %a0 4641a: 670a beqs 46426 4641c: 4a90 tstl %a0@ 4641e: 6706 beqs 46426 <== NEVER TAKEN return EINVAL; switch ( type ) { 46420: 7203 moveq #3,%d1 46422: b280 cmpl %d0,%d1 46424: 6406 bccs 4642c case PTHREAD_MUTEX_DEFAULT: attr->type = type; return 0; default: return EINVAL; 46426: 7016 moveq #22,%d0 } } 46428: 4e5e unlk %fp 4642a: 4e75 rts switch ( type ) { case PTHREAD_MUTEX_NORMAL: case PTHREAD_MUTEX_RECURSIVE: case PTHREAD_MUTEX_ERRORCHECK: case PTHREAD_MUTEX_DEFAULT: attr->type = type; 4642c: 2140 0010 movel %d0,%a0@(16) return 0; 46430: 4280 clrl %d0 default: return EINVAL; } } 46432: 4e5e unlk %fp ... =============================================================================== 000471f8 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 471f8: 4e56 ffec linkw %fp,#-20 471fc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47200: 246e 0008 moveal %fp@(8),%a2 47204: 266e 000c moveal %fp@(12),%a3 if ( !once_control || !init_routine ) 47208: 4a8a tstl %a2 4720a: 6772 beqs 4727e 4720c: 4a8b tstl %a3 4720e: 676e beqs 4727e return EINVAL; if ( !once_control->init_executed ) { 47210: 4aaa 0004 tstl %a2@(4) 47214: 670c beqs 47222 once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; 47216: 4280 clrl %d0 } 47218: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 4721e: 4e5e unlk %fp 47220: 4e75 rts if ( !once_control || !init_routine ) return EINVAL; if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 47222: 240e movel %fp,%d2 47224: 5982 subql #4,%d2 47226: 49f9 0004 7ebc lea 47ebc ,%a4 4722c: 2f02 movel %d2,%sp@- 4722e: 4878 0100 pea 100 47232: 4878 0100 pea 100 47236: 4e94 jsr %a4@ if ( !once_control->init_executed ) { 47238: 4fef 000c lea %sp@(12),%sp 4723c: 4aaa 0004 tstl %a2@(4) 47240: 671c beqs 4725e <== ALWAYS TAKEN once_control->is_initialized = true; once_control->init_executed = true; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 47242: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47244: 4878 0100 pea 100 <== NOT EXECUTED 47248: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4724c: 4e94 jsr %a4@ <== NOT EXECUTED 4724e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED } return 0; 47252: 4280 clrl %d0 <== NOT EXECUTED } 47254: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 4725a: 4e5e unlk %fp 4725c: 4e75 rts 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; 4725e: 7001 moveq #1,%d0 47260: 2480 movel %d0,%a2@ once_control->init_executed = true; 47262: 7001 moveq #1,%d0 47264: 2540 0004 movel %d0,%a2@(4) (*init_routine)(); 47268: 4e93 jsr %a3@ } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4726a: 2f02 movel %d2,%sp@- 4726c: 4878 0100 pea 100 47270: 2f2e fffc movel %fp@(-4),%sp@- 47274: 4e94 jsr %a4@ 47276: 4fef 000c lea %sp@(12),%sp } return 0; 4727a: 4280 clrl %d0 4727c: 60d6 bras 47254 pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) return EINVAL; 4727e: 7016 moveq #22,%d0 (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); } return 0; } 47280: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 47286: 4e5e unlk %fp ... =============================================================================== 0004782c : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 4782c: 4e56 ffe8 linkw %fp,#-24 47830: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47834: 246e 0008 moveal %fp@(8),%a2 47838: 242e 000c movel %fp@(12),%d2 const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 4783c: 4a8a tstl %a2 4783e: 6772 beqs 478b2 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 47840: 4a82 tstl %d2 47842: 6700 008c beqw 478d0 47846: 2042 moveal %d2,%a0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 47848: 4a90 tstl %a0@ 4784a: 6766 beqs 478b2 <== NEVER TAKEN return EINVAL; switch ( the_attr->process_shared ) { 4784c: 4aa8 0004 tstl %a0@(4) 47850: 6660 bnes 478b2 <== NEVER TAKEN rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 47852: 2039 0006 3dcc movel 63dcc <_Thread_Dispatch_disable_level>,%d0 47858: 5280 addql #1,%d0 */ RTEMS_INLINE_ROUTINE void _CORE_RWLock_Initialize_attributes( CORE_RWLock_Attributes *the_attributes ) { the_attributes->XXX = 0; 4785a: 42ae fffc clrl %fp@(-4) 4785e: 23c0 0006 3dcc movel %d0,63dcc <_Thread_Dispatch_disable_level> * the inactive chain of free RWLock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void ) { return (POSIX_RWLock_Control *) _Objects_Allocate( &_POSIX_RWLock_Information ); 47864: 4879 0006 3f34 pea 63f34 <_POSIX_RWLock_Information> 4786a: 4eb9 0004 a1e8 jsr 4a1e8 <_Objects_Allocate> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 47870: 588f addql #4,%sp 47872: 2640 moveal %d0,%a3 47874: 4a80 tstl %d0 47876: 6746 beqs 478be _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 47878: 486e fffc pea %fp@(-4) 4787c: 486b 0010 pea %a3@(16) 47880: 4eb9 0004 98f8 jsr 498f8 <_CORE_RWLock_Initialize> uint32_t name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 47886: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 4788a: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4788c: 2079 0006 3f4c moveal 63f4c <_POSIX_RWLock_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 47892: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 47894: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 47898: 42ab 000c clrl %a3@(12) &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 4789c: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4789e: 4eb9 0004 b312 jsr 4b312 <_Thread_Enable_dispatch> return 0; 478a4: 508f addql #8,%sp 478a6: 4280 clrl %d0 } 478a8: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 478ae: 4e5e unlk %fp 478b0: 4e75 rts switch ( the_attr->process_shared ) { case PTHREAD_PROCESS_PRIVATE: /* only supported values */ break; case PTHREAD_PROCESS_SHARED: default: return EINVAL; 478b2: 7016 moveq #22,%d0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 478b4: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 478ba: 4e5e unlk %fp 478bc: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { _Thread_Enable_dispatch(); 478be: 4eb9 0004 b312 jsr 4b312 <_Thread_Enable_dispatch> return EAGAIN; 478c4: 700b moveq #11,%d0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 478c6: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 478cc: 4e5e unlk %fp 478ce: 4e75 rts * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 478d0: 240e movel %fp,%d2 478d2: 0682 ffff fff4 addil #-12,%d2 478d8: 2f02 movel %d2,%sp@- 478da: 4eb9 0004 8378 jsr 48378 478e0: 588f addql #4,%sp the_attr = &default_attr; 478e2: 2042 moveal %d2,%a0 478e4: 6000 ff62 braw 47848 =============================================================================== 00047954 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 47954: 4e56 ffec linkw %fp,#-20 47958: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4795c: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 47960: 4a8a tstl %a2 47962: 6700 0082 beqw 479e6 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 47966: 486e fff8 pea %fp@(-8) 4796a: 2f2e 000c movel %fp@(12),%sp@- 4796e: 4eb9 0004 e41c jsr 4e41c <_POSIX_Absolute_timeout_to_ticks> 47974: 486e fffc pea %fp@(-4) 47978: 2400 movel %d0,%d2 4797a: 2f12 movel %a2@,%sp@- 4797c: 4879 0006 3f34 pea 63f34 <_POSIX_RWLock_Information> 47982: 4eb9 0004 a6a0 jsr 4a6a0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 47988: 4fef 0014 lea %sp@(20),%sp 4798c: 4aae fffc tstl %fp@(-4) 47990: 6654 bnes 479e6 int _EXFUN(pthread_rwlock_init, (pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr)); int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedrdlock, 47992: 7203 moveq #3,%d1 47994: b282 cmpl %d2,%d1 47996: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 47998: 42a7 clrl %sp@- 4799a: 2f2e fff8 movel %fp@(-8),%sp@- 4799e: 4483 negl %d3 479a0: 4281 clrl %d1 479a2: 1203 moveb %d3,%d1 479a4: 2040 moveal %d0,%a0 479a6: 2f01 movel %d1,%sp@- 479a8: 2f12 movel %a2@,%sp@- 479aa: 4868 0010 pea %a0@(16) 479ae: 4eb9 0004 992c jsr 4992c <_CORE_RWLock_Obtain_for_reading> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 479b4: 4eb9 0004 b312 jsr 4b312 <_Thread_Enable_dispatch> if ( !do_wait ) { 479ba: 4fef 0014 lea %sp@(20),%sp 479be: 4a03 tstb %d3 479c0: 664a bnes 47a0c if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { 479c2: 2079 0006 4236 moveal 64236 <_Per_CPU_Information+0xc>,%a0 479c8: 7202 moveq #2,%d1 479ca: 2028 0034 movel %a0@(52),%d0 479ce: b280 cmpl %d0,%d1 479d0: 6720 beqs 479f2 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 479d2: 2f00 movel %d0,%sp@- 479d4: 4eb9 0004 7af4 jsr 47af4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 479da: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 479dc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 479e2: 4e5e unlk %fp 479e4: 4e75 rts _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 479e6: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 479e8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 479ee: 4e5e unlk %fp 479f0: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait ) { if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 479f2: 4a82 tstl %d2 479f4: 67f0 beqs 479e6 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 479f6: 5382 subql #1,%d2 479f8: 123c 0001 moveb #1,%d1 479fc: b282 cmpl %d2,%d1 479fe: 65d2 bcss 479d2 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 47a00: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 47a02: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47a08: 4e5e unlk %fp 47a0a: 4e75 rts ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait ) { 47a0c: 2079 0006 4236 moveal 64236 <_Per_CPU_Information+0xc>,%a0 47a12: 2028 0034 movel %a0@(52),%d0 status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 47a16: 2f00 movel %d0,%sp@- 47a18: 4eb9 0004 7af4 jsr 47af4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 47a1e: 588f addql #4,%sp 47a20: 60ba bras 479dc ... =============================================================================== 00047a24 : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 47a24: 4e56 ffec linkw %fp,#-20 47a28: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47a2c: 246e 0008 moveal %fp@(8),%a2 Objects_Locations location; Watchdog_Interval ticks; bool do_wait = true; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 47a30: 4a8a tstl %a2 47a32: 6700 0082 beqw 47ab6 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 47a36: 486e fff8 pea %fp@(-8) 47a3a: 2f2e 000c movel %fp@(12),%sp@- 47a3e: 4eb9 0004 e41c jsr 4e41c <_POSIX_Absolute_timeout_to_ticks> 47a44: 486e fffc pea %fp@(-4) 47a48: 2400 movel %d0,%d2 47a4a: 2f12 movel %a2@,%sp@- 47a4c: 4879 0006 3f34 pea 63f34 <_POSIX_RWLock_Information> 47a52: 4eb9 0004 a6a0 jsr 4a6a0 <_Objects_Get> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 47a58: 4fef 0014 lea %sp@(20),%sp 47a5c: 4aae fffc tstl %fp@(-4) 47a60: 6654 bnes 47ab6 (pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime)); int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock)); int _EXFUN(pthread_rwlock_timedwrlock, 47a62: 7203 moveq #3,%d1 47a64: b282 cmpl %d2,%d1 47a66: 57c3 seq %d3 case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 47a68: 42a7 clrl %sp@- 47a6a: 2f2e fff8 movel %fp@(-8),%sp@- 47a6e: 4483 negl %d3 47a70: 4281 clrl %d1 47a72: 1203 moveb %d3,%d1 47a74: 2040 moveal %d0,%a0 47a76: 2f01 movel %d1,%sp@- 47a78: 2f12 movel %a2@,%sp@- 47a7a: 4868 0010 pea %a0@(16) 47a7e: 4eb9 0004 99ec jsr 499ec <_CORE_RWLock_Obtain_for_writing> do_wait, ticks, NULL ); _Thread_Enable_dispatch(); 47a84: 4eb9 0004 b312 jsr 4b312 <_Thread_Enable_dispatch> if ( !do_wait && 47a8a: 4fef 0014 lea %sp@(20),%sp 47a8e: 4a03 tstb %d3 47a90: 664a bnes 47adc (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 47a92: 2079 0006 4236 moveal 64236 <_Per_CPU_Information+0xc>,%a0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 47a98: 7202 moveq #2,%d1 (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { 47a9a: 2028 0034 movel %a0@(52),%d0 ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 47a9e: b280 cmpl %d0,%d1 47aa0: 6720 beqs 47ac2 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 47aa2: 2f00 movel %d0,%sp@- 47aa4: 4eb9 0004 7af4 jsr 47af4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 47aaa: 588f addql #4,%sp case OBJECTS_ERROR: break; } return EINVAL; } 47aac: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47ab2: 4e5e unlk %fp 47ab4: 4e75 rts _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) return EINVAL; 47ab6: 7016 moveq #22,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 47ab8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47abe: 4e5e unlk %fp 47ac0: 4e75 rts ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { if ( status == POSIX_ABSOLUTE_TIMEOUT_INVALID ) 47ac2: 4a82 tstl %d2 47ac4: 67f0 beqs 47ab6 <== NEVER TAKEN return EINVAL; if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || 47ac6: 5382 subql #1,%d2 47ac8: 123c 0001 moveb #1,%d1 47acc: b282 cmpl %d2,%d1 47ace: 65d2 bcss 47aa2 <== NEVER TAKEN status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; 47ad0: 7074 moveq #116,%d0 case OBJECTS_ERROR: break; } return EINVAL; } 47ad2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47ad8: 4e5e unlk %fp 47ada: 4e75 rts ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 47adc: 2079 0006 4236 moveal 64236 <_Per_CPU_Information+0xc>,%a0 47ae2: 2028 0034 movel %a0@(52),%d0 if ( status == POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST || status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) return ETIMEDOUT; } return _POSIX_RWLock_Translate_core_RWLock_return_code( 47ae6: 2f00 movel %d0,%sp@- 47ae8: 4eb9 0004 7af4 jsr 47af4 <_POSIX_RWLock_Translate_core_RWLock_return_code> 47aee: 588f addql #4,%sp 47af0: 60ba bras 47aac ... =============================================================================== 00047be4 : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 47be4: 4e56 fffc linkw %fp,#-4 47be8: 206e 0008 moveal %fp@(8),%a0 47bec: 2f02 movel %d2,%sp@- POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 47bee: 4a88 tstl %a0 47bf0: 6742 beqs 47c34 <== NEVER TAKEN 47bf2: 486e fffc pea %fp@(-4) 47bf6: 2f10 movel %a0@,%sp@- 47bf8: 4879 0006 3f34 pea 63f34 <_POSIX_RWLock_Information> 47bfe: 4eb9 0004 a6a0 jsr 4a6a0 <_Objects_Get> return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 47c04: 4fef 000c lea %sp@(12),%sp 47c08: 4aae fffc tstl %fp@(-4) 47c0c: 6626 bnes 47c34 case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 47c0e: 2040 moveal %d0,%a0 47c10: 4868 0010 pea %a0@(16) 47c14: 4eb9 0004 9a7c jsr 49a7c <_CORE_RWLock_Release> 47c1a: 2400 movel %d0,%d2 _Thread_Enable_dispatch(); 47c1c: 4eb9 0004 b312 jsr 4b312 <_Thread_Enable_dispatch> return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 47c22: 2f02 movel %d2,%sp@- 47c24: 4eb9 0004 7af4 jsr 47af4 <_POSIX_RWLock_Translate_core_RWLock_return_code> case OBJECTS_ERROR: break; } return EINVAL; } 47c2a: 242e fff8 movel %fp@(-8),%d2 switch ( location ) { case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 47c2e: 508f addql #8,%sp case OBJECTS_ERROR: break; } return EINVAL; } 47c30: 4e5e unlk %fp 47c32: 4e75 rts 47c34: 242e fff8 movel %fp@(-8),%d2 #endif case OBJECTS_ERROR: break; } return EINVAL; 47c38: 7016 moveq #22,%d0 } 47c3a: 4e5e unlk %fp ... =============================================================================== 00048398 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { 48398: 4e56 0000 linkw %fp,#0 4839c: 206e 0008 moveal %fp@(8),%a0 483a0: 202e 000c movel %fp@(12),%d0 if ( !attr ) 483a4: 4a88 tstl %a0 483a6: 670a beqs 483b2 return EINVAL; if ( !attr->is_initialized ) 483a8: 4a90 tstl %a0@ 483aa: 6706 beqs 483b2 return EINVAL; switch ( pshared ) { 483ac: 7201 moveq #1,%d1 483ae: b280 cmpl %d0,%d1 483b0: 6406 bccs 483b8 <== ALWAYS TAKEN case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 483b2: 7016 moveq #22,%d0 } } 483b4: 4e5e unlk %fp 483b6: 4e75 rts return EINVAL; switch ( pshared ) { case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 483b8: 2140 0004 movel %d0,%a0@(4) return 0; 483bc: 4280 clrl %d0 default: return EINVAL; } } 483be: 4e5e unlk %fp ... =============================================================================== 00049374 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 49374: 4e56 ffe0 linkw %fp,#-32 49378: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4937c: 282e 000c movel %fp@(12),%d4 49380: 242e 0010 movel %fp@(16),%d2 int rc; /* * Check all the parameters */ if ( !param ) 49384: 6700 00bc beqw 49442 return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 49388: 486e fff8 pea %fp@(-8) 4938c: 486e fffc pea %fp@(-4) 49390: 2f02 movel %d2,%sp@- 49392: 2f04 movel %d4,%sp@- 49394: 4eb9 0004 f5bc jsr 4f5bc <_POSIX_Thread_Translate_sched_param> policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 4939a: 4fef 0010 lea %sp@(16),%sp * Check all the parameters */ if ( !param ) return EINVAL; rc = _POSIX_Thread_Translate_sched_param( 4939e: 2600 movel %d0,%d3 policy, param, &budget_algorithm, &budget_callout ); if ( rc ) 493a0: 670c beqs 493ae case OBJECTS_ERROR: break; } return ESRCH; } 493a2: 2003 movel %d3,%d0 493a4: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 493aa: 4e5e unlk %fp 493ac: 4e75 rts return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _Thread_Get( thread, &location ); 493ae: 486e fff4 pea %fp@(-12) 493b2: 2f2e 0008 movel %fp@(8),%sp@- 493b6: 4eb9 0004 c1c8 jsr 4c1c8 <_Thread_Get> switch ( location ) { 493bc: 508f addql #8,%sp return rc; /* * Actually change the scheduling policy and parameters */ the_thread = _Thread_Get( thread, &location ); 493be: 2440 moveal %d0,%a2 switch ( location ) { 493c0: 4aae fff4 tstl %fp@(-12) 493c4: 6600 008a bnew 49450 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 493c8: 266a 0102 moveal %a2@(258),%a3 if ( api->schedpolicy == SCHED_SPORADIC ) 493cc: 7004 moveq #4,%d0 493ce: b0ab 0084 cmpl %a3@(132),%d0 493d2: 6700 00b8 beqw 4948c (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 493d6: 41eb 0088 lea %a3@(136),%a0 493da: 2242 moveal %d2,%a1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 493dc: 2744 0084 movel %d4,%a3@(132) api->schedparam = *param; 493e0: 20d9 movel %a1@+,%a0@+ 493e2: 20d9 movel %a1@+,%a0@+ 493e4: 20d9 movel %a1@+,%a0@+ 493e6: 20d9 movel %a1@+,%a0@+ 493e8: 20d9 movel %a1@+,%a0@+ 493ea: 20d9 movel %a1@+,%a0@+ 493ec: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; 493ee: 256e fffc 007a movel %fp@(-4),%a2@(122) the_thread->budget_callout = budget_callout; 493f4: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 493fa: 4a84 tstl %d4 493fc: 6d32 blts 49430 <== NEVER TAKEN 493fe: 7002 moveq #2,%d0 49400: b084 cmpl %d4,%d0 49402: 6d5a blts 4945e 49404: 4280 clrl %d0 49406: 1039 0006 4686 moveb 64686 ,%d0 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 4940c: 41f9 0006 5f60 lea 65f60 <_Thread_Ticks_per_timeslice>,%a0 49412: 90ab 0088 subl %a3@(136),%d0 49416: 2550 0076 movel %a0@,%a2@(118) the_thread->real_priority = 4941a: 2540 0018 movel %d0,%a2@(24) _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 4941e: 4878 0001 pea 1 49422: 2f00 movel %d0,%sp@- 49424: 2f0a movel %a2,%sp@- 49426: 4eb9 0004 bcf0 jsr 4bcf0 <_Thread_Change_priority> the_thread, the_thread->real_priority, true ); break; 4942c: 4fef 000c lea %sp@(12),%sp _Watchdog_Remove( &api->Sporadic_timer ); _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); break; } _Thread_Enable_dispatch(); 49430: 4eb9 0004 c1a2 jsr 4c1a2 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return ESRCH; } 49436: 2003 movel %d3,%d0 49438: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4943e: 4e5e unlk %fp 49440: 4e75 rts /* * Check all the parameters */ if ( !param ) return EINVAL; 49442: 7616 moveq #22,%d3 case OBJECTS_ERROR: break; } return ESRCH; } 49444: 2003 movel %d3,%d0 49446: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4944c: 4e5e unlk %fp 4944e: 4e75 rts #endif case OBJECTS_ERROR: break; } return ESRCH; 49450: 7603 moveq #3,%d3 } 49452: 2003 movel %d3,%d0 49454: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4945a: 4e5e unlk %fp 4945c: 4e75 rts api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 4945e: 103c 0004 moveb #4,%d0 49462: b084 cmpl %d4,%d0 49464: 66ca bnes 49430 <== NEVER TAKEN true ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 49466: 276b 0088 00a4 movel %a3@(136),%a3@(164) _Watchdog_Remove( &api->Sporadic_timer ); 4946c: 486b 00a8 pea %a3@(168) 49470: 4eb9 0004 d350 jsr 4d350 <_Watchdog_Remove> _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 49476: 2f0a movel %a2,%sp@- 49478: 42a7 clrl %sp@- 4947a: 4eb9 0004 9224 jsr 49224 <_POSIX_Threads_Sporadic_budget_TSR> break; 49480: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 49484: 4eb9 0004 c1a2 jsr 4c1a2 <_Thread_Enable_dispatch> 4948a: 60aa bras 49436 case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 4948c: 486b 00a8 pea %a3@(168) 49490: 4eb9 0004 d350 jsr 4d350 <_Watchdog_Remove> 49496: 588f addql #4,%sp api->schedpolicy = policy; api->schedparam = *param; 49498: 41eb 0088 lea %a3@(136),%a0 4949c: 2242 moveal %d2,%a1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 4949e: 2744 0084 movel %d4,%a3@(132) api->schedparam = *param; 494a2: 20d9 movel %a1@+,%a0@+ 494a4: 20d9 movel %a1@+,%a0@+ 494a6: 20d9 movel %a1@+,%a0@+ 494a8: 20d9 movel %a1@+,%a0@+ 494aa: 20d9 movel %a1@+,%a0@+ 494ac: 20d9 movel %a1@+,%a0@+ 494ae: 2091 movel %a1@,%a0@ the_thread->budget_algorithm = budget_algorithm; 494b0: 256e fffc 007a movel %fp@(-4),%a2@(122) the_thread->budget_callout = budget_callout; 494b6: 256e fff8 007e movel %fp@(-8),%a2@(126) switch ( api->schedpolicy ) { 494bc: 4a84 tstl %d4 494be: 6c00 ff3e bgew 493fe 494c2: 6000 ff6c braw 49430 <== NOT EXECUTED ... =============================================================================== 0004d6d8 : int pthread_sigmask( int how, const sigset_t *set, sigset_t *oset ) { 4d6d8: 4e56 0000 linkw %fp,#0 4d6dc: 202e 0008 movel %fp@(8),%d0 4d6e0: 2f0a movel %a2,%sp@- 4d6e2: 226e 000c moveal %fp@(12),%a1 4d6e6: 246e 0010 moveal %fp@(16),%a2 POSIX_API_Control *api; if ( !set && !oset ) 4d6ea: 4a89 tstl %a1 4d6ec: 6700 0084 beqw 4d772 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4d6f0: 2079 0006 3102 moveal 63102 <_Per_CPU_Information+0xc>,%a0 4d6f6: 2068 0102 moveal %a0@(258),%a0 if ( oset ) 4d6fa: 4a8a tstl %a2 4d6fc: 6708 beqs 4d706 *oset = api->signals_blocked; 4d6fe: 24a8 00d0 movel %a0@(208),%a2@ if ( !set ) 4d702: 4a89 tstl %a1 4d704: 673a beqs 4d740 <== NEVER TAKEN return 0; switch ( how ) { 4d706: 7201 moveq #1,%d1 4d708: b280 cmpl %d0,%d1 4d70a: 675e beqs 4d76a 4d70c: 123c 0002 moveb #2,%d1 4d710: b280 cmpl %d0,%d1 4d712: 6736 beqs 4d74a 4d714: 4a80 tstl %d0 4d716: 663c bnes 4d754 break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; break; case SIG_SETMASK: api->signals_blocked = *set; 4d718: 2151 00d0 movel %a1@,%a0@(208) /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { 4d71c: 2039 0006 3328 movel 63328 <_POSIX_signals_Pending>,%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4d722: 2228 00d0 movel %a0@(208),%d1 4d726: 4681 notl %d1 (api->signals_pending | _POSIX_signals_Pending) ) { 4d728: 80a8 00d4 orl %a0@(212),%d0 /* XXX are there critical section problems here? */ /* XXX evaluate the new set */ if ( ~api->signals_blocked & 4d72c: c081 andl %d1,%d0 4d72e: 6710 beqs 4d740 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); 4d730: 4eb9 0004 9d78 jsr 49d78 <_Thread_Dispatch> } return 0; } 4d736: 246e fffc moveal %fp@(-4),%a2 if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 4d73a: 4280 clrl %d0 } 4d73c: 4e5e unlk %fp 4d73e: 4e75 rts 4d740: 246e fffc moveal %fp@(-4),%a2 if ( ~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; 4d744: 4280 clrl %d0 } 4d746: 4e5e unlk %fp 4d748: 4e75 rts switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; break; case SIG_UNBLOCK: api->signals_blocked &= ~*set; 4d74a: 2011 movel %a1@,%d0 4d74c: 4680 notl %d0 4d74e: c1a8 00d0 andl %d0,%a0@(208) break; 4d752: 60c8 bras 4d71c case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4d754: 4eb9 0004 fe3c jsr 4fe3c <__errno> (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 4d75a: 246e fffc moveal %fp@(-4),%a2 break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4d75e: 2040 moveal %d0,%a0 4d760: 7216 moveq #22,%d1 4d762: 70ff moveq #-1,%d0 (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 4d764: 4e5e unlk %fp break; case SIG_SETMASK: api->signals_blocked = *set; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 4d766: 2081 movel %d1,%a0@ (api->signals_pending | _POSIX_signals_Pending) ) { _Thread_Dispatch(); } return 0; } 4d768: 4e75 rts if ( !set ) return 0; switch ( how ) { case SIG_BLOCK: api->signals_blocked |= *set; 4d76a: 2011 movel %a1@,%d0 4d76c: 81a8 00d0 orl %d0,%a0@(208) break; 4d770: 60aa bras 4d71c sigset_t *oset ) { POSIX_API_Control *api; if ( !set && !oset ) 4d772: 4a8a tstl %a2 4d774: 67de beqs 4d754 rtems_set_errno_and_return_minus_one( EINVAL ); api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4d776: 2079 0006 3102 moveal 63102 <_Per_CPU_Information+0xc>,%a0 4d77c: 2068 0102 moveal %a0@(258),%a0 if ( oset ) *oset = api->signals_blocked; 4d780: 24a8 00d0 movel %a0@(208),%a2@ if ( !set ) 4d784: 4a89 tstl %a1 4d786: 6600 ff7e bnew 4d706 4d78a: 60b4 bras 4d740 =============================================================================== 00046e98 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 46e98: 4e56 0000 linkw %fp,#0 * 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() ) 46e9c: 4ab9 0006 22d8 tstl 622d8 <_Per_CPU_Information+0x8> 46ea2: 663c bnes 46ee0 <== NEVER TAKEN return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 46ea4: 2079 0006 22dc moveal 622dc <_Per_CPU_Information+0xc>,%a0 46eaa: 2039 0006 1e72 movel 61e72 <_Thread_Dispatch_disable_level>,%d0 46eb0: 5280 addql #1,%d0 46eb2: 2068 0102 moveal %a0@(258),%a0 46eb6: 23c0 0006 1e72 movel %d0,61e72 <_Thread_Dispatch_disable_level> _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 46ebc: 4aa8 00d8 tstl %a0@(216) 46ec0: 6622 bnes 46ee4 <== NEVER TAKEN 46ec2: 4aa8 00e0 tstl %a0@(224) 46ec6: 671c beqs 46ee4 thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 46ec8: 4eb9 0004 9af2 jsr 49af2 <_Thread_Enable_dispatch> if ( cancel ) _POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED ); 46ece: 4878 ffff pea ffffffff 46ed2: 2f39 0006 22dc movel 622dc <_Per_CPU_Information+0xc>,%sp@- 46ed8: 4eb9 0004 d004 jsr 4d004 <_POSIX_Thread_Exit> 46ede: 508f addql #8,%sp <== NOT EXECUTED } 46ee0: 4e5e unlk %fp <== NOT EXECUTED 46ee2: 4e75 rts <== NOT EXECUTED 46ee4: 4e5e unlk %fp _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelation_requested ) cancel = true; _Thread_Enable_dispatch(); 46ee6: 4ef9 0004 9af2 jmp 49af2 <_Thread_Enable_dispatch> =============================================================================== 00047a08 : * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 47a08: 4e56 ffc4 linkw %fp,#-60 47a0c: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 47a10: 4879 0006 3e18 pea 63e18 47a16: 47f9 0004 8478 lea 48478 ,%a3 * errno - otherwise */ int rtems_aio_enqueue (rtems_aio_request *req) { 47a1c: 246e 0008 moveal %fp@(8),%a2 struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 47a20: 4e93 jsr %a3@ if (result != 0) { 47a22: 588f addql #4,%sp struct sched_param param; /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); 47a24: 2400 movel %d0,%d2 if (result != 0) { 47a26: 6600 00ba bnew 47ae2 return result; } /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); 47a2a: 49f9 0004 8e30 lea 48e30 ,%a4 47a30: 4e94 jsr %a4@ 47a32: 486e ffdc pea %fp@(-36) 47a36: 486e fff8 pea %fp@(-8) 47a3a: 2f00 movel %d0,%sp@- 47a3c: 4eb9 0004 89a4 jsr 489a4 req->caller_thread = pthread_self (); 47a42: 4e94 jsr %a4@ req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 47a44: 206a 0014 moveal %a2@(20),%a0 req->policy = policy; req->aiocbp->error_code = EINPROGRESS; req->aiocbp->return_value = 0; if ((aio_request_queue.idle_threads == 0) && 47a48: 4fef 000c lea %sp@(12),%sp /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 47a4c: 222e ffdc movel %fp@(-36),%d1 47a50: 92a8 0014 subl %a0@(20),%d1 req->policy = policy; 47a54: 256e fff8 0008 movel %fp@(-8),%a2@(8) /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); 47a5a: 2540 0010 movel %d0,%a2@(16) req->priority = param.sched_priority - req->aiocbp->aio_reqprio; req->policy = policy; req->aiocbp->error_code = EINPROGRESS; 47a5e: 7077 moveq #119,%d0 /* _POSIX_PRIORITIZED_IO and _POSIX_PRIORITY_SCHEDULING are defined, we can use aio_reqprio to lower the priority of the request */ pthread_getschedparam (pthread_self(), &policy, ¶m); req->caller_thread = pthread_self (); req->priority = param.sched_priority - req->aiocbp->aio_reqprio; 47a60: 2541 000c movel %d1,%a2@(12) req->policy = policy; req->aiocbp->error_code = EINPROGRESS; 47a64: 2140 0030 movel %d0,%a0@(48) req->aiocbp->return_value = 0; 47a68: 42a8 0034 clrl %a0@(52) if ((aio_request_queue.idle_threads == 0) && 47a6c: 4ab9 0006 3e80 tstl 63e80 47a72: 660a bnes 47a7e <== NEVER TAKEN 47a74: 7204 moveq #4,%d1 47a76: b2b9 0006 3e7c cmpl 63e7c ,%d1 47a7c: 6c7a bges 47af8 else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 47a7e: 42a7 clrl %sp@- 47a80: 2f10 movel %a0@,%sp@- 47a82: 4bf9 0004 7512 lea 47512 ,%a5 47a88: 4879 0006 3e60 pea 63e60 47a8e: 4e95 jsr %a5@ req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 47a90: 4fef 000c lea %sp@(12),%sp else { /* the maximum number of threads has been already created even though some of them might be idle. The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, 47a94: 2840 moveal %d0,%a4 req->aiocbp->aio_fildes, 0); if (r_chain != NULL) 47a96: 4a80 tstl %d0 47a98: 6700 00e0 beqw 47b7a { pthread_mutex_lock (&r_chain->mutex); 47a9c: 260c movel %a4,%d3 47a9e: 0683 0000 001c addil #28,%d3 rtems_aio_insert_prio (&r_chain->perfd, req); pthread_cond_signal (&r_chain->cond); pthread_mutex_unlock (&r_chain->mutex); 47aa4: 4bf9 0004 8514 lea 48514 ,%a5 The request belongs to one of the active fd chain */ r_chain = rtems_aio_search_fd (&aio_request_queue.work_req, req->aiocbp->aio_fildes, 0); if (r_chain != NULL) { pthread_mutex_lock (&r_chain->mutex); 47aaa: 2f03 movel %d3,%sp@- 47aac: 4e93 jsr %a3@ rtems_aio_insert_prio (&r_chain->perfd, req); 47aae: 2f0a movel %a2,%sp@- 47ab0: 486c 0008 pea %a4@(8) 47ab4: 4eb9 0004 78d4 jsr 478d4 pthread_cond_signal (&r_chain->cond); 47aba: 486c 0020 pea %a4@(32) 47abe: 4eb9 0004 8000 jsr 48000 pthread_mutex_unlock (&r_chain->mutex); 47ac4: 2f03 movel %d3,%sp@- 47ac6: 4e95 jsr %a5@ 47ac8: 4fef 0014 lea %sp@(20),%sp if (aio_request_queue.idle_threads > 0) pthread_cond_signal (&aio_request_queue.new_req); } } pthread_mutex_unlock (&aio_request_queue.mutex); 47acc: 4879 0006 3e18 pea 63e18 47ad2: 4e95 jsr %a5@ return 0; 47ad4: 588f addql #4,%sp } 47ad6: 2002 movel %d2,%d0 47ad8: 4cee 3c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a5 47ade: 4e5e unlk %fp 47ae0: 4e75 rts /* The queue should be initialized */ AIO_assert (aio_request_queue.initialized == AIO_QUEUE_INITIALIZED); result = pthread_mutex_lock (&aio_request_queue.mutex); if (result != 0) { free (req); 47ae2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 47ae4: 4eb9 0004 3c60 jsr 43c60 <== NOT EXECUTED return result; 47aea: 588f addql #4,%sp <== NOT EXECUTED } } pthread_mutex_unlock (&aio_request_queue.mutex); return 0; } 47aec: 2002 movel %d2,%d0 <== NOT EXECUTED 47aee: 4cee 3c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a5 <== NOT EXECUTED 47af4: 4e5e unlk %fp <== NOT EXECUTED 47af6: 4e75 rts <== NOT EXECUTED if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 47af8: 4878 0001 pea 1 47afc: 2f10 movel %a0@,%sp@- 47afe: 4879 0006 3e60 pea 63e60 47b04: 4eb9 0004 7512 jsr 47512 if (r_chain->new_fd == 1) { 47b0a: 4fef 000c lea %sp@(12),%sp if ((aio_request_queue.idle_threads == 0) && aio_request_queue.active_threads < AIO_MAX_THREADS) /* we still have empty places on the active_threads chain */ { chain = &aio_request_queue.work_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 47b0e: 2840 moveal %d0,%a4 if (r_chain->new_fd == 1) { 47b10: 7001 moveq #1,%d0 47b12: b0ac 0018 cmpl %a4@(24),%d0 47b16: 6684 bnes 47a9c RTEMS_INLINE_ROUTINE void _Chain_Prepend( Chain_Control *the_chain, Chain_Node *the_node ) { _Chain_Insert(_Chain_Head(the_chain), the_node); 47b18: 2f0a movel %a2,%sp@- 47b1a: 486c 0008 pea %a4@(8) 47b1e: 4eb9 0004 a118 jsr 4a118 <_Chain_Insert> rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 47b24: 42ac 0018 clrl %a4@(24) pthread_mutex_init (&r_chain->mutex, NULL); 47b28: 42a7 clrl %sp@- 47b2a: 486c 001c pea %a4@(28) 47b2e: 4eb9 0004 8338 jsr 48338 pthread_cond_init (&r_chain->cond, NULL); 47b34: 42a7 clrl %sp@- 47b36: 486c 0020 pea %a4@(32) 47b3a: 4eb9 0004 7f40 jsr 47f40 AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, 47b40: 2f0c movel %a4,%sp@- 47b42: 487a faee pea %pc@(47632 ) 47b46: 4879 0006 3e20 pea 63e20 47b4c: 486e fffc pea %fp@(-4) 47b50: 4eb9 0004 8694 jsr 48694 rtems_aio_handle, (void *) r_chain); if (result != 0) { 47b56: 4fef 0028 lea %sp@(40),%sp 47b5a: 4a80 tstl %d0 47b5c: 6600 00b4 bnew 47c12 if (aio_request_queue.idle_threads > 0) pthread_cond_signal (&aio_request_queue.new_req); } } pthread_mutex_unlock (&aio_request_queue.mutex); 47b60: 4879 0006 3e18 pea 63e18 rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); return result; } ++aio_request_queue.active_threads; 47b66: 52b9 0006 3e7c addql #1,63e7c 47b6c: 4bf9 0004 8514 lea 48514 ,%a5 if (aio_request_queue.idle_threads > 0) pthread_cond_signal (&aio_request_queue.new_req); } } pthread_mutex_unlock (&aio_request_queue.mutex); 47b72: 4e95 jsr %a5@ return 0; 47b74: 588f addql #4,%sp 47b76: 6000 ff5e braw 47ad6 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 47b7a: 4878 0001 pea 1 47b7e: 206a 0014 moveal %a2@(20),%a0 47b82: 2f10 movel %a0@,%sp@- 47b84: 4879 0006 3e6c pea 63e6c 47b8a: 4e95 jsr %a5@ if (r_chain->new_fd == 1) { 47b8c: 4fef 000c lea %sp@(12),%sp 47b90: 7201 moveq #1,%d1 } else { /* or to the idle chain */ chain = &aio_request_queue.idle_req; r_chain = rtems_aio_search_fd (chain, req->aiocbp->aio_fildes, 1); 47b92: 2640 moveal %d0,%a3 if (r_chain->new_fd == 1) { 47b94: b2ab 0018 cmpl %a3@(24),%d1 47b98: 673a beqs 47bd4 r_chain->new_fd = 0; pthread_mutex_init (&r_chain->mutex, NULL); pthread_cond_init (&r_chain->cond, NULL); } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); 47b9a: 2f0a movel %a2,%sp@- 47b9c: 486b 0008 pea %a3@(8) 47ba0: 4bf9 0004 8514 lea 48514 ,%a5 47ba6: 4eb9 0004 78d4 jsr 478d4 47bac: 508f addql #8,%sp if (aio_request_queue.idle_threads > 0) 47bae: 4ab9 0006 3e80 tstl 63e80 47bb4: 6f00 ff16 blew 47acc pthread_cond_signal (&aio_request_queue.new_req); 47bb8: 4879 0006 3e1c pea 63e1c <== NOT EXECUTED 47bbe: 4eb9 0004 8000 jsr 48000 <== NOT EXECUTED 47bc4: 588f addql #4,%sp <== NOT EXECUTED } } pthread_mutex_unlock (&aio_request_queue.mutex); 47bc6: 4879 0006 3e18 pea 63e18 <== NOT EXECUTED 47bcc: 4e95 jsr %a5@ <== NOT EXECUTED return 0; 47bce: 588f addql #4,%sp <== NOT EXECUTED 47bd0: 6000 ff04 braw 47ad6 <== NOT EXECUTED 47bd4: 2f0a movel %a2,%sp@- 47bd6: 486b 0008 pea %a3@(8) 47bda: 4bf9 0004 8514 lea 48514 ,%a5 47be0: 4eb9 0004 a118 jsr 4a118 <_Chain_Insert> if (r_chain->new_fd == 1) { /* If this is a new fd chain we signal the idle threads that might be waiting for requests */ AIO_printf (" New chain on waiting queue \n "); rtems_chain_prepend (&r_chain->perfd, &req->next_prio); r_chain->new_fd = 0; 47be6: 42ab 0018 clrl %a3@(24) pthread_mutex_init (&r_chain->mutex, NULL); 47bea: 42a7 clrl %sp@- 47bec: 486b 001c pea %a3@(28) 47bf0: 4eb9 0004 8338 jsr 48338 pthread_cond_init (&r_chain->cond, NULL); 47bf6: 42a7 clrl %sp@- 47bf8: 486b 0020 pea %a3@(32) 47bfc: 4eb9 0004 7f40 jsr 47f40 47c02: 4fef 0018 lea %sp@(24),%sp } else /* just insert the request in the existing fd chain */ rtems_aio_insert_prio (&r_chain->perfd, req); if (aio_request_queue.idle_threads > 0) 47c06: 4ab9 0006 3e80 tstl 63e80 47c0c: 6eaa bgts 47bb8 <== NEVER TAKEN 47c0e: 6000 febc braw 47acc AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); 47c12: 4879 0006 3e18 pea 63e18 <== NOT EXECUTED return result; 47c18: 2400 movel %d0,%d2 <== NOT EXECUTED AIO_printf ("New thread \n"); result = pthread_create (&thid, &aio_request_queue.attr, rtems_aio_handle, (void *) r_chain); if (result != 0) { pthread_mutex_unlock (&aio_request_queue.mutex); 47c1a: 4eb9 0004 8514 jsr 48514 <== NOT EXECUTED return result; 47c20: 588f addql #4,%sp <== NOT EXECUTED } } pthread_mutex_unlock (&aio_request_queue.mutex); return 0; } 47c22: 2002 movel %d2,%d0 <== NOT EXECUTED 47c24: 4cee 3c0c ffc4 moveml %fp@(-60),%d2-%d3/%a2-%a5 <== NOT EXECUTED 47c2a: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00047632 : * NULL - if error */ static void * rtems_aio_handle (void *arg) { 47632: 4e56 ffb0 linkw %fp,#-80 47636: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ rtems_aio_request_chain *r_chain = arg; 4763a: 286e 0008 moveal %fp@(8),%a4 node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 4763e: 260e movel %fp,%d3 47640: 240c movel %a4,%d2 47642: 2e0e movel %fp,%d7 47644: 2a3c 0004 8478 movel #296056,%d5 4764a: 0682 0000 001c addil #28,%d2 struct timespec timeout; AIO_printf ("Chain is empty [WQ], wait for work\n"); pthread_mutex_unlock (&r_chain->mutex); 47650: 4bf9 0004 8514 lea 48514 ,%a5 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 47656: 2c3c 0004 a0b4 movel #303284,%d6 node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 4765c: 0683 ffff ffd8 addil #-40,%d3 47662: 5987 subql #4,%d7 /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 47664: 2f02 movel %d2,%sp@- 47666: 2045 moveal %d5,%a0 47668: 4e90 jsr %a0@ if (result != 0) 4766a: 588f addql #4,%sp 4766c: 4a80 tstl %d0 4766e: 6600 008c bnew 476fc RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 47672: 200c movel %a4,%d0 47674: 0680 0000 000c addil #12,%d0 } } AIO_printf ("Thread finished\n"); return NULL; } 4767a: 246c 0008 moveal %a4@(8),%a2 /* If the locked chain is not empty, take the first request extract it, unlock the chain and process the request, in this way the user can supply more requests to this fd chain */ if (!rtems_chain_is_empty (chain)) { 4767e: b08a cmpl %a2,%d0 47680: 6700 00e4 beqw 47766 node = rtems_chain_first (chain); req = (rtems_aio_request *) node; /* See _POSIX_PRIORITIZE_IO and _POSIX_PRIORITY_SCHEDULING discussion in rtems_aio_enqueue () */ pthread_getschedparam (pthread_self(), &policy, ¶m); 47684: 47f9 0004 8e30 lea 48e30 ,%a3 4768a: 4e93 jsr %a3@ 4768c: 2f03 movel %d3,%sp@- 4768e: 2f07 movel %d7,%sp@- 47690: 2f00 movel %d0,%sp@- 47692: 4eb9 0004 89a4 jsr 489a4 param.sched_priority = req->priority; 47698: 2d6a 000c ffd8 movel %a2@(12),%fp@(-40) pthread_setschedparam (pthread_self(), req->policy, ¶m); 4769e: 282a 0008 movel %a2@(8),%d4 476a2: 4e93 jsr %a3@ 476a4: 2f03 movel %d3,%sp@- 476a6: 2f04 movel %d4,%sp@- 476a8: 2f00 movel %d0,%sp@- 476aa: 4eb9 0004 8e44 jsr 48e44 476b0: 2046 moveal %d6,%a0 476b2: 2f0a movel %a2,%sp@- 476b4: 4e90 jsr %a0@ rtems_chain_extract (node); pthread_mutex_unlock (&r_chain->mutex); 476b6: 2f02 movel %d2,%sp@- 476b8: 4e95 jsr %a5@ switch (req->aiocbp->aio_lio_opcode) { 476ba: 266a 0014 moveal %a2@(20),%a3 476be: 4fef 0020 lea %sp@(32),%sp 476c2: 7202 moveq #2,%d1 476c4: 202b 002c movel %a3@(44),%d0 476c8: b280 cmpl %d0,%d1 476ca: 677c beqs 47748 476cc: 123c 0003 moveb #3,%d1 476d0: b280 cmpl %d0,%d1 476d2: 6768 beqs 4773c <== NEVER TAKEN 476d4: 123c 0001 moveb #1,%d1 476d8: b280 cmpl %d0,%d1 476da: 672c beqs 47708 <== ALWAYS TAKEN default: result = -1; } if (result == -1) { req->aiocbp->return_value = -1; 476dc: 70ff moveq #-1,%d0 <== NOT EXECUTED 476de: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED req->aiocbp->error_code = errno; 476e2: 4eb9 0005 1a30 jsr 51a30 <__errno> <== NOT EXECUTED 476e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 476ea: 2750 0030 movel %a0@,%a3@(48) <== NOT EXECUTED /* acquire the mutex of the current fd chain. we don't need to lock the queue mutex since we can add requests to idle fd chains or even active ones if the working request has been extracted from the chain */ result = pthread_mutex_lock (&r_chain->mutex); 476ee: 2f02 movel %d2,%sp@- <== NOT EXECUTED 476f0: 2045 moveal %d5,%a0 <== NOT EXECUTED 476f2: 4e90 jsr %a0@ <== NOT EXECUTED if (result != 0) 476f4: 588f addql #4,%sp <== NOT EXECUTED 476f6: 4a80 tstl %d0 <== NOT EXECUTED 476f8: 6700 ff78 beqw 47672 <== NOT EXECUTED } } AIO_printf ("Thread finished\n"); return NULL; } 476fc: 4280 clrl %d0 <== NOT EXECUTED 476fe: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 47704: 4e5e unlk %fp <== NOT EXECUTED 47706: 4e75 rts <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); switch (req->aiocbp->aio_lio_opcode) { case LIO_READ: AIO_printf ("read\n"); result = pread (req->aiocbp->aio_fildes, 47708: 2f2b 0008 movel %a3@(8),%sp@- 4770c: 2f2b 0004 movel %a3@(4),%sp@- 47710: 2f2b 0010 movel %a3@(16),%sp@- 47714: 2f2b 000c movel %a3@(12),%sp@- 47718: 2f13 movel %a3@,%sp@- 4771a: 4eb9 0005 24d6 jsr 524d6 (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 47720: 4fef 0014 lea %sp@(20),%sp break; default: result = -1; } if (result == -1) { 47724: 72ff moveq #-1,%d1 47726: b280 cmpl %d0,%d1 47728: 6700 0170 beqw 4789a req->aiocbp->return_value = -1; req->aiocbp->error_code = errno; } else { req->aiocbp->return_value = result; 4772c: 206a 0014 moveal %a2@(20),%a0 47730: 2140 0034 movel %d0,%a0@(52) req->aiocbp->error_code = 0; 47734: 42a8 0030 clrl %a0@(48) 47738: 6000 ff2a braw 47664 req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_SYNC: AIO_printf ("sync\n"); result = fsync (req->aiocbp->aio_fildes); 4773c: 2f13 movel %a3@,%sp@- <== NOT EXECUTED 4773e: 4eb9 0004 e65c jsr 4e65c <== NOT EXECUTED break; 47744: 588f addql #4,%sp <== NOT EXECUTED 47746: 60dc bras 47724 <== NOT EXECUTED req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; case LIO_WRITE: AIO_printf ("write\n"); result = pwrite (req->aiocbp->aio_fildes, 47748: 2f2b 0008 movel %a3@(8),%sp@- 4774c: 2f2b 0004 movel %a3@(4),%sp@- 47750: 2f2b 0010 movel %a3@(16),%sp@- 47754: 2f2b 000c movel %a3@(12),%sp@- 47758: 2f13 movel %a3@,%sp@- 4775a: 4eb9 0005 259e jsr 5259e (void *) req->aiocbp->aio_buf, req->aiocbp->aio_nbytes, req->aiocbp->aio_offset); break; 47760: 4fef 0014 lea %sp@(20),%sp 47764: 60be bras 47724 struct timespec timeout; AIO_printf ("Chain is empty [WQ], wait for work\n"); pthread_mutex_unlock (&r_chain->mutex); 47766: 2f02 movel %d2,%sp@- 47768: 4e95 jsr %a5@ pthread_mutex_lock (&aio_request_queue.mutex); 4776a: 4879 0006 3e18 pea 63e18 47770: 4eb9 0004 8478 jsr 48478 if (rtems_chain_is_empty (chain)) 47776: 508f addql #8,%sp 47778: b5ec 0008 cmpal %a4@(8),%a2 4777c: 670e beqs 4778c <== ALWAYS TAKEN } } /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); 4777e: 4879 0006 3e18 pea 63e18 <== NOT EXECUTED 47784: 4e95 jsr %a5@ <== NOT EXECUTED 47786: 588f addql #4,%sp <== NOT EXECUTED 47788: 6000 feda braw 47664 <== NOT EXECUTED pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); 4778c: 486e fff4 pea %fp@(-12) timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 47790: 280c movel %a4,%d4 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); 47792: 4878 0001 pea 1 timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 47796: 0684 0000 0020 addil #32,%d4 pthread_mutex_unlock (&r_chain->mutex); pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); 4779c: 4eb9 0004 7dd0 jsr 47dd0 timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 477a2: 486e fff4 pea %fp@(-12) pthread_mutex_lock (&aio_request_queue.mutex); if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 477a6: 56ae fff4 addql #3,%fp@(-12) timeout.tv_nsec = 0; result = pthread_cond_timedwait (&r_chain->cond, 477aa: 4879 0006 3e18 pea 63e18 if (rtems_chain_is_empty (chain)) { clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; 477b0: 42ae fff8 clrl %fp@(-8) result = pthread_cond_timedwait (&r_chain->cond, 477b4: 2f04 movel %d4,%sp@- 477b6: 4eb9 0004 807c jsr 4807c &aio_request_queue.mutex, &timeout); /* If no requests were added to the chain we delete the fd chain from the queue and start working with idle fd chains */ if (result == ETIMEDOUT) { 477bc: 4fef 0014 lea %sp@(20),%sp 477c0: 7274 moveq #116,%d1 477c2: b280 cmpl %d0,%d1 477c4: 66b8 bnes 4777e <== NEVER TAKEN 477c6: 2f0c movel %a4,%sp@- 477c8: 2046 moveal %d6,%a0 477ca: 4e90 jsr %a0@ rtems_chain_extract (&r_chain->next_fd); pthread_mutex_destroy (&r_chain->mutex); 477cc: 2f02 movel %d2,%sp@- 477ce: 4eb9 0004 81c4 jsr 481c4 pthread_cond_destroy (&r_chain->cond); 477d4: 2f04 movel %d4,%sp@- 477d6: 4eb9 0004 7e50 jsr 47e50 free (r_chain); 477dc: 2f0c movel %a4,%sp@- 477de: 4eb9 0004 3c60 jsr 43c60 } } AIO_printf ("Thread finished\n"); return NULL; } 477e4: 2039 0006 3e6c movel 63e6c ,%d0 pthread_cond_destroy (&r_chain->cond); free (r_chain); /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { 477ea: 4fef 0010 lea %sp@(16),%sp 477ee: 0c80 0006 3e70 cmpil #409200,%d0 477f4: 6734 beqs 4782a } } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; 477f6: 53b9 0006 3e80 subql #1,63e80 ++aio_request_queue.active_threads; node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = (rtems_aio_request_chain *) node; 477fc: 2840 moveal %d0,%a4 } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; ++aio_request_queue.active_threads; 477fe: 52b9 0006 3e7c addql #1,63e7c 47804: 2400 movel %d0,%d2 47806: 2046 moveal %d6,%a0 47808: 0682 0000 001c addil #28,%d2 4780e: 2f00 movel %d0,%sp@- 47810: 4e90 jsr %a0@ node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = (rtems_aio_request_chain *) node; rtems_aio_move_to_work (r_chain); 47812: 2f0c movel %a4,%sp@- 47814: 4eb9 0004 75d0 jsr 475d0 4781a: 508f addql #8,%sp } } /* If there was a request added in the initial fd chain then release the mutex and process it */ pthread_mutex_unlock (&aio_request_queue.mutex); 4781c: 4879 0006 3e18 pea 63e18 47822: 4e95 jsr %a5@ 47824: 588f addql #4,%sp 47826: 6000 fe3c braw 47664 if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); 4782a: 486e fff4 pea %fp@(-12) /* If the idle chain is empty sleep for 3 seconds and wait for a signal. The thread now becomes idle. */ if (rtems_chain_is_empty (&aio_request_queue.idle_req)) { AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; 4782e: 52b9 0006 3e80 addql #1,63e80 --aio_request_queue.active_threads; 47834: 53b9 0006 3e7c subql #1,63e7c clock_gettime (CLOCK_REALTIME, &timeout); 4783a: 4878 0001 pea 1 4783e: 4eb9 0004 7dd0 jsr 47dd0 timeout.tv_sec += 3; timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 47844: 486e fff4 pea %fp@(-12) AIO_printf ("Chain is empty [IQ], wait for work\n"); ++aio_request_queue.idle_threads; --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; 47848: 56ae fff4 addql #3,%fp@(-12) timeout.tv_nsec = 0; result = pthread_cond_timedwait (&aio_request_queue.new_req, 4784c: 4879 0006 3e18 pea 63e18 47852: 4879 0006 3e1c pea 63e1c ++aio_request_queue.idle_threads; --aio_request_queue.active_threads; clock_gettime (CLOCK_REALTIME, &timeout); timeout.tv_sec += 3; timeout.tv_nsec = 0; 47858: 42ae fff8 clrl %fp@(-8) result = pthread_cond_timedwait (&aio_request_queue.new_req, 4785c: 4eb9 0004 807c jsr 4807c &aio_request_queue.mutex, &timeout); /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { 47862: 4fef 0014 lea %sp@(20),%sp 47866: 7274 moveq #116,%d1 47868: b280 cmpl %d0,%d1 4786a: 6748 beqs 478b4 <== ALWAYS TAKEN 4786c: 2039 0006 3e6c movel 63e6c ,%d0 <== NOT EXECUTED } } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; 47872: 53b9 0006 3e80 subql #1,63e80 <== NOT EXECUTED ++aio_request_queue.active_threads; node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = (rtems_aio_request_chain *) node; 47878: 2840 moveal %d0,%a4 <== NOT EXECUTED } /* Otherwise move this chain to the working chain and start the loop all over again */ AIO_printf ("Work on idle\n"); --aio_request_queue.idle_threads; ++aio_request_queue.active_threads; 4787a: 52b9 0006 3e7c addql #1,63e7c <== NOT EXECUTED 47880: 2400 movel %d0,%d2 <== NOT EXECUTED 47882: 2046 moveal %d6,%a0 <== NOT EXECUTED 47884: 0682 0000 001c addil #28,%d2 <== NOT EXECUTED 4788a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4788c: 4e90 jsr %a0@ <== NOT EXECUTED node = rtems_chain_first (&aio_request_queue.idle_req); rtems_chain_extract (node); r_chain = (rtems_aio_request_chain *) node; rtems_aio_move_to_work (r_chain); 4788e: 2f0c movel %a4,%sp@- <== NOT EXECUTED 47890: 4eb9 0004 75d0 jsr 475d0 <== NOT EXECUTED 47896: 508f addql #8,%sp <== NOT EXECUTED 47898: 6082 bras 4781c <== NOT EXECUTED break; default: result = -1; } if (result == -1) { 4789a: 266a 0014 moveal %a2@(20),%a3 <== NOT EXECUTED req->aiocbp->return_value = -1; 4789e: 70ff moveq #-1,%d0 <== NOT EXECUTED 478a0: 2740 0034 movel %d0,%a3@(52) <== NOT EXECUTED req->aiocbp->error_code = errno; 478a4: 4eb9 0005 1a30 jsr 51a30 <__errno> <== NOT EXECUTED 478aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 478ac: 2750 0030 movel %a0@,%a3@(48) <== NOT EXECUTED 478b0: 6000 fe3c braw 476ee <== NOT EXECUTED /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { AIO_printf ("Etimeout\n"); --aio_request_queue.idle_threads; pthread_mutex_unlock (&aio_request_queue.mutex); 478b4: 4879 0006 3e18 pea 63e18 /* If no new fd chain was added in the idle requests then this thread is finished */ if (result == ETIMEDOUT) { AIO_printf ("Etimeout\n"); --aio_request_queue.idle_threads; 478ba: 53b9 0006 3e80 subql #1,63e80 pthread_mutex_unlock (&aio_request_queue.mutex); 478c0: 4eb9 0004 8514 jsr 48514 return NULL; 478c6: 588f addql #4,%sp } } AIO_printf ("Thread finished\n"); return NULL; } 478c8: 4280 clrl %d0 478ca: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 478d0: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047394 : * 0 - if initialization succeeded */ int rtems_aio_init (void) { 47394: 4e56 0000 linkw %fp,#0 47398: 2f02 movel %d2,%sp@- int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 4739a: 4879 0006 3e20 pea 63e20 473a0: 4eb9 0004 863c jsr 4863c if (result != 0) 473a6: 588f addql #4,%sp int rtems_aio_init (void) { int result = 0; result = pthread_attr_init (&aio_request_queue.attr); 473a8: 2400 movel %d0,%d2 if (result != 0) 473aa: 670a beqs 473b6 <== ALWAYS TAKEN aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; return result; } 473ac: 2002 movel %d2,%d0 <== NOT EXECUTED 473ae: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 473b2: 4e5e unlk %fp <== NOT EXECUTED 473b4: 4e75 rts <== NOT EXECUTED result = pthread_attr_init (&aio_request_queue.attr); if (result != 0) return result; result = 473b6: 42a7 clrl %sp@- 473b8: 4879 0006 3e20 pea 63e20 473be: 4eb9 0004 8668 jsr 48668 pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) 473c4: 508f addql #8,%sp 473c6: 4a80 tstl %d0 473c8: 6600 0122 bnew 474ec pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 473cc: 42a7 clrl %sp@- 473ce: 4879 0006 3e18 pea 63e18 473d4: 4eb9 0004 8338 jsr 48338 if (result != 0) 473da: 508f addql #8,%sp 473dc: 4a80 tstl %d0 473de: 6600 00e4 bnew 474c4 pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); 473e2: 42a7 clrl %sp@- 473e4: 4879 0006 3e1c pea 63e1c 473ea: 4eb9 0004 7f40 jsr 47f40 if (result != 0) { 473f0: 508f addql #8,%sp result = pthread_mutex_init (&aio_request_queue.mutex, NULL); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); 473f2: 2400 movel %d0,%d2 if (result != 0) { 473f4: 665e bnes 47454 <== NEVER TAKEN { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 473f6: 42b9 0006 3e64 clrl 63e64 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 473fc: 203c 0006 3e64 movel #409188,%d0 47402: 23c0 0006 3e60 movel %d0,63e60 head->previous = NULL; tail->previous = head; 47408: 203c 0006 3e60 movel #409184,%d0 4740e: 23c0 0006 3e68 movel %d0,63e68 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 47414: 203c 0006 3e70 movel #409200,%d0 4741a: 23c0 0006 3e6c movel %d0,63e6c head->previous = NULL; tail->previous = head; 47420: 203c 0006 3e6c movel #409196,%d0 47426: 23c0 0006 3e74 movel %d0,63e74 rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 4742c: 203c 0000 b00b movel #45067,%d0 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 47432: 42b9 0006 3e70 clrl 63e70 } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; 47438: 42b9 0006 3e7c clrl 63e7c aio_request_queue.idle_threads = 0; 4743e: 42b9 0006 3e80 clrl 63e80 aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 47444: 23c0 0006 3e78 movel %d0,63e78 return result; } 4744a: 2002 movel %d2,%d0 4744c: 242e fffc movel %fp@(-4),%d2 47450: 4e5e unlk %fp 47452: 4e75 rts pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); if (result != 0) { pthread_mutex_destroy (&aio_request_queue.mutex); 47454: 4879 0006 3e18 pea 63e18 <== NOT EXECUTED 4745a: 4eb9 0004 81c4 jsr 481c4 <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); 47460: 4879 0006 3e20 pea 63e20 <== NOT EXECUTED 47466: 4eb9 0004 861c jsr 4861c <== NOT EXECUTED 4746c: 508f addql #8,%sp <== NOT EXECUTED ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 4746e: 203c 0006 3e64 movel #409188,%d0 <== NOT EXECUTED 47474: 23c0 0006 3e60 movel %d0,63e60 <== NOT EXECUTED head->previous = NULL; tail->previous = head; 4747a: 203c 0006 3e60 movel #409184,%d0 <== NOT EXECUTED 47480: 23c0 0006 3e68 movel %d0,63e68 <== NOT EXECUTED ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 47486: 203c 0006 3e70 movel #409200,%d0 <== NOT EXECUTED 4748c: 23c0 0006 3e6c movel %d0,63e6c <== NOT EXECUTED head->previous = NULL; tail->previous = head; 47492: 203c 0006 3e6c movel #409196,%d0 <== NOT EXECUTED 47498: 23c0 0006 3e74 movel %d0,63e74 <== NOT EXECUTED rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; aio_request_queue.idle_threads = 0; aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 4749e: 203c 0000 b00b movel #45067,%d0 <== NOT EXECUTED { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 474a4: 42b9 0006 3e64 clrl 63e64 <== NOT EXECUTED 474aa: 42b9 0006 3e70 clrl 63e70 <== NOT EXECUTED } rtems_chain_initialize_empty (&aio_request_queue.work_req); rtems_chain_initialize_empty (&aio_request_queue.idle_req); aio_request_queue.active_threads = 0; 474b0: 42b9 0006 3e7c clrl 63e7c <== NOT EXECUTED aio_request_queue.idle_threads = 0; 474b6: 42b9 0006 3e80 clrl 63e80 <== NOT EXECUTED aio_request_queue.initialized = AIO_QUEUE_INITIALIZED; 474bc: 23c0 0006 3e78 movel %d0,63e78 <== NOT EXECUTED 474c2: 6086 bras 4744a <== NOT EXECUTED pthread_attr_destroy (&aio_request_queue.attr); result = pthread_mutex_init (&aio_request_queue.mutex, NULL); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); 474c4: 4879 0006 3e20 pea 63e20 <== NOT EXECUTED 474ca: 4eb9 0004 861c jsr 4861c <== NOT EXECUTED 474d0: 588f addql #4,%sp <== NOT EXECUTED result = pthread_cond_init (&aio_request_queue.new_req, NULL); 474d2: 42a7 clrl %sp@- <== NOT EXECUTED 474d4: 4879 0006 3e1c pea 63e1c <== NOT EXECUTED 474da: 4eb9 0004 7f40 jsr 47f40 <== NOT EXECUTED if (result != 0) { 474e0: 508f addql #8,%sp <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); result = pthread_cond_init (&aio_request_queue.new_req, NULL); 474e2: 2400 movel %d0,%d2 <== NOT EXECUTED if (result != 0) { 474e4: 6700 ff10 beqw 473f6 <== NOT EXECUTED 474e8: 6000 ff6a braw 47454 <== NOT EXECUTED result = pthread_attr_setdetachstate (&aio_request_queue.attr, PTHREAD_CREATE_DETACHED); if (result != 0) pthread_attr_destroy (&aio_request_queue.attr); 474ec: 4879 0006 3e20 pea 63e20 <== NOT EXECUTED 474f2: 4eb9 0004 861c jsr 4861c <== NOT EXECUTED 474f8: 588f addql #4,%sp <== NOT EXECUTED result = pthread_mutex_init (&aio_request_queue.mutex, NULL); 474fa: 42a7 clrl %sp@- <== NOT EXECUTED 474fc: 4879 0006 3e18 pea 63e18 <== NOT EXECUTED 47502: 4eb9 0004 8338 jsr 48338 <== NOT EXECUTED if (result != 0) 47508: 508f addql #8,%sp <== NOT EXECUTED 4750a: 4a80 tstl %d0 <== NOT EXECUTED 4750c: 6700 fed4 beqw 473e2 <== NOT EXECUTED 47510: 60b2 bras 474c4 <== NOT EXECUTED =============================================================================== 000478d4 : * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 478d4: 4e56 fff4 linkw %fp,#-12 478d8: 202e 0008 movel %fp@(8),%d0 478dc: 48d7 1c00 moveml %a2-%a4,%sp@ } } AIO_printf ("Thread finished\n"); return NULL; } 478e0: 2640 moveal %d0,%a3 * NONE */ void rtems_aio_insert_prio (rtems_chain_control *chain, rtems_aio_request *req) { 478e2: 286e 000c moveal %fp@(12),%a4 } } AIO_printf ("Thread finished\n"); return NULL; } 478e6: 225b moveal %a3@+,%a1 rtems_chain_node *node; AIO_printf ("FD exists \n"); node = rtems_chain_first (chain); if (rtems_chain_is_empty (chain)) { 478e8: b7c9 cmpal %a1,%a3 478ea: 6730 beqs 4791c <== NEVER TAKEN rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 478ec: 246c 0014 moveal %a4@(20),%a2 if (rtems_chain_is_empty (chain)) { AIO_printf ("First in chain \n"); rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 478f0: 2069 0014 moveal %a1@(20),%a0 while (req->aiocbp->aio_reqprio > prio && 478f4: 202a 0014 movel %a2@(20),%d0 478f8: b0a8 0014 cmpl %a0@(20),%d0 478fc: 6f2a bles 47928 <== ALWAYS TAKEN } } AIO_printf ("Thread finished\n"); return NULL; } 478fe: 2051 moveal %a1@,%a0 <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 47900: 2248 moveal %a0,%a1 <== NOT EXECUTED !rtems_chain_is_tail (chain, node)) { node = rtems_chain_next (node); prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; 47902: 2468 0014 moveal %a0@(20),%a2 <== NOT EXECUTED rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 47906: b0aa 0014 cmpl %a2@(20),%d0 <== NOT EXECUTED 4790a: 6f06 bles 47912 <== NOT EXECUTED 4790c: b7c8 cmpal %a0,%a3 <== NOT EXECUTED 4790e: 66ee bnes 478fe <== NOT EXECUTED } } AIO_printf ("Thread finished\n"); return NULL; } 47910: 204b moveal %a3,%a0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_insert( rtems_chain_node *after_node, rtems_chain_node *the_node ) { _Chain_Insert( after_node, the_node ); 47912: 2d4c 000c movel %a4,%fp@(12) <== NOT EXECUTED 47916: 2d68 0004 0008 movel %a0@(4),%fp@(8) <== NOT EXECUTED } rtems_chain_insert (node->previous, &req->next_prio); } } 4791c: 4cd7 1c00 moveml %sp@,%a2-%a4 47920: 4e5e unlk %fp 47922: 4ef9 0004 a118 jmp 4a118 <_Chain_Insert> rtems_chain_prepend (chain, &req->next_prio); } else { AIO_printf ("Add by priority \n"); int prio = ((rtems_aio_request *) node)->aiocbp->aio_reqprio; while (req->aiocbp->aio_reqprio > prio && 47928: 2049 moveal %a1,%a0 4792a: 2d4c 000c movel %a4,%fp@(12) 4792e: 2d68 0004 0008 movel %a0@(4),%fp@(8) 47934: 60e6 bras 4791c =============================================================================== 000475d0 : * NONE */ void rtems_aio_move_to_work (rtems_aio_request_chain *r_chain) { 475d0: 4e56 0000 linkw %fp,#0 } } AIO_printf ("Thread finished\n"); return NULL; } 475d4: 2279 0006 3e60 moveal 63e60 ,%a1 * NONE */ void rtems_aio_move_to_work (rtems_aio_request_chain *r_chain) { 475da: 2f0a movel %a2,%sp@- 475dc: 246e 0008 moveal %fp@(8),%a2 rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && 475e0: 202a 0014 movel %a2@(20),%d0 475e4: b0a9 0014 cmpl %a1@(20),%d0 475e8: 6f30 bles 4761a <== NEVER TAKEN 475ea: b3fc 0006 3e64 cmpal #409188,%a1 475f0: 6728 beqs 4761a <== NEVER TAKEN } } AIO_printf ("Thread finished\n"); return NULL; } 475f2: 2051 moveal %a1@,%a0 rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && 475f4: b0a8 0014 cmpl %a0@(20),%d0 475f8: 6f0a bles 47604 475fa: 2248 moveal %a0,%a1 475fc: b1fc 0006 3e64 cmpal #409188,%a0 47602: 66ee bnes 475f2 <== ALWAYS TAKEN 47604: 2f0a movel %a2,%sp@- 47606: 2f28 0004 movel %a0@(4),%sp@- 4760a: 4eb9 0004 a118 jsr 4a118 <_Chain_Insert> node = rtems_chain_next (node); temp = (rtems_aio_request_chain *) node; } rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd); } 47610: 246e fffc moveal %fp@(-4),%a2 47614: 508f addql #8,%sp 47616: 4e5e unlk %fp 47618: 4e75 rts rtems_chain_node *node; node = rtems_chain_first (&aio_request_queue.work_req); temp = (rtems_aio_request_chain *) node; while (temp->fildes < r_chain->fildes && 4761a: 2049 moveal %a1,%a0 <== NOT EXECUTED 4761c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4761e: 2f28 0004 movel %a0@(4),%sp@- <== NOT EXECUTED 47622: 4eb9 0004 a118 jsr 4a118 <_Chain_Insert> <== NOT EXECUTED node = rtems_chain_next (node); temp = (rtems_aio_request_chain *) node; } rtems_chain_insert (rtems_chain_previous (node), &r_chain->next_fd); } 47628: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4762c: 508f addql #8,%sp <== NOT EXECUTED 4762e: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047936 : * Output parameters: * NONE */ void rtems_aio_remove_fd (rtems_aio_request_chain *r_chain) { 47936: 4e56 ffec linkw %fp,#-20 4793a: 206e 0008 moveal %fp@(8),%a0 4793e: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ RTEMS_INLINE_ROUTINE bool _Chain_Is_tail( Chain_Control *the_chain, const Chain_Node *the_node ) { return (the_node == _Chain_Tail(the_chain)); 47942: 2608 movel %a0,%d3 47944: 0683 0000 000c addil #12,%d3 } } AIO_printf ("Thread finished\n"); return NULL; } 4794a: 2468 0008 moveal %a0@(8),%a2 rtems_chain_control *chain; rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 4794e: b68a cmpl %a2,%d3 47950: 6732 beqs 47984 <== NEVER TAKEN 47952: 49f9 0004 a0b4 lea 4a0b4 <_Chain_Extract>,%a4 47958: 47f9 0004 3c60 lea 43c60 ,%a3 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 4795e: 2f0a movel %a2,%sp@- 47960: 4e94 jsr %a4@ } } AIO_printf ("Thread finished\n"); return NULL; } 47962: 2412 movel %a2@,%d2 while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); req->aiocbp->error_code = ECANCELED; 47964: 203c 0000 008c movel #140,%d0 4796a: 206a 0014 moveal %a2@(20),%a0 4796e: 2140 0030 movel %d0,%a0@(48) req->aiocbp->return_value = -1; 47972: 70ff moveq #-1,%d0 47974: 2140 0034 movel %d0,%a0@(52) free (req); 47978: 2f0a movel %a2,%sp@- while (!rtems_chain_is_tail (chain, node)) { rtems_chain_extract (node); rtems_aio_request *req = (rtems_aio_request *) node; node = rtems_chain_next (node); 4797a: 2442 moveal %d2,%a2 req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; free (req); 4797c: 4e93 jsr %a3@ rtems_chain_control *chain; rtems_chain_node *node; chain = &r_chain->perfd; node = rtems_chain_first (chain); while (!rtems_chain_is_tail (chain, node)) 4797e: 508f addql #8,%sp 47980: b682 cmpl %d2,%d3 47982: 66da bnes 4795e node = rtems_chain_next (node); req->aiocbp->error_code = ECANCELED; req->aiocbp->return_value = -1; free (req); } } 47984: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4798a: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004798e : * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { 4798e: 4e56 0000 linkw %fp,#0 } } AIO_printf ("Thread finished\n"); return NULL; } 47992: 226e 0008 moveal %fp@(8),%a1 * AIO_NOTCANCELED - if request was not canceled * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { 47996: 2f0a movel %a2,%sp@- 47998: 222e 000c movel %fp@(12),%d1 } } AIO_printf ("Thread finished\n"); return NULL; } 4799c: 2059 moveal %a1@+,%a0 * AIO_CANCELED - if request was canceled */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) 4799e: b3c8 cmpal %a0,%a1 479a0: 675c beqs 479fe return AIO_ALLDONE; rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; 479a2: 2448 moveal %a0,%a2 while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 479a4: b2a8 0014 cmpl %a0@(20),%d1 479a8: 6722 beqs 479cc <== ALWAYS TAKEN } } AIO_printf ("Thread finished\n"); return NULL; } 479aa: 2010 movel %a0@,%d0 <== NOT EXECUTED current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { node = rtems_chain_next (node); current = (rtems_aio_request *) node; 479ac: 2440 moveal %d0,%a2 <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 479ae: b3c0 cmpal %d0,%a1 <== NOT EXECUTED 479b0: 6710 beqs 479c2 <== NOT EXECUTED 479b2: b2aa 0014 cmpl %a2@(20),%d1 <== NOT EXECUTED 479b6: 6716 beqs 479ce <== NOT EXECUTED 479b8: 2040 moveal %d0,%a0 <== NOT EXECUTED } } AIO_printf ("Thread finished\n"); return NULL; } 479ba: 2010 movel %a0@,%d0 <== NOT EXECUTED current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { node = rtems_chain_next (node); current = (rtems_aio_request *) node; 479bc: 2440 moveal %d0,%a2 <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 479be: b3c0 cmpal %d0,%a1 <== NOT EXECUTED 479c0: 66f0 bnes 479b2 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 479c2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED node = rtems_chain_next (node); current = (rtems_aio_request *) node; } if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; 479c6: 7001 moveq #1,%d0 <== NOT EXECUTED current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 479c8: 4e5e unlk %fp <== NOT EXECUTED 479ca: 4e75 rts <== NOT EXECUTED rtems_chain_node *node = rtems_chain_first (chain); rtems_aio_request *current; current = (rtems_aio_request *) node; while (!rtems_chain_is_tail (chain, node) && current->aiocbp != aiocbp) { 479cc: 2008 movel %a0,%d0 479ce: 2f00 movel %d0,%sp@- 479d0: 4eb9 0004 a0b4 jsr 4a0b4 <_Chain_Extract> if (rtems_chain_is_tail (chain, node)) return AIO_NOTCANCELED; else { rtems_chain_extract (node); current->aiocbp->error_code = ECANCELED; 479d6: 206a 0014 moveal %a2@(20),%a0 479da: 203c 0000 008c movel #140,%d0 479e0: 2140 0030 movel %d0,%a0@(48) current->aiocbp->return_value = -1; 479e4: 70ff moveq #-1,%d0 479e6: 2140 0034 movel %d0,%a0@(52) free (current); 479ea: 2f0a movel %a2,%sp@- 479ec: 4eb9 0004 3c60 jsr 43c60 } return AIO_CANCELED; } 479f2: 246e fffc moveal %fp@(-4),%a2 current->aiocbp->error_code = ECANCELED; current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; 479f6: 508f addql #8,%sp 479f8: 4280 clrl %d0 } 479fa: 4e5e unlk %fp 479fc: 4e75 rts 479fe: 246e fffc moveal %fp@(-4),%a2 */ int rtems_aio_remove_req (rtems_chain_control *chain, struct aiocb *aiocbp) { if (rtems_chain_is_empty (chain)) return AIO_ALLDONE; 47a02: 7002 moveq #2,%d0 current->aiocbp->return_value = -1; free (current); } return AIO_CANCELED; } 47a04: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 0004f184 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 4f184: 4e56 ffe8 linkw %fp,#-24 4f188: 202e 0010 movel %fp@(16),%d0 4f18c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4f190: 242e 0008 movel %fp@(8),%d2 4f194: 262e 000c movel %fp@(12),%d3 4f198: 246e 0014 moveal %fp@(20),%a2 Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 4f19c: 4a82 tstl %d2 4f19e: 677a beqs 4f21a return RTEMS_INVALID_NAME; if ( !id ) 4f1a0: 4a8a tstl %a2 4f1a2: 6700 00cc beqw 4f270 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 4f1a6: 0803 0004 btst #4,%d3 4f1aa: 677a beqs 4f226 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 4f1ac: 42ae fff8 clrl %fp@(-8) if ( maximum_waiters == 0 ) 4f1b0: 4a80 tstl %d0 4f1b2: 6700 00b0 beqw 4f264 4f1b6: 2239 0006 364c movel 6364c <_Thread_Dispatch_disable_level>,%d1 4f1bc: 5281 addql #1,%d1 return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4f1be: 2d40 fffc movel %d0,%fp@(-4) 4f1c2: 23c1 0006 364c movel %d1,6364c <_Thread_Dispatch_disable_level> * 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 ); 4f1c8: 4879 0006 3e88 pea 63e88 <_Barrier_Information> 4f1ce: 4eb9 0004 9f2c jsr 49f2c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4f1d4: 588f addql #4,%sp 4f1d6: 2640 moveal %d0,%a3 4f1d8: 4a80 tstl %d0 4f1da: 6776 beqs 4f252 <== NEVER TAKEN _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 4f1dc: 2743 0010 movel %d3,%a3@(16) _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 4f1e0: 486e fff8 pea %fp@(-8) 4f1e4: 486b 0014 pea %a3@(20) 4f1e8: 4eb9 0004 fa34 jsr 4fa34 <_CORE_barrier_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 4f1ee: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 4f1f2: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f1f4: 2079 0006 3ea0 moveal 63ea0 <_Barrier_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 4f1fa: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 4f1fc: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 4f200: 2742 000c movel %d2,%a3@(12) &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 4f204: 2480 movel %d0,%a2@ _Thread_Enable_dispatch(); 4f206: 4eb9 0004 b086 jsr 4b086 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4f20c: 508f addql #8,%sp 4f20e: 4280 clrl %d0 } 4f210: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4f216: 4e5e unlk %fp 4f218: 4e75 rts { Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 4f21a: 7003 moveq #3,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4f21c: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4f222: 4e5e unlk %fp 4f224: 4e75 rts 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; 4f226: 7201 moveq #1,%d1 4f228: 2d41 fff8 movel %d1,%fp@(-8) 4f22c: 2239 0006 364c movel 6364c <_Thread_Dispatch_disable_level>,%d1 4f232: 5281 addql #1,%d1 the_attributes.maximum_count = maximum_waiters; 4f234: 2d40 fffc movel %d0,%fp@(-4) 4f238: 23c1 0006 364c movel %d1,6364c <_Thread_Dispatch_disable_level> 4f23e: 4879 0006 3e88 pea 63e88 <_Barrier_Information> 4f244: 4eb9 0004 9f2c jsr 49f2c <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 4f24a: 588f addql #4,%sp 4f24c: 2640 moveal %d0,%a3 4f24e: 4a80 tstl %d0 4f250: 668a bnes 4f1dc _Thread_Enable_dispatch(); 4f252: 4eb9 0004 b086 jsr 4b086 <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 4f258: 7005 moveq #5,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4f25a: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4f260: 4e5e unlk %fp 4f262: 4e75 rts /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; 4f264: 700a moveq #10,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4f266: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4f26c: 4e5e unlk %fp 4f26e: 4e75 rts if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; if ( !id ) return RTEMS_INVALID_ADDRESS; 4f270: 7009 moveq #9,%d0 *id = the_barrier->Object.id; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4f272: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4f278: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047490 : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 47490: 4e56 0000 linkw %fp,#0 47494: 2f03 movel %d3,%sp@- 47496: 262e 0014 movel %fp@(20),%d3 4749a: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE bool rtems_chain_append_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Append_with_empty_check( chain, node ); 4749c: 2f2e 000c movel %fp@(12),%sp@- 474a0: 2f2e 0008 movel %fp@(8),%sp@- 474a4: 242e 0010 movel %fp@(16),%d2 474a8: 4eb9 0004 7a54 jsr 47a54 <_Chain_Append_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { 474ae: 508f addql #8,%sp 474b0: 4a00 tstb %d0 474b2: 660e bnes 474c2 sc = rtems_event_send( task, events ); } return sc; } 474b4: 242e fff8 movel %fp@(-8),%d2 474b8: 4280 clrl %d0 474ba: 262e fffc movel %fp@(-4),%d3 474be: 4e5e unlk %fp 474c0: 4e75 rts { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 474c2: 2d43 000c movel %d3,%fp@(12) } return sc; } 474c6: 262e fffc movel %fp@(-4),%d3 { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 474ca: 2d42 0008 movel %d2,%fp@(8) } return sc; } 474ce: 242e fff8 movel %fp@(-8),%d2 474d2: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_append_with_empty_check( chain, node ); if ( was_empty ) { sc = rtems_event_send( task, events ); 474d4: 4ef9 0004 69c4 jmp 469c4 ... =============================================================================== 000474dc : rtems_chain_control *chain, rtems_id task, rtems_event_set events, rtems_chain_node **node ) { 474dc: 4e56 0000 linkw %fp,#0 474e0: 2f03 movel %d3,%sp@- 474e2: 262e 0010 movel %fp@(16),%d3 474e6: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE bool rtems_chain_get_with_empty_check( rtems_chain_control *chain, rtems_chain_node **node ) { return _Chain_Get_with_empty_check( chain, node ); 474e8: 2f2e 0014 movel %fp@(20),%sp@- 474ec: 2f2e 0008 movel %fp@(8),%sp@- 474f0: 242e 000c movel %fp@(12),%d2 474f4: 4eb9 0004 7af4 jsr 47af4 <_Chain_Get_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { 474fa: 508f addql #8,%sp 474fc: 4a00 tstb %d0 474fe: 660e bnes 4750e sc = rtems_event_send( task, events ); } return sc; } 47500: 242e fff8 movel %fp@(-8),%d2 47504: 4280 clrl %d0 47506: 262e fffc movel %fp@(-4),%d3 4750a: 4e5e unlk %fp 4750c: 4e75 rts { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 4750e: 2d43 000c movel %d3,%fp@(12) } return sc; } 47512: 262e fffc movel %fp@(-4),%d3 { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 47516: 2d42 0008 movel %d2,%fp@(8) } return sc; } 4751a: 242e fff8 movel %fp@(-8),%d2 4751e: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; bool is_empty = rtems_chain_get_with_empty_check( chain, node ); if ( is_empty ) { sc = rtems_event_send( task, events ); 47520: 4ef9 0004 69c4 jmp 469c4 ... =============================================================================== 00047528 : rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 47528: 4e56 ffe0 linkw %fp,#-32 4752c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL ) { rtems_event_set out; sc = rtems_event_receive( 47530: 2c0e movel %fp,%d6 47532: 45f9 0004 7b44 lea 47b44 <_Chain_Get>,%a2 47538: 5986 subql #4,%d6 4753a: 47f9 0004 681c lea 4681c ,%a3 rtems_chain_control *chain, rtems_event_set events, rtems_interval timeout, rtems_chain_node **node_ptr ) { 47540: 262e 0008 movel %fp@(8),%d3 47544: 2a2e 000c movel %fp@(12),%d5 47548: 282e 0010 movel %fp@(16),%d4 */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 4754c: 2f03 movel %d3,%sp@- 4754e: 4e92 jsr %a2@ rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 47550: 588f addql #4,%sp 47552: 2400 movel %d0,%d2 47554: 6622 bnes 47578 ) { rtems_event_set out; sc = rtems_event_receive( 47556: 2f06 movel %d6,%sp@- 47558: 2f04 movel %d4,%sp@- 4755a: 42a7 clrl %sp@- 4755c: 2f05 movel %d5,%sp@- 4755e: 4e93 jsr %a3@ ) { rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( 47560: 4fef 0010 lea %sp@(16),%sp 47564: 4a80 tstl %d0 47566: 67e4 beqs 4754c <== NEVER TAKEN timeout, &out ); } *node_ptr = node; 47568: 206e 0014 moveal %fp@(20),%a0 4756c: 2082 movel %d2,%a0@ return sc; } 4756e: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 47574: 4e5e unlk %fp 47576: 4e75 rts timeout, &out ); } *node_ptr = node; 47578: 206e 0014 moveal %fp@(20),%a0 rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_chain_node *node = NULL; while ( sc == RTEMS_SUCCESSFUL && (node = rtems_chain_get( chain )) == NULL 4757c: 4280 clrl %d0 timeout, &out ); } *node_ptr = node; 4757e: 2082 movel %d2,%a0@ return sc; } 47580: 4cee 0c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a3 47586: 4e5e unlk %fp ... =============================================================================== 0004758c : rtems_chain_control *chain, rtems_chain_node *node, rtems_id task, rtems_event_set events ) { 4758c: 4e56 0000 linkw %fp,#0 47590: 2f03 movel %d3,%sp@- 47592: 262e 0014 movel %fp@(20),%d3 47596: 2f02 movel %d2,%sp@- RTEMS_INLINE_ROUTINE bool rtems_chain_prepend_with_empty_check( rtems_chain_control *chain, rtems_chain_node *node ) { return _Chain_Prepend_with_empty_check( chain, node ); 47598: 2f2e 000c movel %fp@(12),%sp@- 4759c: 2f2e 0008 movel %fp@(8),%sp@- 475a0: 242e 0010 movel %fp@(16),%d2 475a4: 4eb9 0004 7bb0 jsr 47bb0 <_Chain_Prepend_with_empty_check> rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { 475aa: 508f addql #8,%sp 475ac: 4a00 tstb %d0 475ae: 660e bnes 475be sc = rtems_event_send( task, events ); } return sc; } 475b0: 242e fff8 movel %fp@(-8),%d2 475b4: 4280 clrl %d0 475b6: 262e fffc movel %fp@(-4),%d3 475ba: 4e5e unlk %fp 475bc: 4e75 rts { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 475be: 2d43 000c movel %d3,%fp@(12) } return sc; } 475c2: 262e fffc movel %fp@(-4),%d3 { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 475c6: 2d42 0008 movel %d2,%fp@(8) } return sc; } 475ca: 242e fff8 movel %fp@(-8),%d2 475ce: 4e5e unlk %fp { rtems_status_code sc = RTEMS_SUCCESSFUL; bool was_empty = rtems_chain_prepend_with_empty_check( chain, node ); if (was_empty) { sc = rtems_event_send( task, events ); 475d0: 4ef9 0004 69c4 jmp 469c4 ... =============================================================================== 0004838c : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 4838c: 4e56 fff4 linkw %fp,#-12 48390: 226e 000c moveal %fp@(12),%a1 48394: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48398: 242e 0008 movel %fp@(8),%d2 4839c: 246e 0010 moveal %fp@(16),%a2 rtems_device_major_number major_limit = _IO_Number_of_drivers; 483a0: 2039 0006 56ca movel 656ca <_IO_Number_of_drivers>,%d0 if ( rtems_interrupt_is_in_progress() ) 483a6: 4ab9 0006 52b6 tstl 652b6 <_Per_CPU_Information+0x8> 483ac: 6600 009c bnew 4844a return RTEMS_CALLED_FROM_ISR; if ( registered_major == NULL ) 483b0: 4a8a tstl %a2 483b2: 6700 00ea beqw 4849e return RTEMS_INVALID_ADDRESS; /* Set it to an invalid value */ *registered_major = major_limit; 483b6: 2480 movel %d0,%a2@ if ( driver_table == NULL ) 483b8: 4a89 tstl %a1 483ba: 6700 00e2 beqw 4849e static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483be: 4a91 tstl %a1@ 483c0: 6700 00d4 beqw 48496 return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) 483c4: b480 cmpl %d0,%d2 483c6: 6476 bccs 4843e rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 483c8: 2039 0006 4e50 movel 64e50 <_Thread_Dispatch_disable_level>,%d0 483ce: 5280 addql #1,%d0 483d0: 23c0 0006 4e50 movel %d0,64e50 <_Thread_Dispatch_disable_level> return RTEMS_INVALID_NUMBER; _Thread_Disable_dispatch(); if ( major == 0 ) { 483d6: 4a82 tstl %d2 483d8: 667c bnes 48456 static rtems_status_code rtems_io_obtain_major_number( rtems_device_major_number *major ) { rtems_device_major_number n = _IO_Number_of_drivers; 483da: 2039 0006 56ca movel 656ca <_IO_Number_of_drivers>,%d0 rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 483e0: 6700 0106 beqw 484e8 483e4: 2239 0006 56ce movel 656ce <_IO_Driver_address_table>,%d1 483ea: 2041 moveal %d1,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 483ec: 4a90 tstl %a0@ 483ee: 6700 008e beqw 4847e rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 483f2: 5282 addql #1,%d2 483f4: 41e8 0018 lea %a0@(24),%a0 483f8: b480 cmpl %d0,%d2 483fa: 65f0 bcss 483ec if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 483fc: 2482 movel %d2,%a2@ if ( m != n ) 483fe: b480 cmpl %d0,%d2 48400: 6700 00e8 beqw 484ea 48404: 2602 movel %d2,%d3 48406: 2002 movel %d2,%d0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48408: 2041 moveal %d1,%a0 } /* Assigns invalid value in case of failure */ *major = m; if ( m != n ) 4840a: e78b lsll #3,%d3 4840c: eb88 lsll #5,%d0 4840e: 9083 subl %d3,%d0 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 48410: d1c0 addal %d0,%a0 48412: 20d9 movel %a1@+,%a0@+ 48414: 20d9 movel %a1@+,%a0@+ 48416: 20d9 movel %a1@+,%a0@+ 48418: 20d9 movel %a1@+,%a0@+ 4841a: 20d9 movel %a1@+,%a0@+ 4841c: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 4841e: 4eb9 0004 a34a jsr 4a34a <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 48424: 2d42 0008 movel %d2,%fp@(8) } 48428: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 4842e: 42ae 0010 clrl %fp@(16) 48432: 42ae 000c clrl %fp@(12) } 48436: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 48438: 4ef9 0005 0b10 jmp 50b10 if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; if ( major >= major_limit ) return RTEMS_INVALID_NUMBER; 4843e: 700a moveq #10,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48440: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48446: 4e5e unlk %fp 48448: 4e75 rts ) { rtems_device_major_number major_limit = _IO_Number_of_drivers; if ( rtems_interrupt_is_in_progress() ) return RTEMS_CALLED_FROM_ISR; 4844a: 7012 moveq #18,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 4844c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48452: 4e5e unlk %fp 48454: 4e75 rts _Thread_Enable_dispatch(); return sc; } major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; 48456: 2202 movel %d2,%d1 48458: 2002 movel %d2,%d0 4845a: e789 lsll #3,%d1 4845c: eb88 lsll #5,%d0 4845e: 2079 0006 56ce moveal 656ce <_IO_Driver_address_table>,%a0 48464: 9081 subl %d1,%d0 48466: d1c0 addal %d0,%a0 static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48468: 4a90 tstl %a0@ 4846a: 673e beqs 484aa major = *registered_major; } else { rtems_driver_address_table *const table = _IO_Driver_address_table + major; if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); 4846c: 4eb9 0004 a34a jsr 4a34a <_Thread_Enable_dispatch> return RTEMS_RESOURCE_IN_USE; 48472: 700c moveq #12,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 48474: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4847a: 4e5e unlk %fp 4847c: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 4847e: 4aa8 0004 tstl %a0@(4) 48482: 6700 ff78 beqw 483fc rtems_device_major_number n = _IO_Number_of_drivers; rtems_device_major_number m = 0; /* major is error checked by caller */ for ( m = 0; m < n; ++m ) { 48486: 5282 addql #1,%d2 48488: 41e8 0018 lea %a0@(24),%a0 4848c: b480 cmpl %d0,%d2 4848e: 6500 ff5c bcsw 483ec 48492: 6000 ff68 braw 483fc static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 48496: 4aa9 0004 tstl %a1@(4) 4849a: 6600 ff28 bnew 483c4 if ( driver_table == NULL ) return RTEMS_INVALID_ADDRESS; if ( rtems_io_is_empty_table( driver_table ) ) return RTEMS_INVALID_ADDRESS; 4849e: 7009 moveq #9,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 484a0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484a6: 4e5e unlk %fp 484a8: 4e75 rts static inline bool rtems_io_is_empty_table( const rtems_driver_address_table *table ) { return table->initialization_entry == NULL && table->open_entry == NULL; 484aa: 4aa8 0004 tstl %a0@(4) 484ae: 66bc bnes 4846c 484b0: 2239 0006 56ce movel 656ce <_IO_Driver_address_table>,%d1 } *registered_major = major; } _IO_Driver_address_table [major] = *driver_table; 484b6: 2041 moveal %d1,%a0 484b8: d1c0 addal %d0,%a0 if ( !rtems_io_is_empty_table( table ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } *registered_major = major; 484ba: 2482 movel %d2,%a2@ } _IO_Driver_address_table [major] = *driver_table; 484bc: 20d9 movel %a1@+,%a0@+ 484be: 20d9 movel %a1@+,%a0@+ 484c0: 20d9 movel %a1@+,%a0@+ 484c2: 20d9 movel %a1@+,%a0@+ 484c4: 20d9 movel %a1@+,%a0@+ 484c6: 2091 movel %a1@,%a0@ _Thread_Enable_dispatch(); 484c8: 4eb9 0004 a34a jsr 4a34a <_Thread_Enable_dispatch> return rtems_io_initialize( major, 0, NULL ); 484ce: 2d42 0008 movel %d2,%fp@(8) } 484d2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 484d8: 42ae 0010 clrl %fp@(16) 484dc: 42ae 000c clrl %fp@(12) } 484e0: 4e5e unlk %fp _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); 484e2: 4ef9 0005 0b10 jmp 50b10 if ( rtems_io_is_empty_table( table ) ) break; } /* Assigns invalid value in case of failure */ *major = m; 484e8: 4292 clrl %a2@ <== NOT EXECUTED if ( major == 0 ) { rtems_status_code sc = rtems_io_obtain_major_number( registered_major ); if ( sc != RTEMS_SUCCESSFUL ) { _Thread_Enable_dispatch(); 484ea: 4eb9 0004 a34a jsr 4a34a <_Thread_Enable_dispatch> *major = m; if ( m != n ) return RTEMS_SUCCESSFUL; return RTEMS_TOO_MANY; 484f0: 7005 moveq #5,%d0 _IO_Driver_address_table [major] = *driver_table; _Thread_Enable_dispatch(); return rtems_io_initialize( major, 0, NULL ); } 484f2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484f8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000495b8 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 495b8: 4e56 fff0 linkw %fp,#-16 495bc: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 495c0: 266e 0008 moveal %fp@(8),%a3 uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 495c4: 4a8b tstl %a3 495c6: 673e beqs 49606 <== NEVER TAKEN 495c8: 49f9 0006 3768 lea 63768 <_Objects_Information_table+0x4>,%a4 #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 495ce: 205c moveal %a4@+,%a0 495d0: 2468 0004 moveal %a0@(4),%a2 if ( !information ) 495d4: 4a8a tstl %a2 495d6: 6726 beqs 495fe continue; for ( i=1 ; i <= information->maximum ; i++ ) { 495d8: 4a6a 000e tstw %a2@(14) 495dc: 6720 beqs 495fe 495de: 7401 moveq #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; 495e0: 206a 0018 moveal %a2@(24),%a0 495e4: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 495e8: 5282 addql #1,%d2 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 495ea: 4a80 tstl %d0 495ec: 6706 beqs 495f4 <== NEVER TAKEN continue; (*routine)(the_thread); 495ee: 2f00 movel %d0,%sp@- 495f0: 4e93 jsr %a3@ 495f2: 588f addql #4,%sp information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 495f4: 4280 clrl %d0 495f6: 302a 000e movew %a2@(14),%d0 495fa: b480 cmpl %d0,%d2 495fc: 63e2 blss 495e0 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 495fe: b9fc 0006 3774 cmpal #407412,%a4 49604: 66c8 bnes 495ce (*routine)(the_thread); } } } 49606: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4960c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046764 : ) { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 46764: 7001 moveq #1,%d0 const char *rtems_object_get_api_class_name( int the_api, int the_class ) { 46766: 4e56 0000 linkw %fp,#0 4676a: 222e 0008 movel %fp@(8),%d1 4676e: 2f02 movel %d2,%sp@- const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) 46770: b081 cmpl %d1,%d0 46772: 674e beqs 467c2 api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) 46774: 7402 moveq #2,%d2 46776: b481 cmpl %d1,%d2 46778: 6740 beqs 467ba api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 4677a: 143c 0003 moveb #3,%d2 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; 4677e: 203c 0005 ee18 movel #388632,%d0 if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) 46784: b481 cmpl %d1,%d2 46786: 6708 beqs 46790 return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; } 46788: 242e fffc movel %fp@(-4),%d2 4678c: 4e5e unlk %fp 4678e: 4e75 rts api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; #ifdef RTEMS_POSIX_API else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; 46790: 203c 0006 005c movel #393308,%d0 #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 46796: 2f2e 000c movel %fp@(12),%sp@- 4679a: 2f00 movel %d0,%sp@- 4679c: 4eb9 0004 b610 jsr 4b610 if ( class_assoc ) 467a2: 508f addql #8,%sp else if ( the_api == OBJECTS_POSIX_API ) api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); 467a4: 2040 moveal %d0,%a0 if ( class_assoc ) return class_assoc->name; return "BAD CLASS"; 467a6: 203c 0005 ee20 movel #388640,%d0 api_assoc = rtems_object_api_posix_assoc; #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) 467ac: 4a88 tstl %a0 467ae: 67d8 beqs 46788 return class_assoc->name; return "BAD CLASS"; } 467b0: 242e fffc movel %fp@(-4),%d2 467b4: 4e5e unlk %fp #endif else return "BAD API"; class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class ); if ( class_assoc ) return class_assoc->name; 467b6: 2010 movel %a0@,%d0 return "BAD CLASS"; } 467b8: 4e75 rts const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; else if ( the_api == OBJECTS_CLASSIC_API ) api_assoc = rtems_object_api_classic_assoc; 467ba: 203c 0005 ffe4 movel #393188,%d0 467c0: 60d4 bras 46796 { const rtems_assoc_t *api_assoc; const rtems_assoc_t *class_assoc; if ( the_api == OBJECTS_INTERNAL_API ) api_assoc = rtems_object_api_internal_assoc; 467c2: 203c 0005 ffcc movel #393164,%d0 467c8: 60cc bras 46796 ... =============================================================================== 00048380 : rtems_status_code rtems_object_get_class_information( int the_api, int the_class, rtems_object_api_class_information *info ) { 48380: 4e56 0000 linkw %fp,#0 48384: 2f0a movel %a2,%sp@- 48386: 246e 0010 moveal %fp@(16),%a2 4838a: 2f02 movel %d2,%sp@- int i; /* * Validate parameters and look up information structure. */ if ( !info ) 4838c: 4a8a tstl %a2 4838e: 6768 beqs 483f8 return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 48390: 3f2e 000e movew %fp@(14),%sp@- 48394: 4267 clrw %sp@- 48396: 2f2e 0008 movel %fp@(8),%sp@- 4839a: 4eb9 0004 a0b4 jsr 4a0b4 <_Objects_Get_information> if ( !obj_info ) 483a0: 508f addql #8,%sp * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); 483a2: 2040 moveal %d0,%a0 if ( !obj_info ) 483a4: 4a80 tstl %d0 483a6: 675e beqs 48406 <== NEVER TAKEN return RTEMS_INVALID_NUMBER; /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; 483a8: 24a8 0006 movel %a0@(6),%a2@ info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 483ac: 4282 clrl %d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; 483ae: 2568 000a 0004 movel %a0@(10),%a2@(4) info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; 483b4: 3428 000e movew %a0@(14),%d2 /* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; 483b8: 1568 0010 000c moveb %a0@(16),%a2@(12) info->maximum = obj_info->maximum; 483be: 2542 0008 movel %d2,%a2@(8) for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 483c2: 6750 beqs 48414 <== NEVER TAKEN 483c4: 2068 0018 moveal %a0@(24),%a0 483c8: 7201 moveq #1,%d1 483ca: 7001 moveq #1,%d0 483cc: 93c9 subal %a1,%a1 483ce: 5280 addql #1,%d0 if ( !obj_info->local_table[i] ) 483d0: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4) 483d4: 6718 beqs 483ee info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 483d6: 2200 movel %d0,%d1 483d8: b082 cmpl %d2,%d0 483da: 63f2 blss 483ce <== ALWAYS TAKEN if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 483dc: 2549 000e movel %a1,%a2@(14) return RTEMS_SUCCESSFUL; 483e0: 4280 clrl %d0 } 483e2: 242e fff8 movel %fp@(-8),%d2 483e6: 246e fffc moveal %fp@(-4),%a2 483ea: 4e5e unlk %fp 483ec: 4e75 rts info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; 483ee: 5289 addql #1,%a1 info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 483f0: 2200 movel %d0,%d1 483f2: b082 cmpl %d2,%d0 483f4: 63d8 blss 483ce <== NEVER TAKEN 483f6: 60e4 bras 483dc unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 483f8: 242e fff8 movel %fp@(-8),%d2 /* * Validate parameters and look up information structure. */ if ( !info ) return RTEMS_INVALID_ADDRESS; 483fc: 7009 moveq #9,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 483fe: 246e fffc moveal %fp@(-4),%a2 48402: 4e5e unlk %fp 48404: 4e75 rts 48406: 242e fff8 movel %fp@(-8),%d2 if ( !info ) return RTEMS_INVALID_ADDRESS; obj_info = _Objects_Get_information( the_api, the_class ); if ( !obj_info ) return RTEMS_INVALID_NUMBER; 4840a: 700a moveq #10,%d0 unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; } 4840c: 246e fffc moveal %fp@(-4),%a2 48410: 4e5e unlk %fp 48412: 4e75 rts info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum; for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) 48414: 93c9 subal %a1,%a1 <== NOT EXECUTED if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; return RTEMS_SUCCESSFUL; 48416: 4280 clrl %d0 <== NOT EXECUTED for ( unallocated=0, i=1 ; i <= info->maximum ; i++ ) if ( !obj_info->local_table[i] ) unallocated++; info->unallocated = unallocated; 48418: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 4841c: 60c4 bras 483e2 <== NOT EXECUTED ... =============================================================================== 00056b40 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, rtems_id *id ) { 56b40: 4e56 ffe8 linkw %fp,#-24 56b44: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 56b48: 242e 0008 movel %fp@(8),%d2 56b4c: 2a2e 000c movel %fp@(12),%d5 56b50: 282e 0010 movel %fp@(16),%d4 56b54: 262e 0014 movel %fp@(20),%d3 56b58: 246e 001c moveal %fp@(28),%a2 register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 56b5c: 4a82 tstl %d2 56b5e: 673a beqs 56b9a return RTEMS_INVALID_NAME; if ( !starting_address ) 56b60: 4a85 tstl %d5 56b62: 671e beqs 56b82 return RTEMS_INVALID_ADDRESS; if ( !id ) 56b64: 4a8a tstl %a2 56b66: 671a beqs 56b82 <== NEVER TAKEN return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 56b68: 4a84 tstl %d4 56b6a: 6722 beqs 56b8e 56b6c: 4a83 tstl %d3 56b6e: 671e beqs 56b8e 56b70: b684 cmpl %d4,%d3 56b72: 621a bhis 56b8e */ RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned ( uint32_t buffer_size ) { return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0); 56b74: 7003 moveq #3,%d0 56b76: c083 andl %d3,%d0 56b78: 6614 bnes 56b8e ) { #if (CPU_ALIGNMENT == 0) return true; #else return (((uintptr_t)address % CPU_ALIGNMENT) == 0); 56b7a: 103c 0003 moveb #3,%d0 56b7e: c085 andl %d5,%d0 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 56b80: 6724 beqs 56ba6 return RTEMS_INVALID_ADDRESS; 56b82: 7009 moveq #9,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56b84: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56b8a: 4e5e unlk %fp 56b8c: 4e75 rts if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; 56b8e: 7008 moveq #8,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56b90: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56b96: 4e5e unlk %fp 56b98: 4e75 rts ) { register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 56b9a: 7003 moveq #3,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56b9c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56ba2: 4e5e unlk %fp 56ba4: 4e75 rts 56ba6: 2039 0007 fbec movel 7fbec <_Thread_Dispatch_disable_level>,%d0 56bac: 5280 addql #1,%d0 56bae: 23c0 0007 fbec movel %d0,7fbec <_Thread_Dispatch_disable_level> * This function allocates a partition control block from * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 56bb4: 4879 0007 fa82 pea 7fa82 <_Partition_Information> 56bba: 4eb9 0005 b7e8 jsr 5b7e8 <_Objects_Allocate> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 56bc0: 588f addql #4,%sp 56bc2: 2640 moveal %d0,%a3 56bc4: 4a80 tstl %d0 56bc6: 6758 beqs 56c20 <== NEVER TAKEN return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; the_partition->length = length; 56bc8: 2744 0014 movel %d4,%a3@(20) the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 56bcc: 276e 0018 001c movel %fp@(24),%a3@(28) the_partition->number_of_used_blocks = 0; _Chain_Initialize( &the_partition->Memory, starting_address, 56bd2: 4c43 4004 remul %d3,%d4,%d4 _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 56bd6: 2745 0010 movel %d5,%a3@(16) the_partition->length = length; the_partition->buffer_size = buffer_size; 56bda: 2743 0018 movel %d3,%a3@(24) the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 56bde: 42ab 0020 clrl %a3@(32) _Chain_Initialize( &the_partition->Memory, starting_address, 56be2: 2f03 movel %d3,%sp@- 56be4: 2f04 movel %d4,%sp@- 56be6: 2f05 movel %d5,%sp@- 56be8: 486b 0024 pea %a3@(36) 56bec: 4eb9 0005 a0b4 jsr 5a0b4 <_Chain_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 56bf2: 202b 0008 movel %a3@(8),%d0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 56bf6: 4281 clrl %d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56bf8: 2079 0007 fa9a moveal 7fa9a <_Partition_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 56bfe: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 56c00: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 56c04: 2742 000c movel %d2,%a3@(12) &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 56c08: 2480 movel %d0,%a2@ name, 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); 56c0a: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 56c10: 4fef 0010 lea %sp@(16),%sp 56c14: 4280 clrl %d0 } 56c16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56c1c: 4e5e unlk %fp 56c1e: 4e75 rts _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { _Thread_Enable_dispatch(); 56c20: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_TOO_MANY; 56c26: 7005 moveq #5,%d0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 56c28: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56c2e: 4e5e unlk %fp ... =============================================================================== 00056d54 : rtems_status_code rtems_partition_return_buffer( rtems_id id, void *buffer ) { 56d54: 4e56 fffc linkw %fp,#-4 56d58: 2f0a movel %a2,%sp@- 56d5a: 2f02 movel %d2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) _Objects_Get( &_Partition_Information, id, location ); 56d5c: 486e fffc pea %fp@(-4) 56d60: 2f2e 0008 movel %fp@(8),%sp@- 56d64: 4879 0007 fa82 pea 7fa82 <_Partition_Information> 56d6a: 242e 000c movel %fp@(12),%d2 56d6e: 4eb9 0005 bcdc jsr 5bcdc <_Objects_Get> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 56d74: 4fef 000c lea %sp@(12),%sp 56d78: 2440 moveal %d0,%a2 56d7a: 4aae fffc tstl %fp@(-4) 56d7e: 670e beqs 56d8e case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56d80: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 56d84: 7004 moveq #4,%d0 } 56d86: 246e fff8 moveal %fp@(-8),%a2 56d8a: 4e5e unlk %fp 56d8c: 4e75 rts ) { void *starting; void *ending; starting = the_partition->starting_address; 56d8e: 202a 0010 movel %a2@(16),%d0 ending = _Addresses_Add_offset( starting, the_partition->length ); 56d92: 222a 0014 movel %a2@(20),%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56d96: b082 cmpl %d2,%d0 56d98: 623c bhis 56dd6 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( const void *base, uintptr_t offset ) { return (void *)((uintptr_t)base + offset); 56d9a: d280 addl %d0,%d1 const void *address, const void *base, const void *limit ) { return (address >= base && address <= limit); 56d9c: b282 cmpl %d2,%d1 56d9e: 6536 bcss 56dd6 <== NEVER TAKEN RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract ( const void *left, const void *right ) { return (int32_t) ((const char *) left - (const char *) right); 56da0: 2202 movel %d2,%d1 56da2: 9280 subl %d0,%d1 56da4: 2001 movel %d1,%d0 offset = (uint32_t) _Addresses_Subtract( the_buffer, the_partition->starting_address ); return ((offset % the_partition->buffer_size) == 0); 56da6: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 starting = the_partition->starting_address; ending = _Addresses_Add_offset( starting, the_partition->length ); return ( _Addresses_Is_in_range( the_buffer, starting, ending ) && 56dac: 4a81 tstl %d1 56dae: 6626 bnes 56dd6 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 56db0: 2f02 movel %d2,%sp@- 56db2: 486a 0024 pea %a2@(36) 56db6: 4eb9 0005 a018 jsr 5a018 <_Chain_Append> switch ( location ) { case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 56dbc: 53aa 0020 subql #1,%a2@(32) _Thread_Enable_dispatch(); 56dc0: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56dc6: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 56dca: 508f addql #8,%sp 56dcc: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56dce: 246e fff8 moveal %fp@(-8),%a2 56dd2: 4e5e unlk %fp 56dd4: 4e75 rts _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); 56dd6: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56ddc: 242e fff4 movel %fp@(-12),%d2 the_partition->number_of_used_blocks -= 1; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 56de0: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 56de2: 246e fff8 moveal %fp@(-8),%a2 56de6: 4e5e unlk %fp ... =============================================================================== 00047800 : rtems_status_code rtems_rate_monotonic_period( rtems_id id, rtems_interval length ) { 47800: 4e56 fff8 linkw %fp,#-8 47804: 2f03 movel %d3,%sp@- 47806: 2f02 movel %d2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) _Objects_Get( &_Rate_monotonic_Information, id, location ); 47808: 486e fffc pea %fp@(-4) 4780c: 242e 0008 movel %fp@(8),%d2 47810: 2f02 movel %d2,%sp@- 47812: 4879 0006 2c7c pea 62c7c <_Rate_monotonic_Information> 47818: 4eb9 0004 9bd4 jsr 49bd4 <_Objects_Get> rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4781e: 4fef 000c lea %sp@(12),%sp 47822: 4aae fffc tstl %fp@(-4) 47826: 6624 bnes 4784c <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 47828: 2279 0006 31dc moveal 631dc <_Per_CPU_Information+0xc>,%a1 4782e: 2040 moveal %d0,%a0 47830: b3e8 0040 cmpal %a0@(64),%a1 47834: 6726 beqs 4785c _Thread_Enable_dispatch(); 47836: 4eb9 0004 a8c6 jsr 4a8c6 <_Thread_Enable_dispatch> return RTEMS_NOT_OWNER_OF_RESOURCE; 4783c: 7617 moveq #23,%d3 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4783e: 2003 movel %d3,%d0 47840: 242e fff0 movel %fp@(-16),%d2 47844: 262e fff4 movel %fp@(-12),%d3 47848: 4e5e unlk %fp 4784a: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4784c: 7604 moveq #4,%d3 } 4784e: 2003 movel %d3,%d0 47850: 242e fff0 movel %fp@(-16),%d2 47854: 262e fff4 movel %fp@(-12),%d3 47858: 4e5e unlk %fp 4785a: 4e75 rts if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 4785c: 4aae 000c tstl %fp@(12) 47860: 6624 bnes 47886 switch ( the_period->state ) { 47862: 2040 moveal %d0,%a0 47864: 7204 moveq #4,%d1 47866: 2028 0038 movel %a0@(56),%d0 4786a: b280 cmpl %d0,%d1 4786c: 6400 008a bccw 478f8 47870: 4283 clrl %d3 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 47872: 4eb9 0004 a8c6 jsr 4a8c6 <_Thread_Enable_dispatch> <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47878: 2003 movel %d3,%d0 4787a: 242e fff0 movel %fp@(-16),%d2 4787e: 262e fff4 movel %fp@(-12),%d3 47882: 4e5e unlk %fp 47884: 4e75 rts } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 47886: 223c 0000 0700 movel #1792,%d1 4788c: 40c3 movew %sr,%d3 4788e: 8283 orl %d3,%d1 47890: 46c1 movew %d1,%sr if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { 47892: 2040 moveal %d0,%a0 47894: 2228 0038 movel %a0@(56),%d1 47898: 6772 beqs 4790c _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { 4789a: 7402 moveq #2,%d2 4789c: b481 cmpl %d1,%d2 4789e: 6700 00d2 beqw 47972 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } if ( the_period->state == RATE_MONOTONIC_EXPIRED ) { 478a2: 7404 moveq #4,%d2 478a4: b481 cmpl %d1,%d2 478a6: 66a4 bnes 4784c <== NEVER TAKEN /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 478a8: 2f00 movel %d0,%sp@- 478aa: 2d40 fff8 movel %d0,%fp@(-8) 478ae: 4eb9 0004 76e6 jsr 476e6 <_Rate_monotonic_Update_statistics> _ISR_Enable( level ); 478b4: 46c3 movew %d3,%sr the_period->state = RATE_MONOTONIC_ACTIVE; 478b6: 7202 moveq #2,%d1 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 478b8: 7606 moveq #6,%d3 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 478ba: 202e fff8 movel %fp@(-8),%d0 478be: 2040 moveal %d0,%a0 the_period->next_length = length; 478c0: 226e 000c moveal %fp@(12),%a1 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 478c4: 2141 0038 movel %d1,%a0@(56) the_period->next_length = length; 478c8: 2149 003c movel %a1,%a0@(60) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 478cc: 2149 001c movel %a1,%a0@(28) _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 478d0: 4868 0010 pea %a0@(16) 478d4: 4879 0006 2e32 pea 62e32 <_Watchdog_Ticks_chain> 478da: 4eb9 0004 b880 jsr 4b880 <_Watchdog_Insert> _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 478e0: 4eb9 0004 a8c6 jsr 4a8c6 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478e6: 242e fff0 movel %fp@(-16),%d2 478ea: 2003 movel %d3,%d0 the_period->state = RATE_MONOTONIC_ACTIVE; the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_TIMEOUT; 478ec: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 478f0: 262e fff4 movel %fp@(-12),%d3 478f4: 4e5e unlk %fp 478f6: 4e75 rts _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 478f8: 41f9 0006 02d6 lea 602d6 ,%a0 478fe: 2630 0c00 movel %a0@(00000000,%d0:l:4),%d3 case RATE_MONOTONIC_ACTIVE: default: /* unreached -- only to remove warnings */ return_value = RTEMS_SUCCESSFUL; break; } _Thread_Enable_dispatch(); 47902: 4eb9 0004 a8c6 jsr 4a8c6 <_Thread_Enable_dispatch> 47908: 6000 ff6e braw 47878 return( return_value ); } _ISR_Disable( level ); if ( the_period->state == RATE_MONOTONIC_INACTIVE ) { _ISR_Enable( level ); 4790c: 46c3 movew %d3,%sr /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 4790e: 2f00 movel %d0,%sp@- the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47910: 4283 clrl %d3 _ISR_Enable( level ); /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); 47912: 2d40 fff8 movel %d0,%fp@(-8) 47916: 4eb9 0004 7668 jsr 47668 <_Rate_monotonic_Initiate_statistics> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4791c: 202e fff8 movel %fp@(-8),%d0 47920: 2240 moveal %d0,%a1 47922: 223c 0004 7c84 movel #294020,%d1 the_watchdog->id = id; 47928: 2342 0030 movel %d2,%a1@(48) _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 4792c: 242e 000c movel %fp@(12),%d2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 47930: 2341 002c movel %d1,%a1@(44) /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 47934: 7202 moveq #2,%d1 _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 47936: 2342 003c movel %d2,%a1@(60) Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4793a: 2342 001c movel %d2,%a1@(28) /* * Baseline statistics information for the beginning of a period. */ _Rate_monotonic_Initiate_statistics( the_period ); the_period->state = RATE_MONOTONIC_ACTIVE; 4793e: 2341 0038 movel %d1,%a1@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 47942: 42a9 0018 clrl %a1@(24) the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 47946: 42a9 0034 clrl %a1@(52) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4794a: 4869 0010 pea %a1@(16) 4794e: 4879 0006 2e32 pea 62e32 <_Watchdog_Ticks_chain> 47954: 4eb9 0004 b880 jsr 4b880 <_Watchdog_Insert> ); the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); 4795a: 4eb9 0004 a8c6 jsr 4a8c6 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47960: 242e fff0 movel %fp@(-16),%d2 47964: 2003 movel %d3,%d0 the_period->next_length = length; _Watchdog_Insert_ticks( &the_period->Timer, length ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47966: 4fef 000c lea %sp@(12),%sp case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4796a: 262e fff4 movel %fp@(-12),%d3 4796e: 4e5e unlk %fp 47970: 4e75 rts if ( the_period->state == RATE_MONOTONIC_ACTIVE ) { /* * Update statistics from the concluding period. */ _Rate_monotonic_Update_statistics( the_period ); 47972: 2f00 movel %d0,%sp@- 47974: 2d40 fff8 movel %d0,%fp@(-8) 47978: 4eb9 0004 76e6 jsr 476e6 <_Rate_monotonic_Update_statistics> /* * This tells the _Rate_monotonic_Timeout that this task is * in the process of blocking on the period and that we * may be changing the length of the next period. */ the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING; 4797e: 202e fff8 movel %fp@(-8),%d0 47982: 7201 moveq #1,%d1 47984: 2040 moveal %d0,%a0 the_period->next_length = length; 47986: 226e 000c moveal %fp@(12),%a1 /* * 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; 4798a: 2141 0038 movel %d1,%a0@(56) the_period->next_length = length; 4798e: 2149 003c movel %a1,%a0@(60) _ISR_Enable( level ); 47992: 46c3 movew %d3,%sr _Thread_Executing->Wait.id = the_period->Object.id; 47994: 2079 0006 31dc moveal 631dc <_Per_CPU_Information+0xc>,%a0 4799a: 2240 moveal %d0,%a1 4799c: 5089 addql #8,%a1 4799e: 2151 0020 movel %a1@,%a0@(32) _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 479a2: 4878 4000 pea 4000 479a6: 2d40 fff8 movel %d0,%fp@(-8) 479aa: 2f08 movel %a0,%sp@- 479ac: 4eb9 0004 b1e0 jsr 4b1e0 <_Thread_Set_state> /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 479b2: 223c 0000 0700 movel #1792,%d1 479b8: 40c2 movew %sr,%d2 479ba: 8282 orl %d2,%d1 479bc: 46c1 movew %d1,%sr local_state = the_period->state; the_period->state = RATE_MONOTONIC_ACTIVE; 479be: 7602 moveq #2,%d3 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); local_state = the_period->state; 479c0: 202e fff8 movel %fp@(-8),%d0 479c4: 2040 moveal %d0,%a0 479c6: 2228 0038 movel %a0@(56),%d1 the_period->state = RATE_MONOTONIC_ACTIVE; 479ca: 2143 0038 movel %d3,%a0@(56) _ISR_Enable( level ); 479ce: 46c2 movew %d2,%sr /* * 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 ) 479d0: 7003 moveq #3,%d0 479d2: 4fef 000c lea %sp@(12),%sp 479d6: b081 cmpl %d1,%d0 479d8: 6716 beqs 479f0 _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); _Thread_Enable_dispatch(); 479da: 4eb9 0004 a8c6 jsr 4a8c6 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 479e0: 4283 clrl %d3 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 479e2: 2003 movel %d3,%d0 479e4: 242e fff0 movel %fp@(-16),%d2 479e8: 262e fff4 movel %fp@(-12),%d3 479ec: 4e5e unlk %fp 479ee: 4e75 rts /* * 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 ); 479f0: 4878 4000 pea 4000 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 479f4: 4283 clrl %d3 /* * 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 ); 479f6: 2f39 0006 31dc movel 631dc <_Per_CPU_Information+0xc>,%sp@- 479fc: 4eb9 0004 a4f8 jsr 4a4f8 <_Thread_Clear_state> 47a02: 508f addql #8,%sp _Thread_Enable_dispatch(); 47a04: 4eb9 0004 a8c6 jsr 4a8c6 <_Thread_Enable_dispatch> 47a0a: 60d6 bras 479e2 =============================================================================== 00047a0c : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 47a0c: 4e56 ff78 linkw %fp,#-136 47a10: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47a14: 262e 0008 movel %fp@(8),%d3 47a18: 246e 000c moveal %fp@(12),%a2 rtems_id id; rtems_rate_monotonic_period_statistics the_stats; rtems_rate_monotonic_period_status the_status; char name[5]; if ( !print ) 47a1c: 4a8a tstl %a2 47a1e: 6700 0082 beqw 47aa2 return; (*print)( context, "Period information by period\n" ); 47a22: 4879 0006 02ea pea 602ea 47a28: 2f03 movel %d3,%sp@- 47a2a: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( context, "--- CPU times are in seconds ---\n" ); 47a2c: 4879 0006 0308 pea 60308 47a32: 2f03 movel %d3,%sp@- 47a34: 4e92 jsr %a2@ (*print)( context, "--- Wall times are in seconds ---\n" ); 47a36: 4879 0006 032a pea 6032a 47a3c: 2f03 movel %d3,%sp@- 47a3e: 4e92 jsr %a2@ Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 47a40: 4879 0006 034d pea 6034d 47a46: 2f03 movel %d3,%sp@- 47a48: 4e92 jsr %a2@ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ " " #endif " WALL TIME\n" ); (*print)( context, " " 47a4a: 4fef 001c lea %sp@(28),%sp 47a4e: 2ebc 0006 0398 movel #394136,%sp@ 47a54: 2f03 movel %d3,%sp@- 47a56: 4e92 jsr %a2@ /* * 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 ; 47a58: 2439 0006 2c82 movel 62c82 <_Rate_monotonic_Information+0x6>,%d2 47a5e: 508f addql #8,%sp 47a60: b4b9 0006 2c86 cmpl 62c86 <_Rate_monotonic_Information+0xa>,%d2 47a66: 623a bhis 47aa2 <== NEVER TAKEN 47a68: 280e movel %fp,%d4 continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47a6a: 2a0e movel %fp,%d5 47a6c: 0684 ffff ffa2 addil #-94,%d4 47a72: 47f9 0004 e03c lea 4e03c ,%a3 #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 47a78: 4bf9 0004 e0fc lea 4e0fc ,%a5 #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47a7e: 5b85 subql #5,%d5 47a80: 49f9 0004 7d64 lea 47d64 ,%a4 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 47a86: 2e3c 0004 b480 movel #308352,%d7 * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 47a8c: 2f04 movel %d4,%sp@- 47a8e: 2f02 movel %d2,%sp@- 47a90: 4e93 jsr %a3@ if ( status != RTEMS_SUCCESSFUL ) 47a92: 508f addql #8,%sp 47a94: 4a80 tstl %d0 47a96: 6714 beqs 47aac * 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++ ) { 47a98: 5282 addql #1,%d2 /* * 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 ; 47a9a: b4b9 0006 2c86 cmpl 62c86 <_Rate_monotonic_Information+0xa>,%d2 47aa0: 63ea blss 47a8c the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall ); #endif } } } 47aa2: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47aa8: 4e5e unlk %fp 47aaa: 4e75 rts #if defined(RTEMS_DEBUG) status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; #else (void) rtems_rate_monotonic_get_status( id, &the_status ); 47aac: 486e ffda pea %fp@(-38) 47ab0: 2f02 movel %d2,%sp@- 47ab2: 4e95 jsr %a5@ #endif rtems_object_get_name( the_status.owner, sizeof(name), name ); 47ab4: 2f05 movel %d5,%sp@- 47ab6: 4878 0005 pea 5 47aba: 2f2e ffda movel %fp@(-38),%sp@- 47abe: 4e94 jsr %a4@ /* * Print part of report line that is not dependent on granularity */ (*print)( context, 47ac0: 2f2e ffa6 movel %fp@(-90),%sp@- 47ac4: 2f2e ffa2 movel %fp@(-94),%sp@- 47ac8: 2f05 movel %d5,%sp@- 47aca: 2f02 movel %d2,%sp@- 47acc: 4879 0006 03e4 pea 603e4 47ad2: 2f03 movel %d3,%sp@- 47ad4: 4e92 jsr %a2@ ); /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 47ad6: 202e ffa2 movel %fp@(-94),%d0 47ada: 4fef 002c lea %sp@(44),%sp 47ade: 6618 bnes 47af8 (*print)( context, "\n" ); 47ae0: 4879 0005 f9a6 pea 5f9a6 * 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++ ) { 47ae6: 5282 addql #1,%d2 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 47ae8: 2f03 movel %d3,%sp@- 47aea: 4e92 jsr %a2@ continue; 47aec: 508f addql #8,%sp /* * 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 ; 47aee: b4b9 0006 2c86 cmpl 62c86 <_Rate_monotonic_Information+0xa>,%d2 47af4: 6396 blss 47a8c <== ALWAYS TAKEN 47af6: 60aa bras 47aa2 <== NOT EXECUTED struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 47af8: 486e fff2 pea %fp@(-14) 47afc: 2047 moveal %d7,%a0 * 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++ ) { 47afe: 5282 addql #1,%d2 struct timespec cpu_average; struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); 47b00: 2f00 movel %d0,%sp@- 47b02: 486e ffba pea %fp@(-70) 47b06: 4e90 jsr %a0@ (*print)( context, 47b08: 202e fff6 movel %fp@(-10),%d0 47b0c: 223c 0000 03e8 movel #1000,%d1 47b12: 4c41 0800 remsl %d1,%d0,%d0 47b16: 2c2e ffb6 movel %fp@(-74),%d6 47b1a: 2f00 movel %d0,%sp@- 47b1c: 2001 movel %d1,%d0 47b1e: 2f2e fff2 movel %fp@(-14),%sp@- 47b22: 4c40 6806 remsl %d0,%d6,%d6 47b26: 202e ffae movel %fp@(-82),%d0 47b2a: 2246 moveal %d6,%a1 47b2c: 223c 0000 03e8 movel #1000,%d1 47b32: 2f09 movel %a1,%sp@- 47b34: 2f2e ffb2 movel %fp@(-78),%sp@- 47b38: 4c41 0800 remsl %d1,%d0,%d0 struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); (*print)( context, 47b3c: 2c3c 0000 03e8 movel #1000,%d6 struct timespec *min_cpu = &the_stats.min_cpu_time; struct timespec *max_cpu = &the_stats.max_cpu_time; struct timespec *total_cpu = &the_stats.total_cpu_time; _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average ); (*print)( context, 47b42: 2f00 movel %d0,%sp@- 47b44: 2f2e ffaa movel %fp@(-86),%sp@- 47b48: 4879 0006 03fb pea 603fb 47b4e: 2f03 movel %d3,%sp@- 47b50: 4e92 jsr %a2@ struct timespec wall_average; struct timespec *min_wall = &the_stats.min_wall_time; struct timespec *max_wall = &the_stats.max_wall_time; struct timespec *total_wall = &the_stats.total_wall_time; _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average); 47b52: 4fef 002c lea %sp@(44),%sp 47b56: 2047 moveal %d7,%a0 47b58: 486e fff2 pea %fp@(-14) 47b5c: 2f2e ffa2 movel %fp@(-94),%sp@- 47b60: 486e ffd2 pea %fp@(-46) 47b64: 4e90 jsr %a0@ (*print)( context, 47b66: 202e fff6 movel %fp@(-10),%d0 47b6a: 4c46 0800 remsl %d6,%d0,%d0 47b6e: 222e ffce movel %fp@(-50),%d1 47b72: 2f00 movel %d0,%sp@- 47b74: 2f2e fff2 movel %fp@(-14),%sp@- 47b78: 4c46 1801 remsl %d6,%d1,%d1 47b7c: 202e ffc6 movel %fp@(-58),%d0 47b80: 2241 moveal %d1,%a1 47b82: 2f09 movel %a1,%sp@- 47b84: 2f2e ffca movel %fp@(-54),%sp@- 47b88: 4c46 0800 remsl %d6,%d0,%d0 47b8c: 2f00 movel %d0,%sp@- 47b8e: 2f2e ffc2 movel %fp@(-62),%sp@- 47b92: 4879 0006 041a pea 6041a 47b98: 2f03 movel %d3,%sp@- 47b9a: 4e92 jsr %a2@ 47b9c: 4fef 002c lea %sp@(44),%sp /* * 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 ; 47ba0: b4b9 0006 2c86 cmpl 62c86 <_Rate_monotonic_Information+0xa>,%d2 47ba6: 6300 fee4 blsw 47a8c 47baa: 6000 fef6 braw 47aa2 <== NOT EXECUTED =============================================================================== 00047bc8 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 47bc8: 4e56 0000 linkw %fp,#0 47bcc: 2039 0006 2d72 movel 62d72 <_Thread_Dispatch_disable_level>,%d0 47bd2: 5280 addql #1,%d0 47bd4: 2f0a movel %a2,%sp@- 47bd6: 23c0 0006 2d72 movel %d0,62d72 <_Thread_Dispatch_disable_level> 47bdc: 2f02 movel %d2,%sp@- /* * 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 ; 47bde: 2439 0006 2c82 movel 62c82 <_Rate_monotonic_Information+0x6>,%d2 47be4: b4b9 0006 2c86 cmpl 62c86 <_Rate_monotonic_Information+0xa>,%d2 47bea: 6216 bhis 47c02 <== NEVER TAKEN 47bec: 45f9 0004 7c14 lea 47c14 ,%a2 id <= _Rate_monotonic_Information.maximum_id ; id++ ) { (void) rtems_rate_monotonic_reset_statistics( id ); 47bf2: 2f02 movel %d2,%sp@- * 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 ; id++ ) { 47bf4: 5282 addql #1,%d2 (void) rtems_rate_monotonic_reset_statistics( id ); 47bf6: 4e92 jsr %a2@ /* * 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 ; 47bf8: 588f addql #4,%sp 47bfa: b4b9 0006 2c86 cmpl 62c86 <_Rate_monotonic_Information+0xa>,%d2 47c00: 63f0 blss 47bf2 /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); } 47c02: 242e fff8 movel %fp@(-8),%d2 47c06: 246e fffc moveal %fp@(-4),%a2 47c0a: 4e5e unlk %fp } /* * Done so exit thread dispatching disabled critical section. */ _Thread_Enable_dispatch(); 47c0c: 4ef9 0004 a8c6 jmp 4a8c6 <_Thread_Enable_dispatch> ... =============================================================================== 000576a4 : uintptr_t length, uintptr_t page_size, rtems_attribute attribute_set, rtems_id *id ) { 576a4: 4e56 ffe4 linkw %fp,#-28 576a8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 576ac: 262e 0008 movel %fp@(8),%d3 576b0: 242e 000c movel %fp@(12),%d2 576b4: 2a2e 0010 movel %fp@(16),%d5 576b8: 282e 0014 movel %fp@(20),%d4 576bc: 2c2e 0018 movel %fp@(24),%d6 576c0: 266e 001c moveal %fp@(28),%a3 rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 576c4: 4a83 tstl %d3 576c6: 6774 beqs 5773c return RTEMS_INVALID_NAME; if ( !starting_address ) 576c8: 4a82 tstl %d2 576ca: 6700 00dc beqw 577a8 return RTEMS_INVALID_ADDRESS; if ( !id ) 576ce: 4a8b tstl %a3 576d0: 6700 00d6 beqw 577a8 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 576d4: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- 576da: 4eb9 0005 9f84 jsr 59f84 <_API_Mutex_Lock> * This function allocates a region control block from * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 576e0: 4879 0007 faf6 pea 7faf6 <_Region_Information> 576e6: 4eb9 0005 b7e8 jsr 5b7e8 <_Objects_Allocate> the_region = _Region_Allocate(); if ( !the_region ) 576ec: 508f addql #8,%sp 576ee: 2440 moveal %d0,%a2 576f0: 4a80 tstl %d0 576f2: 6700 00c2 beqw 577b6 return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 576f6: 2f04 movel %d4,%sp@- 576f8: 2f05 movel %d5,%sp@- 576fa: 2f02 movel %d2,%sp@- 576fc: 486a 0068 pea %a2@(104) 57700: 4eb9 0005 b372 jsr 5b372 <_Heap_Initialize> &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 57706: 4fef 0010 lea %sp@(16),%sp if ( !the_region ) return_status = RTEMS_TOO_MANY; else { the_region->maximum_segment_size = _Heap_Initialize( 5770a: 2540 005c movel %d0,%a2@(92) &the_region->Memory, starting_address, length, page_size ); if ( !the_region->maximum_segment_size ) { 5770e: 663a bnes 5774a */ RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 57710: 2f0a movel %a2,%sp@- 57712: 4879 0007 faf6 pea 7faf6 <_Region_Information> _Region_Free( the_region ); return_status = RTEMS_INVALID_SIZE; 57718: 7408 moveq #8,%d2 5771a: 4eb9 0005 bb34 jsr 5bb34 <_Objects_Free> 57720: 508f addql #8,%sp *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57722: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- 57728: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 5772e: 588f addql #4,%sp } 57730: 2002 movel %d2,%d0 57732: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 57738: 4e5e unlk %fp 5773a: 4e75 rts { rtems_status_code return_status; Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) return RTEMS_INVALID_NAME; 5773c: 7403 moveq #3,%d2 } } _RTEMS_Unlock_allocator(); return return_status; } 5773e: 2002 movel %d2,%d0 57740: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 57746: 4e5e unlk %fp 57748: 4e75 rts return_status = RTEMS_INVALID_SIZE; } else { the_region->starting_address = starting_address; 5774a: 2542 0050 movel %d2,%a2@(80) &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; 5774e: 4282 clrl %d2 } else { the_region->starting_address = starting_address; the_region->length = length; 57750: 2545 0054 movel %d5,%a2@(84) the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 57754: 44c6 movew %d6,%ccr 57756: 57c0 seq %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; 57758: 2544 0058 movel %d4,%a2@(88) the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 5775c: 49c0 extbl %d0 5775e: 4480 negl %d0 else { the_region->starting_address = starting_address; the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; 57760: 2546 0060 movel %d6,%a2@(96) the_region->number_of_used_blocks = 0; 57764: 42aa 0064 clrl %a2@(100) _Thread_queue_Initialize( 57768: 4878 0006 pea 6 5776c: 4878 0040 pea 40 57770: 2f00 movel %d0,%sp@- 57772: 486a 0010 pea %a2@(16) 57776: 4eb9 0005 d18c jsr 5d18c <_Thread_queue_Initialize> Objects_Name name ) { _Objects_Set_local_object( information, _Objects_Get_index( the_object->id ), 5777c: 202a 0008 movel %a2@(8),%d0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 57780: 4281 clrl %d1 &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 57782: 4fef 0010 lea %sp@(16),%sp #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 57786: 2079 0007 fb0e moveal 7fb0e <_Region_Information+0x18>,%a0 Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( 5778c: 3200 movew %d0,%d1 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 5778e: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4) information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; 57792: 2543 000c movel %d3,%a2@(12) 57796: 2680 movel %d0,%a3@ return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 57798: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- 5779e: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 577a4: 588f addql #4,%sp 577a6: 6088 bras 57730 if ( !starting_address ) return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; 577a8: 7409 moveq #9,%d2 } } _RTEMS_Unlock_allocator(); return return_status; } 577aa: 2002 movel %d2,%d0 577ac: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 577b2: 4e5e unlk %fp 577b4: 4e75 rts *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 577b6: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Allocate(); if ( !the_region ) return_status = RTEMS_TOO_MANY; 577bc: 7405 moveq #5,%d2 *id = the_region->Object.id; return_status = RTEMS_SUCCESSFUL; } } _RTEMS_Unlock_allocator(); 577be: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 577c4: 588f addql #4,%sp 577c6: 6000 ff68 braw 57730 ... =============================================================================== 0005787c : rtems_status_code rtems_region_extend( rtems_id id, void *starting_address, uintptr_t length ) { 5787c: 4e56 fff8 linkw %fp,#-8 57880: 2f0a movel %a2,%sp@- 57882: 2f02 movel %d2,%sp@- 57884: 242e 000c movel %fp@(12),%d2 bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) 57888: 6700 0086 beqw 57910 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 5788c: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- 57892: 4eb9 0005 9f84 jsr 59f84 <_API_Mutex_Lock> Objects_Id id, Objects_Locations *location ) { return (Region_Control *) _Objects_Get_no_protection( &_Region_Information, id, location ); 57898: 486e fff8 pea %fp@(-8) 5789c: 2f2e 0008 movel %fp@(8),%sp@- 578a0: 4879 0007 faf6 pea 7faf6 <_Region_Information> 578a6: 4eb9 0005 bca0 jsr 5bca0 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 578ac: 4fef 0010 lea %sp@(16),%sp 578b0: 2440 moveal %d0,%a2 578b2: 4aae fff8 tstl %fp@(-8) 578b6: 6646 bnes 578fe case OBJECTS_LOCAL: extend_ok = _Heap_Extend( 578b8: 486e fffc pea %fp@(-4) 578bc: 2f2e 0010 movel %fp@(16),%sp@- 578c0: 2f02 movel %d2,%sp@- 578c2: 486a 0068 pea %a2@(104) 578c6: 4eb9 0005 ad70 jsr 5ad70 <_Heap_Extend> starting_address, length, &amount_extended ); if ( extend_ok ) { 578cc: 4fef 0010 lea %sp@(16),%sp 578d0: 4a00 tstb %d0 578d2: 674c beqs 57920 the_region->length += amount_extended; 578d4: 202e fffc movel %fp@(-4),%d0 578d8: d1aa 0054 addl %d0,%a2@(84) the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; 578dc: 4282 clrl %d2 &amount_extended ); if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; 578de: d1aa 005c addl %d0,%a2@(92) default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578e2: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- 578e8: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 578ee: 588f addql #4,%sp } 578f0: 2002 movel %d2,%d0 578f2: 242e fff0 movel %fp@(-16),%d2 578f6: 246e fff4 moveal %fp@(-12),%a2 578fa: 4e5e unlk %fp 578fc: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 578fe: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- break; #endif case OBJECTS_ERROR: default: return_status = RTEMS_INVALID_ID; 57904: 7404 moveq #4,%d2 break; } _RTEMS_Unlock_allocator(); 57906: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 5790c: 588f addql #4,%sp 5790e: 60e0 bras 578f0 Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; if ( !starting_address ) return RTEMS_INVALID_ADDRESS; 57910: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 57912: 2002 movel %d2,%d0 57914: 242e fff0 movel %fp@(-16),%d2 57918: 246e fff4 moveal %fp@(-12),%a2 5791c: 4e5e unlk %fp 5791e: 4e75 rts default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57920: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; } else { return_status = RTEMS_INVALID_ADDRESS; 57926: 7409 moveq #9,%d2 default: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57928: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 5792e: 588f addql #4,%sp 57930: 60be bras 578f0 ... =============================================================================== 00057bb8 : rtems_status_code rtems_region_get_segment_size( rtems_id id, void *segment, uintptr_t *size ) { 57bb8: 4e56 fffc linkw %fp,#-4 57bbc: 2f03 movel %d3,%sp@- 57bbe: 262e 0010 movel %fp@(16),%d3 57bc2: 2f02 movel %d2,%sp@- 57bc4: 242e 000c movel %fp@(12),%d2 Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; register Region_Control *the_region; if ( !segment ) 57bc8: 6700 0092 beqw 57c5c return RTEMS_INVALID_ADDRESS; if ( !size ) 57bcc: 4a83 tstl %d3 57bce: 6700 008c beqw 57c5c return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); 57bd2: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- 57bd8: 4eb9 0005 9f84 jsr 59f84 <_API_Mutex_Lock> 57bde: 486e fffc pea %fp@(-4) 57be2: 2f2e 0008 movel %fp@(8),%sp@- 57be6: 4879 0007 faf6 pea 7faf6 <_Region_Information> 57bec: 4eb9 0005 bca0 jsr 5bca0 <_Objects_Get_no_protection> the_region = _Region_Get( id, &location ); switch ( location ) { 57bf2: 222e fffc movel %fp@(-4),%d1 57bf6: 4fef 0010 lea %sp@(16),%sp 57bfa: 6636 bnes 57c32 <== NEVER TAKEN case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) 57bfc: 2f03 movel %d3,%sp@- 57bfe: 2040 moveal %d0,%a0 57c00: 2f02 movel %d2,%sp@- 57c02: 4868 0068 pea %a0@(104) 57c06: 4eb9 0005 b6c0 jsr 5b6c0 <_Heap_Size_of_alloc_area> 57c0c: 4fef 000c lea %sp@(12),%sp 57c10: 4a00 tstb %d0 57c12: 6624 bnes 57c38 <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57c14: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) ) return_status = RTEMS_INVALID_ADDRESS; 57c1a: 7409 moveq #9,%d2 <== NOT EXECUTED case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57c1c: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> <== NOT EXECUTED return return_status; 57c22: 588f addql #4,%sp <== NOT EXECUTED } 57c24: 2002 movel %d2,%d0 57c26: 242e fff4 movel %fp@(-12),%d2 57c2a: 262e fff8 movel %fp@(-8),%d3 57c2e: 4e5e unlk %fp 57c30: 4e75 rts return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 57c32: 7001 moveq #1,%d0 57c34: b081 cmpl %d1,%d0 57c36: 6712 beqs 57c4a <== ALWAYS TAKEN case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57c38: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- void *segment, uintptr_t *size ) { Objects_Locations location; rtems_status_code return_status = RTEMS_SUCCESSFUL; 57c3e: 4282 clrl %d2 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57c40: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 57c46: 588f addql #4,%sp 57c48: 60da bras 57c24 case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; break; } _RTEMS_Unlock_allocator(); 57c4a: 2f39 0007 fc8c movel 7fc8c <_RTEMS_Allocator_Mutex>,%sp@- case OBJECTS_REMOTE: /* this error cannot be returned */ break; #endif case OBJECTS_ERROR: return_status = RTEMS_INVALID_ID; 57c50: 7404 moveq #4,%d2 break; } _RTEMS_Unlock_allocator(); 57c52: 4eb9 0005 9fe4 jsr 59fe4 <_API_Mutex_Unlock> return return_status; 57c58: 588f addql #4,%sp 57c5a: 60c8 bras 57c24 if ( !segment ) return RTEMS_INVALID_ADDRESS; if ( !size ) return RTEMS_INVALID_ADDRESS; 57c5c: 7409 moveq #9,%d2 break; } _RTEMS_Unlock_allocator(); return return_status; } 57c5e: 2002 movel %d2,%d0 57c60: 242e fff4 movel %fp@(-12),%d2 57c64: 262e fff8 movel %fp@(-8),%d3 57c68: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00046690 : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 46690: 4e56 fffc linkw %fp,#-4 46694: 2f0a movel %a2,%sp@- Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) _Objects_Get( &_Semaphore_Information, id, location ); 46696: 486e fffc pea %fp@(-4) 4669a: 2f2e 0008 movel %fp@(8),%sp@- 4669e: 4879 0006 0bac pea 60bac <_Semaphore_Information> 466a4: 4eb9 0004 8098 jsr 48098 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 466aa: 4fef 000c lea %sp@(12),%sp 466ae: 2440 moveal %d0,%a2 466b0: 4aae fffc tstl %fp@(-4) 466b4: 670a beqs 466c0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466b6: 246e fff8 moveal %fp@(-8),%a2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 466ba: 7004 moveq #4,%d0 } 466bc: 4e5e unlk %fp 466be: 4e75 rts 466c0: 7030 moveq #48,%d0 466c2: c0aa 0010 andl %a2@(16),%d0 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 466c6: 6760 beqs 46728 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 466c8: 4aaa 0062 tstl %a2@(98) 466cc: 6616 bnes 466e4 466ce: 7220 moveq #32,%d1 466d0: b280 cmpl %d0,%d1 466d2: 6710 beqs 466e4 !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); 466d4: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466da: 246e fff8 moveal %fp@(-8),%a2 if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; 466de: 700c moveq #12,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 466e0: 4e5e unlk %fp 466e2: 4e75 rts !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 466e4: 4878 0004 pea 4 466e8: 42a7 clrl %sp@- 466ea: 486a 0014 pea %a2@(20) 466ee: 4eb9 0004 7278 jsr 47278 <_CORE_mutex_Flush> 466f4: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 466f8: 2f0a movel %a2,%sp@- 466fa: 4879 0006 0bac pea 60bac <_Semaphore_Information> 46700: 4eb9 0004 7c70 jsr 47c70 <_Objects_Close> */ RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 46706: 2f0a movel %a2,%sp@- 46708: 4879 0006 0bac pea 60bac <_Semaphore_Information> 4670e: 4eb9 0004 7f2c jsr 47f2c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 46714: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4671a: 4fef 0010 lea %sp@(16),%sp 4671e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 46720: 246e fff8 moveal %fp@(-8),%a2 46724: 4e5e unlk %fp 46726: 4e75 rts &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 46728: 4878 0002 pea 2 4672c: 42a7 clrl %sp@- 4672e: 486a 0014 pea %a2@(20) 46732: 4eb9 0004 75b0 jsr 475b0 <_CORE_semaphore_Flush> 46738: 4fef 000c lea %sp@(12),%sp SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_SEMAPHORE_WAS_DELETED ); } _Objects_Close( &_Semaphore_Information, &the_semaphore->Object ); 4673c: 2f0a movel %a2,%sp@- 4673e: 4879 0006 0bac pea 60bac <_Semaphore_Information> 46744: 4eb9 0004 7c70 jsr 47c70 <_Objects_Close> 4674a: 2f0a movel %a2,%sp@- 4674c: 4879 0006 0bac pea 60bac <_Semaphore_Information> 46752: 4eb9 0004 7f2c jsr 47f2c <_Objects_Free> 0, /* Not used */ 0 /* Not used */ ); } #endif _Thread_Enable_dispatch(); 46758: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 4675e: 4fef 0010 lea %sp@(16),%sp 46762: 4280 clrl %d0 46764: 60ba bras 46720 ... =============================================================================== 00050630 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 50630: 4e56 fffc linkw %fp,#-4 50634: 486e fffc pea %fp@(-4) 50638: 2f2e 0008 movel %fp@(8),%sp@- 5063c: 4879 0006 4d94 pea 64d94 <_Semaphore_Information> 50642: 4eb9 0004 9650 jsr 49650 <_Objects_Get> register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 50648: 4fef 000c lea %sp@(12),%sp 5064c: 4aae fffc tstl %fp@(-4) 50650: 6706 beqs 50658 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 50652: 7004 moveq #4,%d0 } 50654: 4e5e unlk %fp 50656: 4e75 rts 50658: 7230 moveq #48,%d1 5065a: 2040 moveal %d0,%a0 5065c: c2a8 0010 andl %a0@(16),%d1 the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 50660: 6720 beqs 50682 _CORE_mutex_Flush( 50662: 4878 0001 pea 1 50666: 42a7 clrl %sp@- 50668: 4868 0014 pea %a0@(20) 5066c: 4eb9 0004 8830 jsr 48830 <_CORE_mutex_Flush> 50672: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50676: 4eb9 0004 a34a jsr 4a34a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5067c: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5067e: 4e5e unlk %fp 50680: 4e75 rts &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 50682: 4878 0001 pea 1 50686: 2040 moveal %d0,%a0 50688: 42a7 clrl %sp@- 5068a: 4868 0014 pea %a0@(20) 5068e: 4eb9 0004 8b68 jsr 48b68 <_CORE_semaphore_Flush> 50694: 4fef 000c lea %sp@(12),%sp &the_semaphore->Core_control.semaphore, SEND_OBJECT_WAS_DELETED, CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT ); } _Thread_Enable_dispatch(); 50698: 4eb9 0004 a34a jsr 4a34a <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5069e: 4280 clrl %d0 506a0: 60dc bras 5067e ... =============================================================================== 00046768 : rtems_status_code rtems_semaphore_obtain( rtems_id id, rtems_option option_set, rtems_interval timeout ) { 46768: 4e56 ffec linkw %fp,#-20 4676c: 48d7 001c moveml %d2-%d4,%sp@ Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) _Objects_Get_isr_disable( &_Semaphore_Information, id, location, level ); 46770: 486e fff8 pea %fp@(-8) 46774: 486e fffc pea %fp@(-4) 46778: 242e 0008 movel %fp@(8),%d2 4677c: 2f02 movel %d2,%sp@- 4677e: 4879 0006 0bac pea 60bac <_Semaphore_Information> 46784: 262e 000c movel %fp@(12),%d3 46788: 282e 0010 movel %fp@(16),%d4 4678c: 4eb9 0004 8038 jsr 48038 <_Objects_Get_isr_disable> register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 46792: 4fef 0010 lea %sp@(16),%sp 46796: 4aae fffc tstl %fp@(-4) 4679a: 670c beqs 467a8 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4679c: 7004 moveq #4,%d0 } 4679e: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 467a4: 4e5e unlk %fp 467a6: 4e75 rts 467a8: 7230 moveq #48,%d1 467aa: 2040 moveal %d0,%a0 467ac: c2a8 0010 andl %a0@(16),%d1 the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 467b0: 6738 beqs 467ea _CORE_mutex_Seize( 467b2: 2f2e fff8 movel %fp@(-8),%sp@- */ RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait ( rtems_option option_set ) { return (option_set & RTEMS_NO_WAIT) ? true : false; 467b6: 7201 moveq #1,%d1 467b8: c681 andl %d1,%d3 467ba: 2f04 movel %d4,%sp@- 467bc: b781 eorl %d3,%d1 467be: 2f01 movel %d1,%sp@- 467c0: 2f02 movel %d2,%sp@- 467c2: 4868 0014 pea %a0@(20) 467c6: 4eb9 0004 7400 jsr 47400 <_CORE_mutex_Seize> ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( _Thread_Executing->Wait.return_code ); 467cc: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 467d2: 2f28 0034 movel %a0@(52),%sp@- 467d6: 4eb9 0004 6938 jsr 46938 <_Semaphore_Translate_core_mutex_return_code> 467dc: 4fef 0018 lea %sp@(24),%sp break; } return RTEMS_INVALID_ID; } 467e0: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 467e6: 4e5e unlk %fp 467e8: 4e75 rts /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { 467ea: 2240 moveal %d0,%a1 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 467ec: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { 467f2: 2229 005c movel %a1@(92),%d1 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 467f6: 42a8 0034 clrl %a0@(52) if ( the_semaphore->count != 0 ) { 467fa: 4a81 tstl %d1 467fc: 662e bnes 4682c the_semaphore->count -= 1; _ISR_Enable( *level_p ); return; } if ( !wait ) { 467fe: 0803 0000 btst #0,%d3 46802: 6748 beqs 4684c _ISR_Enable( *level_p ); 46804: 202e fff8 movel %fp@(-8),%d0 46808: 46c0 movew %d0,%sr executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 4680a: 7001 moveq #1,%d0 4680c: 2140 0034 movel %d0,%a0@(52) ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); 46810: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 46816: 2f28 0034 movel %a0@(52),%sp@- 4681a: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code> 46820: 588f addql #4,%sp break; } return RTEMS_INVALID_ID; } 46822: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 46828: 4e5e unlk %fp 4682a: 4e75 rts /* 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; 4682c: 5381 subql #1,%d1 4682e: 2341 005c movel %d1,%a1@(92) _ISR_Enable( *level_p ); 46832: 202e fff8 movel %fp@(-8),%d0 46836: 46c0 movew %d0,%sr ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); 46838: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 4683e: 2f28 0034 movel %a0@(52),%sp@- 46842: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code> 46848: 588f addql #4,%sp 4684a: 60d6 bras 46822 4684c: 2239 0006 0c68 movel 60c68 <_Thread_Dispatch_disable_level>,%d1 46852: 5281 addql #1,%d1 46854: 23c1 0006 0c68 movel %d1,60c68 <_Thread_Dispatch_disable_level> RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 4685a: 7201 moveq #1,%d1 4685c: 2240 moveal %d0,%a1 return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 4685e: 0680 0000 0014 addil #20,%d0 46864: 2341 0044 movel %d1,%a1@(68) executing->Wait.id = id; 46868: 2142 0020 movel %d2,%a0@(32) return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 4686c: 2140 0044 movel %d0,%a0@(68) executing->Wait.id = id; _ISR_Enable( *level_p ); 46870: 222e fff8 movel %fp@(-8),%d1 46874: 46c1 movew %d1,%sr _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 46876: 4879 0004 9654 pea 49654 <_Thread_queue_Timeout> 4687c: 2f04 movel %d4,%sp@- 4687e: 2f00 movel %d0,%sp@- 46880: 4eb9 0004 9290 jsr 49290 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 46886: 4eb9 0004 8d8a jsr 48d8a <_Thread_Enable_dispatch> _Thread_Executing->Wait.return_code ); 4688c: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 46892: 4fef 000c lea %sp@(12),%sp id, ((_Options_Is_no_wait( option_set )) ? false : true), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 46896: 2f28 0034 movel %a0@(52),%sp@- 4689a: 4eb9 0004 694e jsr 4694e <_Semaphore_Translate_core_semaphore_return_code> 468a0: 588f addql #4,%sp 468a2: 6000 ff7e braw 46822 ... =============================================================================== 00046e40 : void rtems_shutdown_executive( uint32_t result ) { if ( _System_state_Is_up( _System_state_Get() ) ) { 46e40: 7003 moveq #3,%d0 */ void rtems_shutdown_executive( uint32_t result ) { 46e42: 4e56 0000 linkw %fp,#0 if ( _System_state_Is_up( _System_state_Get() ) ) { 46e46: b0b9 0006 0db4 cmpl 60db4 <_System_state_Current>,%d0 46e4c: 6710 beqs 46e5e _System_state_Set( SYSTEM_STATE_SHUTDOWN ); _Thread_Stop_multitasking(); } _Internal_error_Occurred( 46e4e: 4878 0014 pea 14 46e52: 4878 0001 pea 1 46e56: 42a7 clrl %sp@- 46e58: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> * if we were running within the same context, it would work. * * And we will not return to this thread, so there is no point of * saving the context. */ _Context_Restart_self( &_Thread_BSP_context ); 46e5e: 4879 0006 0c34 pea 60c34 <_Thread_BSP_context> 46e64: 103c 0004 moveb #4,%d0 46e68: 23c0 0006 0db4 movel %d0,60db4 <_System_state_Current> 46e6e: 4eb9 0004 9fa2 jsr 49fa2 <_CPU_Context_Restart_self> 46e74: 588f addql #4,%sp <== NOT EXECUTED 46e76: 4878 0014 pea 14 <== NOT EXECUTED 46e7a: 4878 0001 pea 1 <== NOT EXECUTED 46e7e: 42a7 clrl %sp@- <== NOT EXECUTED 46e80: 4eb9 0004 7b1c jsr 47b1c <_Internal_error_Occurred> <== NOT EXECUTED ... =============================================================================== 00058338 : rtems_status_code rtems_signal_send( rtems_id id, rtems_signal_set signal_set ) { 58338: 4e56 fffc linkw %fp,#-4 5833c: 2f03 movel %d3,%sp@- 5833e: 2f02 movel %d2,%sp@- 58340: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 58344: 660e bnes 58354 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58346: 242e fff4 movel %fp@(-12),%d2 Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; 5834a: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5834c: 262e fff8 movel %fp@(-8),%d3 58350: 4e5e unlk %fp 58352: 4e75 rts ASR_Information *asr; if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); 58354: 486e fffc pea %fp@(-4) 58358: 2f2e 0008 movel %fp@(8),%sp@- 5835c: 4eb9 0005 c9f4 jsr 5c9f4 <_Thread_Get> switch ( location ) { 58362: 508f addql #8,%sp 58364: 4aae fffc tstl %fp@(-4) 58368: 670e beqs 58378 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5836a: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5836e: 7004 moveq #4,%d0 } 58370: 262e fff8 movel %fp@(-8),%d3 58374: 4e5e unlk %fp 58376: 4e75 rts the_thread = _Thread_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 58378: 2240 moveal %d0,%a1 5837a: 2069 00fe moveal %a1@(254),%a0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 5837e: 4aa8 000a tstl %a0@(10) 58382: 676a beqs 583ee if ( asr->is_enabled ) { 58384: 4a28 0008 tstb %a0@(8) 58388: 6736 beqs 583c0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 5838a: 223c 0000 0700 movel #1792,%d1 58390: 40c3 movew %sr,%d3 58392: 8283 orl %d3,%d1 58394: 46c1 movew %d1,%sr *signal_set |= signals; 58396: 85a8 0012 orl %d2,%a0@(18) _ISR_Enable( _level ); 5839a: 46c3 movew %d3,%sr _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 5839c: 4ab9 0008 005a tstl 8005a <_Per_CPU_Information+0x8> 583a2: 6708 beqs 583ac 583a4: b0b9 0008 005e cmpl 8005e <_Per_CPU_Information+0xc>,%d0 583aa: 6730 beqs 583dc <== ALWAYS TAKEN _Thread_Dispatch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 583ac: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 583b2: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 583b4: 242e fff4 movel %fp@(-12),%d2 583b8: 262e fff8 movel %fp@(-8),%d3 583bc: 4e5e unlk %fp 583be: 4e75 rts rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 583c0: 203c 0000 0700 movel #1792,%d0 583c6: 40c1 movew %sr,%d1 583c8: 8081 orl %d1,%d0 583ca: 46c0 movew %d0,%sr *signal_set |= signals; 583cc: 85a8 0016 orl %d2,%a0@(22) _ISR_Enable( _level ); 583d0: 46c1 movew %d1,%sr if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 583d2: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 583d8: 4280 clrl %d0 583da: 60d8 bras 583b4 if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { _ASR_Post_signals( signal_set, &asr->signals_posted ); if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) _Thread_Dispatch_necessary = true; 583dc: 7001 moveq #1,%d0 583de: 13c0 0008 006a moveb %d0,8006a <_Per_CPU_Information+0x18> } else { _ASR_Post_signals( signal_set, &asr->signals_pending ); } _Thread_Enable_dispatch(); 583e4: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 583ea: 4280 clrl %d0 583ec: 60c6 bras 583b4 } _Thread_Enable_dispatch(); 583ee: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 583f4: 242e fff4 movel %fp@(-12),%d2 } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; 583f8: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 583fa: 262e fff8 movel %fp@(-8),%d3 583fe: 4e5e unlk %fp ... =============================================================================== 0004e674 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 4e674: 4e56 ffe4 linkw %fp,#-28 4e678: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4e67c: 2a2e 0008 movel %fp@(8),%d5 4e680: 242e 000c movel %fp@(12),%d2 4e684: 286e 0010 moveal %fp@(16),%a4 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) 4e688: 4a8c tstl %a4 4e68a: 6700 015a beqw 4e7e6 return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 4e68e: 2479 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a2 api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4e694: 4a2a 0074 tstb %a2@(116) 4e698: 57c3 seq %d3 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 4e69a: 266a 00fe moveal %a2@(254),%a3 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; 4e69e: 49c3 extbl %d3 4e6a0: 0283 0000 0100 andil #256,%d3 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 4e6a6: 4aaa 007a tstl %a2@(122) 4e6aa: 6600 00cc bnew 4e778 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4e6ae: 4a2b 0008 tstb %a3@(8) 4e6b2: 57c4 seq %d4 old_mode |= _ISR_Get_level(); 4e6b4: 4eb9 0004 a048 jsr 4a048 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4e6ba: 49c4 extbl %d4 4e6bc: 0284 0000 0400 andil #1024,%d4 4e6c2: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); 4e6c4: 8083 orl %d3,%d0 4e6c6: 2880 movel %d0,%a4@ *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4e6c8: 0802 0008 btst #8,%d2 4e6cc: 670c beqs 4e6da executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 4e6ce: 0805 0008 btst #8,%d5 4e6d2: 57c0 seq %d0 4e6d4: 4480 negl %d0 4e6d6: 1540 0074 moveb %d0,%a2@(116) if ( mask & RTEMS_TIMESLICE_MASK ) { 4e6da: 0802 0009 btst #9,%d2 4e6de: 6718 beqs 4e6f8 if ( _Modes_Is_timeslice(mode_set) ) { 4e6e0: 0805 0009 btst #9,%d5 4e6e4: 6700 00ee beqw 4e7d4 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4e6e8: 7001 moveq #1,%d0 executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4e6ea: 41f9 0006 0c20 lea 60c20 <_Thread_Ticks_per_timeslice>,%a0 if ( mask & RTEMS_PREEMPT_MASK ) executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 4e6f0: 2540 007a movel %d0,%a2@(122) executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 4e6f4: 2550 0076 movel %a0@,%a2@(118) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4e6f8: 7007 moveq #7,%d0 4e6fa: c082 andl %d2,%d0 4e6fc: 6712 beqs 4e710 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4e6fe: 40c0 movew %sr,%d0 */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( Modes_Control mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); 4e700: 7207 moveq #7,%d1 4e702: c285 andl %d5,%d1 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 4e704: 0280 0000 f8ff andil #63743,%d0 4e70a: e189 lsll #8,%d1 4e70c: 8081 orl %d1,%d0 4e70e: 46c0 movew %d0,%sr * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 4e710: 0802 000a btst #10,%d2 4e714: 6754 beqs 4e76a is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 4e716: 4282 clrl %d2 4e718: 142b 0008 moveb %a3@(8),%d2 4e71c: 4280 clrl %d0 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 4e71e: 0805 000a btst #10,%d5 4e722: 57c1 seq %d1 4e724: 4481 negl %d1 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { 4e726: 1001 moveb %d1,%d0 4e728: b082 cmpl %d2,%d0 4e72a: 673e beqs 4e76a ) { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); 4e72c: 203c 0000 0700 movel #1792,%d0 asr->is_enabled = is_asr_enabled; 4e732: 1741 0008 moveb %d1,%a3@(8) 4e736: 40c1 movew %sr,%d1 4e738: 8081 orl %d1,%d0 4e73a: 46c0 movew %d0,%sr _signals = information->signals_pending; 4e73c: 202b 0016 movel %a3@(22),%d0 information->signals_pending = information->signals_posted; 4e740: 276b 0012 0016 movel %a3@(18),%a3@(22) information->signals_posted = _signals; 4e746: 2740 0012 movel %d0,%a3@(18) _ISR_Enable( _level ); 4e74a: 46c1 movew %d1,%sr /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4e74c: 4aab 0012 tstl %a3@(18) 4e750: 56c0 sne %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4e752: 7203 moveq #3,%d1 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4e754: 4480 negl %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4e756: b2b9 0006 0db4 cmpl 60db4 <_System_state_Current>,%d1 4e75c: 6744 beqs 4e7a2 <== ALWAYS TAKEN if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 4e75e: 4280 clrl %d0 } 4e760: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e766: 4e5e unlk %fp 4e768: 4e75 rts needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4e76a: 7203 moveq #3,%d1 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 4e76c: 4200 clrb %d0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 4e76e: b2b9 0006 0db4 cmpl 60db4 <_System_state_Current>,%d1 4e774: 66e8 bnes 4e75e 4e776: 602a bras 4e7a2 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4e778: 4a2b 0008 tstb %a3@(8) 4e77c: 57c4 seq %d4 old_mode |= _ISR_Get_level(); 4e77e: 4eb9 0004 a048 jsr 4a048 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4e784: 49c4 extbl %d4 4e786: 0284 0000 0400 andil #1024,%d4 old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 4e78c: 08c3 0009 bset #9,%d3 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 4e790: 8084 orl %d4,%d0 old_mode |= _ISR_Get_level(); 4e792: 8083 orl %d3,%d0 4e794: 2880 movel %d0,%a4@ *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 4e796: 0802 0008 btst #8,%d2 4e79a: 6700 ff3e beqw 4e6da 4e79e: 6000 ff2e braw 4e6ce bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 4e7a2: 2079 0006 10d2 moveal 610d2 <_Per_CPU_Information+0xc>,%a0 if ( are_signals_pending || 4e7a8: 4a00 tstb %d0 4e7aa: 660e bnes 4e7ba 4e7ac: b1f9 0006 10d6 cmpal 610d6 <_Per_CPU_Information+0x10>,%a0 4e7b2: 67aa beqs 4e75e (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 4e7b4: 4a28 0074 tstb %a0@(116) 4e7b8: 67a4 beqs 4e75e <== NEVER TAKEN _Thread_Dispatch_necessary = true; 4e7ba: 7001 moveq #1,%d0 4e7bc: 13c0 0006 10de moveb %d0,610de <_Per_CPU_Information+0x18> } } if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 4e7c2: 4eb9 0004 8c20 jsr 48c20 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; } 4e7c8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 if ( _System_state_Is_up( _System_state_Get() ) ) { if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; 4e7ce: 4280 clrl %d0 } 4e7d0: 4e5e unlk %fp 4e7d2: 4e75 rts } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4e7d4: 7007 moveq #7,%d0 4e7d6: c082 andl %d2,%d0 if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 4e7d8: 42aa 007a clrl %a2@(122) } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 4e7dc: 4a80 tstl %d0 4e7de: 6700 ff30 beqw 4e710 4e7e2: 6000 ff1a braw 4e6fe bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; 4e7e6: 7009 moveq #9,%d0 if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); } return RTEMS_SUCCESSFUL; } 4e7e8: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e7ee: 4e5e unlk %fp ... =============================================================================== 0004b00c : rtems_status_code rtems_task_set_priority( rtems_id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4b00c: 4e56 fffc linkw %fp,#-4 4b010: 2f0a movel %a2,%sp@- 4b012: 246e 0010 moveal %fp@(16),%a2 4b016: 2f02 movel %d2,%sp@- 4b018: 242e 000c movel %fp@(12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4b01c: 670c beqs 4b02a RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 4b01e: 4280 clrl %d0 4b020: 1039 0006 3712 moveb 63712 ,%d0 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 4b026: b082 cmpl %d2,%d0 4b028: 6566 bcss 4b090 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4b02a: 4a8a tstl %a2 4b02c: 6770 beqs 4b09e return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); 4b02e: 486e fffc pea %fp@(-4) 4b032: 2f2e 0008 movel %fp@(8),%sp@- 4b036: 4eb9 0004 d3f0 jsr 4d3f0 <_Thread_Get> switch ( location ) { 4b03c: 508f addql #8,%sp 4b03e: 4aae fffc tstl %fp@(-4) 4b042: 663e bnes 4b082 case OBJECTS_LOCAL: /* XXX need helper to "convert" from core priority */ *old_priority = the_thread->current_priority; 4b044: 2040 moveal %d0,%a0 4b046: 24a8 0014 movel %a0@(20),%a2@ if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4b04a: 4a82 tstl %d2 4b04c: 6720 beqs 4b06e the_thread->real_priority = new_priority; 4b04e: 2142 0018 movel %d2,%a0@(24) if ( the_thread->resource_count == 0 || 4b052: 4aa8 001c tstl %a0@(28) 4b056: 6706 beqs 4b05e 4b058: b4a8 0014 cmpl %a0@(20),%d2 4b05c: 6410 bccs 4b06e <== ALWAYS TAKEN the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); 4b05e: 42a7 clrl %sp@- 4b060: 2f02 movel %d2,%sp@- 4b062: 2f00 movel %d0,%sp@- 4b064: 4eb9 0004 cf18 jsr 4cf18 <_Thread_Change_priority> 4b06a: 4fef 000c lea %sp@(12),%sp } _Thread_Enable_dispatch(); 4b06e: 4eb9 0004 d3ca jsr 4d3ca <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b074: 242e fff4 movel %fp@(-12),%d2 if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, false ); } _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 4b078: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b07a: 246e fff8 moveal %fp@(-8),%a2 4b07e: 4e5e unlk %fp 4b080: 4e75 rts 4b082: 242e fff4 movel %fp@(-12),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 4b086: 7004 moveq #4,%d0 } 4b088: 246e fff8 moveal %fp@(-8),%a2 4b08c: 4e5e unlk %fp 4b08e: 4e75 rts 4b090: 242e fff4 movel %fp@(-12),%d2 register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; 4b094: 7013 moveq #19,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b096: 246e fff8 moveal %fp@(-8),%a2 4b09a: 4e5e unlk %fp 4b09c: 4e75 rts 4b09e: 242e fff4 movel %fp@(-12),%d2 if ( new_priority != RTEMS_CURRENT_PRIORITY && !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) return RTEMS_INVALID_ADDRESS; 4b0a2: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 4b0a4: 246e fff8 moveal %fp@(-8),%a2 4b0a8: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047b78 : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 47b78: 4e56 fffc linkw %fp,#-4 47b7c: 2f02 movel %d2,%sp@- 47b7e: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 47b82: 6772 beqs 47bf6 return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); 47b84: 486e fffc pea %fp@(-4) 47b88: 2f2e 0008 movel %fp@(8),%sp@- 47b8c: 4eb9 0004 9d4c jsr 49d4c <_Thread_Get> switch (location) { 47b92: 508f addql #8,%sp 47b94: 4aae fffc tstl %fp@(-4) 47b98: 6634 bnes 47bce case OBJECTS_LOCAL: tvp = the_thread->task_variables; 47b9a: 2040 moveal %d0,%a0 47b9c: 2268 010a moveal %a0@(266),%a1 while (tvp) { 47ba0: 4a89 tstl %a1 47ba2: 671a beqs 47bbe if (tvp->ptr == ptr) { 47ba4: b4a9 0004 cmpl %a1@(4),%d2 47ba8: 6756 beqs 47c00 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 47baa: 2051 moveal %a1@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 47bac: 4a88 tstl %a0 47bae: 670e beqs 47bbe <== NEVER TAKEN if (tvp->ptr == ptr) { 47bb0: b4a8 0004 cmpl %a0@(4),%d2 47bb4: 6722 beqs 47bd8 47bb6: 2248 moveal %a0,%a1 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 47bb8: 2051 moveal %a1@,%a0 the_thread = _Thread_Get (tid, &location); switch (location) { case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 47bba: 4a88 tstl %a0 47bbc: 66f2 bnes 47bb0 <== ALWAYS TAKEN return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47bbe: 4eb9 0004 9d26 jsr 49d26 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47bc4: 242e fff8 movel %fp@(-8),%d2 } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 47bc8: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47bca: 4e5e unlk %fp 47bcc: 4e75 rts 47bce: 242e fff8 movel %fp@(-8),%d2 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 47bd2: 7004 moveq #4,%d0 } 47bd4: 4e5e unlk %fp 47bd6: 4e75 rts case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 47bd8: 2290 movel %a0@,%a1@ else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47bda: 2f08 movel %a0,%sp@- 47bdc: 2f00 movel %d0,%sp@- 47bde: 4eb9 0004 7cac jsr 47cac <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47be4: 4eb9 0004 9d26 jsr 49d26 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47bea: 508f addql #8,%sp 47bec: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47bee: 242e fff8 movel %fp@(-8),%d2 47bf2: 4e5e unlk %fp 47bf4: 4e75 rts 47bf6: 242e fff8 movel %fp@(-8),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) return RTEMS_INVALID_ADDRESS; 47bfa: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47bfc: 4e5e unlk %fp 47bfe: 4e75 rts while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 47c00: 2040 moveal %d0,%a0 47c02: 2151 010a movel %a1@,%a0@(266) 47c06: 2049 moveal %a1,%a0 _RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp ); 47c08: 2f08 movel %a0,%sp@- 47c0a: 2f00 movel %d0,%sp@- 47c0c: 4eb9 0004 7cac jsr 47cac <_RTEMS_Tasks_Invoke_task_variable_dtor> _Thread_Enable_dispatch(); 47c12: 4eb9 0004 9d26 jsr 49d26 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 47c18: 508f addql #8,%sp 47c1a: 4280 clrl %d0 47c1c: 60d0 bras 47bee ... =============================================================================== 00047c20 : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 47c20: 4e56 fffc linkw %fp,#-4 47c24: 2f0a movel %a2,%sp@- 47c26: 246e 0010 moveal %fp@(16),%a2 47c2a: 2f02 movel %d2,%sp@- 47c2c: 242e 000c movel %fp@(12),%d2 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 47c30: 6752 beqs 47c84 return RTEMS_INVALID_ADDRESS; if ( !result ) 47c32: 4a8a tstl %a2 47c34: 674e beqs 47c84 return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); 47c36: 486e fffc pea %fp@(-4) 47c3a: 2f2e 0008 movel %fp@(8),%sp@- 47c3e: 4eb9 0004 9d4c jsr 49d4c <_Thread_Get> switch (location) { 47c44: 508f addql #8,%sp 47c46: 4aae fffc tstl %fp@(-4) 47c4a: 662a bnes 47c76 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 47c4c: 2240 moveal %d0,%a1 47c4e: 2069 010a moveal %a1@(266),%a0 while (tvp) { 47c52: 4a88 tstl %a0 47c54: 670c beqs 47c62 if (tvp->ptr == ptr) { 47c56: b4a8 0004 cmpl %a0@(4),%d2 47c5a: 6736 beqs 47c92 */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; 47c5c: 2050 moveal %a0@,%a0 case OBJECTS_LOCAL: /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; while (tvp) { 47c5e: 4a88 tstl %a0 47c60: 66f4 bnes 47c56 <== ALWAYS TAKEN _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); 47c62: 4eb9 0004 9d26 jsr 49d26 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47c68: 242e fff4 movel %fp@(-12),%d2 return RTEMS_SUCCESSFUL; } tvp = (rtems_task_variable_t *)tvp->next; } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; 47c6c: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47c6e: 246e fff8 moveal %fp@(-8),%a2 47c72: 4e5e unlk %fp 47c74: 4e75 rts 47c76: 242e fff4 movel %fp@(-12),%d2 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 47c7a: 7004 moveq #4,%d0 } 47c7c: 246e fff8 moveal %fp@(-8),%a2 47c80: 4e5e unlk %fp 47c82: 4e75 rts 47c84: 242e fff4 movel %fp@(-12),%d2 if ( !ptr ) return RTEMS_INVALID_ADDRESS; if ( !result ) return RTEMS_INVALID_ADDRESS; 47c88: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47c8a: 246e fff8 moveal %fp@(-8),%a2 47c8e: 4e5e unlk %fp 47c90: 4e75 rts if (tvp->ptr == ptr) { /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 47c92: 24a8 000c movel %a0@(12),%a2@ _Thread_Enable_dispatch(); 47c96: 4eb9 0004 9d26 jsr 49d26 <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47c9c: 242e fff4 movel %fp@(-12),%d2 * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; 47ca0: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 47ca2: 246e fff8 moveal %fp@(-8),%a2 47ca6: 4e5e unlk %fp ... =============================================================================== 00058d2c : */ rtems_status_code rtems_timer_cancel( rtems_id id ) { 58d2c: 4e56 fffc linkw %fp,#-4 Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) _Objects_Get( &_Timer_Information, id, location ); 58d30: 486e fffc pea %fp@(-4) 58d34: 2f2e 0008 movel %fp@(8),%sp@- 58d38: 4879 0008 046e pea 8046e <_Timer_Information> 58d3e: 4eb9 0005 bcdc jsr 5bcdc <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58d44: 4fef 000c lea %sp@(12),%sp 58d48: 4aae fffc tstl %fp@(-4) 58d4c: 6706 beqs 58d54 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 58d4e: 7004 moveq #4,%d0 } 58d50: 4e5e unlk %fp 58d52: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 58d54: 7204 moveq #4,%d1 58d56: 2040 moveal %d0,%a0 58d58: b2a8 0038 cmpl %a0@(56),%d1 58d5c: 670c beqs 58d6a <== NEVER TAKEN (void) _Watchdog_Remove( &the_timer->Ticker ); 58d5e: 4868 0010 pea %a0@(16) 58d62: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> 58d68: 588f addql #4,%sp _Thread_Enable_dispatch(); 58d6a: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 58d70: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58d72: 4e5e unlk %fp ... =============================================================================== 00058f60 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 58f60: 4e56 ffec linkw %fp,#-20 58f64: 48d7 041c moveml %d2-%d4/%a2,%sp@ 58f68: 242e 000c movel %fp@(12),%d2 58f6c: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; if ( !_TOD_Is_set ) 58f70: 4a39 0007 fbfc tstb 7fbfc <_TOD_Is_set> 58f76: 660c bnes 58f84 return RTEMS_NOT_DEFINED; 58f78: 700b moveq #11,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58f7a: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58f80: 4e5e unlk %fp 58f82: 4e75 rts rtems_interval seconds; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !_TOD_Validate( wall_time ) ) 58f84: 2f02 movel %d2,%sp@- 58f86: 4eb9 0005 5fac jsr 55fac <_TOD_Validate> 58f8c: 588f addql #4,%sp 58f8e: 4a00 tstb %d0 58f90: 671a beqs 58fac return RTEMS_INVALID_CLOCK; if ( !routine ) 58f92: 4a83 tstl %d3 58f94: 6700 00a8 beqw 5903e return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 58f98: 2f02 movel %d2,%sp@- 58f9a: 4eb9 0005 5ea4 jsr 55ea4 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 58fa0: 588f addql #4,%sp return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; seconds = _TOD_To_seconds( wall_time ); 58fa2: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 58fa4: b0b9 0007 fc76 cmpl 7fc76 <_TOD_Now>,%d0 58faa: 620c bhis 58fb8 return RTEMS_INVALID_CLOCK; 58fac: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 58fae: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 58fb4: 4e5e unlk %fp 58fb6: 4e75 rts 58fb8: 486e fffc pea %fp@(-4) 58fbc: 2f2e 0008 movel %fp@(8),%sp@- 58fc0: 4879 0008 046e pea 8046e <_Timer_Information> 58fc6: 4eb9 0005 bcdc jsr 5bcdc <_Objects_Get> seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 58fcc: 4fef 000c lea %sp@(12),%sp 58fd0: 2440 moveal %d0,%a2 58fd2: 4aae fffc tstl %fp@(-4) 58fd6: 665a bnes 59032 <== NEVER TAKEN case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 58fd8: 2800 movel %d0,%d4 58fda: 0684 0000 0010 addil #16,%d4 58fe0: 2f04 movel %d4,%sp@- 58fe2: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 58fe8: 256e 0014 0034 movel %fp@(20),%a2@(52) the_timer->the_class = TIMER_TIME_OF_DAY; 58fee: 7002 moveq #2,%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 58ff0: 94b9 0007 fc76 subl 7fc76 <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY; 58ff6: 2540 0038 movel %d0,%a2@(56) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 58ffa: 202e 0008 movel %fp@(8),%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _Watchdog_Insert_seconds( 58ffe: 2542 001c movel %d2,%a2@(28) 59002: 2540 0030 movel %d0,%a2@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59006: 42aa 0018 clrl %a2@(24) the_watchdog->routine = routine; 5900a: 2543 002c movel %d3,%a2@(44) ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 5900e: 2f04 movel %d4,%sp@- 59010: 4879 0007 fca0 pea 7fca0 <_Watchdog_Seconds_chain> 59016: 4eb9 0005 dae8 jsr 5dae8 <_Watchdog_Insert> &the_timer->Ticker, seconds - _TOD_Seconds_since_epoch() ); _Thread_Enable_dispatch(); 5901c: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 59022: 4fef 000c lea %sp@(12),%sp 59026: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59028: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5902e: 4e5e unlk %fp 59030: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 59032: 7004 moveq #4,%d0 } 59034: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5903a: 4e5e unlk %fp 5903c: 4e75 rts if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; if ( !routine ) return RTEMS_INVALID_ADDRESS; 5903e: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59040: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 59046: 4e5e unlk %fp ... =============================================================================== 000597e2 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 597e2: 4e56 fffc linkw %fp,#-4 597e6: 202e 0008 movel %fp@(8),%d0 597ea: 2f03 movel %d3,%sp@- 597ec: 2f02 movel %d2,%sp@- 597ee: 4a80 tstl %d0 597f0: 6748 beqs 5983a <== NEVER TAKEN ( the_priority <= RTEMS_MAXIMUM_PRIORITY ) ); 597f2: 4281 clrl %d1 597f4: 1239 0007 9f42 moveb 79f42 ,%d1 */ RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid ( rtems_task_priority the_priority ) { return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) && 597fa: b280 cmpl %d0,%d1 597fc: 644a bccs 59848 * structured so we check it is invalid before looking for * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 597fe: 72ff moveq #-1,%d1 59800: b280 cmpl %d0,%d1 59802: 6636 bnes 5983a 59804: 2239 0007 fbec movel 7fbec <_Thread_Dispatch_disable_level>,%d1 5980a: 5281 addql #1,%d1 return RTEMS_INVALID_PRIORITY; _priority = 0; 5980c: 4283 clrl %d3 5980e: 23c1 0007 fbec movel %d1,7fbec <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 59814: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 59816: 1439 0007 b0ca moveb 7b0ca ,%d2 initialized = true; 5981c: 13c0 0007 b0ca moveb %d0,7b0ca _Thread_Enable_dispatch(); 59822: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> if ( tmpInitialized ) 59828: 4a02 tstb %d2 5982a: 6744 beqs 59870 initialized = false; } #endif return status; } 5982c: 242e fff4 movel %fp@(-12),%d2 tmpInitialized = initialized; initialized = true; _Thread_Enable_dispatch(); if ( tmpInitialized ) return RTEMS_INCORRECT_STATE; 59830: 700e moveq #14,%d0 initialized = false; } #endif return status; } 59832: 262e fff8 movel %fp@(-8),%d3 59836: 4e5e unlk %fp 59838: 4e75 rts 5983a: 242e fff4 movel %fp@(-12),%d2 * a specific invalid value as the default. */ _priority = priority; if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) { if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) return RTEMS_INVALID_PRIORITY; 5983e: 7013 moveq #19,%d0 initialized = false; } #endif return status; } 59840: 262e fff8 movel %fp@(-8),%d3 59844: 4e5e unlk %fp 59846: 4e75 rts 59848: 2239 0007 fbec movel 7fbec <_Thread_Dispatch_disable_level>,%d1 5984e: 5281 addql #1,%d1 59850: 2600 movel %d0,%d3 59852: 23c1 0007 fbec movel %d1,7fbec <_Thread_Dispatch_disable_level> /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; initialized = true; 59858: 7001 moveq #1,%d0 /* * Just to make sure this is only called once. */ _Thread_Disable_dispatch(); tmpInitialized = initialized; 5985a: 1439 0007 b0ca moveb 7b0ca ,%d2 initialized = true; 59860: 13c0 0007 b0ca moveb %d0,7b0ca _Thread_Enable_dispatch(); 59866: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> if ( tmpInitialized ) 5986c: 4a02 tstb %d2 5986e: 66bc bnes 5982c <== NEVER TAKEN * other library rules. For example, if using a TSR written in Ada the * 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( 59870: 222e 0010 movel %fp@(16),%d1 59874: 486e fffc pea %fp@(-4) 59878: 08c1 000f bset #15,%d1 5987c: 2f01 movel %d1,%sp@- 5987e: 4878 0100 pea 100 59882: 2f2e 000c movel %fp@(12),%sp@- 59886: 2f03 movel %d3,%sp@- 59888: 2f3c 5449 4d45 movel #1414090053,%sp@- 5988e: 4eb9 0005 8404 jsr 58404 /* 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) { 59894: 4fef 0018 lea %sp@(24),%sp 59898: 4a80 tstl %d0 5989a: 6714 beqs 598b0 initialized = false; } #endif return status; } 5989c: 242e fff4 movel %fp@(-12),%d2 /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 598a0: 4201 clrb %d1 initialized = false; } #endif return status; } 598a2: 262e fff8 movel %fp@(-8),%d3 598a6: 4e5e unlk %fp /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { initialized = false; 598a8: 13c1 0007 b0ca moveb %d1,7b0ca initialized = false; } #endif return status; } 598ae: 4e75 rts * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( &_RTEMS_tasks_Information, _Objects_Get_index(id) 598b0: 202e fffc movel %fp@(-4),%d0 */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 598b4: 4282 clrl %d2 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 598b6: 2079 0007 fb82 moveal 7fb82 <_RTEMS_tasks_Information+0x18>,%a0 598bc: 3400 movew %d0,%d2 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 598be: 2239 0007 fcf6 movel 7fcf6 <_Watchdog_Ticks_since_boot>,%d1 /* * We work with the TCB pointer, not the ID, so we need to convert * to a TCB pointer from here out. */ ts->thread = (Thread_Control *)_Objects_Get_local_object( 598c4: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 598c8: 23d0 0007 b04c movel %a0@,7b04c <_Timer_server_Default> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 598ce: 41f9 0007 b080 lea 7b080 <_Timer_server_Default+0x34>,%a0 _Timer_server = ts; /* * Start the timer server */ status = rtems_task_start( 598d4: 4879 0007 b04c pea 7b04c <_Timer_server_Default> 598da: 487a fb6c pea %pc@(59448 <_Timer_server_Body>) 598de: 23c8 0007 b07c movel %a0,7b07c <_Timer_server_Default+0x30> head->previous = NULL; tail->previous = head; 598e4: 41f9 0007 b07c lea 7b07c <_Timer_server_Default+0x30>,%a0 598ea: 23c8 0007 b084 movel %a0,7b084 <_Timer_server_Default+0x38> ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 598f0: 41f9 0007 b0b8 lea 7b0b8 <_Timer_server_Default+0x6c>,%a0 * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; 598f6: 23c1 0007 b088 movel %d1,7b088 <_Timer_server_Default+0x3c> head->previous = NULL; tail->previous = head; 598fc: 223c 0007 b0b4 movel #503988,%d1 ) { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; 59902: 23c8 0007 b0b4 movel %a0,7b0b4 <_Timer_server_Default+0x68> ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 59908: 41f9 0007 fc76 lea 7fc76 <_TOD_Now>,%a0 head->previous = NULL; tail->previous = head; 5990e: 23c1 0007 b0bc movel %d1,7b0bc <_Timer_server_Default+0x70> 59914: 23d0 0007 b0c0 movel %a0@,7b0c0 <_Timer_server_Default+0x74> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 5991a: 223c 0005 c828 movel #378920,%d1 59920: 41f9 0005 c828 lea 5c828 <_Thread_Delay_ended>,%a0 59926: 23c1 0007 b070 movel %d1,7b070 <_Timer_server_Default+0x24> ts->insert_chain = NULL; ts->active = false; 5992c: 4201 clrb %d1 ts->schedule_operation = _Timer_server_Schedule_operation_method; ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot; ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); ts->insert_chain = NULL; 5992e: 42b9 0007 b0c4 clrl 7b0c4 <_Timer_server_Default+0x78> ts->active = false; 59934: 13c1 0007 b0c8 moveb %d1,7b0c8 <_Timer_server_Default+0x7c> 5993a: 23c8 0007 b0a8 movel %a0,7b0a8 <_Timer_server_Default+0x5c> /* * The default timer server is now available. */ _Timer_server = ts; 59940: 41f9 0007 b04c lea 7b04c <_Timer_server_Default>,%a0 /* * Start the timer server */ status = rtems_task_start( 59946: 2f00 movel %d0,%sp@- /* * Initialize the pointer to the timer schedule method so applications that * do not use the Timer Server do not have to pull it in. */ ts->schedule_operation = _Timer_server_Schedule_operation_method; 59948: 223c 0005 9686 movel #366214,%d1 { Chain_Node *head = _Chain_Head( the_chain ); Chain_Node *tail = _Chain_Tail( the_chain ); head->next = tail; head->previous = NULL; 5994e: 42b9 0007 b080 clrl 7b080 <_Timer_server_Default+0x34> 59954: 42b9 0007 b0b8 clrl 7b0b8 <_Timer_server_Default+0x6c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5995a: 42b9 0007 b05c clrl 7b05c <_Timer_server_Default+0x10> 59960: 23c1 0007 b050 movel %d1,7b050 <_Timer_server_Default+0x4> the_watchdog->routine = routine; the_watchdog->id = id; 59966: 23c0 0007 b074 movel %d0,7b074 <_Timer_server_Default+0x28> ts->active = false; /* * The default timer server is now available. */ _Timer_server = ts; 5996c: 23c8 0008 04a8 movel %a0,804a8 <_Timer_server> the_watchdog->user_data = user_data; 59972: 42b9 0007 b078 clrl 7b078 <_Timer_server_Default+0x2c> Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59978: 42b9 0007 b094 clrl 7b094 <_Timer_server_Default+0x48> the_watchdog->routine = routine; the_watchdog->id = id; 5997e: 23c0 0007 b0ac movel %d0,7b0ac <_Timer_server_Default+0x60> the_watchdog->user_data = user_data; 59984: 42b9 0007 b0b0 clrl 7b0b0 <_Timer_server_Default+0x64> /* * Start the timer server */ status = rtems_task_start( 5998a: 4eb9 0005 8b10 jsr 58b10 initialized = false; } #endif return status; } 59990: 242e fff4 movel %fp@(-12),%d2 if (status) { initialized = false; } #endif return status; 59994: 4fef 000c lea %sp@(12),%sp } 59998: 262e fff8 movel %fp@(-8),%d3 5999c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000590e4 : */ rtems_status_code rtems_timer_reset( rtems_id id ) { 590e4: 4e56 fff0 linkw %fp,#-16 590e8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 590ec: 486e fffc pea %fp@(-4) 590f0: 2f2e 0008 movel %fp@(8),%sp@- 590f4: 4879 0008 046e pea 8046e <_Timer_Information> 590fa: 4eb9 0005 bcdc jsr 5bcdc <_Objects_Get> Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; the_timer = _Timer_Get( id, &location ); switch ( location ) { 59100: 4fef 000c lea %sp@(12),%sp 59104: 2440 moveal %d0,%a2 59106: 4aae fffc tstl %fp@(-4) 5910a: 670e beqs 5911a #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5910c: 7404 moveq #4,%d2 } 5910e: 2002 movel %d2,%d0 59110: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 59116: 4e5e unlk %fp 59118: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { 5911a: 202a 0038 movel %a2@(56),%d0 5911e: 671a beqs 5913a _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { 59120: 7201 moveq #1,%d1 59122: b280 cmpl %d0,%d1 59124: 673c beqs 59162 /* * Must be dormant or time of day timer (e.g. TIMER_DORMANT, * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; 59126: 740b moveq #11,%d2 } _Thread_Enable_dispatch(); 59128: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5912e: 2002 movel %d2,%d0 59130: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 59136: 4e5e unlk %fp 59138: 4e75 rts the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 5913a: 45ea 0010 lea %a2@(16),%a2 rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 5913e: 4282 clrl %d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); 59140: 2f0a movel %a2,%sp@- 59142: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 59148: 2f0a movel %a2,%sp@- 5914a: 4879 0007 fcac pea 7fcac <_Watchdog_Ticks_chain> 59150: 4eb9 0005 dae8 jsr 5dae8 <_Watchdog_Insert> 59156: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 5915a: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> 59160: 60cc bras 5912e if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 59162: 486a 0010 pea %a2@(16) rtems_id id ) { Timer_Control *the_timer; Objects_Locations location; rtems_status_code status = RTEMS_SUCCESSFUL; 59166: 4282 clrl %d2 case OBJECTS_LOCAL: if ( the_timer->the_class == TIMER_INTERVAL ) { _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); } else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) { Timer_server_Control *timer_server = _Timer_server; 59168: 2679 0008 04a8 moveal 804a8 <_Timer_server>,%a3 if ( !timer_server ) { _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } #endif _Watchdog_Remove( &the_timer->Ticker ); 5916e: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> (*timer_server->schedule_operation)( timer_server, the_timer ); 59174: 2f0a movel %a2,%sp@- 59176: 2f0b movel %a3,%sp@- 59178: 206b 0004 moveal %a3@(4),%a0 5917c: 4e90 jsr %a0@ 5917e: 4fef 000c lea %sp@(12),%sp * TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We * can only reset active interval timers. */ status = RTEMS_NOT_DEFINED; } _Thread_Enable_dispatch(); 59182: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> 59188: 60a4 bras 5912e ... =============================================================================== 0005918c : rtems_id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 5918c: 4e56 ffe8 linkw %fp,#-24 59190: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 59194: 282e 0008 movel %fp@(8),%d4 59198: 262e 000c movel %fp@(12),%d3 5919c: 242e 0010 movel %fp@(16),%d2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; 591a0: 2479 0008 04a8 moveal 804a8 <_Timer_server>,%a2 if ( !timer_server ) 591a6: 4a8a tstl %a2 591a8: 6700 009c beqw 59246 return RTEMS_INCORRECT_STATE; if ( !routine ) 591ac: 4a82 tstl %d2 591ae: 6700 00a2 beqw 59252 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 591b2: 4a83 tstl %d3 591b4: 660c bnes 591c2 return RTEMS_INVALID_NUMBER; 591b6: 700a moveq #10,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 591b8: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 591be: 4e5e unlk %fp 591c0: 4e75 rts 591c2: 486e fffc pea %fp@(-4) 591c6: 2f04 movel %d4,%sp@- 591c8: 4879 0008 046e pea 8046e <_Timer_Information> 591ce: 4eb9 0005 bcdc jsr 5bcdc <_Objects_Get> if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 591d4: 4fef 000c lea %sp@(12),%sp 591d8: 2640 moveal %d0,%a3 591da: 4aae fffc tstl %fp@(-4) 591de: 665a bnes 5923a case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 591e0: 486b 0010 pea %a3@(16) 591e4: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> _ISR_Disable( level ); 591ea: 203c 0000 0700 movel #1792,%d0 591f0: 40c1 movew %sr,%d1 591f2: 8081 orl %d1,%d0 591f4: 46c0 movew %d0,%sr /* * 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 ) { 591f6: 588f addql #4,%sp 591f8: 4aab 0018 tstl %a3@(24) 591fc: 6660 bnes 5925e <== NEVER TAKEN /* * 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; 591fe: 7001 moveq #1,%d0 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 59200: 276e 0014 0034 movel %fp@(20),%a3@(52) 59206: 2740 0038 movel %d0,%a3@(56) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 5920a: 42ab 0018 clrl %a3@(24) the_watchdog->routine = routine; 5920e: 2742 002c movel %d2,%a3@(44) the_watchdog->id = id; 59212: 2744 0030 movel %d4,%a3@(48) _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 59216: 2743 001c movel %d3,%a3@(28) _ISR_Enable( level ); 5921a: 46c1 movew %d1,%sr (*timer_server->schedule_operation)( timer_server, the_timer ); 5921c: 2f0b movel %a3,%sp@- 5921e: 2f0a movel %a2,%sp@- 59220: 206a 0004 moveal %a2@(4),%a0 59224: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59226: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5922c: 508f addql #8,%sp 5922e: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59230: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 59236: 4e5e unlk %fp 59238: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 5923a: 7004 moveq #4,%d0 } 5923c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 59242: 4e5e unlk %fp 59244: 4e75 rts Objects_Locations location; ISR_Level level; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 59246: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59248: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5924e: 4e5e unlk %fp 59250: 4e75 rts if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !routine ) return RTEMS_INVALID_ADDRESS; 59252: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59254: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5925a: 4e5e unlk %fp 5925c: 4e75 rts * 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 ); 5925e: 46c1 movew %d1,%sr _Thread_Enable_dispatch(); 59260: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 59266: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59268: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 5926e: 4e5e unlk %fp ... =============================================================================== 00059274 : rtems_id id, rtems_time_of_day *wall_time, rtems_timer_service_routine_entry routine, void *user_data ) { 59274: 4e56 ffec linkw %fp,#-20 59278: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 5927c: 242e 000c movel %fp@(12),%d2 59280: 262e 0010 movel %fp@(16),%d3 Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; 59284: 2479 0008 04a8 moveal 804a8 <_Timer_server>,%a2 if ( !timer_server ) 5928a: 4a8a tstl %a2 5928c: 6700 00c8 beqw 59356 return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) 59290: 4a39 0007 fbfc tstb 7fbfc <_TOD_Is_set> 59296: 6700 00a6 beqw 5933e return RTEMS_NOT_DEFINED; if ( !routine ) 5929a: 4a83 tstl %d3 5929c: 6700 00ac beqw 5934a return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) 592a0: 2f02 movel %d2,%sp@- 592a2: 4eb9 0005 5fac jsr 55fac <_TOD_Validate> 592a8: 588f addql #4,%sp 592aa: 4a00 tstb %d0 592ac: 660c bnes 592ba return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); if ( seconds <= _TOD_Seconds_since_epoch() ) return RTEMS_INVALID_CLOCK; 592ae: 7014 moveq #20,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 592b0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 592b6: 4e5e unlk %fp 592b8: 4e75 rts return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 592ba: 2f02 movel %d2,%sp@- 592bc: 4eb9 0005 5ea4 jsr 55ea4 <_TOD_To_seconds> if ( seconds <= _TOD_Seconds_since_epoch() ) 592c2: 588f addql #4,%sp return RTEMS_INVALID_ADDRESS; if ( !_TOD_Validate( wall_time ) ) return RTEMS_INVALID_CLOCK; seconds = _TOD_To_seconds( wall_time ); 592c4: 2400 movel %d0,%d2 if ( seconds <= _TOD_Seconds_since_epoch() ) 592c6: b0b9 0007 fc76 cmpl 7fc76 <_TOD_Now>,%d0 592cc: 63e0 blss 592ae 592ce: 486e fffc pea %fp@(-4) 592d2: 2f2e 0008 movel %fp@(8),%sp@- 592d6: 4879 0008 046e pea 8046e <_Timer_Information> 592dc: 4eb9 0005 bcdc jsr 5bcdc <_Objects_Get> return RTEMS_INVALID_CLOCK; the_timer = _Timer_Get( id, &location ); switch ( location ) { 592e2: 4fef 000c lea %sp@(12),%sp 592e6: 2640 moveal %d0,%a3 592e8: 4aae fffc tstl %fp@(-4) 592ec: 6674 bnes 59362 case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 592ee: 486b 0010 pea %a3@(16) 592f2: 4eb9 0005 dc3c jsr 5dc3c <_Watchdog_Remove> the_watchdog->user_data = user_data; 592f8: 276e 0014 0034 movel %fp@(20),%a3@(52) the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 592fe: 7003 moveq #3,%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 59300: 94b9 0007 fc76 subl 7fc76 <_TOD_Now>,%d2 the_timer = _Timer_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK; 59306: 2740 0038 movel %d0,%a3@(56) void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 5930a: 202e 0008 movel %fp@(8),%d0 _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch(); 5930e: 2742 001c movel %d2,%a3@(28) 59312: 2740 0030 movel %d0,%a3@(48) Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 59316: 42ab 0018 clrl %a3@(24) the_watchdog->routine = routine; 5931a: 2743 002c movel %d3,%a3@(44) (*timer_server->schedule_operation)( timer_server, the_timer ); 5931e: 2f0b movel %a3,%sp@- 59320: 2f0a movel %a2,%sp@- 59322: 206a 0004 moveal %a2@(4),%a0 59326: 4e90 jsr %a0@ _Thread_Enable_dispatch(); 59328: 4eb9 0005 c9ce jsr 5c9ce <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 5932e: 4fef 000c lea %sp@(12),%sp 59332: 4280 clrl %d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59334: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5933a: 4e5e unlk %fp 5933c: 4e75 rts if ( !timer_server ) return RTEMS_INCORRECT_STATE; if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; 5933e: 700b moveq #11,%d0 <== NOT EXECUTED case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59340: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59346: 4e5e unlk %fp <== NOT EXECUTED 59348: 4e75 rts <== NOT EXECUTED if ( !_TOD_Is_set ) return RTEMS_NOT_DEFINED; if ( !routine ) return RTEMS_INVALID_ADDRESS; 5934a: 7009 moveq #9,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 5934c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59352: 4e5e unlk %fp 59354: 4e75 rts Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server; if ( !timer_server ) return RTEMS_INCORRECT_STATE; 59356: 700e moveq #14,%d0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 59358: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5935e: 4e5e unlk %fp 59360: 4e75 rts #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 59362: 7004 moveq #4,%d0 } 59364: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5936a: 4e5e unlk %fp ... =============================================================================== 000472a0 : int sched_get_priority_max( int policy ) { switch ( policy ) { 472a0: 7004 moveq #4,%d0 #include int sched_get_priority_max( int policy ) { 472a2: 4e56 0000 linkw %fp,#0 472a6: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 472aa: b081 cmpl %d1,%d0 472ac: 6412 bccs 472c0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 472ae: 4eb9 0004 fbd4 jsr 4fbd4 <__errno> 472b4: 7216 moveq #22,%d1 472b6: 2040 moveal %d0,%a0 472b8: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 472ba: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 472bc: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 472be: 4e75 rts int sched_get_priority_max( int policy ) { switch ( policy ) { 472c0: 103c 0001 moveb #1,%d0 472c4: e3a8 lsll %d1,%d0 472c6: 7217 moveq #23,%d1 472c8: c081 andl %d1,%d0 472ca: 67e2 beqs 472ae <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 472cc: 4280 clrl %d0 472ce: 1039 0006 0806 moveb 60806 ,%d0 } 472d4: 4e5e unlk %fp default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; 472d6: 5380 subql #1,%d0 } ... =============================================================================== 000472dc : int sched_get_priority_min( int policy ) { switch ( policy ) { 472dc: 7004 moveq #4,%d0 #include int sched_get_priority_min( int policy ) { 472de: 4e56 0000 linkw %fp,#0 472e2: 222e 0008 movel %fp@(8),%d1 switch ( policy ) { 472e6: b081 cmpl %d1,%d0 472e8: 6412 bccs 472fc case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 472ea: 4eb9 0004 fbd4 jsr 4fbd4 <__errno> 472f0: 7216 moveq #22,%d1 472f2: 2040 moveal %d0,%a0 472f4: 70ff moveq #-1,%d0 } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 472f6: 4e5e unlk %fp case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 472f8: 2081 movel %d1,%a0@ } return POSIX_SCHEDULER_MINIMUM_PRIORITY; } 472fa: 4e75 rts int sched_get_priority_min( int policy ) { switch ( policy ) { 472fc: 103c 0001 moveb #1,%d0 47300: e3a8 lsll %d1,%d0 47302: 7217 moveq #23,%d1 47304: c081 andl %d1,%d0 47306: 67e2 beqs 472ea <== NEVER TAKEN default: rtems_set_errno_and_return_minus_one( EINVAL ); } return POSIX_SCHEDULER_MINIMUM_PRIORITY; 47308: 7001 moveq #1,%d0 } 4730a: 4e5e unlk %fp ... =============================================================================== 00047310 : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 47310: 4e56 0000 linkw %fp,#0 47314: 2f03 movel %d3,%sp@- 47316: 262e 0008 movel %fp@(8),%d3 4731a: 2f02 movel %d2,%sp@- 4731c: 242e 000c movel %fp@(12),%d2 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 47320: 4a83 tstl %d3 47322: 6622 bnes 47346 <== ALWAYS TAKEN rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 47324: 4a82 tstl %d2 47326: 6742 beqs 4736a rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 47328: 2f02 movel %d2,%sp@- 4732a: 2f39 0006 2080 movel 62080 <_Thread_Ticks_per_timeslice>,%sp@- 47330: 4eb9 0004 acec jsr 4acec <_Timespec_From_ticks> return 0; } 47336: 242e fff8 movel %fp@(-8),%d2 if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; 4733a: 508f addql #8,%sp 4733c: 4280 clrl %d0 } 4733e: 262e fffc movel %fp@(-4),%d3 47342: 4e5e unlk %fp 47344: 4e75 rts { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 47346: 4eb9 0004 3994 jsr 43994 4734c: b680 cmpl %d0,%d3 4734e: 67d4 beqs 47324 rtems_set_errno_and_return_minus_one( ESRCH ); 47350: 4eb9 0004 fbd4 jsr 4fbd4 <__errno> 47356: 7403 moveq #3,%d2 47358: 2040 moveal %d0,%a0 4735a: 70ff moveq #-1,%d0 4735c: 2082 movel %d2,%a0@ if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 4735e: 242e fff8 movel %fp@(-8),%d2 47362: 262e fffc movel %fp@(-4),%d3 47366: 4e5e unlk %fp 47368: 4e75 rts if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 4736a: 4eb9 0004 fbd4 jsr 4fbd4 <__errno> _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 47370: 242e fff8 movel %fp@(-8),%d2 if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 47374: 2040 moveal %d0,%a0 47376: 7216 moveq #22,%d1 47378: 70ff moveq #-1,%d0 _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } 4737a: 262e fffc movel %fp@(-4),%d3 4737e: 4e5e unlk %fp if ( pid && pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 47380: 2081 movel %d1,%a0@ <== NOT EXECUTED _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); return 0; } =============================================================================== 000495c8 : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 495c8: 4e56 ffe0 linkw %fp,#-32 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 495cc: 2039 0006 5f64 movel 65f64 <_Thread_Dispatch_disable_level>,%d0 495d2: 5280 addql #1,%d0 495d4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 495d8: 2a2e 0008 movel %fp@(8),%d5 495dc: 262e 000c movel %fp@(12),%d3 495e0: 23c0 0006 5f64 movel %d0,65f64 <_Thread_Dispatch_disable_level> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 495e6: 2803 movel %d3,%d4 495e8: 0284 0000 0200 andil #512,%d4 495ee: 6600 0086 bnew 49676 /* unsigned int value */ ) { va_list arg; mode_t mode; unsigned int value = 0; 495f2: 95ca subal %a2,%a2 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 ); 495f4: 486e fffc pea %fp@(-4) 495f8: 2f05 movel %d5,%sp@- 495fa: 4eb9 0005 0084 jsr 50084 <_POSIX_Semaphore_Name_to_id> * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "semaphore does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 49600: 508f addql #8,%sp 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 ); 49602: 2400 movel %d0,%d2 * 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 ) { 49604: 6726 beqs 4962c /* * 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) ) ) { 49606: 7002 moveq #2,%d0 49608: b082 cmpl %d2,%d0 4960a: 6604 bnes 49610 <== NEVER TAKEN 4960c: 4a84 tstl %d4 4960e: 666e bnes 4967e _Thread_Enable_dispatch(); 49610: 4eb9 0004 c54a jsr 4c54a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 49616: 4eb9 0005 2dd0 jsr 52dd0 <__errno> 4961c: 2040 moveal %d0,%a0 4961e: 70ff moveq #-1,%d0 49620: 2082 movel %d2,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 49622: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49628: 4e5e unlk %fp 4962a: 4e75 rts /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4962c: 0283 0000 0a00 andil #2560,%d3 49632: 0c83 0000 0a00 cmpil #2560,%d3 49638: 6772 beqs 496ac 4963a: 486e fff4 pea %fp@(-12) 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; _Thread_Enable_dispatch(); 4963e: 45f9 0004 c54a lea 4c54a <_Thread_Enable_dispatch>,%a2 49644: 2f2e fffc movel %fp@(-4),%sp@- 49648: 4879 0006 617a pea 6617a <_POSIX_Semaphore_Information> 4964e: 4eb9 0004 b850 jsr 4b850 <_Objects_Get> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 49654: 2040 moveal %d0,%a0 49656: 52a8 0016 addql #1,%a0@(22) 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 ); 4965a: 2d40 fff8 movel %d0,%fp@(-8) the_semaphore->open_count += 1; _Thread_Enable_dispatch(); 4965e: 4e92 jsr %a2@ _Thread_Enable_dispatch(); 49660: 4e92 jsr %a2@ goto return_id; 49662: 4fef 000c lea %sp@(12),%sp return_id: #if defined(RTEMS_USE_16_BIT_OBJECT) the_semaphore->Semaphore_id = the_semaphore->Object.id; id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; 49666: 202e fff8 movel %fp@(-8),%d0 4966a: 5080 addql #8,%d0 #endif return id; } 4966c: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49672: 4e5e unlk %fp 49674: 4e75 rts _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 ); 49676: 246e 0014 moveal %fp@(20),%a2 4967a: 6000 ff78 braw 495f4 /* * 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( 4967e: 486e fff8 pea %fp@(-8) 49682: 2f0a movel %a2,%sp@- 49684: 42a7 clrl %sp@- 49686: 2f05 movel %d5,%sp@- 49688: 4eb9 0004 fecc jsr 4fecc <_POSIX_Semaphore_Create_support> 4968e: 2400 movel %d0,%d2 /* * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); 49690: 4eb9 0004 c54a jsr 4c54a <_Thread_Enable_dispatch> if ( status == -1 ) 49696: 4fef 0010 lea %sp@(16),%sp 4969a: 70ff moveq #-1,%d0 4969c: b082 cmpl %d2,%d0 4969e: 66c6 bnes 49666 return SEM_FAILED; 496a0: 70ff moveq #-1,%d0 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 496a2: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 496a8: 4e5e unlk %fp 496aa: 4e75 rts /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); 496ac: 4eb9 0004 c54a jsr 4c54a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 496b2: 4eb9 0005 2dd0 jsr 52dd0 <__errno> 496b8: 7211 moveq #17,%d1 496ba: 2040 moveal %d0,%a0 496bc: 70ff moveq #-1,%d0 id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 496be: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 * 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 * ); 496c4: 2081 movel %d1,%a0@ id = &the_semaphore->Semaphore_id; #else id = (sem_t *)&the_semaphore->Object.id; #endif return id; } 496c6: 4e5e unlk %fp ... =============================================================================== 00049724 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 49724: 4e56 fffc linkw %fp,#-4 49728: 2f02 movel %d2,%sp@- * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 4972a: 486e fffc pea %fp@(-4) 4972e: 2f2e 000c movel %fp@(12),%sp@- int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 49732: 242e 0008 movel %fp@(8),%d2 * * If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID, * POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW, * then we should not wait. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 49736: 4eb9 0004 f2e4 jsr 4f2e4 <_POSIX_Absolute_timeout_to_ticks> if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) 4973c: 508f addql #8,%sp 4973e: 7203 moveq #3,%d1 49740: b280 cmpl %d0,%d1 49742: 671a beqs 4975e <== ALWAYS TAKEN do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 49744: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 49748: 42a7 clrl %sp@- <== NOT EXECUTED 4974a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4974c: 4eb9 0005 00f8 jsr 500f8 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 49752: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 49756: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 4975a: 4e5e unlk %fp <== NOT EXECUTED 4975c: 4e75 rts <== NOT EXECUTED */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 4975e: 2f2e fffc movel %fp@(-4),%sp@- 49762: 4878 0001 pea 1 49766: 2f02 movel %d2,%sp@- 49768: 4eb9 0005 00f8 jsr 500f8 <_POSIX_Semaphore_Wait_support> lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 4976e: 242e fff8 movel %fp@(-8),%d2 */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE ) do_wait = false; lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 49772: 4fef 000c lea %sp@(12),%sp lock_status == POSIX_ABSOLUTE_TIMEOUT_IS_NOW ) rtems_set_errno_and_return_minus_one( ETIMEDOUT ); } return lock_status; } 49776: 4e5e unlk %fp ... =============================================================================== 00049794 : */ int sem_unlink( const char *name ) { 49794: 4e56 fffc linkw %fp,#-4 49798: 2039 0006 5f64 movel 65f64 <_Thread_Dispatch_disable_level>,%d0 4979e: 5280 addql #1,%d0 497a0: 2f0a movel %a2,%sp@- 497a2: 2f02 movel %d2,%sp@- 497a4: 23c0 0006 5f64 movel %d0,65f64 <_Thread_Dispatch_disable_level> register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 497aa: 486e fffc pea %fp@(-4) 497ae: 2f2e 0008 movel %fp@(8),%sp@- 497b2: 4eb9 0005 0084 jsr 50084 <_POSIX_Semaphore_Name_to_id> if ( status != 0 ) { 497b8: 508f addql #8,%sp register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 497ba: 2400 movel %d0,%d2 if ( status != 0 ) { 497bc: 6644 bnes 49802 <== NEVER TAKEN */ #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return NULL; #endif return information->local_table[ index ]; 497be: 4280 clrl %d0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); } the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object( 497c0: 2079 0006 6192 moveal 66192 <_POSIX_Semaphore_Information+0x18>,%a0 497c6: 302e fffe movew %fp@(-2),%d0 497ca: 2470 0c00 moveal %a0@(00000000,%d0:l:4),%a2 &_POSIX_Semaphore_Information, _Objects_Get_index( the_semaphore_id ) ); the_semaphore->linked = false; 497ce: 4200 clrb %d0 497d0: 1540 0015 moveb %d0,%a2@(21) RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove ( POSIX_Semaphore_Control *the_semaphore ) { _Objects_Namespace_remove( 497d4: 2f0a movel %a2,%sp@- 497d6: 4879 0006 617a pea 6617a <_POSIX_Semaphore_Information> 497dc: 4eb9 0004 b9d0 jsr 4b9d0 <_Objects_Namespace_remove> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 497e2: 2f0a movel %a2,%sp@- 497e4: 4eb9 0005 002c jsr 5002c <_POSIX_Semaphore_Delete> _Thread_Enable_dispatch(); 497ea: 4eb9 0004 c54a jsr 4c54a <_Thread_Enable_dispatch> return 0; } 497f0: 242e fff4 movel %fp@(-12),%d2 the_semaphore->linked = false; _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; 497f4: 4fef 000c lea %sp@(12),%sp 497f8: 4280 clrl %d0 } 497fa: 246e fff8 moveal %fp@(-8),%a2 497fe: 4e5e unlk %fp 49800: 4e75 rts _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); 49802: 4eb9 0004 c54a jsr 4c54a <_Thread_Enable_dispatch> rtems_set_errno_and_return_minus_one( status ); 49808: 4eb9 0005 2dd0 jsr 52dd0 <__errno> _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } 4980e: 246e fff8 moveal %fp@(-8),%a2 _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 ); 49812: 2040 moveal %d0,%a0 49814: 70ff moveq #-1,%d0 49816: 2082 movel %d2,%a0@ _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } 49818: 242e fff4 movel %fp@(-12),%d2 4981c: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 00047090 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 47090: 4e56 fff4 linkw %fp,#-12 47094: 226e 0010 moveal %fp@(16),%a1 47098: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4709c: 242e 0008 movel %fp@(8),%d2 470a0: 246e 000c moveal %fp@(12),%a2 ISR_Level level; if ( oact ) 470a4: 4a89 tstl %a1 470a6: 6718 beqs 470c0 *oact = _POSIX_signals_Vectors[ sig ]; 470a8: 2202 movel %d2,%d1 470aa: 2002 movel %d2,%d0 470ac: e989 lsll #4,%d1 470ae: e588 lsll #2,%d0 470b0: 2041 moveal %d1,%a0 470b2: 91c0 subal %d0,%a0 470b4: d1fc 0006 3134 addal #405812,%a0 470ba: 22d8 movel %a0@+,%a1@+ 470bc: 22d8 movel %a0@+,%a1@+ 470be: 2290 movel %a0@,%a1@ if ( !sig ) 470c0: 4a82 tstl %d2 470c2: 6700 0088 beqw 4714c static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 470c6: 2002 movel %d2,%d0 470c8: 5380 subql #1,%d0 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 470ca: 721f moveq #31,%d1 470cc: b280 cmpl %d0,%d1 470ce: 657c bcss 4714c * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 470d0: 7009 moveq #9,%d0 470d2: b082 cmpl %d2,%d0 470d4: 6776 beqs 4714c /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 470d6: 4a8a tstl %a2 470d8: 6766 beqs 47140 <== NEVER TAKEN /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 470da: 203c 0000 0700 movel #1792,%d0 470e0: 40c3 movew %sr,%d3 470e2: 8083 orl %d3,%d0 470e4: 46c0 movew %d0,%sr if ( act->sa_handler == SIG_DFL ) { 470e6: 4aaa 0008 tstl %a2@(8) 470ea: 6730 beqs 4711c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( sig ); 470ec: 2f02 movel %d2,%sp@- 470ee: 4eb9 0004 cf44 jsr 4cf44 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 470f4: 588f addql #4,%sp 470f6: 2002 movel %d2,%d0 470f8: 224a moveal %a2,%a1 470fa: e98a lsll #4,%d2 470fc: e588 lsll #2,%d0 470fe: 2042 moveal %d2,%a0 47100: 91c0 subal %d0,%a0 47102: d1fc 0006 3134 addal #405812,%a0 47108: 20d9 movel %a1@+,%a0@+ 4710a: 20d9 movel %a1@+,%a0@+ 4710c: 2091 movel %a1@,%a0@ } _ISR_Enable( level ); 4710e: 46c3 movew %d3,%sr * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 47110: 4280 clrl %d0 } 47112: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47118: 4e5e unlk %fp 4711a: 4e75 rts * 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 ]; 4711c: 2002 movel %d2,%d0 4711e: e98a lsll #4,%d2 47120: e588 lsll #2,%d0 47122: 9480 subl %d0,%d2 47124: 2242 moveal %d2,%a1 47126: 2042 moveal %d2,%a0 47128: d3fc 0006 0696 addal #394902,%a1 4712e: d1fc 0006 3134 addal #405812,%a0 47134: 20d9 movel %a1@+,%a0@+ 47136: 20d9 movel %a1@+,%a0@+ 47138: 2091 movel %a1@,%a0@ } else { _POSIX_signals_Clear_process_signals( sig ); _POSIX_signals_Vectors[ sig ] = *act; } _ISR_Enable( level ); 4713a: 46c3 movew %d3,%sr * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 4713c: 4280 clrl %d0 4713e: 60d2 bras 47112 47140: 4280 clrl %d0 <== NOT EXECUTED } 47142: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 47148: 4e5e unlk %fp <== NOT EXECUTED 4714a: 4e75 rts <== 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 ); 4714c: 4eb9 0004 fe3c jsr 4fe3c <__errno> 47152: 7216 moveq #22,%d1 47154: 2040 moveal %d0,%a0 47156: 70ff moveq #-1,%d0 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 47158: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 4715e: 2081 movel %d1,%a0@ * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 47160: 4e5e unlk %fp <== NOT EXECUTED =============================================================================== 000499f4 : int sigwait( const sigset_t *set, int *sig ) { 499f4: 4e56 0000 linkw %fp,#0 499f8: 2f0a movel %a2,%sp@- 499fa: 246e 000c moveal %fp@(12),%a2 int status; status = sigtimedwait( set, NULL, NULL ); 499fe: 42a7 clrl %sp@- 49a00: 42a7 clrl %sp@- 49a02: 2f2e 0008 movel %fp@(8),%sp@- 49a06: 4eb9 0004 97dc jsr 497dc if ( status != -1 ) { 49a0c: 4fef 000c lea %sp@(12),%sp 49a10: 72ff moveq #-1,%d1 49a12: b280 cmpl %d0,%d1 49a14: 6710 beqs 49a26 if ( sig ) 49a16: 4a8a tstl %a2 49a18: 671e beqs 49a38 <== NEVER TAKEN *sig = status; 49a1a: 2480 movel %d0,%a2@ return 0; } return errno; } 49a1c: 246e fffc moveal %fp@(-4),%a2 status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 49a20: 4280 clrl %d0 } return errno; } 49a22: 4e5e unlk %fp 49a24: 4e75 rts if ( sig ) *sig = status; return 0; } return errno; 49a26: 4eb9 0005 23d0 jsr 523d0 <__errno> } 49a2c: 246e fffc moveal %fp@(-4),%a2 if ( sig ) *sig = status; return 0; } return errno; 49a30: 2040 moveal %d0,%a0 } 49a32: 4e5e unlk %fp if ( sig ) *sig = status; return 0; } return errno; 49a34: 2010 movel %a0@,%d0 } 49a36: 4e75 rts 49a38: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 49a3c: 4280 clrl %d0 <== NOT EXECUTED } return errno; } 49a3e: 4e5e unlk %fp <== NOT EXECUTED ... =============================================================================== 00046516 : useconds_t ualarm( useconds_t useconds, useconds_t interval ) { 46516: 4e56 ffe8 linkw %fp,#-24 4651a: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4651e: 242e 0008 movel %fp@(8),%d2 /* * Initialize the timer used to implement alarm(). */ if ( !the_timer->routine ) { 46522: 4ab9 0006 2ea8 tstl 62ea8 <_POSIX_signals_Ualarm_timer+0x1c> 46528: 6700 0086 beqw 465b0 _Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL ); } else { Watchdog_States state; state = _Watchdog_Remove( the_timer ); 4652c: 4879 0006 2e8c pea 62e8c <_POSIX_signals_Ualarm_timer> 46532: 4eb9 0004 a408 jsr 4a408 <_Watchdog_Remove> if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) { 46538: 588f addql #4,%sp 4653a: 7201 moveq #1,%d1 4653c: 5580 subql #2,%d0 4653e: b280 cmpl %d0,%d1 46540: 6400 0098 bccw 465da useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 46544: 4283 clrl %d3 <== NOT EXECUTED /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 46546: 4a82 tstl %d2 <== NOT EXECUTED 46548: 660c bnes 46556 <== NOT EXECUTED _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); } return remaining; } 4654a: 2003 movel %d3,%d0 4654c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 46552: 4e5e unlk %fp 46554: 4e75 rts if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 46556: 280e movel %fp,%d4 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 46558: 223c 000f 4240 movel #1000000,%d1 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 4655e: 5184 subql #8,%d4 46560: 45f9 0004 9f08 lea 49f08 <_Timespec_To_ticks>,%a2 * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 46566: 4c41 2000 remul %d1,%d0,%d2 4656a: 4c41 2002 remul %d1,%d2,%d2 tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4656e: 223c 0000 03e8 movel #1000,%d1 46574: 4c00 1800 mulsl %d0,%d1 ticks = _Timespec_To_ticks( &tp ); 46578: 2f04 movel %d4,%sp@- */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4657a: 2d41 fffc movel %d1,%fp@(-4) * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { Watchdog_Interval ticks; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4657e: 2d42 fff8 movel %d2,%fp@(-8) tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; ticks = _Timespec_To_ticks( &tp ); 46582: 4e92 jsr %a2@ if ( ticks == 0 ) ticks = 1; _Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) ); 46584: 2f04 movel %d4,%sp@- 46586: 4e92 jsr %a2@ ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 46588: 4879 0006 2e8c pea 62e8c <_POSIX_signals_Ualarm_timer> 4658e: 4879 0006 2738 pea 62738 <_Watchdog_Ticks_chain> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 46594: 23c0 0006 2e98 movel %d0,62e98 <_POSIX_signals_Ualarm_timer+0xc> _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4659a: 4eb9 0004 a2b4 jsr 4a2b4 <_Watchdog_Insert> 465a0: 4fef 0010 lea %sp@(16),%sp } return remaining; } 465a4: 2003 movel %d3,%d0 465a6: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 465ac: 4e5e unlk %fp 465ae: 4e75 rts Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 465b0: 42b9 0006 2e94 clrl 62e94 <_POSIX_signals_Ualarm_timer+0x8> useconds_t ualarm( useconds_t useconds, useconds_t interval ) { useconds_t remaining = 0; 465b6: 4283 clrl %d3 the_watchdog->routine = routine; 465b8: 203c 0004 64d4 movel #287956,%d0 the_watchdog->id = id; 465be: 42b9 0006 2eac clrl 62eac <_POSIX_signals_Ualarm_timer+0x20> Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 465c4: 23c0 0006 2ea8 movel %d0,62ea8 <_POSIX_signals_Ualarm_timer+0x1c> the_watchdog->id = id; the_watchdog->user_data = user_data; 465ca: 42b9 0006 2eb0 clrl 62eb0 <_POSIX_signals_Ualarm_timer+0x24> /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 465d0: 4a82 tstl %d2 465d2: 6700 ff76 beqw 4654a 465d6: 6000 ff7e braw 46556 * boot. Since alarm() is dealing in seconds, we must account for * this. */ ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); 465da: 2039 0006 2ea0 movel 62ea0 <_POSIX_signals_Ualarm_timer+0x14>,%d0 465e0: d0b9 0006 2e98 addl 62e98 <_POSIX_signals_Ualarm_timer+0xc>,%d0 /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 465e6: 486e fff8 pea %fp@(-8) 465ea: 90b9 0006 2ea4 subl 62ea4 <_POSIX_signals_Ualarm_timer+0x18>,%d0 remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 465f0: 283c 000f 4240 movel #1000000,%d4 ticks = the_timer->initial; ticks -= (the_timer->stop_time - the_timer->start_time); /* remaining is now in ticks */ _Timespec_From_ticks( ticks, &tp ); 465f6: 2f00 movel %d0,%sp@- 465f8: 4eb9 0004 9e7c jsr 49e7c <_Timespec_From_ticks> remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND; 465fe: 202e fff8 movel %fp@(-8),%d0 46602: 4c04 0800 mulsl %d4,%d0 remaining += tp.tv_nsec / 1000; 46606: 283c 0000 03e8 movel #1000,%d4 4660c: 508f addql #8,%sp 4660e: 262e fffc movel %fp@(-4),%d3 46612: 4c44 3803 remsl %d4,%d3,%d3 46616: d680 addl %d0,%d3 /* * If useconds is non-zero, then the caller wants to schedule * the alarm repeatedly at that interval. If the interval is * less than a single clock tick, then fudge it to a clock tick. */ if ( useconds ) { 46618: 4a82 tstl %d2 4661a: 6700 ff2e beqw 4654a 4661e: 6000 ff36 braw 46556 <== NOT EXECUTED ...